/**
 * Custom jQuery Buttons
 */
function cbox_theme_custom_buttons()
{
    // get button color option
    $cbox_button_color = infinity_option_get('cbox_button_color');
    // render script tag
    ?>
	<script>
	// Adds color button classes to buttons depening on preset style/option
	jQuery(document).ready(function() {
			//buttons
			jQuery('.bp-primary-action,div.group-button').addClass('button white');
			jQuery('.generic-button .acomment-reply,div.not_friends').addClass('button white');
			jQuery('.bp-secondary-action, .view-post,.comment-reply-link').addClass('button white');
			jQuery('.standard-form .button,.not_friends,.group-button,.dir-form .button,.not-following,#item-buttons .group-button,#bp-create-doc-button').addClass('<?php 
    echo $cbox_button_color;
    ?>
');
			jQuery('input[type="submit"],.submit,#item-buttons .generic-button,#aw-whats-new-submit,.activity-comments submit').addClass('button <?php 
    echo $cbox_button_color;
    ?>
');
			jQuery('div.pending,.dir-list .group-button,.dir-list .friendship-button').removeClass('<?php 
    echo $cbox_button_color;
    ?>
');
			jQuery('#previous-next,#upload, div.submit,div,reply,#groups_search_submit').removeClass('<?php 
    echo $cbox_button_color;
    ?>
 button');
			jQuery('div.pending,.dir-list .group-button,.dir-list .friendship-button').addClass('white');
			jQuery('#upload').addClass('button green');
	});
	</script><?php 
}
Exemple #2
0
/**
 * Add inline JS to toggle "Slide Options" metabox on a "Post" admin page.
 *
 * When the slider's featured category is checked in the "Post" admin page,
 * this javascript will either show or hide the "Slide Options" and "Video
 * Options" metaboxes.
 *
 * This is only used if the slider is set to use a post category.
 *
 * @since 1.0.7
 */
function cbox_featured_post_admin_footer()
{
    switch ($GLOBALS['hook_suffix']) {
        case 'post-new.php':
        case 'post.php':
            $cat_id = infinity_option_get('cbox_flex_slider_category');
            ?>

<script type="text/javascript">
//<![CDATA[
	jQuery(function($) {
		function cbox_toggle_metaboxes() {
			$('#cbox_slider_options, #cbox_video_options').hide();

			$('#categorychecklist input[type="checkbox"]').each(function(i,e){
				var id = $(this).attr('id').match(/-([0-9]*)$/i);
				id = (id && id[1]) ? parseInt(id[1]) : null ;

				if ($.inArray(id, [<?php 
            echo $cat_id;
            ?>
]) > -1 && $(this).is(':checked')) {
					$('#cbox_slider_options, #cbox_video_options').show();
				}
			});
		}

		$('#taxonomy-category').on( 'click', '#categorychecklist input[type="checkbox"]', cbox_toggle_metaboxes );

		cbox_toggle_metaboxes();
	});
//]]>
</script>

	<?php 
            break;
    }
}
/**
 * Infinity Theme: Post Thumbnail
 *
 * The Post Thumbnail Template part
 * 
 * @author Bowe Frankema <*****@*****.**>
 * @link http://infinity.presscrew.com/
 * @copyright Copyright (C) 2010-2011 Bowe Frankema
 * @license http://www.gnu.org/licenses/gpl.html GPLv2 or later
 * @package Infinity
 * @subpackage templates
 * @since 1.0
 */
$thumbheight = infinity_option_get('cbox-thumb-height');
$thumbwidth = infinity_option_get('cbox-thumb-width');
?>
	
<!-- show the post thumb? -->
<?php 
if (has_post_thumbnail() && current_theme_supports('infinity-post-thumbnails')) {
    ?>
<figure class="postthumb">
	<a href="<?php 
    the_permalink();
    ?>
" rel="bookmark" title="<?php 
    _e('Permanent Link to', infinity_text_domain);
    ?>
 <?php 
    the_title_attribute();
Exemple #4
0
/**
 * Left Sidebar Class. Add Left Sidebar class to content when content_class and sidebar_class do actions
 * Are not added to custom templates (Most notably BuddyPress)
 * 
 * @package Infinity
 * @subpackage base
 */
function infinity_sidebar_left_fallback()
{
    if (current_theme_supports('infinity-grid-style') && infinity_option_get('infinity-core-options.sidebar-position') != 'right') {
        // render grid fallback script
        ?>
		<script>
		jQuery(document).ready(function() {
			jQuery('#content').addClass('sidebar-left');
		});
		</script><?php 
    }
}
Exemple #5
0
			<?php 
do_action('open_footer');
infinity_get_template_part('templates/parts/footer-widgets');
?>
			<div id="powered-by">
				<div id="footer-info" class="column ten">
				<?php 
// Load Footer Menu only if it's enabled
if (current_theme_supports('infinity-footer-menu-setup')) {
    infinity_get_template_part('templates/parts/footer-menu', 'footer');
}
?>
				</div>
				<div id="copyright-info" class="column six">	
					<?php 
echo infinity_option_get('infinity-core-options.footer-text');
?>
				</div>
			</div>
			<?php 
do_action('close_footer');
?>
		</footer>
		<?php 
do_action('close_footer_wrap');
?>
		</div><!-- close container -->
	</div>
<?php 
do_action('close_body');
wp_footer();
<?php

/**
 * Template Name: Homepage Template
 *
 * @author Bowe Frankema <*****@*****.**>
 * @link http://shop.presscrew.com/
 * @copyright Copyright (C) 2010-2011 Bowe Frankema
 * @license http://www.gnu.org/licenses/gpl.html GPLv2 or later
 * @since 1.0
 */
infinity_get_header();
$slider = infinity_option_get('cbox_flex_slider') > 0;
?>
<div id="content" role="main" class="column sixteen">
	<div id="top-homepage" class="row">
		<?php 
if ($slider === true) {
    ?>
		<div id="flex-slider-wrap-full" class="column ten">
			<!-- load template for the slider-->
			<?php 
    infinity_load_template('engine/includes/feature-slider/template.php');
    ?>
			<!-- end -->
		</div>
		<?php 
}
?>

		<div id="homepage-sidebar-right" class="column <?php 
Exemple #7
0
$query_args = array();
$query_args['order'] = 'ASC';
$posts_per_page = infinity_option_get('cbox_flex_slider_amount');
if (!empty($posts_per_page)) {
    $query_args['posts_per_page'] = (int) infinity_option_get('cbox_flex_slider_amount');
} else {
    $query_args['posts_per_page'] = '-1';
}
// site features
if ($slider_type == 1) {
    $query_args['post_type'] = 'features';
    $no_slider_text = __('Did you know you can easily add introduction slides to your homepage? Simply visit your admin panel and add a new <strong>Featured Slide</strong>.', 'cbox-theme');
}
// post category
if ($slider_type == 2) {
    $cat_id = infinity_option_get('cbox_flex_slider_category');
    $cat = get_category($cat_id);
    $query_args['cat'] = $cat_id;
    $no_slider_text = sprintf(__('Did you know you can easily add introduction slides to your homepage? Simply visit your admin panel and add a new post in the <strong>%s</strong> category.', 'cbox-theme'), $cat->name);
}
// setup the slider query
$slider_query = new WP_Query($query_args);
?>

<div class="flex-container">
	<div class="flexslider">
	  	<ul class="slides">


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