layers_edit_layout_admin_menu

The Layers layers edit layout admin menu function.

Description

layers_edit_layout_admin_menu(); 

Usage

  1. if ( !function_exists( 'layers_edit_layout_admin_menu' ) ) { 
  2. require_once '/core/helpers/post.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = layers_edit_layout_admin_menu(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/core/helpers/post.php  
  1. function layers_edit_layout_admin_menu() { 
  2. global $wp_admin_bar, $post, $wp_version; 
  3.  
  4. if( !is_admin() && version_compare( $wp_version, '4.2', '<=' ) ) { 
  5. $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 
  6. $args = array( 
  7. 'id' => 'layers-edit-layout',  
  8. 'title' => '<span class="ab-icon"></span><span class="ab-label">' . __( 'Edit Layout' , 'layerswp' ) . '</span>',  
  9. 'href' => esc_url( add_query_arg( 'url', urlencode( $current_url ), wp_customize_url() ) ),  
  10. 'meta' => array( 'class' => 'my-toolbar-page' ) 
  11. ); 
  12. $wp_admin_bar->add_node( $args );