get_all_modal_themes( $where = "is_trash != 1" )
Description Description
Source Source
File: includes/importer/easy-modal-v2/model/theme.php
function get_all_modal_themes( $where = "is_trash != 1" ) { global $wpdb; $themes = array(); $theme_ids = array(); $EModal_Model_Theme = new EModal_Model_Theme; $EModal_Model_Theme_Meta = new EModal_Model_Theme_Meta; foreach ( $EModal_Model_Theme->load( "SELECT * FROM {$wpdb->prefix}em_themes" . ( $where ? " WHERE " . $where : '' ) ) as $theme ) { $themes[ $theme->id ] = $theme; $theme_ids[] = $theme->id; } if ( count( $themes ) ) { foreach ( $EModal_Model_Theme_Meta->load( "SELECT * FROM {$wpdb->prefix}em_theme_metas WHERE theme_id IN (" . implode( ',', $theme_ids ) . ")" ) as $meta ) { $themes[ $meta->theme_id ]->meta->process_load( $meta->as_array() ); } } return $themes; }
Expand full source code Collapse full source code View on Trac