| @@ -6,25 +6,24 @@ | ||
| 6 | 6 | Author: Takayuki Miyoshi |
| 7 | 7 | Author URI: http://ideasilo.wordpress.com/ |
| 8 | 8 | Text Domain: bogo |
| 9 | 9 | Domain Path: /languages/ |
| 10 | -Version: 2.7 | |
| 10 | +Version: 2.4 | |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | -define( 'BOGO_VERSION', '2.7' ); | |
| 13 | +define( 'BOGO_VERSION', '2.4' ); | |
| 14 | 14 | |
| 15 | -define( 'BOGO_PLUGIN', __FILE__ ); | |
| 15 | +define( 'BOGO_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); | |
| 16 | 16 | |
| 17 | -define( 'BOGO_PLUGIN_BASENAME', plugin_basename( BOGO_PLUGIN ) ); | |
| 17 | +define( 'BOGO_PLUGIN_NAME', trim( dirname( BOGO_PLUGIN_BASENAME ), '/' ) ); | |
| 18 | 18 | |
| 19 | -define( 'BOGO_PLUGIN_NAME', trim( dirname( BOGO_PLUGIN_BASENAME ), '/' ) ); | |
| 19 | +define( 'BOGO_PLUGIN_DIR', untrailingslashit( dirname( __FILE__ ) ) ); | |
| 20 | 20 | |
| 21 | -define( 'BOGO_PLUGIN_DIR', untrailingslashit( dirname( BOGO_PLUGIN ) ) ); | |
| 21 | +define( 'BOGO_PLUGIN_URL', untrailingslashit( plugins_url( '', __FILE__ ) ) ); | |
| 22 | 22 | |
| 23 | 23 | require_once BOGO_PLUGIN_DIR . '/includes/functions.php'; |
| 24 | 24 | require_once BOGO_PLUGIN_DIR . '/includes/rewrite.php'; |
| 25 | 25 | require_once BOGO_PLUGIN_DIR . '/includes/link-template.php'; |
| 26 | -require_once BOGO_PLUGIN_DIR . '/includes/language-switcher.php'; | |
| 27 | 26 | require_once BOGO_PLUGIN_DIR . '/includes/nav-menu.php'; |
| 28 | 27 | require_once BOGO_PLUGIN_DIR . '/includes/widgets.php'; |
| 29 | 28 | require_once BOGO_PLUGIN_DIR . '/includes/post.php'; |
| 30 | 29 | require_once BOGO_PLUGIN_DIR . '/includes/user.php'; |
| @@ -110,8 +109,10 @@ | ||
| 110 | 109 | |
| 111 | 110 | return $query_vars; |
| 112 | 111 | } |
| 113 | 112 | |
| 113 | +add_shortcode( 'bogo', 'bogo_language_switcher' ); | |
| 114 | + | |
| 114 | 115 | add_action( 'wp_enqueue_scripts', 'bogo_enqueue_scripts' ); |
| 115 | 116 | |
| 116 | 117 | function bogo_enqueue_scripts() { |
| 117 | 118 | wp_enqueue_style( 'bogo', |
| @@ -124,9 +125,5 @@ | ||
| 124 | 125 | array(), BOGO_VERSION, 'all' ); |
| 125 | 126 | } |
| 126 | 127 | } |
| 127 | 128 | |
| 128 | -add_action( 'deactivate_' . BOGO_PLUGIN_BASENAME, 'bogo_deactivate' ); | |
| 129 | - | |
| 130 | -function bogo_deactivate() { | |
| 131 | - bogo_delete_prop( 'lang_rewrite_regex' ); | |
| 132 | -} | |
| 129 | +?> | |