Esempio n. 1
0
/**
 * Function to load JavaScript at appropriate time. Loads comment reply script only if 
 * users choose to use nested comments. Users should load custom JavaScript with 
 * wp_enqueue_script() in their child theme's functions.php file.
 *
 * If selected, the drop-downs.js file will be loaded, which is a bundled version of the
 * Superfish jQuery plugin.
 *
 * @since 0.1
 * @link http://codex.wordpress.org/Function_Reference/wp_enqueue_script
 * @link http://users.tpg.com.au/j_birch/plugins/superfish
 */
function hybrid_enqueue_script() {

	/* Don't load any scripts in the admin. */
	if ( is_admin() )
		return;

	/* Comment reply. */
	if ( is_singular() && get_option( 'thread_comments' ) && comments_open() )
		wp_enqueue_script( 'comment-reply' );

	/* Superfish drop-down menus. */
	if ( hybrid_get_setting( 'superfish_js' ) )
		wp_enqueue_script( 'drop-downs', esc_url( apply_atomic( 'drop_downs_script', THEME_JS . '/drop-downs.js' ) ), array( 'jquery' ), 1.4, true );
}
/**
 * Creates a meta box that allows users to customize their footer.
 *
 * @since 1.2.0
 * @uses wp_editor() Creates an instance of the WordPress text/content editor.
 * @return void
 */
function hybrid_meta_box_theme_display_footer()
{
    /* Add a textarea using the wp_editor() function to make it easier on users to add custom content. */
    wp_editor(esc_textarea(hybrid_get_setting('footer_insert')), hybrid_settings_field_id('footer_insert'), array('tinymce' => false, 'textarea_name' => hybrid_settings_field_name('footer_insert')));
    ?>

	<p>
		<span class="description"><?php 
    _e('You can add custom <acronym title="Hypertext Markup Language">HTML</acronym> and/or shortcodes, which will be automatically inserted into your theme.', 'hybrid-core');
    ?>
</span>
	</p>

<?php 
}
Esempio n. 3
0
/**
 * Creates the settings for the post meta box depending on some things in how the theme is
 * set up.
 *
 * @since 0.7
 * @param string $type The post_type of the current post in the post editor.
 */
function hybrid_post_meta_box_args( $type = '' ) {

	/* Get theme information. */
	$prefix = hybrid_get_prefix();
	$domain = hybrid_get_textdomain();

	/* If no post type is given, default to 'post'. */
	if ( empty( $type ) )
		$type = 'post';

	/* If the disable SEO plugin setting is not selected, allow the input of custom meta. */
	if ( !hybrid_get_setting( 'seo_plugin' ) ) {
		$meta['title'] = array( 'name' => 'Title', 'title' => __( 'Title:', $domain ), 'type' => 'text' );
		$meta['description'] = array( 'name' => 'Description', 'title' => __( 'Description:', $domain ), 'type' => 'textarea' );
		$meta['keywords'] = array( 'name' => 'Keywords', 'title' => __( 'Keywords:', $domain ), 'type' => 'text' );
	}

	/* Integrates with the custom field series extension. */
	if ( function_exists( 'custom_field_series' ) )
		$meta['series'] = array( 'name' => 'Series', 'title' => __( 'Series:', $domain ), 'type' => 'text' );

	/* Input box for a custom thumbnail. */
	$meta['thumbnail'] = array( 'name' => 'Thumbnail', 'title' => __( 'Thumbnail:', $domain ), 'type' => 'text' );

	/* If there are any custom post templates, allow the user to select one. */
	if ( 'page' != $type && 'attachment' != $type ) {
		$post_type_object = get_post_type_object( $type );

		if ( $post_type_object->singular_label || $post_type_object->name ) {
			$templates = hybrid_get_post_templates( array( 'label' => array( "{$post_type_object->labels->singular_name} Template", "{$post_type_object->name} Template" ) ) );

			if ( 0 != count( $templates ) )
				$meta['template'] = array( 'name' => "_wp_{$type}_template", 'title' => __( 'Template:', $domain ), 'type' => 'select', 'options' => $templates, 'use_key_and_value' => true );
		}
	}

	/* Add post layouts option if current theme supports them. */
	if ( current_theme_supports( 'post-layouts' ) )
		$meta['post_layout'] = array( 'name' => 'Layout', 'title' => __( 'Layout:', $domain ), 'type' => 'select', 'options' => array( '1c', '2c-l', '2c-r', '3c-l', '3c-r', '3c-c' ) );

	/* $prefix_$type_meta_boxes filter is deprecated. Use $prefix_$type_meta_box_args instead. */
	$meta = apply_filters( "{$prefix}_{$type}_meta_boxes", $meta );

	return apply_filters( "{$prefix}_{$type}_meta_box_args", $meta );
}
Esempio n. 4
0
/**
 * Creates a settings box that allows users to customize their footer. A basic textarea is given that
 * allows HTML and shortcodes to be input.
 *
 * @since 1.2.0
 */
function hybrid_meta_box_theme_display_footer()
{
    $domain = hybrid_get_textdomain();
    ?>

	<p>
		<span class="description"><?php 
    _e('You can add custom <acronym title="Hypertext Markup Language">HTML</acronym> and/or shortcodes, which will be automatically inserted into your theme.', $domain);
    ?>
</span>
	</p>

	<p>
		<textarea id="<?php 
    echo hybrid_settings_field_id('footer_insert');
    ?>
" name="<?php 
    echo hybrid_settings_field_name('footer_insert');
    ?>
" cols="60" rows="5"><?php 
    echo esc_textarea(hybrid_get_setting('footer_insert'));
    ?>
</textarea>
	</p>

	<?php 
    if (current_theme_supports('hybrid-core-shortcodes')) {
        ?>
		<p>
			<?php 
        printf(__('Shortcodes: %s', $domain), '<code>[the-year]</code>, <code>[site-link]</code>, <code>[wp-link]</code>, <code>[theme-link]</code>, <code>[child-link]</code>, <code>[loginout-link]</code>, <code>[query-counter]</code>');
        ?>
		</p>
	<?php 
    }
}
/**
 *  Display the tweet button
 *
 * @param  array   $args Array with arguments
 * @staticvar integer $i Used to count how many times the function has been referenced
 * @return string         The tweet button
 * @since Cakifo 1.3
 */
function cakifo_tweet_button($args = array())
{
    /**
     * Count how many times the function has been referenced
     * @var integer
     */
    static $i = 0;
    $i++;
    /**
     * Default values for the button
     * @var array
     */
    $defaults = array('before' => '', 'after' => '', 'href' => wp_get_shortlink(), 'via' => hybrid_get_setting('twitter_username'), 'text' => the_title_attribute('echo=0'), 'related' => '', 'layout' => 'vertical', 'counturl' => get_permalink());
    // Merge them
    $args = wp_parse_args($args, $defaults);
    /**
     * Set up variables
     */
    $post_id = get_queried_object_id();
    $url = trailingslashit($args['href']);
    $counturl = trailingslashit($args['counturl']);
    $cache_interval = 60;
    $refresh_interval = 3660;
    $retweet_count = null;
    $count = 0;
    $counter = '';
    // Retweet data (Twitter API)
    $retweet_meta = get_post_meta($post_id, "retweet_{$i}_cache", true);
    if ($retweet_meta != '') {
        $retweet_pieces = explode(':', $retweet_meta);
        $retweet_timestamp = (int) $retweet_pieces[0];
        $retweet_count = (int) $retweet_pieces[1];
    }
    // Expire retweet cache
    if ($retweet_count === null || time() > $retweet_timestamp + $cache_interval) {
        $retweet_response = wp_remote_get('http://urls.api.twitter.com/1/urls/count.json?url=' . $counturl);
        if (!is_wp_error($retweet_response)) {
            $retweet_data = json_decode(wp_remote_retrieve_body($retweet_response), true);
            if (isset($retweet_data['count']) && isset($retweet_data['url']) && $retweet_data['url'] === $counturl) {
                if ((int) $retweet_data['count'] >= $retweet_count || time() > $retweet_timestamp + $refresh_interval) {
                    $retweet_count = $retweet_data['count'];
                    if ($retweet_meta == '') {
                        add_post_meta($post_id, "retweet_{$i}_cache", time() . ':' . $retweet_count);
                    } else {
                        update_post_meta($post_id, "retweet_{$i}_cache", time() . ':' . $retweet_count);
                    }
                }
            }
        }
        // $retweet_response
    }
    // expire retweet cache
    /**
     * Check for "retweet_count_start" custom field
     *
     * Manually set the starting number of retweets for a post that existed before the Tweet Button was created
     * the number can be roughly calculated by subtracting the twitter API's retweet count
     * from the estimated number of retweets according to the topsy, backtype, or tweetmeme services
     */
    $retweet_count_start = get_post_meta($post_id, "retweet_{$i}_count_start", true);
    /* Calculate the total count to display */
    $count = $retweet_count + (int) $retweet_count_start;
    if ($count > 9999) {
        $count = $count / 1000;
        $count = number_format($count, 1) . 'K';
    } else {
        $count = number_format($count);
    }
    /**
     * Construct the tweet button query string
     */
    $twitter_params = '?text=' . urlencode($args['text']) . '+-';
    $twitter_params .= '&amp;url=' . urlencode($url);
    $twitter_params .= '&amp;counturl=' . urlencode($args['counturl']);
    $twitter_params .= $args['via'] ? '&amp;via=' . $args['via'] : '';
    $twitter_params .= $args['related'] ? '&amp;related=' . $args['related'] : '';
    if ($args['layout'] != 'none') {
        $counter = '<a class="twitter-count" href="http://twitter.com/search?q=' . urlencode($url) . '" target="_blank">' . $count . '</a>';
    }
    // HTML for the tweet button
    $twitter_share = '
		<div class="twitter-share twitter-button-size-' . sanitize_html_class($args['layout']) . '">
			<a class="twitter-button" rel="external nofollow" title="Share this on Twitter" href="http://twitter.com/share' . $twitter_params . '" target="_blank">Tweet</a>' . $counter . '
		</div>
	';
    return $args['before'] . $twitter_share . $args['after'];
}
Esempio n. 6
0
hybrid_document_title();
?>
</title>

	<meta name="viewport" content="width=device-width,initial-scale=1" />

	<link rel="profile" href="http://gmpg.org/xfn/11" />

	<link rel="pingback" href="<?php 
bloginfo('pingback_url');
?>
" />

	<!-- use favicon set in theme options -->
	<link rel="Shortcut Icon" href="<?php 
echo esc_attr(hybrid_get_setting('favicon_upload'));
?>
" type="image/x-icon" />

	<?php 
wp_head();
// wp_head
?>



</head>



<body <?php 
Esempio n. 7
0
/**
 * Standardized function for outputting the footer content.
 *
 * @since 1.4.0
 * @access public
 * @return void
 */
function hybrid_footer_content()
{
    /* Only run the code if the theme supports the Hybrid Core theme settings. */
    if (current_theme_supports('hybrid-core-theme-settings')) {
        echo apply_atomic_shortcode('footer_content', hybrid_get_setting('footer_insert'));
    }
}
Esempio n. 8
0
/**
 * Insert customizer styles to document head
 */
function spine2_wp_head()
{
    $body_color = hybrid_get_setting('body_color');
    $headline_color = hybrid_get_setting('headline_color');
    $link_color = hybrid_get_setting('link_color');
    $link_hover_color = hybrid_get_setting('link_hover_color');
    $output = "<style>" . PHP_EOL . " /* Customizer styles*/" . PHP_EOL;
    if (!empty($body_color)) {
        $output .= "body { color: {$body_color}; } ";
    }
    if (!empty($headline_color)) {
        $output .= "h1, h2, h3, h4, h5, h6 { color: {$headline_color} } ";
    }
    if (!empty($link_color)) {
        $output .= "a { color: {$link_color}; } ";
    }
    if (!empty($link_hover_color)) {
        $output .= "a:hover { color: {$link_hover_color}; } ";
    }
    echo $output .= " </style>" . PHP_EOL;
}
function hatch_theme_meta_box()
{
    ?>

	<table class="form-table">
	    
		<!-- Favicon upload -->
		<tr class="favicon_url">
			<th>
				<label for="<?php 
    echo esc_attr(hybrid_settings_field_id('hatch_favicon_url'));
    ?>
"><?php 
    _e('Favicon:', 'hatch');
    ?>
</label>
			</th>
			<td>
				<input type="text" id="<?php 
    echo esc_attr(hybrid_settings_field_id('hatch_favicon_url'));
    ?>
" name="<?php 
    echo esc_attr(hybrid_settings_field_name('hatch_favicon_url'));
    ?>
" value="<?php 
    echo esc_url(hybrid_get_setting('hatch_favicon_url'));
    ?>
" />
				<input id="hatch_favicon_upload_button" class="button" type="button" value="Upload" />
				<br />
				<span class="description"><?php 
    _e('Upload favicon image (recommended max size: 32x32).', 'hatch');
    ?>
</span>
				
				<?php 
    /* Display uploaded image */
    if (hybrid_get_setting('hatch_favicon_url')) {
        ?>
                    <p><img src="<?php 
        echo esc_url(hybrid_get_setting('hatch_favicon_url'));
        ?>
" alt="" /></p>
				<?php 
    }
    ?>
			</td>
		</tr>
		
		<!-- Logo upload -->
		<tr class="logo_url">
			<th>
				<label for="<?php 
    echo esc_attr(hybrid_settings_field_id('hatch_logo_url'));
    ?>
"><?php 
    _e('Logo:', 'hatch');
    ?>
</label>
			</th>
			<td>
				<input type="text" id="<?php 
    echo esc_attr(hybrid_settings_field_id('hatch_logo_url'));
    ?>
" name="<?php 
    echo esc_attr(hybrid_settings_field_name('hatch_logo_url'));
    ?>
" value="<?php 
    echo esc_url(hybrid_get_setting('hatch_logo_url'));
    ?>
" />
				<input id="hatch_logo_upload_button" class="button" type="button" value="Upload" />
				<br />
				<span class="description"><?php 
    _e('Upload logo image (recommended max width: 200px).', 'hatch');
    ?>
</span>
				
				<?php 
    /* Display uploaded image */
    if (hybrid_get_setting('hatch_logo_url')) {
        ?>
                    <p><img src="<?php 
        echo esc_url(hybrid_get_setting('hatch_logo_url'));
        ?>
" alt="" /></p>
				<?php 
    }
    ?>
			</td>
		</tr>
		
		<!-- Author Description -->
		<tr>
			<th>
				<label for="<?php 
    echo esc_attr(hybrid_settings_field_id('hatch_author_bio'));
    ?>
"><?php 
    _e('Author:', 'hatch');
    ?>
</label>
			</th>
			<td>
				
				<?php 
    /* Set arguments for the authors dropdown list */
    $author_bio_id = hybrid_settings_field_id('hatch_author_bio');
    $author_bio_name = hybrid_settings_field_name('hatch_author_bio');
    $author_bio_selected = hybrid_get_setting('hatch_author_bio');
    $args = array('id' => $author_bio_id, 'name' => $author_bio_name, 'selected' => $author_bio_selected);
    /* Display the authors dropdown list */
    wp_dropdown_users($args);
    ?>
				
				<span class="description"><?php 
    _e('Whose biography to display on the home page?', 'hatch');
    ?>
</span>
				
			</td>
		</tr>		
		
		<!-- Font family -->
		<tr>
			<th>
				<label for="<?php 
    echo esc_attr(hybrid_settings_field_id('hatch_font_family'));
    ?>
"><?php 
    _e('Font family:', 'hatch');
    ?>
</label>
			</th>
			<td>
			    <select id="<?php 
    echo esc_attr(hybrid_settings_field_id('hatch_font_family'));
    ?>
" name="<?php 
    echo esc_attr(hybrid_settings_field_name('hatch_font_family'));
    ?>
">
				<option value="Arial" <?php 
    selected(hybrid_get_setting('hatch_font_family'), 'Arial');
    ?>
> <?php 
    echo __('Arial', 'hatch');
    ?>
 </option>
				<option value="Verdana" <?php 
    selected(hybrid_get_setting('hatch_font_family'), 'Verdana');
    ?>
> <?php 
    echo __('Verdana', 'hatch');
    ?>
 </option>				
				<option value="Bitter" <?php 
    selected(hybrid_get_setting('hatch_font_family'), 'Bitter');
    ?>
> <?php 
    echo __('Bitter', 'hatch');
    ?>
 </option>
				<option value="Georgia" <?php 
    selected(hybrid_get_setting('hatch_font_family'), 'Georgia');
    ?>
> <?php 
    echo __('Georgia', 'hatch');
    ?>
 </option>
				<option value="Droid Serif" <?php 
    selected(hybrid_get_setting('hatch_font_family'), 'Droid Serif');
    ?>
> <?php 
    echo __('Droid Serif', 'hatch');
    ?>
 </option>				
				<option value="Helvetica" <?php 
    selected(hybrid_get_setting('hatch_font_family'), 'Helvetica');
    ?>
> <?php 
    echo __('Helvetica', 'hatch');
    ?>
 </option>
				<option value="Istok Web" <?php 
    selected(hybrid_get_setting('hatch_font_family'), 'Istok Web');
    ?>
> <?php 
    echo __('Istok Web', 'hatch');
    ?>
 </option>			
				<option value="Lucida Sans Unicode" <?php 
    selected(hybrid_get_setting('hatch_font_family'), 'Lucida Sans Unicode');
    ?>
> <?php 
    echo __('Lucida Sans Unicode', 'hatch');
    ?>
 </option>
				<option value="Droid Sans" <?php 
    selected(hybrid_get_setting('hatch_font_family'), 'Droid Sans');
    ?>
> <?php 
    echo __('Droid Sans', 'hatch');
    ?>
 </option>
			    </select>
			</td>
		</tr>
		
		<!-- Font size -->
		<tr>
			<th>
			    <label for="<?php 
    echo esc_attr(hybrid_settings_field_id('hatch_font_size'));
    ?>
"><?php 
    _e('Font size:', 'hatch');
    ?>
</label>
			</th>
			<td>
			    <select id="<?php 
    echo esc_attr(hybrid_settings_field_id('hatch_font_size'));
    ?>
" name="<?php 
    echo esc_attr(hybrid_settings_field_name('hatch_font_size'));
    ?>
">
				<option value="16" <?php 
    selected(hybrid_get_setting('hatch_font_size'), '16');
    ?>
> <?php 
    echo __('default', 'hatch');
    ?>
 </option>
				<option value="17" <?php 
    selected(hybrid_get_setting('hatch_font_size'), '17');
    ?>
> <?php 
    echo __('17', 'hatch');
    ?>
 </option>
				<option value="16" <?php 
    selected(hybrid_get_setting('hatch_font_size'), '16');
    ?>
> <?php 
    echo __('16', 'hatch');
    ?>
 </option>
				<option value="15" <?php 
    selected(hybrid_get_setting('hatch_font_size'), '15');
    ?>
> <?php 
    echo __('15', 'hatch');
    ?>
 </option>
				<option value="14" <?php 
    selected(hybrid_get_setting('hatch_font_size'), '14');
    ?>
> <?php 
    echo __('14', 'hatch');
    ?>
 </option>
			    </select>
			    <span class="description"><?php 
    _e('The base font size in pixels.', 'hatch');
    ?>
</span>
			</td>
		</tr>		
	    
		<!-- Link color -->
		<tr>
			<th>
				<label for="<?php 
    echo esc_attr(hybrid_settings_field_id('hatch_link_color'));
    ?>
"><?php 
    _e('Link color:', 'hatch');
    ?>
</label>
			</th>
			<td>
				<input type="text" id="<?php 
    echo esc_attr(hybrid_settings_field_id('hatch_link_color'));
    ?>
" name="<?php 
    echo esc_attr(hybrid_settings_field_name('hatch_link_color'));
    ?>
" size="8" value="<?php 
    echo hybrid_get_setting('hatch_link_color') ? esc_attr(hybrid_get_setting('hatch_link_color')) : '#64a2d8';
    ?>
" data-hex="true" />
				<div id="colorpicker_link_color"></div>
				<span class="description"><?php 
    _e('Set the theme link color.', 'hatch');
    ?>
</span>
			</td>
		</tr>	    

		<!-- Custom CSS -->
		<tr>
			<th>
				<label for="<?php 
    echo esc_attr(hybrid_settings_field_id('hatch_custom_css'));
    ?>
"><?php 
    _e('Custom CSS:', 'hatch');
    ?>
</label>
			</th>
			<td>
				<textarea id="<?php 
    echo esc_attr(hybrid_settings_field_id('hatch_custom_css'));
    ?>
" name="<?php 
    echo esc_attr(hybrid_settings_field_name('hatch_custom_css'));
    ?>
" cols="60" rows="8"><?php 
    echo wp_htmledit_pre(stripslashes(hybrid_get_setting('hatch_custom_css')));
    ?>
</textarea>
				<span class="description"><?php 
    _e('Add your custom CSS here. It would overwrite any default or custom theme settings.', 'hatch');
    ?>
</span>
			</td>
		</tr>

		<!-- End custom form elements. -->
	</table><!-- .form-table --><?php 
}
Esempio n. 10
0
?>
; charset=<?php 
bloginfo('charset');
?>
" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		
	<!-- Mobile viewport optimized -->
	<meta name="viewport" content="width=device-width,initial-scale=1">
	
	<?php 
if (hybrid_get_setting('oxygen_favicon_url')) {
    ?>
		<!-- Favicon -->
		<link rel="shortcut icon" href="<?php 
    echo hybrid_get_setting('oxygen_favicon_url');
    ?>
" />
	<?php 
}
?>
	
	<!-- Title -->
	<title><?php 
hybrid_document_title();
?>
</title>
	
	<link rel="profile" href="http://gmpg.org/xfn/11" />
	<link rel="pingback" href="<?php 
bloginfo('pingback_url');
Esempio n. 11
0
 *
 * Displays information at the top of the page about archive and search results when viewing those pages.
 * This is not shown on the front page or singular views.
 *
 * @package Cakifo
 * @subpackage Template
 */
?>

<?php 
do_atomic('before_loop_meta');
// cakifo_before_loop_meta
?>

<?php 
if (is_home() && !is_front_page() && hybrid_get_setting('featured_show')) {
    ?>

	<?php 
    global $wp_query;
    ?>

	<div class="loop-meta loop-meta-home">

		<h1 class="loop-title"><span><?php 
    echo get_post_field('post_title', $wp_query->get_queried_object_id());
    ?>
</span></h1>

		<div class="loop-description">
			<?php 
Esempio n. 12
0
function mirai_footer()
{
    $footer_insert = hybrid_get_setting('footer_insert');
    if (!empty($footer_insert)) {
        echo '<div class="footer-insert">' . do_shortcode($footer_insert) . '</div>';
    }
}
Esempio n. 13
0
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 
}
 * Child Themes can replace it via {section-slider.php}
 *
 * @package Cakifo
 * @subpackage Template
 */
?>

<?php 
/**
 * Select posts from the selected categories
 */
if (hybrid_get_setting('featured_category')) {
    $feature_query = array('cat' => hybrid_get_setting('featured_category'), 'showposts' => hybrid_get_setting('featured_posts'), 'ignore_sticky_posts' => 1, 'post_status' => 'publish', 'no_found_rows' => true);
    // No selected categories, use Sticky Posts
} else {
    $feature_query = array('post__in' => get_option('sticky_posts'), 'showposts' => hybrid_get_setting('featured_posts'), 'post_status' => 'publish', 'no_found_rows' => true);
}
?>

<?php 
$loop = new WP_Query($feature_query);
?>

<?php 
if ($loop->have_posts()) {
    ?>

	<?php 
    do_atomic('before_slider');
    // cakifo_before_slider
    ?>
Esempio n. 15
0
							
							<?php 
if (hybrid_get_setting('ascetica_logo_url')) {
    ?>
			
								
								<h1 id="site-title">
									<a href="<?php 
    echo home_url();
    ?>
" title="<?php 
    echo bloginfo('name');
    ?>
" rel="Home">
										<img class="logo" src="<?php 
    echo esc_url(hybrid_get_setting('ascetica_logo_url'));
    ?>
" alt="<?php 
    echo bloginfo('name');
    ?>
" />
									</a>
								</h1>
							
							<?php 
} else {
    ?>
							
								<?php 
    hybrid_site_title();
    ?>
Esempio n. 16
0
/**
 * Slider settings
 *
 */
function oxygen_slider_settings()
{
    if (get_theme_mod('oxygen_slider_timeout')) {
        $timeout = get_theme_mod('oxygen_slider_timeout');
    } elseif (hybrid_get_setting('oxygen_slider_timeout')) {
        $timeout = hybrid_get_setting('oxygen_slider_timeout');
    } else {
        $timeout = '6000';
    }
    $settings = array('timeout' => $timeout);
    wp_localize_script('oxygen_footer_scripts', 'slider_settings', $settings);
    wp_localize_script('oxygen_footer_scripts_light', 'slider_settings', $settings);
}
Esempio n. 17
0
/**
 * Style settings
 *
 */
function ascetica_style_settings()
{
    echo "\n<!-- Style settings -->\n";
    echo "<style type=\"text/css\" media=\"all\">\n";
    if (hybrid_get_setting('ascetica_font_size')) {
        echo 'html { font-size: ' . esc_html(hybrid_get_setting('ascetica_font_size')) . "px; }\n";
    }
    if (hybrid_get_setting('ascetica_font_family')) {
        echo 'body, #respond #submit, .button, a.button, .wpcf7-submit, #loginform .button-primary, .pagination a.page-numbers, .comment-navigation a.page-numbers, input[type="text"], input[type="password"], input[type="email"], .input-text, textarea, select { font-family: ' . esc_html(hybrid_get_setting('ascetica_font_family')) . ", serif; }\n";
    }
    if (hybrid_get_setting('ascetica_link_color')) {
        echo 'a, #footer a:hover, .entry-title a:hover { color: ' . esc_html(hybrid_get_setting('ascetica_link_color')) . "; }\n";
        echo "a:hover, a:focus { color: #000; }\n";
    }
    if (hybrid_get_setting('ascetica_custom_css')) {
        echo esc_html(hybrid_get_setting('ascetica_custom_css')) . "\n";
    }
    echo "</style>\n";
}
Esempio n. 18
0
?>
; charset=<?php 
bloginfo('charset');
?>
" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    
<!-- Mobile viewport optimized -->
<meta name="viewport" content="width=device-width,initial-scale=1">

<?php 
if (hybrid_get_setting('hatch_favicon_url')) {
    ?>
<!-- Favicon -->
<link rel="shortcut icon" href="<?php 
    echo esc_url(hybrid_get_setting('hatch_favicon_url'));
    ?>
" />
<?php 
}
?>

<!-- Title -->
<title><?php 
hybrid_document_title();
?>
</title>

<!-- Stylesheet -->	
<link rel="stylesheet" href="<?php 
echo get_stylesheet_uri();
Esempio n. 19
0
File: admin.php Progetto: jacko5/bjj
/**
 * Display the home template meta box.
 *
 * @since 0.1.0
 */
function news_home_template_theme_meta_box()
{
    $prefix = hybrid_get_prefix();
    /* Settings used. */
    $category_highlight = hybrid_get_setting('home_template_categories');
    /* Get categories. */
    $categories = get_categories();
    ?>

	<table class="form-table">

		<tr>
			<th><?php 
    _e('About:', 'news');
    ?>
</th>
			<td>
				<?php 
    _e('Settings used on pages that use the "Home" page template.  This template must be assigned to a page before its settings take effect.', 'news');
    ?>
			</td>
		</tr>
		<tr>
			<th><label for="<?php 
    echo hybrid_settings_field_id('home_template_categories');
    ?>
"><?php 
    _e('Category Highlight:', 'news');
    ?>
</label></th>
			<td>
				<label for="<?php 
    echo hybrid_settings_field_id('home_template_categories');
    ?>
"><?php 
    _e('Categories to show blog posts from in the category highlight section.  Multiple categories may be chosen by holding the <code>Ctrl</code> key and selecting.', 'news');
    ?>
</label>
				<br />
				<select id="<?php 
    echo hybrid_settings_field_id('home_template_categories');
    ?>
" name="<?php 
    echo hybrid_settings_field_name('home_template_categories');
    ?>
[]" multiple="multiple" style="height:150px;">
				<?php 
    foreach ($categories as $cat) {
        ?>
					<option value="<?php 
        echo $cat->term_id;
        ?>
" <?php 
        if (is_array($category_highlight) && in_array($cat->term_id, $category_highlight)) {
            echo ' selected="selected"';
        }
        ?>
><?php 
        echo esc_html($cat->name);
        ?>
</option>
				<?php 
    }
    ?>
				</select>
			</td>
		</tr>

	</table><?php 
}
Esempio n. 20
0
/**
 * Filters the category, author, and tag feed links.  This changes all of these feed 
 * links to the user's alternate feed URL.  This change only happens if the user chooses 
 * it from the theme settings.
 *
 * @since 0.4
 * @param string $link
 * @return string $link
 */
function hybrid_other_feed_link( $link ) {

	if ( hybrid_get_setting( 'feeds_redirect' ) && $url = hybrid_get_setting( 'feed_url' ) )
		$link = esc_url( $url );

	return $link;
}
Esempio n. 21
0
/**
 * Function for displaying the meta box
 *
 * @return void
 * @since Cakifo 1.0
 */
function cakifo_theme_meta_box()
{
    ?>

	<table class="form-table">

		<tr>
			<th><label for="<?php 
    echo hybrid_settings_field_id('link_color');
    ?>
"><?php 
    _e('Link Color', 'cakifo');
    ?>
</label></th>
			<td>
				<fieldset>
					<legend class="screen-reader-text"><span><?php 
    _e('Link Color', 'cakifo');
    ?>
</span></legend>

					<input type="text" name="<?php 
    echo hybrid_settings_field_name('link_color');
    ?>
" id="link-color" value="<?php 
    echo esc_attr(hybrid_get_setting('link_color'));
    ?>
" />

					<a href="#" class="pickcolor hide-if-no-js" id="link-color-example"></a>
					<input type="button" class="pickcolor button hide-if-no-js" value="<?php 
    esc_attr_e('Select a Color', 'cakifo');
    ?>
" />

					<div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div> <br />

					<span><?php 
    printf(__('Default color: %s', 'cakifo'), '<span id="default-color">' . cakifo_get_default_link_color() . '</span>');
    ?>
</span>
				</fieldset>
			</td>
		</tr>

		<tr>
			<th>
				<label for="<?php 
    echo hybrid_settings_field_id('featured_show');
    ?>
"><?php 
    _e('Show "Featured Content" slider?', 'cakifo');
    ?>
</label>
			</th>

			<td>
				<p><input id="featured_show" name="<?php 
    echo hybrid_settings_field_name('featured_show');
    ?>
" type="checkbox" value="1" <?php 
    checked(hybrid_get_setting('featured_show'), 1);
    ?>
 /></p>
				<p><?php 
    _e('Check to display the "Featured Content" slider', 'cakifo');
    ?>
</p>
			</td>
		</tr>

		<tr>
			<th>
				<label for="<?php 
    echo hybrid_settings_field_id('featured_category');
    ?>
"><?php 
    _e('Featured Category:', 'cakifo');
    ?>
</label>
			</th>

			<td>
				<?php 
    $categories = get_categories();
    ?>

				<p>
					<select id="<?php 
    echo hybrid_settings_field_id('featured_category');
    ?>
" name="<?php 
    echo hybrid_settings_field_name('featured_category');
    ?>
">
					<option value="" <?php 
    selected(hybrid_get_setting('featured_category'), '');
    ?>
></option>

						<?php 
    foreach ($categories as $cat) {
        ?>
							<option value="<?php 
        echo $cat->term_id;
        ?>
" <?php 
        selected(hybrid_get_setting('featured_category'), $cat->term_id);
        ?>
><?php 
        echo esc_attr($cat->name);
        ?>
</option>
						<?php 
    }
    ?>

					</select>
				</p>

				<p><?php 
    _e('Leave blank to use sticky posts', 'cakifo');
    ?>
</p>
			</td>
		</tr>

		<tr>
			<th>
				<label for="<?php 
    echo hybrid_settings_field_id('featured_posts');
    ?>
"><?php 
    _e('Featured Posts:', 'cakifo');
    ?>
</label>
			</th>
			<td>
				<p><input type="number" min="-1" id="<?php 
    echo hybrid_settings_field_id('featured_posts');
    ?>
" name="<?php 
    echo hybrid_settings_field_name('featured_posts');
    ?>
" value="<?php 
    echo esc_attr(hybrid_get_setting('featured_posts'));
    ?>
" class="small-text" /></p>
				<p><?php 
    _e('How many featured posts should be shown? <code>-1</code> will show all posts in the category.', 'cakifo');
    ?>
				<?php 
    printf(__('%s is the default', 'cakifo'), '<code>5</code>');
    ?>
</p>
			</td>
		</tr>

		<tr>
			<th>
				<label for="<?php 
    echo hybrid_settings_field_id('headlines_category');
    ?>
"><?php 
    _e('Headline Categories:', 'cakifo');
    ?>
</label>
			</th>
			<td>
				<p>
					<label for="<?php 
    echo hybrid_settings_field_id('headlines_category');
    ?>
"><?php 
    _e('Multiple categories may be chosen by holding the <code>Ctrl</code> key and selecting.', 'cakifo');
    ?>
</label>
					<br />

					<select id="<?php 
    echo hybrid_settings_field_id('headlines_category');
    ?>
" name="<?php 
    echo hybrid_settings_field_name('headlines_category');
    ?>
[]" multiple="multiple" style="height:150px;">
						<?php 
    foreach ($categories as $cat) {
        ?>
							<option value="<?php 
        echo $cat->term_id;
        ?>
" <?php 
        if (is_array(hybrid_get_setting('headlines_category')) && in_array($cat->term_id, hybrid_get_setting('headlines_category'))) {
            echo ' selected="selected"';
        }
        ?>
><?php 
        echo esc_html($cat->name);
        ?>
</option>
						<?php 
    }
    ?>
					</select>
				</p>
			</td>
		</tr>
		<tr>
			<th><label for="<?php 
    echo hybrid_settings_field_id('headlines_num_posts');
    ?>
"><?php 
    _e('Headlines Posts:', 'cakifo');
    ?>
</label></th>
			<td>
				<p><input type="number" min="1" id="<?php 
    echo hybrid_settings_field_id('headlines_num_posts');
    ?>
" name="<?php 
    echo hybrid_settings_field_name('headlines_num_posts');
    ?>
" value="<?php 
    echo esc_attr(hybrid_get_setting('headlines_num_posts'));
    ?>
" class="small-text" /></p>

				<p><?php 
    _e('How many posts should be shown per headline category?', 'cakifo');
    ?>
 <?php 
    printf(__('%s is the default', 'cakifo'), '<code>4</code>');
    ?>
</p></p>
			</td>
		</tr>

		<tr>
			<?php 
    $current_user = wp_get_current_user();
    ?>

			<th>
				<label for="<?php 
    echo hybrid_settings_field_id('twitter_username');
    ?>
"><?php 
    _e('Twitter username:'******'cakifo');
    ?>
</label>
			</th>
			<td>
				<p><input type="text" id="<?php 
    echo hybrid_settings_field_id('twitter_username');
    ?>
" name="<?php 
    echo hybrid_settings_field_name('twitter_username');
    ?>
" value="<?php 
    if (hybrid_get_setting('twitter_username') != '') {
        echo esc_attr(hybrid_get_setting('twitter_username'));
    } elseif (isset($current_user->twitter)) {
        echo esc_attr($current_user->twitter);
    }
    ?>
" /></p>
				<p><?php 
    _e('Your Twitter username (if you have one)', 'cakifo');
    ?>
			</td>
		</tr>

	</table> <!-- .form-table --> <?php 
}
Esempio n. 22
0
/**
 * Creates a settings box that allows users to customize their footer. A basic textarea is given that
 * allows HTML and shortcodes to be input.
 *
 * @since 0.7
 */
function hybrid_footer_settings_meta_box() {
	$domain = hybrid_get_textdomain(); ?>

	<table class="form-table">
		<tr>
			<th><label for="footer_insert"><?php _e( 'Footer Insert:', $domain ); ?></label></th>
			<td>
				<?php _e( 'You can add custom <acronym title="Hypertext Markup Language">HTML</acronym> and/or shortcodes, which will be automatically inserted into your theme.', $domain ); ?><br />
				<textarea id="footer_insert" name="footer_insert" cols="60" rows="5" style="width: 98%;"><?php echo wp_specialchars( stripslashes( hybrid_get_setting( 'footer_insert' ) ), 1, 0, 1 ); ?></textarea><br />
				<?php _e( 'Shortcodes:', $domain ); ?> <code>[the-year]</code>, <code>[site-link]</code>, <code>[wp-link]</code>, <code>[theme-link]</code>, <code>[child-link]</code>, <code>[loginout-link]</code>, <code>[query-counter]</code>.
			</td>
		</tr>
	</table><!-- .form-table --><?php
}
/**
 * Hatch site title.
 * 
 */
function hatch_site_title()
{
    if (hybrid_get_setting('hatch_logo_url')) {
        $tag = is_front_page() ? 'h1' : 'div';
        echo '<' . $tag . ' id="site-title">' . "\n";
        echo '<a href="' . get_home_url() . '" title="' . get_bloginfo('name') . '" rel="Home">' . "\n";
        echo '<img class="logo" src="' . esc_url(hybrid_get_setting('hatch_logo_url')) . '" alt="' . get_bloginfo('name') . '" />' . "\n";
        echo '</a>' . "\n";
        echo '</' . $tag . '>' . "\n";
    } else {
        hybrid_site_title();
    }
}
Esempio n. 24
0
function dschool_banner_settings_meta_box()
{
    foreach (array('top' => 'Top', 'bottom' => 'Bottom') as $position => $description) {
        ?>

	<h4><?php 
        printf(__('%s Side Banner', hybrid_get_textdomain()), $description);
        ?>
</h4>
	<table class="form-table">

		<tr>
			<th>
				<label for="<?php 
        echo hybrid_settings_field_id('banner_side_' . $position . '_title');
        ?>
"><?php 
        _e('Title:', hybrid_get_textdomain());
        ?>
</label>
			</th>
			<td>
				<input type="text" id="<?php 
        echo hybrid_settings_field_id('banner_side_' . $position . '_title');
        ?>
" name="<?php 
        echo hybrid_settings_field_name('banner_side_' . $position . '_title');
        ?>
" value="<?php 
        echo esc_attr(hybrid_get_setting('banner_side_' . $position . '_title'));
        ?>
" />
			</td>
		</tr>

		<tr>
			<th>
				<label for="<?php 
        echo hybrid_settings_field_id('banner_side_' . $position . '_copy');
        ?>
"><?php 
        _e('Copy:', hybrid_get_textdomain());
        ?>
</label>
			</th>
			<td>
				<input type="text" id="<?php 
        echo hybrid_settings_field_id('banner_side_' . $position . '_copy');
        ?>
" name="<?php 
        echo hybrid_settings_field_name('banner_side_' . $position . '_copy');
        ?>
" value="<?php 
        echo esc_attr(hybrid_get_setting('banner_side_' . $position . '_copy'));
        ?>
" />
			</td>
		</tr>

		<tr>
			<th>
				<label for="<?php 
        echo hybrid_settings_field_id('banner_side_' . $position . '_link');
        ?>
"><?php 
        _e('Media Link:', hybrid_get_textdomain());
        ?>
</label>
			</th>
			<td>
				<input type="text" id="<?php 
        echo hybrid_settings_field_id('banner_side_' . $position . '_link');
        ?>
" name="<?php 
        echo hybrid_settings_field_name('banner_side_' . $position . '_link');
        ?>
" value="<?php 
        echo esc_attr(hybrid_get_setting('banner_side_' . $position . '_link'));
        ?>
" />
				<input type="checkbox" id="<?php 
        echo hybrid_settings_field_id('banner_side_' . $position . '_link_is_video');
        ?>
" name="<?php 
        echo hybrid_settings_field_name('banner_side_' . $position . '_link_is_video');
        ?>
" <?php 
        checked(hybrid_get_setting('banner_side_' . $position . '_link_is_video'), 'on');
        ?>
 /> Links to a video
			</td>
		</tr>

	</table><?php 
    }
}
Esempio n. 25
0
						
						<?php 
if (hybrid_get_setting('oxygen_logo_url')) {
    ?>
			
							
							<h1 id="site-title">
								<a href="<?php 
    echo home_url();
    ?>
/" title="<?php 
    echo bloginfo('name');
    ?>
" rel="Home">
									<img class="logo" src="<?php 
    echo hybrid_get_setting('oxygen_logo_url');
    ?>
" alt="<?php 
    echo bloginfo('name');
    ?>
" />
								</a>
							</h1>
						
						<?php 
} else {
    ?>
						
							<?php 
    hybrid_site_title();
    ?>
Esempio n. 26
0
/**
 * Oxygen site title.
 * 
 */
function oxygen_site_title()
{
    $tag = is_front_page() ? 'h1' : 'div';
    if (get_header_image()) {
        echo '<' . $tag . ' id="site-title">' . "\n";
        echo '<a href="' . get_home_url() . '" title="' . get_bloginfo('name') . '" rel="Home">' . "\n";
        echo '<img class="logo" src="' . get_header_image() . '" alt="' . get_bloginfo('name') . '" />' . "\n";
        echo '</a>' . "\n";
        echo '</' . $tag . '>' . "\n";
    } elseif (hybrid_get_setting('oxygen_logo_url')) {
        // check for legacy setting
        echo '<' . $tag . ' id="site-title">' . "\n";
        echo '<a href="' . get_home_url() . '" title="' . get_bloginfo('name') . '" rel="Home">' . "\n";
        echo '<img class="logo" src="' . esc_url(hybrid_get_setting('oxygen_logo_url')) . '" alt="' . get_bloginfo('name') . '" />' . "\n";
        echo '</a>' . "\n";
        echo '</' . $tag . '>' . "\n";
    } else {
        hybrid_site_title();
    }
}
Esempio n. 27
0
		<?php 
do_atomic('before_footer');
// trending_before_footer
?>

		<div id="footer">

			<?php 
do_atomic('open_footer');
// trending_open_footer
?>

			<div class="wrap">

				<?php 
echo apply_atomic_shortcode('footer_content', hybrid_get_setting('footer_insert'));
?>

				<?php 
do_atomic('footer');
// trending_footer
?>

			</div><!-- .wrap -->

			<?php 
do_atomic('close_footer');
// trending_close_footer
?>

		</div><!-- #footer -->
Esempio n. 28
0
/**
 * Twitter link shortcode
 *
 * @param array  $atts
 * @since Cakifo 1.0
 */
function cakifo_entry_twitter_link_shortcode($atts)
{
    extract(shortcode_atts(array('before' => '', 'after' => '', 'href' => get_permalink(), 'text' => the_title_attribute('echo=0'), 'layout' => 'horizontal', 'via' => hybrid_get_setting('twitter_username'), 'width' => 55, 'height' => 20), $atts));
    // Load the PHP tweet button script if the theme supports it
    if (current_theme_supports('cakifo-twitter-button')) {
        return cakifo_tweet_button(array('before' => $before, 'after' => $after, 'layout' => $layout, 'href' => $href, 'text' => $text, 'layout' => $layout, 'via' => $via));
        // Else, load the Twitter iframe
    } else {
        // Set the height to 62px if the layout is vertical and the height is the default value
        if ($layout == 'vertical' && $height == 20) {
            $height = 62;
        }
        // Set width to 110px if the layout is horizontal and the width is the default value
        if ($layout == 'horizontal' && $width == 55) {
            $width = 110;
        }
        // Build the query
        $query_args = array('url' => $href, 'via' => esc_attr($via), 'text' => esc_attr($text), 'count' => esc_attr($layout));
        return $before . '<iframe src="http://platform.twitter.com/widgets/tweet_button.html?' . http_build_query($query_args, '', '&amp;') . '" class="twitter-share-button" style="width:' . intval($width) . 'px; height:' . intval($height) . 'px;" scrolling="no" seamless></iframe>' . $after;
    }
}
Esempio n. 29
0
function clea_base_add_logo_to_header()
{
    $ald_logo = '<div class="ald-unique-logo">';
    $ald_logo .= '<a href="' . esc_attr(get_site_url());
    $ald_logo .= '"><img class="alignnone size-medium wp-image-201" src="';
    $ald_logo .= esc_attr(hybrid_get_setting('logo_upload'));
    $ald_logo .= '" alt="logo" width="' . esc_attr(hybrid_get_setting('logo_width')) . '" height="' . esc_attr(hybrid_get_setting('logo_height')) . '" /></div>';
    /* for now add an image stored in the images directory of the child theme 
    	$ald_logo = '<div class="ald-unique-logo">' ;		
    	$ald_logo .='<a href="' . esc_attr( hybrid_get_setting( 'logo_upload' ) ) ;
    	$ald_logo .= '"><img class="alignnone size-medium wp-image-201" src="' ;
    	$ald_logo .= esc_attr( hybrid_get_setting( 'logo_upload' ) ) ;
    	$ald_logo .= '" alt="logo" width="' . esc_attr( hybrid_get_setting( 'logo_width' ) ) . '" height="' .  esc_attr( hybrid_get_setting( 'logo_height' ) ) . '" /></div>' ;
    */
    echo $ald_logo;
}
Esempio n. 30
0
				<?php 
echo '<p>' . esc_attr(hybrid_get_setting('adresse')) . '</p>';
?>
				<?php 
if (hybrid_get_setting('telephone') != '') {
    ?>
					<p><i class="fa fa-phone"></i><?php 
    echo '  ' . esc_attr(hybrid_get_setting('telephone'));
    ?>
	</p>
				<?php 
}
?>

				<p><?php 
echo do_shortcode('[email]' . esc_attr(hybrid_get_setting('mail')) . '[/email]');
?>
</p>
			</div><!-- #sidebar-header -->
			
			<hgroup id="branding">
				<?php 
do_atomic('open_header');
// crée un "hook" "repertoire_open_header
?>
				<?php 
hybrid_site_title();
?>
				<?php 
hybrid_site_description();
?>