typo on apply filters for custom css files
-
WP: 4.1.1
SimpleMap: 2.4.7On line 164 of options-general.php I think the call should be:
$themes2 = apply_filters( 'sm-general-options-themes2', $themes2 );
i.e. the filter name should be sm-general-options-themes2, so I can filter ONLY custom css template names.
Currently, if I add a filter like this to my functions.php file:add_filter('sm-general-options-themes1','look_for_custom_css_in_theme_folder'); function look_for_custom_css_in_theme_folder($themes){ if ( file_exists( STYLESHEETPATH . '/simplemap-styles' ) ) $theme = SM_Options::read_styles( STYLESHEETPATH . '/simplemap-styles' ); $themes = array_merge($themes,$theme); return $themes; }
to look for custom templates files in my theme folder, I’m adding my custom template names to both default AND custom themes.
suggestion: it could be more dev-friendly to call the filter something like
sm-general-options-custom-themes
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘typo on apply filters for custom css files’ is closed to new replies.