当前位置: 首页>>代码示例>>PHP>>正文


PHP td_block_layout::open6方法代码示例

本文整理汇总了PHP中td_block_layout::open6方法的典型用法代码示例。如果您正苦于以下问题:PHP td_block_layout::open6方法的具体用法?PHP td_block_layout::open6怎么用?PHP td_block_layout::open6使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在td_block_layout的用法示例。


在下文中一共展示了td_block_layout::open6方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: inner

 function inner($posts, $td_column_number = '')
 {
     $buffy = '';
     $td_block_layout = new td_block_layout();
     if (empty($td_column_number)) {
         $td_column_number = td_util::vc_get_column_number();
         // get the column width of the block from the page builder API
     }
     $td_post_count = 0;
     // the number of posts rendered
     $td_current_column = 1;
     //the current column
     if (!empty($posts)) {
         foreach ($posts as $post) {
             $td_module_9 = new td_module_9($post);
             switch ($td_column_number) {
                 case '1':
                     //one column layout
                     $buffy .= $td_block_layout->open12();
                     //added in 010 theme - span 12 doesn't use rows
                     $buffy .= $td_module_9->render($post);
                     $buffy .= $td_block_layout->close12();
                     break;
                 case '2':
                     //two column layout
                     $buffy .= $td_block_layout->open_row();
                     $buffy .= $td_block_layout->open6();
                     //added in 010 theme - span 12 doesn't use rows
                     $buffy .= $td_module_9->render($post);
                     $buffy .= $td_block_layout->close6();
                     if ($td_current_column == 2) {
                         $buffy .= $td_block_layout->close_row();
                     }
                     break;
                 case '3':
                     //three column layout
                     $buffy .= $td_block_layout->open_row();
                     $buffy .= $td_block_layout->open4();
                     $buffy .= $td_module_9->render($post);
                     $buffy .= $td_block_layout->close4();
                     if ($td_current_column == 3) {
                         $buffy .= $td_block_layout->close_row();
                     }
                     break;
             }
             //current column
             if ($td_current_column == $td_column_number) {
                 $td_current_column = 1;
             } else {
                 $td_current_column++;
             }
             $td_post_count++;
         }
     }
     $buffy .= $td_block_layout->close_all_tags();
     return $buffy;
 }
开发者ID:tuanlibra,项目名称:thptxuanang,代码行数:57,代码来源:td_block_10.php

示例2: inner

 function inner($posts, $td_column_number = '')
 {
     //global $post;
     $buffy = '';
     $td_block_layout = new td_block_layout();
     if (empty($td_column_number)) {
         $td_column_number = $td_block_layout->get_column_number();
         // get the column width of the block
     }
     $td_post_count = 0;
     // the number of posts rendered
     $td_current_column = 1;
     //the current column
     if (!empty($posts)) {
         foreach ($posts as $post) {
             $td_module_3 = new td_module_3($post);
             switch ($td_column_number) {
                 case '1':
                     //one column layout
                     $buffy .= $td_module_3->render($post);
                     break;
                 case '2':
                     //two column layout
                     $buffy .= $td_block_layout->open_row();
                     $buffy .= $td_block_layout->open6();
                     $buffy .= $td_module_3->render($post);
                     $buffy .= $td_block_layout->close6();
                     if ($td_current_column == 2) {
                         $buffy .= $td_block_layout->close_row();
                     }
                     break;
                 case '3':
                     //three column layout
                     $buffy .= $td_block_layout->open_row();
                     $buffy .= $td_block_layout->open4();
                     $buffy .= $td_module_3->render($post);
                     $buffy .= $td_block_layout->close4();
                     if ($td_current_column == 3) {
                         $buffy .= $td_block_layout->close_row();
                     }
                     break;
             }
             //current column
             if ($td_current_column == $td_column_number) {
                 $td_current_column = 1;
             } else {
                 $td_current_column++;
             }
             $td_post_count++;
         }
     }
     $buffy .= $td_block_layout->close_all_tags();
     return $buffy;
 }
开发者ID:Vatia13,项目名称:wordpress,代码行数:54,代码来源:td_block_4.php

示例3: inner

 function inner($posts, $td_column_number = '')
 {
     $buffy = '';
     $td_block_layout = new td_block_layout();
     $td_post_count = 0;
     // the number of posts rendered
     $td_current_column = 1;
     //the current column
     if (!empty($posts)) {
         foreach ($posts as $post) {
             $td_module_mx1 = new td_module_mx1($post);
             $td_module_mx2 = new td_module_mx2($post);
             switch ($td_column_number) {
                 case '1':
                     //one column layout
                     if ($td_post_count == 0) {
                         //first post
                         $buffy .= $td_module_mx1->render();
                     } else {
                         $buffy .= $td_module_mx2->render();
                     }
                     break;
                 case '2':
                     //two column layout
                     $buffy .= $td_block_layout->open_row();
                     if ($td_post_count <= 1) {
                         // big posts
                         $buffy .= $td_block_layout->open6();
                         $buffy .= $td_module_mx1->render();
                         $buffy .= $td_block_layout->close6();
                     }
                     if ($td_post_count == 1) {
                         //close big posts
                         $buffy .= $td_block_layout->close_row();
                     }
                     if ($td_post_count > 1) {
                         //4th post (big posts are rendered)
                         $buffy .= $td_block_layout->open_row();
                         $buffy .= $td_block_layout->open6();
                         $buffy .= $td_module_mx2->render();
                         $buffy .= $td_block_layout->close6();
                         if ($td_current_column == 2) {
                             // column 2
                             $buffy .= $td_block_layout->close_row();
                         }
                     }
                     break;
                 case '3':
                     //three column layout
                     $buffy .= $td_block_layout->open_row();
                     if ($td_post_count <= 2) {
                         // big posts
                         $buffy .= $td_block_layout->open4();
                         $buffy .= $td_module_mx1->render();
                         $buffy .= $td_block_layout->close4();
                     }
                     if ($td_post_count == 2) {
                         //close big posts
                         $buffy .= $td_block_layout->close_row();
                     }
                     if ($td_post_count > 2) {
                         //4th post (big posts are rendered)
                         $buffy .= $td_block_layout->open_row();
                         $buffy .= $td_block_layout->open4();
                         $buffy .= $td_module_mx2->render();
                         $buffy .= $td_block_layout->close4();
                         if ($td_current_column == 3) {
                             // column 3
                             $buffy .= $td_block_layout->close_row();
                         }
                     }
                     break;
             }
             //current column
             if ($td_current_column == $td_column_number) {
                 $td_current_column = 1;
             } else {
                 $td_current_column++;
             }
             $td_post_count++;
         }
     }
     $buffy .= $td_block_layout->close_all_tags();
     return $buffy;
 }
开发者ID:weerapat,项目名称:wp-daily,代码行数:85,代码来源:td_block_19.php

示例4: inner

 function inner($posts, $td_column_number = '')
 {
     $buffy = '';
     $td_block_layout = new td_block_layout();
     if (empty($td_column_number)) {
         $td_column_number = td_util::vc_get_column_number();
         // get the column width of the block from the page builder API
     }
     $td_post_count = 0;
     // the number of posts rendered
     if (!empty($posts)) {
         foreach ($posts as $post) {
             $td_module_4 = new td_module_4($post);
             $td_module_6 = new td_module_6($post);
             switch ($td_column_number) {
                 case '1':
                     //one column layout
                     $buffy .= $td_block_layout->open12();
                     //added in 010 theme - span 12 doesn't use rows
                     if ($td_post_count == 0) {
                         //first post
                         $buffy .= $td_module_4->render();
                     } else {
                         $buffy .= $td_module_6->render();
                     }
                     $buffy .= $td_block_layout->close12();
                     break;
                 case '2':
                     //two column layout
                     $buffy .= $td_block_layout->open_row();
                     if ($td_post_count == 0) {
                         //first post
                         $buffy .= $td_block_layout->open6();
                         $buffy .= $td_module_4->render();
                         $buffy .= $td_block_layout->close6();
                     } else {
                         //the rest
                         $buffy .= $td_block_layout->open6();
                         $buffy .= $td_module_6->render();
                     }
                     break;
                 case '3':
                     //three column layout
                     $buffy .= $td_block_layout->open_row();
                     if ($td_post_count == 0) {
                         //first post
                         $buffy .= $td_block_layout->open4();
                         $buffy .= $td_module_4->render();
                         $buffy .= $td_block_layout->close4();
                     } else {
                         //2-3 cols
                         $buffy .= $td_block_layout->open4();
                         $buffy .= $td_module_6->render();
                         if ($td_post_count == 4) {
                             //make new column
                             $buffy .= $td_block_layout->close4();
                         }
                     }
                     break;
             }
             $td_post_count++;
         }
     }
     $buffy .= $td_block_layout->close_all_tags();
     return $buffy;
 }
开发者ID:luxifel,项目名称:Bionerd,代码行数:66,代码来源:td_block_1.php

示例5: inner

 function inner($posts, $td_column_number = '')
 {
     //global $post;
     $buffy = '';
     $td_block_layout = new td_block_layout();
     if (empty($td_column_number)) {
         $td_column_number = $td_block_layout->get_column_number();
         // get the column width of the block
     }
     $td_post_count = 0;
     // the number of posts rendered
     if (!empty($posts)) {
         foreach ($posts as $post) {
             $td_module_2 = new td_module_2($post);
             $td_module_3 = new td_module_3($post);
             switch ($td_column_number) {
                 case '1':
                     //one column layout
                     if ($td_post_count == 0) {
                         //first post
                         $buffy .= $td_module_2->render();
                     } else {
                         $buffy .= $td_module_3->render();
                     }
                     break;
                 case '2':
                     //two column layout
                     $buffy .= $td_block_layout->open_row();
                     if ($td_post_count == 0) {
                         //first post
                         $buffy .= $td_block_layout->open6();
                         $buffy .= $td_module_2->render();
                         $buffy .= $td_block_layout->close6();
                     } else {
                         //the rest
                         $buffy .= $td_block_layout->open6();
                         $buffy .= $td_module_3->render();
                     }
                     break;
                 case '3':
                     //three column layout
                     $buffy .= $td_block_layout->open_row();
                     if ($td_post_count == 0) {
                         //first post
                         $buffy .= $td_block_layout->open4();
                         $buffy .= $td_module_2->render();
                         $buffy .= $td_block_layout->close4();
                     } else {
                         //2-3 cols
                         $buffy .= $td_block_layout->open4();
                         $buffy .= $td_module_3->render();
                         if ($td_post_count == 4) {
                             //make new column
                             $buffy .= $td_block_layout->close4();
                         }
                     }
                     break;
             }
             $td_post_count++;
         }
     }
     $buffy .= $td_block_layout->close_all_tags();
     return $buffy;
 }
开发者ID:Vatia13,项目名称:tofido,代码行数:64,代码来源:td_block_1.php


注:本文中的td_block_layout::open6方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。