Changeset 984612
- Timestamp:
- 09/08/2014 06:39:28 PM (12 years ago)
- File:
-
- 1 edited
-
freefolio/trunk/freefolio.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
freefolio/trunk/freefolio.php
r984597 r984612 30 30 } 31 31 32 /** 33 * Set up plugin constants 34 */ 32 35 define( 'DPI__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 33 36 define( 'DPI__PLUGIN_FILE', __FILE__ ); 34 37 35 require_once( DPI__PLUGIN_DIR . 'class.DP_Importer.php' ); 38 /** 39 * Add localization to the FreeFolio plugin. 40 */ 41 function freefolio_localize(){ 36 42 37 register_activation_hook( DPI__PLUGIN_FILE, array( 'DP_Importer', 'on_plugin_activation' ) ); 38 register_deactivation_hook( DPI__PLUGIN_FILE, array( 'DP_Importer', 'on_plugin_deactivation' ) ); 43 load_plugin_textdomain( 'freefolio', false, basename( dirname( __FILE__ ) ) . '/languages' ); 44 45 } 46 add_action( 'plugins_loaded', 'freefolio_localize' ); 47 48 /** 49 * Dribbble Importer setup 50 */ 51 if( is_admin() ){ 52 53 require_once( DPI__PLUGIN_DIR . 'class.DP_Importer.php' ); 54 55 register_activation_hook( DPI__PLUGIN_FILE, array( 'DP_Importer', 'on_plugin_activation' ) ); 56 register_deactivation_hook( DPI__PLUGIN_FILE, array( 'DP_Importer', 'on_plugin_deactivation' ) ); 57 58 } 39 59 40 60 add_action( 'init', array( 'DP_Importer', 'init' ) );
Note: See TracChangeset
for help on using the changeset viewer.