mirror of
https://github.com/kremalicious/Badged.git
synced 2024-11-22 09:56:50 +01:00
smarter stuff for local symlinked development
This commit is contained in:
parent
51ac00b1d0
commit
35a6106257
18
badged.php
18
badged.php
@ -51,8 +51,16 @@ else if (isset($network_plugin)) {
|
|||||||
$badged_plugin_file = $network_plugin;
|
$badged_plugin_file = $network_plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
define('BADGED_PLUGIN_FILE', $badged_plugin_file);
|
// Define constants
|
||||||
//define('BADGED_PLUGIN_PATH', WP_PLUGIN_DIR.'/'.basename(dirname($badged_plugin_file)));
|
if ( ! defined( 'BADGED_URL' ) ){
|
||||||
|
define('BADGED_URL', plugin_dir_url($badged_plugin_file));
|
||||||
|
}
|
||||||
|
if ( ! defined( 'BADGED_PATH' ) ){
|
||||||
|
define('BADGED_PATH', WP_PLUGIN_DIR.'/'.basename(dirname($badged_plugin_file)).'/');
|
||||||
|
}
|
||||||
|
if ( ! defined( 'BADGED_BASENAME' ) ){
|
||||||
|
define('BADGED_BASENAME', plugin_basename( $badged_plugin_file ));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Let's roll
|
* Let's roll
|
||||||
@ -61,9 +69,9 @@ define('BADGED_PLUGIN_FILE', $badged_plugin_file);
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once( plugin_dir_path( BADGED_PLUGIN_FILE ) . 'class-badged.php' );
|
require_once( BADGED_PATH . 'class-badged.php' );
|
||||||
|
|
||||||
register_activation_hook( BADGED_PLUGIN_FILE, array( 'Badged', 'activate' ) );
|
register_activation_hook( $badged_plugin_file, array( 'Badged', 'activate' ) );
|
||||||
register_deactivation_hook( BADGED_PLUGIN_FILE, array( 'Badged', 'deactivate' ) );
|
register_deactivation_hook( $badged_plugin_file, array( 'Badged', 'deactivate' ) );
|
||||||
|
|
||||||
Badged::get_instance();
|
Badged::get_instance();
|
@ -127,7 +127,7 @@ class Badged {
|
|||||||
$locale = apply_filters( 'bdgd', get_locale(), $domain );
|
$locale = apply_filters( 'bdgd', get_locale(), $domain );
|
||||||
|
|
||||||
load_textdomain( $domain, WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . $locale . '.mo' );
|
load_textdomain( $domain, WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . $locale . '.mo' );
|
||||||
load_plugin_textdomain( $domain, FALSE, dirname( plugin_basename( BADGED_PLUGIN_FILE ) ) . '/lang/' );
|
load_plugin_textdomain( $domain, FALSE, dirname( BADGED_BASENAME ) . '/lang/' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -144,10 +144,10 @@ class Badged {
|
|||||||
|
|
||||||
$screen = get_current_screen();
|
$screen = get_current_screen();
|
||||||
if ( $screen->id == $this->plugin_screen_hook_suffix ) {
|
if ( $screen->id == $this->plugin_screen_hook_suffix ) {
|
||||||
wp_enqueue_style( $this->plugin_slug .'-admin-styles', plugins_url( 'css/options.css', BADGED_PLUGIN_FILE ), array(), $this->version );
|
wp_enqueue_style( $this->plugin_slug .'-admin-styles', plugins_url( 'css/options.css', BADGED_BASENAME ), array(), $this->version );
|
||||||
}
|
}
|
||||||
|
|
||||||
wp_enqueue_style( $this->plugin_slug . '-plugin-styles', plugins_url( 'css/badged.css', BADGED_PLUGIN_FILE ), array(), $this->version );
|
wp_enqueue_style( $this->plugin_slug . '-plugin-styles', plugins_url( 'css/badged.css', BADGED_BASENAME ), array(), $this->version );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user