└── save-all-posts.php /save-all-posts.php: -------------------------------------------------------------------------------- 1 | 'post', 'posts_per_page' => -1, 'order' => 'ASC' ) ); 19 | 20 | foreach ( $results->posts as $post ) { 21 | WP_CLI::success('Updating Post ID # ' . $post->ID); 22 | wp_update_post( $post ); 23 | } 24 | 25 | } 26 | 27 | } 28 | 29 | if ( defined( 'WP_CLI' ) && WP_CLI ) { 30 | $awp_save_all_posts = new AWP_Save_All_Posts(); 31 | } 32 | --------------------------------------------------------------------------------