Subir ajustes de acordeon y SEO
This commit is contained in:
@@ -310,6 +310,22 @@ function wp_font_library_render_page() {
|
||||
function wp_font_library_intercept_render() {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
if ( isset( $_GET['page'] ) && 'font-library' === $_GET['page'] ) {
|
||||
// The page renders outside the menu page callback flow, so it must
|
||||
// enforce authentication and capability checks itself. Without this,
|
||||
// any admin entry point firing `admin_init` (such as admin-post.php,
|
||||
// which serves logged-out requests) would render the page for
|
||||
// unauthenticated visitors.
|
||||
if ( ! is_user_logged_in() ) {
|
||||
auth_redirect();
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'edit_theme_options' ) ) {
|
||||
wp_die(
|
||||
__( 'Sorry, you are not allowed to access this page.' ),
|
||||
403
|
||||
);
|
||||
}
|
||||
|
||||
wp_font_library_render_page();
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -310,6 +310,22 @@ function wp_options_connectors_render_page() {
|
||||
function wp_options_connectors_intercept_render() {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
if ( isset( $_GET['page'] ) && 'options-connectors' === $_GET['page'] ) {
|
||||
// The page renders outside the menu page callback flow, so it must
|
||||
// enforce authentication and capability checks itself. Without this,
|
||||
// any admin entry point firing `admin_init` (such as admin-post.php,
|
||||
// which serves logged-out requests) would render the page for
|
||||
// unauthenticated visitors.
|
||||
if ( ! is_user_logged_in() ) {
|
||||
auth_redirect();
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'manage_options' ) ) {
|
||||
wp_die(
|
||||
__( 'Sorry, you are not allowed to access this page.' ),
|
||||
403
|
||||
);
|
||||
}
|
||||
|
||||
wp_options_connectors_render_page();
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user