/** * Set up the widget's unique name, ID, class, description, and other options. * @since 0.1 */ function M21_Single_Ad_Widget(){ /* Check if Hybrid-core framework is active */ if( class_exists( 'Hybrid' ) ){ /* Set the widget prefix */ $this->prefix = hybrid_get_prefix(); /* Set the widget textdomain. */ $this->textdomain = hybrid_get_parent_textdomain(); } else { $this->prefix = 'mobility21'; $this->textdomain = 'mobility21'; } $widget_options = array( 'classname' => 'm21-single-ad', 'description' => esc_html__( 'Place a Mobility21 Partner ad.', $this->textdomain ) ); $control_options = array( 'height' => '300', 'width' => '525', 'id_base' => "{$this->prefix}-m21-single-ad", esc_attr__( 'M21 Single Ad', $this->textdomain ) ); $this->WP_Widget( "{$this->prefix}-m21-single-ad", esc_attr__( 'Mobility Single Ad Widget', $this->textdomain ), $widget_options, $control_options ); }
/** * Set up the widget's unique name, ID, class, description, and other options. * @since 0.1 */ function Squar_Banner_Item_Widget(){ /* Check if Hybrid-core framework is active */ if( class_exists( 'Hybrid' ) ){ /* Set the widget prefix */ $this->prefix = hybrid_get_prefix(); /* Set the widget textdomain. */ $this->textdomain = hybrid_get_parent_textdomain(); } else { $this->prefix = 'squar'; $this->textdomain = 'squar'; } /* Setup URL to Tim Thumb Script*/ $this->timthumb = SQUAR_SCRIPTS_URI . '/thumb.php'; $widget_options = array( 'classname' => 'banner-item', 'description' => esc_html__( 'Adds a banner item to frontpage slider or into the inside page banner area.', $this->textdomain ) ); $control_options = array( 'height' => '300', 'width' => '700', 'id_base' => "{$this->prefix}-banner-item", esc_attr__( 'A Banner Item', $this->textdomain ) ); $this->WP_Widget( "{$this->prefix}-banner-item", esc_attr__( 'A Banner Item', $this->textdomain ), $widget_options, $control_options ); }
/** * Set up the widget's unique name, ID, class, description, and other options. * @since 0.1 */ function Squar_Feature_Box_Widget(){ /* Setup URL to Tim Thumb Script*/ $this->timthumburl = SQUAR_SCRIPTS_URI . '/thumb.php'; /* Check if Hybrid-core framework is active */ if( class_exists( 'Hybrid' ) ){ /* Set the widget prefix */ $this->prefix = hybrid_get_prefix(); /* Set the widget textdomain. */ $this->textdomain = hybrid_get_parent_textdomain(); } else { $this->prefix = 'squar'; $this->textdomain = 'squar'; } $widget_options = array( 'classname' => 'feature-box', 'description' => esc_html__( 'Displays a feature box with an image which can link to a URL when clicked.', $this->textdomain ) ); $control_options = array( 'height' => '300', 'width' => '525', 'id_base' => "{$this->prefix}-feature-box", esc_attr__( 'Feature Box', $this->textdomain ) ); $this->WP_Widget( "{$this->prefix}-feature-box", esc_attr__( 'A Feature Box', $this->textdomain ), $widget_options, $control_options ); }
/** * Set up the widget's unique name, ID, class, description, and other options. * @since 0.1 */ function Image_Button_Widget(){ /* Check if Hybrid-core framework is active */ if( class_exists( 'Hybrid' ) ){ /* Set the widget prefix */ $this->prefix = hybrid_get_prefix(); /* Set the widget textdomain. */ $this->textdomain = hybrid_get_parent_textdomain(); } else { $this->prefix = 'mobility21'; $this->textdomain = 'mobility21'; } $widget_options = array( 'classname' => 'image-button', 'description' => esc_html__( 'Displays an image button and can link to a URL when clicked.', $this->textdomain ) ); $control_options = array( 'height' => '300', 'width' => '250', 'id_base' => "{$this->prefix}-image-button", esc_attr__( 'Image Button', $this->textdomain ) ); $this->WP_Widget( "{$this->prefix}-image-button", esc_attr__( 'Mobility Image Button', $this->textdomain ), $widget_options, $control_options ); }
function Pogidude_Event_Widget(){ /* Check if Hybrid-core framework is active */ if( class_exists( 'Hybrid' ) ){ /* Set the widget prefix */ $this->prefix = hybrid_get_prefix(); /* Set the widget textdomain. */ $this->textdomain = hybrid_get_parent_textdomain(); } else { $this->prefix = 'pogidude'; $this->textdomain = 'pogidude'; } $this->widget_id = 'event-widget'; $widget_options = array( 'classname' => "{$this->prefix}-{$this->widget_id}", 'description' => esc_html__( 'Displays your Events in the sidebar.', $this->textdomain ) ); $control_options = array( 'height' => '300', 'width' => '240', 'id_base' => "{$this->prefix}-{$this->widget_id}" ); $this->WP_Widget( "{$this->prefix}-{$this->widget_id}", esc_attr__( 'TM: Event Widget', $this->textdomain ), $widget_options, $control_options ); }
function Widget_Social_Connect(){ /* Check if Hybrid-core framework is active */ if( class_exists( 'Hybrid' ) ){ /* Set the widget prefix */ $this->prefix = hybrid_get_prefix(); /* Set the widget textdomain. */ $this->textdomain = hybrid_get_parent_textdomain(); } else { $this->prefix = 'pogidude'; $this->textdomain = 'pogidude'; } $this->widget_id = 'social-connect'; $widget_options = array( 'classname' => "{$this->prefix}-{$this->widget_id}", 'description' => esc_html__( 'Add social icons to your sidebar', $this->textdomain ) ); $control_options = array( 'height' => '300', 'width' => '240', 'id_base' => "{$this->prefix}-{$this->widget_id}" ); $this->WP_Widget( "{$this->prefix}-{$this->widget_id}", esc_attr__( 'Social Connect', $this->textdomain ), $widget_options, $control_options ); }
function Pogidude_Twitter_Feed_Widget(){ /* Check if Hybrid-core framework is active */ if( class_exists( 'Hybrid' ) ){ /* Set the widget prefix */ $this->prefix = hybrid_get_prefix(); /* Set the widget textdomain. */ $this->textdomain = hybrid_get_parent_textdomain(); } else { $this->prefix = 'pogidude'; $this->textdomain = 'pogidude'; } $widget_options = array( 'classname' => 'pogidude-twitter-feed', 'description' => esc_html__( 'Add your Twitter feed to your sidebar with this widget.', $this->textdomain ) ); $control_options = array( 'height' => '300', 'width' => '240', 'id_base' => "{$this->prefix}-twitter-feed" ); $this->WP_Widget( "{$this->prefix}-twitter-feed", esc_attr__( 'Twitter Stream', $this->textdomain ), $widget_options, $control_options ); }
/** * Set up the widget's unique name, ID, class, description, and other options. * @since 0.1 */ function Pogidude_Slider_Widget(){ /* Check if Hybrid-core framework is active */ if( class_exists( 'Hybrid' ) ){ /* Set the widget prefix */ $this->prefix = hybrid_get_prefix(); /* Set the widget textdomain. */ $this->textdomain = hybrid_get_parent_textdomain(); } else { $this->prefix = 'pogidude'; $this->textdomain = 'pogidude'; } //setup widget it $this->widget_id = 'slider-item'; //setup path to Tim Thumb script $this->timthumbUrl = trailingslashit( THEMELIB_SCRIPTS_URI ) . 'thumb.php'; $widget_options = array( 'classname' => "{$this->prefix}-{$this->widget_id}", 'description' => esc_html__( 'Adds a slider item. Use on slider widget area.', $this->textdomain ) ); $control_options = array( 'height' => '300', 'width' => '240', 'id_base' => "{$this->prefix}-{$this->widget_id}" ); $this->WP_Widget( "{$this->prefix}-{$this->widget_id}", esc_attr__( 'TM: Slider Item', $this->textdomain ), $widget_options, $control_options ); }
/** * Set up the widget's unique name, ID, class, description, and other options. * @since 0.1 */ function M21_Banner_Item_Widget(){ /* Check if Hybrid-core framework is active */ if( class_exists( 'Hybrid' ) ){ /* Set the widget prefix */ $this->prefix = hybrid_get_prefix(); /* Set the widget textdomain. */ $this->textdomain = hybrid_get_parent_textdomain(); } else { $this->prefix = 'mobility21'; $this->textdomain = 'mobility21'; } $widget_options = array( 'classname' => 'm21-banner-item', 'description' => esc_html__( 'Adds a banner item to Mobility 21 site frontpage slider or into the inside page banner area.', $this->textdomain ) ); $control_options = array( 'height' => '300', 'width' => '700', 'id_base' => "{$this->prefix}-m21-banner-item", esc_attr__( 'M21 Banner Item', $this->textdomain ) ); $this->WP_Widget( "{$this->prefix}-m21-banner-item", esc_attr__( 'Mobility Banner Item', $this->textdomain ), $widget_options, $control_options ); }
function Widget_Subscribe_Box(){ /* Check if Hybrid-core framework is active */ if( class_exists( 'Hybrid' ) ){ /* Set the widget prefix */ $this->prefix = hybrid_get_prefix(); /* Set the widget textdomain. */ $this->textdomain = hybrid_get_parent_textdomain(); } else { $this->prefix = 'pogidude'; $this->textdomain = 'pogidude'; } $this->widget_id = 'newsletter-subscribe-box'; $widget_options = array( 'classname' => "{$this->prefix}-{$this->widget_id}", 'description' => esc_html__( 'Add a newsletter subscribe box to your sidebar. Do not use this widget more than once in the same page.', $this->textdomain ) ); $control_options = array( 'height' => '300', 'width' => '240', 'id_base' => "{$this->prefix}-{$this->widget_id}" ); $this->WP_Widget( "{$this->prefix}-{$this->widget_id}", esc_attr__( 'Newsletter Subscribe', $this->textdomain ), $widget_options, $control_options ); }
function Widget_Class_Name_Widget(){ /* Check if Hybrid-core framework is active */ if( class_exists( 'Hybrid' ) ){ /* Set the widget prefix */ $this->prefix = hybrid_get_prefix(); /* Set the widget textdomain. */ $this->textdomain = hybrid_get_parent_textdomain(); } else { $this->prefix = 'prefix'; $this->textdomain = 'prefix'; } $this->widget_id = 'widget-id'; $widget_options = array( 'classname' => "{$this->prefix}-{$this->widget_id}", 'description' => esc_html__( 'Description of the widget', $this->textdomain ) ); $control_options = array( 'height' => '300', 'width' => '240', 'id_base' => "{$this->prefix}-{$this->widget_id}" ); $this->WP_Widget( "{$this->prefix}-{$this->widget_id}", esc_attr__( 'Widget Name', $this->textdomain ), $widget_options, $control_options ); }
if (pings_open() && !comments_open()) { ?> <p class="comments-closed pings-open"> <?php printf(__('Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', hybrid_get_parent_textdomain()), get_trackback_url()); ?> </p><!-- .comments-closed .pings-open --> <?php } elseif (!comments_open()) { ?> <p class="comments-closed"> <?php _e('Comments are closed.', hybrid_get_parent_textdomain()); ?> </p><!-- .comments-closed --> <?php } ?> </div><!-- #comments --> <?php comment_form(); // Loads the comment form. ?> </div><!-- .comments-wrap -->
<?php } elseif (is_singular('post')) { ?> <div class="loop-nav"> <?php previous_post_link('<div class="previous">' . __('← %link', hybrid_get_parent_textdomain()) . '</div>', '%title'); ?> <?php next_post_link('<div class="next">' . __('%link', hybrid_get_parent_textdomain()) . ' →</div>', '%title'); ?> </div><!-- .loop-nav --> <?php } elseif (!is_singular() && current_theme_supports('loop-pagination')) { loop_pagination(); ?> <?php } elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous">' . __('← Previous', hybrid_get_parent_textdomain()) . '</span>', 'nxtlabel' => '<span class="next">' . __('Next →', hybrid_get_parent_textdomain()) . '</span>')))) { ?> <div class="loop-nav"> <?php echo $nav; ?> </div><!-- .loop-nav --> <?php }
/** * Loads both the parent and child theme translation files. If a locale-based functions file exists * in either the parent or child theme (child overrides parent), it will also be loaded. All translation * and locale functions files are expected to be within the theme's '/languages' folder, but the * framework will fall back on the theme root folder if necessary. Translation files are expected * to be prefixed with the template or stylesheet path (example: 'templatename-en_US.mo'). * * @since 1.2.0 */ function i18n() { global $hybrid; /* Get parent and child theme textdomains. */ $parent_textdomain = hybrid_get_parent_textdomain(); $child_textdomain = hybrid_get_child_textdomain(); /* Load the framework textdomain. */ $hybrid->textdomain_loaded['hybrid-core'] = hybrid_load_framework_textdomain('hybrid-core'); /* Load theme textdomain. */ $hybrid->textdomain_loaded[$parent_textdomain] = load_theme_textdomain($parent_textdomain); /* Load child theme textdomain. */ $hybrid->textdomain_loaded[$child_textdomain] = is_child_theme() ? load_child_theme_textdomain($child_textdomain) : false; /* Get the user's locale. */ $locale = get_locale(); /* Locate a locale-specific functions file. */ $locale_functions = locate_template(array("languages/{$locale}.php", "{$locale}.php")); /* If the locale file exists and is readable, load it. */ if (!empty($locale_functions) && is_readable($locale_functions)) { require_once $locale_functions; } }
/** * Filters the 'load_textdomain_mofile' filter hook so that we can change the directory and file name * of the mofile for translations. This allows child themes to have a folder called /languages with translations * of their parent theme so that the translations aren't lost on a parent theme upgrade. * * @since 1.3.0 * @access public * @param string $mofile File name of the .mo file. * @param string $domain The textdomain currently being filtered. * @return string */ function hybrid_load_textdomain_mofile($mofile, $domain) { // If the $domain is for the parent or child theme, search for a $domain-$locale.mo file. if ($domain == hybrid_get_parent_textdomain() || $domain == hybrid_get_child_textdomain()) { // Get the locale. $locale = get_locale(); // Get just the theme path and file name for the mofile. $mofile_short = str_replace("{$locale}.mo", "{$domain}-{$locale}.mo", $mofile); $mofile_short = str_replace(array(HYBRID_PARENT, HYBRID_CHILD), '', $mofile_short); // Attempt to find the correct mofile. $locate_mofile = locate_template(array($mofile_short)); // Return the mofile. return $locate_mofile ? $locate_mofile : $mofile; } return $mofile; }
function oxygen_theme_meta_box() { ?> <table class="form-table"> <!-- Favicon upload --> <tr class="favicon_url"> <th> <label for="<?php echo hybrid_settings_field_id('oxygen_favicon_url'); ?> "><?php _e('Favicon:', hybrid_get_parent_textdomain()); ?> </label> </th> <td> <input type="text" id="<?php echo hybrid_settings_field_id('oxygen_favicon_url'); ?> " name="<?php echo hybrid_settings_field_name('oxygen_favicon_url'); ?> " value="<?php echo esc_attr(hybrid_get_setting('oxygen_favicon_url')); ?> " /> <input id="oxygen_favicon_upload_button" class="button" type="button" value="Upload" /> <br /> <span class="description"><?php _e('Upload favicon image (recommended max size: 32x32).', hybrid_get_parent_textdomain()); ?> </span> <?php /* Display uploaded image */ if (hybrid_get_setting('oxygen_favicon_url')) { ?> <p><img src="<?php echo hybrid_get_setting('oxygen_favicon_url'); ?> " alt=""/></p> <?php } ?> </td> </tr> <!-- Logo upload --> <tr class="logo_url"> <th> <label for="<?php echo hybrid_settings_field_id('oxygen_logo_url'); ?> "><?php _e('Logo:', hybrid_get_parent_textdomain()); ?> </label> </th> <td> <input type="text" id="<?php echo hybrid_settings_field_id('oxygen_logo_url'); ?> " name="<?php echo hybrid_settings_field_name('oxygen_logo_url'); ?> " value="<?php echo esc_attr(hybrid_get_setting('oxygen_logo_url')); ?> " /> <input id="oxygen_logo_upload_button" class="button" type="button" value="Upload" /> <br /> <span class="description"><?php _e('Upload logo image.', hybrid_get_parent_textdomain()); ?> </span> <?php /* Display uploaded image */ if (hybrid_get_setting('oxygen_logo_url')) { ?> <p><img src="<?php echo hybrid_get_setting('oxygen_logo_url'); ?> " alt=""/></p> <?php } ?> </td> </tr> <!-- Title font family --> <tr> <th> <label for="<?php echo hybrid_settings_field_id('oxygen_font_family'); ?> "><?php _e('Title font family:', hybrid_get_parent_textdomain()); ?> </label> </th> <td> <select id="<?php echo hybrid_settings_field_id('oxygen_font_family'); ?> " name="<?php echo hybrid_settings_field_name('oxygen_font_family'); ?> "> <option value="Abel" <?php echo hybrid_get_setting('oxygen_font_family') == 'Abel' ? 'selected="selected"' : ''; ?> > <?php echo __('Abel', hybrid_get_parent_textdomain()); ?> </option> <option value="Oswald" <?php echo hybrid_get_setting('oxygen_font_family') == 'Oswald' ? 'selected="selected"' : ''; ?> > <?php echo __('Oswald', hybrid_get_parent_textdomain()); ?> </option> <option value="Terminal Dosis" <?php echo hybrid_get_setting('oxygen_font_family') == 'Terminal Dosis' ? 'selected="selected"' : ''; ?> > <?php echo __('Terminal Dosis', hybrid_get_parent_textdomain()); ?> </option> <option value="Bitter" <?php echo hybrid_get_setting('oxygen_font_family', 'Bitter') == 'Bitter' ? 'selected="selected"' : ''; ?> > <?php echo __('Bitter', hybrid_get_parent_textdomain()); ?> </option> <option value="Georgia" <?php echo hybrid_get_setting('oxygen_font_family') == 'Georgia' ? 'selected="selected"' : ''; ?> > <?php echo __('Georgia', hybrid_get_parent_textdomain()); ?> </option> <option value="Droid Serif" <?php echo hybrid_get_setting('oxygen_font_family') == 'Droid Serif' ? 'selected="selected"' : ''; ?> > <?php echo __('Droid Serif', hybrid_get_parent_textdomain()); ?> </option> <option value="Helvetica" <?php echo hybrid_get_setting('oxygen_font_family') == 'Helvetica' ? 'selected="selected"' : ''; ?> > <?php echo __('Helvetica', hybrid_get_parent_textdomain()); ?> </option> <option value="Arial" <?php echo hybrid_get_setting('oxygen_font_family') == 'Arial' ? 'selected="selected"' : ''; ?> > <?php echo __('Arial', hybrid_get_parent_textdomain()); ?> </option> <option value="Droid Sans" <?php echo hybrid_get_setting('oxygen_font_family') == 'Droid Sans' ? 'selected="selected"' : ''; ?> > <?php echo __('Droid Sans', hybrid_get_parent_textdomain()); ?> </option> </select> <span class="description"><?php _e('Choose a font for the titles.', hybrid_get_parent_textdomain()); ?> </span> </td> </tr> <!-- Font size --> <tr> <th> <label for="<?php echo hybrid_settings_field_id('oxygen_font_size'); ?> "><?php _e('Font size:', hybrid_get_parent_textdomain()); ?> </label> </th> <td> <select id="<?php echo hybrid_settings_field_id('oxygen_font_size'); ?> " name="<?php echo hybrid_settings_field_name('oxygen_font_size'); ?> "> <option value="16" <?php echo hybrid_get_setting('oxygen_font_size', '16') == '16' ? 'selected="selected"' : ''; ?> > <?php echo __('default', hybrid_get_parent_textdomain()); ?> </option> <option value="17" <?php echo hybrid_get_setting('oxygen_font_size', '17') == '17' ? 'selected="selected"' : ''; ?> > <?php echo __('17', hybrid_get_parent_textdomain()); ?> </option> <option value="16" <?php echo hybrid_get_setting('oxygen_font_size', '16') == '16' ? 'selected="selected"' : ''; ?> > <?php echo __('16', hybrid_get_parent_textdomain()); ?> </option> <option value="15" <?php echo hybrid_get_setting('oxygen_font_size') == '15' ? 'selected="selected"' : ''; ?> > <?php echo __('15', hybrid_get_parent_textdomain()); ?> </option> <option value="14" <?php echo hybrid_get_setting('oxygen_font_size') == '14' ? 'selected="selected"' : ''; ?> > <?php echo __('14', hybrid_get_parent_textdomain()); ?> </option> <option value="13" <?php echo hybrid_get_setting('oxygen_font_size') == '13' ? 'selected="selected"' : ''; ?> > <?php echo __('13', hybrid_get_parent_textdomain()); ?> </option> <option value="12" <?php echo hybrid_get_setting('oxygen_font_size') == '12' ? 'selected="selected"' : ''; ?> > <?php echo __('12', hybrid_get_parent_textdomain()); ?> </option> </select> <span class="description"><?php _e('The base font size in pixels.', hybrid_get_parent_textdomain()); ?> </span> </td> </tr> <!-- Link color --> <tr> <th> <label for="<?php echo hybrid_settings_field_id('oxygen_link_color'); ?> "><?php _e('Link color:', hybrid_get_parent_textdomain()); ?> </label> </th> <td> <input type="text" id="<?php echo hybrid_settings_field_id('oxygen_link_color'); ?> " name="<?php echo hybrid_settings_field_name('oxygen_link_color'); ?> " size="8" value="<?php echo hybrid_get_setting('oxygen_link_color') ? esc_attr(hybrid_get_setting('oxygen_link_color')) : '#0da4d3'; ?> " data-hex="true" /> <div id="colorpicker_link_color"></div> <span class="description"><?php _e('Set the theme link color.', hybrid_get_parent_textdomain()); ?> </span> </td> </tr> <!-- Slider Timeout --> <tr> <th> <label for="<?php echo hybrid_settings_field_id('oxygen_slider_timeout'); ?> "><?php _e('Slider Timeout:', hybrid_get_parent_textdomain()); ?> </label> </th> <td> <input type="text" id="<?php echo hybrid_settings_field_id('oxygen_slider_timeout'); ?> " name="<?php echo hybrid_settings_field_name('oxygen_slider_timeout'); ?> " value="<?php echo hybrid_get_setting('oxygen_slider_timeout') ? esc_attr(hybrid_get_setting('oxygen_slider_timeout')) : '6000'; ?> " /> <span class="description"><?php _e('The time interval between slides in milliseconds.', hybrid_get_parent_textdomain()); ?> </span> </td> </tr> <!-- Custom CSS --> <tr> <th> <label for="<?php echo hybrid_settings_field_id('oxygen_custom_css'); ?> "><?php _e('Custom CSS:', hybrid_get_parent_textdomain()); ?> </label> </th> <td> <textarea id="<?php echo hybrid_settings_field_id('oxygen_custom_css'); ?> " name="<?php echo hybrid_settings_field_name('oxygen_custom_css'); ?> " cols="60" rows="8"><?php echo wp_htmledit_pre(stripslashes(hybrid_get_setting('oxygen_custom_css'))); ?> </textarea> <span class="description"><?php _e('Add your custom CSS here. It would overwrite any default or custom theme settings.', hybrid_get_parent_textdomain()); ?> </span> </td> </tr> <!-- End custom form elements. --> </table><!-- .form-table --><?php }
?> <div id="post-<?php the_ID(); ?> " class="<?php hybrid_entry_class(); ?> "> <?php echo apply_atomic_shortcode('entry_title', '[entry-title]'); ?> <?php echo apply_atomic_shortcode('byline', '<div class="byline">' . __('[entry-published] / by [entry-author] / in [entry-terms taxonomy="category"] [entry-edit-link before=" / "]', hybrid_get_parent_textdomain()) . '</div>'); ?> </div><!-- .hentry --> <?php } ?> <?php } else { ?> <?php get_template_part('loop-error');
<?php do_atomic( 'before_comment' ); // {theme-name}_before_comment ?> <div class="author-avatar vcard"> <?php echo get_avatar($comment,$size='48' ); ?> </div> <div class="comment-author"> <?php printf( __('<h4 class="fn">%s</h4>'), get_comment_author_link() ); ?> </div> <div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></a> <a class="comment-link" href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('Link to this comment')) ?></a><?php edit_comment_link(__('(Edit)'),' ','') ?></div> <div class="comment-text"> <?php if ( '0' == $comment->comment_approved ) : ?> <p class="alert moderation"><?php _e( 'Your comment is awaiting moderation.', hybrid_get_parent_textdomain() ); ?></p> <?php endif; ?> <?php comment_text( $comment->comment_ID ); ?> <div class="reply"> <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?> </div> </div><!-- .comment-text --> <?php do_atomic( 'after_comment' ); // {theme-name}_after_comment ?> <?php /* No closing </li> is needed. WordPress will know where to add it. */ ?>
/** * Gets the items for the breadcrumb trail if bbPress is installed. * * @since 0.5.0 * @access private * @param array $args Mixed arguments for the menu. * @return array List of items to be shown in the trail. */ function breadcrumb_trail_get_bbpress_items($args = array()) { /* Set up a new trail items array. */ $trail = array(); /* Get the forum post type object. */ $post_type_object = get_post_type_object(bbp_get_forum_post_type()); /* If not viewing the forum root/archive page and a forum archive exists, add it. */ if (!empty($post_type_object->has_archive) && !bbp_is_forum_archive()) { $trail[] = '<a href="' . get_post_type_archive_link(bbp_get_forum_post_type()) . '">' . bbp_get_forum_archive_title() . '</a>'; } /* If viewing the forum root/archive. */ if (bbp_is_forum_archive()) { $trail[] = bbp_get_forum_archive_title(); } elseif (bbp_is_topic_archive()) { $trail[] = bbp_get_topic_archive_title(); } elseif (bbp_is_topic_tag()) { $trail[] = bbp_get_topic_tag_name(); } elseif (bbp_is_topic_tag_edit()) { $trail[] = '<a href="' . bbp_get_topic_tag_link() . '">' . bbp_get_topic_tag_name() . '</a>'; $trail[] = __('Edit', 'breadcrumb-trail'); } elseif (bbp_is_single_view()) { $trail[] = bbp_get_view_title(); } elseif (bbp_is_single_topic()) { /* Get the queried topic. */ $topic_id = get_queried_object_id(); /* Get the parent items for the topic, which would be its forum (and possibly forum grandparents). */ $trail = array_merge($trail, breadcrumb_trail_get_parents(bbp_get_topic_forum_id($topic_id))); /* If viewing a split, merge, or edit topic page, show the link back to the topic. Else, display topic title. */ if (bbp_is_topic_split() || bbp_is_topic_merge() || bbp_is_topic_edit()) { $trail[] = '<a href="' . bbp_get_topic_permalink($topic_id) . '">' . bbp_get_topic_title($topic_id) . '</a>'; } else { $trail[] = bbp_get_topic_title($topic_id); } /* If viewing a topic split page. */ if (bbp_is_topic_split()) { $trail[] = __('Split', 'breadcrumb-trail'); } elseif (bbp_is_topic_merge()) { $trail[] = __('Merge', 'breadcrumb-trail'); } elseif (bbp_is_topic_edit()) { $trail[] = __('Edit', 'breadcrumb-trail'); } } elseif (bbp_is_single_reply()) { /* Get the queried reply object ID. */ $reply_id = get_queried_object_id(); /* Get the parent items for the reply, which should be its topic. */ $trail = array_merge($trail, breadcrumb_trail_get_parents(bbp_get_reply_topic_id($reply_id))); /* If viewing a reply edit page, link back to the reply. Else, display the reply title. */ if (bbp_is_reply_edit()) { $trail[] = '<a href="' . bbp_get_reply_url($reply_id) . '">' . bbp_get_reply_title($reply_id) . '</a>'; $trail[] = __('Edit', 'breadcrumb-trail'); } else { $trail[] = bbp_get_reply_title($reply_id); } } elseif (bbp_is_single_forum()) { /* Get the queried forum ID and its parent forum ID. */ $forum_id = get_queried_object_id(); $forum_parent_id = bbp_get_forum_parent($forum_id); /* If the forum has a parent forum, get its parent(s). */ if (0 !== $forum_parent_id) { $trail = array_merge($trail, breadcrumb_trail_get_parents($forum_parent_id)); } /* Add the forum title to the end of the trail. */ $trail[] = bbp_get_forum_title($forum_id); } elseif (bbp_is_single_user() || bbp_is_single_user_edit()) { if (bbp_is_single_user_edit()) { $trail[] = '<a href="' . bbp_get_user_profile_url() . '">' . bbp_get_displayed_user_field('display_name') . '</a>'; $trail[] = __('Edit', hybrid_get_parent_textdomain()); } else { $trail[] = bbp_get_displayed_user_field('display_name'); } } /* Return the bbPress breadcrumb trail items. */ return apply_filters('breadcrumb_trail_get_bbpress_items', $trail, $args); }
/** * Loads both the parent and child theme translation files. If a locale-based functions file exists * in either the parent or child theme (child overrides parent), it will also be loaded. All translation * and locale functions files are expected to be within the theme's '/languages' folder, but the * framework will fall back on the theme root folder if necessary. Translation files are expected * to be prefixed with the template or stylesheet path (example: 'templatename-en_US.mo'). * * @since 1.2.0 * @access public * @return void */ function i18n() { global $hybrid; /* Get parent and child theme textdomains. */ $parent_textdomain = hybrid_get_parent_textdomain(); $child_textdomain = hybrid_get_child_textdomain(); /* Load theme textdomain. */ $hybrid->textdomain_loaded[$parent_textdomain] = load_theme_textdomain($parent_textdomain); /* Load child theme textdomain. */ $hybrid->textdomain_loaded[$child_textdomain] = is_child_theme() ? load_child_theme_textdomain($child_textdomain) : false; /* Load the framework textdomain. */ $hybrid->textdomain_loaded['hybrid-core'] = hybrid_load_framework_textdomain('hybrid-core'); /* Load empty textdomain mofiles for extensions (these will be overwritten). */ if (current_theme_supports('breadcrumb-trail')) { load_textdomain('breadcrumb-trail', ''); } if (current_theme_supports('post-stylesheets')) { load_textdomain('post-stylesheets', ''); } if (current_theme_supports('theme-layouts')) { load_textdomain('theme-layouts', ''); } /* Get the user's locale. */ $locale = get_locale(); /* Locate a locale-specific functions file. */ $locale_functions = locate_template(array("languages/{$locale}.php", "{$locale}.php")); /* If the locale file exists and is readable, load it. */ if (!empty($locale_functions) && is_readable($locale_functions)) { require_once $locale_functions; } }
/** * Filters the 'load_textdomain_mofile' filter hook so that we can change the directory and file name * of the mofile for translations. This allows child themes to have a folder called /languages with translations * of their parent theme so that the translations aren't lost on a parent theme upgrade. * * @since 1.3.0 * @access public * @param string $mofile File name of the .mo file. * @param string $domain The textdomain currently being filtered. * @return string */ function hybrid_load_textdomain_mofile($mofile, $domain) { /* If the $domain is for the parent or child theme, search for a $domain-$locale.mo file. */ if ($domain == hybrid_get_parent_textdomain() || $domain == hybrid_get_child_textdomain()) { /* Check for a $domain-$locale.mo file in the parent and child theme root and /languages folder. */ $locale = get_locale(); $locate_mofile = locate_template(array("languages/{$domain}-{$locale}.mo", "{$domain}-{$locale}.mo")); /* If a mofile was found based on the given format, set $mofile to that file name. */ if (!empty($locate_mofile)) { $mofile = $locate_mofile; } } /* Return the $mofile string. */ return $mofile; }
<?php /** * Loop Error Template * * Displays an error message when no posts are found. * * @package Oxygen * @subpackage Template */ ?> <div id="post-0" class="<?php hybrid_entry_class(); ?> "> <div class="entry-content"> <p><?php _e('Apologies, but no entries were found.', hybrid_get_parent_textdomain()); ?> </p> </div><!-- .entry-content --> </div><!-- .hentry .error -->
?> </div> <?php echo apply_atomic_shortcode('byline', '<div class="byline-cat">' . __('[entry-terms taxonomy="category" before=""]', hybrid_get_parent_textdomain()) . '</div>'); ?> <div class="entry-summary"> <?php the_excerpt(); ?> <?php wp_link_pages(array('before' => '<p class="page-links">' . __('Pages:', hybrid_get_parent_textdomain()), 'after' => '</p>')); ?> </div> <a class="read-more" href="<?php the_permalink(); ?> ">Read Article →</a> <?php do_atomic('close_entry'); // oxygen_close_entry ?> </div><!-- .hentry -->
/** * Filters 'ngettext_with_context' to change the translations used for each of the extensions' textdomains. * * @since 1.6.0 * @access public * @param string $translated The translated text. * @param string $single The singular form of the untranslated text. * @param string $plural The plural form of the untranslated text. * @param int $number The number to use to base whether something is singular or plural. * @param string $context The context of the text. * @param string $domain The textdomain for the text. * @return string */ function hybrid_extensions_ngettext_with_context($translated, $single, $plural, $number, $context, $domain) { $extensions = array('breadcrumb-trail', 'custom-field-series', 'featured-header', 'post-stylesheets', 'theme-fonts', 'theme-layouts'); /* Check if the current textdomain matches one of the framework extensions. */ if (in_array($domain, $extensions) && current_theme_supports($domain)) { /* If the framework mofile is loaded, use its translations. */ if (hybrid_is_textdomain_loaded('hybrid-core')) { $translated = hybrid_translate_plural('hybrid-core', $single, $plural, $number, $context); } elseif (hybrid_is_textdomain_loaded(hybrid_get_parent_textdomain())) { $translated = hybrid_translate_plural(hybrid_get_parent_textdomain(), $single, $plural, $number, $context); } } return $translated; }
/** * Filters 'gettext' to change the translations used for the each of the extensions' textdomains. This filter * makes it possible for the theme's MO file to translate the framework's extensions. * * @since 1.3.0 * @access private * @param string $translated The translated text. * @param string $text The original, untranslated text. * @param string $domain The textdomain for the text. * @return string $translated */ function hybrid_extensions_gettext($translated, $text, $domain) { /* Check if the current textdomain matches one of the framework extensions. */ if (in_array($domain, array('breadcrumb-trail', 'custom-field-series', 'post-stylesheets', 'theme-layouts'))) { /* If the theme supports the extension, switch the translations. */ if (current_theme_supports($domain)) { /* If the framework mofile is loaded, use its translations. */ if (hybrid_is_textdomain_loaded('hybrid-core')) { $translations =& get_translations_for_domain('hybrid-core'); } elseif (hybrid_is_textdomain_loaded(hybrid_get_parent_textdomain())) { $translations =& get_translations_for_domain(hybrid_get_parent_textdomain()); } /* If translations were found, translate the text. */ if (!empty($translations)) { $translated = $translations->translate($text); } } } return $translated; }
?> <div class="featured-post"> <?php if (current_theme_supports('get-the-image')) { get_the_image(array('meta_key' => 'Thumbnail', 'size' => 'featured-thumbnail')); } ?> <?php echo apply_atomic_shortcode('entry_title', '[entry-title]'); ?> <?php echo apply_atomic_shortcode('byline', '<div class="byline">' . __('[entry-published]', hybrid_get_parent_textdomain()) . '</div>'); ?> </div> <!-- .featured-post --> <?php } ?> <span id="slider-prev" class="slider-nav">←</span> <span id="slider-next" class="slider-nav">→</span> </div><!-- #featured-content --> <div id="slider-nav">
?> <div class="entry-content"> <?php the_content(__('Continue reading <span class="meta-nav">→</span>', hybrid_get_parent_textdomain())); ?> <?php wp_link_pages(array('before' => '<p class="page-links">' . __('Pages:', hybrid_get_parent_textdomain()), 'after' => '</p>')); ?> </div><!-- .entry-content --> <?php echo apply_atomic_shortcode('entry_meta', '<div class="entry-meta">' . __('[entry-terms taxonomy="post_tag" before="Tags: "]', hybrid_get_parent_textdomain()) . '</div>'); ?> <?php do_atomic('close_entry'); // oxygen_close_entry ?> </div><!-- .post-content --> </div><!-- .hentry --> <?php do_atomic('after_entry'); // oxygen_after_entry ?>
<?php elseif ( is_post_type_archive() ) : ?> <?php $post_type = get_post_type_object( get_query_var( 'post_type' ) ); ?> <div class="loop-meta"> <h3 class="loop-title"><?php post_type_archive_title(); ?></h3> <div class="loop-description"> <?php if ( !empty( $post_type->description ) ) echo "<p>{$post_type->description}</p>"; ?> </div><!-- .loop-description --> </div><!-- .loop-meta --> <?php elseif ( is_archive() ) : ?> <div class="loop-meta"> <h3 class="loop-title"><?php _e( 'Archives', hybrid_get_parent_textdomain() ); ?></h3> <div class="loop-description"> <p> <?php _e( 'You are browsing the site archives.', hybrid_get_parent_textdomain() ); ?> </p> </div><!-- .loop-description --> </div><!-- .loop-meta --> <?php endif; ?>
<?php do_atomic( 'after_comment_list' ); // After comment list hook ?> <?php if ( get_option( 'page_comments' ) ) : ?> <div class="comment-navigation comment-pagination paged-navigation"> <?php paginate_comments_links(); ?> </div><!-- .comment-navigation --> <?php endif; ?> </div><!-- #comments --> <?php else : ?> <?php if ( pings_open() && !comments_open() ) : ?> <p class="comments-closed pings-open"> <?php printf( __( 'Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', hybrid_get_parent_textdomain() ), trackback_url( '0' ) ); ?> </p><!-- .comments-closed .pings-open --> <?php endif; ?> <?php endif; ?> <?php //modify comment form $args = array( 'title_reply' => __('Leave a comment'), 'label_submit' => __('Submit'), ); ?> <?php comment_form( $args ); // Load the comment form. ?> </div><!-- #comments-template -->
<?php /** * Search Form Template * * The search form template displays the search form. * * @package Prototype * @subpackage Template */ ?> <div class="search"> <form method="get" class="search-form" action="<?php echo trailingslashit( home_url() ); ?>"> <div> <input class="search-text" type="text" name="s" value="<?php if ( is_search() ) echo esc_attr( get_search_query() ); else esc_attr_e( 'Search this site...', hybrid_get_parent_textdomain() ); ?>" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" /> <input class="search-submit button" name="submit" type="submit" value="<?php esc_attr_e( 'Search', hybrid_get_parent_textdomain() ); ?>" /> </div> </form><!-- .search-form --> </div><!-- .search -->