Skip to content

Actions & Filters

Nick Haskins edited this page Nov 28, 2013 · 16 revisions

There are several different ways to write filter functions. For the sake of simplicity, we're going to cover a couple of different methods that cover general situations.

Child Theme

Soren is a toolkit, so most of the work is done within child themes. This means that there needs to be a 3rd level of sorts, like a grandchild theme. We created this in the form of a plugin called Child Customizer. Here you can drop in your filter functions, and also override child theme templates. It's your number one safe bet in overriding everything in a Soren child theme.

Actions

soren_after_header
soren_inside_top_body

Filters

LESS Variable Filter

soren_less_vars

Example
add_filter( 'soren_less_vars', 'my_less_vars');  
public function my_less_vars($vars){  
  $vars[ 'my-new-color' ]   = '#777777';  
  return $vars;  
}  
//in css
color:@my-new-color;  

Meta Box Filter

Soren loads Custom Meta Boxes by Human Made. Follow their docs on how to setup meta boxes.


Default Theme Options

soren_default_options


Gallery Arguments

soren_gallery_args


Gallery Output

soren_gallery_output