wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_admin_bar_edit_site_menu › WordPress Function
Seit5.9.0
Veraltetn/v
› wp_admin_bar_edit_site_menu ( $wp_admin_bar )
Parameter: |
|
Definiert in: |
|
Codex: | |
Changelog: |
|
Adds the "Edit Site" link to the Toolbar.
Quellcode
function wp_admin_bar_edit_site_menu( $wp_admin_bar ) { // Don't show if a block theme is not activated. if ( ! wp_is_block_theme() ) { return; } // Don't show for users who can't edit theme options. if ( ! current_user_can( 'edit_theme_options' ) ) { return; } $wp_admin_bar->add_node( array( 'id' => 'site-editor', 'title' => __( 'Edit Site' ), 'href' => admin_url( 'site-editor.php' ), ) ); }