Changeset 2952798
- Timestamp:
- 08/13/2023 01:27:09 AM (3 years ago)
- Location:
- importer-for-crocoblock-jetengine/tags/1.2.1
- Files:
-
- 16 edited
- 1 copied
-
. (copied) (copied from importer-for-crocoblock-jetengine/trunk)
-
importer-for-crocoblock-jetengine.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
src/FieldFactory/Fields/Checkbox.php (modified) (2 diffs)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/composer/ClassLoader.php (modified) (4 diffs)
-
vendor/composer/InstalledVersions.php (modified) (8 diffs)
-
vendor/composer/LICENSE (modified) (2 diffs)
-
vendor/composer/autoload_classmap.php (modified) (1 diff)
-
vendor/composer/autoload_files.php (modified) (1 diff)
-
vendor/composer/autoload_namespaces.php (modified) (1 diff)
-
vendor/composer/autoload_psr4.php (modified) (1 diff)
-
vendor/composer/autoload_real.php (modified) (2 diffs)
-
vendor/composer/installed.json (modified) (2 diffs)
-
vendor/composer/installed.php (modified) (4 diffs)
-
vendor/soflyy/wp-all-import-rapid-addon/composer.json (modified) (1 diff)
-
vendor/soflyy/wp-all-import-rapid-addon/rapid-addon.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
importer-for-crocoblock-jetengine/tags/1.2.1/importer-for-crocoblock-jetengine.php
r2887267 r2952798 3 3 Plugin Name: Coding Chicken - JetEngine Importer 4 4 Description: A handy importer for JetEngine Meta Box fields - Requires WP All Import and JetEngine 5 Version: 1.2 5 Version: 1.2.1 6 6 Author: Coding Chicken 7 7 Author URI: https://codingchicken.com … … 28 28 const IMPORTER_JETENGINE_PREFIX = 'cc_jetengine_importer_'; 29 29 30 const IMPORTER_JETENGINE_VERSION = '1.2 ';30 const IMPORTER_JETENGINE_VERSION = '1.2.1'; 31 31 32 32 // Require Composer autoloader. -
importer-for-crocoblock-jetengine/tags/1.2.1/readme.txt
r2890884 r2952798 4 4 Tags: import, jetengine, crocoblock, meta box, xml, csv, metabox, wp all import 5 5 Requires at least: 5.0 6 Tested up to: 6. 17 Stable tag: 1.2 6 Tested up to: 6.3 7 Stable tag: 1.2.1 8 8 Requires PHP: 7.2.5 9 9 License: GPLv2 or later … … 67 67 68 68 == Changelog == 69 70 = 1.2.1 = 71 * bug fix: correct importing to checkboxes with the 'Save as array' option enabled 72 69 73 = 1.2 = 70 74 * bug fix: resolve issue where some JetEngine objects may not appear in the import configuration -
importer-for-crocoblock-jetengine/tags/1.2.1/src/FieldFactory/Fields/Checkbox.php
r2824714 r2952798 41 41 42 42 // Set any needed field options. 43 $field_options = ''; 43 if( isset($this->data['is_array']) && $this->data['is_array']){ 44 $field_options = 'array-1'; 45 }else { 46 $field_options = 'array-0'; 47 } 44 48 45 49 $options = $this->get_options(); … … 60 64 private function prepareValue($fieldData){ 61 65 62 $values = explode(',', $fieldData['value']); 66 $values = explode( ',', $fieldData['value'] ); 67 $values = array_map('trim', $values); 63 68 $formattedValue = []; 64 69 65 // Every option needs a true/false indicator to show if it's checked. 66 foreach($this->get_options() as $key => $option){ 67 if( in_array($key, $values )){ 68 $formattedValue[$key] = 'true'; // Expects a text value. 69 }else{ 70 $formattedValue[$key] = 'false'; // Expects a text value. 70 if( isset($fieldData['field_options']['array']) && $fieldData['field_options']['array'] ){ 71 72 // When the option to store as an array is set we don't need to do anything more. 73 $formattedValue = $values; 74 75 }else { 76 77 // Every option needs a true/false indicator to show if it's checked if not set to save as simple array. 78 foreach ( $this->get_options() as $key => $option ) { 79 if ( in_array( $key, $values ) ) { 80 $formattedValue[ $key ] = 'true'; // Expects a text value. 81 } else { 82 $formattedValue[ $key ] = 'false'; // Expects a text value. 83 } 71 84 } 85 72 86 } 73 87 -
importer-for-crocoblock-jetengine/tags/1.2.1/vendor/autoload.php
r2824714 r2952798 3 3 // autoload.php @generated by Composer 4 4 5 if (PHP_VERSION_ID < 50600) { 6 if (!headers_sent()) { 7 header('HTTP/1.1 500 Internal Server Error'); 8 } 9 $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; 10 if (!ini_get('display_errors')) { 11 if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 12 fwrite(STDERR, $err); 13 } elseif (!headers_sent()) { 14 echo $err; 15 } 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 21 } 22 5 23 require_once __DIR__ . '/composer/autoload_real.php'; 6 24 -
importer-for-crocoblock-jetengine/tags/1.2.1/vendor/composer/ClassLoader.php
r2824714 r2952798 43 43 class ClassLoader 44 44 { 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 45 48 /** @var ?string */ 46 49 private $vendorDir; … … 107 110 { 108 111 $this->vendorDir = $vendorDir; 112 self::initializeIncludeClosure(); 109 113 } 110 114 … … 426 430 { 427 431 if ($file = $this->findFile($class)) { 428 includeFile($file); 432 $includeFile = self::$includeFile; 433 $includeFile($file); 429 434 430 435 return true; … … 556 561 return false; 557 562 } 563 564 /** 565 * @return void 566 */ 567 private static function initializeIncludeClosure() 568 { 569 if (self::$includeFile !== null) { 570 return; 571 } 572 573 /** 574 * Scope isolated include. 575 * 576 * Prevents access to $this/self from included files. 577 * 578 * @param string $file 579 * @return void 580 */ 581 self::$includeFile = \Closure::bind(static function($file) { 582 include $file; 583 }, null, null); 584 } 558 585 } 559 560 /**561 * Scope isolated include.562 *563 * Prevents access to $this/self from included files.564 *565 * @param string $file566 * @return void567 * @private568 */569 function includeFile($file)570 {571 include $file;572 } -
importer-for-crocoblock-jetengine/tags/1.2.1/vendor/composer/InstalledVersions.php
r2824714 r2952798 22 22 * 23 23 * To require its presence, you can require `composer-runtime-api ^2.0` 24 * 25 * @final 24 26 */ 25 27 class InstalledVersions … … 27 29 /** 28 30 * @var mixed[]|null 29 * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null31 * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null 30 32 */ 31 33 private static $installed; … … 38 40 /** 39 41 * @var array[] 40 * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>42 * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 41 43 */ 42 44 private static $installedByVendor = array(); … … 242 244 /** 243 245 * @return array 244 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}246 * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} 245 247 */ 246 248 public static function getRootPackage() … … 256 258 * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. 257 259 * @return array[] 258 * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}260 * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} 259 261 */ 260 262 public static function getRawData() … … 279 281 * 280 282 * @return array[] 281 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>283 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 282 284 */ 283 285 public static function getAllRawData() … … 302 304 * @return void 303 305 * 304 * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data306 * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data 305 307 */ 306 308 public static function reload($data) … … 312 314 /** 313 315 * @return array[] 314 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>316 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 315 317 */ 316 318 private static function getInstalled() -
importer-for-crocoblock-jetengine/tags/1.2.1/vendor/composer/LICENSE
r2824714 r2952798 1 1 2 Copyright (c) Nils Adermann, Jordi Boggiano 2 3 … … 18 19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 20 THE SOFTWARE. 21 -
importer-for-crocoblock-jetengine/tags/1.2.1/vendor/composer/autoload_classmap.php
r2824714 r2952798 3 3 // autoload_classmap.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
importer-for-crocoblock-jetengine/tags/1.2.1/vendor/composer/autoload_files.php
r2824714 r2952798 3 3 // autoload_files.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
importer-for-crocoblock-jetengine/tags/1.2.1/vendor/composer/autoload_namespaces.php
r2824714 r2952798 3 3 // autoload_namespaces.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
importer-for-crocoblock-jetengine/tags/1.2.1/vendor/composer/autoload_psr4.php
r2824714 r2952798 3 3 // autoload_psr4.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
importer-for-crocoblock-jetengine/tags/1.2.1/vendor/composer/autoload_real.php
r2824714 r2952798 24 24 25 25 spl_autoload_register(array('ComposerAutoloaderInit359f82cc13b2aa7b86b36aa4d120b17b', 'loadClassLoader'), true, true); 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname( \dirname(__FILE__)));26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 27 spl_autoload_unregister(array('ComposerAutoloaderInit359f82cc13b2aa7b86b36aa4d120b17b', 'loadClassLoader')); 28 28 29 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 30 if ($useStaticLoader) { 31 require __DIR__ . '/autoload_static.php'; 32 33 call_user_func(\Composer\Autoload\ComposerStaticInit359f82cc13b2aa7b86b36aa4d120b17b::getInitializer($loader)); 34 } else { 35 $map = require __DIR__ . '/autoload_namespaces.php'; 36 foreach ($map as $namespace => $path) { 37 $loader->set($namespace, $path); 38 } 39 40 $map = require __DIR__ . '/autoload_psr4.php'; 41 foreach ($map as $namespace => $path) { 42 $loader->setPsr4($namespace, $path); 43 } 44 45 $classMap = require __DIR__ . '/autoload_classmap.php'; 46 if ($classMap) { 47 $loader->addClassMap($classMap); 48 } 49 } 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit359f82cc13b2aa7b86b36aa4d120b17b::getInitializer($loader)); 50 31 51 32 $loader->register(true); 52 33 53 if ($useStaticLoader) { 54 $includeFiles = Composer\Autoload\ComposerStaticInit359f82cc13b2aa7b86b36aa4d120b17b::$files; 55 } else { 56 $includeFiles = require __DIR__ . '/autoload_files.php'; 57 } 58 foreach ($includeFiles as $fileIdentifier => $file) { 59 composerRequire359f82cc13b2aa7b86b36aa4d120b17b($fileIdentifier, $file); 34 $filesToLoad = \Composer\Autoload\ComposerStaticInit359f82cc13b2aa7b86b36aa4d120b17b::$files; 35 $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { 36 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { 37 $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; 38 39 require $file; 40 } 41 }, null, null); 42 foreach ($filesToLoad as $fileIdentifier => $file) { 43 $requireFile($fileIdentifier, $file); 60 44 } 61 45 … … 63 47 } 64 48 } 65 66 /**67 * @param string $fileIdentifier68 * @param string $file69 * @return void70 */71 function composerRequire359f82cc13b2aa7b86b36aa4d120b17b($fileIdentifier, $file)72 {73 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {74 $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;75 76 require $file;77 }78 } -
importer-for-crocoblock-jetengine/tags/1.2.1/vendor/composer/installed.json
r2824714 r2952798 8 8 "type": "git", 9 9 "url": "https://github.com/CodingChicken-com/wp-all-import-rapid-addon.git", 10 "reference": " 5acb6bf4b7185ca2e590bf21aeea3b7a2e10c094"10 "reference": "2b13ede62e701e64f851be08345fc43a664eb55a" 11 11 }, 12 12 "dist": { 13 13 "type": "zip", 14 "url": "https://api.github.com/repos/CodingChicken-com/wp-all-import-rapid-addon/zipball/ 5acb6bf4b7185ca2e590bf21aeea3b7a2e10c094",15 "reference": " 5acb6bf4b7185ca2e590bf21aeea3b7a2e10c094",14 "url": "https://api.github.com/repos/CodingChicken-com/wp-all-import-rapid-addon/zipball/2b13ede62e701e64f851be08345fc43a664eb55a", 15 "reference": "2b13ede62e701e64f851be08345fc43a664eb55a", 16 16 "shasum": "" 17 17 }, 18 "time": "202 2-11-13T20:00:20+00:00",18 "time": "2023-07-09T02:45:21+00:00", 19 19 "default-branch": true, 20 20 "type": "library", … … 26 26 }, 27 27 "license": [ 28 "GPL 2.0"28 "GPL-2.0-only" 29 29 ], 30 30 "description": "Rapid Add-On API for WP All Import", -
importer-for-crocoblock-jetengine/tags/1.2.1/vendor/composer/installed.php
r2887267 r2952798 1 1 <?php return array( 2 2 'root' => array( 3 'name' => 'coding-chicken/importer-for-crocoblock-jetengine', 3 4 'pretty_version' => 'dev-master', 4 5 'version' => 'dev-master', 6 'reference' => '8b613f4e4f937c2b4f1a8cfe02736b40441962c9', 5 7 'type' => 'library', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => 'e9a6e95a74220b1bf0d161d73c10946a3bb1eaca',9 'name' => 'coding-chicken/importer-for-crocoblock-jetengine',10 10 'dev' => true, 11 11 ), … … 14 14 'pretty_version' => 'dev-master', 15 15 'version' => 'dev-master', 16 'reference' => '8b613f4e4f937c2b4f1a8cfe02736b40441962c9', 16 17 'type' => 'library', 17 18 'install_path' => __DIR__ . '/../../', 18 19 'aliases' => array(), 19 'reference' => 'e9a6e95a74220b1bf0d161d73c10946a3bb1eaca',20 20 'dev_requirement' => false, 21 21 ), … … 23 23 'pretty_version' => 'dev-master', 24 24 'version' => 'dev-master', 25 'reference' => '2b13ede62e701e64f851be08345fc43a664eb55a', 25 26 'type' => 'library', 26 27 'install_path' => __DIR__ . '/../soflyy/wp-all-import-rapid-addon', … … 28 29 0 => '9999999-dev', 29 30 ), 30 'reference' => '5acb6bf4b7185ca2e590bf21aeea3b7a2e10c094',31 31 'dev_requirement' => false, 32 32 ), -
importer-for-crocoblock-jetengine/tags/1.2.1/vendor/soflyy/wp-all-import-rapid-addon/composer.json
r2824714 r2952798 3 3 "description": "Rapid Add-On API for WP All Import", 4 4 "type": "library", 5 "license": "GPL 2.0",5 "license": "GPL-2.0-only", 6 6 "require": {}, 7 7 "autoload": { -
importer-for-crocoblock-jetengine/tags/1.2.1/vendor/soflyy/wp-all-import-rapid-addon/rapid-addon.php
r2824714 r2952798 6 6 * @copyright Copyright (c) 2014, Soflyy 7 7 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License 8 * @version 2.0 8 * @version 2.0.1 9 9 * @author Modified version by Coding Chicken 10 10 */ … … 368 368 case 'image': 369 369 370 // Get allowed mime types. 371 $mimes = \get_allowed_mime_types(); 372 373 // Get image mimes. 374 $images_exts = []; 375 376 // Get list of image extensions. 377 foreach( $mimes as $ext => $mime ){ 378 if( strpos($mime, 'image/') !== false ){ 379 $exts = explode('|', $ext); 380 381 foreach( $exts as $ext ){ 382 $images_exts[] = $ext; 383 } 384 } 385 } 386 370 387 // import the specified image, then set the value of the field to the image ID in the media library 371 388 … … 388 405 $download = $import_options['download_image'][$field_slug]; 389 406 390 $uploaded_image = \PMXI_API::upload_image($post_id, $image_url_or_path, $download, $importData['logger'], true, "", "images", true, $importData['articleData']); 407 // Determine if target file is supported image or some other file type. 408 $ext = pathinfo($image_url_or_path, PATHINFO_EXTENSION); 409 if( in_array($ext, $images_exts)){ 410 $file_type = 'images'; 411 }else{ 412 $file_type = 'files'; 413 } 414 415 $uploaded_image = \PMXI_API::upload_image($post_id, $image_url_or_path, $download, $importData['logger'], true, "", $file_type, true, $importData['articleData']); 391 416 392 417 $data[$field_slug][$key][] = array(
Note: See TracChangeset
for help on using the changeset viewer.