From 57e86d7d3919ad3c6e41c4068709c98e8406facc Mon Sep 17 00:00:00 2001 From: Guilherme Capanema Date: Thu, 25 Jun 2020 17:02:04 -0300 Subject: [PATCH] =?UTF-8?q?Adiciona=20pasta=20vendor=20ao=20reposit=C3=B3r?= =?UTF-8?q?io?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 - vendor/autoload.php | 7 + vendor/composer/ClassLoader.php | 445 ++++++++++++++++++ vendor/composer/LICENSE | 21 + vendor/composer/autoload_classmap.php | 9 + vendor/composer/autoload_files.php | 10 + vendor/composer/autoload_namespaces.php | 9 + vendor/composer/autoload_psr4.php | 10 + vendor/composer/autoload_real.php | 73 +++ vendor/composer/autoload_static.php | 35 ++ vendor/composer/installed.json | 70 +++ vendor/wordplate/acf/LICENSE | 9 + vendor/wordplate/acf/composer.json | 56 +++ vendor/wordplate/acf/src/ConditionalLogic.php | 117 +++++ vendor/wordplate/acf/src/Config.php | 50 ++ vendor/wordplate/acf/src/FieldGroup.php | 62 +++ vendor/wordplate/acf/src/Fields/Accordion.php | 39 ++ .../acf/src/Fields/Attributes/ButtonLabel.php | 24 + .../src/Fields/Attributes/CharacterLimit.php | 24 + .../acf/src/Fields/Attributes/Choices.php | 24 + .../Fields/Attributes/ConditionalLogic.php | 28 ++ .../src/Fields/Attributes/DateTimeFormat.php | 31 ++ .../src/Fields/Attributes/DefaultValue.php | 27 ++ .../acf/src/Fields/Attributes/Dimensions.php | 43 ++ .../src/Fields/Attributes/DirectionLayout.php | 30 ++ .../acf/src/Fields/Attributes/Endpoint.php | 24 + .../acf/src/Fields/Attributes/FileSize.php | 34 ++ .../acf/src/Fields/Attributes/FilterBy.php | 31 ++ .../acf/src/Fields/Attributes/Height.php | 24 + .../src/Fields/Attributes/Instructions.php | 24 + .../acf/src/Fields/Attributes/Layout.php | 35 ++ .../acf/src/Fields/Attributes/Library.php | 33 ++ .../acf/src/Fields/Attributes/Message.php | 24 + .../acf/src/Fields/Attributes/MimeTypes.php | 24 + .../acf/src/Fields/Attributes/MinMax.php | 31 ++ .../acf/src/Fields/Attributes/Multiple.php | 24 + .../acf/src/Fields/Attributes/NewLines.php | 33 ++ .../acf/src/Fields/Attributes/Nullable.php | 24 + .../acf/src/Fields/Attributes/Pending.php | 31 ++ .../acf/src/Fields/Attributes/Placeholder.php | 24 + .../acf/src/Fields/Attributes/Required.php | 24 + .../src/Fields/Attributes/ReturnFormat.php | 33 ++ .../acf/src/Fields/Attributes/Step.php | 24 + .../acf/src/Fields/Attributes/SubFields.php | 24 + .../acf/src/Fields/Attributes/WeekDay.php | 24 + .../acf/src/Fields/Attributes/Wrapper.php | 24 + .../wordplate/acf/src/Fields/ButtonGroup.php | 37 ++ vendor/wordplate/acf/src/Fields/Checkbox.php | 37 ++ .../wordplate/acf/src/Fields/ColorPicker.php | 31 ++ .../wordplate/acf/src/Fields/DatePicker.php | 33 ++ .../acf/src/Fields/DateTimePicker.php | 33 ++ vendor/wordplate/acf/src/Fields/Email.php | 33 ++ vendor/wordplate/acf/src/Fields/Field.php | 100 ++++ vendor/wordplate/acf/src/Fields/File.php | 37 ++ .../acf/src/Fields/FlexibleContent.php | 40 ++ vendor/wordplate/acf/src/Fields/Gallery.php | 56 +++ vendor/wordplate/acf/src/Fields/GoogleMap.php | 46 ++ vendor/wordplate/acf/src/Fields/Group.php | 33 ++ vendor/wordplate/acf/src/Fields/Image.php | 46 ++ vendor/wordplate/acf/src/Fields/Layout.php | 27 ++ vendor/wordplate/acf/src/Fields/Link.php | 31 ++ vendor/wordplate/acf/src/Fields/Message.php | 32 ++ vendor/wordplate/acf/src/Fields/Number.php | 39 ++ vendor/wordplate/acf/src/Fields/Oembed.php | 38 ++ vendor/wordplate/acf/src/Fields/PageLink.php | 42 ++ vendor/wordplate/acf/src/Fields/Password.php | 33 ++ .../wordplate/acf/src/Fields/PostObject.php | 37 ++ vendor/wordplate/acf/src/Fields/Radio.php | 37 ++ vendor/wordplate/acf/src/Fields/Range.php | 37 ++ .../wordplate/acf/src/Fields/Relationship.php | 49 ++ vendor/wordplate/acf/src/Fields/Repeater.php | 44 ++ vendor/wordplate/acf/src/Fields/Select.php | 47 ++ vendor/wordplate/acf/src/Fields/Tab.php | 35 ++ vendor/wordplate/acf/src/Fields/Taxonomy.php | 76 +++ vendor/wordplate/acf/src/Fields/Text.php | 37 ++ vendor/wordplate/acf/src/Fields/Textarea.php | 44 ++ .../wordplate/acf/src/Fields/TimePicker.php | 36 ++ vendor/wordplate/acf/src/Fields/TrueFalse.php | 48 ++ vendor/wordplate/acf/src/Fields/Url.php | 33 ++ vendor/wordplate/acf/src/Fields/User.php | 42 ++ vendor/wordplate/acf/src/Fields/Wysiwyg.php | 60 +++ vendor/wordplate/acf/src/Key.php | 58 +++ vendor/wordplate/acf/src/Location.php | 51 ++ vendor/wordplate/acf/src/helpers.php | 77 +++ 84 files changed, 3478 insertions(+), 1 deletion(-) create mode 100644 vendor/autoload.php create mode 100644 vendor/composer/ClassLoader.php create mode 100644 vendor/composer/LICENSE create mode 100644 vendor/composer/autoload_classmap.php create mode 100644 vendor/composer/autoload_files.php create mode 100644 vendor/composer/autoload_namespaces.php create mode 100644 vendor/composer/autoload_psr4.php create mode 100644 vendor/composer/autoload_real.php create mode 100644 vendor/composer/autoload_static.php create mode 100644 vendor/composer/installed.json create mode 100644 vendor/wordplate/acf/LICENSE create mode 100644 vendor/wordplate/acf/composer.json create mode 100644 vendor/wordplate/acf/src/ConditionalLogic.php create mode 100644 vendor/wordplate/acf/src/Config.php create mode 100644 vendor/wordplate/acf/src/FieldGroup.php create mode 100644 vendor/wordplate/acf/src/Fields/Accordion.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/ButtonLabel.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/CharacterLimit.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/Choices.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/ConditionalLogic.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/DateTimeFormat.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/DefaultValue.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/Dimensions.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/DirectionLayout.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/Endpoint.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/FileSize.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/FilterBy.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/Height.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/Instructions.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/Layout.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/Library.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/Message.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/MimeTypes.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/MinMax.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/Multiple.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/NewLines.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/Nullable.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/Pending.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/Placeholder.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/Required.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/ReturnFormat.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/Step.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/SubFields.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/WeekDay.php create mode 100644 vendor/wordplate/acf/src/Fields/Attributes/Wrapper.php create mode 100644 vendor/wordplate/acf/src/Fields/ButtonGroup.php create mode 100644 vendor/wordplate/acf/src/Fields/Checkbox.php create mode 100644 vendor/wordplate/acf/src/Fields/ColorPicker.php create mode 100644 vendor/wordplate/acf/src/Fields/DatePicker.php create mode 100644 vendor/wordplate/acf/src/Fields/DateTimePicker.php create mode 100644 vendor/wordplate/acf/src/Fields/Email.php create mode 100644 vendor/wordplate/acf/src/Fields/Field.php create mode 100644 vendor/wordplate/acf/src/Fields/File.php create mode 100644 vendor/wordplate/acf/src/Fields/FlexibleContent.php create mode 100644 vendor/wordplate/acf/src/Fields/Gallery.php create mode 100644 vendor/wordplate/acf/src/Fields/GoogleMap.php create mode 100644 vendor/wordplate/acf/src/Fields/Group.php create mode 100644 vendor/wordplate/acf/src/Fields/Image.php create mode 100644 vendor/wordplate/acf/src/Fields/Layout.php create mode 100644 vendor/wordplate/acf/src/Fields/Link.php create mode 100644 vendor/wordplate/acf/src/Fields/Message.php create mode 100644 vendor/wordplate/acf/src/Fields/Number.php create mode 100644 vendor/wordplate/acf/src/Fields/Oembed.php create mode 100644 vendor/wordplate/acf/src/Fields/PageLink.php create mode 100644 vendor/wordplate/acf/src/Fields/Password.php create mode 100644 vendor/wordplate/acf/src/Fields/PostObject.php create mode 100644 vendor/wordplate/acf/src/Fields/Radio.php create mode 100644 vendor/wordplate/acf/src/Fields/Range.php create mode 100644 vendor/wordplate/acf/src/Fields/Relationship.php create mode 100644 vendor/wordplate/acf/src/Fields/Repeater.php create mode 100644 vendor/wordplate/acf/src/Fields/Select.php create mode 100644 vendor/wordplate/acf/src/Fields/Tab.php create mode 100644 vendor/wordplate/acf/src/Fields/Taxonomy.php create mode 100644 vendor/wordplate/acf/src/Fields/Text.php create mode 100644 vendor/wordplate/acf/src/Fields/Textarea.php create mode 100644 vendor/wordplate/acf/src/Fields/TimePicker.php create mode 100644 vendor/wordplate/acf/src/Fields/TrueFalse.php create mode 100644 vendor/wordplate/acf/src/Fields/Url.php create mode 100644 vendor/wordplate/acf/src/Fields/User.php create mode 100644 vendor/wordplate/acf/src/Fields/Wysiwyg.php create mode 100644 vendor/wordplate/acf/src/Key.php create mode 100644 vendor/wordplate/acf/src/Location.php create mode 100644 vendor/wordplate/acf/src/helpers.php diff --git a/.gitignore b/.gitignore index 022b988..3c3629e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ node_modules -vendor diff --git a/vendor/autoload.php b/vendor/autoload.php new file mode 100644 index 0000000..16a507f --- /dev/null +++ b/vendor/autoload.php @@ -0,0 +1,7 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE new file mode 100644 index 0000000..f27399a --- /dev/null +++ b/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..7a91153 --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,9 @@ + $vendorDir . '/wordplate/acf/src/helpers.php', +); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php new file mode 100644 index 0000000..b7fc012 --- /dev/null +++ b/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ + array($vendorDir . '/wordplate/acf/src'), +); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php new file mode 100644 index 0000000..3c62135 --- /dev/null +++ b/vendor/composer/autoload_real.php @@ -0,0 +1,73 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit9f7096e25fc06c4ca0a938c1141f1f3b::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInit9f7096e25fc06c4ca0a938c1141f1f3b::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequire9f7096e25fc06c4ca0a938c1141f1f3b($fileIdentifier, $file); + } + + return $loader; + } +} + +function composerRequire9f7096e25fc06c4ca0a938c1141f1f3b($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100644 index 0000000..c0d9ecc --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,35 @@ + __DIR__ . '/..' . '/wordplate/acf/src/helpers.php', + ); + + public static $prefixLengthsPsr4 = array ( + 'W' => + array ( + 'WordPlate\\Acf\\' => 14, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'WordPlate\\Acf\\' => + array ( + 0 => __DIR__ . '/..' . '/wordplate/acf/src', + ), + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit9f7096e25fc06c4ca0a938c1141f1f3b::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit9f7096e25fc06c4ca0a938c1141f1f3b::$prefixDirsPsr4; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 0000000..fde8504 --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,70 @@ +[ + { + "name": "wordplate/acf", + "version": "8.4.0", + "version_normalized": "8.4.0.0", + "source": { + "type": "git", + "url": "https://github.com/wordplate/extended-acf.git", + "reference": "1f8bc3dd04bb83142fd4ea54f56ef9c14fbb7d27" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/wordplate/extended-acf/zipball/1f8bc3dd04bb83142fd4ea54f56ef9c14fbb7d27", + "reference": "1f8bc3dd04bb83142fd4ea54f56ef9c14fbb7d27", + "shasum": "" + }, + "require": { + "php": "^7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.0 || ^9.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "time": "2020-06-05T08:47:30+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "WordPlate\\Acf\\": "src/" + }, + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Vincent Klaiber", + "email": "hello@doubledip.se" + }, + { + "name": "Chris Andersson", + "email": "hello@puredazzle.se" + } + ], + "description": "Register advanced custom fields with object oriented PHP", + "keywords": [ + "acf", + "advanced", + "custom", + "fields", + "wordplate", + "wordpress" + ], + "funding": [ + { + "url": "https://github.com/wordplate/wordplate", + "type": "custom" + } + ] + } +] diff --git a/vendor/wordplate/acf/LICENSE b/vendor/wordplate/acf/LICENSE new file mode 100644 index 0000000..c1434b7 --- /dev/null +++ b/vendor/wordplate/acf/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Vincent Klaiber + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/wordplate/acf/composer.json b/vendor/wordplate/acf/composer.json new file mode 100644 index 0000000..c20e29d --- /dev/null +++ b/vendor/wordplate/acf/composer.json @@ -0,0 +1,56 @@ +{ + "name": "wordplate/acf", + "description": "Register advanced custom fields with object oriented PHP", + "keywords": [ + "acf", + "advanced", + "custom", + "fields", + "wordplate", + "wordpress" + ], + "license": "MIT", + "authors": [ + { + "name": "Vincent Klaiber", + "email": "hello@doubledip.se" + }, + { + "name": "Chris Andersson", + "email": "hello@puredazzle.se" + } + ], + "require": { + "php": "^7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.0 || ^9.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "config": { + "preferred-install": "dist" + }, + "extra": { + "branch-alias": { + "dev-master": "8.4-dev" + } + }, + "autoload": { + "psr-4": { + "WordPlate\\Acf\\": "src/" + }, + "files": [ + "src/helpers.php" + ] + }, + "autoload-dev": { + "psr-4": { + "WordPlate\\Tests\\Acf\\": "tests/" + }, + "files": [ + "tests/helpers.php" + ] + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/vendor/wordplate/acf/src/ConditionalLogic.php b/vendor/wordplate/acf/src/ConditionalLogic.php new file mode 100644 index 0000000..497a552 --- /dev/null +++ b/vendor/wordplate/acf/src/ConditionalLogic.php @@ -0,0 +1,117 @@ +name = $name; + } + + public static function if(string $name): self + { + return new self($name); + } + + public function greaterThan(int $value): self + { + $this->operator = '>'; + $this->value = $value; + + return $this; + } + + public function lessThan(int $value): self + { + $this->operator = '<'; + $this->value = $value; + + return $this; + } + + /** @param mixed $value */ + public function equals($value): self + { + $this->operator = '=='; + $this->value = $value; + + return $this; + } + + /** @param mixed $value */ + public function notEquals($value): self + { + $this->operator = '!='; + $this->value = $value; + + return $this; + } + + /** @param mixed $value */ + public function contains($value): self + { + $this->operator = '==contains'; + $this->value = $value; + + return $this; + } + + public function empty(): self + { + $this->operator = '==empty'; + + return $this; + } + + public function notEmpty(): self + { + $this->operator = '!=empty'; + + return $this; + } + + public function setParentKey(string $parentKey): void + { + $this->parentKey = $parentKey; + } + + public function toArray(): array + { + $key = sprintf('%s_%s', $this->parentKey, Key::sanitize($this->name)); + + $rule = [ + 'field' => sprintf('field_%s', Key::hash($key)), + 'operator' => $this->operator, + ]; + + if ($this->value) { + $rule['value'] = $this->value; + } + + return $rule; + } +} diff --git a/vendor/wordplate/acf/src/Config.php b/vendor/wordplate/acf/src/Config.php new file mode 100644 index 0000000..756271e --- /dev/null +++ b/vendor/wordplate/acf/src/Config.php @@ -0,0 +1,50 @@ +items = $items; + } + + public function has(string $key): bool + { + return array_key_exists($key, $this->items); + } + + /** @param mixed $value */ + public function set(string $key, $value): void + { + $this->items[$key] = $value; + } + + /** + * @param mixed $default + * @return mixed + */ + public function get(string $key, $default = null) + { + return $this->items[$key] ?? $default; + } + + public function all(): array + { + return $this->items; + } +} diff --git a/vendor/wordplate/acf/src/FieldGroup.php b/vendor/wordplate/acf/src/FieldGroup.php new file mode 100644 index 0000000..a2d3a1d --- /dev/null +++ b/vendor/wordplate/acf/src/FieldGroup.php @@ -0,0 +1,62 @@ +config = new Config($config); + } + + public function toArray(): array + { + if ($this->config->has('key')) { + $key = Key::sanitize($this->config->get('key')); + } else { + $key = Key::sanitize($this->config->get('title')); + } + + if (!$this->config->has('style')) { + $this->config->set('style', 'seamless'); + } + + $this->config->set('fields', array_map(function ($field) use ($key) { + $field->setParentKey($key); + + return $field->toArray(); + }, $this->config->get('fields'))); + + $this->config->set('location', array_map(function ($location) { + return $location->toArray(); + }, $this->config->get('location'))); + + $this->config->set('key', Key::generate($key, 'group')); + + return $this->config->all(); + } +} diff --git a/vendor/wordplate/acf/src/Fields/Accordion.php b/vendor/wordplate/acf/src/Fields/Accordion.php new file mode 100644 index 0000000..6befba4 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Accordion.php @@ -0,0 +1,39 @@ +config->set('multi_expand', true); + + return $this; + } + + public function open(): self + { + $this->config->set('open', true); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/ButtonLabel.php b/vendor/wordplate/acf/src/Fields/Attributes/ButtonLabel.php new file mode 100644 index 0000000..b7ac7c9 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/ButtonLabel.php @@ -0,0 +1,24 @@ +config->set('button_label', $label); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/CharacterLimit.php b/vendor/wordplate/acf/src/Fields/Attributes/CharacterLimit.php new file mode 100644 index 0000000..458a31d --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/CharacterLimit.php @@ -0,0 +1,24 @@ +config->set('maxlength', $limit); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/Choices.php b/vendor/wordplate/acf/src/Fields/Attributes/Choices.php new file mode 100644 index 0000000..520b4de --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/Choices.php @@ -0,0 +1,24 @@ +config->set('choices', $choices); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/ConditionalLogic.php b/vendor/wordplate/acf/src/Fields/Attributes/ConditionalLogic.php new file mode 100644 index 0000000..a83e7c8 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/ConditionalLogic.php @@ -0,0 +1,28 @@ +config->get('conditional_logic', []); + + $conditionalLogic[] = $rules; + + $this->config->set('conditional_logic', $conditionalLogic); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/DateTimeFormat.php b/vendor/wordplate/acf/src/Fields/Attributes/DateTimeFormat.php new file mode 100644 index 0000000..e05156b --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/DateTimeFormat.php @@ -0,0 +1,31 @@ +config->set('display_format', $format); + + return $this; + } + + public function returnFormat(string $format): self + { + $this->config->set('return_format', $format); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/DefaultValue.php b/vendor/wordplate/acf/src/Fields/Attributes/DefaultValue.php new file mode 100644 index 0000000..fb7560f --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/DefaultValue.php @@ -0,0 +1,27 @@ +config->set('default_value', $value); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/Dimensions.php b/vendor/wordplate/acf/src/Fields/Attributes/Dimensions.php new file mode 100644 index 0000000..9e27849 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/Dimensions.php @@ -0,0 +1,43 @@ +config->set('min_height', $min); + } + + if ($max !== null) { + $this->config->set('max_height', $max); + } + + return $this; + } + + public function width(?int $min = null, ?int $max = null): self + { + if ($min !== null) { + $this->config->set('min_width', $min); + } + + if ($max !== null) { + $this->config->set('max_width', $max); + } + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/DirectionLayout.php b/vendor/wordplate/acf/src/Fields/Attributes/DirectionLayout.php new file mode 100644 index 0000000..6f062d6 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/DirectionLayout.php @@ -0,0 +1,30 @@ +config->set('layout', $layout); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/Endpoint.php b/vendor/wordplate/acf/src/Fields/Attributes/Endpoint.php new file mode 100644 index 0000000..06f15b3 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/Endpoint.php @@ -0,0 +1,24 @@ +config->set('endpoint', true); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/FileSize.php b/vendor/wordplate/acf/src/Fields/Attributes/FileSize.php new file mode 100644 index 0000000..e90d438 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/FileSize.php @@ -0,0 +1,34 @@ +config->set('min_size', $min); + } + + if ($max !== null) { + $this->config->set('max_size', $max); + } + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/FilterBy.php b/vendor/wordplate/acf/src/Fields/Attributes/FilterBy.php new file mode 100644 index 0000000..9addf12 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/FilterBy.php @@ -0,0 +1,31 @@ +config->set('post_type', $postTypes); + + return $this; + } + + public function taxonomies(array $taxonomies): self + { + $this->config->set('taxonomy', $taxonomies); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/Height.php b/vendor/wordplate/acf/src/Fields/Attributes/Height.php new file mode 100644 index 0000000..b1ed520 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/Height.php @@ -0,0 +1,24 @@ +config->set('height', $height); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/Instructions.php b/vendor/wordplate/acf/src/Fields/Attributes/Instructions.php new file mode 100644 index 0000000..b361c81 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/Instructions.php @@ -0,0 +1,24 @@ +config->set('instructions', $instructions); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/Layout.php b/vendor/wordplate/acf/src/Fields/Attributes/Layout.php new file mode 100644 index 0000000..8d56557 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/Layout.php @@ -0,0 +1,35 @@ +config->set($key, $layout); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/Library.php b/vendor/wordplate/acf/src/Fields/Attributes/Library.php new file mode 100644 index 0000000..91059ec --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/Library.php @@ -0,0 +1,33 @@ +config->set('library', $library); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/Message.php b/vendor/wordplate/acf/src/Fields/Attributes/Message.php new file mode 100644 index 0000000..afebe65 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/Message.php @@ -0,0 +1,24 @@ +config->set('message', $message); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/MimeTypes.php b/vendor/wordplate/acf/src/Fields/Attributes/MimeTypes.php new file mode 100644 index 0000000..33557e1 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/MimeTypes.php @@ -0,0 +1,24 @@ +config->set('mime_types', implode(',', $mimeTypes)); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/MinMax.php b/vendor/wordplate/acf/src/Fields/Attributes/MinMax.php new file mode 100644 index 0000000..377dee2 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/MinMax.php @@ -0,0 +1,31 @@ +config->set('max', $max); + + return $this; + } + + public function min(int $min): self + { + $this->config->set('min', $min); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/Multiple.php b/vendor/wordplate/acf/src/Fields/Attributes/Multiple.php new file mode 100644 index 0000000..e61becb --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/Multiple.php @@ -0,0 +1,24 @@ +config->set('multiple', true); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/NewLines.php b/vendor/wordplate/acf/src/Fields/Attributes/NewLines.php new file mode 100644 index 0000000..5e499e2 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/NewLines.php @@ -0,0 +1,33 @@ +config->set('new_lines', $newLines); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/Nullable.php b/vendor/wordplate/acf/src/Fields/Attributes/Nullable.php new file mode 100644 index 0000000..2c9f0bb --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/Nullable.php @@ -0,0 +1,24 @@ +config->set('allow_null', true); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/Pending.php b/vendor/wordplate/acf/src/Fields/Attributes/Pending.php new file mode 100644 index 0000000..c7a9d2a --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/Pending.php @@ -0,0 +1,31 @@ +config->set('append', $value); + + return $this; + } + + public function prepend(string $value): self + { + $this->config->set('prepend', $value); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/Placeholder.php b/vendor/wordplate/acf/src/Fields/Attributes/Placeholder.php new file mode 100644 index 0000000..2716ac8 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/Placeholder.php @@ -0,0 +1,24 @@ +config->set('placeholder', $placeholder); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/Required.php b/vendor/wordplate/acf/src/Fields/Attributes/Required.php new file mode 100644 index 0000000..7741193 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/Required.php @@ -0,0 +1,24 @@ +config->set('required', true); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/ReturnFormat.php b/vendor/wordplate/acf/src/Fields/Attributes/ReturnFormat.php new file mode 100644 index 0000000..ab14e00 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/ReturnFormat.php @@ -0,0 +1,33 @@ +config->set('return_format', $format); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/Step.php b/vendor/wordplate/acf/src/Fields/Attributes/Step.php new file mode 100644 index 0000000..90592ec --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/Step.php @@ -0,0 +1,24 @@ +config->set('step', $step); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/SubFields.php b/vendor/wordplate/acf/src/Fields/Attributes/SubFields.php new file mode 100644 index 0000000..fa00ea2 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/SubFields.php @@ -0,0 +1,24 @@ +config->set('sub_fields', $fields); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/WeekDay.php b/vendor/wordplate/acf/src/Fields/Attributes/WeekDay.php new file mode 100644 index 0000000..0ebc86e --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/WeekDay.php @@ -0,0 +1,24 @@ +config->set('first_day', $day); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Attributes/Wrapper.php b/vendor/wordplate/acf/src/Fields/Attributes/Wrapper.php new file mode 100644 index 0000000..086d8f0 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Attributes/Wrapper.php @@ -0,0 +1,24 @@ +config->set('wrapper', $wrapper); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/ButtonGroup.php b/vendor/wordplate/acf/src/Fields/ButtonGroup.php new file mode 100644 index 0000000..0992073 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/ButtonGroup.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information; use please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace WordPlate\Acf\Fields; + +use WordPlate\Acf\Fields\Attributes\Choices; +use WordPlate\Acf\Fields\Attributes\ConditionalLogic; +use WordPlate\Acf\Fields\Attributes\DefaultValue; +use WordPlate\Acf\Fields\Attributes\DirectionLayout; +use WordPlate\Acf\Fields\Attributes\Instructions; +use WordPlate\Acf\Fields\Attributes\Required; +use WordPlate\Acf\Fields\Attributes\ReturnFormat; +use WordPlate\Acf\Fields\Attributes\Wrapper; + +class Checkbox extends Field +{ + use Choices; + use DefaultValue; + use DirectionLayout; + use ConditionalLogic; + use Instructions; + use Required; + use ReturnFormat; + use Wrapper; + + protected $type = 'checkbox'; +} diff --git a/vendor/wordplate/acf/src/Fields/ColorPicker.php b/vendor/wordplate/acf/src/Fields/ColorPicker.php new file mode 100644 index 0000000..ee18af0 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/ColorPicker.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information; use please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace WordPlate\Acf\Fields; + +use WordPlate\Acf\Fields\Attributes\ConditionalLogic; +use WordPlate\Acf\Fields\Attributes\DateTimeFormat; +use WordPlate\Acf\Fields\Attributes\Instructions; +use WordPlate\Acf\Fields\Attributes\Required; +use WordPlate\Acf\Fields\Attributes\WeekDay; +use WordPlate\Acf\Fields\Attributes\Wrapper; + +class DatePicker extends Field +{ + use ConditionalLogic; + use DateTimeFormat; + use Instructions; + use Required; + use WeekDay; + use Wrapper; + + protected $type = 'date_picker'; +} diff --git a/vendor/wordplate/acf/src/Fields/DateTimePicker.php b/vendor/wordplate/acf/src/Fields/DateTimePicker.php new file mode 100644 index 0000000..65da8d4 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/DateTimePicker.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information; use please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace WordPlate\Acf\Fields; + +use WordPlate\Acf\Fields\Attributes\ConditionalLogic; +use WordPlate\Acf\Fields\Attributes\Instructions; +use WordPlate\Acf\Fields\Attributes\Pending; +use WordPlate\Acf\Fields\Attributes\Placeholder; +use WordPlate\Acf\Fields\Attributes\Required; +use WordPlate\Acf\Fields\Attributes\Wrapper; + +class Email extends Field +{ + use Instructions; + use ConditionalLogic; + use Pending; + use Placeholder; + use Required; + use Wrapper; + + protected $type = 'email'; +} diff --git a/vendor/wordplate/acf/src/Fields/Field.php b/vendor/wordplate/acf/src/Fields/Field.php new file mode 100644 index 0000000..b723bb4 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Field.php @@ -0,0 +1,100 @@ +config = new Config([ + 'label' => $label, + 'name' => $name ?? sanitize_title($label), + ]); + } + + /** @return static */ + public static function make(string $label, ?string $name = null): self + { + return new static($label, $name); + } + + public function setParentKey(string $parentKey): void + { + $this->parentKey = $parentKey; + } + + public function toArray(): array + { + $key = sprintf('%s_%s', $this->parentKey, Key::sanitize($this->config->get('name'))); + + if (!empty($this->type)) { + $this->config->set('type', $this->type); + } + + if ($this->config->has('conditional_logic')) { + $this->config->set('conditional_logic', array_map(function ($rules) { + return array_map(function ($rule) { + $rule->setParentKey($this->parentKey); + + return $rule->toArray(); + }, $rules); + }, $this->config->get('conditional_logic'))); + } + + if ($this->config->has('layouts')) { + $this->config->set('layouts', array_map(function ($layout) use ($key) { + $layout->setParentKey($key); + + return $layout->toArray(); + }, $this->config->get('layouts'))); + } + + if ($this->config->has('sub_fields')) { + $this->config->set('sub_fields', array_map(function ($field) use ($key) { + $field->setParentKey($key); + + return $field->toArray(); + }, $this->config->get('sub_fields'))); + } + + if ($this->config->has('collapsed')) { + foreach ($this->config->get('sub_fields', []) as $field) { + if ($field['name'] === $this->config->get('collapsed')) { + $this->config->set('collapsed', $field['key']); + + break; + } + } + } + + $this->config->set('key', Key::generate($key, $this->keyPrefix)); + + return $this->config->all(); + } +} diff --git a/vendor/wordplate/acf/src/Fields/File.php b/vendor/wordplate/acf/src/Fields/File.php new file mode 100644 index 0000000..2be36b1 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/File.php @@ -0,0 +1,37 @@ +config->set('layouts', $layouts); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Gallery.php b/vendor/wordplate/acf/src/Fields/Gallery.php new file mode 100644 index 0000000..5bf5105 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Gallery.php @@ -0,0 +1,56 @@ +config->set('insert', $insert); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/GoogleMap.php b/vendor/wordplate/acf/src/Fields/GoogleMap.php new file mode 100644 index 0000000..e2a8386 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/GoogleMap.php @@ -0,0 +1,46 @@ +config->set('center_lat', $latitude); + $this->config->set('center_lng', $longitude); + + return $this; + } + + public function zoom(int $zoom): self + { + $this->config->set('zoom', $zoom); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Group.php b/vendor/wordplate/acf/src/Fields/Group.php new file mode 100644 index 0000000..a6c7c9b --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Group.php @@ -0,0 +1,33 @@ +config->set('preview_size', $size); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Layout.php b/vendor/wordplate/acf/src/Fields/Layout.php new file mode 100644 index 0000000..e04f974 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Layout.php @@ -0,0 +1,27 @@ +config->set('esc_html', true); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Number.php b/vendor/wordplate/acf/src/Fields/Number.php new file mode 100644 index 0000000..347566a --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Number.php @@ -0,0 +1,39 @@ +config->set('width', $width); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/PageLink.php b/vendor/wordplate/acf/src/Fields/PageLink.php new file mode 100644 index 0000000..66e5116 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/PageLink.php @@ -0,0 +1,42 @@ +config->set('allow_archives', $value); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Password.php b/vendor/wordplate/acf/src/Fields/Password.php new file mode 100644 index 0000000..b3d714a --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Password.php @@ -0,0 +1,33 @@ +config->set('elements', $elements); + + return $this; + } + + public function filters(array $filters): self + { + $this->config->set('filters', $filters); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Repeater.php b/vendor/wordplate/acf/src/Fields/Repeater.php new file mode 100644 index 0000000..c310f78 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Repeater.php @@ -0,0 +1,44 @@ +config->set('collapsed', $name); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Select.php b/vendor/wordplate/acf/src/Fields/Select.php new file mode 100644 index 0000000..a7532d9 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Select.php @@ -0,0 +1,47 @@ +config->set('ui', true); + $this->config->set('ajax', $useAjax); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Tab.php b/vendor/wordplate/acf/src/Fields/Tab.php new file mode 100644 index 0000000..5065c47 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Tab.php @@ -0,0 +1,35 @@ +config->set('placement', $placement); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Taxonomy.php b/vendor/wordplate/acf/src/Fields/Taxonomy.php new file mode 100644 index 0000000..be0750f --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Taxonomy.php @@ -0,0 +1,76 @@ +config->set('field_type', $fieldType); + + return $this; + } + + public function createTerms(): self + { + $this->config->set('add_term', true); + + return $this; + } + + public function loadTerms(): self + { + $this->config->set('load_terms', true); + + return $this; + } + + public function saveTerms(): self + { + $this->config->set('save_terms', true); + + return $this; + } + + public function taxonomy(string $taxonomy): self + { + $this->config->set('taxonomy', $taxonomy); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Text.php b/vendor/wordplate/acf/src/Fields/Text.php new file mode 100644 index 0000000..852fe55 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Text.php @@ -0,0 +1,37 @@ +config->set('rows', $rows); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/TimePicker.php b/vendor/wordplate/acf/src/Fields/TimePicker.php new file mode 100644 index 0000000..fca12fc --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/TimePicker.php @@ -0,0 +1,36 @@ +config->set('ui', true); + + if ($onText !== null) { + $this->config->set('ui_on_text', $onText); + } + + if ($offText !== null) { + $this->config->set('ui_off_text', $offText); + } + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Url.php b/vendor/wordplate/acf/src/Fields/Url.php new file mode 100644 index 0000000..fab5c2f --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Url.php @@ -0,0 +1,33 @@ +config->set('role', $roles); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Fields/Wysiwyg.php b/vendor/wordplate/acf/src/Fields/Wysiwyg.php new file mode 100644 index 0000000..76fec14 --- /dev/null +++ b/vendor/wordplate/acf/src/Fields/Wysiwyg.php @@ -0,0 +1,60 @@ +config->set('media_upload', $mediaUpload); + + return $this; + } + + /** + * @throws \InvalidArgumentException + */ + public function tabs(string $tabs): self + { + if (!in_array($tabs, ['all', 'visual', 'text'])) { + throw new InvalidArgumentException("Invalid argument tabs [$tabs]."); + } + + $this->config->set('tabs', $tabs); + + return $this; + } + + public function toolbar(string $toolbar): self + { + $this->config->set('toolbar', $toolbar); + + return $this; + } +} diff --git a/vendor/wordplate/acf/src/Key.php b/vendor/wordplate/acf/src/Key.php new file mode 100644 index 0000000..ae36051 --- /dev/null +++ b/vendor/wordplate/acf/src/Key.php @@ -0,0 +1,58 @@ +rules[] = compact('param', 'operator', 'value'); + } + + public static function if(string $param, string $operator, ?string $value = null): self + { + if (func_num_args() === 2) { + $value = $operator; + $operator = '=='; + } + + return new self($param, $operator, $value); + } + + public function and(string $param, string $operator, ?string $value = null): self + { + if (func_num_args() === 2) { + $value = $operator; + $operator = '=='; + } + + $this->rules[] = compact('param', 'operator', 'value'); + + return $this; + } + + public function toArray(): array + { + return $this->rules; + } +} diff --git a/vendor/wordplate/acf/src/helpers.php b/vendor/wordplate/acf/src/helpers.php new file mode 100644 index 0000000..4b7a1c4 --- /dev/null +++ b/vendor/wordplate/acf/src/helpers.php @@ -0,0 +1,77 @@ +toArray()); + } + } +}