Version Description
- Fixed: for PHP 5.3 #50
- Note: We don't intend to actively support on PHP 5.5 or lower, but if you get some problems, please report it. We will fix it.
Download this release
Release Info
Developer | utahvich |
Plugin | WP Social Bookmarking Light |
Version | 2.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.0 to 2.0.1
- readme.txt +5 -1
- src/WpSocialBookmarkingLight/Option.php +0 -2
- src/WpSocialBookmarkingLight/Plugin.php +11 -9
- src/WpSocialBookmarkingLight/Service.php +4 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +3 -3
- wp-social-bookmarking-light.php +2 -2
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://gumroad.com/l/rWLrL
|
|
4 |
Tags: social, bookmarks, bookmarking, Hatena, Twitter, Facebook, Tumblr, Google Bookmark, Delicious, Digg, reddit, LinkedIn, Instapaper, StumbleUpon, mixi, gree, atode, toread, line, pocket, Pinterest
|
5 |
Requires at least: 4.0.0
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 2.0.
|
8 |
|
9 |
This plugin inserts social share links at the top or bottom of each post.
|
10 |
|
@@ -49,6 +49,10 @@ This is the list of used social sites:
|
|
49 |
|
50 |
== Changelog ==
|
51 |
|
|
|
|
|
|
|
|
|
52 |
= 2.0.0 =
|
53 |
* Breaking Changes: Drop support for PHP 5.5 or lower, Require PHP 5.6 or higher [#46](https://github.com/utahta/WP-Social-Bookmarking-Light/pull/46)
|
54 |
* Breaking Changes: Remove terminated some services
|
4 |
Tags: social, bookmarks, bookmarking, Hatena, Twitter, Facebook, Tumblr, Google Bookmark, Delicious, Digg, reddit, LinkedIn, Instapaper, StumbleUpon, mixi, gree, atode, toread, line, pocket, Pinterest
|
5 |
Requires at least: 4.0.0
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 2.0.1
|
8 |
|
9 |
This plugin inserts social share links at the top or bottom of each post.
|
10 |
|
49 |
|
50 |
== Changelog ==
|
51 |
|
52 |
+
= 2.0.1 =
|
53 |
+
* Fixed: for PHP 5.3 [#50](https://github.com/utahta/WP-Social-Bookmarking-Light/pull/50)
|
54 |
+
* Note: We don't intend to actively support on PHP 5.5 or lower, but if you get some problems, please report it. We will fix it.
|
55 |
+
|
56 |
= 2.0.0 =
|
57 |
* Breaking Changes: Drop support for PHP 5.5 or lower, Require PHP 5.6 or higher [#46](https://github.com/utahta/WP-Social-Bookmarking-Light/pull/46)
|
58 |
* Breaking Changes: Remove terminated some services
|
src/WpSocialBookmarkingLight/Option.php
CHANGED
@@ -106,7 +106,6 @@ class Option implements OptionInterface
|
|
106 |
'button_type' => $data['gree_button_type'],
|
107 |
'button_size' => $data['gree_button_size']
|
108 |
),
|
109 |
-
'evernote' => array('button_type' => $data['evernote_button_type']),
|
110 |
'tumblr' => array('button_type' => $data['tumblr_button_type']),
|
111 |
'atode' => array('button_type' => $data['atode_button_type']),
|
112 |
'google_plus_one' => array(
|
@@ -228,7 +227,6 @@ CSS;
|
|
228 |
'button_type' => '4',
|
229 |
'button_size' => '16'
|
230 |
),
|
231 |
-
'evernote' => array('button_type' => 'article-clipper'),
|
232 |
'tumblr' => array('button_type' => '1'),
|
233 |
'atode' => array('button_type' => 'iconsja'),
|
234 |
'google_plus_one' => array(
|
106 |
'button_type' => $data['gree_button_type'],
|
107 |
'button_size' => $data['gree_button_size']
|
108 |
),
|
|
|
109 |
'tumblr' => array('button_type' => $data['tumblr_button_type']),
|
110 |
'atode' => array('button_type' => $data['atode_button_type']),
|
111 |
'google_plus_one' => array(
|
227 |
'button_type' => '4',
|
228 |
'button_size' => '16'
|
229 |
),
|
|
|
230 |
'tumblr' => array('button_type' => '1'),
|
231 |
'atode' => array('button_type' => 'iconsja'),
|
232 |
'google_plus_one' => array(
|
src/WpSocialBookmarkingLight/Plugin.php
CHANGED
@@ -40,13 +40,14 @@ class Plugin
|
|
40 |
/**
|
41 |
* Initialize wp actions
|
42 |
*/
|
43 |
-
public function init()
|
44 |
{
|
45 |
add_action('init', function() {
|
46 |
-
|
47 |
-
add_action('
|
48 |
-
|
49 |
-
|
|
|
50 |
});
|
51 |
}
|
52 |
|
@@ -100,17 +101,18 @@ class Plugin
|
|
100 |
public function adminMenu()
|
101 |
{
|
102 |
if( function_exists('add_options_page') ){
|
|
|
103 |
$page = add_options_page('WP Social Bookmarking Light',
|
104 |
'WP Social Bookmarking Light',
|
105 |
'manage_options',
|
106 |
__FILE__,
|
107 |
-
function () {
|
108 |
-
echo $
|
109 |
});
|
110 |
add_action('admin_print_styles-' . $page, array($this->admin, 'enqueueStyles'));
|
111 |
add_action('admin_print_scripts-' . $page, array($this->admin, 'enqueueScripts'));
|
112 |
-
add_action('admin_head-' . $page, function () {
|
113 |
-
echo $
|
114 |
});
|
115 |
}
|
116 |
}
|
40 |
/**
|
41 |
* Initialize wp actions
|
42 |
*/
|
43 |
+
public static function init()
|
44 |
{
|
45 |
add_action('init', function() {
|
46 |
+
$plugin = new Plugin();
|
47 |
+
add_action('wp_head', array($plugin, 'head'));
|
48 |
+
add_action('wp_footer', array($plugin, 'footer'));
|
49 |
+
add_filter('the_content', array($plugin, 'theContent'));
|
50 |
+
add_action('admin_menu', array($plugin, 'adminMenu'));
|
51 |
});
|
52 |
}
|
53 |
|
101 |
public function adminMenu()
|
102 |
{
|
103 |
if( function_exists('add_options_page') ){
|
104 |
+
$admin = $this->admin;
|
105 |
$page = add_options_page('WP Social Bookmarking Light',
|
106 |
'WP Social Bookmarking Light',
|
107 |
'manage_options',
|
108 |
__FILE__,
|
109 |
+
function () use($admin) {
|
110 |
+
echo $admin->page();
|
111 |
});
|
112 |
add_action('admin_print_styles-' . $page, array($this->admin, 'enqueueStyles'));
|
113 |
add_action('admin_print_scripts-' . $page, array($this->admin, 'enqueueScripts'));
|
114 |
+
add_action('admin_head-' . $page, function () use($admin) {
|
115 |
+
echo $admin->head();
|
116 |
});
|
117 |
}
|
118 |
}
|
src/WpSocialBookmarkingLight/Service.php
CHANGED
@@ -102,7 +102,10 @@ class Service
|
|
102 |
*/
|
103 |
public function invokeService($service)
|
104 |
{
|
105 |
-
|
|
|
|
|
|
|
106 |
return $this->$method();
|
107 |
}
|
108 |
|
102 |
*/
|
103 |
public function invokeService($service)
|
104 |
{
|
105 |
+
// snake_case to camelCase
|
106 |
+
$method = str_replace('_', "\t", $service);
|
107 |
+
$method = ucwords($method); // for php 5.3
|
108 |
+
$method = str_replace("\t", '', $method);
|
109 |
return $this->$method();
|
110 |
}
|
111 |
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit13f22a2498eb845285f819f3bb77e2f6::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit4fe4c6e52fdaf3237998a04b24e6983b
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit13f22a2498eb845285f819f3bb77e2f6
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit13f22a2498eb845285f819f3bb77e2f6', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit13f22a2498eb845285f819f3bb77e2f6', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit13f22a2498eb845285f819f3bb77e2f6::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $fallbackDirsPsr4 = array (
|
10 |
0 => __DIR__ . '/../..' . '/src',
|
@@ -23,8 +23,8 @@ class ComposerStaticInit4fe4c6e52fdaf3237998a04b24e6983b
|
|
23 |
public static function getInitializer(ClassLoader $loader)
|
24 |
{
|
25 |
return \Closure::bind(function () use ($loader) {
|
26 |
-
$loader->fallbackDirsPsr4 =
|
27 |
-
$loader->prefixesPsr0 =
|
28 |
|
29 |
}, null, ClassLoader::class);
|
30 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit13f22a2498eb845285f819f3bb77e2f6
|
8 |
{
|
9 |
public static $fallbackDirsPsr4 = array (
|
10 |
0 => __DIR__ . '/../..' . '/src',
|
23 |
public static function getInitializer(ClassLoader $loader)
|
24 |
{
|
25 |
return \Closure::bind(function () use ($loader) {
|
26 |
+
$loader->fallbackDirsPsr4 = ComposerStaticInit13f22a2498eb845285f819f3bb77e2f6::$fallbackDirsPsr4;
|
27 |
+
$loader->prefixesPsr0 = ComposerStaticInit13f22a2498eb845285f819f3bb77e2f6::$prefixesPsr0;
|
28 |
|
29 |
}, null, ClassLoader::class);
|
30 |
}
|
wp-social-bookmarking-light.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://github.com/utahta/WP-Social-Bookmarking-Light
|
|
5 |
Description: This plugin inserts social share links at the top or bottom of each post.
|
6 |
Author: utahta
|
7 |
Author URI: https://github.com/utahta/WP-Social-Bookmarking-Light
|
8 |
-
Version: 2.0.
|
9 |
*/
|
10 |
/*
|
11 |
Copyright 2010 utahta (email : labs.ninxit@gmail.com)
|
@@ -41,4 +41,4 @@ load_plugin_textdomain(WP_SOCIAL_BOOKMARKING_LIGHT_DOMAIN, false, "wp-social-boo
|
|
41 |
/**
|
42 |
* initialize
|
43 |
*/
|
44 |
-
|
5 |
Description: This plugin inserts social share links at the top or bottom of each post.
|
6 |
Author: utahta
|
7 |
Author URI: https://github.com/utahta/WP-Social-Bookmarking-Light
|
8 |
+
Version: 2.0.1
|
9 |
*/
|
10 |
/*
|
11 |
Copyright 2010 utahta (email : labs.ninxit@gmail.com)
|
41 |
/**
|
42 |
* initialize
|
43 |
*/
|
44 |
+
\WpSocialBookmarkingLight\Plugin::init();
|