Skip to content

Commit

Permalink
Fix ACF Theme fields, requirements print
Browse files Browse the repository at this point in the history
  • Loading branch information
aprokopenko committed Sep 18, 2018
1 parent 13dd6f1 commit 91217a7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/Fields/Theme_Fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' )
Expand Down
14 changes: 12 additions & 2 deletions requirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) );
}
Expand Down Expand Up @@ -127,7 +127,17 @@ public function display_requirements_admin_notice() {
}

$html = '<div class="error"><h3>Please fix the errors below to use current activated theme:</h3><p>' . implode( '</p><p>', $warnings ) . '</p></div>';
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,
],
) );
}
}

Expand Down

0 comments on commit 91217a7

Please sign in to comment.