/home/vianto5/cititower.mx/wp-content/themes/montreal
Edit: /home/vianto5/cititower.mx/wp-content/themes/montreal/functions.php (20317B)
max_num_pages;
if(!$pages)
{
$pages = 1;
}
}
if(1 != $pages)
{
echo "\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('
', $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 '
';
}
add_action('admin_head', 'button_js');
function button_js() {
echo '';
}
function activate_montreal($oldname, $oldtheme=false){
$msg = '
Thank you for installing Montreal, Please follow these simple instructions:
- In order to load the basic styles of Montreal please visit the Theme Customizer
- Make any change within the Theme Customizer to enable the Save & Publish Button
- Click the Save & Publish Button to load the Montreal basic styling. Your site is now ready to be viewed. Enjoy Montreal & Read the Documentation
';
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){ ?>
ID, '_cmb_the_team_social1_link', true ) !='' ) : ?>ID, '_cmb_the_team_social1_name', true ); ?>
ID, '_cmb_the_team_social2_link', true ) !='' ) : ?>ID, '_cmb_the_team_social2_name', true ); ?>
ID, '_cmb_the_team_social3_link', true ) !='' ) : ?>ID, '_cmb_the_team_social3_name', true ); ?>
ID, '_cmb_the_job_title', true ); ?>
%s'), get_comment_author_link()) ?> - - $depth, 'max_depth' => $args['max_depth']))) ?>