From ba53dd7d3ffc30e9165ec578bbeac234da41ee33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anderson=20Gr=C3=BCdtner=20Martins?= Date: Wed, 13 Apr 2022 11:54:48 -0300 Subject: [PATCH 01/14] Add "svn up" step to the release checklist --- .github/ISSUE_TEMPLATE/release-free-plugin.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/release-free-plugin.md b/.github/ISSUE_TEMPLATE/release-free-plugin.md index 741f5fdf..206b933e 100644 --- a/.github/ISSUE_TEMPLATE/release-free-plugin.md +++ b/.github/ISSUE_TEMPLATE/release-free-plugin.md @@ -26,7 +26,8 @@ To release the Free plugin please make sure to check all the checkboxes below. - [ ] Merge the `master` branch into the `development` branch - [ ] Create the Github release (make sure it is based on the `master` branch and correct tag) -#### SVN Repo +#### SVN Repo\ +- [ ] Update your working copy using `$ svn update` - [ ] Cleanup the `trunk` directory. - [ ] Unzip the built package and move files to the `trunk` - [ ] Remove any eventual file that shouldn't be released in the package (if you find anything, make sure to create an issue to fix the build script) From 3e30205ec9917aab87ea38a36f4684392e745fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anderson=20Gr=C3=BCdtner=20Martins?= Date: Wed, 13 Apr 2022 12:51:04 -0300 Subject: [PATCH 02/14] Fix a typo in the release checklist template --- .github/ISSUE_TEMPLATE/release-free-plugin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/release-free-plugin.md b/.github/ISSUE_TEMPLATE/release-free-plugin.md index 206b933e..8ce54cbf 100644 --- a/.github/ISSUE_TEMPLATE/release-free-plugin.md +++ b/.github/ISSUE_TEMPLATE/release-free-plugin.md @@ -34,5 +34,5 @@ To release the Free plugin please make sure to check all the checkboxes below. - [ ] Look for new files `$ svn status | grep \?` and add them using `$ svn add ` - [ ] Look for removed files `$ svn status | grep !` and remove them `$ svn rm ` - [ ] Create the new tag `$ svn cp trunk tags/` -- [ ] Commit the changes `$ svn ci 'Releasing '` +- [ ] Commit the changes `$ svn ci -m 'Releasing '` - [ ] Wait until WordPress updates the version number and make the final test updating the plugin in a staging site From 41379d8ecbb6eb55c04518e3349b7947c3215e5c Mon Sep 17 00:00:00 2001 From: ojopaul <92122385+ojopaul@users.noreply.github.com> Date: Mon, 18 Apr 2022 16:58:27 +0100 Subject: [PATCH 03/14] Add Author profile URL view button #616 (#618) * - Author Profile URL #616 * - Update term author slug source and adjust slug field css * - Update author link variable --- src/assets/css/multiple-authors.css | 5 +++++ src/assets/js/multiple-authors.js | 19 ++++++++++++------- src/core/Plugin.php | 19 +++++++++++++++++++ 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/assets/css/multiple-authors.css b/src/assets/css/multiple-authors.css index bae513b8..1808a358 100644 --- a/src/assets/css/multiple-authors.css +++ b/src/assets/css/multiple-authors.css @@ -331,4 +331,9 @@ body.own-profile-edit li[class*=' toplevel_page_term?taxonomy=author&tag_ID'] a. body.own-profile-edit .term-authors-user_id-wrap, body.own-profile-edit .edit-tag-actions span#delete-link { display: none !important; +} + +form#edittag tr.form-field #slug { + width: 85%; + margin-right: 5px; } \ No newline at end of file diff --git a/src/assets/js/multiple-authors.js b/src/assets/js/multiple-authors.js index fe2b4da0..6c15ed24 100644 --- a/src/assets/js/multiple-authors.js +++ b/src/assets/js/multiple-authors.js @@ -486,17 +486,22 @@ jQuery(document).ready(function ($) { }); }); - /** - * Add tab class to author editor's tr without tab - * - * This will add general tab class to 'Name' and Author URL - * or any tab that's rendered by default or third party - * without tab attribute - */ if ($('body').hasClass('taxonomy-author')) { + /** + * Add tab class to author editor's tr without tab + * + * This will add general tab class to 'Name' and Author URL + * or any tab that's rendered by default or third party + * without tab attribute + */ $('form#edittag tr.form-field:not(.ppma-tab-content)') .addClass('ppma-tab-content ppma-general-tab') .attr('data-tab', 'general'); + + /** + * Add view link to author url field + */ + $('form#edittag tr.form-field #slug').after('' + MultipleAuthorsStrings.view_text + ''); } /** diff --git a/src/core/Plugin.php b/src/core/Plugin.php index 2e2ee2b8..d53c752a 100644 --- a/src/core/Plugin.php +++ b/src/core/Plugin.php @@ -1321,6 +1321,8 @@ public function filter_terms_clauses($pieces) */ public function enqueue_scripts($hook_suffix) { + global $pagenow; + wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-sortable'); @@ -1382,6 +1384,21 @@ public function enqueue_scripts($hook_suffix) $legacyPlugin = Factory::getLegacyPlugin(); + $term_author_link = ''; + + if ( + is_admin() + && $pagenow === 'term.php' + && isset($_GET['taxonomy']) && $_GET['taxonomy'] === 'author' + && isset($_GET['tag_ID']) + ) { + $author = Author::get_by_term_id((int)$_GET['tag_ID']); + + if (is_object($author) && !is_wp_error($author) && isset($author->link)) { + $term_author_link = $author->link; + } + } + $js_strings = [ 'edit_label' => __('Edit', 'publishpress-authors'), 'confirm_delete' => __( @@ -1429,6 +1446,8 @@ public function enqueue_scripts($hook_suffix) 'publishpress-authors' ), 'mapped_author_nonce' => wp_create_nonce("mapped_author_nonce"), + 'term_author_link' => esc_url_raw($term_author_link), + 'view_text' => esc_html__('View', 'publishpress-authors'), ]; wp_localize_script( From bb851af78c73ffd015eb75a5c35c0cc351b351b2 Mon Sep 17 00:00:00 2001 From: ojopaul <92122385+ojopaul@users.noreply.github.com> Date: Tue, 19 Apr 2022 00:50:06 +0100 Subject: [PATCH 04/14] Add metabox to control author display, #60, #631 * Add metabox to control author display #60 * - Relocate ppma_post_author_box_disabled check method --- src/assets/css/multiple-authors.css | 8 ++++++++ src/core/Classes/Post_Editor.php | 22 ++++++++++++++++++++-- src/core/Traits/Author_box.php | 22 +++++++++++++++++++++- 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/src/assets/css/multiple-authors.css b/src/assets/css/multiple-authors.css index 1808a358..8216689c 100644 --- a/src/assets/css/multiple-authors.css +++ b/src/assets/css/multiple-authors.css @@ -208,6 +208,14 @@ body.taxonomy-author .form-field.term-description-wrap { margin-left: 5px; } +.ppma-authors-display-option-wrapper { + margin-top: 10px; +} + +.ppma-authors-display-option-wrapper input[type="checkbox"] { + vertical-align: bottom; +} + /* Fix the width of the Mapped user field in the New Author form */ .edit-tags-php.taxonomy-author .authors-select2-user-select, .term-php.taxonomy-author .authors-select2-user-select { diff --git a/src/core/Classes/Post_Editor.php b/src/core/Classes/Post_Editor.php index f96f1bd3..3ae001a9 100644 --- a/src/core/Classes/Post_Editor.php +++ b/src/core/Classes/Post_Editor.php @@ -60,7 +60,7 @@ public static function add_author_bulk_quick_edit_custom_box($column_name, $post Authors @@ -215,7 +215,7 @@ public static function render_authors_metabox() /** * Get rendered authors selection. */ - public static function get_rendered_authors_selection($authors, $showAvatars = true) + public static function get_rendered_authors_selection($authors, $showAvatars = true, $bulkEdit = false) { $classes = [ 'authors-list', @@ -283,6 +283,20 @@ class="authors-select2 authors-search" $post = get_post(); $userAuthor = get_user_by('ID', $post->post_author); ?> + +
+ + ID, 'ppma_disable_author_box', true), 1); ?> + /> + +
+