Changeset 1743026
- Timestamp:
- 10/09/2017 01:19:29 AM (8 years ago)
- Location:
- wp-github-sync/trunk
- Files:
-
- 9 edited
-
README.txt (modified) (1 diff)
-
lib/import.php (modified) (1 diff)
-
lib/payload.php (modified) (2 diffs)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/autoload_52.php (modified) (1 diff)
-
vendor/composer/autoload_real.php (modified) (5 diffs)
-
vendor/composer/autoload_real_52.php (modified) (2 diffs)
-
vendor/composer/autoload_static.php (modified) (2 diffs)
-
wp-github-sync.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-github-sync/trunk/README.txt
r1689251 r1743026 4 4 Requires at least: 3.9 5 5 Tested up to: 4.8 6 Stable tag: 2.0. 06 Stable tag: 2.0.1 7 7 License: GPLv2 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
wp-github-sync/trunk/lib/import.php
r1689251 r1743026 188 188 189 189 if ( array_key_exists( 'post_date', $meta ) ) { 190 191 if ( empty( $meta['post_date'] ) ) { 192 $meta['post_date'] = current_time( 'mysql' ); 193 } 194 190 195 $args['post_date'] = $meta['post_date']; 196 191 197 $args['post_date_gmt'] = get_gmt_from_date( $meta['post_date'] ); 192 198 unset( $meta['post_date'] ); -
wp-github-sync/trunk/lib/payload.php
r1689251 r1743026 39 39 public function __construct( WordPress_GitHub_Sync $app, $raw_data ) { 40 40 $this->app = $app; 41 $this->data = json_decode( $raw_data );42 43 if ( $this->data === null) {44 switch ( json_last_error()) {41 $this->data = $this->get_payload_from_raw_response( $raw_data ); 42 43 if ( null === $this->data ) { 44 switch ( json_last_error() ) { 45 45 case JSON_ERROR_DEPTH: 46 46 $this->error = __( 'Maximum stack depth exceeded', 'wp-github-sync' ); … … 63 63 } 64 64 } 65 } 66 67 68 /** 69 * Attempts to get the JSON decoded string. 70 * 71 * @param string $raw_data A raw string from php://input 72 * 73 * @see WordPress_GitHub_Sync_Request::read_raw_data() 74 * 75 * @return Object|null An object from JSON Decode or false if failure. 76 * 77 * @author JayWood <jjwood2004@gmail.com> 78 */ 79 private function get_payload_from_raw_response( $raw_data ) { 80 81 /* 82 * Try this the old way first, despite this not working in some servers. Assuming there's a flag 83 * at the Nginx or Apache level that auto-parses encoded strings. 84 */ 85 $maybe_decoded = json_decode( $raw_data ); 86 if ( null !== $maybe_decoded ) { 87 return $maybe_decoded; 88 } 89 90 /* 91 * GitHub returns a raw string with Action and Payload keys by default, we have to parse that string 92 * using parse_str() and then grab the payload. 93 */ 94 parse_str( $raw_data, $decoded_data ); 95 96 if ( ! isset( $decoded_data['payload'] ) ) { 97 return null; 98 } 99 100 return json_decode( $decoded_data['payload'] ); 65 101 } 66 102 -
wp-github-sync/trunk/vendor/autoload.php
r1689251 r1743026 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 21888fa88cabb87402173e76234a680b::getLoader();7 return ComposerAutoloaderInit02d16639112fe43eb38dfe3cca242916::getLoader(); -
wp-github-sync/trunk/vendor/autoload_52.php
r1689251 r1743026 5 5 require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php'; 6 6 7 return ComposerAutoloaderInit b9257553349bb09ea197423034debad1::getLoader();7 return ComposerAutoloaderInitc97642cae4a5ff6907e6cedeedabc1c1::getLoader(); -
wp-github-sync/trunk/vendor/composer/autoload_real.php
r1689251 r1743026 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 21888fa88cabb87402173e76234a680b5 class ComposerAutoloaderInit02d16639112fe43eb38dfe3cca242916 6 6 { 7 7 private static $loader; … … 20 20 } 21 21 22 spl_autoload_register(array('ComposerAutoloaderInit 21888fa88cabb87402173e76234a680b', 'loadClassLoader'), true, true);22 spl_autoload_register(array('ComposerAutoloaderInit02d16639112fe43eb38dfe3cca242916', 'loadClassLoader'), true, true); 23 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 24 spl_autoload_unregister(array('ComposerAutoloaderInit 21888fa88cabb87402173e76234a680b', 'loadClassLoader'));24 spl_autoload_unregister(array('ComposerAutoloaderInit02d16639112fe43eb38dfe3cca242916', 'loadClassLoader')); 25 25 26 26 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 28 28 require_once __DIR__ . '/autoload_static.php'; 29 29 30 call_user_func(\Composer\Autoload\ComposerStaticInit 21888fa88cabb87402173e76234a680b::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit02d16639112fe43eb38dfe3cca242916::getInitializer($loader)); 31 31 } else { 32 32 $map = require __DIR__ . '/autoload_namespaces.php'; … … 49 49 50 50 if ($useStaticLoader) { 51 $includeFiles = Composer\Autoload\ComposerStaticInit 21888fa88cabb87402173e76234a680b::$files;51 $includeFiles = Composer\Autoload\ComposerStaticInit02d16639112fe43eb38dfe3cca242916::$files; 52 52 } else { 53 53 $includeFiles = require __DIR__ . '/autoload_files.php'; 54 54 } 55 55 foreach ($includeFiles as $fileIdentifier => $file) { 56 composerRequire 21888fa88cabb87402173e76234a680b($fileIdentifier, $file);56 composerRequire02d16639112fe43eb38dfe3cca242916($fileIdentifier, $file); 57 57 } 58 58 … … 61 61 } 62 62 63 function composerRequire 21888fa88cabb87402173e76234a680b($fileIdentifier, $file)63 function composerRequire02d16639112fe43eb38dfe3cca242916($fileIdentifier, $file) 64 64 { 65 65 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
wp-github-sync/trunk/vendor/composer/autoload_real_52.php
r1689251 r1743026 3 3 // autoload_real_52.php generated by xrstf/composer-php52 4 4 5 class ComposerAutoloaderInit b9257553349bb09ea197423034debad1 {5 class ComposerAutoloaderInitc97642cae4a5ff6907e6cedeedabc1c1 { 6 6 private static $loader; 7 7 … … 20 20 } 21 21 22 spl_autoload_register(array('ComposerAutoloaderInit b9257553349bb09ea197423034debad1', 'loadClassLoader'), true /*, true */);22 spl_autoload_register(array('ComposerAutoloaderInitc97642cae4a5ff6907e6cedeedabc1c1', 'loadClassLoader'), true /*, true */); 23 23 self::$loader = $loader = new xrstf_Composer52_ClassLoader(); 24 spl_autoload_unregister(array('ComposerAutoloaderInit b9257553349bb09ea197423034debad1', 'loadClassLoader'));24 spl_autoload_unregister(array('ComposerAutoloaderInitc97642cae4a5ff6907e6cedeedabc1c1', 'loadClassLoader')); 25 25 26 26 $vendorDir = dirname(dirname(__FILE__)); -
wp-github-sync/trunk/vendor/composer/autoload_static.php
r1689251 r1743026 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 21888fa88cabb87402173e76234a680b7 class ComposerStaticInit02d16639112fe43eb38dfe3cca242916 8 8 { 9 9 public static $files = array ( … … 49 49 { 50 50 return \Closure::bind(function () use ($loader) { 51 $loader->prefixesPsr0 = ComposerStaticInit 21888fa88cabb87402173e76234a680b::$prefixesPsr0;52 $loader->classMap = ComposerStaticInit 21888fa88cabb87402173e76234a680b::$classMap;51 $loader->prefixesPsr0 = ComposerStaticInit02d16639112fe43eb38dfe3cca242916::$prefixesPsr0; 52 $loader->classMap = ComposerStaticInit02d16639112fe43eb38dfe3cca242916::$classMap; 53 53 54 54 }, null, ClassLoader::class); -
wp-github-sync/trunk/wp-github-sync.php
r1689251 r1743026 4 4 * Plugin URI: https://github.com/mAAdhaTTah/wordpress-github-sync 5 5 * Description: A WordPress plugin to sync content with a GitHub repository (or Jekyll site). 6 * Version: 2.0. 06 * Version: 2.0.1 7 7 * Author: James DiGioia, Ben Balter 8 8 * Author URI: http://jamesdigioia.com … … 67 67 * @var string 68 68 */ 69 public static $version = '2.0. 0';69 public static $version = '2.0.1'; 70 70 71 71 /**
Note: See TracChangeset
for help on using the changeset viewer.