Exemplo n.º 1
0
 $read_more = fw_get_db_customizer_option('opt_posts_block_read_more_text');
 $max_posts = fw_get_db_customizer_option('opt_posts_block_number_posts');
 $divider_type = fw_get_db_customizer_option('opt_divider_type');
 $show_author_image = fw_get_db_customizer_option('opt_posts_block_show_author_image');
 /** Specific shortcode variables **/
 $show_divider = fw_get_db_customizer_option('opt_posts_block_show_divider');
 $enabled_pagination = fw_get_db_customizer_option('opt_posts_block_pagination');
 $next_text = fw_get_db_customizer_option('opt_posts_block_next_post_text');
 $prev_text = fw_get_db_customizer_option('opt_posts_block_prev_post_text');
 $small_hide_excerpt = 0;
 $show_page_numbers = fw_get_db_customizer_option('opt_posts_block_show_page_numbers');
 $layout = fw_get_db_customizer_option('opt_posts_block_layout');
 $vertical_align_columns = fw_get_db_customizer_option('opt_posts_block_vertical_align_columns');
 /** hover items **/
 $hover_top = thshpr_get_image_hover_string(fw_get_db_customizer_option('opt_image_hover_item_1'));
 $hover_bottom = thshpr_get_image_hover_string(fw_get_db_customizer_option('opt_image_hover_item_2'));
 /** image ratios **/
 $large_image_ratio = fw_get_db_customizer_option('opt_large_image_ratio');
 $small_image_ratio = fw_get_db_customizer_option('opt_small_image_ratio');
 $small_width = fw_get_db_customizer_option('opt_small_image_max_width');
 $large_width = fw_get_db_customizer_option('opt_large_image_max_width');
 //needs adding to options
 $large_height = thshpr_generate_aspect_height($large_image_ratio, $large_width);
 $small_height = thshpr_generate_aspect_height($small_image_ratio, $small_width);
 /**
  * General Options
  */
 $show_progress_indicator = fw_get_db_customizer_option('opt_show_progress_indicator');
 $sidebar_type = fw_get_db_customizer_option('opt_sidebar_type');
 $sticky_sidebar = fw_get_db_customizer_option('opt_sticky_sidebar');
 $center_title = fw_get_db_customizer_option('opt_posts_block_center_title');
Exemplo n.º 2
0
$post_categories = array_values($post_categories);
$post_categories = thshpr_get_category_ids_string($post_categories);
/** Other variables from options **/
$unique_id = 'id-' . $atts['id'];
$order_by = $atts["opt_posts_block_ordering"];
$show_hover_effects = $atts["opt_posts_block_hover_effects"];
$category_tag_number = $atts["opt_posts_block_number_categories"];
$excerpt_length = $atts["opt_posts_block_excerpt_length"];
$components_elements = $atts["opt_posts_block_functionality"];
$read_more = $atts['opt_posts_block_read_more_text'];
$max_posts = $atts['opt_posts_block_number_posts'];
$divider_type = fw_locate_theme_path_uri('/static/img/') . $atts['opt_divider_type'];
$show_author_image = $atts['opt_posts_block_show_author_image'];
/** hover items **/
$hover_top = thshpr_get_image_hover_string($atts['opt_image_hover_item_1']);
$hover_bottom = thshpr_get_image_hover_string($atts['opt_image_hover_item_2']);
/**  specific block posts type variables **/
$enabled_pagination = $atts['opt_posts_block_pagination'];
$num_columns = $atts['opt_posts_block_columns'];
if ($num_columns == 1) {
    $boostrap_column = 12;
} else {
    if ($num_columns == 2) {
        $boostrap_column = 6;
    } else {
        if ($num_columns == 3) {
            $boostrap_column = 4;
        } else {
            if ($num_columns == 4) {
                $boostrap_column = 3;
            }