Skip to content

Commit

Permalink
Merge pull request #746 from publishpress/release-2.13.0
Browse files Browse the repository at this point in the history
* Update phplint workflow to use the dev-workspace

* chore/add-absolute-path-dev-workspace (#734)

* fix/#730_checklists_design_fails_on_smaller_screens (#736)

* fix responsive issue on checklists screen

* add checklist selector

* fix/code_scanning_alerts_and_minor_ui (#737)

* fix code scanning alert

* change taxonomies_count to categories

* fix minor ui

* fix csa

* fix/#301_url_requirement_is_broken_by_ellipsis_colon_and_other_characters (#733)

* features/#728_add_option_to_disable_publish_button (#735)

* add disable publish button option

* add lockPostSaving

* fix missing var gutenbergLockName for lockPostSaving (#738)

* add class FieldsTabs for support modify tab from pro version (#739)

* composer update

* bump version to 2.13.0 & update changelog

---------

Co-authored-by: Anderson Martins <anderson@publishpress.com>
Co-authored-by: Riza Maulana Ardiyanto <83811723+rizaardiyanto1412@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 28, 2024
2 parents efaf331 + f1f99f5 commit 17b1ac7
Show file tree
Hide file tree
Showing 21 changed files with 2,573 additions and 2,291 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/phplint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,13 @@ jobs:
phplint:

runs-on: ubuntu-latest
container:
image: publishpress/dev-workspace-terminal:checklists-free-2
options: --privileged

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
extensions: intl
env:
COMPOSER_TOKEN: ${{ secrets.COMPOSER_TOKEN }}

- name: Update the composer.lock file
run: composer update --lock
uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate
Expand Down
29 changes: 15 additions & 14 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"printWidth": 120,
"tabWidth": 4,
"useTabs": false,
"semi": true,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "always",
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "css",
"endOfLine": "lf"
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 120,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false
}
34 changes: 17 additions & 17 deletions composer.lock

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

6 changes: 6 additions & 0 deletions core/Requirement/Custom_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ class Custom_item extends Base_multiple implements Interface_required
*/
protected $title;

/**
* The name of the group, used for the tabs
*
* @var string
*/
public $group = 'custom';

/**
* The constructor. It adds the action to load the requirement.
Expand Down
7 changes: 7 additions & 0 deletions core/Requirement/Openai_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ class Openai_item extends Base_simple implements Interface_required
*/
protected $title;

/**
* The name of the group, used for the tabs
*
* @var string
*/
public $group = 'custom';

public $require_button;

/**
Expand Down
7 changes: 7 additions & 0 deletions core/Requirement/Taxonomies_count.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ class Taxonomies_count extends Base_counter implements Interface_parametrized
*/
public $name = 'taxonomies_count';

/**
* The name of the group, used for the tabs
*
* @var string
*/
public $group = 'categories';

/**
* @var WP_Taxonomy
*/
Expand Down
80 changes: 80 additions & 0 deletions core/Utils/FieldsTabs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?php
/**
* @package PublishPress\Checklists
* @author PublishPress <help@publishpress.com>
* @copyright copyright (C) 2019 PublishPress. All rights reserved.
* @license GPLv2 or later
* @since 1.0.0
*/

namespace PublishPress\Checklists\Core\Utils;

class FieldsTabs {
private static $instance = null;
private $fields_tabs;

private function __construct() {
$this->fields_tabs = array(
"title" => array(
"label" => "Title",
"icon" => "dashicons dashicons-edit"
),
"content" => array(
"label" => "Content",
"icon" => "dashicons dashicons-welcome-write-blog"
),
"images" => array(
"label" => "Images",
"icon" => "dashicons dashicons-format-image"
),
"links" => array(
"label" => "Links",
"icon" => "dashicons dashicons-admin-links"
),
"categories" => array(
"label" => "Categories",
"icon" => "dashicons dashicons-category"
),
"tags" => array(
"label" => "Tags",
"icon" => "dashicons dashicons-tag"
),
"custom" => array(
"label" => "Custom",
"icon" => "dashicons dashicons-admin-generic"
)
);
}

public static function getInstance() {
if (self::$instance === null) {
self::$instance = new FieldsTabs();
}
return self::$instance;
}

public function getFieldsTabs() {
return $this->fields_tabs;
}

public function addTab($key, $label, $icon, $position = null) {
$new_tab = array(
"label" => $label,
"icon" => $icon
);

if ($position === null || $position >= count($this->fields_tabs)) {
$this->fields_tabs[$key] = $new_tab;
} else {
$this->fields_tabs = array_slice($this->fields_tabs, 0, $position, true) +
array($key => $new_tab) +
array_slice($this->fields_tabs, $position, null, true);
}
}

public function removeTab($key) {
if (isset($this->fields_tabs[$key])) {
unset($this->fields_tabs[$key]);
}
}
}
23 changes: 13 additions & 10 deletions dev-workspace/run
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
#!/usr/bin/env bash

# Get the base directory of the script
BASE_DIR=$(dirname "$(realpath "$0")")

# Create empty cache files if not exists.
[[ -d cache/.npm/_cacache ]] || mkdir -p cache/.npm/_cacache
[[ -d cache/.npm/_logs ]] || mkdir -p cache/.npm/_logs
[[ -d cache/.composer/cache ]] || mkdir -p cache/.composer/cache
[[ -d cache/.oh-my-zsh/log ]] || mkdir -p cache/.oh-my-zsh/log
[[ -f cache/.zsh_history ]] || touch cache/.zsh_history
[[ -f cache/.bash_history ]] || touch cache/.bash_history
[[ -f cache/.composer/auth.json ]] || echo '{}' > cache/.composer/auth.json
[[ -d $BASE_DIR/cache/.npm/_cacache ]] || mkdir -p $BASE_DIR/cache/.npm/_cacache
[[ -d $BASE_DIR/cache/.npm/_logs ]] || mkdir -p $BASE_DIR/cache/.npm/_logs
[[ -d $BASE_DIR/cache/.composer/cache ]] || mkdir -p $BASE_DIR/cache/.composer/cache
[[ -d $BASE_DIR/cache/.oh-my-zsh/log ]] || mkdir -p $BASE_DIR/cache/.oh-my-zsh/log
[[ -f $BASE_DIR/cache/.zsh_history ]] || touch $BASE_DIR/cache/.zsh_history
[[ -f $BASE_DIR/cache/.bash_history ]] || touch $BASE_DIR/cache/.bash_history
[[ -f $BASE_DIR/cache/.composer/auth.json ]] || echo '{}' > $BASE_DIR/cache/.composer/auth.json

export DOCKER_HOST_IP=$(php ./scripts/getip)
export DOCKER_HOST_IP=$(php $BASE_DIR/scripts/getip)

is_online() {
echo -e "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1
Expand All @@ -22,11 +25,11 @@ is_online() {
}

pull_image() {
docker compose -f docker/compose.yaml pull
docker compose -f $BASE_DIR/docker/compose.yaml pull
}

run_terminal_service() {
docker compose -f docker/compose.yaml run --rm terminal "$@"
docker compose -f $BASE_DIR/docker/compose.yaml run --rm terminal "$@"
}

if [ "$(is_online)" -eq 1 ]; then
Expand Down
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' => '37e5020d6fac50b9cacfca0fb6ce1cdf67ff12ed',
'reference' => '219eb8d551babbe80e6a7e7dccc7f609c2914fe5',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '37e5020d6fac50b9cacfca0fb6ce1cdf67ff12ed',
'reference' => '219eb8d551babbe80e6a7e7dccc7f609c2914fe5',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down
Loading

0 comments on commit 17b1ac7

Please sign in to comment.