function cherry_prepare_download_backup_callback()
{
    check_ajax_referer('cherry_download_backup', 'wp_nonce_download_backup');
    if (!current_user_can('export')) {
        wp_die('You do not have permissions to do this', 'Error');
    }
    $file = isset($_GET['file']) ? $_GET['file'] : '';
    if (!$file) {
        wp_die('File not provided', 'Error');
    }
    if (file_exists($file)) {
        header('Content-Description: File Transfer');
        header('Content-Type: application/octet-stream');
        header('Content-Disposition: attachment; filename=' . basename($file));
        header('Content-Transfer-Encoding: binary');
        header('Expires: 0');
        header('Cache-Control: must-revalidate');
        header('Pragma: public');
        header('Content-Length: ' . filesize($file));
        readfile($file);
    } else {
        echo theme_locals("unfortunately") . $theme_folder . theme_locals("please_try");
    }
    exit;
}
function myHelpPointers()
{
    //First we define our pointers
    $pointers = array(array('id' => 'xyz1', 'screen' => 'options-permalink', 'target' => '#submit', 'title' => theme_locals("submit_permalink"), 'content' => theme_locals("submit_permalink_desc"), 'position' => array('edge' => 'top', 'align' => 'left', 'offset' => '0 5')), array('id' => 'xyz2', 'screen' => 'themes', 'target' => '#toplevel_page_options-framework', 'title' => theme_locals("import_sample_data"), 'content' => theme_locals("import_sample_data_desc"), 'position' => array('edge' => 'bottom', 'align' => 'top', 'offset' => '0 -10')), array('id' => 'xyz3', 'screen' => 'toplevel_page_options-framework', 'target' => '#toplevel_page_options-framework', 'title' => theme_locals("import_sample_data"), 'content' => theme_locals("import_sample_data_desc_2"), 'position' => array('edge' => 'left', 'align' => 'top', 'offset' => '0 18')));
    //Now we instantiate the class and pass our pointer array to the constructor
    $myPointers = new WP_Help_Pointer($pointers);
}
function elegance_widgets_init() {
	// Sidebar Widget
	// Location: the sidebar
	register_sidebar(array(
		'name'					=> theme_locals("sidebar"),
		'id' 						=> 'main-sidebar',
		'description'   => theme_locals("sidebar_desc"),
		'before_widget' => '<div id="%1$s" class="widget">',
		'after_widget' => '</div>',
		'before_title' => '<h3>',
		'after_title' => '</h3>',
	));
	// Footer Widget Area 1
	// Location: at the top of the footer, above the copyright
	register_sidebar(array(
		'name'					=> theme_locals("footer_1"),
		'id' 						=> 'footer-sidebar-1',
		'description'   => theme_locals("footer_desc"),
		'before_widget' => '<div id="%1$s">',
		'after_widget' => '</div>',
		'before_title' => '<h4>',
		'after_title' => '</h4>',
	));
	// Footer Widget Area 2
	// Location: at the top of the footer, above the copyright
	register_sidebar(array(
		'name'					=> theme_locals("footer_2"),
		'id' 						=> 'footer-sidebar-2',
		'description'   => theme_locals("footer_desc"),
		'before_widget' => '<div id="%1$s">',
		'after_widget' => '</div>',
		'before_title' => '<h4>',
		'after_title' => '</h4>',
	));
	// Footer Widget Area 3
	// Location: at the top of the footer, above the copyright
	register_sidebar(array(
		'name'					=> theme_locals("footer_3"),
		'id' 						=> 'footer-sidebar-3',
		'description'   => theme_locals("footer_desc"),
		'before_widget' => '<div id="%1$s">',
		'after_widget' => '</div>',
		'before_title' => '<h4>',
		'after_title' => '</h4>',
	));
	// Footer Widget Area 4
	// Location: at the top of the footer, above the copyright
	register_sidebar(array(
		'name'					=> theme_locals("footer_4"),
		'id' 						=> 'footer-sidebar-4',
		'description'   => theme_locals("footer_desc"),
		'before_widget' => '<div id="%1$s">',
		'after_widget' => '</div>',
		'before_title' => '<h4>',
		'after_title' => '</h4>',
	));

}
function cherry_widgets_init()
{
    // Sidebar Widget
    // Location: the sidebar
    register_sidebar(array('name' => theme_locals("sidebar"), 'id' => 'main-sidebar', 'description' => theme_locals("sidebar_desc"), 'before_widget' => '<div id="%1$s" class="widget">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    // Footer Widget Area
    // Location: at the top of the footer, above the copyright
    register_sidebar(array('name' => __('Footer Area', CURRENT_THEME), 'id' => 'footer-sidebar', 'description' => theme_locals("footer_desc"), 'before_widget' => '<div id="%1$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
}
	    public function theme_folder_single_site( $actions, $theme ){
	    	$theme_template = $theme->template;
	    	if(strtolower($theme_template) == "cherryframework"){
	    		$backup_theme =	$theme->stylesheet;
		    	$backup_button = '<a href="../wp-content/themes/'.$theme_template.'/includes/data_management/backup.php?theme_folder=/'.$backup_theme.'" title="'.theme_locals("backup").'" class="backup_theme">'.theme_locals("backup").'</a>';
		        array_push($actions, $backup_button);
	    	}
	    	return $actions;
	    }
Exemple #6
0
function button_shortcode($atts, $content = null)
{
    extract(shortcode_atts(array('link' => 'http://www.google.com', 'text' => theme_locals("read_more"), 'size' => 'normal', 'style' => '', 'target' => '_self', 'display' => '', 'class' => '', 'icon' => 'no'), $atts));
    $output = '<a href="' . $link . '" title="' . $text . '" class="btn btn-' . $style . ' btn-' . $size . ' btn-' . $display . ' ' . $class . '" target="' . $target . '">';
    if ($icon != 'no') {
        $output .= '<i class="icon-' . $icon . '"></i>';
    }
    $output .= $text;
    $output .= '</a><!-- .btn -->';
    return $output;
}
Exemple #7
0
function cherry_widgets_init()
{
    // Custom widget area.
    register_sidebar(array('name' => __('Custom Widget Area'), 'id' => 'custom-widget-area', 'description' => __('An optional custom widget area for your site', 'twentyten'), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => "</li>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
    // Sidebar Widget
    // Location: the sidebar
    register_sidebar(array('name' => theme_locals("sidebar"), 'id' => 'main-sidebar', 'description' => theme_locals("sidebar_desc"), 'before_widget' => '<div id="%1$s" class="widget">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    // Footer Widget Area 1
    // Location: at the top of the footer, above the copyright
    register_sidebar(array('name' => theme_locals("footer_1"), 'id' => 'footer-sidebar-1', 'description' => theme_locals("footer_desc"), 'before_widget' => '<div id="%1$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    // Footer Widget Area 2
    // Location: at the top of the footer, above the copyright
    register_sidebar(array('name' => theme_locals("footer_2"), 'id' => 'footer-sidebar-2', 'description' => theme_locals("footer_desc"), 'before_widget' => '<div id="%1$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
}
Exemple #8
0
function cherry_restore_callback()
{
    $theme_folder = isset($_GET['theme_folder']) ? $_GET['theme_folder'] : '';
    if (!$theme_folder) {
        wp_die('File not provided', 'Error');
    }
    $file = str_replace('\\', '/', WP_CONTENT_DIR) . '/themes_backup/' . $theme_folder . ".zip";
    $themes_folder = str_replace('\\', '/', get_theme_root()) . '/' . $theme_folder;
    if (file_exists($file)) {
        chery_remove_dir($themes_folder);
        cherry_unzip_backup($file, $themes_folder);
    } else {
        echo theme_locals("unfortunately") . $theme_folder . theme_locals("please_try");
    }
}
	/** @see WP_Widget::form */
	function form($instance) {
		/* Set up some default widget settings. */
		$defaults = array( 'title' => '', 'flickr_id' => '', 'image_amount' => '', 'linktext' => '' );
		$instance = wp_parse_args( (array) $instance, $defaults );

		$title     = esc_attr($instance['title']);
		$flickr_id = esc_attr($instance['flickr_id']);
		$amount    = esc_attr($instance['image_amount']);
		$linktext  = esc_attr($instance['linktext']);
	?>
	<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php echo theme_locals("title"); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p>

	<p><label for="<?php echo $this->get_field_id('flickr_id'); ?>"><?php echo theme_locals("flickr_id"); ?> <input class="widefat" id="<?php echo $this->get_field_id('flickr_id'); ?>" name="<?php echo $this->get_field_name('flickr_id'); ?>" type="text" value="<?php echo $flickr_id; ?>" /></label></p>
		<p><label for="<?php echo $this->get_field_id('image_amount'); ?>"><?php echo theme_locals("images_count"); ?> <input class="widefat" id="<?php echo $this->get_field_id('image_amount'); ?>" name="<?php echo $this->get_field_name('image_amount'); ?>" type="text" value="<?php echo $amount; ?>" /></label></p>	
	<p><label for="<?php echo $this->get_field_id('linktext'); ?>"><?php echo theme_locals("link_text"); ?> <input class="widefat" id="<?php echo $this->get_field_id('linktext'); ?>" name="<?php echo $this->get_field_name('linktext'); ?>" type="text" value="<?php echo $linktext; ?>" /></label></p>
<?php }
	function widget( $args, $instance ) {
		global $wpdb, $comments, $comment;

		extract($args, EXTR_SKIP);
		$title = apply_filters('widget_title', empty($instance['title']) ? theme_locals("recent_comments_decs") : $instance['title']);
		if ( !$number = (int) $instance['number'] )
			$number = 5;
		else if ( $number < 1 )
			$number = 1;
		else if ( $number > 15 )
			$number = 15;
			
		$comment_len = 100;

		if ( !$comments = wp_cache_get( 'recent_comments', 'widget' ) ) {
			$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_approved = '1' and comment_type not in ('pingback','trackback') ORDER BY comment_date_gmt DESC LIMIT 15");
			wp_cache_add( 'recent_comments', $comments, 'widget' );
		}

		$comments = array_slice( (array) $comments, 0, $number );
?>
		<?php echo $before_widget; ?>
			<?php if ( $title ) echo $before_title . $title . $after_title; ?>
		<ul class="comments-custom unstyled"><?php
			if ( $comments ) : foreach ( (array) $comments as $comment) :?>
			
      <li class="comments-custom_li">
			
			<?php if(function_exists('get_avatar')) {
				echo '<figure class="thumbnail featured-thumbnail">'; 
				echo get_avatar( get_the_author_meta('email'), '58' ); /* This avatar is the user's gravatar (http://gravatar.com) based on their administrative email address */ 
				echo '</figure>';
			} ?>
			<h4 class="comments-custom_h"><?php echo $comment->comment_author; ?></h4>
			<time><?php echo $comment->comment_date; ?></time>
      	<div class="clear"></div>
			<div class="comments-custom_txt">
				<a href="<?php echo get_comment_link( $comment->comment_ID ); ?>" title="<?php echo theme_locals("go_to_c"); ?>"><?php echo strip_tags(substr(apply_filters('get_comment_text', $comment->comment_content), 0, $comment_len)); if (strlen($comment->comment_content) > $comment_len) echo '...';?></a>
			</div>
		</li>
		
   <?php
			endforeach; endif;?>
		</ul>
		<?php echo $after_widget; ?>
<?php
	}
	function myHelpPointers() {
	//First we define our pointers 
	$pointers = array(
	   	array(
	       'id' => 'xyz1',   // unique id for this pointer
	       'screen' => 'options-permalink', // this is the page hook we want our pointer to show on
	       'target' => '#submit', // the css selector for the pointer to be tied to, best to use ID's
	       'title' => theme_locals("submit_permalink"),
	       'content' => theme_locals("submit_permalink_desc"),
	       'position' => array( 
	                          'edge' => 'top', //top, bottom, left, right
	                          'align' => 'left', //top, bottom, left, right, middle
	                          'offset' => '0 5'
	                          )
	       ),

	    array(
	       'id' => 'xyz2',   // unique id for this pointer
	       'screen' => 'themes', // this is the page hook we want our pointer to show on
	       'target' => '#toplevel_page_options-framework', // the css selector for the pointer to be tied to, best to use ID's
	       'title' => theme_locals("import_sample_data"),
	       'content' => theme_locals("import_sample_data_desc"),
	       'position' => array( 
	                          'edge' => 'bottom', //top, bottom, left, right
	                          'align' => 'top', //top, bottom, left, right, middle
	                          'offset' => '0 -10'
	                          )
	       ),

	    array(
	       'id' => 'xyz3',   // unique id for this pointer
	       'screen' => 'toplevel_page_options-framework', // this is the page hook we want our pointer to show on
	       'target' => '#toplevel_page_options-framework', // the css selector for the pointer to be tied to, best to use ID's
	       'title' => theme_locals("import_sample_data"),
	       'content' => theme_locals("import_sample_data_desc_2"),
	       'position' => array( 
	                          'edge' => 'left', //top, bottom, left, right
	                          'align' => 'top', //top, bottom, left, right, middle
	                          'offset' => '0 18'
	                          )
	       )
	    // more as needed
	    );
		//Now we instantiate the class and pass our pointer array to the constructor 
		$myPointers = new WP_Help_Pointer($pointers); 
	};
/**
 * Register the required plugins for this theme.
 *
 * In this example, we register two plugins - one included with the TGMPA library
 * and one from the .org repo.
 *
 * The variable passed to tgmpa_register_plugins() should be an array of plugin
 * arrays.
 *
 * This function is hooked into tgmpa_init, which is fired within the
 * TGM_Plugin_Activation class constructor.
 */
function my_theme_register_required_plugins()
{
    /**
     * Array of plugin arrays. Required keys are name and slug.
     * If the source is NOT from the .org repo, then source is also required.
     */
    $plugins = array(array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'source' => CHILD_DIR . '/includes/plugins/contact-form-7.zip', 'required' => true, 'version' => '', 'force_activation' => true, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Cherry Plugin', 'slug' => 'cherry-plugin', 'source' => PARENT_DIR . '/includes/plugins/cherry-plugin.zip', 'required' => true, 'version' => '0.1', 'force_activation' => true, 'force_deactivation' => false, 'external_url' => ''));
    /**
     * Array of configuration settings. Amend each line as needed.
     * If you want the default strings to be available under your own theme domain,
     * leave the strings uncommented.
     * Some of the strings are added into a sprintf, so see the comments at the
     * end of each line for what each argument will be.
     */
    $config = array('domain' => CURRENT_THEME, 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => true, 'message' => '', 'strings' => array('page_title' => theme_locals("page_title"), 'menu_title' => theme_locals("menu_title"), 'installing' => theme_locals("installing"), 'oops' => theme_locals("oops_2"), 'notice_can_install_required' => _n_noop(theme_locals("notice_can_install_required"), theme_locals("notice_can_install_required_2")), 'notice_can_install_recommended' => _n_noop(theme_locals("notice_can_install_recommended"), theme_locals("notice_can_install_recommended_2")), 'notice_cannot_install' => _n_noop(theme_locals("notice_cannot_install"), theme_locals("notice_cannot_install_2")), 'notice_can_activate_required' => _n_noop(theme_locals("notice_can_activate_required"), theme_locals("notice_can_activate_required_2")), 'notice_can_activate_recommended' => _n_noop(theme_locals("notice_can_activate_recommended"), theme_locals("notice_can_activate_recommended_2")), 'notice_cannot_activate' => _n_noop(theme_locals("notice_cannot_activate"), theme_locals("notice_cannot_activate_2")), 'notice_ask_to_update' => _n_noop(theme_locals("notice_ask_to_update"), theme_locals("notice_ask_to_update_2")), 'notice_cannot_update' => _n_noop(theme_locals("notice_cannot_update"), theme_locals("notice_cannot_update_2")), 'install_link' => _n_noop(theme_locals("install_link"), theme_locals("install_link_2")), 'activate_link' => _n_noop(theme_locals("activate_link"), theme_locals("activate_link_2")), 'return' => theme_locals("return"), 'plugin_activated' => theme_locals("plugin_activated"), 'complete' => theme_locals("complete"), 'nag_type' => theme_locals("updated")));
    tgmpa($plugins, $config);
}
function tz_show_box_category()
{
    global $meta_box_category, $post;
    // Use nonce for verification
    echo '<input type="hidden" name="tz_meta_box_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />';
    echo '<table class="form-table">';
    foreach ($meta_box_category['fields'] as $field) {
        // get current post meta data
        $meta = get_post_meta($post->ID, $field['id'], true);
        switch ($field['type']) {
            //If Text
            case 'text':
                echo '<tr>', '<th style="width:25%"><label for="', $field['id'], '"><strong>', theme_locals($field['name']), '</strong><span style=" display:block; color:#999; margin:5px 0 0 0; line-height: 18px;">' . theme_locals($field['desc']) . '</span></label></th>', '<td>';
                echo '<input type="text" name="', $field['id'], '" id="', $field['id'], '" value="', $meta ? $meta : stripslashes(htmlspecialchars($field['std'], ENT_QUOTES)), '" size="30" style="width:75%; margin-right: 20px; float:left;" />';
                break;
        }
    }
    echo '</table>';
}
function my_show_box_testi()
{
    global $meta_box_testi, $post;
    echo '<p style="padding:10px 0 0 0;">' . theme_locals("testimonial_options_desc") . '</p>';
    // Use nonce for verification
    echo '<input type="hidden" name="my_meta_box_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />';
    echo '<table class="form-table">';
    foreach ($meta_box_testi['fields'] as $field) {
        // get current post meta data
        $meta = get_post_meta($post->ID, $field['id'], true);
        switch ($field['type']) {
            //If Text
            case 'text':
                echo '<tr style="border-top:1px solid #eeeeee;">', '<th style="width:25%"><label for="', $field['id'], '"><strong>', theme_locals($field['name']), '</strong><span style=" display:block; color:#999; margin:5px 0 0 0; line-height: 18px;">' . theme_locals($field['desc']) . '</span></label></th>', '<td>';
                echo '<input type="text" name="', $field['id'], '" id="', $field['id'], '" value="', $meta ? $meta : stripslashes(htmlspecialchars($field['std'], ENT_QUOTES)), '" size="30" style="width:75%; margin-right: 20px; float:left;" />';
                break;
                //If textarea
            //If textarea
            case 'textarea':
                echo '<tr style="border-top:1px solid #eeeeee;">', '<th style="width:25%"><label for="', $field['id'], '"><strong>', theme_locals($field['name']), '</strong><span style="line-height:18px; display:block; color:#999; margin:5px 0 0 0;">' . theme_locals($field['desc']) . '</span></label></th>', '<td>';
                echo '<textarea name="', $field['id'], '" id="', $field['id'], '" value="', $meta ? $meta : stripslashes(htmlspecialchars($field['std'], ENT_QUOTES)), '" rows="8" cols="5" style="width:100%; margin-right: 20px; float:left;">', $meta ? $meta : stripslashes(htmlspecialchars($field['std'], ENT_QUOTES)), '</textarea>';
                break;
                //If Select
            //If Select
            case 'select':
                echo '<tr>', '<th style="width:25%"><label for="', $field['id'], '"><strong>', theme_locals($field['name']), '</strong><span style=" display:block; color:#999; margin:5px 0 0 0; line-height: 18px;">' . theme_locals($field['desc']) . '</span></label></th>', '<td>';
                echo '<select id="' . $field['id'] . '" name="' . $field['id'] . '">';
                foreach ($field['options'] as $option) {
                    echo '<option';
                    if ($meta == $option) {
                        echo ' selected="selected"';
                    }
                    echo '>' . $option . '</option>';
                }
                echo '</select>';
                break;
        }
    }
    echo '</table>';
}
 function hero_unit_shortcode($atts, $content = null)
 {
     extract(shortcode_atts(array('title' => '', 'text' => '', 'btn_text' => theme_locals('read_more'), 'btn_link' => '', 'btn_style' => '', 'btn_size' => '', 'target' => '', 'custom_class' => ''), $atts));
     $output = '<div class="hero-unit ' . $custom_class . '">';
     if ($title != "") {
         $output .= '<h1>';
         $output .= $title;
         $output .= '</h1>';
     }
     if ($text != "") {
         $output .= '<p>';
         $output .= $text;
         $output .= '</p>';
     }
     if ($btn_link != "") {
         $output .= '<div class="btn-align"><a href="' . $btn_link . '" title="' . $btn_text . '" class="btn btn-' . $btn_style . ' btn-' . $btn_size . ' btn-primary" target="' . $target . '">';
         $output .= $btn_text;
         $output .= '</a></div>';
     }
     $output .= '</div><!-- .hero-unit (end) -->';
     return $output;
 }
Exemple #16
0
function elegance_widgets_init()
{
    // Sidebar Widget
    // Location: the sidebar
    register_sidebar(array('name' => theme_locals("sidebar"), 'id' => 'main-sidebar', 'description' => theme_locals("sidebar_desc"), 'before_widget' => '<div id="%1$s" class="widget">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    // Cart Holder Widget
    // Location: the sidebar
    register_sidebar(array('name' => __("Cart Holder", "themeWoo"), 'id' => 'cart-holder', 'description' => __("Widget for cart in Header", "themeWoo"), 'before_widget' => '<div id="%1$s" class="cart-holder">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    // Product page widget area
    // Location: bottom of the product page
    register_sidebar(array('name' => __("Product Page", "themeWoo"), 'id' => 'product-page', 'description' => __("Product page widget area", "themeWoo"), 'before_widget' => '<div class="product-page">', 'after_widget' => '</div>', 'before_title' => '<h2>', 'after_title' => '</h2>'));
    // Footer Widget Area 1
    // Location: at the top of the footer, above the copyright
    register_sidebar(array('name' => theme_locals("footer_1"), 'id' => 'footer-sidebar-1', 'description' => theme_locals("footer_desc"), 'before_widget' => '<div id="%1$s">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>'));
    // Footer Widget Area 2
    // Location: at the top of the footer, above the copyright
    register_sidebar(array('name' => theme_locals("footer_2"), 'id' => 'footer-sidebar-2', 'description' => theme_locals("footer_desc"), 'before_widget' => '<div id="%1$s">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>'));
    // Footer Widget Area 3
    // Location: at the top of the footer, above the copyright
    register_sidebar(array('name' => theme_locals("footer_3"), 'id' => 'footer-sidebar-3', 'description' => theme_locals("footer_desc"), 'before_widget' => '<div id="%1$s">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>'));
    // Footer Widget Area 4
    // Location: at the top of the footer, above the copyright
    register_sidebar(array('name' => theme_locals("footer_4"), 'id' => 'footer-sidebar-4', 'description' => theme_locals("footer_desc"), 'before_widget' => '<div id="%1$s">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>'));
}
Exemple #17
0
function elegance_widgets_init()
{
    // Sidebar Widget
    // Location: the sidebar
    register_sidebar(array('name' => theme_locals("sidebar"), 'id' => 'main-sidebar', 'description' => theme_locals("sidebar_desc"), 'before_widget' => '<div id="%1$s" class="widget">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    // Header Widget Area
    // Location: at the top of pages
    register_sidebar(array('name' => __('Header', getCurrentTheme()), 'id' => 'header', 'description' => __('Header widget area', getCurrentTheme()), 'before_widget' => '<div id="%1$s" class="header-widget">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>'));
    // Cart Holder Widget
    // Location: the sidebar
    register_sidebar(array('name' => __("Cart Holder", "themeWoo"), 'id' => 'cart-holder', 'description' => __("Widget for cart in Header", "themeWoo"), 'before_widget' => '<div id="%1$s" class="cart-holder">', 'after_widget' => '</div></div>', 'before_title' => '<h3>', 'after_title' => '</h3><div class="widget_shopping_cart_content">'));
    // Footer Widget Area 1
    // Location: at the top of the footer, above the copyright
    register_sidebar(array('name' => theme_locals("footer_1"), 'id' => 'footer-sidebar-1', 'description' => theme_locals("footer_desc"), 'before_widget' => '<div id="%1$s" class="footer-widget-item">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    // Footer Widget Area 2
    // Location: at the top of the footer, above the copyright
    register_sidebar(array('name' => theme_locals("footer_2"), 'id' => 'footer-sidebar-2', 'description' => theme_locals("footer_desc"), 'before_widget' => '<div id="%1$s" class="footer-widget-item">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    // Footer Widget Area 3
    // Location: at the top of the footer, above the copyright
    register_sidebar(array('name' => theme_locals("footer_3"), 'id' => 'footer-sidebar-3', 'description' => theme_locals("footer_desc"), 'before_widget' => '<div id="%1$s" class="footer-widget-item">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    // Footer Widget Area 4
    // Location: at the top of the footer, above the copyright
    register_sidebar(array('name' => theme_locals("footer_4"), 'id' => 'footer-sidebar-4', 'description' => theme_locals("footer_desc"), 'before_widget' => '<div id="%1$s" class="footer-widget-item">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
}
function my_post_type_team() {
	register_post_type( 'team',
		array( 
				'label'               => theme_locals("our_team"), 
				'singular_label'      => theme_locals("our_team"),
				'_builtin'            => false,
				// 'exclude_from_search' => true, // Exclude from Search Results
				'capability_type'     => 'page',
				'public'              => true, 
				'show_ui'             => true,
				'show_in_nav_menus'   => false,
				'menu_position'       => 5,
				'rewrite'             => array(
					'slug'       => 'team-view',
					'with_front' => FALSE,
				),
				'supports' => array(
						'title',
						'custom-fields',
						'editor',
						'thumbnail')
					) 
				);
}
<div id="footer-text" class="footer-text">
	<?php 
$myfooter_text = of_get_option('footer_text');
?>
	
	<?php 
if ($myfooter_text) {
    ?>
		<?php 
    echo of_get_option('footer_text');
    ?>
	<?php 
} else {
    ?>
		&copy; <?php 
    echo date('Y');
    ?>
 | <a href="<?php 
    echo home_url();
    ?>
/privacy-policy/" title="<?php 
    echo theme_locals('privacy_policy');
    ?>
"><?php 
    echo theme_locals("privacy_policy");
    ?>
</a>
	<?php 
}
?>
</div>
	function shortcode_carousel($atts, $content = null) {
			extract(shortcode_atts(array(
				'title' => '',
				'num' => '8',
				'type' => '',
				'thumb' => 'true',
				'thumb_width' => '220',
				'thumb_height' => '180',
				'more_text_single' => theme_locals('read_more'),
				'category' => '',
				'custom_category' => '',
				'excerpt_count' => '12',
				'date' => '',
				'author' => '',			
				'min_items' => '3',
				'spacer'	=> '18',
				'custom_class' => ''
			), $atts));

			$template_url = get_stylesheet_directory_uri();
			
			// check what type of post user selected
			switch ($type) {
			   	case 'blog':
					$type_post = '';
					break;
			   	case 'portfolio':
					$type_post = 'portfolio';
					break;
				case 'testimonial':
					$type_post = 'testi';
					break;
			}		

			$output = '<div class="carousel-wrap '.$custom_class.'">';
			if ($title != '') {
				$output .= '<h2>'.$title.'</h2>';
			}
			$output .= '<div id="carousel-'. $type .'" class="es-carousel-wrapper">';
			$output .= '<div class="es-carousel">';
			$output .= '<ul class="es-carousel_list unstyled">';
			
			global $post;
			global $my_string_limit_words;
			
			$args = array(
				'post_type' => $type_post,
				'category_name' => $category,
				$type_post . '_category' => $custom_category,
				'numberposts' => $num,
				'orderby' => 'post_date',
				'order' => 'DESC'
			);

			$latest = get_posts($args);
			$i = 0;
			
			foreach($latest as $post) {
				setup_postdata($post);
				$excerpt = get_the_excerpt();
				$format = get_post_format();
				$attachment_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );
				$url = $attachment_url['0'];
				$image = aq_resize($url, $thumb_width, $thumb_height, true);
				$link_format_url =  get_post_meta(get_the_ID(), 'tz_link_url', true);		

				$output .= '<li class="es-carousel_li '.$format.'">';				
					
					if ($thumb == 'true') {
						if (has_post_thumbnail($post->ID) && $format == 'image') {
												
							$prettyType = 'prettyPhoto';				
							$output .= '<figure class="featured-thumbnail">';
							$output .= '<a href="'.get_permalink($post->ID).'" title="'.get_the_title($post->ID).'">';
							$output .= '<img  src="'.$image.'" alt="'.get_the_title($post->ID).'" />';
							$output .= '</a></figure>';

						} elseif ( $format != 'video' && $format != 'audio') {						

							$thumbid = 0;
							$thumbid = get_post_thumbnail_id($post->ID);
							$images = get_children( array(
								'orderby' => 'menu_order',
								'order' => 'ASC',
								'post_type' => 'attachment',
								'post_parent' => $post->ID,
								'post_mime_type' => 'image',
								'post_status' => null,
								'numberposts' => -1
							) ); 

							if ( $images ) {

								$k = 0;
								//looping through the images
								foreach ( $images as $attachment_id => $attachment ) {					
									//if( $attachment->ID == $thumbid ) continue;

									$image_attributes = wp_get_attachment_image_src( $attachment_id, 'full' ); // returns an array
									$img = aq_resize($image_attributes[0], $thumb_width, $thumb_height, true);  //resize & crop img
									$alt = get_post_meta($attachment->ID, '_wp_attachment_image_alt', true);
									$image_title = $attachment->post_title;

									if ( $k == 0 ) {
										$output .= '<figure class="featured-thumbnail">';
										$output .= '<a href="'.get_permalink($post->ID).'" title="'.get_the_title($post->ID).'">';
										$output .= '<img src="'.$img.'" alt="'.get_the_title($post->ID).'" />';
									} else {
										$output .= '<figure class="featured-thumbnail" style="display:none;">';
										$output .= '<a href="'.get_permalink($post->ID).'" title="'.get_the_title($post->ID).'">';
										$output .= '<img src="'.$img.'" alt="'.get_the_title($post->ID).'" />';
									}
									$output .= '</a></figure>';
									$k++;
								}					
							} elseif (has_post_thumbnail($post->ID)) {
								$output .= '<figure class="featured-thumbnail">';
								$output .= '<a href="'.get_permalink($post->ID).'" title="'.get_the_title($post->ID).'">';
								$output .= '<img src="'.$image.'" alt="'.get_the_title($post->ID).'" />';
								$output .= '</a></figure>';
							} /*else {
								// empty_featured_thumb.gif - for post without featured thumbnail
								$output .= '<figure class="featured-thumbnail">';
								$output .= '<a href="'.get_permalink($post->ID).'" title="'.get_the_title($post->ID).'">';
								$output .= '<img  src="'.$template_url.'/images/empty_thumb.gif" alt="'.get_the_title($post->ID).'" />';
								$output .= '</a></figure>';							
							}*/
						} else {
							if (has_post_thumbnail($post->ID)) {
								// for Video and Audio post format - no lightbox
								$output .= '<figure class="featured-thumbnail"><a href="'.get_permalink($post->ID).'" title="'.get_the_title($post->ID).'">';
								$output .= '<img  src="'.$image.'" alt="'.get_the_title($post->ID).'" />';
								$output .= '</a></figure>';
							} /*else {
								// empty_featured_thumb.gif - for post without featured thumbnail
								$output .= '<figure class="featured-thumbnail">';
								$output .= '<a href="'.get_permalink($post->ID).'" title="'.get_the_title($post->ID).'">';
								$output .= '<img  src="'.$template_url.'/images/empty_thumb.gif" alt="'.get_the_title($post->ID).'" />';
								$output .= '</a></figure>';
							}*/
						}
					}

					$output .= '<div class="desc">';
					if ($date == "yes") {
						$output .= '<time datetime="'.get_the_time('Y-m-d\TH:i:s', $post->ID).'">' .get_the_time('M', $post->ID). ' <span>'.get_the_time('d', $post->ID).'</span></time>';
					}				

					if ($author == "yes") {
						$output .= '<em class="author">, '.theme_locals("by").' <a href="'.get_author_posts_url(get_the_author_meta( 'ID' )).'">'.get_the_author_meta('display_name').'</a></em>';
					}
					
					//Link format
					if ($format == "link") {
						$output .= '<h5><a href="'.$link_format_url.'" title="'.get_the_title($post->ID).'">';
						$output .= get_the_title($post->ID);
						$output .= '</a></h5>';

					//Other formats
					} else {
						$output .= '<h5><a href="'.get_permalink($post->ID).'" title="'.get_the_title($post->ID).'">';
						$output .= get_the_title($post->ID);
						$output .= '</a></h5>';
					}		
					
					if($excerpt_count >= 1){
						$output .= '<p class="excerpt">';
						$output .= my_string_limit_words($excerpt,$excerpt_count);
						$output .= '</p>';
					}
					
					if($more_text_single!=""){
						$output .= '<a href="'.get_permalink($post->ID).'" class="btn btn-primary" title="'.get_the_title($post->ID).'">';
						$output .= $more_text_single;
						$output .= '</a>';
					}
					$output .= '</div>';
					
				$output .= '</li>';

			}
			$output .= '</ul>';
	       	$output .= '</div></div>';
		   
			$output .= '<script>
					jQuery("#carousel-'. $type .'").elastislide({
						imageW 		: '.$thumb_width.',
						minItems	: '.$min_items.',
						speed		: 600,
						easing		: "easeOutQuart",
						margin		: '.$spacer.',
						border		: 0,
						onClick		: function() {}
					});';
			$output .= '</script>';
			
	       	$output .= '</div>';
			return $output;
	}
 function optionsframework_options()
 {
     // Fonts
     global $typography_mixed_fonts;
     $typography_mixed_fonts = array_merge(options_typography_get_os_fonts(), options_typography_get_google_fonts());
     asort($typography_mixed_fonts);
     $options = array();
     // ---------------------------------------------------------
     // General
     // ---------------------------------------------------------
     $options['general'] = array("name" => theme_locals('general'), "type" => "heading");
     // Background Defaults
     $background_defaults = array('color' => '', 'image' => '', 'repeat' => 'repeat', 'position' => 'top center', 'attachment' => 'scroll');
     $options['body_background'] = array("id" => "body_background", "std" => $background_defaults);
     $options['main_layout'] = array("id" => "main_layout", "std" => "fullwidth");
     $options['main_background'] = array("id" => "main_background", "std" => "#fafafa");
     $header_bg_defaults = array('color' => '', 'image' => '', 'repeat' => 'repeat', 'position' => 'top center', 'attachment' => 'scroll');
     $options['header_background'] = array("id" => "header_background", "std" => $header_bg_defaults);
     $options['links_color'] = array("id" => "links_color", "std" => "#0088cc");
     $options['links_color_hover'] = array("id" => "links_color_hover", "std" => "");
     $options['google_mixed_3'] = array('id' => 'google_mixed_3', 'std' => array('size' => '12px', 'lineheight' => '18px', 'face' => 'Arial, Helvetica, sans-serif', 'style' => 'normal', 'character' => 'latin', 'color' => '#333333'));
     $options['h1_heading'] = array('id' => 'h1_heading', 'std' => array('size' => '30px', 'lineheight' => '35px', 'face' => 'Arial, Helvetica, sans-serif', 'style' => 'normal', 'character' => 'latin', 'color' => '#333333'));
     $options['h2_heading'] = array('id' => 'h2_heading', 'std' => array('size' => '22px', 'lineheight' => '26px', 'face' => 'Arial, Helvetica, sans-serif', 'style' => 'normal', 'character' => 'latin', 'color' => '#333333'));
     $options['h3_heading'] = array('id' => 'h3_heading', 'std' => array('size' => '18px', 'lineheight' => '22px', 'face' => 'Arial, Helvetica, sans-serif', 'style' => 'normal', 'character' => 'latin', 'color' => '#333333'));
     $options['h4_heading'] = array('id' => 'h4_heading', 'std' => array('size' => '14px', 'lineheight' => '20px', 'face' => 'Arial, Helvetica, sans-serif', 'style' => 'normal', 'character' => 'latin', 'color' => '#333333'));
     $options['h5_heading'] = array('id' => 'h5_heading', 'std' => array('size' => '12px', 'lineheight' => '18px', 'face' => 'Arial, Helvetica, sans-serif', 'style' => 'normal', 'character' => 'latin', 'color' => '#333333'));
     $options['h6_heading'] = array('id' => 'h6_heading', 'std' => array('size' => '12px', 'lineheight' => '18px', 'face' => 'Arial, Helvetica, sans-serif', 'style' => 'normal', 'character' => 'latin', 'color' => '#333333'));
     $options['g_search_box_id'] = array("id" => "g_search_box_id", "std" => "yes");
     $options['g_breadcrumbs_id'] = array("id" => "g_breadcrumbs_id", "std" => "yes");
     $options['custom_css'] = array("id" => "custom_css", "std" => "");
     $options['live_chat_id'] = array("id" => "live_chat_id", "std" => "7830-582-10-3714");
     // ---------------------------------------------------------
     // Logo & Favicon
     // ---------------------------------------------------------
     $options["logo_favicon"] = array("name" => theme_locals('logo_favicon'), "type" => "heading");
     $options['logo_type'] = array("id" => "logo_type", "std" => "image_logo");
     $options['logo_typography'] = array('id' => 'logo_typography', 'std' => array('size' => '40px', 'lineheight' => '48px', 'face' => 'Arial, Helvetica, sans-serif', 'style' => 'normal', 'character' => 'latin', 'color' => '#049CDB'));
     $options['logo_url'] = array("id" => "logo_url", "std" => CHILD_URL . "/images/logo.png");
     $options['favicon'] = array("id" => "favicon", "std" => CHILD_URL . "/favicon.ico");
     // ---------------------------------------------------------
     // Navigation
     // ---------------------------------------------------------
     $options['navigation'] = array("name" => theme_locals('navigation'), "type" => "heading");
     $options['menu_typography'] = array('id' => 'menu_typography', 'std' => array('size' => '12px', 'lineheight' => '18px', 'face' => 'Arial, Helvetica, sans-serif', 'style' => 'normal', 'character' => 'latin', 'color' => '#1133AA'));
     $options['sf_delay'] = array("id" => "sf_delay", "std" => "1000");
     $options['sf_f_animation'] = array("id" => "sf_f_animation", "std" => "show");
     $options['sf_sl_animation'] = array("id" => "sf_sl_animation", "std" => "show");
     $options['sf_speed'] = array("id" => "sf_speed", "std" => "normal");
     $options['sf_arrows'] = array("id" => "sf_arrows", "std" => "false");
     $options['mobile_menu_label'] = array("id" => "mobile_menu_label", "std" => theme_locals('mobile_menu_std'));
     // ---------------------------------------------------------
     // Slider
     // ---------------------------------------------------------
     $options['slider'] = array("name" => theme_locals('slider'), "type" => "heading");
     // Slider type
     $options['sl_type'] = array("id" => "slider_type", "std" => "camera_slider");
     // ---------------------------------------------------------
     // Camera Slider
     // ---------------------------------------------------------
     $options['sl_effect'] = array("id" => "sl_effect", "std" => "simpleFade");
     $options['sl_columns'] = array("id" => "sl_columns", "std" => "12");
     $options['sl_rows'] = array("id" => "sl_rows", "std" => "8");
     $options['sl_banner'] = array("id" => "sl_banner", "std" => "fadeIn");
     $options['sl_pausetime'] = array("id" => "sl_pausetime", "std" => "7000");
     $options['sl_animation_speed'] = array("id" => "sl_animation_speed", "std" => "1500");
     $options['sl_slideshow'] = array("id" => "sl_slideshow", "std" => "true");
     $options['sl_thumbnails'] = array("id" => "sl_thumbnails", "std" => "true");
     // set "disabled" => "true" when only text in Slider posts
     $options['sl_control_nav'] = array("id" => "sl_control_nav", "std" => "true");
     $options['sl_dir_nav'] = array("id" => "sl_dir_nav", "std" => "true");
     $options['sl_dir_nav_hide'] = array("id" => "sl_dir_nav_hide", "std" => "false");
     $options['sl_play_pause_button'] = array("id" => "sl_play_pause_button", "std" => "true");
     $options['sl_pause_on_hover'] = array("id" => "sl_pause_on_hover", "std" => "true");
     $options['sl_loader'] = array("id" => "sl_loader", "std" => "no");
     // ---------------------------------------------------------
     // Accordion Slider
     // ---------------------------------------------------------
     $multicheck_defaults = array('43' => 0, '49' => 0, '50' => 0, '51' => 0, '52' => 0);
     $options['acc_show_post'] = array("id" => "acc_show_post", "std" => $multicheck_defaults);
     $options['acc_slideshow'] = array("id" => "acc_slideshow", "std" => "false");
     $options['acc_hover_pause'] = array("id" => "acc_hover_pause", "std" => "true");
     $options['acc_pausetime'] = array("id" => "acc_pausetime", "std" => "6000");
     $options['acc_animation_speed'] = array("id" => "acc_animation_speed", "std" => "600");
     $options['acc_easing'] = array("id" => "acc_easing", "std" => "easeOutCubic");
     $options['acc_trigger'] = array("id" => "acc_trigger", "std" => "mouseover");
     $options['acc_starting_slide'] = array("id" => "acc_starting_slide", "std" => "0");
     // ---------------------------------------------------------
     // Blog
     // --------------------------------------------------------
     $options['blog'] = array("name" => theme_locals('blog'), "type" => "heading");
     $options['blog_text'] = array("id" => "blog_text", "std" => theme_locals('blog'));
     $options['blog_related'] = array("id" => "blog_related", "std" => theme_locals('posts_std'));
     $options['blog_sidebar_pos'] = array("id" => "blog_sidebar_pos", "std" => "right");
     $options['post_image_size'] = array("id" => "post_image_size", "std" => "large");
     $options['single_image_size'] = array("id" => "single_image_size", "std" => "large");
     $options['post_meta'] = array("id" => "post_meta", "std" => "true");
     $options['post_meta_display'] = array("id" => "post_meta_display", "std" => "only_post");
     $options['post_excerpt'] = array("id" => "post_excerpt", "std" => "true");
     // ---------------------------------------------------------
     // Portfolio
     // ---------------------------------------------------------
     $options['portfolio'] = array("name" => theme_locals("portfolio"), "type" => "heading");
     $options['folio_filter'] = array("id" => "folio_filter", "std" => "cat");
     $options['folio_title'] = array("id" => "folio_title", "std" => "yes");
     $options['folio_excerpt'] = array("id" => "folio_excerpt", "std" => "yes");
     $options['folio_excerpt_count'] = array("id" => "folio_excerpt_count", "std" => "20");
     $options['folio_btn'] = array("id" => "folio_btn", "std" => "yes");
     $options['folio_meta'] = array("id" => "folio_meta", "std" => "yes");
     $options['layout_mode'] = array("id" => "layout_mode", "std" => "fitRows");
     $options['items_count2'] = array("id" => "items_count2", "std" => "8");
     $options['items_count3'] = array("id" => "items_count3", "std" => "9");
     $options['items_count4'] = array("id" => "items_count4", "std" => "12");
     // ---------------------------------------------------------
     // Footer
     // ---------------------------------------------------------
     $options['footer'] = array("name" => theme_locals("footer"), "type" => "heading");
     $options['footer_text'] = array("id" => "footer_text", "std" => "");
     $options['ga_code'] = array("id" => "ga_code", "std" => "");
     $options['feed_url'] = array("id" => "feed_url", "std" => "");
     $options['footer_menu'] = array("id" => "footer_menu", "std" => "true");
     $options['footer_menu_typography'] = array('id' => 'footer_menu_typography', 'std' => array('size' => '12px', 'lineheight' => '18px', 'face' => 'Arial, Helvetica, sans-serif', 'style' => 'normal', 'character' => 'latin', 'color' => '#0088CC'));
     return $options;
 }
/" title="<?php 
    bloginfo('description');
    ?>
"><?php 
    echo theme_locals("return_to");
    ?>
</a> <?php 
    echo theme_locals("search_form");
    ?>
</p>
	<?php 
    get_search_form();
    /* outputs the default Wordpress search form */
    ?>
</div><!--no-results-->
<?php 
}
?>

<ul class="pager single-pager">
	<li class="previous">
		<?php 
previous_post_link('%link', theme_locals("prev_post"));
?>
		</li><!--.previous-->
	<li class="next">
		<?php 
next_post_link('%link', theme_locals("next_post"));
?>
	</li><!--.next-->
</ul><!--.pager-->
Exemple #23
0
<div class="share-buttons">
	<?php 
    /* get permalink */
    $permalink = get_permalink(get_the_ID());
    $titleget = get_the_title();
    ?>

<!-- <a class="facebook" target="_blank" onclick="return !window.open(this.href, 'Facebook', 'width=640,height=300')" href="http://www.facebook.com/sharer/sharer.php?u=<?php 
    //echo $permalink;
    ?>
">Facebook</a> -->
<?php 
    if ($shareon == 'true') {
        ?>
<div class="shareon"><?php 
        echo theme_locals("share_on");
        ?>
</div>
<?php 
    }
    if ($facebook_share == 'true') {
        ?>
<a class="hs-icon icon-facebook-1" onClick="window.open('http://www.facebook.com/sharer.php?u=<?php 
        echo $permalink;
        ?>
','Facebook','width=600,height=300,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-150)+''); return false;" href="http://www.facebook.com/sharer.php?u=<?php 
        echo $permalink;
        ?>
"></a>
<?php 
    }
    /** @see WP_Widget::form */
    function form($instance)
    {
        $defaults = array('title' => 'My Recent Comments', 'comments_count' => '5', 'display_avatar' => 'on', 'avatar_size' => '48', 'display_author_name' => 'on', 'display_date' => 'on', 'display_post_title' => 'on', 'meta_format' => 'none');
        $instance = wp_parse_args((array) $instance, $defaults);
        $title = esc_attr($instance['title']);
        $comments_count = esc_attr($instance['comments_count']);
        $avatar_size = esc_attr($instance['avatar_size']);
        $display_author_name = esc_attr($instance['display_author_name']);
        $display_avatar = esc_attr($instance['display_avatar']);
        $display_date = esc_attr($instance['display_date']);
        $display_post_title = esc_attr($instance['display_post_title']);
        $meta_format = esc_attr($instance['meta_format']);
        ?>

		<p><label for="<?php 
        echo $this->get_field_id('title');
        ?>
"><?php 
        echo theme_locals("title") . ":";
        ?>
<input class="widefat" id="<?php 
        echo $this->get_field_id('title');
        ?>
" name="<?php 
        echo $this->get_field_name('title');
        ?>
" type="text" value="<?php 
        echo $title;
        ?>
" /></label></p>
		<p><label for="<?php 
        echo $this->get_field_id('comments_count');
        ?>
"><?php 
        echo theme_locals("comments_count") . ":";
        ?>
<input class="widefat" id="<?php 
        echo $this->get_field_id('comments_count');
        ?>
" name="<?php 
        echo $this->get_field_name('comments_count');
        ?>
" type="text" value="<?php 
        echo $comments_count;
        ?>
" /></label></p>
		<p><input class="checkbox" id="<?php 
        echo $this->get_field_id('display_avatar');
        ?>
" name="<?php 
        echo $this->get_field_name('display_avatar');
        ?>
" type="checkbox" <?php 
        checked($instance['display_avatar'], 'on');
        ?>
 /> <label for="<?php 
        echo $this->get_field_id('display_avatar');
        ?>
"><?php 
        echo theme_locals("display_avatar");
        ?>
</label></p>
		<p><label for="<?php 
        echo $this->get_field_id('avatar_size');
        ?>
"><?php 
        echo theme_locals("avatar_size") . ":";
        ?>
 
			<select id="<?php 
        echo $this->get_field_id('avatar_size');
        ?>
" name="<?php 
        echo $this->get_field_name('avatar_size');
        ?>
" style="width:80px;" > 
				<option value="128" <?php 
        echo $avatar_size === '128' ? ' selected="selected"' : '';
        ?>
><?php 
        echo "128x128";
        ?>
</option>
				<option value="96" <?php 
        echo $avatar_size === '96' ? ' selected="selected"' : '';
        ?>
><?php 
        echo "96x96";
        ?>
</option>
				<option value="64" <?php 
        echo $avatar_size === '64' ? ' selected="selected"' : '';
        ?>
><?php 
        echo "64x64";
        ?>
</option>
				<option value="48" <?php 
        echo $avatar_size === '48' ? ' selected="selected"' : '';
        ?>
><?php 
        echo "48x48";
        ?>
</option>
				<option value="32" <?php 
        echo $avatar_size === '32' ? ' selected="selected"' : '';
        ?>
><?php 
        echo "32x32";
        ?>
</option>
			</select>
		</label></p>
		<p><input class="checkbox" id="<?php 
        echo $this->get_field_id('display_author_name');
        ?>
" name="<?php 
        echo $this->get_field_name('display_author_name');
        ?>
" type="checkbox" <?php 
        checked($instance['display_author_name'], 'on');
        ?>
 /> <label for="<?php 
        echo $this->get_field_id('display_author_name');
        ?>
"><?php 
        echo theme_locals("display_author_name");
        ?>
</label></p>
		<p><input class="checkbox" id="<?php 
        echo $this->get_field_id('display_date');
        ?>
" name="<?php 
        echo $this->get_field_name('display_date');
        ?>
" type="checkbox" <?php 
        checked($instance['display_date'], 'on');
        ?>
 /> <label for="<?php 
        echo $this->get_field_id('display_date');
        ?>
"><?php 
        echo theme_locals("display_date");
        ?>
</label></p>
		<p><input class="checkbox" id="<?php 
        echo $this->get_field_id('display_post_title');
        ?>
" name="<?php 
        echo $this->get_field_name('display_post_title');
        ?>
" type="checkbox" <?php 
        checked($instance['display_post_title'], 'on');
        ?>
 /> <label for="<?php 
        echo $this->get_field_id('display_post_title');
        ?>
"><?php 
        echo theme_locals("display_post_title");
        ?>
</label></p>
		<p><label for="<?php 
        echo $this->get_field_id('meta_format');
        ?>
"><?php 
        echo theme_locals("meta_format") . ":";
        ?>
<br />
			<select id="<?php 
        echo $this->get_field_id('meta_format');
        ?>
" name="<?php 
        echo $this->get_field_name('meta_format');
        ?>
" style="width:150px;" > 
				<option value="none" <?php 
        echo $meta_format === 'none' ? ' selected="selected"' : '';
        ?>
><?php 
        echo theme_locals("none");
        ?>
</option>
				<option value="icons" <?php 
        echo $meta_format === 'icons' ? ' selected="selected"' : '';
        ?>
><?php 
        echo theme_locals("icons");
        ?>
</option>
				<option value="labels" <?php 
        echo $meta_format === 'labels' ? ' selected="selected"' : '';
        ?>
><?php 
        echo theme_locals("labels");
        ?>
</option>
			</select>
		</label></p>
		<?php 
    }
Exemple #25
0
function my_post_type_team()
{
    register_post_type('team', array('label' => theme_locals("our_team"), 'singular_label' => theme_locals("our_team"), '_builtin' => false, 'capability_type' => 'page', 'public' => true, 'show_ui' => true, 'show_in_nav_menus' => false, 'menu_position' => 5, 'menu_icon' => version_compare($GLOBALS['wp_version'], '3.8', '>=') ? 'dashicons-businessman' : '', 'rewrite' => array('slug' => 'team-view', 'with_front' => FALSE), 'supports' => array('title', 'editor', 'thumbnail')));
}
Exemple #26
0
<div class="no-results">
	<?php 
    echo '<p><strong>' . theme_locals("there_has") . '</strong></p>';
    ?>
	<p><?php 
    echo theme_locals("we_apologize");
    ?>
 <a href="<?php 
    echo home_url();
    ?>
/" title="<?php 
    bloginfo('description');
    ?>
"><?php 
    echo theme_locals("return_to");
    ?>
</a> <?php 
    echo theme_locals("search_form");
    ?>
</p>
	<?php 
    get_search_form();
    /* outputs the default Wordpress search form */
    ?>
</div><!--no-results-->

<?php 
}
get_template_part('includes/post-formats/post-nav');
wp_reset_postdata();
    public function add_scripts()
    {
        $pointers = $this->valid;
        if (empty($pointers)) {
            return;
        }
        $pointers = json_encode($pointers);
        $close_txt = theme_locals('pointer_close');
        echo <<<HTML
\t\t<script>
\t\tjQuery(document).ready( function(\$) {
\t\t\tvar WPHelpPointer = {$pointers};

\t\t\t\$.each(WPHelpPointer.pointers, function(i) {
\t\t\t\twp_help_pointer_open(i);
\t\t\t});

\t\t\tfunction wp_help_pointer_open(i) {
\t\t\t\tpointer = WPHelpPointer.pointers[i];
\t\t\t\toptions = \$.extend( pointer.options, {
\t\t\t\t\tclose: function() {
\t\t\t\t\t\t\$.post( ajaxurl, {
\t\t\t\t\t\t\tpointer: pointer.pointer_id,
\t\t\t\t\t\t\taction: 'dismiss-wp-pointer'
\t\t\t\t\t\t});
\t\t\t\t\t},
\t\t\t\t\tbuttons: function( event, t ) {
\t\t\t\t\t\tvar close  = '{$close_txt}',
\t\t\t\t\t\t\tbutton = \$('<a class="close" href="#">' + close + '</a>');

\t\t\t\t\t\treturn button.bind( 'click.pointer', function(e) {
\t\t\t\t\t\t\te.preventDefault();
\t\t\t\t\t\t\tt.element.pointer('close');
\t\t\t\t\t\t});
\t\t\t\t\t}
\t\t\t\t});
\t\t\t\t\$(pointer.target).pointer( options ).pointer('open');
\t\t\t}
\t\t});
\t\t</script>
HTML;
    }
<?php /* Static Name: Search */ ?>
<!-- BEGIN SEARCH FORM -->
<?php if ( of_get_option('g_search_box_id') == 'yes') { ?>  
	<div class="search-form search-form__h hidden-phone clearfix">
		<form id="search-header" class="navbar-form pull-right" method="get" action="<?php echo home_url(); ?>/" accept-charset="utf-8">
			<input type="text" name="s" placeholder="<?php echo theme_locals('search'); ?>" class="search-form_it"> <input type="submit" value="<?php echo theme_locals('go'); ?>" id="submit" class="search-form_is btn btn-primary">
		</form>
	</div>  
<?php } ?>
<!-- END SEARCH FORM -->
Exemple #29
0
</a>
</div>	
		<div class="clear"></div>
		<?php 
    }
    ?>
	</div>
				
	<?php 
} else {
    ?>
	
	<!-- Post Content -->
	<div class="post_content">	
		<?php 
    the_content('<div class="readmore-button">' . theme_locals("continue_reading") . '</div>');
    ?>
		<?php 
    wp_link_pages('before=<div class="pagelink">&after=</div>');
    ?>
		<div class="clear"></div>
	</div>
	<!-- //Post Content -->	
	<?php 
}
?>
	</div>	</div>	
	
</div>
<?php 
get_template_part('includes/post-formats/share-buttons');
        }
        if (!empty($portfolioDate)) {
            echo '<li>';
            echo '<strong class="portfolio-meta-key">' . theme_locals("date") . ":" . '</strong>';
            echo '<span>' . $portfolioDate . '</span><br />';
            echo '</li>';
        }
        if (!empty($portfolioInfo)) {
            echo '<li>';
            echo '<strong class="portfolio-meta-key">' . theme_locals("info") . ":" . '</strong>';
            echo '<span>' . $portfolioInfo . '</span><br />';
            echo '</li>';
        }
        if (!empty($portfolioURL)) {
            echo '<li>';
            echo "<a target='_blank' href='{$portfolioURL}'>" . theme_locals("launch_project") . "</a>";
            echo '</li>';
        }
        if (!empty($portfolioClient) || !empty($portfolioDate) || !empty($portfolioInfo) || !empty($portfolioURL)) {
            echo '</ul>';
        }
        ?>
				</div><!-- END .entry-meta -->
				<?php 
        the_content();
        //get_template_part('includes/post-formats/share-buttons');
        ?>
			</div><!-- END .entry-content -->
		</div><!-- .row -->
		<div class="row">
			<div class="<?php