wordpress/wp-content/themes/basic/themify/themify-builder/classes/class-themify-builder-layouts.php
/**
		 * Runs once and removes the builtin layout posts as no longer needed
		 *
		 * @access public
		 * @since 1.5.1
		 */
Runs once and removes the builtin layout posts as no longer needed
@access public
@since 1.5.1
Runs once and removes the builtin layout posts as no longer needed @access public @since 1 . 5 . 1
public function cleanup_builtin_layouts() {
			global $post;
			if ( get_option( 'themify_builder_cleanup_builtin_layouts' ) === 'yes' )
				return;
			$posts = new WP_Query( array(
				'post_type' => self::$layout_slug,
				'posts_per_page' => -1,
				'orderby' => 'title',
				'order' => 'ASC',
				'meta_key' => '_themify_builder_prebuilt_layout',
				'meta_value' => 'yes',
				'cache_results' => false,
				'no_found_rows' => true,
				'ignore_sticky_posts'=>true,
				'update_post_meta_cache' => false,
				'update_post_term_cache' => false
			) );
			if ( $posts->have_posts() ) {
				while ( $posts->have_posts() ) {
					$posts->the_post();
					wp_delete_post( $post->ID, true );
				}
			}
			wp_reset_postdata();
			$_key='themify_builder_cleanup_builtin_layouts';
			delete_option($_key);
			add_option($_key,'yes', '', false );
		}
public function cleanup_builtin_layouts ( ) { global $ post ; if ( get_option ( 'themify_builder_cleanup_builtin_layouts' ) === 'yes' ) return ; $ posts = new WP_Query ( array ( 'post_type' => self :: $ layout_slug , 'posts_per_page' => - 1 , 'orderby' => 'title' , 'order' => 'ASC' , 'meta_key' => '_themify_builder_prebuilt_layout' , 'meta_value' => 'yes' , 'cache_results' => false , 'no_found_rows' => true , 'ignore_sticky_posts' => true , 'update_post_meta_cache' => false , 'update_post_term_cache' => false ) ) ; if ( $ posts -> have_posts ( ) ) { while ( $ posts -> have_posts ( ) ) { $ posts -> the_post ( ) ; wp_delete_post ( $ post -> ID , true ) ; } } wp_reset_postdata ( ) ; $ _key = 'themify_builder_cleanup_builtin_layouts' ; delete_option ( $ _key ) ; add_option ( $ _key , 'yes' , '' , false ) ; }
Runs once and removes the builtin layout posts as no longer needed
 @access public
 @since 1.5.1
Runs once and removes the builtin layout posts as no longer needed @access public @since 1 . 5 . 1