Ejemplo n.º 1
0
// INIT POSTER IMAGE SOURCE ORDERS
if (intval($isCreate) > 0) {
    //currently editing, so default can be empty
    $poster_source_order = $base->getVar($grid['params'], 'poster-source-order', '');
} else {
    $poster_source_order = $base->getVar($grid['params'], 'poster-source-order', array('featured-image'));
}
$poster_source_list = $base->get_poster_source_order();
// INIT LIGHTBOX SOURCE ORDERS
if (intval($isCreate) > 0) {
    //currently editing, so default can be empty
    $lb_source_order = $base->getVar($grid['params'], 'lb-source-order', '');
} else {
    $lb_source_order = $base->getVar($grid['params'], 'lb-source-order', array('featured-image'));
}
$lb_source_list = $base->get_lb_source_order();
// INIT AJAX SOURCE ORDERS
if (intval($isCreate) > 0) {
    //currently editing, so default can be empty
    $aj_source_order = $base->getVar($grid['params'], 'aj-source-order', '');
} else {
    $aj_source_order = $base->getVar($grid['params'], 'aj-source-order', array('post-content'));
}
$aj_source_list = $base->get_aj_source_order();
$all_metas = $eg_meta->get_all_meta();
?>
	<!-- SETTINGS -->
	<form id="eg-form-create-settings">
		<!--
		GRID SETTINGS
		-->
Ejemplo n.º 2
0
 /**
  * Apply all media types for custom grids that have not much settings
  * @since: 1.2.0
  */
 public function apply_all_media_types()
 {
     /**
      * Add settings that need to be set
      * - use all media sources, sorting does not matter since we only set one thing in each entry
      * - use all poster sources for videos, sorting does not matter since we only set one thing in each entry
      * - use all lightbox sources, sorting does not matter since we only set one thing in each entry
      */
     $media_orders = Essential_Grid_Base::get_media_source_order();
     foreach ($media_orders as $handle => $vals) {
         if ($handle == 'featured-image' || $handle == 'alternate-image') {
             continue;
         }
         $this->grid_postparams['media-source-order'][] = $handle;
     }
     $this->grid_postparams['media-source-order'][] = 'featured-image';
     //set this as the last entry
     $this->grid_postparams['media-source-order'][] = 'alternate-image';
     //set this as the last entry
     $poster_orders = Essential_Grid_Base::get_poster_source_order();
     foreach ($poster_orders as $handle => $vals) {
         $this->grid_params['poster-source-order'][] = $handle;
     }
     $lb_orders = Essential_Grid_Base::get_lb_source_order();
     foreach ($lb_orders as $handle => $vals) {
         $this->grid_params['lb-source-order'][] = $handle;
     }
 }