( $wp_admin_bar ) { $wp_admin_bar->add_group( array( 'id' => 'top-secondary', 'meta' => array( 'class' => 'ab-top-secondary', ), ) ); $wp_admin_bar->add_group( array( 'parent' => 'wp-logo', 'id' => 'wp-logo-external', 'meta' => array( 'class' => 'ab-sub-secondary', ), ) ); } /** * Enqueues inline style to hide the admin bar when printing. * * @since 6.4.0 */ function wp_enqueue_admin_bar_header_styles() { // Back-compat for plugins that disable functionality by unhooking this action. $action = is_admin() ? 'admin_head' : 'wp_head'; if ( ! has_action( $action, 'wp_admin_bar_header' ) ) { return; } remove_action( $action, 'wp_admin_bar_header' ); wp_add_inline_style( 'admin-bar', '@media print { #wpadminbar { display:none; } }' ); } /** * Enqueues inline bump styles to make room for the admin bar. * * @since 6.4.0 */ function wp_enqueue_admin_bar_bump_styles() { if ( current_theme_supports( 'admin-bar' ) ) { $admin_bar_args = get_theme_support( 'admin-bar' ); $header_callback = $admin_bar_args[0]['callback']; } if ( empty( $header_callback ) ) { $header_callback = '_admin_bar_bump_cb'; } if ( '_admin_bar_bump_cb' !== $header_callback ) { return; } // Back-compat for plugins that disable functionality by unhooking this action. if ( ! has_action( 'wp_head', $header_callback ) ) { return; } remove_action( 'wp_head', $header_callback ); $css = ' @media screen { html { margin-top: 32px !important; } } @media screen and ( max-width: 782px ) { html { margin-top: 46px !important; } } '; wp_add_inline_style( 'admin-bar', $css ); } /** * Sets the display status of the admin bar. * * This can be called immediately upon plugin load. It does not need to be called * from a function hooked to the {@see 'init'} action. * * @since 3.1.0 * * @global bool $show_admin_bar * * @param bool $show Whether to allow the admin bar to show. */ function show_admin_bar( $show ) { global $show_admin_bar; $show_admin_bar = (bool) $show; } /** * Determines whether the admin bar should be showing. * * For more information on this and similar theme functions, check out * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ * Conditional Tags} article in the Theme Developer Handbook. * * @since 3.1.0 * * @global bool $show_admin_bar * @global string $pagenow The filename of the current screen. * * @return bool Whether the admin bar should be showing. */ function is_admin_bar_showing() { global $show_admin_bar, $pagenow; // For all these types of requests, we never want an admin bar. if ( defined( 'XMLRPC_REQUEST' ) || defined( 'DOING_AJAX' ) || defined( 'IFRAME_REQUEST' ) || wp_is_json_request() ) { return false; } if ( is_embed() ) { return false; } // Integrated into the admin. if ( is_admin() ) { return true; } if ( ! isset( $show_admin_bar ) ) { if ( ! is_user_logged_in() || 'wp-login.php' === $pagenow ) { $show_admin_bar = false; } else { $show_admin_bar = _get_admin_bar_pref(); } } /** * Filters whether to show the admin bar. * * Returning false to this hook is the recommended way to hide the admin bar. * The user's display preference is used for logged in users. * * @since 3.1.0 * * @param bool $show_admin_bar Whether the admin bar should be shown. Default false. */ $show_admin_bar = apply_filters( 'show_admin_bar', $show_admin_bar ); return $show_admin_bar; } /** * Retrieves the admin bar display preference of a user. * * @since 3.1.0 * @access private * * @param string $context Context of this preference check. Defaults to 'front'. The 'admin' * preference is no longer used. * @param int $user Optional. ID of the user to check, defaults to 0 for current user. * @return bool Whether the admin bar should be showing for this user. */ function _get_admin_bar_pref( $context = 'front', $user = 0 ) { $pref = get_user_option( "show_admin_bar_{$context}", $user ); if ( false === $pref ) { return true; } return 'true' === $pref; }
Fatal error: Uncaught Error: Call to undefined function Elementor\Modules\AdminBar\is_admin_bar_showing() in /home/sportuga/public_html/wp-content/plugins/elementor/modules/admin-bar/module.php:21 Stack trace: #0 /home/sportuga/public_html/wp-content/plugins/elementor/core/modules-manager.php(63): Elementor\Modules\AdminBar\Module::is_active() #1 /home/sportuga/public_html/wp-content/plugins/elementor/includes/plugin.php(730): Elementor\Core\Modules_Manager->__construct() #2 /home/sportuga/public_html/wp-content/plugins/elementor/includes/plugin.php(647): Elementor\Plugin->init_components() #3 /home/sportuga/public_html/wp-includes/class-wp-hook.php(324): Elementor\Plugin->init('') #4 /home/sportuga/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #5 /home/sportuga/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 /home/sportuga/public_html/wp-settings.php(695): do_action('init') #7 /home/sportuga/public_html/wp-config.php(102): require_once('/home/sportuga/...') #8 / in /home/sportuga/public_html/wp-content/plugins/elementor/modules/admin-bar/module.php on line 21