You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @return string The translated text for the notice.
47
-
*/
48
-
publicfunctionget_notice_text( $post ) {
49
-
if ( $this->permissions_helper->has_trashed_rewrite_and_republish_copy( $post ) ) {
50
-
return\__(
51
-
'You can only make one Rewrite & Republish duplicate at a time, and a duplicate of this post already exists in the trash. Permanently delete it if you want to make a new duplicate.',
@@ -110,7 +76,7 @@ public function add_block_editor_notice() {
110
76
if ( $this->permissions_helper->has_rewrite_and_republish_copy( $post ) ) {
111
77
112
78
$notice = [
113
-
'text' => $this->get_notice_text( $post ),
79
+
'text' => $this->get_notice_copy( $post ),
114
80
'status' => 'warning',
115
81
'isDismissible' => true,
116
82
];
@@ -122,4 +88,53 @@ public function add_block_editor_notice() {
122
88
);
123
89
}
124
90
}
91
+
92
+
/**
93
+
* Generates the translated text for the notice.
94
+
*
95
+
* @param WP_Post $post The current post object.
96
+
*
97
+
* @return string The translated text for the notice.
98
+
*/
99
+
privatefunctionget_notice_copy( $post ) {
100
+
if ( $this->permissions_helper->has_trashed_rewrite_and_republish_copy( $post ) ) {
101
+
return\__(
102
+
'You can only make one Rewrite & Republish duplicate at a time, and a duplicate of this post already exists in the trash. Permanently delete it if you want to make a new duplicate.',
0 commit comments