Exemplo n.º 1
0
    </div>

<?php 
echo td_panel_generator::box_end();
?>









<?php 
foreach (td_api_module::get_all() as $td_module_class => $td_module_array) {
    if (!empty($td_module_array['excerpt_title']) or !empty($td_module_array['excerpt_content'])) {
        $td_box_title = $td_module_array['text'];
        if (!empty($td_module_array['used_on_blocks'])) {
            $td_box_title .= td_panel_generator::helper_generate_used_on_block_list($td_module_array['used_on_blocks']);
        }
        echo td_panel_generator::box_start($td_box_title, false);
        ?>

        <div class="td-box-row">
            <div class="td-box-description td-box-full">
                <span class="td-box-title">Notice:</span>
                <p>You can find documentation on how blocks are created from modules <a href="http://forum.tagdiv.com/modules-and-blocks/" target="_blank">here</a></p>
            </div>
            <div class="td-box-row-margin-bottom"></div>
        </div>
 /**
  * return an array of modules used to select the article display view
  * @param string $view_name can be: default+enabled_on_loops | enabled_on_loops | enabled_on_more_articles_box
  * @return array of arrays
  *  array('text' => '', 'title' => '', 'val' => '', 'img' => get_template_directory_uri() . '/includes/wp_booster/wp-admin/images/panel/module-default.png')
  */
 static function helper_display_modules($view_name)
 {
     $modules_array = array();
     switch ($view_name) {
         case 'default+enabled_on_loops':
             // all modules that have enabled_on_loops + default
             $modules_array[] = array('text' => '', 'title' => '', 'val' => '', 'img' => get_template_directory_uri() . '/includes/wp_booster/wp-admin/images/panel/module-default.png');
             foreach (td_api_module::get_all() as $module_class => $module_array) {
                 if ($module_array['enabled_on_loops'] === true) {
                     $modules_array[] = array('text' => '', 'title' => '', 'val' => td_util::get_module_loop_id($module_class), 'img' => $module_array['img']);
                 }
             }
             break;
         case 'enabled_on_loops':
             // all modules that have enabled_on_loops
             foreach (td_api_module::get_all() as $module_class => $module_array) {
                 if ($module_array['enabled_on_loops'] === true) {
                     $modules_array[] = array('text' => '', 'title' => '', 'val' => td_util::get_module_loop_id($module_class), 'img' => $module_array['img']);
                 }
             }
             break;
         case 'enabled_on_more_articles_box':
             // all modules that are enabled on the more articles box
             foreach (td_api_module::get_all() as $module_class => $module_array) {
                 if ($module_array['enabled_on_more_articles_box'] === true) {
                     $modules_array[] = array('text' => '', 'title' => '', 'val' => td_util::get_module_loop_id($module_class), 'img' => $module_array['img']);
                 }
             }
             break;
     }
     return $modules_array;
 }