Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wp plugin handles

// in functions.php
function wpb_display_pluginhandles() { 
$wp_scripts = wp_scripts(); 
$handlename .= "<ul>"; 
    foreach( $wp_scripts->queue as $handle ) :
      $handlename .=  '<li>' . $handle .'</li>';
    endforeach;
$handlename .= "</ul>";
return $handlename; 
}
add_shortcode( 'pluginhandles', 'wpb_display_pluginhandles');

// Now you can use the shortcode [pluginhandles] in a page to list 
the plugin handles and witch some of them off
Source by www.wpbeginner.com #
 
PREVIOUS NEXT
Tagged: #wp #plugin #handles
ADD COMMENT
Topic
Name
2+6 =