vk-all-in-one-expansion-unit
Last commit date
_scss
8 years ago
css
8 years ago
images
9 years ago
js
9 years ago
languages
8 years ago
libraries
8 years ago
plugins
8 years ago
plugins_admin
8 years ago
README.md
10 years ago
admin_wrapper.php
9 years ago
common_helpers.php
8 years ago
common_init.php
8 years ago
compile.bat
10 years ago
config.rb
9 years ago
gulpfile.js
8 years ago
initialize.php
8 years ago
package.json
8 years ago
package_manager.php
8 years ago
packages.php
9 years ago
readme.txt
8 years ago
screenshot-1.png
10 years ago
screenshot-2.png
10 years ago
uninstaller.php
9 years ago
vkExUnit.php
8 years ago
vkExUnit_admin.php
9 years ago
vkExUnit.php
98 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Plugin Name: VK All in One Expansion Unit |
| 4 | * Plugin URI: http://ex-unit.vektor-inc.co.jp |
| 5 | * Description: This plug-in is an integrated plug-in with a variety of features that make it powerful your web site. Many features can be stopped individually. Example Facebook Page Plugin,Social Bookmarks,Print OG Tags,Print Twitter Card Tags,Print Google Analytics tag,New post widget,Insert Related Posts and more! |
| 6 | * Version: 5.4.6 |
| 7 | * Author: Vektor,Inc. |
| 8 | * Text Domain: vkExUnit |
| 9 | * Domain Path: /languages |
| 10 | * Author URI: http://vektor-inc.co.jp |
| 11 | * License: GPL2 |
| 12 | */ |
| 13 | /* |
| 14 | Copyright 2015-2017 Vektor,Inc. ( email : kurudrive@gmail.com ) |
| 15 | |
| 16 | This program is free software; you can redistribute it and/or modify |
| 17 | it under the terms of the GNU General Public License, version 2, as |
| 18 | published by the Free Software Foundation. |
| 19 | |
| 20 | This program is distributed in the hope that it will be useful, |
| 21 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 23 | GNU General Public License for more details. |
| 24 | |
| 25 | You should have received a copy of the GNU General Public License |
| 26 | along with this program; if not, write to the Free Software |
| 27 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 28 | */ |
| 29 | |
| 30 | |
| 31 | |
| 32 | // Get Plugin version |
| 33 | $data = get_file_data( __FILE__, array( 'version' => 'Version' ) ); |
| 34 | global $vkExUnit_version; |
| 35 | $vkExUnit_version = $data['version']; |
| 36 | |
| 37 | //include('plugins/css_customize/css-customize.php'); |
| 38 | load_plugin_textdomain( 'vkExUnit', false, basename( dirname( __FILE__ ) ) . '/languages' ); |
| 39 | |
| 40 | |
| 41 | function vkExUnit_get_directory( $path = '' ) { |
| 42 | return $dirctory = dirname( __FILE__ ) . $path; |
| 43 | } |
| 44 | |
| 45 | function vkExUnit_get_directory_uri( $path = '' ) { |
| 46 | return plugins_url( $path , __FILE__ ); |
| 47 | } |
| 48 | |
| 49 | |
| 50 | if ( function_exists( 'register_deactivation_hook' ) ) { |
| 51 | register_deactivation_hook( __FILE__, 'vkExUnit_uninstall_function' ); |
| 52 | } |
| 53 | |
| 54 | function vkExUnit_uninstall_function() { |
| 55 | |
| 56 | include vkExUnit_get_directory( '/uninstaller.php' ); |
| 57 | } |
| 58 | |
| 59 | |
| 60 | /// PHP Version check |
| 61 | if ( version_compare( phpversion(), '5.4.45') >= 0) { |
| 62 | require_once vkExUnit_get_directory() . '/initialize.php'; |
| 63 | if ( version_compare(phpversion(), '5.6') < 0 && is_admin()) |
| 64 | add_filter( 'admin_notices', 'vkExUnit_phpversion_warning_notice'); |
| 65 | }else{ |
| 66 | add_filter( 'admin_notices', 'vkExUnit_phpversion_error'); |
| 67 | } |
| 68 | |
| 69 | function vkExUnit_phpversion_error($val){ |
| 70 | if (!current_user_can('activate_plugins')) return $val; |
| 71 | ?> |
| 72 | <div class="notice notice-error error is-dismissible"><p> |
| 73 | <?php |
| 74 | /* |
| 75 | 本来システム名は vkExUnit_get_little_short_name() で引っ張るが、PHPのバージョンが低くて vkExUnit_get_little_short_name() 関数が読み込まれていないので"VK ExUnit"直書き |
| 76 | */ |
| 77 | printf( __("The current PHP version(%s) is too old, so VK ExUnit will not work.", 'vkExUnit'), phpversion() |
| 78 | ); ?> |
| 79 | <?php _e("VK ExUnit supports PHP5.6 or later.", 'vkExUnit'); ?> |
| 80 | </p></div> |
| 81 | <?php |
| 82 | return $val; |
| 83 | } |
| 84 | |
| 85 | function vkExUnit_phpversion_warning_notice($val){ |
| 86 | if (!current_user_can('activate_plugins')) return $val; |
| 87 | global $hook_suffix; |
| 88 | if (strpos($hook_suffix, 'vkExUnit') == false) return; |
| 89 | ?> |
| 90 | <div class="notice notice-warning is-dismissible"><p> |
| 91 | <?php printf(__("Current PHP Version(%s) is old.", 'vkExUnit'), phpversion() ); ?> |
| 92 | <?php printf(__("%s supports PHP5.6 or later.", 'vkExUnit'), vkExUnit_get_little_short_name() ); ?> |
| 93 | </p></div> |
| 94 | <?php |
| 95 | return $val; |
| 96 | } |
| 97 | |
| 98 |