-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #746 from publishpress/release-2.13.0
* 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
Showing
21 changed files
with
2,573 additions
and
2,291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.