get_all_modals( $where = "is_trash != 1" )
Description Description
Source Source
File: includes/importer/easy-modal-v2/model/modal.php
function get_all_modals( $where = "is_trash != 1" ) { global $wpdb; $modals = array(); $modal_ids = array(); $EModal_Model_Modal = new EModal_Model_Modal; $EModal_Model_Modal_Meta = new EModal_Model_Modal_Meta; foreach ( $EModal_Model_Modal->load( "SELECT * FROM {$wpdb->prefix}em_modals" . ( $where ? " WHERE " . $where : '' ) ) as $modal ) { $modals[ $modal->id ] = $modal; $modal_ids[] = $modal->id; } if ( count( $modals ) ) { foreach ( $EModal_Model_Modal_Meta->load( "SELECT * FROM {$wpdb->prefix}em_modal_metas WHERE modal_id IN (" . implode( ',', $modal_ids ) . ")" ) as $meta ) { $modals[ $meta->modal_id ]->meta->process_load( $meta->as_array() ); } } return $modals; }
Expand full source code Collapse full source code View on Trac