Skip to content
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
1 change: 1 addition & 0 deletions modules/custom-status/custom-status.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ public function action_admin_enqueue_scripts() {
wp_localize_script('edit_flow-custom_status', '__ef_localize_custom_status', [
'no_change' => esc_html__( '— No Change —', 'edit-flow' ),
'published' => esc_html__( 'Published', 'edit-flow' ),
'private' => esc_html__( 'Private', 'edit-flow' ),
'save_as' => esc_html__( 'Save as', 'edit-flow' ),
'save' => esc_html__( 'Save', 'edit-flow' ),
'edit' => esc_html__( 'Edit', 'edit-flow' ),
Expand Down
11 changes: 10 additions & 1 deletion modules/custom-status/lib/custom-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,16 @@ jQuery( document ).ready( function () {
);
}

// Add remaining statuses to dropdown. 'private' is always handled by a checkbox, and 'future' already exists if we need it
// Add "Private" status to bulk/quick-edit for users that can publish
// On the post editor, private is handled by the Visibility checkbox, but bulk edit has no such control
if ( id == 'select[name="_status"]' && current_user_can_publish_posts ) {
jQuery( id ).append(
jQuery( '<option></option' ).attr( 'value', 'private' ).text( i18n.private )
);
}

// Add remaining statuses to dropdown. 'future' already exists if we need it.
// 'private' is handled above for bulk/quick edit, or via Visibility checkbox on post editor.
jQuery.each( custom_statuses, function () {
if ( this.slug == 'private' || this.slug == 'future' ) {
return;
Expand Down
Loading