<?php

/**
 * Contains post block shortcode post elements options (select / order elements and their options)
 */
/** Dont run without Unyson plugin **/
if (!defined('FW')) {
    die('Forbidden');
}
$options = array('opt_posts_block_functionality' => array('type' => 'addable-box', 'label' => __('Add Post Elements', 'unyson'), 'desc' => __('Add / remove / reorder elements to be displayed in each post', 'unyson'), 'template' => '{{- opt_posts_block_rows }}', 'popup-title' => null, 'size' => 'small', 'limit' => 0, 'box-options' => array('opt_posts_block_rows' => array('label' => __('Row Type', 'unyson'), 'type' => 'select', 'choices' => array('Thumbnail' => 'Thumbnail', 'Title' => 'Title', 'Title+Excerpt' => 'Title+Excerpt', 'Categories' => 'Categories', 'Tags' => 'Tags', 'Read More' => 'Read More', 'Date' => 'Date', 'Author' => 'Author', 'Comments' => 'Comments', 'Date+Comments' => 'Date+Comments', 'Comments+Author' => 'Comments+Author', 'Date+Author' => 'Date+Author', 'Date+Comments+Author' => 'Date+Comments+Author', 'Share Boxes' => 'Share Boxes', 'Divider' => 'Divider')))), 'opt_posts_block_number_categories' => array('label' => __('Number of Categories / Tags', 'thshpr'), 'type' => 'short-select', 'value' => '2', 'help' => __('Only needed if category or tag elements are selected above', 'thshpr'), 'desc' => __('Please choose how many categories / tags you wish to display in the block', 'thshpr'), 'choices' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5')), 'opt_posts_block_excerpt_length' => array('label' => __('Excerpt Length', 'thshpr'), 'type' => 'text', 'value' => '11', 'desc' => __('Enter the length of the excerpt (in words) excerpts will be automatically trimmed to this length', 'thshpr'), 'help' => __('', 'thshpr')), 'opt_posts_block_large_excerpt_length' => array('label' => __('Featured Post Excerpt Length', 'thshpr'), 'type' => 'text', 'value' => '180', 'desc' => __('Enter the length of the featured excerpt (in words) excerpts will be automatically trimmed to this length.)', 'thshpr'), 'help' => __('This only applies to blocks with a featured (larger) post excerpt', 'thshpr')), 'opt_posts_block_read_more_text' => array('label' => __('Read More Text', 'thshpr'), 'type' => 'text', 'value' => 'Read More', 'desc' => __('Enter the text to be used for the read more link', 'thshpr'), 'help' => __('Unicode arrow codes can be used (e.g. http://character-code.com/arrows-html-codes.php), only needed if the read more element is selected above', 'thshpr')), 'opt_posts_block_show_author_image' => array('type' => 'switch', 'value' => 'Show', 'label' => __('Show Image for Author', 'thshpr'), 'desc' => __('Show the gravatar image for the author.', 'thshpr'), 'help' => __('This only applies if the author element is selected above', 'thshpr'), 'left-choice' => array('value' => '1', 'label' => __('Show', 'thshpr')), 'right-choice' => array('value' => '0', 'label' => __('Hide', 'thshpr'))), 'opt_divider_type' => array('type' => 'image-picker', 'value' => 'divider-dotted', 'label' => __('Divider Type', 'thshpr'), 'desc' => __('Please select the type of divider you wish to use', 'thshpr'), 'choices' => array('divider-stripes' => fw_locate_theme_path_uri('/static/img/divider-stripes.png'), 'divider-thin-light' => fw_locate_theme_path_uri('/static/img/divider-thin-light.png'), 'divider-thin-dark' => fw_locate_theme_path_uri('/static/img/divider-thin-dark.png'), 'divider-thick-dark' => fw_locate_theme_path_uri('/static/img/divider-thick-dark.png'), 'divider-dotted' => fw_locate_theme_path_uri('/static/img/divider-dotted.png')), 'help' => __('Only needed if the divider element is selected above', 'thshpr'), 'blank' => false));
Example #2
0
wp_enqueue_script('thshpr-pagination-adjust-standard', $uri . '/static/js/pagination-adjust.js', array('jquery'), '', true);
wp_enqueue_script('thshpr-posts-block-last-row-add', $uri . '/static/js/last-row-class-add.js', array('jquery'), '', true);
/** Generate category id string **/
$post_categories = $atts["opt_posts_block_categories"];
$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;
Example #3
0
<?php

if (!defined('FW')) {
    die('Forbidden');
}
if (empty($atts['image'])) {
    $atts['image'] = fw_locate_theme_path_uri('/images/no-photo-max-size.jpg');
} else {
    $atts['image'] = $atts['image']['url'];
}
?>
<div class="our-team shortcode-container">
	<img src="<?php 
echo $atts['image'];
?>
" alt="<?php 
echo $atts['name'];
?>
">
	<span class="member-name"><?php 
echo do_shortcode($atts['name']);
?>
</span>
	<?php 
if (!empty($atts['job'])) {
    ?>
		<span
			class="member-function"><?php 
    echo do_shortcode($atts['job']);
    if (!empty($atts['site'])) {
        ?>
<?php

/**
 * Contains post elements options for single posts
 */
/** Dont run without Unyson plugin **/
if (!defined('FW')) {
    die('Forbidden');
}
$options = array('opt_single_title_functionality' => array('type' => 'addable-box', 'label' => __('Add Title Elements', 'thshpr'), 'template' => '{{- opt_single_title_rows }}', 'popup-title' => null, 'help' => __('Add and order (drag and drop) the title elements to be displayed for single posts.', 'thshpr'), 'size' => 'small', 'limit' => 0, 'box-options' => array('opt_single_title_rows' => array('label' => __('Row Type', 'thshpr'), 'type' => 'select', 'choices' => array('Title' => 'Title', 'Subtitle' => 'Subtitle', 'Categories' => 'Categories', 'Tags' => 'Tags', 'Date' => 'Date', 'Author' => 'Author', 'Comments' => 'Comments', 'Date+Comments' => 'Date+Comments', 'Comments+Author' => 'Comments+Author', 'Date+Author' => 'Date+Author', 'Date+Comments+Author' => 'Date+Comments+Author', 'Share Boxes' => 'Share Boxes', 'Divider' => 'Divider')))), 'opt_single_title_number_categories' => array('label' => __('Number of Categories / Tags', 'thshpr'), 'type' => 'short-select', 'value' => '2', 'help' => __('Please choose the maximum number of categories / tags you wish to display in the meta. Only needed if category or tag meta elements are selected above', 'thshpr'), 'choices' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5')), 'opt_single_title_show_author_image' => array('type' => 'switch', 'value' => 'Show', 'label' => __('Show Image for Author', 'thshpr'), 'help' => __('This only applies if the author element is selected above', 'thshpr'), 'left-choice' => array('value' => '1', 'label' => __('Show', 'thshpr')), 'right-choice' => array('value' => '0', 'label' => __('Hide', 'thshpr'))), 'opt_single_title_divider_type' => array('type' => 'image-picker', 'value' => 'divider-dotted', 'label' => __('Divider Type', 'thshpr'), 'choices' => array('divider-stripes' => fw_locate_theme_path_uri('/static/img/divider-stripes.png'), 'divider-thin-light' => fw_locate_theme_path_uri('/static/img/divider-thin-light.png'), 'divider-thin-dark' => fw_locate_theme_path_uri('/static/img/divider-thin-dark.png'), 'divider-thick-dark' => fw_locate_theme_path_uri('/static/img/divider-thick-dark.png'), 'divider-dotted' => fw_locate_theme_path_uri('/static/img/divider-dotted.png')), 'help' => __('Only needed if the divider element is selected above', 'thshpr'), 'blank' => false));
Example #5
0
		jQuery('.testimonials-controls').css('margin-top', -tControlsHeight / 2);
	});
</script>
<div class="testimonials shortcode shortcode-container">
	<ul id="<?php 
echo $id;
?>
">
		<?php 
$counter = 1;
foreach ($atts['testimonials'] as $testimonial) {
    if (empty($testimonial['site_name'])) {
        $testimonial['site_name'] = $testimonial['site_url'];
    }
    if (empty($testimonial['author_avatar'])) {
        $testimonial['author_avatar'] = fw_locate_theme_path_uri('/images/no-photo.jpg');
    } else {
        $testimonial['author_avatar'] = wp_get_attachment_image_src($testimonial['author_avatar']['attachment_id'], 'thumbnail');
        $testimonial['author_avatar'] = $testimonial['author_avatar'][0];
    }
    ?>
			<li data-testimonial="<?php 
    echo $counter++;
    ?>
">
				<div class="testimonials-author">
					<div class="avatar">
						<img src="<?php 
    echo $testimonial['author_avatar'];
    ?>
" alt="<?php 
Example #6
0
<?php

if (!defined('FW')) {
    die('Forbidden');
}
$options = array('general_options_box' => array('type' => 'box', 'title' => __('General Options', 'thshpr'), 'options' => array('opt_show_progress_indicator' => array('type' => 'switch', 'value' => '1', 'label' => __('Show Article Progress Indicator', 'thshpr'), 'help' => __('This will display a thin bar which reveals the progress of the article being read by the user', 'thshpr'), 'left-choice' => array('value' => '1', 'label' => __('Show', 'thshpr')), 'right-choice' => array('value' => '0', 'label' => __('Hide', 'thshpr'))), 'opt_sidebar_type' => array('label' => __('Sidebar Type', 'thshpr'), 'type' => 'short-select', 'value' => 'right', 'desc' => __('Please select the sidebar you wish to use for this post', 'thshpr'), 'choices' => array('right' => 'right', 'left' => 'left', 'none' => 'none')), 'opt_sticky_sidebar' => array('type' => 'switch', 'value' => '1', 'label' => __('Make Sidebar Sticky', 'thshpr'), 'help' => __('This will make the sidebars sticky on scrolling', 'thshpr'), 'desc' => __('Note: this requires the "Make Header Sticky on Scroll" set to sticky in customizer -> header', 'thshpr'), 'left-choice' => array('value' => '1', 'label' => __('Sticky', 'thshpr')), 'right-choice' => array('value' => '0', 'label' => __('Normal', 'thshpr'))), 'opt_left_right_padding' => array('label' => __('Left / Right Padding (if no sidebar above) - large screens only', 'thshpr'), 'type' => 'text', 'value' => '150', 'desc' => __('Narrows the body content when only one column is chosen.', 'thshpr')), 'opt_show_fancy_prev_next' => array('type' => 'switch', 'value' => '1', 'label' => __('Show Fancy Prev / Next Buttons', 'thshpr'), 'help' => __('This will show the fancy prev and next buttons that stick to the edges of the screen', 'thshpr'), 'left-choice' => array('value' => '1', 'label' => __('Show', 'thshpr')), 'right-choice' => array('value' => '0', 'label' => __('Hide', 'thshpr'))))), 'title_options_box' => array('type' => 'box', 'title' => __('Title Options', 'thshpr'), 'options' => array('opt_single_title_functionality' => array('type' => 'addable-box', 'label' => __('Add Title Elements', 'thshpr'), 'template' => '{{- opt_single_title_rows.the_block_type }}', 'help' => __('Add and order (drag and drop) the title elements to be displayed for this post.', 'thshpr'), 'size' => 'small', 'limit' => 0, 'box-options' => array('opt_single_title_rows' => array('type' => 'multi-picker', 'picker' => array('the_block_type' => array('type' => 'select', 'choices' => array('Title' => __('Title', 'thshpr'), 'Plain Text' => __('Plain Text', 'thshpr'), 'Subtitle' => __('Subtitle', 'thshpr'), 'Featured Image' => __('Featured Image', 'thshpr'), 'Categories' => __('Categories', 'thshpr'), 'Tags' => __('Tags', 'thshpr'), 'Plain Text' => __('Plain Text', 'thshpr'), 'Date' => __('Date', 'thshpr'), 'Author' => __('Author', 'thshpr'), 'Comments' => __('Comments', 'thshpr'), 'Date+Comments' => __('Date+Comments', 'thshpr'), 'Comments+Author' => __('Comments+Author', 'thshpr'), 'Date+Author' => __('Date+Author', 'thshpr'), 'Date+Comments+Author' => __('Date+Comments+Author', 'thshpr'), 'Share Boxes' => __('Share Boxes', 'thshpr'), 'Breadcrumbs' => __('Breadcrumbs', 'thshpr'), 'Divider' => __('Divider', 'thshpr'), 'Spacer 50px' => __('Spacer 50px', 'thshpr'), 'Spacer 40px' => __('Spacer 40px', 'thshpr'), 'Spacer 30px' => __('Spacer 30px', 'thshpr'), 'Spacer 20px' => __('Spacer 20px', 'thshpr'), 'Spacer 10px' => __('Spacer 10px', 'thshpr'), 'Spacer 5px' => __('Spacer 5px', 'thshpr'), 'Spacer 2px' => __('Spacer 2px', 'thshpr'), 'Spacer 1px' => __('Spacer 1px', 'thshpr')))), 'choices' => array('Title' => array('label' => __('Title', 'thshpr')), 'Subtitle' => array('label' => __('Subtitle', 'thshpr')), 'Featured Image' => array('label' => __('Featured Image', 'thshpr')), 'Categories' => array('label' => __('Categories', 'thshpr')), 'Tags' => array('label' => __('Tags', 'thshpr')), 'Plain Text' => array('opt_plain_text_contents' => array('label' => __('Plain Text', 'thshpr'), 'type' => 'textarea', 'value' => '', 'desc' => __('An optional field that contains the plain text for the plain text title element above (if selected)', 'thshpr'), 'help' => __('Only required if the plain text element is added', 'thshpr'))), 'Date' => array('label' => __('Date', 'thshpr')), 'Author' => array('label' => __('Author', 'thshpr')), 'Comments' => array('label' => __('Comments', 'thshpr')), 'Date+Comments' => array('label' => __('Date+Comments', 'thshpr')), 'Comments+Author' => array('label' => __('Comments+Author', 'thshpr')), 'Date+Author' => array('label' => __('Date+Author', 'thshpr')), 'Date+Comments+Author' => array('label' => __('Date+Comments+Author', 'thshpr')), 'Share Boxes' => array('label' => __('Share Boxes', 'thshpr')), 'Breadcrumbs' => array('label' => __('Breadcrumbs', 'thshpr')), 'Divider' => array('label' => __('Divider', 'thshpr')), 'Spacer 50px' => array('label' => __('Spacer 50px', 'thshpr')), 'Spacer 40px' => array('label' => __('Spacer 40px', 'thshpr')), 'Spacer 30px' => array('label' => __('Spacer 30px', 'thshpr')), 'Spacer 20px' => array('label' => __('Spacer 20px', 'thshpr')), 'Spacer 10px' => array('label' => __('Spacer 10px', 'thshpr')), 'Spacer 5px' => array('label' => __('Spacer 5px', 'thshpr')), 'Spacer 2px' => array('label' => __('Spacer 2px', 'thshpr')), 'Spacer 1px' => array('label' => __('Spacer 1px', 'thshpr'))), 'show_borders' => false))), 'opt_single_title_number_categories' => array('label' => __('Number of Categories / Tags', 'thshpr'), 'type' => 'short-select', 'value' => '20', 'help' => __('Please choose the maximum number of categories / tags you wish to display in this title area. Only needed if category or tag meta elements are selected above', 'thshpr'), 'choices' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12' => '12', '13' => '13', '14' => '14', '15' => '15', '16' => '16', '17' => '17', '18' => '18', '19' => '19', '20' => '20')), 'opt_single_title_show_author_image' => array('type' => 'switch', 'value' => 'Show', 'label' => __('Show Image for Author', 'thshpr'), 'help' => __('This only applies if the author element is selected above', 'thshpr'), 'left-choice' => array('value' => '1', 'label' => __('Show', 'thshpr')), 'right-choice' => array('value' => '0', 'label' => __('Hide', 'thshpr'))), 'opt_single_title_divider_type' => array('type' => 'image-picker', 'value' => 'divider-dotted', 'label' => __('Divider Type', 'thshpr'), 'choices' => array('divider-stripes' => fw_locate_theme_path_uri('/static/img/divider-stripes.png'), 'divider-thin-light' => fw_locate_theme_path_uri('/static/img/divider-thin-light.png'), 'divider-thin-dark' => fw_locate_theme_path_uri('/static/img/divider-thin-dark.png'), 'divider-thick-dark' => fw_locate_theme_path_uri('/static/img/divider-thick-dark.png'), 'divider-dotted' => fw_locate_theme_path_uri('/static/img/divider-dotted.png')), 'help' => __('Only needed if the divider element is selected above', 'thshpr'), 'blank' => false), 'opt_title_shift_amount' => array('label' => __('Vertical Offset Title Area Amount', 'thshpr'), 'type' => 'text', 'value' => '0', 'desc' => __('Enter the height to raise the title vertically in pixels. This should only be used when the full width header (parallax) image is enabled. This provides an overlap on the image.', 'thshpr')), 'opt_breadcrumbs_shift_amount' => array('label' => __('Vertical Offset Breadcrumbs', 'thshpr'), 'type' => 'text', 'value' => '0', 'desc' => __('If you have the breadcrumbs first in the title elements list you may wish to shift it upwards slightly', 'thshpr')), 'opt_breadcrumbs_homepage_title' => array('label' => __('Homepage Title', 'thshpr'), 'type' => 'text', 'value' => 'Home', 'desc' => __('Enter the text you wish to use for the home page in the breadcrumbs', 'thshpr')), 'opt_title_bottom_margin_amount' => array('label' => __('title Bottom Margin Amount', 'thshpr'), 'type' => 'text', 'value' => '40', 'desc' => __('Enter the size of the title bottom margin in pixels. This should be used if you have used a large vertical offset above and wish to shift the rest of the content down.', 'thshpr')))), 'general_images_options_box' => array('type' => 'box', 'title' => __('General Image Options', 'thshpr'), 'options' => array('opt_offset_images' => array('type' => 'switch', 'value' => '1', 'label' => __('Left / Right Offset Images', 'thshpr'), 'desc' => __('This will offset mages slightly outside the flow of text (left aligned, right aligned and featured images).', 'thshpr'), 'help' => __('The offset will only apply at higher resolutions, and will be intelligently automatically applied depending on sidebar status.', 'thshpr'), 'left-choice' => array('value' => '1', 'label' => __('Offset', 'thshpr')), 'right-choice' => array('value' => '0', 'label' => __('No Offset', 'thshpr'))), 'opt_left_aligned_image_max_width' => array('label' => __('Left Aligned Embedded Image Width', 'thshpr'), 'type' => 'text', 'value' => '400', 'desc' => __('Enter the left aligned desktop sized embedded image width in pixels. Please use "Small Responsive" size image when embedding. Image ratio will be maintained.', 'thshpr'), 'help' => __('The preset Small and Large Responsive sizes will be wide enough to fill the screen on smaller devices', 'thshpr')), 'opt_right_aligned_image_max_width' => array('label' => __('Right Aligned Embedded Image Width', 'thshpr'), 'type' => 'text', 'value' => '400', 'desc' => __('Enter the right aligned desktop sized embedded image width in pixels. Please use "Small Responsive" size image when embedding. Image ratio will be maintained.', 'thshpr'), 'help' => __('The preset Small and Large Responsive sizes will be wide enough to fill the screen on smaller devices', 'thshpr')), 'opt_center_aligned_image_max_width' => array('label' => __('Center Aligned Embedded Image Width', 'thshpr'), 'type' => 'text', 'value' => '1200', 'desc' => __('Enter the center aligned desktop sized embedded image width in pixels. Please use "Small Responsive" or "Large Responsive" size image when embedding (the latter if you want it to fill the editor area in a single column post). Image ratio will be maintained.', 'thshpr'), 'help' => __('The preset Small and Large Responsive sizes will be wide enough to fill the screen on smaller devices', 'thshpr')), 'opt_non_aligned_image_max_width' => array('label' => __('No Alignment Image Maximum Image Width', 'thshpr'), 'type' => 'text', 'value' => '400', 'desc' => __('Enter the no alignment desktop sized embedded image width in pixels. Please use "Small Responsive" or "Large Responsive" size image when embedding (the latter if you want it to fill the editor area). Image ratio will be maintained.', 'thshpr'), 'help' => __('The preset Small and Large Responsive sizes will be wide enough to fill the screen on smaller devices', 'thshpr')))), 'featured_image_box' => array('type' => 'box', 'title' => __('Featured Image Options', 'thshpr'), 'options' => array('opt_featured_image_show' => array('type' => 'switch', 'value' => '1', 'label' => __('Show or Hide Featured Image', 'thshpr'), 'desc' => __('Show or hide the featured image', 'thshpr'), 'left-choice' => array('value' => '1', 'label' => __('Show', 'thshpr')), 'right-choice' => array('value' => '0', 'label' => __('Hide', 'thshpr'))), 'opt_featured_image_link_to_full' => array('type' => 'switch', 'value' => '1', 'label' => __('Link to Fullsize Featured Image', 'thshpr'), 'desc' => __('Link to the fullsize featured image via a lightbox', 'thshpr'), 'left-choice' => array('value' => '1', 'label' => __('Yes', 'thshpr')), 'right-choice' => array('value' => '0', 'label' => __('No', 'thshpr'))), 'opt_featured_image_max_width' => array('label' => __('Featured Maximum Image Width', 'thshpr'), 'type' => 'text', 'value' => '1120', 'desc' => __('Enter the featured image maximum width in pixels. This needs to cover the entire width at lower resolutions, either 768 (for 2 columns) or 1200 for single columns', 'thshpr')), 'opt_featured_image_ratio' => array('label' => __('Featured Image Ratio', 'thshpr'), 'type' => 'select', 'value' => '0.5625', 'desc' => __('Please select the ratio of the featured image for this post. The above maximum width is used and the height is automatically calculated. You must ensure the image is of sufficient original size.', 'thshpr'), 'choices' => array('0.25' => '4 to 1', '0.33' => '3 to 1', '0.4285714285714286' => '2.33 to 1 (21:9)', '0.5' => '2 to 1', '0.5625' => '1.7 to 1 (16:9)', '0.6666666666666667' => '1.5 to 1 (3:2)', '0.75' => '1.25 to 1 (4:3)', '1.0' => '1 to 1', '1.333333333333333' => '0.75 to 1 (3:4)', '1.5' => '0.66 to 1 (2:3)', '1.777777777777778' => '0.56 to 1 (9:16)', '2.0' => '0.5 to 1'), 'help' => __('This is the ratio of width to height of the featured image', 'thshpr')))), 'fullscreen_header_image_box' => array('type' => 'box', 'title' => __('Full Width Header (Parallax) Image Options', 'thshpr'), 'options' => array('opt_header_show_image' => array('type' => 'switch', 'value' => '0', 'label' => __('Show Full Width Header (Parallax) Image', 'thshpr'), 'desc' => __('Show Full Width Header (Parallax) Image', 'thshpr'), 'left-choice' => array('value' => '1', 'label' => __('Show', 'thshpr')), 'right-choice' => array('value' => '0', 'label' => __('Hide', 'thshpr'))), 'opt_header_fade_image_scroll' => array('type' => 'switch', 'value' => 'Hide', 'label' => __('Fade Full Width Header (Parallax) Image on Scroll', 'thshpr'), 'desc' => __('Fade the full width header (parallax) image out when the user scrolls down, and fade it back in when they scroll up', 'thshpr'), 'left-choice' => array('value' => '1', 'label' => __('Fade', 'thshpr')), 'right-choice' => array('value' => '0', 'label' => __('Dont Fade', 'thshpr'))), 'opt_background_color' => array('label' => __('Background Color', 'thshpr'), 'desc' => __('Please select the background color', 'thshpr'), 'type' => 'color-picker'), 'opt_background_position' => array('label' => __('Background Image Position', 'thshpr'), 'type' => 'select', 'value' => 'left top', 'desc' => __('Please select the background image position', 'thshpr'), 'help' => __('See http://www.w3schools.com/cssref/pr_background-position.asp for an explanation of these choices', 'thshpr'), 'choices' => array('left top' => 'left top', 'left center' => 'left center', 'left bottom' => 'left bottom', 'right top' => 'right top', 'right center' => 'right center', 'right bottom' => 'right bottom', 'center top' => 'center top', 'center center' => 'center center', 'center bottom' => 'center bottom')), 'opt_background_repeat' => array('label' => __('Background Image Repeat', 'thshpr'), 'type' => 'select', 'value' => 'no-repeat', 'desc' => __('Please select the background image repeat', 'thshpr'), 'help' => __('See http://www.w3schools.com/cssref/pr_background-repeat.asp for an explanation of these choices', 'thshpr'), 'choices' => array('repeat' => 'repeat', 'repeat-x' => 'repeat-x', 'repeat-y' => 'repeat-y', 'no-repeat' => 'no-repeat')), 'opt_background_size' => array('label' => __('Background Size', 'thshpr'), 'type' => 'select', 'value' => 'cover', 'desc' => __('Please select the background image repeat, note this may effectively override the above two options', 'thshpr'), 'help' => __('See http://www.w3schools.com/cssref/css3_pr_background-size.asp for an explanation of these choices', 'thshpr'), 'choices' => array('auto' => 'auto', 'length' => 'length', 'percentage' => 'percentage', 'cover' => 'cover', 'contain' => 'contain')), 'opt_background_parallax_ratio' => array('type' => 'text', 'value' => '', 'label' => __('Background Parallax Ratio', 'thshpr'), 'desc' => __('Enter the number for the background parallax movement on scroll (leave empty to disable). Set this between 0 and 1 to ensure image coverage', 'thshpr')), 'opt_header_image_height' => array('label' => __('Full Width Header (Parallax) Image Area Height', 'thshpr'), 'type' => 'text', 'value' => '200', 'desc' => __('Enter the height of the full width header (parallax) image area height in pixels', 'thshpr'), 'help' => __('This needs to be smaller than the image height. Because this is applied as a background image.', 'thshpr')))));
Example #7
0
<?php

if (!defined('FW')) {
    die('Forbidden');
}
$options = array('categories_general_options_box' => array('type' => 'box', 'title' => __('General Options', 'thshpr'), 'options' => array('opt_show_progress_indicator' => array('type' => 'switch', 'value' => '1', 'label' => __('Show Progress Indicator', 'thshpr'), 'help' => __('This will display a thin bar which reveals the progress of the category being read by the user', 'thshpr'), 'left-choice' => array('value' => '1', 'label' => __('Show', 'thshpr')), 'right-choice' => array('value' => '0', 'label' => __('Hide', 'thshpr'))), 'opt_sidebar_type' => array('label' => __('Sidebar Type', 'thshpr'), 'type' => 'short-select', 'value' => 'right', 'desc' => __('Please select the sidebar type you wish to use for this category', 'thshpr'), 'choices' => array('right' => 'right', 'left' => 'left', 'none' => 'none')), 'opt_sticky_sidebar' => array('type' => 'switch', 'value' => '1', 'label' => __('Make Sidebar Sticky', 'thshpr'), 'help' => __('This will make the sidebars sticky on scrolling', 'thshpr'), 'desc' => __('Note: this requires the "Make Header Sticky on Scroll" set to sticky in customizer -> header', 'thshpr'), 'left-choice' => array('value' => '1', 'label' => __('Sticky', 'thshpr')), 'right-choice' => array('value' => '0', 'label' => __('Normal', 'thshpr'))), 'opt_left_right_padding' => array('label' => __('Left / Right Padding (if no sidebar above) - large screens only', 'thshpr'), 'type' => 'text', 'value' => '150', 'desc' => __('Narrows the body content when only one column is chosen.', 'thshpr')), 'opt_posts_block_ordering' => array('label' => __('Order Method', 'thshpr'), 'type' => 'short-select', 'value' => 'date', 'desc' => __('Please choose how you wish the posts to be ordered.', 'thshpr'), 'choices' => array('date' => 'date', 'rand' => 'random', 'name' => 'name', 'author' => 'author', 'parent' => 'parent'), 'help' => __('Determines the order which the posts will be displayed in the archive output', 'thshpr')), 'opt_posts_block_vertical_align_columns' => array('type' => 'switch', 'value' => 'Yes', 'label' => __('Vertical Align Columns', 'thshpr'), 'desc' => __('Vertically align the two columns', 'thshpr'), 'left-choice' => array('value' => 'Yes', 'label' => __('Yes', 'thshpr')), 'right-choice' => array('value' => 'No', 'label' => __('No', 'thshpr'))), 'opt_posts_block_right_cell_height' => array('label' => __('Right Cell Height', 'thshpr'), 'type' => 'text', 'value' => '300', 'desc' => __('Enter the height in pixels of the right cell (containing text, meta info etc). This is needed for vertical centering.', 'thshpr'), 'help' => __('', 'thshpr')), 'opt_posts_block_show_divider' => array('type' => 'switch', 'value' => 'Yes', 'label' => __('Show Divider', 'thshpr'), 'desc' => __('Show the divider between posts', 'thshpr'), 'left-choice' => array('value' => 'Yes', 'label' => __('Yes', 'thshpr')), 'right-choice' => array('value' => 'No', 'label' => __('No', 'thshpr')), 'help' => __('This is an optional divider between each post', 'thshpr')), 'opt_posts_block_layout' => array('label' => __('Layout', 'thshpr'), 'type' => 'select', 'value' => 'image-left-50', 'desc' => __('Please select the layout you wish to use for the posts (not entire page)', 'thshpr'), 'choices' => array('image-left-50' => 'Image Left 1/2 Width', 'image-left-33' => 'Image Left 1/3 Width', 'image-right-50' => 'Image Right 1/2 Width', 'image-right-33' => 'Image Right 1/3 Width', 'full-width' => 'Full Width')))), 'categories_title_options_box' => array('type' => 'box', 'title' => __('Title Options', 'thshpr'), 'options' => array('opt_categories_title_functionality' => array('type' => 'addable-box', 'label' => __('Add Title Elements', 'thshpr'), 'value' => array(array('opt_archive_title_rows' => 'Title'), array('opt_archive_title_rows' => 'Divider'), array('opt_archive_title_rows' => 'Breadcrumbs')), 'template' => '{{- opt_archive_title_rows }}', 'popup-title' => null, 'help' => __('Add and order (drag and drop) the title elements to be displayed for the archive.', 'thshpr'), 'size' => 'small', 'limit' => 0, 'box-options' => array('opt_archive_title_rows' => array('label' => __('Row Type', 'thshpr'), 'type' => 'select', 'choices' => array('Title' => 'Title', 'Description' => 'Description', 'Share Boxes' => 'Share Boxes', 'Breadcrumbs' => 'Breadcrumbs', 'Divider' => 'Divider', 'Spacer 50px' => 'Spacer 50px', 'Spacer 40px' => 'Spacer 40px', 'Spacer 30px' => 'Spacer 30px', 'Spacer 20px' => 'Spacer 20px', 'Spacer 10px' => 'Spacer 10px', 'Spacer 5px' => 'Spacer 5px', 'Spacer 2px' => 'Spacer 2px', 'Spacer 1px' => 'Spacer 1px')))), 'opt_categories_shift_amount' => array('label' => __('Vertical Offset Title Area Amount', 'thshpr'), 'type' => 'text', 'value' => '0', 'desc' => __('Enter the height to raise the title vertically in pixels. This should only be used when the full width header (parallax) image is enabled. This provides an overlap on the image.', 'thshpr')), 'opt_categories_breadcrumbs_shift_amount' => array('label' => __('Vertical Offset Breadcrumbs', 'thshpr'), 'type' => 'text', 'value' => '0', 'desc' => __('If you have the breadcrumbs first in the title elements list you may wish to shift it upwards slightly', 'thshpr')), 'opt_categories_title_bottom_margin_amount' => array('label' => __('title Bottom Margin Amount', 'thshpr'), 'type' => 'text', 'value' => '40', 'desc' => __('Enter the size of the title bottom margin in pixels. This should be used if you have used a large vertical offset above and wish to shift the rest of the content down.', 'thshpr')), 'opt_categories_breadcrumbs_homepage_title' => array('label' => __('Homepage Title', 'thshpr'), 'type' => 'text', 'value' => 'Home', 'desc' => __('Enter the text you wish to use for the home page in the breadcrumbs', 'thshpr')))), 'opt_categories_title_divider_type' => array('type' => 'image-picker', 'value' => 'divider-dotted', 'label' => __('Divider Type', 'thshpr'), 'choices' => array('divider-stripes' => fw_locate_theme_path_uri('/static/img/divider-stripes.png'), 'divider-thin-light' => fw_locate_theme_path_uri('/static/img/divider-thin-light.png'), 'divider-thin-dark' => fw_locate_theme_path_uri('/static/img/divider-thin-dark.png'), 'divider-thick-dark' => fw_locate_theme_path_uri('/static/img/divider-thick-dark.png'), 'divider-dotted' => fw_locate_theme_path_uri('/static/img/divider-dotted.png')), 'help' => __('Only needed if the divider element is selected above', 'thshpr'), 'blank' => false), 'categories_fullscreen_header_image_box' => array('type' => 'box', 'title' => __('Full Width Header Image Options', 'thshpr'), 'options' => array('opt_categories_header_parallax_image' => array('label' => __('Optional Full Width Parallax Image', 'thshpr'), 'desc' => __('Please select the optional full width parallax image', 'thshpr'), 'help' => __('Only required if the "Show Full Width Header (Parallax) Image" is switched on either in the customiser or below if override options is selected', 'thshpr'), 'type' => 'background-image', 'choices' => array()), 'opt_categories_header_fade_image_scroll' => array('type' => 'switch', 'value' => 'Hide', 'label' => __('Fade Full Width Header (Parallax) Image on Scroll', 'thshpr'), 'desc' => __('Fade the full width header (parallax) image out when the user scrolls down, and fade it back in when they scroll up', 'thshpr'), 'left-choice' => array('value' => '1', 'label' => __('Fade', 'thshpr')), 'right-choice' => array('value' => '0', 'label' => __('Dont Fade', 'thshpr'))), 'opt_categories_background_color' => array('label' => __('Background Color', 'thshpr'), 'desc' => __('Please select the background color', 'thshpr'), 'type' => 'color-picker'), 'opt_categories_background_position' => array('label' => __('Background Image Position', 'thshpr'), 'type' => 'select', 'value' => 'left top', 'desc' => __('Please select the background image position', 'thshpr'), 'help' => __('See http://www.w3schools.com/cssref/pr_background-position.asp for an explanation of these choices', 'thshpr'), 'choices' => array('left top' => 'left top', 'left center' => 'left center', 'left bottom' => 'left bottom', 'right top' => 'right top', 'right center' => 'right center', 'right bottom' => 'right bottom', 'center top' => 'center top', 'center center' => 'center center', 'center bottom' => 'center bottom')), 'opt_categories_background_repeat' => array('label' => __('Background Image Repeat', 'thshpr'), 'type' => 'select', 'value' => 'no-repeat', 'desc' => __('Please select the background image repeat', 'thshpr'), 'help' => __('See http://www.w3schools.com/cssref/pr_background-repeat.asp for an explanation of these choices', 'thshpr'), 'choices' => array('repeat' => 'repeat', 'repeat-x' => 'repeat-x', 'repeat-y' => 'repeat-y', 'no-repeat' => 'no-repeat')), 'opt_categories_background_size' => array('label' => __('Background Size', 'thshpr'), 'type' => 'select', 'value' => 'cover', 'desc' => __('Please select the background image repeat, note this may effectively override the above two options', 'thshpr'), 'help' => __('See http://www.w3schools.com/cssref/css3_pr_background-size.asp for an explanation of these choices', 'thshpr'), 'choices' => array('auto' => 'auto', 'length' => 'length', 'percentage' => 'percentage', 'cover' => 'cover', 'contain' => 'contain')), 'opt_categories_background_parallax_ratio' => array('type' => 'text', 'value' => '', 'label' => __('Background Parallax Ratio', 'thshpr'), 'desc' => __('Enter the number for the background parallax movement on scroll (leave empty to disable). Set this between 0 and 1 to ensure image coverage', 'thshpr')), 'opt_categories_header_image_height' => array('label' => __('Full Width Header (Parallax) Image Area Height', 'thshpr'), 'type' => 'text', 'value' => '200', 'desc' => __('Enter the height of the full width header (parallax) image area height in pixels', 'thshpr'), 'help' => __('This needs to be smaller than the image height. Because this is applied as a background image.', 'thshpr')))), 'post_elements_options_box' => array('type' => 'box', 'title' => __('Post Element', 'thshpr'), 'options' => array(fw()->theme->get_options('post-elements-shared-options'))), 'images_options_box' => array('type' => 'box', 'title' => __('Image', 'thshpr'), 'options' => array(fw()->theme->get_options('image-shared-options'))), 'pagination_options_box' => array('type' => 'box', 'title' => __('Pagination', 'thshpr'), 'options' => array('opt_posts_block_pagination' => array('type' => 'switch', 'value' => 'Yes', 'label' => __('Enable Pagination', 'thshpr'), 'desc' => __('Enables pagination. * Only one posts block should have pagination per page', 'thshpr'), 'left-choice' => array('value' => 'Yes', 'label' => __('Yes', 'thshpr')), 'right-choice' => array('value' => 'No', 'label' => __('No', 'thshpr'))), 'opt_posts_block_show_page_numbers' => array('type' => 'switch', 'value' => 'Yes', 'label' => __('Show Page Numbers', 'thshpr'), 'desc' => __('Switching off will leave just previous and next buttons', 'thshpr'), 'left-choice' => array('value' => 'Yes', 'label' => __('Yes', 'thshpr')), 'right-choice' => array('value' => 'No', 'label' => __('No', 'thshpr'))), 'opt_posts_block_next_post_text' => array('label' => __('Next Post Text', 'thshpr'), 'type' => 'text', 'value' => 'Next', 'desc' => __('Enter the text to be used for the next post link ', 'thshpr'), 'help' => __('This is optional, leave blank to just use arrows', 'thshpr')), 'opt_posts_block_prev_post_text' => array('label' => __('Prev Post Text', 'thshpr'), 'type' => 'text', 'value' => 'Prev', 'desc' => __('Enter the text to be used for the previous post link ', 'thshpr'), 'help' => __('This is optional, leave blank to just use arrows', 'thshpr')))));
Example #8
0
<?php

/**
 * Contains post elements options for the widget
 */
/** Dont run without Unyson plugin **/
if (!defined('FW')) {
    die('Forbidden');
}
$options = array('image_options' => array('title' => _('Image Options', 'thshpr'), 'options' => array('opt_small_image_ratio' => array('label' => __('Normal Image Ratio', 'thshpr'), 'type' => 'short-select', 'value' => '0.75', 'desc' => __('Please select the ratio of the normal sized images for this block (if the thumbnail post element is added above)The above maximum width is used and the height is automatically calculated. You must ensure the image is of sufficient original size.', 'thshpr'), 'choices' => array('0.25' => '4 to 1', '0.33' => '3 to 1', '0.4285714285714286' => '2.33 to 1 (21:9)', '0.5' => '2 to 1', '0.5625' => '1.7 to 1 (16:9)', '0.6666666666666667' => '1.5 to 1 (3:2)', '0.75' => '1.25 to 1 (4:3)', '1.0' => '1 to 1', '1.333333333333333' => '0.75 to 1 (3:4)', '1.5' => '0.66 to 1 (2:3)', '1.777777777777778' => '0.56 to 1 (9:16)', '2.0' => '0.5 to 1')), 'opt_show_hover_effects' => array('type' => 'switch', 'value' => 'Yes', 'label' => __('Show Hover Effects', 'thshpr'), 'desc' => __('Shows the hover effects on images (if the thumbnail element is added above)', 'thshpr'), 'left-choice' => array('value' => 'Yes', 'label' => __('Yes', 'thshpr')), 'right-choice' => array('value' => 'No', 'label' => __('No', 'thshpr'))), 'opt_image_hover_item_1' => array('type' => 'multi-picker', 'label' => false, 'desc' => false, 'picker' => array('template' => array('label' => __('Small Image Hover Upper Item', 'thshpr'), 'type' => 'select', 'choices' => array('0' => __('None', 'thshpr'), '1' => __('Text', 'thshpr'), '2' => __('Icon', 'thshpr'), '3' => __('Image Upload', 'thshpr')), 'desc' => __('Choose an option for the upper hover item  (if the thumbnail post element is added above)', 'thshpr'))), 'choices' => array('1' => array('opt_image_hover_item_text' => array('type' => 'text', 'value' => 'N', 'attr' => array('class' => 'custom-class', 'data-foo' => 'bar'), 'label' => __('', 'thshpr'), 'desc' => __('Enter the text you wish to use for this hover', 'thshpr'), 'help' => __('', 'thshpr'))), '2' => array('opt_image_hover_item_icon' => array('type' => 'icon', 'value' => 'fa-smile-o', 'attr' => array('class' => 'custom-class', 'data-foo' => 'bar'), 'label' => __('Image Hover Icon', 'thshpr'), 'desc' => __('Choose an icon for the image hover effect', 'thshpr'), 'help' => __('', 'thshpr'))), '3' => array('opt_image_hover_item_image' => array('label' => __('', 'thshpr'), 'desc' => __('Please upload the image you wish to use', 'thshpr'), 'type' => 'upload', 'help' => __('Upload an image either in the .png .jpg or .gif file formats', 'thshpr')))), 'show_borders' => false), 'opt_image_hover_item_2' => array('type' => 'multi-picker', 'label' => false, 'desc' => false, 'picker' => array('template' => array('label' => __('Small Image Hover Lower Item', 'thshpr'), 'type' => 'select', 'choices' => array('0' => __('None', 'thshpr'), '1' => __('Text', 'thshpr'), '2' => __('Icon', 'thshpr'), '3' => __('Image Upload', 'thshpr')), 'desc' => __('Choose an option for the lower hover item (if the thumbnail post element is added above)', 'thshpr'))), 'choices' => array('1' => array('opt_image_hover_item_text' => array('type' => 'text', 'value' => 'N', 'attr' => array('class' => 'custom-class', 'data-foo' => 'bar'), 'label' => __('', 'thshpr'), 'desc' => __('Enter the text you wish to use for this hover', 'thshpr'), 'help' => __('', 'thshpr'))), '2' => array('opt_image_hover_item_icon' => array('type' => 'icon', 'value' => 'fa-smile-o', 'attr' => array('class' => 'custom-class', 'data-foo' => 'bar'), 'label' => __('', 'thshpr'), 'desc' => __('Choose an icon for the image hover effect', 'thshpr'), 'help' => __('', 'thshpr'))), '3' => array('opt_image_hover_item_image' => array('label' => __('', 'thshpr'), 'desc' => __('Please upload the image you wish to use', 'thshpr'), 'type' => 'upload', 'help' => __('Upload an image either in the .png .jpg or .gif file formats', 'thshpr')))), 'show_borders' => false))), 'component_options' => array('title' => _('Component Options', 'thshpr'), 'options' => array('opt_widget_functionality' => array('type' => 'addable-box', 'label' => __('Add Title Elements', 'thshpr'), 'template' => '{{- opt_widget_rows }}', 'popup-title' => null, 'help' => __('Add and order (drag and drop) the title elements to be displayed for the post widgets.', 'thshpr'), 'size' => 'small', 'limit' => 0, 'box-options' => array('opt_widget_rows' => array('label' => __('Row Type', 'thshpr'), 'type' => 'select', 'choices' => array('Thumbnail' => 'Thumbnail', 'Title' => 'Title', 'Excerpt' => 'Excerpt', 'Categories' => 'Categories', 'Tags' => 'Tags', 'Date' => 'Date', 'Author' => 'Author', 'Comments' => 'Comments', 'Date+Comments' => 'Date+Comments', 'Comments+Author' => 'Comments+Author', 'Date+Author' => 'Date+Author', 'Date+Comments+Author' => 'Date+Comments+Author', 'Share Boxes' => 'Share Boxes', 'Divider' => 'Divider', 'Spacer 50px' => 'Spacer 50px', 'Spacer 40px' => 'Spacer 40px', 'Spacer 30px' => 'Spacer 30px', 'Spacer 20px' => 'Spacer 20px', 'Spacer 10px' => 'Spacer 10px', 'Spacer 5px' => 'Spacer 5px', 'Spacer 2px' => 'Spacer 2px', 'Spacer 1px' => 'Spacer 1px')))), 'opt_widget_number_categories' => array('label' => __('Number of Categories / Tags', 'thshpr'), 'type' => 'short-select', 'value' => '2', 'help' => __('Please choose the maximum number of categories / tags you wish to display in this title area. Only needed if category or tag meta elements are selected above', 'thshpr'), 'choices' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5')), 'opt_widget_excerpt_length' => array('label' => __('Excerpt Length', 'thshpr'), 'type' => 'text', 'value' => '11', 'desc' => __('Enter the length of the excerpt (in words) excerpts will be automatically trimmed to this length', 'thshpr'), 'help' => __('', 'thshpr')), 'opt_widget_divider_type' => array('type' => 'image-picker', 'value' => 'divider-dotted', 'label' => __('Divider Type', 'thshpr'), 'choices' => array('divider-stripes' => fw_locate_theme_path_uri('/static/img/divider-stripes.png'), 'divider-thin-light' => fw_locate_theme_path_uri('/static/img/divider-thin-light.png'), 'divider-thin-dark' => fw_locate_theme_path_uri('/static/img/divider-thin-dark.png'), 'divider-thick-dark' => fw_locate_theme_path_uri('/static/img/divider-thick-dark.png'), 'divider-dotted' => fw_locate_theme_path_uri('/static/img/divider-dotted.png')), 'help' => __('Only needed if the divider element is selected above', 'thshpr'), 'blank' => false))));