/
home
/
vianto5
/
.trash
/
cititower.mx
/
wp-content
/
themes
/
montreal
/
/home/vianto5/.trash/cititower.mx/wp-content/themes/montreal
mkdir
upload
Name
Size
Mode
Actions
admin/
-
0755
rm
css/
-
0755
rm
font/
-
0755
rm
images/
-
0755
rm
img/
-
0755
rm
inc/
-
0755
rm
js/
-
0755
rm
languages/
-
0755
rm
player/
-
0755
rm
postformats/
-
0755
rm
404.php
723
0644
edit
dl
rm
archive-portfolio.php
1352
0644
edit
dl
rm
comments.php
0
0644
edit
dl
rm
editor-style-rtl.css
413
0644
edit
dl
rm
editor-style.css
5434
0644
edit
dl
rm
footer-stripe.php
1799
0644
edit
dl
rm
footer.php
2308
0644
edit
dl
rm
functions.php
15799
0644
edit
dl
rm
header.php
2757
0644
edit
dl
rm
index.php
1468
0644
edit
dl
rm
newsletter.php
1353
0644
edit
dl
rm
page-about.php
4948
0644
edit
dl
rm
page-blog-list.php
1590
0644
edit
dl
rm
page-home.php
9122
0644
edit
dl
rm
page-location.php
2741
0644
edit
dl
rm
page-planner.php
8828
0644
edit
dl
rm
page-portfolio-basic.php
2182
0644
edit
dl
rm
page-portfolio-drag.php
2094
0644
edit
dl
rm
page-portfolio-grid-black.php
2029
0644
edit
dl
rm
page-portfolio-grid-block.php
1380
0644
edit
dl
rm
page-portfolio-grid-white.php
1981
0644
edit
dl
rm
page-portfolio-stripe.php
1649
0644
edit
dl
rm
page-sidebar.php
993
0644
edit
dl
rm
page-thanks.php
566
0644
edit
dl
rm
page-ubicacion.php
2865
0644
edit
dl
rm
page.php
782
0644
edit
dl
rm
portfolio-navigation.php
682
0644
edit
dl
rm
projectplanner.php
5237
0644
edit
dl
rm
rtl.css
1439
0644
edit
dl
rm
rtl.php
43034
0644
edit
dl
rm
screenshot.png
394176
0644
edit
dl
rm
search.php
1465
0644
edit
dl
rm
searchform.php
323
0644
edit
dl
rm
sendemail.php
2517
0644
edit
dl
rm
sidebar-contact.php
103
0644
edit
dl
rm
sidebar.php
99
0644
edit
dl
rm
single-portfolio.php
218
0644
edit
dl
rm
single.php
1149
0644
edit
dl
rm
style.css
1495
0644
edit
dl
rm
styles.php
43191
0644
edit
dl
rm
wp-updates-theme.php
1923
0644
edit
dl
rm
Edit:
/home/vianto5/.trash/cititower.mx/wp-content/themes/montreal/functions.php
(15799B)
<?php add_action('after_setup_theme', 'montreal_setup'); function montreal_setup(){ load_theme_textdomain('montreal', get_template_directory() . '/languages'); } //////////////////////////////////////////////////////// ////////QUEUE UP FRAMEWORK///////////////////////////// ////////////////////////////////////////////////////// //CUSTOM POST TYPES require_once ( "admin/cpt.php"); //MENUS & WIDGETS require_once ( "admin/mandw.php"); //THEME OPTIONS require_once ( "inc/framework/theme_options.php"); //CUSTOM METABOXES require_once ( "inc/framework/metaboxes.php"); //SHORTCODES require_once ( 'inc/framework/shortcodes.php' ); //WIDGETS require( get_template_directory() . '/inc/framework/widgets.php' ); //ENQUEUE JQUERY & CUSTOM SCRIPTS function load_scripts() { wp_enqueue_style( 'style', get_stylesheet_uri() ); wp_enqueue_style( 'mediaelementplayer', get_template_directory_uri() . '/player/skin/mediaelementplayer.css' ); wp_enqueue_script( 'jquery-ui', get_template_directory_uri() . '/js/jquery-ui-1.8.23.custom.min.js', array('jquery') ); wp_enqueue_script( 'mediaelement', get_template_directory_uri() . '/player/lib/mediaelement.js', array('jquery') ); wp_enqueue_script( 'mediaelementplayer', get_template_directory_uri() . '/player/lib/mediaelementplayer.js', array('jquery') ); wp_enqueue_script( 'maps', 'http://maps.google.com/maps/api/js?sensor=true', array('jquery') ); wp_enqueue_script( 'gumby', get_template_directory_uri() . '/js/libs/gumby.min.js', array('jquery') ); wp_enqueue_script( 'plugins', get_template_directory_uri() . '/js/plugins.js', array('jquery') ); wp_enqueue_script( 'main', get_template_directory_uri() . '/js/main.js', array('jquery') ); if( is_page_template('page-home.php') ) { wp_enqueue_script( 'supersized', get_template_directory_uri() . '/js/supersized.js', array('jquery') ); } if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action('wp_enqueue_scripts', 'load_scripts'); ///////////////////////////////////////////// ////////ADD THEME SUPPORT/////////////////// /////////////////////////////////////////// //ADD FEATURED IMAGES add_theme_support( 'post-thumbnails' ); add_image_size( 'client', 160, 80, true); //POST FORMATS add_theme_support( 'post-formats', array( 'gallery', 'video', 'image' ) ); //FEED LINKS add_theme_support( 'automatic-feed-links' ); add_editor_style('editor-style.css'); if ( ! isset( $content_width ) ) $content_width = 940; ///////////////////////////////////////////// ///////////////////////////////////////////// ////////CUSTOM COMMENTS///////////////////// /////////////////////////////////////////// function custom_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <section id="comment-<?php comment_ID(); ?>" <?php comment_class('row midtoppadding'); ?>> <div class="two columns"> <?php echo get_avatar( $comment->comment_author_email, 48 ); ?> </div> <div class="ten columns smalltoppadding comment"> <div class="row"> <p class="meta greytext"> <?php printf(__('<span class="extrabold">%s</span>'), get_comment_author_link()) ?> - <?php echo get_comment_date(); ?> - <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?> </p> </div> <div class="row"> <p class="blacktext meta"> <?php echo get_comment_text(); ?> </p> </div> <?php if ($comment->comment_approved == '0') : ?> <p><em><?php _e('Your comment is awaiting moderation.', 'montreal') ?></em></p> <?php endif; ?> <div class="smalltoppadding grey"> </div> </div> </section> <?php } ///////////////////////////////////////////// ////////FILTERS, ACTIONS & HOOKS//////////// /////////////////////////////////////////// function custom_excerpt_length( $length ) { return 20; } add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); function new_excerpt_more( $more ) { return '...'; } add_filter('excerpt_more', 'new_excerpt_more'); function xf_tag_cloud($tag_string){ return preg_replace("/style='font-size:.+pt;'/", '', $tag_string); } add_filter('wp_generate_tag_cloud', 'xf_tag_cloud',10,3); ///////////////////////////////////////////// ////////CUSTOM FUNCTIONS//////////////////// /////////////////////////////////////////// function wpb_set_post_views($postID) { $count_key = 'wpb_post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ $count = 0; delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, '0'); }else{ $count++; update_post_meta($postID, $count_key, $count); } } //PAGIANTION, COURTESY OF KREISI function kriesi_pagination($pages = '', $range = 2) { $showitems = ($range * 2)+1; global $paged; if(empty($paged)) $paged = 1; if($pages == '') { global $wp_query; $pages = $wp_query->max_num_pages; if(!$pages) { $pages = 1; } } if(1 != $pages) { echo "<ul class='pagination'>"; if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<li><a href='".get_pagenum_link(1)."'>«</a></li>"; if($paged > 1 && $showitems < $pages) echo "<li><a href='".get_pagenum_link($paged - 1)."'>‹</a></li>"; for ($i=1; $i <= $pages; $i++) { if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )) { echo ($paged == $i)? "<li class='current'><a href='#'>".$i."</a></li>":"<li><a href='".get_pagenum_link($i)."'>".$i."</a></li>"; } } if ($paged < $pages && $showitems < $pages) echo "<li><a href='".get_pagenum_link($paged + 1)."'>›</a></li>"; if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<li><a href='".get_pagenum_link($pages)."'>»</a></li>"; echo "</ul>\n"; } } function the_simple_terms() { global $post; if( get_the_terms($post->ID,'portfolio-category') ) { $terms = get_the_terms($post->ID,'portfolio-category','',', ',''); $terms = array_map('_simple_cb', $terms); return implode(' / ', $terms); } } function the_grid_simple_terms() { global $post; if( get_the_terms($post->ID,'portfolio-category') ) { $terms = get_the_terms($post->ID,'portfolio-category','',', ',''); $terms = array_map('_simple_cb', $terms); return implode('<br />', $terms); } } function _simple_cb($t) { return $t->name; } //Replace wp_trim_excerpt with a commented out strip_shortcodes() function improved_trim_excerpt($text) { $raw_excerpt = $text; if ( '' == $text ) { $text = get_the_content(''); //$text = strip_shortcodes( $text ); $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); $text = strip_tags($text); $excerpt_length = apply_filters('excerpt_length', 55); $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); $words = preg_split("/[\n\r\t ]+/", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY); if ( count($words) > $excerpt_length ) { array_pop($words); $text = implode(' ', $words); $text = $text . $excerpt_more; } else { $text = implode(' ', $words); } } return apply_filters('improved_trim_excerpt', $text, $raw_excerpt); } remove_filter('get_the_excerpt', 'wp_trim_excerpt'); add_filter('get_the_excerpt', 'improved_trim_excerpt'); //SHORTCODE DROP DOWN add_action('media_buttons','add_sc_select',11); function add_sc_select(){ global $shortcode_tags; $shortcodes_list=''; /** Any Shortcodes that should be excluded from this list should be added below */ $exclude = array("wp_caption", "embed", 'caption', 'gallery'); echo '<select style="float:right;margin-right:15px;position:relative;top:5px;height:20px;" id="sc_select"> <option>Insert Shortcode...</option>'; foreach ($shortcode_tags as $key => $val){ if(!in_array($key,$exclude)){ if($key=='blockquote'){ $output = "[blockquote]This could be a blockquote.[/blockquote]"; } if($key=='drawer'){ $output = "[drawer title='THIS IS A TOGGLE DRAWER' instructions='Click to toggle drawer']Hello, this is a drawer[/drawer]"; } if($key=='fancy_headline'){ $output = "[fancy_headline]A Fancy Headline[/fancy_headline]"; } if($key=='fancy_list'){ $output = "[fancy_list type='tick'] <ul> <li>Item One</li> <li>Item Two</li> <li>Add more if you want...</li> </ul> [/fancy_list]"; } if($key=='dropcap'){ $output = "[dropcap]Your content[/dropcap]"; } if($key=='fancy_link'){ $output = "[fancy_link link='http://www.google.com']Your content[/fancy_link]"; } if($key=='full_width'){ $output = "[full_width]Content goes here[/full_width]"; } if($key=='centered_column'){ $output = "[centered_column]Content goes here[/centered_column]"; } if($key=='one_half'){ $output = "[one_half]Content goes here[/one_half]"; } if($key=='one_third'){ $output = "[one_third]Content goes here[/one_third]"; } if($key=='one_quarter'){ $output = "[one_quarter]Content goes here[/one_quarter]"; } if($key=='three_quarters'){ $output = "[three_quarters]Content goes here[/three_quarters]"; } if($key=='two_thirds'){ $output = "[two_thirds]Content goes here[/two_thirds]"; } if($key=='button'){ $output = "[button type='secondbutton' link='#']Button[/button]"; } if($key=='big_button'){ $output = "[big_button link='#' type='secondary' margin='push_one']Button[/big_button]"; } if($key=='tabgroup'){ $output = "[tabgroup] [tab title='Tab 1' id='t1']Lorem ipsum dolor sit amet.[/tab] [tab title='Tab 2' id='t2']Lorem ipsum dolor sit amet.[/tab] [tab title='Tab 3' id='t3']Lorem ipsum dolor sit amet.[/tab] [/tabgroup]"; } if($key=='tab'){ $output = "[tab title='Tab 1' id='t1']Lorem ipsum dolor sit amet.[/tab]"; } if($key=='clear'){ $output = "[clear]"; } if($key=='big_clear'){ $output = "[big_clear]"; } if($key=='clearline'){ $output = "[clearline]"; } if($key=='largefont'){ $output = "[largefont]Your Content[/largefont]"; } if($key=='metafont'){ $output = "[metafont]Your Content[/metafont]"; } if($key=='smallfont'){ $output = "[smallfont]Your Content[/smallfont]"; } if($key=='testimonials'){ $output = "[testimonials title='Testimonials Shortcode']"; } if($key=='clients'){ $output = "[clients title='Clients Shortcode']"; } if($key=='team_members'){ $output = "[team_members title='Team Members Shortcode']"; } $shortcodes_list .= '<option value="'.$output.'">'.$key.'</option>'; } } echo $shortcodes_list; echo '</select>'; } add_action('admin_head', 'button_js'); function button_js() { echo '<script type="text/javascript"> jQuery(document).ready(function(){ jQuery("#sc_select").change(function() { send_to_editor(jQuery("#sc_select :selected").val()); return false; }); }); </script>'; } function activate_montreal($oldname, $oldtheme=false){ $msg = '<div class="updated"><p>Thank you for installing Montreal, <strong>Please follow these simple instructions:</strong><br /> <ol> <li>In order to load the basic styles of Montreal please visit the <a href="customize.php"><strong>Theme Customizer</strong></a></li> <li>Make any change within the <strong>Theme Customizer</strong> to enable the <strong>Save & Publish Button</strong></li> <li>Click the <strong>Save & Publish Button</strong> to load the Montreal basic styling. Your site is now ready to be viewed. <strong>Enjoy Montreal & Read the Documentation</strong></li> </ol> </p></div>'; add_action( 'admin_notices', $c = create_function( '', 'echo "' . addcslashes( $msg, '"') . '";' ) ); } add_action("after_switch_theme", "activate_montreal", 10, 2); require_once('wp-updates-theme.php'); new WPUpdatesThemeUpdater( 'http://wp-updates.com/api/1/theme', 166, 'montreal' ); function testimonial($title){ ?> <section class="row"> <h4 class="italic center"><?php echo $title ?></h4> </section> <section class="row midtoppadding smallbottompadding"> <h2 class="light blacktext center icon-certificate"></h2> </section> <section class="row"> <div class="seven columns centered"> <div class="flexslider"> <ul class="slides"> <?php query_posts('post_type=testimonial&posts_per_page=-1'); if( have_posts() ) : while( have_posts() ) : the_post(); global $post; ?> <li> <div> <h5 class="light blacktext center"><?php $content = get_the_content(); echo strip_tags($content); ?></h5> <h6 class="center bold meta midtopmargin blacktext"><?php the_title(); ?></h6> </div> </li> <?php endwhile; endif; wp_reset_query(); ?> </ul> </div> </div> </section> <?php } function clients($title){ ?> <section class="row white bigpadding leftpadding rightpadding"> <section class="row"> <h4 class="blacktext midbottommargin center"><?php echo $title; ?></h4> <div class="three columns alpha centered blackhorizontal"></div> </section> <section class="row midtopmargin bigbottommargin clients_section"> <?php query_posts('post_type=clients&posts_per_page=-1'); if( have_posts() ) : while( have_posts() ) : the_post(); global $post; ?> <div class="two columns"> <?php the_post_thumbnail('client'); ?> </div> <?php endwhile; endif; wp_reset_query(); ?> </section> <?php } function team($title){ ?> <section class="row"> <h3 class="whitetext bold midbottommargin center"><?php echo $title; ?></h3> <div class="three columns alpha centered whitehorizontal"> </div> </section> <section class="row midtopmargin"> <?php query_posts('post_type=team&posts_per_page=-1'); if( have_posts() ) : while( have_posts() ) : the_post(); global $post; ?> <div class="three columns team"> <div class="person smallbottommargin"> <?php the_post_thumbnail(); ?> <div class="personinfo"> <p class="center bigtoppadding"> <?php if( get_post_meta( $post->ID, '_cmb_the_team_social1_link', true ) !='' ) : ?><a href="<?php echo get_post_meta( $post->ID, '_cmb_the_team_social1_link', true ); ?>" class="smallfont whitetext" target="_blank"><?php echo get_post_meta( $post->ID, '_cmb_the_team_social1_name', true ); ?></a> <?php endif; ?> <?php if( get_post_meta( $post->ID, '_cmb_the_team_social2_link', true ) !='' ) : ?><a href="<?php echo get_post_meta( $post->ID, '_cmb_the_team_social2_link', true ); ?>" class="smallfont whitetext" target="_blank"><?php echo get_post_meta( $post->ID, '_cmb_the_team_social2_name', true ); ?></a> <?php endif; ?> <?php if( get_post_meta( $post->ID, '_cmb_the_team_social3_link', true ) !='' ) : ?><a href="<?php echo get_post_meta( $post->ID, '_cmb_the_team_social3_link', true ); ?>" class="smallfont whitetext" target="_blank"><?php echo get_post_meta( $post->ID, '_cmb_the_team_social3_name', true ); ?></a> <?php endif; ?> </p> </div> </div> <!-- PERSON INFO --> <h5 class="whitetext"><?php the_title(); ?></h5> <h6 class="whitetext"><?php echo get_post_meta( $post->ID, '_cmb_the_job_title', true ); ?></h6> </div> <?php endwhile; endif; wp_reset_query(); ?> </section> <?php } ?>
Save
cmd:
run