コード例 #1
0
ファイル: mvb_helper.php プロジェクト: sabdev1/sabljc
function mvb_posts_select()
{
    $cpts = mvb_get_option('cpts', 'any');
    $posts = get_posts(array('post_type' => $cpts, 'posts_per_page' => -1));
    $out_posts = array('');
    if (is_array($posts)) {
        foreach ($posts as $post) {
            $out_posts[$post->ID] = $post->post_title;
        }
    }
    return $out_posts;
}
コード例 #2
0
ファイル: dispatcher.php プロジェクト: sabdev1/sabljc
 function mvb_the_content($content = false)
 {
     $mvb_activate = mvb_get_option('activate');
     if ($mvb_activate != 1) {
         return $content;
     }
     if (is_single() or is_page() or is_404()) {
         global $bs_is_the_main_loop;
         global $post;
         $mvb_cpts = mvb_get_option('cpts');
         if (!in_array($post->post_type, $mvb_cpts)) {
             return $content;
         }
         $enable_composer = get_post_meta($post->ID, '_bshaper_activate_metro_builder', true);
         if (!$bs_is_the_main_loop and !is_singular('post') or $enable_composer == '0') {
             return $content;
         }
         //endif;
         $meta_value = get_post_meta($post->ID, '_bshaper_artist_content', true);
         if (!empty($meta_value)) {
             global $mvb_metro_factory;
             $_html = '<div class="mvb_content">' . $mvb_metro_factory->parse_mvb_array($meta_value) . '</div>';
             if ($enable_composer == 2) {
                 return '<div class="row"><section id="main_content" class="twelve column" role="main">' . $content . '</section></div>' . $_html;
             }
             return $_html;
         } else {
             return $content;
         }
     }
     return $content;
 }
コード例 #3
0
ファイル: metro_options.php プロジェクト: sabdev1/sabljc
 public function the_settings_page()
 {
     global $mvb_metro_factory;
     $load = array();
     if (isset($_POST['mvb_plugin_posted']) and $_POST['mvb_plugin_posted'] == 'posted') {
         $this->save_options();
         mvb_initialize_options();
     }
     if ($this->messenger_status != '') {
         $load['messenger_status'] = $this->messenger_status;
         $load['messenger'] = $this->messenger;
         $this->messenger_status = '';
         $this->messenger = '';
     }
     $load['post_types'] = get_post_types(array('_builtin' => false), 'objects');
     $mvb_post_types = array('page' => __('Pages', 'mvb'), 'post' => __('Posts', 'mvb'));
     foreach ($load['post_types'] as $post_type) {
         $mvb_post_types[$post_type->name] = $post_type->labels->name;
     }
     // endforeach;
     $load['mvb_yes_no'] = mvb_yes_no();
     $load['mvb_grids'] = array('default' => __('Default Grid', 'mvb'), 'custom' => __('Custom', 'mvb'), 'foundation.v3' => __('Foundation v3', 'mvb'), 'foundation.v4' => __('Foundation v4', 'mvb'), 'bootstrap' => __('Bootstrap', 'mvb'));
     $load['mvb_post_types'] = $mvb_post_types;
     $load['mvb_skins'] = array('none' => __('None', 'mvb'), 'red' => __('MVB Red', 'mvb'), 'green' => __('MVB Green', 'mvb'), 'blue' => __('MVB Blue', 'mvb'));
     $load['mvb_o_activate'] = mvb_get_option('activate');
     $load['mvb_o_show'] = mvb_get_option('show');
     $load['mvb_o_color_scheme'] = mvb_get_option('color_scheme');
     $load['mvb_o_cpts'] = mvb_get_option('cpts');
     $load['mvb_o_grid'] = mvb_get_option('grid');
     echo $mvb_metro_factory->_load_view('html/options/page.php', $load);
 }
コード例 #4
0
ファイル: metro_factory.php プロジェクト: sabdev1/sabljc
 public function get_grid_config_file()
 {
     $mvb_grid = mvb_get_option('grid');
     if ($mvb_grid == 'custom') {
         return MVB_C_PATH . '/factory/mvb-custom/grids/custom.php';
     } else {
         return MVB_PATH . '/app/html/grids/' . $mvb_grid . '.php';
     }
 }