Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix copy/blaze quick links disappearing after quick edit #41339

Merged
merged 3 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions projects/packages/blaze/changelog/fix-quickedit-blaze-cpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Blaze: Ensure Blaze still available after quick edit in post list
4 changes: 3 additions & 1 deletion projects/packages/blaze/src/class-blaze.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public static function init() {
// On the edit screen, add a row action to promote the post.
add_action( 'load-edit.php', array( __CLASS__, 'add_post_links_actions' ) );
// After the quick-edit screen is processed, ensure the blaze row action is still present
if ( 'admin-ajax.php' === $GLOBALS['pagenow'] && ! empty( $_POST['screen'] ) && 'edit-post' === $_POST['screen'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verification is not needed here, we're not saving anything.
if ( 'edit.php' === $GLOBALS['pagenow'] ||
// phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verification is not needed here, we're not saving anything.
( 'admin-ajax.php' === $GLOBALS['pagenow'] && ! empty( $_POST['post_view'] ) && 'list' === $_POST['post_view'] && ! empty( $_POST['action'] ) && 'inline-save' === $_POST['action'] ) ) {
self::add_post_links_actions();
}
// In the post editor, add a post-publish panel to allow promoting the post.
Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/fix-quickedit-copy-cpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: bugfix

Copy Post: Ensure Copy still available after quick edit in post list on all CPTs
2 changes: 1 addition & 1 deletion projects/plugins/jetpack/modules/copy-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Jetpack_Copy_Post {
* @return void
*/
public function __construct() {
if ( 'edit.php' === $GLOBALS['pagenow'] || ( 'admin-ajax.php' === $GLOBALS['pagenow'] && ! empty( $_POST['screen'] ) && 'edit-post' === $_POST['screen'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing -- update_post_data() handles access check.
if ( 'edit.php' === $GLOBALS['pagenow'] || ( 'admin-ajax.php' === $GLOBALS['pagenow'] && ! empty( $_POST['post_view'] ) && 'list' === $_POST['post_view'] && ! empty( $_POST['action'] ) && 'inline-save' === $_POST['action'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing -- update_post_data() handles access check.
add_action( 'admin_head', array( $this, 'print_inline_styles' ) );
add_filter( 'post_row_actions', array( $this, 'add_row_action' ), 10, 2 );
add_filter( 'page_row_actions', array( $this, 'add_row_action' ), 10, 2 );
Expand Down
Loading