• Resolved tmdesigned

    (@tmdesigned)


    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);
    • This topic was modified 6 years, 5 months ago by tmdesigned.
Viewing 1 replies (of 1 total)
  • Plugin Contributor Kshirod Patel

    (@kshirod-patel)

    Hello @tmdesigned,

    Really thanks for the suggestion. We will discuss with our developer team and if possible we will definitely add the filter what you have suggested. Once again thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘Proposed filter addition’ is closed to new replies.