Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to get plugin directory path in wordpress

if ( is_admin() ) {
    include_once( plugin_dir_path( __FILE__ ) . 'includes/admin-functions.php' );
} else {
    include_once( plugin_dir_path( __FILE__ ) . 'includes/front-end-functions.php' );
}
Source by developer.wordpress.org #
 
PREVIOUS NEXT
Tagged: #plugin #directory #path #wordpress
ADD COMMENT
Topic
Name
4+9 =