';
$header = $this->get_metabox_header( $tabs );
echo $header;
$active = '';
foreach ( $tabs as $m ) {
echo '
';
if ( ! $active ) {
$active = ' style="display:none;"';
}
$m['args'] = $m['callback_args'];
$m['callback'][0]->{$m['callback'][1]}( $post, $m );
echo '
';
}
echo '
';
}
/**
* Get Metabox Header
*
* @since ?
*
* @param $tabs
*
* @return string
*/
function get_metabox_header( $tabs ) {
$header = '';
return $header;
}
/**
* Admin Bar Menu
*
* @since ?
*/
function admin_bar_menu() {
if ( apply_filters( 'aioseo_show_in_admin_bar', true ) === false ) {
// API filter hook to disable showing SEO in admin bar.
return;
}
global $wp_admin_bar, $aioseop_admin_menu, $post, $aioseop_options;
$toggle = '';
if ( isset( $_POST['aiosp_use_original_title'] ) && isset( $_POST['aiosp_admin_bar'] ) && AIOSEOPPRO ) {
$toggle = 'on';
}
if ( isset( $_POST['aiosp_use_original_title'] ) && ! isset( $_POST['aiosp_admin_bar'] ) && AIOSEOPPRO ) {
$toggle = 'off';
}
if ( ( ! isset( $aioseop_options['aiosp_admin_bar'] ) && 'off' !== $toggle ) || ( ! empty( $aioseop_options['aiosp_admin_bar'] ) && 'off' !== $toggle ) || isset( $_POST['aiosp_admin_bar'] ) || true == apply_filters( 'aioseo_show_in_admin_bar', false ) ) {
if ( apply_filters( 'aioseo_show_in_admin_bar', true ) === false ) {
// API filter hook to disable showing SEO in admin bar.
return;
}
$menu_slug = plugin_basename( __FILE__ );
$url = '';
if ( function_exists( 'menu_page_url' ) ) {
$url = menu_page_url( $menu_slug, 0 );
}
if ( empty( $url ) ) {
$url = esc_url( admin_url( 'admin.php?page=' . $menu_slug ) );
}
// Check if there are new notifications.
$notifications = '';
$notices = new AIOSEOP_Notices();
if ( count( $notices->remote_notices ) ) {
$count = count( $notices->remote_notices ) < 10 ? count( $notices->remote_notices ) : '!';
$notifications = ' ';
}
$wp_admin_bar->add_menu(
array(
'id' => AIOSEOP_PLUGIN_DIRNAME,
'title' => '