diff --git a/.builder-rsync-filters b/.builder-rsync-filters index df6c69b0..9a865575 100644 --- a/.builder-rsync-filters +++ b/.builder-rsync-filters @@ -42,9 +42,6 @@ - scripts - tailwind.config.js - tests -- vendor/pimple/pimple/.gitignore -- vendor/pimple/pimple/.php_cs.dist -- vendor/psr/container/.gitignore - vendor/publishpress/wordpress-reviews/phpcs.xml.dist - vendor/publishpress/wordpress-version-notices/.gitignore - vendor/publishpress/wordpress-version-notices/README.md @@ -60,12 +57,5 @@ - assets_wp - phpunit.xml - vendor/bin -- vendor/pimple/pimple/CHANGELOG -- vendor/pimple/pimple/README.rst -- vendor/pimple/pimple/composer.json -- vendor/pimple/pimple/ext -- vendor/pimple/pimple/phpunit.xml.dist -- vendor/pimple/pimple/src/Pimple/Tests -- vendor/psr/container/composer.json - vendor/symfony/polyfill-ctype/composer.json - vendor/bin diff --git a/addons/grouping/legacy-includes.php b/addons/grouping/legacy-includes.php index d8d3e708..a65c39c2 100644 --- a/addons/grouping/legacy-includes.php +++ b/addons/grouping/legacy-includes.php @@ -3,7 +3,7 @@ * Contains all the legacy includes (and hooks) for the plugin. Eventually this will make its way into the new refactor * of the plugin. But while in transition this allows these legacy files to be included as necessary. */ -global $pagenow, $wp_version, $checkpage; +global $pagenow, $checkpage; $checkpage= $pagenow; global $checkpage; define('OS_GROUPING_LEGACY_LOADED', true); @@ -33,9 +33,6 @@ add_filter('manage_'.ppseries_get_series_slug().'_custom_column', 'manage_series_grouping_columns_inside',10,3); add_action(''.ppseries_get_series_slug().'_add_form_fields', 'add_orgseries_group_fields',1); add_action(''.ppseries_get_series_slug().'_edit_form', 'edit_orgseries_group_fields',2,2); -if ($wp_version < '3.1') { - add_filter('manage_edit-tags_columns', 'manage_series_grouping_columns'); -} //add new queryvar and custom joins for the group filter (on manage series page) - TODO DISABLED currently - still working for future version. //add_action('parse_query', 'orgseries_group_parsequery'); @@ -304,8 +301,8 @@ function orgseries_group_where($where) { } function orgseries_manage_grouping_filter_setup() { - global $_GET, $wp_version; - if ( !empty($_GET['ser_grp']) && is_admin() && $wp_version >= 3.1 ) { + global $_GET; + if ( !empty($_GET['ser_grp']) && is_admin()) { add_filter('get_terms_args', 'orgseries_grp_term_filter', 10, 2); } } @@ -321,13 +318,11 @@ function orgseries_grp_term_filter($args, $taxonomies) { } function orgseries_manage_grouping_columns() { - global $wp_version; //hook into manage-series-groups page add_filter('manage_edit-series_group_columns', 'series_grouping_columns', 10); add_filter('manage_series_group_custom_column', 'series_grouping_columns_inside',1,3); add_filter('manage_edit-series_group_sortable_columns', 'series_group_sortable_columns'); - if ($wp_version >= '3.1') - add_action('after-series-table', 'select_series_group_filter'); + add_action('after-series-table', 'select_series_group_filter'); } function orgseries_grouping_settings_setup() { @@ -430,16 +425,12 @@ function select_series_group_filter($taxonomy) { } function series_grouping_columns_inside($content, $column_name, $id) { - global $wp_version; $column_return = $content; if ($column_name == ppseries_get_series_slug()) { $get = get_series_in_group($id); if ( $get == '' ) $count = '0'; else $count = count($get); - if ( $wp_version >= '3.1' ) - $g_link = ''.$count.''; - else - $g_link = $count; + $g_link = ''.$count.''; $column_return = '

'.$g_link.'

'; } return $column_return; @@ -653,4 +644,4 @@ function publishpress_series_groups($atts) $args = shortcode_atts($default_atts, $atts); return get_series_group_list($args['category_ids'], $args, false); -} \ No newline at end of file +} diff --git a/composer.json b/composer.json index fe66d2e6..3a8eaa01 100644 --- a/composer.json +++ b/composer.json @@ -13,19 +13,16 @@ } ], "require": { - "pimple/pimple": "3.2.3.*", + "publishpress/pimple-pimple": "3.5.0.*", + "publishpress/psr-container": "2.0.1.*", + "publishpress/vendor-locator-series": "^1.0", + "publishpress/wordpress-reviews": "^1.1", + "publishpress/instance-protection": "^2.0", + "publishpress/wordpress-version-notices": "^2.1", + "publishpress/wordpress-banners": "^1.3", "symfony/polyfill-ctype": "1.19.*", "sabre/vobject": "^3.4", - "psr/container": "1.0.0", - "composer/installers": "v1.0.6", - "publishpress/wordpress-version-notices": "^1.1", - "alledia/wordpress-edd-license-integration": "^2.3", - "publishpress/wordpress-reviews": "^1.1", - "publishpress/publishpress-instance-protection": "^1.0", - "publishpress/wordpress-banners": "^1.3" - }, - "autoload": { - "psr-4": {"OrganizeSeries\\": "src/"} + "composer/installers": "v1.0.6" }, "require-dev": { "automattic/vipwpcs": "^2.3", diff --git a/composer.lock b/composer.lock index 7f819020..1621aa78 100644 --- a/composer.lock +++ b/composer.lock @@ -4,131 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "63652b0e9f51f6e2e5f45dead410560c", + "content-hash": "64c1f639c2ba39190d0c061efb37f79b", "packages": [ - { - "name": "alledia/edd-sl-plugin-updater", - "version": "v1.6.22", - "source": { - "type": "git", - "url": "https://github.com/publishpress/EDD-SL-Plugin-Updater.git", - "reference": "56525f1acd28e340f7a7e523638c1424ca7f0e0a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/publishpress/EDD-SL-Plugin-Updater/zipball/56525f1acd28e340f7a7e523638c1424ca7f0e0a", - "reference": "56525f1acd28e340f7a7e523638c1424ca7f0e0a", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": ">=5.6.20" - }, - "type": "library", - "autoload": { - "files": [ - "EDD_SL_Plugin_Updater.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "authors": [ - { - "name": "EasyDigitalDownloads", - "email": "contact@easydigitaldownloads.com" - }, - { - "name": "PublishPress", - "email": "help@publishpress.com" - }, - { - "name": "Alledia", - "email": "help@alledia.com" - } - ], - "description": "EDD Updates Handler for WordPress Plugins", - "keywords": [ - "edd", - "updates", - "wordpress" - ], - "support": { - "issues": "https://github.com/publishpress/EDD-SL-Plugin-Updater/issues", - "source": "https://github.com/publishpress/EDD-SL-Plugin-Updater/tree/v1.6.22" - }, - "time": "2022-09-23T19:16:06+00:00" - }, - { - "name": "alledia/wordpress-edd-license-integration", - "version": "v2.3.8", - "source": { - "type": "git", - "url": "https://github.com/publishpress/WordPress-EDD-License-Integration.git", - "reference": "dac5525596a2c919a576da9a5c45644fe6c2c2e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/publishpress/WordPress-EDD-License-Integration/zipball/dac5525596a2c919a576da9a5c45644fe6c2c2e5", - "reference": "dac5525596a2c919a576da9a5c45644fe6c2c2e5", - "shasum": "" - }, - "require": { - "alledia/edd-sl-plugin-updater": "^1.6", - "ext-json": "*", - "php": ">=5.6.20", - "pimple/pimple": "~3.2" - }, - "require-dev": { - "codeception/domain-assert": "^1.0", - "codeception/module-asserts": "^1.2", - "codeception/module-cli": "^1.0", - "codeception/module-db": "^1.0", - "codeception/module-filesystem": "^1.0", - "codeception/module-phpbrowser": "^1.0", - "codeception/module-webdriver": "^1.0", - "codeception/util-universalframework": "^1.0", - "lucatume/wp-browser": "^2.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "PublishPress\\EDD_License\\Core\\": "src/core/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "authors": [ - { - "name": "PublishPress", - "email": "help@publishpress.com" - }, - { - "name": "Alledia", - "email": "help@alledia.com" - }, - { - "name": "Anderson Grudtner Martins", - "email": "anderson@grudtner.me", - "homepage": "http://anderson.grudtner.me", - "role": "Lead Developer" - } - ], - "description": "EDD license integration library for WordPress plugins", - "keywords": [ - "edd", - "license", - "wordpress" - ], - "support": { - "issues": "https://github.com/publishpress/WordPress-EDD-License-Integration/issues", - "source": "https://github.com/publishpress/WordPress-EDD-License-Integration/tree/v2.3.8" - }, - "time": "2022-06-03T17:37:40+00:00" - }, { "name": "composer/installers", "version": "v1.0.6", @@ -207,35 +84,108 @@ "time": "2013-08-20T04:37:09+00:00" }, { - "name": "pimple/pimple", - "version": "v3.2.3", + "name": "publishpress/instance-protection", + "version": "2.0.1", "source": { "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32" + "url": "https://github.com/publishpress/library-instance-protection.git", + "reference": "4193f84a8a680bf4c0d40cc64976ddcadd92158a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32", - "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32", + "url": "https://api.github.com/repos/publishpress/library-instance-protection/zipball/4193f84a8a680bf4c0d40cc64976ddcadd92158a", + "reference": "4193f84a8a680bf4c0d40cc64976ddcadd92158a", "shasum": "" }, "require": { - "php": ">=5.3.0", - "psr/container": "^1.0" + "php": ">=7.2.5" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0-or-later" + ], + "authors": [ + { + "name": "PublishPress", + "email": "help@publishpress.com" + } + ], + "description": "Library for protecting WordPress plugins to run twice.", + "homepage": "http://publishpress.com/", + "keywords": [ + "wordpress plugin" + ], + "support": { + "issues": "https://github.com/publishpress/library-instance-protection/issues", + "source": "https://github.com/publishpress/library-instance-protection/tree/2.0.1" + }, + "time": "2023-04-18T17:50:38+00:00" + }, + { + "name": "publishpress/pimple-pimple", + "version": "3.5.0.9", + "source": { + "type": "git", + "url": "https://github.com/publishpress/library-pimple-pimple.git", + "reference": "71391cfc7817381d3c8942b01909755701fd57ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/publishpress/library-pimple-pimple/zipball/71391cfc7817381d3c8942b01909755701fd57ad", + "reference": "71391cfc7817381d3c8942b01909755701fd57ad", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "publishpress/psr-container": "^2.0.1.1" }, "require-dev": { - "symfony/phpunit-bridge": "^3.2" + "brianhenryie/strauss": "^0.14.0", + "codeception/module-asserts": "^1.0", + "codeception/module-cli": "^1.0", + "codeception/module-db": "^1.0", + "codeception/module-filesystem": "^1.0", + "codeception/module-phpbrowser": "^1.0", + "codeception/module-webdriver": "^1.0", + "codeception/util-universalframework": "^1.0", + "lucatume/wp-browser": "^3.1", + "pimple/pimple": "3.5.0", + "publishpress/codeception-extension-extended-copier": "^1.0", + "publishpress/version-loader-generator": "^1.0" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "3.2.x-dev" - } - }, - "autoload": { - "psr-0": { - "Pimple": "src/" + "generator": { + "lib-class-test": "class_exists('PublishPress\\Pimple\\Container')", + "action-initialize-priority": "-185", + "action-register-priority": "-200" + }, + "strauss": { + "target_directory": "lib", + "namespace_prefix": "PublishPress\\", + "classmap_prefix": "PublishPress_", + "constant_prefix": "PUBLISHPRESS_", + "include_author": "true", + "classmap_output": "true", + "packages": [ + "pimple/pimple", + "psr/container" + ], + "override_autoload": [], + "exclude_from_copy": { + "packages": [], + "namespaces": [], + "file_patterns": [] + }, + "exclude_from_prefix": { + "packages": [], + "namespaces": [], + "file_patterns": [] + }, + "namespace_replacement_patterns": [], + "delete_vendor_packages": true, + "delete_vendor_files": true } }, "notification-url": "https://packagist.org/downloads/", @@ -246,46 +196,87 @@ { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "PublishPress", + "email": "help@publishpress.com" } ], - "description": "Pimple, a simple Dependency Injection Container", - "homepage": "http://pimple.sensiolabs.org", + "description": "Pimple, a simple Dependency Injection Container, prefixed for PublishPress", + "homepage": "https://github.com/silexphp/Pimple/", "keywords": [ "container", - "dependency injection" + "dependency injection", + "publishpress" ], "support": { - "issues": "https://github.com/silexphp/Pimple/issues", - "source": "https://github.com/silexphp/Pimple/tree/master" + "issues": "https://github.com/publishpress/library-pimple-pimple/issues", + "source": "https://github.com/publishpress/library-pimple-pimple/tree/3.5.0.9" }, - "time": "2018-01-21T07:42:36+00:00" + "time": "2023-04-27T21:07:44+00:00" }, { - "name": "psr/container", - "version": "1.0.0", + "name": "publishpress/psr-container", + "version": "2.0.1.9", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "url": "https://github.com/publishpress/library-psr-container.git", + "reference": "bf3626cbf9bc4c46b936d7151148c3b43ea64bff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/publishpress/library-psr-container/zipball/bf3626cbf9bc4c46b936d7151148c3b43ea64bff", + "reference": "bf3626cbf9bc4c46b936d7151148c3b43ea64bff", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.2.5" + }, + "require-dev": { + "brianhenryie/strauss": "^0.14.0", + "codeception/module-asserts": "^1.0", + "codeception/module-cli": "^1.0", + "codeception/module-db": "^1.0", + "codeception/module-filesystem": "^1.0", + "codeception/module-phpbrowser": "^1.0", + "codeception/module-webdriver": "^1.0", + "codeception/util-universalframework": "^1.0", + "lucatume/wp-browser": "^3.1", + "psr/container": "2.0.1", + "publishpress/codeception-extension-extended-copier": "^1.0", + "publishpress/version-loader-generator": "^1.0" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" + "generator": { + "lib-class-test": "interface_exists('PublishPress\\Psr\\Container\\ContainerInterface')", + "action-initialize-priority": "-190", + "action-register-priority": "-200" + }, + "strauss": { + "target_directory": "lib", + "namespace_prefix": "PublishPress\\", + "classmap_prefix": "PublishPress_", + "constant_prefix": "PUBLISHPRESS_", + "include_author": "true", + "classmap_output": "true", + "packages": [ + "psr/container" + ], + "override_autoload": [], + "exclude_from_copy": { + "packages": [], + "namespaces": [], + "file_patterns": [] + }, + "exclude_from_prefix": { + "packages": [], + "namespaces": [], + "file_patterns": [] + }, + "namespace_replacement_patterns": [], + "delete_vendor_packages": true, + "delete_vendor_files": true } }, "notification-url": "https://packagist.org/downloads/", @@ -295,74 +286,77 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" + }, + { + "name": "PublishPress", + "email": "help@publishpress.com" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", + "description": "Common Container Interface (PHP FIG PSR-11), prefixed for PublishPress plugins", "homepage": "https://github.com/php-fig/container", "keywords": [ "PSR-11", "container", "container-interface", "container-interop", - "psr" + "psr", + "publishpress" ], "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/master" + "issues": "https://github.com/publishpress/library-psr-container/issues", + "source": "https://github.com/publishpress/library-psr-container/tree/2.0.1.9" }, - "time": "2017-02-14T16:28:37+00:00" + "time": "2023-04-27T21:09:00+00:00" }, { - "name": "publishpress/publishpress-instance-protection", - "version": "v1.0.3", + "name": "publishpress/vendor-locator-series", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/publishpress/publishpress-instance-protection.git", - "reference": "6a4e7038c95fac43264b1d61a5cdae2b1e3cc4ee" + "url": "https://github.com/publishpress/vendor-locator-series.git", + "reference": "a1c41fa91fb365978c8d3d3eea6a572d4446d157" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/publishpress/publishpress-instance-protection/zipball/6a4e7038c95fac43264b1d61a5cdae2b1e3cc4ee", - "reference": "6a4e7038c95fac43264b1d61a5cdae2b1e3cc4ee", + "url": "https://api.github.com/repos/publishpress/vendor-locator-series/zipball/a1c41fa91fb365978c8d3d3eea6a572d4446d157", + "reference": "a1c41fa91fb365978c8d3d3eea6a572d4446d157", "shasum": "" }, - "require": { - "php": ">=5.6.20" - }, "type": "library", + "autoload": { + "files": [ + "./includes.php" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "GPL-3.0-or-later" + "GPL-2.0-or-later" ], "authors": [ { "name": "PublishPress", - "email": "help@publishpress.com" + "email": "help@publishpress.com", + "homepage": "https://publishpress.com", + "role": "Developer" } ], - "description": "Library for protecting WordPress plugins to run twice.", - "homepage": "http://publishpress.com/", - "keywords": [ - "wordpress plugin" - ], "support": { - "issues": "https://github.com/publishpress/publishpress-instance-protection/issues", - "source": "https://github.com/publishpress/publishpress-instance-protection/tree/v1.0.3" + "source": "https://github.com/publishpress/vendor-locator-series/tree/1.0.0" }, - "time": "2022-10-28T16:14:03+00:00" + "time": "2023-05-04T02:30:11+00:00" }, { "name": "publishpress/wordpress-banners", "version": "v1.3.1", "source": { "type": "git", - "url": "https://github.com/publishpress/wordpress-banners.git", + "url": "https://github.com/publishpress/library-wordpress-banners.git", "reference": "bcb5f9f00973d53e2db027f9a05c059f18743fae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/publishpress/wordpress-banners/zipball/bcb5f9f00973d53e2db027f9a05c059f18743fae", + "url": "https://api.github.com/repos/publishpress/library-wordpress-banners/zipball/bcb5f9f00973d53e2db027f9a05c059f18743fae", "reference": "bcb5f9f00973d53e2db027f9a05c059f18743fae", "shasum": "" }, @@ -388,8 +382,8 @@ "description": "Display banners in admin pages of PublishPress Plugins.", "homepage": "http://publishpress.com/", "support": { - "issues": "https://github.com/publishpress/wordpress-banners/issues", - "source": "https://github.com/publishpress/wordpress-banners/tree/v1.3.1" + "issues": "https://github.com/publishpress/library-wordpress-banners/issues", + "source": "https://github.com/publishpress/library-wordpress-banners/tree/v1.3.1" }, "time": "2022-08-15T18:07:23+00:00" }, @@ -398,12 +392,12 @@ "version": "v1.1.19", "source": { "type": "git", - "url": "https://github.com/publishpress/wordpress-reviews.git", + "url": "https://github.com/publishpress/library-wordpress-reviews.git", "reference": "028e573eb7c5da2455a7a823cabbbe5e3f89ca9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/publishpress/wordpress-reviews/zipball/028e573eb7c5da2455a7a823cabbbe5e3f89ca9c", + "url": "https://api.github.com/repos/publishpress/library-wordpress-reviews/zipball/028e573eb7c5da2455a7a823cabbbe5e3f89ca9c", "reference": "028e573eb7c5da2455a7a823cabbbe5e3f89ca9c", "shasum": "" }, @@ -456,29 +450,29 @@ "wordpress plugin" ], "support": { - "issues": "https://github.com/publishpress/wordpress-reviews/issues", - "source": "https://github.com/publishpress/wordpress-reviews/tree/v1.1.19" + "issues": "https://github.com/publishpress/library-wordpress-reviews/issues", + "source": "https://github.com/publishpress/library-wordpress-reviews/tree/v1.1.19" }, "time": "2022-06-03T13:38:53+00:00" }, { "name": "publishpress/wordpress-version-notices", - "version": "1.1.4", + "version": "2.1.1", "source": { "type": "git", - "url": "https://github.com/publishpress/WordPress-Version-Notices.git", - "reference": "a46b552ac4cbec26d743307611e5dd8d56f80a57" + "url": "https://github.com/publishpress/library-wordpress-version-notices.git", + "reference": "64596e11a0b7f1358e5bf511d4dd87d8ba8730cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/publishpress/WordPress-Version-Notices/zipball/a46b552ac4cbec26d743307611e5dd8d56f80a57", - "reference": "a46b552ac4cbec26d743307611e5dd8d56f80a57", + "url": "https://api.github.com/repos/publishpress/library-wordpress-version-notices/zipball/64596e11a0b7f1358e5bf511d4dd87d8ba8730cd", + "reference": "64596e11a0b7f1358e5bf511d4dd87d8ba8730cd", "shasum": "" }, "require": { - "php": ">=5.6.20", - "pimple/pimple": "~3.2.0", - "psr/container": "~1.0.0" + "php": ">=7.2.5", + "publishpress/pimple-pimple": "^3.5.0.0", + "publishpress/psr-container": "^2.0.1.0" }, "require-dev": { "codeception/module-asserts": "^1.0", @@ -491,12 +485,16 @@ "codeception/util-universalframework": "^1.0", "composer/composer": "2.2.12", "lucatume/wp-browser": "^3", - "overtrue/phplint": "^2.1" + "overtrue/phplint": "^2.1", + "publishpress/version-loader-generator": "^1.0" }, "type": "library", - "autoload": { - "psr-4": { - "PPVersionNotices\\": "src/" + "extra": { + "generator": { + "lib-class-test": "class_exists('PublishPress\\WordpressVersionNotices\\ServicesProvider')", + "src-dir": "src", + "action-initialize-priority": "-150", + "action-register-priority": "-190" } }, "notification-url": "https://packagist.org/downloads/", @@ -513,10 +511,10 @@ ], "description": "Library for displaying version notices for Pro plugins in WordPress.", "support": { - "issues": "https://github.com/publishpress/WordPress-Version-Notices/issues", - "source": "https://github.com/publishpress/WordPress-Version-Notices/tree/1.1.4" + "issues": "https://github.com/publishpress/library-wordpress-version-notices/issues", + "source": "https://github.com/publishpress/library-wordpress-version-notices/tree/2.1.1" }, - "time": "2022-06-06T15:45:54+00:00" + "time": "2023-04-27T22:22:03+00:00" }, { "name": "sabre/vobject", @@ -799,16 +797,16 @@ }, { "name": "sirbrillig/phpcs-variable-analysis", - "version": "v2.11.9", + "version": "v2.11.16", "source": { "type": "git", "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git", - "reference": "62730888d225d55a613854b6a76fb1f9f57d1618" + "reference": "dc5582dc5a93a235557af73e523c389aac9a8e88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/62730888d225d55a613854b6a76fb1f9f57d1618", - "reference": "62730888d225d55a613854b6a76fb1f9f57d1618", + "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/dc5582dc5a93a235557af73e523c389aac9a8e88", + "reference": "dc5582dc5a93a235557af73e523c389aac9a8e88", "shasum": "" }, "require": { @@ -816,7 +814,7 @@ "squizlabs/php_codesniffer": "^3.5.6" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0", "phpcsstandards/phpcsdevcs": "^1.1", "phpstan/phpstan": "^1.7", "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.5 || ^7.0 || ^8.0 || ^9.0", @@ -853,20 +851,20 @@ "source": "https://github.com/sirbrillig/phpcs-variable-analysis", "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki" }, - "time": "2022-10-05T23:31:46+00:00" + "time": "2023-03-31T16:46:32+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.1", + "version": "3.7.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", "shasum": "" }, "require": { @@ -902,14 +900,15 @@ "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ "phpcs", - "standards" + "standards", + "static analysis" ], "support": { "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2022-06-18T07:21:10+00:00" + "time": "2023-02-22T23:07:41+00:00" }, { "name": "wp-coding-standards/wpcs", diff --git a/inc/utility-functions.php b/inc/utility-functions.php index 53f87ca6..d91008f2 100644 --- a/inc/utility-functions.php +++ b/inc/utility-functions.php @@ -14,263 +14,225 @@ function orgSeries_dir(){ } } -if(!function_exists('pps_os_version_requirement_notice')){ -function pps_os_version_requirement_notice() { -?> -
-

- ', - '' - ); - echo '
'; - printf( - esc_html__( - 'Most web hosts provide an easy path to update the php version on your website. We recommend updating to PHP 7 or greater. Before you update, you will want to make sure other plugins and your theme are compatible (see %1$sthis article for more info%2$s).', - 'organize-series' - ), - '', - '' - ); - ?> -

-

- -

-
-has_cap( 'manage_publishpress_series' ) ) { - $role->add_cap( 'manage_publishpress_series' ); - } +if (!function_exists('pp_series_upgrade_function')) { + //activation functions/codes + function pp_series_upgrade_function() + { + global $wpdb; + + if (!get_option('pp_series_2_7_1_upgraded')) { + if ( function_exists( 'get_role' ) ) { + $role = get_role( 'administrator' ); + if ( null !== $role && ! $role->has_cap( 'manage_publishpress_series' ) ) { + $role->add_cap( 'manage_publishpress_series' ); } - update_option('pp_series_2_7_1_upgraded', true); - } - - if (!get_option('pp_series_2_7_5_upgraded')) { - $settings = get_option('org_series_options'); - $settings = apply_filters('org_series_settings', $settings); - //add new series settings only if not fresh installation - if ($settings) { - $settings['automatic_series_part'] = 0; - update_option('org_series_options', $settings); - } - update_option('pp_series_2_7_5_upgraded', true); } - - if (!get_option('pp_series_2_8_0_upgraded')) { - $settings = get_option('org_series_options'); - $settings = apply_filters('org_series_settings', $settings); - //add new series settings only if not fresh installation - if ($settings) { - $settings['metabox_show_post_title_in_widget'] = 0; - $settings['metabox_show_series_part'] = 1; - $settings['metabox_show_add_new'] = 0; - update_option('org_series_options', $settings); - } - update_option('pp_series_2_8_0_upgraded', true); - } - - if (!get_option('pp_series_2_10_0_upgraded')) { - $settings = get_option('org_series_options'); - $settings = apply_filters('org_series_settings', $settings); - //add new series settings only if not fresh installation - if ($settings) { - $settings['limit_series_meta_to_single'] = 0; - update_option('org_series_options', $settings); - } - update_option('pp_series_2_10_0_upgraded', true); - } - - if (!get_option('pp_series_2_10_0_1_upgraded')) { - if (!$wpdb->query("SELECT `term_order` FROM `{$wpdb->terms}`")) { - $wpdb->query("ALTER TABLE `{$wpdb->terms}` ADD `term_order` INT (11) NOT NULL DEFAULT 0;"); - update_option('pp_series_2_10_0_1_upgraded', true); - } + update_option('pp_series_2_7_1_upgraded', true); } - + if (!get_option('pp_series_2_7_5_upgraded')) { + $settings = get_option('org_series_options'); + $settings = apply_filters('org_series_settings', $settings); + //add new series settings only if not fresh installation + if ($settings) { + $settings['automatic_series_part'] = 0; + update_option('org_series_options', $settings); + } + update_option('pp_series_2_7_5_upgraded', true); + } + + if (!get_option('pp_series_2_8_0_upgraded')) { + $settings = get_option('org_series_options'); + $settings = apply_filters('org_series_settings', $settings); + //add new series settings only if not fresh installation + if ($settings) { + $settings['metabox_show_post_title_in_widget'] = 0; + $settings['metabox_show_series_part'] = 1; + $settings['metabox_show_add_new'] = 0; + update_option('org_series_options', $settings); + } + update_option('pp_series_2_8_0_upgraded', true); + } + + if (!get_option('pp_series_2_10_0_upgraded')) { + $settings = get_option('org_series_options'); + $settings = apply_filters('org_series_settings', $settings); + //add new series settings only if not fresh installation + if ($settings) { + $settings['limit_series_meta_to_single'] = 0; + update_option('org_series_options', $settings); + } + update_option('pp_series_2_10_0_upgraded', true); + } + + if (!get_option('pp_series_2_10_0_1_upgraded')) { + if (!$wpdb->query("SELECT `term_order` FROM `{$wpdb->terms}`")) { + $wpdb->query("ALTER TABLE `{$wpdb->terms}` ADD `term_order` INT (11) NOT NULL DEFAULT 0;"); + update_option('pp_series_2_10_0_1_upgraded', true); } + } + + } +} - if (!function_exists('pp_series_locate_template')) { - /** - * Check if template exist in theme/child theme - * - * We wouldn't use wordpress locate_template() - * as it support theme compact which load - * default template for files like sidebar.php - * even if it doesn't exist in theme - * - * @param array $template - * @return void - */ - function pp_series_locate_template($template_names) - { - $located = false; - foreach ( (array) $template_names as $template_name ) { - if ( ! $template_name ) { - continue; - } - if ( file_exists( STYLESHEETPATH . '/' . $template_name ) ) { - $located = STYLESHEETPATH . '/' . $template_name; - break; - } elseif ( file_exists( TEMPLATEPATH . '/' . $template_name ) ) { - $located = TEMPLATEPATH . '/' . $template_name; - break; - } +if (!function_exists('pp_series_locate_template')) { + /** + * Check if template exist in theme/child theme + * + * We wouldn't use wordpress locate_template() + * as it support theme compact which load + * default template for files like sidebar.php + * even if it doesn't exist in theme + * + * @param array $template + * @return void + */ + function pp_series_locate_template($template_names) + { + $located = false; + foreach ( (array) $template_names as $template_name ) { + if ( ! $template_name ) { + continue; + } + if ( file_exists( STYLESHEETPATH . '/' . $template_name ) ) { + $located = STYLESHEETPATH . '/' . $template_name; + break; + } elseif ( file_exists( TEMPLATEPATH . '/' . $template_name ) ) { + $located = TEMPLATEPATH . '/' . $template_name; + break; } - - return $located; - } - } + return $located; - if (!function_exists('pp_series_is_block_theme')) { - /** - * Check if current active theme is block theme/support full site editing - * - * @return bool - */ - function pp_series_is_block_theme() - { - $is_block_theme = false; + } +} - if (function_exists('wp_is_block_theme') - && function_exists('block_template_part') - && wp_is_block_theme() - ) { - $is_block_theme = true; - } - return $is_block_theme; +if (!function_exists('pp_series_is_block_theme')) { + /** + * Check if current active theme is block theme/support full site editing + * + * @return bool + */ + function pp_series_is_block_theme() + { + $is_block_theme = false; + + if (function_exists('wp_is_block_theme') + && function_exists('block_template_part') + && wp_is_block_theme() + ) { + $is_block_theme = true; } - } + return $is_block_theme; + } +} - if (!function_exists('pp_series_get_block_theme_header')) { - /** - * Retreive block theme header - * - * @return string - */ - function pp_series_get_block_theme_header() - { - $block_theme_header = ''; - if (pp_series_is_block_theme()) { - $header_template_part = get_block_template(get_stylesheet() . '//header', 'wp_template_part'); - if ($header_template_part && isset($header_template_part->content)) { - $block_theme_header = do_blocks($header_template_part->content); - } +if (!function_exists('pp_series_get_block_theme_header')) { + /** + * Retreive block theme header + * + * @return string + */ + function pp_series_get_block_theme_header() + { + $block_theme_header = ''; + + if (pp_series_is_block_theme()) { + $header_template_part = get_block_template(get_stylesheet() . '//header', 'wp_template_part'); + if ($header_template_part && isset($header_template_part->content)) { + $block_theme_header = do_blocks($header_template_part->content); } - - return $block_theme_header; } - } + return $block_theme_header; + } +} - if (!function_exists('pp_series_get_block_theme_footer')) { - /** - * Retreive block theme footer - * - * @return string - */ - function pp_series_get_block_theme_footer() - { - $block_theme_footer = ''; - if (pp_series_is_block_theme()) { - $footer_template_part = get_block_template(get_stylesheet() . '//footer', 'wp_template_part'); - if ($footer_template_part && isset($footer_template_part->content)) { - $block_theme_footer = do_blocks($footer_template_part->content); - } +if (!function_exists('pp_series_get_block_theme_footer')) { + /** + * Retreive block theme footer + * + * @return string + */ + function pp_series_get_block_theme_footer() + { + $block_theme_footer = ''; + + if (pp_series_is_block_theme()) { + $footer_template_part = get_block_template(get_stylesheet() . '//footer', 'wp_template_part'); + if ($footer_template_part && isset($footer_template_part->content)) { + $block_theme_footer = do_blocks($footer_template_part->content); } - - return $block_theme_footer; } + + return $block_theme_footer; } +} - if (!function_exists('pp_series_format_block_theme_header')) { - /** - * Format block theme header - * - * @return void - */ - function pp_series_format_block_theme_header() - { - $fse_header = pp_series_get_block_theme_header(); - $fse_footer = pp_series_get_block_theme_footer();//we need to get footer as well before wp_head() call to enable fse css generator - ?> - - > - - - - - > - -
- + + > + + + + + > + +
+ -
- - - - +
+ + + + +} diff --git a/includes-core/Autoloader.php b/includes-core/Autoloader.php new file mode 100644 index 00000000..47bb7e9d --- /dev/null +++ b/includes-core/Autoloader.php @@ -0,0 +1,51 @@ +

'.__('Your WordPress version is too old. Publishpress Series 2.2 requires at least WordPress 3.0 to function correctly. Please update your blog via Tools > Upgrade.', 'organize-series').'

'; - echo esc_html(trim($msg)); - } - function maybe_fix_upgrade() { $version_chk = get_option('org_series_version'); if ( empty($version_chk) ) { //we got a problem this shouldn't be empty!! diff --git a/orgSeries-taxonomy.php b/orgSeries-taxonomy.php index fe0b118a..af40969d 100644 --- a/orgSeries-taxonomy.php +++ b/orgSeries-taxonomy.php @@ -494,15 +494,16 @@ function wp_set_post_series( $post, $update, $post_ID = 0, $series_id = array(), $settings = $orgseries->settings; $automatic_series_part = isset($settings['automatic_series_part']) ? (int)$settings['automatic_series_part'] : 0; + $post_series = is_array($_REQUEST['post_series']) ? $_REQUEST['post_series'][0] : $_REQUEST['post_series']; //set auto series part if part is empty if($automatic_series_part === 0 && isset($_REQUEST['action']) && in_array($_REQUEST['action'], ['editpost']) - && $_REQUEST['post_series'] > 0 + && $post_series > 0 && is_array($_REQUEST['series_part']) && count($_REQUEST['series_part']) === 1 - && empty($_REQUEST['series_part'][$_REQUEST['post_series']]) + && empty($_REQUEST['series_part'][$post_series]) ) { $automatic_series_part = 1; } diff --git a/orgSeries.php b/orgSeries.php index 71177848..27b1eb18 100644 --- a/orgSeries.php +++ b/orgSeries.php @@ -3,13 +3,13 @@ * Plugin Name: PublishPress Series * Plugin URI: https://publishpress.com/publishpress-series/ * Description: PublishPress Series allows you to group content together into a series. This is ideal for magazines, newspapers, short-story writers, teachers, comic artists, or anyone who writes multiple posts on the same topic. - * Version: 2.10.1 + * Version: 2.11.0 * Author: PublishPress * Author URI: https://publishpress.com/ * Text Domain: organize-series * Domain Path: /languages - * Min WP Version: 4.9.7 - * Requires PHP: 5.6.20 + * Requires at least: 5.5 + * Requires PHP: 7.2.5 * License: GPLv3 * * Copyright (c) 2022 PublishPress @@ -54,9 +54,21 @@ */ -$includeFilebRelativePath = '/publishpress/publishpress-instance-protection/include.php'; -if (file_exists(__DIR__ . '/vendor' . $includeFilebRelativePath)) { - require_once __DIR__ . '/vendor' . $includeFilebRelativePath; +global $wp_version; + +$min_php_version = '7.2.5'; +$min_wp_version = '5.5'; + +$invalid_php_version = version_compare(phpversion(), $min_php_version, '<'); +$invalid_wp_version = version_compare($wp_version, $min_wp_version, '<'); + +if ($invalid_php_version || $invalid_wp_version) { + return; +} + +$includeFileRelativePath = '/publishpress/publishpress-instance-protection/include.php'; +if (file_exists(__DIR__ . '/vendor' . $includeFileRelativePath)) { + require_once __DIR__ . '/vendor' . $includeFileRelativePath; } if (class_exists('PublishPressInstanceProtection\\Config')) { @@ -68,79 +80,88 @@ $pluginChecker = new PublishPressInstanceProtection\InstanceChecker($pluginCheckerConfig); } -require_once (dirname(__FILE__) . '/inc/utility-functions.php'); -require_once (dirname(__FILE__) . '/includes-core/functions.php'); -register_activation_hook( __FILE__, 'pp_series_core_activation' ); - -if (!defined('ORG_SERIES_VERSION')) { - define('ORG_SERIES_VERSION', '2.10.1'); //the current version of the plugin - define( 'SERIES_FILE_PATH', __FILE__ ); - define( 'SERIES_PATH_URL', plugins_url('', __FILE__).'/' ); - define('SERIES_LOC', plugins_url('', __FILE__).'/' ); //the uri of the orgSeries files. - define('SERIES_PATH', plugin_dir_path(__FILE__)); //the path of the orgSeries file - //note 'SERIES_QUERY_VAR' is now defined in orgSeries class. - define('SERIES_TOC_QUERYVAR', 'series-toc'); //get/post variable name for querying series-toc from WP - define('SERIES_SEARCHURL','search'); //local search URL (from mod_rewrite_rules) - define('SERIES_PART_KEY', '_series_part'); //the default key for the Custom Field that distinguishes what part a post is in the series it belongs to. The underscore makes this hidden on edit post/page screens. - define('SPOST_SHORTTITLE_KEY', '_spost_short_title'); - define('SERIES_REWRITERULES','1'); //flag to determine if plugin can change WP rewrite rules. - define ('PUBLISHPRESS_SERIES_ABSPATH', __DIR__); - define('SERIES_DIR' , orgSeries_dir()); //the name of the directory that orgSeries files are located. +//composer autoload +$autoloadPath = __DIR__ . '/vendor/autoload.php'; +if (file_exists($autoloadPath)) { + require_once $autoloadPath; } -$pro_active = false; +require_once PUBLISHPRESS_SERIES_VENDOR_PATH . '/publishpress/psr-container/lib/include.php'; +require_once PUBLISHPRESS_SERIES_VENDOR_PATH . '/publishpress/pimple-pimple/lib/include.php'; +require_once PUBLISHPRESS_SERIES_VENDOR_PATH . '/publishpress/wordpress-version-notices/src/include.php'; -foreach ((array)get_option('active_plugins') as $plugin_file) { - if (false !== strpos($plugin_file, 'publishpress-series-pro.php')) { - $pro_active = true; - break; +add_action('plugins_loaded', function() { + if (! class_exists('PublishPress\\OrganizeSeries\\Autoloader')) { + require_once __DIR__ . '/includes-core/Autoloader.php'; } -} -if (!$pro_active && is_multisite()) { - foreach (array_keys((array)get_site_option('active_sitewide_plugins')) as $plugin_file) { + $autoloader = new PublishPress\OrganizeSeries\Autoloader(); + $autoloader->register(); + + require_once (dirname(__FILE__) . '/inc/utility-functions.php'); + require_once (dirname(__FILE__) . '/includes-core/functions.php'); + register_activation_hook( __FILE__, 'pp_series_core_activation' ); + + if (!defined('ORG_SERIES_VERSION')) { + define('ORG_SERIES_VERSION', '2.11.0'); //the current version of the plugin + define( 'SERIES_FILE_PATH', __FILE__ ); + define( 'SERIES_PATH_URL', plugins_url('', __FILE__).'/' ); + define('SERIES_LOC', plugins_url('', __FILE__).'/' ); //the uri of the orgSeries files. + define('SERIES_PATH', plugin_dir_path(__FILE__)); //the path of the orgSeries file + //note 'SERIES_QUERY_VAR' is now defined in orgSeries class. + define('SERIES_TOC_QUERYVAR', 'series-toc'); //get/post variable name for querying series-toc from WP + define('SERIES_SEARCHURL','search'); //local search URL (from mod_rewrite_rules) + define('SERIES_PART_KEY', '_series_part'); //the default key for the Custom Field that distinguishes what part a post is in the series it belongs to. The underscore makes this hidden on edit post/page screens. + define('SPOST_SHORTTITLE_KEY', '_spost_short_title'); + define('SERIES_REWRITERULES','1'); //flag to determine if plugin can change WP rewrite rules. + define ('PUBLISHPRESS_SERIES_ABSPATH', __DIR__); + define('SERIES_DIR' , orgSeries_dir()); //the name of the directory that orgSeries files are located. + } + + $pro_active = false; + + foreach ((array)get_option('active_plugins') as $plugin_file) { if (false !== strpos($plugin_file, 'publishpress-series-pro.php')) { $pro_active = true; break; } } -} -if ($pro_active) { - add_filter( - 'plugin_row_meta', - function($links, $file) - { - if ($file == plugin_basename(__FILE__)) { - $links[]= __('This plugin can be deleted.', 'press-permit-core'); + if (!$pro_active && is_multisite()) { + foreach (array_keys((array)get_site_option('active_sitewide_plugins')) as $plugin_file) { + if (false !== strpos($plugin_file, 'publishpress-series-pro.php')) { + $pro_active = true; + break; } + } + } - return $links; - }, - 10, 2 - ); -} + if ($pro_active) { + add_filter( + 'plugin_row_meta', + function($links, $file) + { + if ($file == plugin_basename(__FILE__)) { + $links[]= __('This plugin can be deleted.', 'press-permit-core'); + } + + return $links; + }, + 10, 2 + ); + } -if (defined('PPSERIES_FILE') || $pro_active) { - return; -} + if (defined('PPSERIES_FILE') || $pro_active) { + return; + } + + define ('PPSERIES_FILE', __FILE__ ); + define ('PPSERIES_PATH', plugin_dir_path(__FILE__)); + define ('PPSERIES_URL', plugin_dir_url(__FILE__)); + define ('PPSERIES_BASE_NAME', plugin_basename(__FILE__)); -define ('PPSERIES_FILE', __FILE__ ); -define ('PPSERIES_PATH', plugin_dir_path(__FILE__)); -define ('PPSERIES_URL', plugin_dir_url(__FILE__)); -define ('PPSERIES_BASE_NAME', plugin_basename(__FILE__)); - -//check for php version requirements -if (version_compare(PHP_VERSION, '5.6') === -1) { - /** - * Show notices about Publishpress Series requiring PHP 5.6 or higher. - */ - add_action('admin_notices', 'pps_os_version_requirement_notice'); -} else { - //composer autolaod - require __DIR__ . '/vendor/autoload.php'; //new bootstrapping, eventually this will replace all of the above. require PPSERIES_PATH . 'bootstrap.php'; - add_action('plugins_loaded', 'pp_series_free_version_init'); -} + pp_series_free_version_init(); +}, -10); diff --git a/package-lock.json b/package-lock.json index 0fd483dc..997b1344 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "node-sass": "^7.0.0", "postcss-loader": "^2.1.6", "uglifyjs-webpack-plugin": "^0.4.6", - "webpack": "^5.53.0", + "webpack": "^5.76.0", "webpack-combine-loaders": "^2.0.4", "webpack-merge": "^4.2.2" } @@ -151,9 +151,9 @@ } }, "node_modules/@types/eslint": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.0.tgz", - "integrity": "sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A==", + "version": "8.21.2", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.21.2.tgz", + "integrity": "sha512-EMpxUyystd3uZVByZap1DACsMXvb82ypQnGn89e1Y0a+LYu3JJscUd/gqhRsVFDkaD2MIiWo0MT8EfXr3DGRKw==", "dev": true, "dependencies": { "@types/estree": "*", @@ -161,9 +161,9 @@ } }, "node_modules/@types/eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", "dev": true, "dependencies": { "@types/eslint": "*", @@ -171,9 +171,9 @@ } }, "node_modules/@types/estree": { - "version": "0.0.50", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", - "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", "dev": true }, "node_modules/@types/json-schema": { @@ -382,9 +382,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", - "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1729,9 +1729,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz", - "integrity": "sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==", + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", + "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -1760,9 +1760,9 @@ } }, "node_modules/es-module-lexer": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.7.1.tgz", - "integrity": "sha512-MgtWFl5No+4S3TmhDmCz2ObFGm6lEpTnzbQi+Dd+pw4mlTIZTmM2iAs5gRlmx5zS9luzobCSBSI90JM/1/JgOw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", "dev": true }, "node_modules/escalade": { @@ -2109,9 +2109,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, "node_modules/har-schema": { @@ -4564,9 +4564,9 @@ } }, "node_modules/watchpack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz", - "integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "dev": true, "dependencies": { "glob-to-regexp": "^0.4.1", @@ -4577,35 +4577,35 @@ } }, "node_modules/webpack": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.53.0.tgz", - "integrity": "sha512-RZ1Z3z3ni44snoWjfWeHFyzvd9HMVYDYC5VXmlYUT6NWgEOWdCNpad5Fve2CzzHoRED7WtsKe+FCyP5Vk4pWiQ==", + "version": "5.76.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz", + "integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==", "dev": true, "dependencies": { - "@types/eslint-scope": "^3.7.0", - "@types/estree": "^0.0.50", + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/wasm-edit": "1.11.1", "@webassemblyjs/wasm-parser": "1.11.1", - "acorn": "^8.4.1", + "acorn": "^8.7.1", "acorn-import-assertions": "^1.7.6", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.8.0", - "es-module-lexer": "^0.7.1", + "enhanced-resolve": "^5.10.0", + "es-module-lexer": "^0.9.0", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.4", - "json-parse-better-errors": "^1.0.2", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^3.1.0", "tapable": "^2.1.1", "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.2.0", - "webpack-sources": "^3.2.0" + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" }, "bin": { "webpack": "bin/webpack.js" @@ -4730,9 +4730,9 @@ } }, "node_modules/webpack/node_modules/webpack-sources": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.1.tgz", - "integrity": "sha512-t6BMVLQ0AkjBOoRTZgqrWm7xbXMBzD+XDq2EZ96+vMfn3qKgsvdXZhbPZ4ElUOpdv4u+iiGe+w3+J75iy/bYGA==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", "dev": true, "engines": { "node": ">=10.13.0" @@ -5125,9 +5125,9 @@ } }, "@types/eslint": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.0.tgz", - "integrity": "sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A==", + "version": "8.21.2", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.21.2.tgz", + "integrity": "sha512-EMpxUyystd3uZVByZap1DACsMXvb82ypQnGn89e1Y0a+LYu3JJscUd/gqhRsVFDkaD2MIiWo0MT8EfXr3DGRKw==", "dev": true, "requires": { "@types/estree": "*", @@ -5135,9 +5135,9 @@ } }, "@types/eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", "dev": true, "requires": { "@types/eslint": "*", @@ -5145,9 +5145,9 @@ } }, "@types/estree": { - "version": "0.0.50", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", - "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", "dev": true }, "@types/json-schema": { @@ -5353,9 +5353,9 @@ "dev": true }, "acorn": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", - "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true }, "acorn-import-assertions": { @@ -6571,9 +6571,9 @@ "dev": true }, "enhanced-resolve": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz", - "integrity": "sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==", + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", + "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", "dev": true, "requires": { "graceful-fs": "^4.2.4", @@ -6596,9 +6596,9 @@ } }, "es-module-lexer": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.7.1.tgz", - "integrity": "sha512-MgtWFl5No+4S3TmhDmCz2ObFGm6lEpTnzbQi+Dd+pw4mlTIZTmM2iAs5gRlmx5zS9luzobCSBSI90JM/1/JgOw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", "dev": true }, "escalade": { @@ -6859,9 +6859,9 @@ } }, "graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, "har-schema": { @@ -8817,9 +8817,9 @@ } }, "watchpack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz", - "integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "dev": true, "requires": { "glob-to-regexp": "^0.4.1", @@ -8827,35 +8827,35 @@ } }, "webpack": { - "version": "5.53.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.53.0.tgz", - "integrity": "sha512-RZ1Z3z3ni44snoWjfWeHFyzvd9HMVYDYC5VXmlYUT6NWgEOWdCNpad5Fve2CzzHoRED7WtsKe+FCyP5Vk4pWiQ==", + "version": "5.76.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz", + "integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==", "dev": true, "requires": { - "@types/eslint-scope": "^3.7.0", - "@types/estree": "^0.0.50", + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/wasm-edit": "1.11.1", "@webassemblyjs/wasm-parser": "1.11.1", - "acorn": "^8.4.1", + "acorn": "^8.7.1", "acorn-import-assertions": "^1.7.6", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.8.0", - "es-module-lexer": "^0.7.1", + "enhanced-resolve": "^5.10.0", + "es-module-lexer": "^0.9.0", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.4", - "json-parse-better-errors": "^1.0.2", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^3.1.0", "tapable": "^2.1.1", "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.2.0", - "webpack-sources": "^3.2.0" + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" }, "dependencies": { "ajv": { @@ -8914,9 +8914,9 @@ } }, "webpack-sources": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.1.tgz", - "integrity": "sha512-t6BMVLQ0AkjBOoRTZgqrWm7xbXMBzD+XDq2EZ96+vMfn3qKgsvdXZhbPZ4ElUOpdv4u+iiGe+w3+J75iy/bYGA==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", "dev": true } } diff --git a/package.json b/package.json index 73ead1d8..ed2bb51b 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "node-sass": "^7.0.0", "postcss-loader": "^2.1.6", "uglifyjs-webpack-plugin": "^0.4.6", - "webpack": "^5.53.0", + "webpack": "^5.76.0", "webpack-combine-loaders": "^2.0.4", "webpack-merge": "^4.2.2" } diff --git a/readme.txt b/readme.txt index 4e9be5af..b3c20188 100644 --- a/readme.txt +++ b/readme.txt @@ -2,10 +2,10 @@ Contributors: publishpress, kevinB, stevejburge, andergmartins, olatechpro Author: publishpress Tags: issue, series, magazine, newspaper, publication -Requires at least: 4.7 -Requires PHP: 5.6 -Tested up to: 6.1 -Stable tag: 2.10.1 +Requires at least: 5.5 +Requires PHP: 7.2.5 +Tested up to: 6.2 +Stable tag: 2.11.0 License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -89,14 +89,15 @@ The Pro version of PublishPress Series allows you to add posts to more than one The Pro versions of the PublishPress plugins are well worth your investment. The Pro versions have extra features and faster support. [Click here to join PublishPress](https://publishpress.com/pricing/). -Join PublishPress and you'll get access to these Pro plugins: +Join PublishPress and you'll get access to these nine Pro plugins: * [PublishPress Authors Pro](https://publishpress.com/authors) allows you to add multiple authors and guest authors to WordPress posts. * [PublishPress Blocks Pro](https://publishpress.com/blocks) has everything you need to build professional websites with the WordPress block editor. * [PublishPress Capabilities Pro](https://publishpress.com/capabilities) is the plugin to manage your WordPress user roles, permissions, and capabilities. * [PublishPress Checklists Pro](https://publishpress.com/checklists) enables you to define tasks that must be completed before content is published. +* [PublishPress Future Pro](https://publishpress.com/future) is the plugin for scheduling changes to your posts. * [PublishPress Permissions Pro](https://publishpress.com/permissions) is the plugin for advanced WordPress permissions. -* [PublishPress Pro](https://publishpress.com/publishpress) is the plugin for managing and scheduling WordPress content. +* [PublishPress Planner Pro](https://publishpress.com/publishpress) is the plugin for managing and scheduling WordPress content. * [PublishPress Revisions Pro](https://publishpress.com/revisions) allows you to update your published pages with teamwork and precision. * [PublishPress Series Pro](https://publishpress.com/series) enables you to group content together into a series @@ -173,6 +174,13 @@ Yes, Publishpress Series introduces a new taxonomy "series". Thanks to the rich == Changelog == +v2.11.0 - 2023-05-18 +* Changed: Replaced Pimple library with a prefixed version of the library to avoid conflicts with other plugins; +* Changed: Replaced Psr/Container library with a prefixed version of the library to avoid conflicts with other plugins; +* Changed: Change min PHP version to 7.2.5. If not compatible, the plugin will not execute; +* Changed: Change min WP version to 5.5. If not compatible, the plugin will not execute; +* Changed: Updated internal libraries to latest versions; + v2.10.1- 2023-01-04 * Update: Added new token %post_title_short% and %post_title_short_linked%, #523 * Fixed: %post_title_list_short% not working, #523 diff --git a/src/application/Container.php b/src/application/Container.php index 77b8867f..99d111ae 100644 --- a/src/application/Container.php +++ b/src/application/Container.php @@ -20,7 +20,7 @@ use OrganizeSeries\domain\model\SingleNoticeCollection; use OrganizeSeries\domain\services\admin\LicenseKeyFormManager; use OrganizeSeries\domain\services\AssetRegistry; -use Pimple\Container as PimpleContainer; +use PublishPress\Pimple\Container as PimpleContainer; class Container { @@ -170,4 +170,4 @@ public function registerParameter($name, $value, $allow_overwrite = false) { ? $this->container->protect($value) : $value; } -} \ No newline at end of file +} diff --git a/src/application/Root.php b/src/application/Root.php index e3ced41b..d9d82e51 100644 --- a/src/application/Root.php +++ b/src/application/Root.php @@ -8,7 +8,7 @@ use OrganizeSeries\domain\Meta; use OrganizeSeries\domain\model\ClassOrInterfaceFullyQualifiedName; use OrganizeSeries\domain\services\ExtensionsRegistry; -use Pimple\Container as PimpleContainer; +use PublishPress\Pimple\Container as PimpleContainer; /** * Root @@ -157,4 +157,4 @@ function($container) use ($bootstrap_fully_qualified_class_name) { ); self::container()->make($bootstrap_class); } -} \ No newline at end of file +} diff --git a/src/libraries/edd/PluginUpdater.php b/src/libraries/edd/PluginUpdater.php index e0a0ea57..99bea2d7 100644 --- a/src/libraries/edd/PluginUpdater.php +++ b/src/libraries/edd/PluginUpdater.php @@ -330,9 +330,6 @@ public function http_request_args( $args, $url ) { * @return false|object */ private function api_request( $_action, $_data ) { - - global $wp_version; - $data = array_merge( $this->api_data, $_data ); if ( $data['slug'] != $this->slug ) { @@ -490,4 +487,4 @@ private function verify_ssl() { return (bool) apply_filters( 'edd_sl_api_request_verify_ssl', true, $this ); } -} \ No newline at end of file +}