false ) ); } /** * Change order of menu item so the About page menu item is below Site Stats. * * @param array $menu_order List of menu slugs. It's unaffected. This filter is used to reorder the Jetpack submenu items. * * @return array */ public function submenu_order( $menu_order ) { global $submenu; $stats_key = null; $about_key = null; foreach ( $submenu['jetpack'] as $index => $menu_item ) { if ( false !== array_search( 'stats', $menu_item, true ) ) { $stats_key = $index; } if ( false !== array_search( 'jetpack_about', $menu_item, true ) ) { $about_key = $index; } } if ( $stats_key && $about_key ) { $temp = $submenu['jetpack'][ $stats_key ]; $submenu['jetpack'][ $stats_key ] = $submenu['jetpack'][ $about_key ]; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited $submenu['jetpack'][ $about_key ] = $temp; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited } return $menu_order; } /** * Render the page content */ public function page_render() { ?>
take a look at our WordPress.org profile.', 'jetpack' ), array( 'a' => array( 'href' => array(), 'target' => array(), 'rel' => array(), 'class' => array(), 'data-jptracks-name' => array(), ), ) ); ?>
'; if ( ! $compatible_php && ! $compatible_wp ) { esc_html_e( 'This plugin doesn’t work with your versions of WordPress and PHP.', 'jetpack' ); if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) { printf( /* translators: 1: "Update WordPress" screen URL, 2: "Update PHP" page URL */ ' ' . wp_kses( __( 'Please update WordPress, and then learn more about updating PHP.', 'jetpack' ), array( 'a' => array( 'href' => true ) ) ), esc_url( self_admin_url( 'update-core.php' ) ), esc_url( $this->jp_get_update_php_url() ) ); $this->jp_update_php_annotation(); } elseif ( current_user_can( 'update_core' ) ) { printf( /* translators: %s: "Update WordPress" screen URL */ ' ' . wp_kses( __( 'Please update WordPress.', 'jetpack' ), array( 'a' => array( 'href' => true ) ) ), esc_url( self_admin_url( 'update-core.php' ) ) ); } elseif ( current_user_can( 'update_php' ) ) { printf( /* translators: %s: "Update PHP" page URL */ ' ' . wp_kses( __( 'Learn more about updating PHP.', 'jetpack' ), array( 'a' => array( 'href' => true ) ) ), esc_url( $this->jp_get_update_php_url() ) ); $this->jp_update_php_annotation(); } } elseif ( ! $compatible_wp ) { esc_html_e( 'This plugin doesn’t work with your version of WordPress.', 'jetpack' ); if ( current_user_can( 'update_core' ) ) { printf( /* translators: %s: "Update WordPress" screen URL */ ' ' . wp_kses( __( 'Please update WordPress.', 'jetpack' ), array( 'a' => array( 'href' => true ) ) ), esc_url( self_admin_url( 'update-core.php' ) ) ); } } elseif ( ! $compatible_php ) { esc_html_e( 'This plugin doesn’t work with your version of PHP.', 'jetpack' ); if ( current_user_can( 'update_php' ) ) { printf( /* translators: %s: "Update PHP" page URL */ ' ' . wp_kses( __( 'Learn more about updating PHP.', 'jetpack' ), array( 'a' => array( 'href' => true ) ) ), esc_url( $this->jp_get_update_php_url() ) ); $this->jp_update_php_annotation(); } } echo '
'; } ?>'; printf( wp_kses( /* translators: %s: default Update PHP page URL */ __( 'This resource is provided by your web host, and is specific to your site. For more information, see the official WordPress documentation.', 'jetpack' ), array( 'a' => array( 'href' => true, 'rel' => true, ), ) ), esc_url( $default_url ) ); echo '
'; } }