Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'init', function() {
- if ( empty( $_GET['bulk-assign-type'] ) || ! current_user_can( 'administrator' ) ) {
- return;
- }
- $listing_type = 'event'; // modify this
- $listings = (array) get_posts( [
- 'post_type' => 'job_listing',
- 'posts_per_page' => -1,
- 'post_status' => 'any',
- ] );
- foreach ( $listings as $listing ) {
- update_post_meta( $listing->ID, '_case27_listing_type', $listing_type );
- }
- } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement