Last active
October 8, 2015 03:28
-
-
Save jkovis/7342b9474471df5db3cc to your computer and use it in GitHub Desktop.
p3-profiler plugins_url() issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // file path is PLUGIN_PATH/classes/class.p3-profiler-plugin-admin.php | |
public static function load_scripts() { | |
wp_enqueue_script( 'jquery' ); | |
wp_enqueue_script( 'jquery-ui-dialog' ); | |
wp_enqueue_script( 'jquery-ui-tabs' ); | |
wp_enqueue_script( 'jquery-ui-progressbar' ); | |
wp_enqueue_script( 'flot', plugins_url( '/js/jquery.flot.min.js', dirname( __FILE__ ) ), array( 'jquery-ui-core' ) ); | |
wp_enqueue_script( 'flot.pie', plugins_url( '/js/jquery.flot.pie.min.js', dirname( __FILE__ ) ), array( 'flot' ) ); | |
wp_enqueue_script( 'flot.navigate', plugins_url( '/js/jquery.flot.navigate.js', dirname( __FILE__ ) ), array( 'flot' ) ); | |
wp_enqueue_script( 'p3_corners', plugins_url( '/js/jquery.corner.js', dirname( __FILE__ ) ), array( 'jquery-ui-core' ) ); | |
wp_enqueue_script( 'p3_qtip', plugins_url( '/js/jquery.qtip.min.js', dirname( __FILE__ ) ), array( 'jquery-ui-core' ) ); | |
} | |
/** | |
* Load styles | |
*/ | |
public static function load_styles() { | |
if ( 'classic' == get_user_option( 'admin_color' ) ) { | |
wp_enqueue_style ( 'jquery-ui-css', plugins_url( '/css/jquery-ui-classic.css', dirname( __FILE__ ) ), array(), P3_VERSION ); | |
} else { | |
wp_enqueue_style ( 'jquery-ui-css', plugins_url( '/css/jquery-ui-fresh.css', dirname( __FILE__ ) ), array(), P3_VERSION ); | |
} | |
wp_enqueue_style( 'p3_qtip_css', plugins_url( '/css/jquery.qtip.min.css', dirname( __FILE__ ) ), array(), P3_VERSION ); | |
wp_enqueue_style( 'p3_css', plugins_url( '/css/p3.css', dirname( __FILE__ ) ), array(), P3_VERSION ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // file path is PLUGIN_PATH/templates/template.php ?> | |
<img src="<?php echo plugins_url( '/css/logo.png', dirname( __FILE__ ) ); ?>" alt="<?php esc_attr_e( 'Logo', 'p3-profiler' ); ?>" title="<?php esc_attr_e( 'Logo', 'p3-profiler' ); ?>" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // file path is PLUGIN_PATH/templates/view-scan.php ?> | |
<img src="<?php echo plugins_url( '/css/icon_mail.gif', dirname( __FILE__ ) ); ?>" height="22" width="22" align="center" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment