function vantage_panels_panels_row_style_attributes($attr, $style) { if (empty($attr['style'])) { $attr['style'] = ''; } if (!empty($style['top_border'])) { $attr['style'] .= 'border-top: 1px solid ' . esc_attr($style['top_border']) . '; '; } if (!empty($style['bottom_border'])) { $attr['style'] .= 'border-bottom: 1px solid ' . esc_attr($style['bottom_border']) . '; '; } if (!empty($style['background'])) { $attr['style'] .= 'background-color: ' . esc_attr($style['background']) . '; '; } if (!empty($style['background_image'])) { $attr['style'] .= 'background-image: url(' . esc_url($style['background_image']) . '); '; } if (!empty($style['background_image_repeat'])) { $attr['style'] .= 'background-repeat: repeat; '; } if (!empty($style['row_css'])) { $attr['style'] .= $style['row_css']; } if (isset($style['row_stretch']) && strpos($style['row_stretch'], 'full') !== false) { // We'll use this to prevent the jump when loading. $attr['class'][] = 'panel-row-style-full-width'; } if (isset($style['class']) && $style['class'] == 'wide-grey' && siteorigin_setting('layout_bound') == 'full') { $attr['style'] .= 'padding-left: 1000px; padding-right: 1000px;'; } if (empty($attr['style'])) { unset($attr['style']); } return $attr; }
/** * Add some custom SiteOrigin update information to the update_themes transient. * * This ONLY applies when the user enters a valid premium order number. A user should be aware that the updates will be * coming from a different source after they upgrade to the premium version. * * @param $current * @return mixed */ function siteorigin_theme_update_filter($current) { $theme = basename(get_template_directory()); $order_number = siteorigin_setting('premium_order_number'); if (empty($order_number)) { return $current; } // Skip if the user has not entered an order number. static $request = false; if (empty($request)) { // Only keep a single instance of this request. Stops double requests. $request = wp_remote_get(add_query_arg(array('timestamp' => time(), 'action' => 'update_info', 'version' => SITEORIGIN_THEME_VERSION, 'order_number' => $order_number), SITEORIGIN_THEME_ENDPOINT . '/premium/' . $theme . '/'), array('timeout' => 10)); } if (!is_wp_error($request) && $request['response']['code'] == 200 && !empty($request['body'])) { $data = unserialize($request['body']); if (empty($current)) { $current = new stdClass(); } if (empty($current->response)) { $current->response = array(); } if (!empty($data)) { $current->response[$theme] = $data; } } return $current; }
/** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function ultra_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } // Adds a class of content-none if there are no posts. if (!have_posts()) { $classes[] = 'content-none'; } // Add widget-dependent classes. if (!is_active_sidebar('sidebar-1')) { $classes[] = 'one-column'; } // Add a class if the sidebar is use. if (is_active_sidebar('sidebar-1')) { $classes[] = 'sidebar'; } // Add a class if viewed on mobile. if (wp_is_mobile()) { $classes[] = 'mobile-device'; } if (siteorigin_setting('header_tagline')) { $classes[] = 'tagline'; } // Add a class if the page slider overlap is true. if (get_post_meta(get_the_ID(), 'ultra_metaslider_slider_overlap', true) == true) { $classes[] = 'overlap'; } return $classes; }
/** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function siteorigin_north_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } $classes[] = 'no-js'; $classes[] = 'css3-animations'; $classes[] = 'responsive'; if (is_page()) { $classes[] = 'page-layout-' . SiteOrigin_Settings_Page_Settings::get('layout'); $classes[] = 'page-layout-menu-' . SiteOrigin_Settings_Page_Settings::get('menu'); if (!SiteOrigin_Settings_Page_Settings::get('masthead_margin')) { $classes[] = 'page-layout-no-masthead-margin'; } if (!SiteOrigin_Settings_Page_Settings::get('footer_margin')) { $classes[] = 'page-layout-no-footer-margin'; } } if (!is_active_sidebar('main-sidebar')) { $classes[] = 'no-active-sidebar'; } if (siteorigin_setting('navigation_sticky')) { $classes[] = 'sticky-menu'; } if (wp_is_mobile()) { $classes[] = 'is_mobile'; } return $classes; }
/** * Adds custom classes to the array of body classes. * * @since vantage 1.0 */ function vantage_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author if (is_multi_author()) { $classes[] = 'group-blog'; } if (siteorigin_setting('layout_responsive')) { $classes[] = 'responsive'; } $classes[] = 'layout-' . siteorigin_setting('layout_bound'); $classes[] = 'no-js'; $is_full_width_template = is_page_template('templates/template-full.php') || is_page_template('templates/template-full-notitle.php'); if (!$is_full_width_template) { $wc_shop_sidebar = vantage_is_woocommerce_active() && is_shop() && is_active_sidebar('shop'); if (!is_active_sidebar('sidebar-1') && !$wc_shop_sidebar) { $classes[] = 'no-sidebar'; } else { $classes[] = 'has-sidebar'; } } if (wp_is_mobile()) { $classes[] = 'so-vantage-mobile-device'; } $mega_menu_active = function_exists('max_mega_menu_is_enabled') && max_mega_menu_is_enabled('primary'); if (siteorigin_setting('navigation_menu_search') && !$mega_menu_active) { $classes[] = 'has-menu-search'; } if (siteorigin_setting('layout_force_panels_full')) { $classes[] = 'panels-style-force-full'; } return $classes; }
public function widget($args, $instance) { // outputs the content of the widget global $post; if (!empty($post)) { } echo $args['before_widget']; echo get_avatar(get_the_author_meta('ID'), 40); ?> <div class="author-text"> <div class="title"><?php echo esc_html(siteorigin_setting('video_by_text', __('Video By', 'focus'))); ?> </div> <div class="author"><?php the_author_meta('display_name'); ?> </div> </div> <div class="clear"></div> <div class="post-info"><?php focus_posted_on(); ?> </div> <?php echo $args['after_widget']; }
/** * Initialize Pitch's slide post type */ function pitch_slide_init() { $labels = array('name' => _x('Slides', 'post type general name', 'pitch'), 'singular_name' => _x('Slide', 'post type singular name', 'pitch'), 'add_new' => _x('Add New', 'book', 'pitch'), 'add_new_item' => __('Add New Slide', 'pitch'), 'edit_item' => __('Edit Slide', 'pitch'), 'new_item' => __('New Slide', 'pitch'), 'all_items' => __('All Slide', 'pitch'), 'view_item' => __('View Slide', 'pitch'), 'search_items' => __('Search Slides', 'pitch'), 'not_found' => __('No slides found', 'pitch'), 'not_found_in_trash' => __('No slides found in Trash', 'pitch'), 'parent_item_colon' => '', 'menu_name' => __('Slides', 'pitch')); $args = array('labels' => $labels, 'public' => false, 'publicly_queryable' => false, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => false, 'rewrite' => false, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'thumbnail', 'excerpt', 'page-attributes'), 'menu_icon' => get_template_directory_uri() . '/images/post-types/slider-small.png'); register_post_type('slide', $args); add_image_size('slide', 960, siteorigin_setting('slider_height'), true); }
function siteorigin_north_woocommerce_enqueue_styles($styles) { $styles['northern-woocommerce'] = array('src' => get_template_directory_uri() . '/woocommerce.css', 'deps' => 'woocommerce-layout', 'version' => SITEORIGIN_THEME_VERSION, 'media' => 'all'); if (function_exists('is_woocommerce') && is_woocommerce() && siteorigin_setting('responsive_disabled')) { unset($styles['woocommerce-smallscreen']); } return $styles; }
/** * Configure the SiteOrigin page builder settings. * * @param $settings * @return mixed */ function vantage_panels_settings($settings) { $settings['home-page'] = true; $settings['margin-bottom'] = 35; $settings['home-page-default'] = 'default-home'; $settings['responsive'] = siteorigin_setting('layout_responsive'); return $settings; }
/** * @param SiteOrigin_Customizer_CSS_Builder $builder * @param mixed $val * @param array $setting * * @return SiteOrigin_Customizer_CSS_Builder */ function vantage_customizer_callback_site_title_size($builder, $val, $setting) { $mh_layout = siteorigin_setting('layout_masthead'); if ($mh_layout == 'logo-in-menu') { $builder->add_css('#masthead .hgroup h1, #masthead.masthead-logo-in-menu .logo > h1', 'font-size', $val * 0.6 . 'px'); } else { $builder->add_css('#masthead .hgroup h1, #masthead.masthead-logo-in-menu .logo > h1', 'font-size', $val . 'px'); } return $builder; }
/** * Add extras sizes for adaptive images */ function vantage_premium_mobile_image_setup() { if (siteorigin_setting('general_adaptive_images')) { // Add image sizes for different versions add_image_size('vantage-thumbnail-mobile', 330, 174, true); add_image_size('vantage-thumbnail-no-sidebar-mobile', 330, 116, true); // Add all the relevant hooks add_filter('wp_get_attachment_image_attributes', 'vantage_premium_filter_thumbnail_attributes', 10, 5); } }
/** * Initialize the project type * * @action init */ function pitch_project_init() { $labels = array('name' => _x('Projects', 'post type general name', 'pitch'), 'singular_name' => _x('Project', 'post type singular name', 'pitch'), 'add_new' => _x('Add New', 'book', 'pitch'), 'add_new_item' => __('Add New Project', 'pitch'), 'edit_item' => __('Edit Project', 'pitch'), 'new_item' => __('New Project', 'pitch'), 'all_items' => __('All Projects', 'pitch'), 'view_item' => __('View Project', 'pitch'), 'search_items' => __('Search Projects', 'pitch'), 'not_found' => __('No projects found', 'pitch'), 'not_found_in_trash' => __('No projects found in Trash', 'pitch'), 'parent_item_colon' => '', 'menu_name' => __('Projects', 'pitch')); $args = array('labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array('slug' => siteorigin_setting('project_url_slug')), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments'), 'menu_icon' => get_template_directory_uri() . '/images/post-types/project-small.png'); register_post_type('project', $args); // Now register the skills taxonomy if (siteorigin_setting('project_tags')) { $labels = array('name' => __('Skills', 'pitch'), 'singular_name' => __('Skill', 'pitch'), 'search_items' => __('Search Skills', 'pitch'), 'all_items' => __('All Skills', 'pitch'), 'parent_item' => __('Parent Skill', 'pitch'), 'parent_item_colon' => __('Parent Skill:', 'pitch'), 'edit_item' => __('Edit Skill', 'pitch'), 'update_item' => __('Update Skill', 'pitch'), 'add_new_item' => __('Add New Skill', 'pitch'), 'new_item_name' => __('New Skill Name', 'pitch'), 'menu_name' => __('Skill', 'pitch')); register_taxonomy('skill', 'project', array('hierarchical' => false, 'labels' => $labels, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'skill'))); } }
function vantage_metaslider_page_setting_metabox_render($post) { $metaslider = get_post_meta($post->ID, 'vantage_metaslider_slider', true); $is_home = $post->ID == get_option('page_on_front'); // If we're on the home page and the user hasn't explicitly set something here use the 'home_slider' theme setting. if ($is_home && empty($metaslider)) { $metaslider = siteorigin_setting('home_slider'); } // Default stretch setting to theme setting. $metaslider_stretch = siteorigin_setting('home_slider_stretch'); //Include the demo slider in the options if it's the home page. $options = siteorigin_metaslider_get_options($is_home); if (metadata_exists('post', $post->ID, 'vantage_metaslider_slider_stretch')) { $metaslider_stretch = get_post_meta($post->ID, 'vantage_metaslider_slider_stretch', true); } ?> <label><strong><?php _e('Display Page Meta Slider', 'vantage'); ?> </strong></label> <p> <select name="vantage_page_metaslider"> <?php foreach ($options as $id => $name) { ?> <option value="<?php echo esc_attr($id); ?> " <?php selected($metaslider, $id); ?> ><?php echo esc_html($name); ?> </option> <?php } ?> </select> </p> <p class="checkbox-wrapper"> <input id="vantage_page_metaslider_stretch" name="vantage_page_metaslider_stretch" type="checkbox" <?php checked($metaslider_stretch); ?> /> <label for="vantage_page_metaslider_stretch"><?php _e('Stretch Page Meta Slider', 'vantage'); ?> </label> </p> <?php wp_nonce_field('save', '_vantage_metaslider_nonce'); }
/** * Enqueue everything for the mobile navigation. * * @action wp_enqueue_scripts */ function siteorigin_mobilenav_enqueue_scripts() { wp_enqueue_script('siteorigin-mobilenav', get_template_directory_uri() . '/inc/mobilenav/js/mobilenav' . SITEORIGIN_THEME_JS_PREFIX . '.js', array('jquery'), SITEORIGIN_THEME_VERSION); $text = array('navigate' => __('Menu', 'vantage'), 'back' => __('Back', 'vantage'), 'close' => __('Close', 'vantage')); if (siteorigin_setting('navigation_responsive_menu_text')) { $text['navigate'] = siteorigin_setting('navigation_responsive_menu_text'); } $text = apply_filters('siteorigin_mobilenav_text', $text); $search = array('url' => get_home_url(), 'placeholder' => __('Search', 'vantage')); $search = apply_filters('siteorigin_mobilenav_search', $search); wp_localize_script('siteorigin-mobilenav', 'mobileNav', array('search' => $search, 'text' => $text, 'nextIconUrl' => get_template_directory_uri() . '/inc/mobilenav/images/next.png')); wp_enqueue_style('siteorigin-mobilenav', get_template_directory_uri() . '/inc/mobilenav/css/mobilenav.css', array(), SITEORIGIN_THEME_VERSION); }
/** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function ultra_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } // Adds a class of content-none if there are no posts. if (!have_posts()) { $classes[] = 'content-none'; } // Add widget-dependent classes. if (!is_active_sidebar('sidebar-1')) { $classes[] = 'one-column'; } // Add a class if the sidebar is use. if (is_active_sidebar('sidebar-1')) { $classes[] = 'sidebar'; } // Add the layout bound dependent classes. if (siteorigin_setting('layout_bound') == 'full') { $classes[] = 'full'; } if (siteorigin_setting('layout_bound') == 'boxed') { $classes[] = 'boxed'; } // Add a class if responsive layout is enabled. if (siteorigin_setting('layout_responsive')) { $classes[] = 'resp'; } // Add a class if responsive top bar is enabled. if (siteorigin_setting('navigation_responsive_top_bar')) { $classes[] = 'resp-top-bar'; } // Add a class if viewed on mobile. if (wp_is_mobile()) { $classes[] = 'mobile-device'; } // Add a class if the tagline is enabled. if (siteorigin_setting('header_tagline')) { $classes[] = 'tagline'; } // Add a class if the page slider overlap is true. if (get_post_meta(get_the_ID(), 'ultra_metaslider_slider_overlap', true) == true || is_front_page() && is_home() && siteorigin_setting('home_slider') != 'none' && siteorigin_setting('home_header_overlaps') == true) { $classes[] = 'overlap'; } return $classes; }
function vantage_display_breadcrumbs() { if (!is_front_page() && siteorigin_setting('navigation_yoast_breadcrumbs')) { if (function_exists('bcn_display')) { ?> <div id="navxt-breadcrumbs"> <div class="full-container"> <?php bcn_display(); ?> </div> </div><?php } elseif (function_exists('yoast_breadcrumb')) { yoast_breadcrumb('<div id="yoast-breadcrumbs"><div class="full-container">', '</div></div>'); } } }
function vantage_filter_nav_menu_items($item_output, $item, $depth, $args) { $object_type = get_post_meta($item->ID, '_menu_item_object', true); if ($object_type == 'page') { $object_id = get_post_meta($item->ID, '_menu_item_object_id', true); $icon = get_post_meta($object_id, 'vantage_menu_icon', true); if (!empty($icon)) { $item_output = str_replace('<span class="icon"></span>', '<span class="' . esc_attr($icon) . '"></span>', $item_output); } else { $item_output = str_replace('<span class="icon"></span>', '', $item_output); } } elseif ($object_type == 'custom') { if (siteorigin_setting('navigation_home_icon') && strpos($item_output, 'href="' . home_url('/') . '"', 0) !== false) { $item_output = str_replace('<span class="icon"></span>', '<span class="icon-home"></span>', $item_output); } } else { $item_output = str_replace('<span class="icon"></span>', '', $item_output); } return $item_output; }
function pitch_demo_template_redirect() { if (isset($_GET['demo_project']) && siteorigin_setting('type_project')) { $projects = wp_count_posts('project'); if ($projects->publish == 0) { // Display the demo projects if there aren't any real projects get_template_part('demo/project'); exit; } else { return; } } if (isset($_GET['features_page'])) { $projects = wp_count_posts('project'); if ($projects->publish == 0) { // Only display the features page when the user hasn't added any of their own projects get_template_part('demo/page', 'features'); exit; } } }
/** * Adds custom classes to the array of body classes. * * @since vantage 1.0 */ function vantage_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author if (is_multi_author()) { $classes[] = 'group-blog'; } if (siteorigin_setting('layout_responsive')) { $classes[] = 'responsive'; } $classes[] = 'layout-' . siteorigin_setting('layout_bound'); $classes[] = 'no-js'; if (!is_active_sidebar('sidebar-1')) { $classes[] = 'no-sidebar'; } if (wp_is_mobile()) { $classes[] = 'mobile-device'; } if (siteorigin_setting('navigation_menu_search')) { $classes[] = 'has-menu-search'; } return $classes; }
body_class(); ?> > <?php do_action('vantage_before_page_wrapper'); ?> <div id="page-wrapper"> <?php do_action('vantage_before_masthead'); ?> <?php get_template_part('parts/masthead', apply_filters('vantage_masthead_type', siteorigin_setting('layout_masthead'))); ?> <?php do_action('vantage_after_masthead'); ?> <?php vantage_render_slider(); ?> <?php do_action('vantage_before_main_container'); ?> <?php vantage_render_slider();
/** * Display the sticky header sentinel. */ function ultra_site_header_sentinel() { ?> <header class="site-header site-header-sentinel<?php if (siteorigin_setting('header_scale')) { echo ' scale'; } if (siteorigin_setting('navigation_responsive_menu')) { echo ' responsive-menu'; } ?> " role="banner"> <div class="container"> <div class="site-branding-container"> <div class="site-branding"> <a href="<?php echo esc_url(home_url('/')); ?> " rel="home"> <?php ultra_display_logo(); ?> </a> <?php if (get_bloginfo('description') && siteorigin_setting('header_tagline')) { ?> <h2 class="site-description"><?php bloginfo('description'); ?> </h2> <?php } ?> </div><!-- .site-branding --> </div><!-- .site-branding-container --> <nav class="main-navigation" role="navigation"> <?php do_action('ultra_before_nav'); ?> <?php wp_nav_menu(array('theme_location' => 'primary')); ?> <?php if (siteorigin_setting('navigation_menu_search')) { ?> <div class="menu-search"> <div class="search-icon"></div> <form method="get" class="searchform" action="<?php echo esc_url(home_url('/')); ?> " role="search"> <input type="text" class="field" name="s" value="<?php echo esc_attr(get_search_query()); ?> " /> </form> </div><!-- .menu-search --> <?php } ?> </nav><!-- #site-navigation --> </div><!-- .container --> </header><!-- #masthead --> <?php }
</label> <?php siteorigin_north_display_icon('search'); ?> </a> <?php } ?> </nav><!-- #site-navigation --> </div> </div> <?php if (siteorigin_setting('navigation_search')) { ?> <div id="header-search"> <div class="container"> <label for='s' class='screen-reader-text'><?php esc_html_e('Search for:', 'siteorigin-north'); ?> </label> <?php get_search_form(); ?> <a id="close-search"> <span class="screen-reader-text"><?php esc_html_e('Close search bar', 'siteorigin-north'); ?> </span>
* * @package ultra * @since ultra 0.9 * @license GPL 2.0 */ ?> <article id="post-<?php the_ID(); ?> " <?php post_class(); ?> > <?php if (has_post_thumbnail() && siteorigin_setting('pages_featured_image')) { ?> <div class="entry-thumbnail"> <?php the_post_thumbnail(); ?> </div> <?php } ?> <div class="entry-content"> <?php the_content(); ?>
/** * Render the share buttons. * * @param array $settings Settings for the share buttons. */ function siteorigin_share_render($settings = array()) { $settings = wp_parse_args($settings, array('width' => 25, 'like_text' => __('like', 'vantage'), 'twitter' => '')); static $facebook_loaded = false; if (!$facebook_loaded) { ?> <div id="fb-root"></div> <script type="text/javascript"> (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> <?php $facebook_loaded = true; } static $google_loaded = false; if (!$google_loaded) { ?> <script type="text/javascript"> // Google Plus One (function () { var po = document.createElement( 'script' ); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName( 'script' )[0]; s.parentNode.insertBefore( po, s ); })(); </script> <?php $google_loaded = true; } static $linkedin_loaded = false; if (!$linkedin_loaded) { ?> <script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script> <?php $linkedin_loaded = true; } ?> <ul class="share-buttons"> <li class="network facebook" style="width:<?php echo intval($settings['width']); ?> %"> <div class="fb-like" data-href="<?php echo get_permalink(); ?> " data-width="<?php echo intval($settings['width']); ?> " data-layout="button_count" data-send="false" data-height="21" data-show-faces="false" data-action="<?php echo esc_attr($settings['like_text']); ?> "></div> </li> <li class="network twitter" style="width:<?php echo intval($settings['width']); ?> %"> <?php $related = array(); $related[] = $settings['twitter']; $twitter_url = add_query_arg(array('url' => get_permalink(), 'via' => siteorigin_setting('social_twitter'), 'text' => get_the_title(), 'related' => implode(',', $related)), 'http' . (is_ssl() ? 's' : '') . '://platform.twitter.com/widgets/tweet_button.html'); ?> <iframe allowtransparency="true" frameborder="0" scrolling="no" src="<?php echo esc_attr($twitter_url); ?> " style="height:20px;"></iframe> </li> <li class="network plusone" style="width:<?php echo intval($settings['width']) - 4; ?> %"> <div class="g-plusone" data-size="medium" data-width="160"></div> </li> <li class="network linkedin" style="width:<?php echo intval($settings['width']) + 4; ?> %;"> <script type="IN/Share" data-counter="right"></script> </li> </ul> <?php }
/** * Display a special Origami image gallery * * @param $contents * @param $atts * @return string */ function origami_gallery($contents, $attr) { if (!siteorigin_setting('display_gallery')) { return $contents; } if (!empty($attr['type']) && $attr['type'] == 'default') { return ''; } if (siteorigin_panels_is_home() && empty($attr['ids'])) { // Display the default Origami gallery return origami_gallery_default(); } global $post; static $instance = 0; $instance++; // We're trusting author input, so let's at least make sure it looks like a valid orderby statement if (isset($attr['orderby'])) { $attr['orderby'] = sanitize_sql_orderby($attr['orderby']); if (!$attr['orderby']) { unset($attr['orderby']); } } /** * @var $order * @var $orderby * @var $id * @var $itemtag * @var $icontag * @var $captiontag * @var $size * @var $include * @var $exclude * @var $wp_default * @var $target_blank */ extract(shortcode_atts(array('order' => 'ASC', 'orderby' => 'menu_order ID', 'id' => $post->ID, 'itemtag' => 'dl', 'icontag' => 'dt', 'captiontag' => 'dd', 'columns' => 3, 'size' => 'origami-slider', 'include' => '', 'exclude' => '', 'wp_default' => false, 'target_blank' => false), $attr)); // This gallery has requested to use the WordPress default gallery if ($wp_default) { return $contents; } $id = intval($id); if ('RAND' == $order) { $orderby = 'none'; } if (!empty($include)) { $include = preg_replace('/[^0-9,]+/', '', $include); $_attachments = get_posts(array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby)); $attachments = array(); foreach ($_attachments as $key => $val) { $attachments[$val->ID] = $_attachments[$key]; } } elseif (!empty($exclude)) { $exclude = preg_replace('/[^0-9,]+/', '', $exclude); $attachments = get_children(array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby)); } else { $attachments = get_children(array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby)); } if (empty($attachments)) { return ''; } // This is the custom stuff // Create the gallery content $return = ''; $return .= '<div class="flexslider-wrapper">'; $return .= '<div class="flexslider">'; $return .= '<ul class="slides">'; foreach ($attachments as $attachment) { $return .= '<li>'; $return .= apply_filters('origami_slide_before', '', $attachment, $target_blank); $return .= wp_get_attachment_image($attachment->ID, $size, false, array('class' => 'slide-image')); if ($attachment->post_excerpt) { $return .= '<div class="flex-caption">' . $attachment->post_excerpt . '</div>'; } $return .= apply_filters('origami_slide_after', '', $attachment, $target_blank); $return .= '</li>'; } $return .= '</ul>'; $return .= '</div>'; $return .= '</div>'; return $return; }
<?php get_header(); ?> <div class="post"> <h1 class="entry-title noinfo"><?php _e('Not Found', 'origami'); ?> </h1> <div class="content" id="blog-archives"> <?php echo wpautop(wp_kses_post(siteorigin_setting('text_not_found', __("We couldn't find what you were looking for.", 'origami')))); ?> </div> </div> <?php get_footer();
/** * Display the top bar text. */ function ultra_top_bar_text_area() { $phone = wp_kses_post(siteorigin_setting('text_phone')); $email = wp_kses_post(siteorigin_setting('text_email')); if (siteorigin_setting('text_phone')) { echo '<span class="phone"><a href="tel:' . $phone . '">' . $phone . '</a></span>'; } if (siteorigin_setting('text_email')) { echo '<span class="email"><a href="mailto:' . $email . '">' . $email . '</a></span>'; } }
/** * The fallback navigation. * @param $args */ function pitch_fallback_nav($args) { $GLOBALS['menu_args'] = $args; if (siteorigin_setting('general_demo_mode')) { get_template_part('demo/menu', $args['theme_location']); } else { get_template_part('menu', $args['theme_location']); } }
<?php /** * Part Name: Top Bar */ ?> <div class="bottom-bar"> <div class="container"> <?php $copyright_text = apply_filters('ultra_copyright_text', siteorigin_setting('footer_copyright_text')); ?> <div class="site-info"> <?php echo wp_kses_post($copyright_text); ?> <?php if (siteorigin_setting('footer_copyright_text') && siteorigin_setting('footer_attribution')) { echo ' - '; } if (siteorigin_setting('footer_attribution')) { printf(__('Theme by <a href="%s" title="A Free WordPress Theme by Puro">Puro</a>', 'ultra'), 'http://purothemes.com'); } ?> </div><!-- .site-info --><?php wp_nav_menu(array('theme_location' => 'footer', 'container_class' => 'bottom-bar-menu', 'depth' => 1, 'fallback_cb' => '')); ?> </div><!-- .container --> </div><!-- .bottom-bar -->
function siteorigin_north_footer_text() { $text = siteorigin_setting('footer_text'); $text = str_replace(array('{sitename}', '{year}'), array(get_bloginfo('sitename'), date('Y')), $text); echo wp_kses_post($text); }