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: 0 additions & 1 deletion class-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public function __construct() {
Hook_Registry::add_filter( self::$prefix . '_settings_sanitize', array( $this, 'change_settings_on_save' ), 99 );
Hook_Registry::add_action( 'admin_menu', array( $this, 'redirect_on_save' ) );

Hook_Registry::add_action( 'wp_ajax_nopriv_' . self::$prefix . '_taxonomy_search_tom_select', array( __CLASS__, 'taxonomy_search_tom_select' ) );
Hook_Registry::add_action( 'wp_ajax_' . self::$prefix . '_taxonomy_search_tom_select', array( __CLASS__, 'taxonomy_search_tom_select' ) );
}

Expand Down
3 changes: 2 additions & 1 deletion settings/class-settings-sanitize.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ public function sanitize_postids_field( $value ) {
$ids = array_filter( array_map( 'absint', explode( ',', sanitize_text_field( wp_unslash( $value ) ) ) ) );

foreach ( $ids as $key => $value ) {
if ( false === get_post_status( $value ) ) {
// Drop missing posts, and posts the saving user cannot read (CLI and cron have no user).
if ( false === get_post_status( $value ) || ( is_user_logged_in() && ! current_user_can( 'read_post', $value ) ) ) {
unset( $ids[ $key ] );
}
}
Expand Down
Loading