Fix blank general settings page in WordPress < 4.9
This commit is contained in:
@@ -57,7 +57,7 @@ function sp_get_screen_ids() {
|
|||||||
'edit-sp_role',
|
'edit-sp_role',
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
add_action( 'sportspress_settings_general', 'add_codemirror_to_custom_css' );
|
|
||||||
function add_codemirror_to_custom_css() {
|
function add_codemirror_to_custom_css() {
|
||||||
// Enqueue code editor and settings for manipulating HTML.
|
// Enqueue code editor and settings for manipulating HTML.
|
||||||
$settings = wp_enqueue_code_editor( array( 'type' => 'css' ) );
|
$settings = wp_enqueue_code_editor( array( 'type' => 'css' ) );
|
||||||
@@ -73,3 +73,6 @@ function add_codemirror_to_custom_css() {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if ( function_exists( 'wp_enqueue_code_editor' ) ) {
|
||||||
|
add_action( 'sportspress_settings_general', 'add_codemirror_to_custom_css' );
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user