Skip to content

Commit

Permalink
Merge pull request #397 from codepress/release/4.7.3
Browse files Browse the repository at this point in the history
Release 4.7.2
  • Loading branch information
DGStefan authored Feb 6, 2024
2 parents ed6a61f + 63c634c commit c649e4f
Show file tree
Hide file tree
Showing 56 changed files with 291 additions and 259 deletions.
2 changes: 1 addition & 1 deletion assets/js/admin-general.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/admin-page-columns.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/admin-page-settings.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/message-review.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/notice-dismissible.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/table.js

Large diffs are not rendered by default.

43 changes: 30 additions & 13 deletions classes/IntegrationRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,36 @@ class IntegrationRepository

public function find_all(): Integrations
{
return new Integrations([
new Integration\ACF(),
new Integration\BuddyPress(),
new Integration\EventsCalendar(),
new Integration\GravityForms(),
new Integration\JetEngine(),
new Integration\Pods(),
new Integration\Types(),
new Integration\MetaBox(),
new Integration\MediaLibraryAssistant(),
new Integration\WooCommerce(),
new Integration\YoastSeo(),
]);
static $integrations = null;

if (null === $integrations) {
$integrations = new Integrations([
new Integration\ACF(),
new Integration\BuddyPress(),
new Integration\EventsCalendar(),
new Integration\GravityForms(),
new Integration\JetEngine(),
new Integration\Pods(),
new Integration\Types(),
new Integration\MetaBox(),
new Integration\MediaLibraryAssistant(),
new Integration\WooCommerce(),
new Integration\YoastSeo(),
]);
}

return $integrations;
}

public function find_by_slug(string $slug): ?Integration
{
foreach ($this->find_all() as $integration) {
if ($integration->get_slug() === $slug) {
return $integration;
}
}

return null;
}

public function find_all_active(): Integrations
Expand Down
132 changes: 59 additions & 73 deletions classes/Settings/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,78 +4,64 @@

use AC\Storage\KeyValuePair;

class Option {

/**
* @var string
*/
private $name;

/**
* @var GeneralOption
*/
private $storage;

public function __construct( $name, KeyValuePair $storage = null ) {
$this->name = $name;
$this->storage = $storage ?: new GeneralOption();
}

/**
* @return bool
*/
public function is_empty() {
return in_array( $this->get(), [ null, false ], true );
}

/**
* @return string
*/
public function get_name() {
return $this->name;
}

/**
* @return mixed
*/
public function get() {
$values = $this->storage->get();

if ( ! $values || ! array_key_exists( $this->name, $values ) ) {
return null;
}

return $values[ $this->name ];
}

/**
* @param mixed $value
*/
public function save( $value ) {
$values = $this->storage->get();

if ( false === $values ) {
$values = [];
}

$values[ $this->name ] = $value;

$this->storage->save( $values );
}

/**
* @param string $name
*/
public function delete() {
$values = $this->storage->get();

if ( empty( $values ) ) {
return;
}

unset( $values[ $this->name ] );

$this->storage->save( $values );
}
class Option
{

private $name;

private $storage;

public function __construct(string $name, KeyValuePair $storage = null)
{
$this->name = $name;
$this->storage = $storage ?: new GeneralOption();
}

public function is_empty(): bool
{
return in_array($this->get(), [null, false], true);
}

public function get_name(): string
{
return $this->name;
}

public function get()
{
$values = $this->storage->get();

if ( ! $values || ! array_key_exists($this->name, $values)) {
return null;
}

return $values[$this->name];
}

public function save($value)
{
$values = $this->storage->get();

if (false === $values) {
$values = [];
}

$values[$this->name] = $value;

$this->storage->save($values);
}

public function delete()
{
$values = $this->storage->get();

if (empty($values)) {
return;
}

unset($values[$this->name]);

$this->storage->save($values);
}

}
4 changes: 2 additions & 2 deletions codepress-admin-columns.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
Plugin Name: Admin Columns
Version: 4.7.1
Version: 4.7.3
Description: Customize columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.
Author: AdminColumns.com
Author URI: https://www.admincolumns.com
Expand Down Expand Up @@ -37,7 +37,7 @@
}

define('AC_FILE', __FILE__);
define('AC_VERSION', '4.7.1');
define('AC_VERSION', '4.7.3');

require_once __DIR__ . '/classes/Dependencies.php';

Expand Down
Binary file modified languages/codepress-admin-columns-ar_AR.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-ar_AR.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=6; plural=(n == 0) ? 0 : ((n == 1) ? 1 : ((n == 2) ? 2 : ((n % 100 >= 3 && n % 100 <= 10) ? 3 : ((n % 100 >= 11 && n % 100 <= 99) ? 4 : 5))));\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: ar\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-bg_BG.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-bg_BG.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: bg\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-da_DK.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-da_DK.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: da_DK\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-de_DE.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-de_DE.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: de\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-en_NZ.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-en_NZ.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: en_NZ\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-es_ES.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-es_ES.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: es\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-fa_IR.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-fa_IR.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: fa\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-fr_FR.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-fr_FR.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: fr\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-he_IL.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-he_IL.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: he_IL\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-hu_HU.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-hu_HU.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: hu\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-it_IT.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-it_IT.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: it\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-ja_JA.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-ja_JA.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: ja_JP\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-nb_NO.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-nb_NO.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: nb_NO\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-nl_NL.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-nl_NL.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: nl\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-pl_PL.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-pl_PL.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n == 1) ? 0 : ((n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) ? 1 : 2);\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: pl\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-pt_BR.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: pt_BR\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-pt_PT.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-pt_PT.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: pt\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-ro_RO.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-ro_RO.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n == 1) ? 0 : ((n == 0 || n % 100 >= 2 && n % 100 <= 19) ? 1 : 2);\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: ro\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-ru_RU.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/codepress-admin-columns-ru_RU.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : ((n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) ? 1 : 2);\n"
"X-Generator: GlotPress/4.0.0-alpha.11\n"
"X-Generator: GlotPress/4.0.0-beta.2\n"
"Language: ru\n"
"Project-Id-Version: Plugins - Admin Columns - Stable (latest release)\n"

Expand Down
Binary file modified languages/codepress-admin-columns-sv_SE.mo
Binary file not shown.
Loading

0 comments on commit c649e4f

Please sign in to comment.