From 91217a786e0d86dfd732899ed2bb04f5149eb5df Mon Sep 17 00:00:00 2001 From: Alex Prokopenko Date: Tue, 18 Sep 2018 18:48:35 +0300 Subject: [PATCH] Fix ACF Theme fields, requirements print --- app/Fields/Theme_Fields.php | 4 +++- requirements.php | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/Fields/Theme_Fields.php b/app/Fields/Theme_Fields.php index ad4037f..4a3835a 100644 --- a/app/Fields/Theme_Fields.php +++ b/app/Fields/Theme_Fields.php @@ -13,7 +13,9 @@ public function init() { $this->add_options_page( 'Theme options' ); $this->has( - $this->build() + $this->build('theme_options', [ + 'style' => 'seamless', + ]) ->addTab( 'General' ) ->addFields( $this->general_tab() ) ->addTab( 'Socials Links' ) diff --git a/requirements.php b/requirements.php index d6d10c8..5dba43d 100644 --- a/requirements.php +++ b/requirements.php @@ -67,7 +67,7 @@ class Just_Theme_Framework_Checker { private function __construct() { global $pagenow; if ( ! is_admin() && 'wp-login.php' !== $pagenow && ! $this->check_requirements() ) { - throw new Exception( 'Your theme requires Just Theme Framework and Titan Framework plugins to be installed and activated.' ); + throw new Exception( 'Your theme requires WordPress Theme Framework and Advanced Custom Fields PRO plugins to be installed and activated.' ); } add_action( 'admin_notices', array( $this, 'display_requirements_admin_notice' ) ); } @@ -127,7 +127,17 @@ public function display_requirements_admin_notice() { } $html = '

Please fix the errors below to use current activated theme:

' . implode( '

', $warnings ) . '

'; - echo wp_kses( $html, array( 'div', 'h3', 'p' ) ); + echo wp_kses( $html, array( + 'div' => [ + 'class' => true, + ], + 'h3' => true, + 'p' => true, + 'a' => [ + 'href' => true, + 'target' => true, + ], + ) ); } }