Skip to content

Commit

Permalink
Merge pull request #777 from publishpress/master
Browse files Browse the repository at this point in the history
sync master to development
  • Loading branch information
richaferry authored Sep 25, 2024
2 parents 86fb736 + 9892db8 commit 81b8d96
Show file tree
Hide file tree
Showing 9 changed files with 135 additions and 112 deletions.
170 changes: 85 additions & 85 deletions composer.lock

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions core/Requirement/Image_alt_count.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ class Image_alt_count extends Base_counter
*/
public function init_language()
{
$this->lang['label'] = __('Number of character in alt text for all images', 'publishpress-checklists');
$this->lang['label_settings'] = __('Number of character in alt text for all images', 'publishpress-checklists');
$this->lang['label_min_singular'] = __('Minimum of %d character in alt text for all images', 'publishpress-checklists');
$this->lang['label_min_plural'] = __('Minimum of %d characters in alt text for all images', 'publishpress-checklists');
$this->lang['label_max_singular'] = __('Maximum of %d character in alt text for all images', 'publishpress-checklists');
$this->lang['label_max_plural'] = __('Maximum of %d characters in alt text for all images', 'publishpress-checklists');
$this->lang['label_exact_singular'] = __('%d character in alt text for all images', 'publishpress-checklists');
$this->lang['label_exact_plural'] = __('%d characters in alt text for all images', 'publishpress-checklists');
$this->lang['label_between'] = __('Between %d and %d characters in alt text for all images', 'publishpress-checklists');
$this->lang['label'] = __('Number of characters in Alt text', 'publishpress-checklists');
$this->lang['label_settings'] = __('Number of characters in Alt text', 'publishpress-checklists');
$this->lang['label_min_singular'] = __('Minimum of %d character in Alt text', 'publishpress-checklists');
$this->lang['label_min_plural'] = __('Minimum of %d characters in Alt text', 'publishpress-checklists');
$this->lang['label_max_singular'] = __('Maximum of %d character in Alt text', 'publishpress-checklists');
$this->lang['label_max_plural'] = __('Maximum of %d characters in Alt text', 'publishpress-checklists');
$this->lang['label_exact_singular'] = __('%d character in Alt text', 'publishpress-checklists');
$this->lang['label_exact_plural'] = __('%d characters in Alt text', 'publishpress-checklists');
$this->lang['label_between'] = __('Between %d and %d characters in Alt text', 'publishpress-checklists');
}

/**
Expand Down
4 changes: 0 additions & 4 deletions dev-workspace/docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,3 @@ services:
- ../cache/.composer/cache:/root/.composer/cache
- ../cache/.composer/auth.json:/root/.composer/auth.json
- /var/run/docker.sock:/var/run/docker.sock
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
environment:
- DOCKER_HOST_IP=${DOCKER_HOST_IP}
4 changes: 2 additions & 2 deletions lib/vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '219eb8d551babbe80e6a7e7dccc7f609c2914fe5',
'reference' => 'f41bb211318dfb9f5dc91b8f277c8ca7b06a8e6f',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '219eb8d551babbe80e6a7e7dccc7f609c2914fe5',
'reference' => 'f41bb211318dfb9f5dc91b8f277c8ca7b06a8e6f',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down
20 changes: 14 additions & 6 deletions modules/checklists/checklists.php
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,12 @@ public function handle_post_meta_boxes()

$supported_post_types = $this->getSelectedPostTypes();

// Hide checklist meta box from acf plugin
$excludeKey = 'acf-field-group';
if (array_key_exists($excludeKey, $supported_post_types)) {
unset($supported_post_types[$excludeKey]);
}

foreach ($supported_post_types as $post_type => $label) {
add_meta_box(self::METADATA_TAXONOMY, $title, [$this, 'display_meta_box'], $post_type, 'side', 'high');
}
Expand All @@ -702,6 +708,8 @@ protected function getSelectedPostTypes()
foreach ($postTypeSlugs as $slug) {
$postType = get_post_type_object($slug);
if (is_object($postType)) {
// Need to overide the value to prevent user confusion
if ($slug === 'acf-field-group') $postType->label = 'ACF';
$postTypes[$slug] = $postType->label;
}
}
Expand Down Expand Up @@ -775,12 +783,12 @@ public function display_meta_box($post)
'Not required, but important: ',
'publishpress-checklists'
),
'show_warning_icon_submit' => Base_requirement::VALUE_YES === $legacyPlugin->settings->module->options->show_warning_icon_submit,
'disable_publish_button' => Base_requirement::VALUE_YES === $legacyPlugin->settings->module->options->disable_publish_button,
'title_warning_icon' => esc_html__('One or more items in the checklist are not completed'),
'is_gutenberg_active' => $this->is_gutenberg_active(),
'user_can_manage_options' => current_user_can('manage_options'),
'configure_url' => esc_url($this->get_admin_link()),
'show_warning_icon_submit' => Base_requirement::VALUE_YES === $legacyPlugin->settings->module->options->show_warning_icon_submit,
'disable_publish_button' => Base_requirement::VALUE_YES === $legacyPlugin->settings->module->options->disable_publish_button,
'title_warning_icon' => esc_html__('One or more items in the checklist are not completed'),
'is_gutenberg_active' => $this->is_gutenberg_active(),
'user_can_manage_options' => current_user_can('manage_options'),
'configure_url' => esc_url($this->get_admin_link()),
]
);

Expand Down
8 changes: 5 additions & 3 deletions modules/checklists/templates/global-checklists.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
return $requirement->group === $key;
});

if (empty($has_requirements) && $key !== 'custom') {
continue;
} ?>
// Skip if the tab has no requirements or is not the custom tab
if (empty($has_requirements) && $key !== 'custom') continue;
?>
<li class="<?php echo esc_attr($post_type_key); ?>">
<a data-tab="<?php echo esc_attr($key); ?>"
data-post-type="<?php echo esc_attr($post_type_key); ?>"
Expand Down Expand Up @@ -71,6 +71,8 @@
foreach ($context['tabs'][$post_type_key] as $group => $tabInfo) :
foreach ($context['requirements'] as $post_type => $post_type_requirements) : ?>
<?php
// Skip if the post type is not the current one
if ($post_type !== $post_type_key) continue;
$group_has_requirements = false;
?>
<?php foreach ($post_type_requirements as $requirement) : ?>
Expand Down
1 change: 1 addition & 0 deletions modules/settings/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public function __construct()
'post_types' => [
'post' => 'on',
],
'disable_publish_button' => Base_requirement::VALUE_NO,
'show_warning_icon_submit' => Base_requirement::VALUE_YES,
'openai_api_key' => '',
],
Expand Down
4 changes: 2 additions & 2 deletions publishpress-checklists.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Description: Add support for checklists in WordPress
* Author: PublishPress
* Author URI: https://publishpress.com
* Version: 2.13.0
* Version: 2.14.0
* Text Domain: publishpress-checklists
* Domain Path: /languages
* Requires at least: 5.5
Expand Down Expand Up @@ -61,7 +61,7 @@
if (!defined('PPCH_LOADED')) {
define('PPCH_LOADED', 1);
define('PPCH_PATH_BASE', plugin_dir_path(__FILE__));
define('PPCH_VERSION', '2.13.0');
define('PPCH_VERSION', '2.14.0');
define('PPCH_FILE', __DIR__ . '/publishpress-checklists.php');
define('PPCH_MODULES_PATH', PPCH_PATH_BASE . '/modules');
define('PPCH_RELATIVE_PATH', 'publishpress-checklists');
Expand Down
18 changes: 17 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Tags: approval, checklist, maximum, minimum, requirement, task, OpenAI, featured
Requires at least: 5.5
Requires PHP: 7.2.5
Tested up to: 6.6
Stable tag: 2.13.0
Stable tag: 2.14.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -311,6 +311,22 @@ With the PublishPress Checklists plugin, you can require that site's content mee
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

= [2.14.0] - 25 September 2024 =

* Added: Taxonomies tab #747
* Added: Minimum number of characters for alt text #616
* Added: ACF (Advanced Custom Fields) integration support #639
* Added: Option to specify the number of images in a post #729
* Fixed: Renamed field group to be compatible with ACF #774
* Fixed: Hide checklist from ACF fields #770
* Fixed: Tiny text change for new alt text #766
* Fixed: Undefined disable_publish_button issue
* Fixed: Failed save rule
* Fixed: PHP 8.2 deprecated message #752
* Fixed: Character count issue #740
* Updated: Composer dependencies
* Updated: Bumped Webpack from 5.91.0 to 5.94.0

= [2.13.0] - 28 August 2024 =

* Added: Class FieldsTabs to support modifying tabs from the Pro version #739
Expand Down

0 comments on commit 81b8d96

Please sign in to comment.