Ejemplo n.º 1
0
 private static function load_from_extensions_recursive($extensions)
 {
     /*
      * Loop each extension
      * if it has a shortcodes folder load the shortcodes from it
      * if an extension has subextensions then recursion
      */
     foreach ($extensions as $ext_name => $children) {
         $extension = fw()->extensions->get($ext_name);
         $rel_path = $extension->get_rel_path();
         // framework
         $fw_path = fw_get_framework_directory('/extensions' . $rel_path . '/shortcodes');
         if (file_exists($fw_path)) {
             self::load_from_shortcodes_folder(array('path' => $fw_path, 'uri' => fw_get_framework_directory_uri('/extensions' . $rel_path . '/shortcodes')));
         }
         // parent theme framework-customizations
         $parent_fws_path = fw_get_template_customizations_directory('/extensions' . $rel_path . '/shortcodes');
         if (file_exists($parent_fws_path)) {
             self::load_from_shortcodes_folder(array('path' => $parent_fws_path, 'uri' => fw_get_template_customizations_directory_uri('/extensions' . $rel_path . '/shortcodes')));
         }
         // child theme framework-customizations
         if (is_child_theme()) {
             $child_fws_path = fw_get_stylesheet_customizations_directory('/extensions' . $rel_path . '/shortcodes');
             if (file_exists($child_fws_path)) {
                 self::load_from_shortcodes_folder(array('path' => $child_fws_path, 'uri' => fw_get_stylesheet_customizations_directory_uri('/extensions' . $rel_path . '/shortcodes')));
             }
         }
         if (!empty($children)) {
             self::load_from_extensions_recursive($children);
         }
     }
 }
 /**
  * @param FW_Extension $extension
  */
 private static function load_extension_shortcodes($extension)
 {
     $ext_name = $extension->get_name();
     if (version_compare(fw()->manifest->get_version(), '2.2', '<')) {
         $ext_rel_path = $extension->get_rel_path();
         if ($extension->get_declared_source() === 'framework') {
             self::load_folder_shortcodes($ext_name, array('path' => $extension->get_declared_path('/shortcodes'), 'uri' => $extension->get_declared_URI('/shortcodes')), array('paths' => array(fw_get_stylesheet_customizations_directory('/extensions' . $ext_rel_path . '/shortcodes'), fw_get_template_customizations_directory('/extensions' . $ext_rel_path . '/shortcodes')), 'uris' => array(fw_get_stylesheet_customizations_directory_uri('/extensions' . $ext_rel_path . '/shortcodes'), fw_get_template_customizations_directory_uri('/extensions' . $ext_rel_path . '/shortcodes'))));
             self::load_folder_shortcodes($ext_name, array('path' => fw_get_template_customizations_directory('/extensions' . $ext_rel_path . '/shortcodes'), 'uri' => fw_get_template_customizations_directory_uri('/extensions' . $ext_rel_path . '/shortcodes')), array('paths' => array(fw_get_stylesheet_customizations_directory('/extensions' . $ext_rel_path . '/shortcodes')), 'uris' => array(fw_get_stylesheet_customizations_directory_uri('/extensions' . $ext_rel_path . '/shortcodes'))));
             self::load_folder_shortcodes($ext_name, array('path' => fw_get_stylesheet_customizations_directory('/extensions' . $ext_rel_path . '/shortcodes'), 'uri' => fw_get_stylesheet_customizations_directory_uri('/extensions' . $ext_rel_path . '/shortcodes')));
         } elseif ($extension->get_declared_source() === 'parent') {
             self::load_folder_shortcodes($ext_name, array('path' => $extension->get_declared_path('/shortcodes'), 'uri' => $extension->get_declared_URI('/shortcodes')), array('paths' => array(fw_get_stylesheet_customizations_directory('/extensions' . $ext_rel_path . '/shortcodes')), 'uris' => array(fw_get_stylesheet_customizations_directory_uri('/extensions' . $ext_rel_path . '/shortcodes'))));
             self::load_folder_shortcodes($ext_name, array('path' => fw_get_stylesheet_customizations_directory('/extensions' . $ext_rel_path . '/shortcodes'), 'uri' => fw_get_stylesheet_customizations_directory_uri('/extensions' . $ext_rel_path . '/shortcodes')));
         } else {
             self::load_folder_shortcodes($ext_name, array('path' => $extension->get_declared_path('/shortcodes'), 'uri' => $extension->get_declared_URI('/shortcodes')));
         }
     } else {
         $customizations_locations = array('paths' => array(), 'uris' => array());
         foreach ($extension->get_customizations_locations() as $path => $uri) {
             $customizations_locations['paths'][] = $path . '/shortcodes';
             $customizations_locations['uris'][] = $uri . '/shortcodes';
         }
         $path = $extension->get_path('/shortcodes');
         $uri = $extension->get_uri('/shortcodes');
         do {
             if (empty($customizations_locations['paths'])) {
                 $customizations_locations = array();
             }
             self::load_folder_shortcodes($ext_name, array('path' => $path, 'uri' => $uri), $customizations_locations);
             if ($customizations_locations) {
                 $path = array_pop($customizations_locations['paths']);
                 $uri = array_pop($customizations_locations['uris']);
             }
         } while ($customizations_locations);
     }
 }
Ejemplo n.º 3
0
 function widget($args, $instance)
 {
     extract($args);
     $flickr_id = esc_attr($instance['flickr_id']);
     $title = esc_attr($instance['title']);
     $number = (int) esc_attr($instance['number']) > 0 ? esc_attr($instance['number']) : 9;
     wp_enqueue_script('fw-theme-flickr-widget', fw_get_template_customizations_directory_uri('/theme/widgets/flickr/static/js/scripts.js'), array('jquery'), fw()->theme->manifest->get_version());
     $filepath = dirname(__FILE__) . '/views/widget.php';
     $data = array('number' => $number, 'flickr_id' => $flickr_id, 'before_widget' => str_replace('class="', 'class="widget_flickr_image_gallery ', $before_widget), 'after_widget' => $after_widget, 'title' => str_replace('class="', 'class="widget_flickr_image_gallery ', $before_title) . $title . $after_title);
     echo fw_render_view($filepath, $data);
 }
 /**
  * @internal
  * {@inheritdoc}
  */
 protected function _enqueue_static($id, $option, $data)
 {
     wp_enqueue_style('fw-option-type-' . $this->get_type() . '-backend', fw_get_template_customizations_directory_uri('/includes/option-types/' . $this->get_type() . '/static/css/backend.css'), fw()->manifest->get_version());
     wp_enqueue_script('fw-option-type-' . $this->get_type() . '-backend', fw_get_template_customizations_directory_uri('/includes/option-types/' . $this->get_type() . '/static/js/backend.js'), array('jquery', 'fw-events'), fw()->manifest->get_version());
     $sets = $this->get_sets();
     if (isset($sets[$option['set']])) {
         $set = $sets[$option['set']];
         unset($sets);
         /**
          * user hash as array key instead of src, because src can be a very long data-url string
          */
         $style_hash = md5($set['font-style-src']);
         if (!isset($this->enqueued_font_styles[$style_hash])) {
             wp_enqueue_style("fw-option-type-{$this->get_type()}-font-{$option['set']}", $set['font-style-src'], array(), fw()->manifest->get_version());
             $this->enqueued_font_styles[$style_hash] = true;
         }
     }
 }
Ejemplo n.º 5
0
<?php

if (!defined('FW')) {
    die('Forbidden');
}
$uri = fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/latest-deals');
Ejemplo n.º 6
0
<?php

if (!defined('FW')) {
    die('Forbidden');
}
$uri = fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/deal-categories');
Ejemplo n.º 7
0
<?php

if (!defined('FW')) {
    die('Forbidden');
}
$uri = fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/hero-image');
Ejemplo n.º 8
0
<?php

if (!defined('FW')) {
    die('Forbidden');
}
?>

<?php 
/**
 * The template for the spacer
 *
 *
 * @package naked
 */
$uri = fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/header-variation-1');
$unique_id = 'id-' . $atts['id'];
$spacer_height = $atts['opt_spacer_height'];
echo '<div class="spacer-shortcode" style="height:' . $spacer_height . 'px"></div>';
Ejemplo n.º 9
0
<?php

if (!defined('FW')) {
    die('Forbidden');
}
/**
 * @var array $atts
 */
$uri = fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/lead-paragraph');
wp_enqueue_script('thshpr-slick', $uri . '/static/js/fancy-dropcap.js', array('jquery'), '', true);
$lead_text = $atts["opt_lead_text"];
$show_fancy_drop_cap = $atts["opt_show_fancy_drop_cap"];
if ($show_fancy_drop_cap) {
    $show_fancy_drop_cap_class = "fancy-drop-cap";
} else {
    $show_fancy_drop_cap_class = "";
}
echo '<p class="lead-text ' . $show_fancy_drop_cap_class . '">' . $lead_text . '</p>';
Ejemplo n.º 10
0
<?php

if (!defined('FW')) {
    die('Forbidden');
}
$background_image = array('value' => 'none', 'choices' => array('none' => array('icon' => fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/no_pattern.jpg'), 'css' => array('background-image' => 'none')), 'bg-1' => array('icon' => fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/diagonal_bottom_to_top_pattern_preview.jpg'), 'css' => array('background-image' => 'url("' . fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/diagonal_bottom_to_top_pattern.png') . '")', 'background-repeat' => 'repeat')), 'bg-2' => array('icon' => fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/diagonal_top_to_bottom_pattern_preview.jpg'), 'css' => array('background-image' => 'url("' . fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/diagonal_top_to_bottom_pattern.png') . '")', 'background-repeat' => 'repeat')), 'bg-3' => array('icon' => fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/dots_pattern_preview.jpg'), 'css' => array('background-image' => 'url("' . fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/dots_pattern.png') . '")', 'background-repeat' => 'repeat')), 'bg-4' => array('icon' => fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/romb_pattern_preview.jpg'), 'css' => array('background-image' => 'url("' . fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/romb_pattern.png') . '")', 'background-repeat' => 'repeat')), 'bg-5' => array('icon' => fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/square_pattern_preview.jpg'), 'css' => array('background-image' => 'url("' . fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/square_pattern.png') . '")', 'background-repeat' => 'repeat')), 'bg-6' => array('icon' => fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/noise_pattern_preview.jpg'), 'css' => array('background-image' => 'url("' . fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/noise_pattern.png') . '")', 'background-repeat' => 'repeat')), 'bg-7' => array('icon' => fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/vertical_lines_pattern_preview.jpg'), 'css' => array('background-image' => 'url("' . fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/vertical_lines_pattern.png') . '")', 'background-repeat' => 'repeat')), 'bg-8' => array('icon' => fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/waves_pattern_preview.jpg'), 'css' => array('background-image' => 'url("' . fw_get_template_customizations_directory_uri('/extensions/styling/static/images/patterns/waves_pattern.png') . '")', 'background-repeat' => 'repeat'))));
$styles = array('black' => array('name' => 'Black', 'icon' => fw_get_template_customizations_directory_uri('/extensions/styling/static/images/black_predefined_style.jpg'), 'blocks' => array('header' => array('h1' => array('size' => 18, 'family' => 'Merienda One', 'style' => 'regular', 'color' => '#ffffff'), 'links' => '#ffffff', 'links_hover' => '#f17e12', 'background' => array('background-color' => array('primary' => '#111111', 'secondary' => '#111111'), 'background-image' => $background_image)), 'content' => array('h2' => array('size' => 24, 'family' => 'Merienda One', 'style' => 'regular', 'color' => '#2b2b2b'), 'h3' => array('size' => 22, 'family' => 'Merienda One', 'style' => 'regular', 'color' => '#2b2b2b'), 'p' => array('size' => 16, 'family' => 'Open Sans', 'style' => 'regular', 'color' => '#2b2b2b'), 'links' => '#f17e12', 'links_hover' => '#834a15', 'background' => array('background-color' => array('primary' => '#ffffff', 'secondary' => '#ffffff'), 'background-image' => $background_image)), 'sidebar' => array('h1' => array('size' => 11, 'family' => 'Lato', 'style' => '900', 'color' => '#ffffff'), 'links' => '#ffffff', 'links_hover' => '#f17e12', 'background' => array('background-color' => array('primary' => '#111111', 'secondary' => '#111111'), 'background-image' => $background_image)), 'footer' => array('h1' => array('size' => 11, 'family' => 'Lato', 'style' => '900', 'color' => '#ffffff'), 'links' => '#ffffff', 'links_hover' => '#f17e12', 'background' => array('background-color' => array('primary' => '#111111', 'secondary' => '#111111'), 'background-image' => $background_image)))), 'green' => array('name' => 'Green', 'icon' => fw_get_template_customizations_directory_uri('/extensions/styling/static/images/green_predefined_style.jpg'), 'blocks' => array('header' => array('h1' => array('size' => 18, 'family' => 'Philosopher', 'style' => 'regular', 'color' => '#ffffff'), 'links' => '#04d19b', 'links_hover' => '#34fdbe', 'background' => array('background-color' => array('primary' => '#006c4f', 'secondary' => '#006c4f'), 'background-image' => $background_image)), 'content' => array('h2' => array('size' => 24, 'family' => 'Philosopher', 'style' => 'regular', 'color' => '#2b2b2b'), 'h3' => array('size' => 22, 'family' => 'Philosopher', 'style' => 'regular', 'color' => '#2b2b2b'), 'p' => array('size' => 16, 'family' => 'Gafata', 'style' => 'regular', 'color' => '#2b2b2b'), 'links' => '#006c4f', 'links_hover' => '#00a77a', 'background' => array('background-color' => array('primary' => '#ffffff', 'secondary' => '#ffffff'), 'background-image' => $background_image)), 'sidebar' => array('h1' => array('size' => 12, 'family' => 'Philosopher', 'style' => 'regular', 'color' => '#ffffff'), 'links' => '#04d19b', 'links_hover' => '#34fdbe', 'background' => array('background-color' => array('primary' => '#006c4f', 'secondary' => '#006c4f'), 'background-image' => $background_image)), 'footer' => array('h1' => array('size' => 12, 'family' => 'Philosopher', 'style' => 'regular', 'color' => '#ffffff'), 'links' => '#04d19b', 'links_hover' => '#34fbde', 'background' => array('background-color' => array('primary' => '#006c4f', 'secondary' => '#006c4f'), 'background-image' => $background_image)))), 'blue' => array('name' => 'Blue', 'icon' => fw_get_template_customizations_directory_uri('/extensions/styling/static/images/blue_predefined_style.jpg'), 'blocks' => array('header' => array('h1' => array('size' => 18, 'family' => 'Fugaz One', 'style' => 'regular', 'color' => '#ffffff'), 'links' => '#b7d3f5', 'links_hover' => '#ffffff', 'background' => array('background-color' => array('primary' => '#206bb6', 'secondary' => '#206bb6'), 'background-image' => $background_image)), 'content' => array('h2' => array('size' => 24, 'family' => 'Fugaz One', 'style' => 'regular', 'color' => '#11385e'), 'h3' => array('size' => 22, 'family' => 'Fugaz One', 'style' => 'regular', 'color' => '#11385e'), 'p' => array('size' => 16, 'family' => 'Lato', 'style' => 'regular', 'color' => '#11385e'), 'links' => '#206bb6', 'links_hover' => '#11385e', 'background' => array('background-color' => array('primary' => '#ffffff', 'secondary' => '#ffffff'), 'background-image' => $background_image)), 'sidebar' => array('h1' => array('size' => 11, 'family' => 'Lato', 'style' => '700', 'color' => '#ffffff'), 'links' => '#b7d3f5', 'links_hover' => '#ffffff', 'background' => array('background-color' => array('primary' => '#206bb6', 'secondary' => '#206bb6'), 'background-image' => $background_image)), 'footer' => array('h1' => array('size' => 11, 'family' => 'Lato', 'style' => '700', 'color' => '#ffffff'), 'links' => '#b7d3f5', 'links_hover' => '#ffffff', 'background' => array('background-color' => array('primary' => '#206bb6', 'secondary' => '#206bb6'), 'background-image' => $background_image)))));
return apply_filters('fw_ext_styling_predefined_styles', $styles);
Ejemplo n.º 11
0
<?php

/**
 * Generates HTML output for the post slider (version 2, wide slider)
 */
/** Dont run without Unyson plugin **/
if (!defined('FW')) {
    die('Forbidden');
}
/** Paths **/
$uri = fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/post-slider-2');
$shortcodes_shared_uri = fw_get_template_customizations_directory_uri('/extensions/shortcodes');
//the place for global shortcode templates + css
$divider_uri = fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/divider');
wp_enqueue_style('thshpr-slick-css', $uri . '/static/css/slick.css');
wp_enqueue_style('thshpr-post-slider-2', $uri . '/static/css/style.css');
wp_enqueue_script('thshpr-slick', $uri . '/static/js/slick.min.js', array('jquery'), '', true);
wp_enqueue_script('thshpr-matchheight', $uri . '/static/js/jquery.matchHeight-min.js', array('jquery', 'thshpr-slick'), '', true);
wp_enqueue_script('thshpr-slider-2-theme-mods', $uri . '/static/js/slider-2-mods.js', array('jquery', 'thshpr-slick', 'thshpr-matchheight'), '', true);
wp_enqueue_script('thshpr-slider-2-init', $uri . '/static/js/slider-2-init.js', array('jquery', 'thshpr-slick', 'thshpr-slider-2-theme-mods'), '', 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'];
$category_tag_number = $atts['opt_posts_block_number_categories'];
$components_elements = $atts['opt_posts_block_functionality'];
$read_more = $atts['opt_posts_block_read_more_text'];
$excerpt_length = $atts["opt_posts_block_excerpt_length"];
Ejemplo n.º 12
0
<?php

if (!defined('FW')) {
    die('Forbidden');
}
$uri = fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/blockquote');
wp_enqueue_style('fw-shortcode-blockquote', $uri . '/static/css/styles.css');
Ejemplo n.º 13
0
<?php

if (!defined('FW')) {
    die('Forbidden');
}
$manifest = array();
$manifest['name'] = __('Woffice Updater', 'woffice');
$manifest['description'] = __('Auto Update your theme with the latest release, just by entering your purchase code.', 'woffice');
$manifest['version'] = '2.0.0';
$manifest['display'] = true;
$manifest['standalone'] = true;
$manifest['thumbnail'] = fw_get_template_customizations_directory_uri() . '/extensions/woffice-updater/static/img/thumbnails/updater.jpg';
Ejemplo n.º 14
0
<?php

if (!defined('FW')) {
    die('Forbidden');
}
?>

<?php 
/**
 * The template for displaying Author bios
 * Grabs info from the user part of the admin, no options for this other than id
 *
 * @package naked
 */
$uri = fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/about-the-author');
$unique_id = 'id-' . $atts['id'];
$twitter_url = get_the_author_meta('twitter');
$facebook_url = get_the_author_meta('facebook');
$googleplus_url = get_the_author_meta('googleplus');
$linkedin_url = get_the_author_meta('linkedin');
$pinterest_url = get_the_author_meta('pinterest');
$youtube_url = get_the_author_meta('youtube');
$instagram_url = get_the_author_meta('instagram');
$tumblr_url = get_the_author_meta('tumblr');
$vine_url = get_the_author_meta('vine');
$snapchat_url = get_the_author_meta('snapchat');
$reddit_url = get_the_author_meta('reddit');
$flickr_url = get_the_author_meta('flickr');
$email_url = get_the_author_meta('email');
$website_url = get_the_author_meta('url');
$show_dividers = $atts['opt_show_dividers'];
Ejemplo n.º 15
0
 /**
  * @internal
  */
 public function _theme_action_add_static()
 {
     wp_enqueue_script('fw-theme-blog-tabs-widget', fw_get_template_customizations_directory_uri('/theme/widgets/blog-tabs/static/js/scripts.js'), array('jquery'), fw()->theme->manifest->get_version());
 }
Ejemplo n.º 16
0
 /**
  * Search relative path in: child theme -> parent theme -> framework extensions directory and return URI
  *
  * @param string $rel_path '/<extension>/path_to_dir' or '/<extension>/extensions/<another_extension>/path_to_file.php'
  * @param   bool $search_in_framework
  * @param   bool $search_in_parent_theme
  * @param   bool $search_in_child_theme
  * @return false|string URI or false if not found
  */
 public function locate_path_URI($rel_path, $search_in_framework = true, $search_in_parent_theme = true, $search_in_child_theme = true)
 {
     if ($search_in_child_theme && is_child_theme()) {
         if (file_exists(fw_get_stylesheet_customizations_directory('/extensions' . $rel_path))) {
             return fw_get_stylesheet_customizations_directory_uri('/extensions' . $rel_path);
         }
     }
     if ($search_in_parent_theme) {
         if (file_exists(fw_get_template_customizations_directory('/extensions' . $rel_path))) {
             return fw_get_template_customizations_directory_uri('/extensions' . $rel_path);
         }
     }
     if ($search_in_framework) {
         if (file_exists(fw_get_framework_directory('/extensions' . $rel_path))) {
             return fw_get_framework_directory_uri('/extensions' . $rel_path);
         }
     }
     return false;
 }
Ejemplo n.º 17
0
<?php

if (!defined('FW')) {
    die('Forbidden');
}
$uri = fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/accordion');
wp_enqueue_script('fw-shortcode-accordion', $uri . '/static/js/scripts.js', array('jquery-ui-accordion'), false, true);
wp_enqueue_style('fw-shortcode-accordion', $uri . '/static/css/styles.css');
Ejemplo n.º 18
0
 public function get_locations()
 {
     $cache_key = 'fw_extensions_locations';
     try {
         return FW_Cache::get($cache_key);
     } catch (FW_Cache_Not_Found_Exception $e) {
         /**
          * { '/hello/world/extensions' => 'https://hello.com/world/extensions' }
          */
         $custom_locations = apply_filters('fw_extensions_locations', array());
         $customizations_locations = array();
         if (is_child_theme()) {
             $customizations_locations[fw_get_stylesheet_customizations_directory('/extensions')] = fw_get_stylesheet_customizations_directory_uri('/extensions');
         }
         $customizations_locations[fw_get_template_customizations_directory('/extensions')] = fw_get_template_customizations_directory_uri('/extensions');
         $customizations_locations += $custom_locations;
         $locations = array();
         $locations[fw_get_framework_directory('/extensions')] = array('path' => fw_get_framework_directory('/extensions'), 'uri' => fw_get_framework_directory_uri('/extensions'), 'customizations_locations' => $customizations_locations, 'is' => array('framework' => true, 'custom' => false, 'theme' => false));
         foreach ($custom_locations as $path => $uri) {
             unset($customizations_locations[$path]);
             $locations[$path] = array('path' => $path, 'uri' => $uri, 'customizations_locations' => $customizations_locations, 'is' => array('framework' => false, 'custom' => true, 'theme' => false));
         }
         array_pop($customizations_locations);
         $locations[fw_get_template_customizations_directory('/extensions')] = array('path' => fw_get_template_customizations_directory('/extensions'), 'uri' => fw_get_template_customizations_directory_uri('/extensions'), 'customizations_locations' => $customizations_locations, 'is' => array('framework' => false, 'custom' => false, 'theme' => true));
         if (is_child_theme()) {
             array_pop($customizations_locations);
             $locations[fw_get_stylesheet_customizations_directory('/extensions')] = array('path' => fw_get_stylesheet_customizations_directory('/extensions'), 'uri' => fw_get_stylesheet_customizations_directory_uri('/extensions'), 'customizations_locations' => $customizations_locations, 'is' => array('framework' => false, 'custom' => false, 'theme' => true));
         }
         FW_Cache::set($cache_key, $locations);
         return $locations;
     }
 }
 static function get_images_path()
 {
     return fw_get_template_customizations_directory_uri('/extensions/sidebars/static/images/');
 }
Ejemplo n.º 20
0
<?php

/**
* The Template for displaying search results. This is a near duplicate of the archives template (minus the specific archive overrides)
*
* @package naked
*/
if (function_exists('fw_get_db_customizer_option')) {
    $sticky_header = fw_get_db_customizer_option('opt_header_sticky');
    /** Paths **/
    $uri = fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/posts-block-standard-blog');
    $shortcodes_shared_uri = fw_get_template_customizations_directory_uri('/extensions/shortcodes');
    //the place for global shortcode templates + css
    /** Style and JS Includes **/
    wp_enqueue_style('thshpr-posts-block-standard-blog', $uri . '/static/css/style.css');
    wp_enqueue_script('thshpr-match-height', $uri . '/static/js/jquery.matchHeight-min.js', array('jquery'), '', true);
    wp_enqueue_script('thshpr-strap-point', $uri . '/static/js/strapPoint.min.js', array('jquery'), '', true);
    /** The equal heights is a little tricky. We must make the two columns equal heights to allow for vertical centering
    	but we only want this to apply when the columns are parallel (not at tablet / mobile after bootstrap makes a single column).
    	So we need to use match height and strap point this coding is contained in inits.js **/
    wp_enqueue_script('blog-inits', $uri . '/static/js/inits.js', array('jquery', 'thshpr-match-height', 'thshpr-strap-point'), '', true);
    /** Other variables from options **/
    $order_by = fw_get_db_customizer_option('opt_posts_block_ordering');
    $show_hover_effects = fw_get_db_customizer_option('opt_posts_block_hover_effects');
    $category_tag_number = fw_get_db_customizer_option('opt_posts_block_number_categories');
    $excerpt_length = fw_get_db_customizer_option('opt_posts_block_excerpt_length');
    $large_excerpt_length = fw_get_db_customizer_option('opt_posts_block_large_excerpt_length');
    $post_components_elements = fw_get_db_customizer_option('opt_posts_block_functionality');
    $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');
Ejemplo n.º 21
0
<?php

if (!defined('FW')) {
    die('Forbidden');
}
$uri = fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/featured-companies');
wp_enqueue_script('fw-shortcode-featured-companies', $uri . '/static/js/scripts.js', array('jquery', 'ssd_owl-carousel-js'), false, true);
wp_enqueue_style('fw-shortcode-featured-companies', $uri . '/static/css/styles.css');
Ejemplo n.º 22
0
<?php

if (!defined('FW')) {
    die('Forbidden');
}
$options = array('id' => array('type' => 'unique'), 'opt_show_dividers' => array('type' => 'switch', 'value' => '1', 'label' => __('Show Dividers', 'thshpr'), 'help' => __('Show the dividers between elements', '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-thick-dark', 'label' => __('Divider Type', 'thshpr'), 'desc' => __('Please select the type of divider you wish to use.', 'thshpr'), 'choices' => array('divider-stripes' => fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/divider') . '/static/img/divider-stripes.png', 'divider-thin-light' => fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/divider') . '/static/img/divider-thin-light.png', 'divider-thin-dark' => fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/divider') . '/static/img/divider-thin-dark.png', 'divider-thick-dark' => fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/divider') . '/static/img/divider-thick-dark.png', 'divider-dotted' => fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/divider') . '/static/img/divider-dotted.png'), 'blank' => true));
Ejemplo n.º 23
0
<?php

if (!defined('FW')) {
    die('Forbidden');
}
$options = array('id' => array('type' => 'unique'), 'opt_divider_type' => array('type' => 'image-picker', 'value' => 'divider-thick-dark', 'label' => __('Divider Type', 'thshpr'), 'desc' => __('Please select the type of divider you wish to use. Deselect to have no divider (only text, below)', 'thshpr'), 'choices' => array('divider-stripes' => fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/divider') . '/static/img/divider-stripes.png', 'divider-thin-light' => fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/divider') . '/static/img/divider-thin-light.png', 'divider-thin-dark' => fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/divider') . '/static/img/divider-thin-dark.png', 'divider-thick-dark' => fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/divider') . '/static/img/divider-thick-dark.png', 'divider-dotted' => fw_get_template_customizations_directory_uri('/extensions/shortcodes/shortcodes/divider') . '/static/img/divider-dotted.png'), 'blank' => true), 'opt_divider_header_text' => array('label' => __('Divider Header Text (optional)', 'thshpr'), 'type' => 'text', 'value' => '', 'desc' => __('Please enter the text for the divider header', 'thshpr')));