equal
deleted
inserted
replaced
203 $wp_admin_bar->add_node( |
203 $wp_admin_bar->add_node( |
204 array( |
204 array( |
205 'parent' => 'wp-logo-external', |
205 'parent' => 'wp-logo-external', |
206 'id' => 'learn', |
206 'id' => 'learn', |
207 'title' => __( 'Learn WordPress' ), |
207 'title' => __( 'Learn WordPress' ), |
208 'href' => 'https://learn.wordpress.org/', |
208 'href' => __( 'https://learn.wordpress.org/' ), |
209 ) |
209 ) |
210 ); |
210 ); |
211 |
211 |
212 // Add forums link. |
212 // Add forums link. |
213 $wp_admin_bar->add_node( |
213 $wp_admin_bar->add_node( |
451 } |
451 } |
452 } |
452 } |
453 } |
453 } |
454 |
454 |
455 /** |
455 /** |
456 * Adds the "Edit site" link to the Toolbar. |
456 * Adds the "Edit Site" link to the Toolbar. |
457 * |
457 * |
458 * @since 5.9.0 |
458 * @since 5.9.0 |
459 * @since 6.3.0 Added `$_wp_current_template_id` global for editing of current template directly from the admin bar. |
459 * @since 6.3.0 Added `$_wp_current_template_id` global for editing of current template directly from the admin bar. |
460 * @since 6.6.0 Added the `canvas` query arg to the Site Editor link. |
460 * @since 6.6.0 Added the `canvas` query arg to the Site Editor link. |
461 * |
461 * |
477 } |
477 } |
478 |
478 |
479 $wp_admin_bar->add_node( |
479 $wp_admin_bar->add_node( |
480 array( |
480 array( |
481 'id' => 'site-editor', |
481 'id' => 'site-editor', |
482 'title' => __( 'Edit site' ), |
482 'title' => __( 'Edit Site' ), |
483 'href' => add_query_arg( |
483 'href' => add_query_arg( |
484 array( |
484 array( |
485 'postType' => 'wp_template', |
485 'postType' => 'wp_template', |
486 'postId' => $_wp_current_template_id, |
486 'postId' => $_wp_current_template_id, |
487 'canvas' => 'edit', |
487 'canvas' => 'edit', |