Skip to content

Commit

Permalink
fix typo hide_empty in TermsField - Version bump to 3.0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
lavolpecheprogramma committed Oct 24, 2019
1 parent 1ab8b96 commit 0209c58
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Aeria/Aeria.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
class Aeria extends Container
{
public const VERSION = '3.0.10';
public const VERSION = '3.0.11';
/**
* Constructs the Aeria container
*
Expand Down
30 changes: 13 additions & 17 deletions Aeria/Field/Fields/TermsField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,52 @@

namespace Aeria\Field\Fields;

use Aeria\Field\Fields\SelectField;
use Aeria\Field\Interfaces\FieldInterface;

/**
* TermsField is the class that represents a terms field
* TermsField is the class that represents a terms field.
*
* @category Field
* @package Aeria
*
* @author Lorenzo Girardi <lorenzo.girardi@caffeina.com>
* @license https://github.com/caffeinalab/aeria/blob/master/LICENSE MIT license
* @link https://github.com/caffeinalab/aeria
*
* @see https://github.com/caffeinalab/aeria
*/
class TermsField extends SelectField
{

protected $original_config;

/**
* Constructs the field
* Constructs the field.
*
* @param string $parent_key the field's parent key
* @param array $config the field's config
* @param array $config the field's config
* @param array $sections Aeria's sections config
* @param array $index index for of the subfield
*
* @return void
*
* @access public
* @since Method available since Release 3.0.8
*/
public function __construct($parent_key, $config, $sections, $index = null) {
public function __construct($parent_key, $config, $sections, $index = null)
{
parent::__construct($parent_key, $config, $sections, $index);

$this->original_config = json_decode(json_encode($config));

$this->config['type'] = 'select';

$taxonomy = (isset($config['taxonomy'])) ? $config['taxonomy'] : 'category';
$hide_empty = (isset($config['hide_empty'])) ? $config['hide_emty'] : true;
$hide_empty = (isset($config['hide_empty'])) ? $config['hide_empty'] : true;

$terms = get_terms(array(
'taxonomy' => $taxonomy,
'hide_empty' => $hide_empty,
));

$this->config['options'] = array_map( function ($term) {
return array(
$this->config['options'] = array_map(function ($term) {
return array(
'label' => $term->name,
'value' => $term->term_id,
);
}, array_values($terms) );
}, array_values($terms));

unset($this->config['taxonomy']);
}
Expand Down
2 changes: 1 addition & 1 deletion aeria.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Plugin Name: Aeria
* Plugin URI: https://github.com/caffeinalab/aeria
* Description: Aeria is a modular, lightweight, fast WordPress Application development kit.
* Version: 3.0.10
* Version: 3.0.11
* Author: Caffeina
* Author URI: https://caffeina.com
* Text Domain: aeria
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit90e03e2dfe985392e1653de22bc948ce::getLoader();
return ComposerAutoloaderInit338ddf3b9a5279de85d5b87a0ca28b14::getLoader();
14 changes: 7 additions & 7 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit90e03e2dfe985392e1653de22bc948ce
class ComposerAutoloaderInit338ddf3b9a5279de85d5b87a0ca28b14
{
private static $loader;

Expand All @@ -19,15 +19,15 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInit90e03e2dfe985392e1653de22bc948ce', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit338ddf3b9a5279de85d5b87a0ca28b14', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit90e03e2dfe985392e1653de22bc948ce', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit338ddf3b9a5279de85d5b87a0ca28b14', 'loadClassLoader'));

$useStaticLoader = PHP_VERSION_ID >= 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\ComposerStaticInit90e03e2dfe985392e1653de22bc948ce::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit338ddf3b9a5279de85d5b87a0ca28b14::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
Expand All @@ -48,19 +48,19 @@ public static function getLoader()
$loader->register(true);

if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit90e03e2dfe985392e1653de22bc948ce::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit338ddf3b9a5279de85d5b87a0ca28b14::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire90e03e2dfe985392e1653de22bc948ce($fileIdentifier, $file);
composerRequire338ddf3b9a5279de85d5b87a0ca28b14($fileIdentifier, $file);
}

return $loader;
}
}

function composerRequire90e03e2dfe985392e1653de22bc948ce($fileIdentifier, $file)
function composerRequire338ddf3b9a5279de85d5b87a0ca28b14($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
Expand Down
6 changes: 3 additions & 3 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInit90e03e2dfe985392e1653de22bc948ce
class ComposerStaticInit338ddf3b9a5279de85d5b87a0ca28b14
{
public static $files = array (
'd675c376038c78b0d320f3c784804a3c' => __DIR__ . '/../..' . '/Aeria/helpers.php',
Expand All @@ -27,8 +27,8 @@ class ComposerStaticInit90e03e2dfe985392e1653de22bc948ce
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit90e03e2dfe985392e1653de22bc948ce::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit90e03e2dfe985392e1653de22bc948ce::$prefixDirsPsr4;
$loader->prefixLengthsPsr4 = ComposerStaticInit338ddf3b9a5279de85d5b87a0ca28b14::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit338ddf3b9a5279de85d5b87a0ca28b14::$prefixDirsPsr4;

}, null, ClassLoader::class);
}
Expand Down

0 comments on commit 0209c58

Please sign in to comment.