add_filter to apply_filters that exists within class

I suspect the issue has to do with the load order of the plugins / filters. The plugin that has the the apply_filters() call (inside of CTALoadExtensions) is running after the plugin that has the add_filter() call. Try putting add_filter() inside of a function that is tied to plugins_loaded.

Warning: Missing argument 2 for widget_title filter

You don’t pass more than argument to that filter, so any callback expecting more than one will not get it. The core calls this filter always like this: $title = apply_filters( ‘widget_title’, empty($instance[‘title’]) ? ” : $instance[‘title’], $instance, $this->id_base ); But you are passing just $instance[‘title’]. Add the missing parameters, and the error will vanish. … Read more

get_header and hook avoid normal call

No, you cannot do that, unfortunately, because get_header( $name ) doesn’t have a filter for the $name (it only passes the name with the action call). However, if you are willing to modify the header.php file for each site with something like this right at the beginning of the file: <?php if ( apply_filters( ‘load_custom_header’, … Read more

Passing variable from child theme to parent theme

Stick to filtering one value at a time to keep it simple, and add filters for the colors to be used by the child theme: add_filter( ‘post_thumbnail_html’, ‘map_thumbnail’); function map_thumbnail($html) { $my_post = get_post($post->ID); $defaultcolor1 = “#??????”; // parent theme default $defaultcolor2 = “#??????”; // parent theme default $water_color = apply_filters(‘water_color’,$defaultcolor1); $tree_color = apply_filters(‘tree_color’,$defaultcolor2); if($my_post->post_name … Read more

Multiple filters for wp_get_archive

Make use of custom parameter, lets call it wpse__current_year, which will accept two values, true (includes current year) and false (excludes current year). Lets incorporate that function show_monthly_archive( $post_type ) { $current_year_args = array( ‘type’ => ‘monthly’, ‘limit’ => ’12’, ‘format’ => ‘html’, ‘before’ => ”, ‘after’ => ”, ‘show_post_count’ => false, ‘echo’ => 1, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)