Permalink
Browse files

Merge branch 'master' of https://github.com/Jonnyauk/Wonderflux

  • Loading branch information...
Jonnyauk committed Nov 1, 2017
2 parents 827c02b + 00a7960 commit d9bed1d1fe4cbc619a4be3153cccfb3d90777f15
Showing with 10 additions and 4 deletions.
  1. +8 −3 functions.php
  2. +2 −1 wf-includes/wf-admin-functions.php
View
@@ -146,7 +146,7 @@
add_action( 'wffooter_after_content', 'wfx_display_credit', 1 );
add_action( 'wf_footer', 'wfx_display_code_credit', 3 );
add_action( 'auth_redirect', 'wfx_admin_menus' );
add_filter( 'theme_page_templates','wfx_remove_page_templates' );
add_filter( 'theme_page_templates', 'wfx_remove_page_templates' );
//// 1.6 // Wonderflux debug functionality
@@ -1712,13 +1712,18 @@
/**
* Remove unwanted page templates from page attributes dropdown as set in Wonderflux options.
* Filters theme_page_templates.
* NOTE: Added check for admin to stop this breaking WP REST API
*
* @since 2.0
* @version 2.0
* @version 2.6
*
* @param [array] $input Pass through WordPress page template array for manipulation via filter.
*/
if ( !function_exists( 'wfx_remove_page_templates' ) ) : function wfx_remove_page_templates($input) { global $wfx_admin_post; return $wfx_admin_post->remove_page_templates($input); } endif;
if ( !function_exists( 'wfx_remove_page_templates' ) ) : function wfx_remove_page_templates($input) {
if ( is_admin() ) {
global $wfx_admin_post; return $wfx_admin_post->remove_page_templates($input);
}
} endif;
/*
@@ -1327,9 +1327,10 @@ class wflux_admin_post extends wflux_data {
/**
* Remove unwanted page templates from page attributes dropdown as set in Wonderflux options.
* Filters theme_page_templates.
* NOTE: Added check for admin in functions.php to stop this breaking WP REST API
*
* @since 2.0
* @version 2.0
* @version 2.6
*
* @param [array] $input Pass through WordPress page template array for manipulation via filter.
*/

0 comments on commit d9bed1d

Please sign in to comment.