query_vars, home_url( $wp->request ) ); $settings_url = P2_Core\Navigation\Urls::get_settings_url(); $customizer_url = add_query_arg( 'return', rawurlencode( $current_url ), P2_Core\Navigation\Urls::get_customizer_url() ); $customizer_header_image_url = add_query_arg( 'autofocus[section]', 'header_image', $customizer_url ); $header_image_height = get_theme_support( 'custom-header', 'height' ) / 2 . 'px'; $site_icon_url = get_site_icon_url(); if ( Shared\default_site_icon_url() === $site_icon_url ) { $site_icon_url = ''; } elseif ( function_exists( '\blavatar_exists' ) && blavatar_exists( blavatar_current_domain() ) ) { $site_icon_url = blavatar_url( blavatar_current_domain(), 'img', 128, false, true ); } $is_self_hosted = apply_filters( 'p2_is_site_self_hosted', true ); ?>

add_item_skeleton( '__p2-sidebar-sidebar-info__header-star-button' ); if ( current_user_can( 'customize' ) && ! has_header_image() ) { $info_menu->add_item( __( 'Upload a header image', 'p2020' ), $customizer_header_image_url, null, [ 'class' => 'icon-upload-image' ] ); } if ( current_user_can( 'customize' ) ) { $info_menu->add_item( __( 'Customize this P2', 'p2020' ), $customizer_url, null, [ 'class' => 'icon-brush' ] ); } if ( current_user_can( 'manage_options' ) ) { $info_menu->add_item( __( 'Site settings', 'p2020' ), $settings_url, null, [ 'class' => 'icon-settings' ] ); } // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo Shared\html_output( $info_menu->generate( '__p2-sidebar-info__header-menu' ) ); ?>