Proposed filter addition
-
The github repository I found seems out of date, but here is what I was going to suggest as a pull request.
In wprmclass.php, the public function option( $option ) starting on line 24 returns values for options that are put into the inline CSS (and possibly elsewhere?).
It would be helpful if these options are filterable, so that theme developers can conditionally alter the settings (i.e. per page template, theme setting, etc.).
For instance:
public function option( $option ){ if( isset( $this->options[$option] ) ) $option_val = apply_filters( "wpr_option/id=$option", $this->options[$option] ); return $option_val; return ''; }
Example use:
function update_menu_color( $old_color ){ if( is_front_page() ){ return '#f00'; }else{ return $old_color; } } add_filter( "wpr_option/id=menu_color", "update_menu_color", 10, 1);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Proposed filter addition’ is closed to new replies.