Matt_Postlethwaite
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
That’s great! Thanks for looking into this for us.
This:
error_log( print_r($wp_filter['bnfw_insert_post_themes'], true) );
Returns this:
[09-Nov-2016 13:13:43 UTC] Array ( [10] => Array ( [bnfw_insert_post_hook_for_theme] => Array ( [function] => bnfw_insert_post_hook_for_theme [accepted_args] => 1 ) ) )
Hi @voltronik
I am a developer at Pixel Junction and have looked further into this.
I have created a new p2 child theme which only contains style.css and function.php
Style.css
/* Theme Name: mytheme Template: p2 */ @import url("../p2/style.css");
Function.php
function bnfw_insert_post_hook_for_theme( $themes ) { $themes[] = 'mytheme'; return $themes; } add_filter( 'bnfw_insert_post_themes', 'bnfw_insert_post_hook_for_theme');
Notification still doesn’t work with this, so I added an error_log of the $insert_post_themes array within the core bnfw.php like this:
$insert_post_themes = apply_filters( 'bnfw_insert_post_themes', array( 'P2', 'Syncope' ) ); error_log( print_r($insert_post_themes, true) );
and this is what’s added to the log
[09-Nov-2016 09:39:13 UTC] Array ( [0] => P2 [1] => Syncope )
Which shows that ‘mytheme’ isn’t being added as an array item.
- This reply was modified 8 years, 4 months ago by Matt_Postlethwaite.
- This reply was modified 8 years, 4 months ago by Matt_Postlethwaite.
- This reply was modified 8 years, 4 months ago by Matt_Postlethwaite. Reason: Fixing code blocks
Viewing 4 replies - 1 through 4 (of 4 total)