Skip to content

Commit

Permalink
Fix copy/blaze quick links disappearing after quick edit (#41339)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsas authored Jan 28, 2025
1 parent 1671042 commit 13838d9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
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

0 comments on commit 13838d9

Please sign in to comment.