function filter_ptags_on_images($content) { $content = preg_replace('/
\s*()?\s*()\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $content); return preg_replace('/\s*(*.<\/iframe>)\s*<\/p>/iU', '\1', $content); } add_filter('the_content', 'filter_ptags_on_images'); // Making jQuery Google API function modify_jquery(){ if(!is_admin()){ wp_deregister_script('jquery'); wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3', true); wp_enqueue_script('jquery'); } } add_action('init', 'modify_jquery'); // Content width if(!isset($content_width)){ $content_width = 680; } // Remove Emoji function disable_wp_emojicons() { // all actions related to emojis remove_action( 'admin_print_styles', 'print_emoji_styles' ); remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); remove_action( 'wp_print_styles', 'print_emoji_styles' ); remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); // filter to remove TinyMCE emojis add_filter( 'tiny_mce_plugins', 'disable_emojicons_tinymce' ); } add_action( 'init', 'disable_wp_emojicons' ); function disable_emojicons_tinymce( $plugins ) { if ( is_array( $plugins ) ) { return array_diff( $plugins, array( 'wpemoji' ) ); } else { return array(); } } // Theme support function setup_theme(){ // Add Thumbnail Theme Support add_theme_support('post-thumbnails'); add_image_size('large', 700, '', true); // Large Thumbnail add_image_size('medium', 560, 325, true); // Medium Thumbnail add_image_size('small', 375, 350, true); // Small Thumbnail // Localisation Support load_theme_textdomain('mecatina', get_template_directory() . '/languages'); } add_action( 'after_setup_theme', 'setup_theme' ); // Load scripts function mecatina_header_scripts(){ if($GLOBALS['pagenow'] != 'wp-login.php' && !is_admin()){ wp_register_script('jqueryui', get_template_directory_uri() . '/js/jqueryui/jquery-ui.min.js', array('jquery'), '1.0.0', true); // Custom scripts wp_enqueue_script('jqueryui'); // Enqueue it! /* wp_register_script('shuffle', get_template_directory_uri() . '/js/jquery.shuffle.js', array('jquery'), '1.0.0', true); // Custom scripts wp_enqueue_script('shuffle'); // Enqueue it! */ wp_register_script('fancybox', get_template_directory_uri() . '/js/fancybox/jquery.fancybox.pack.js', array('jquery'), '1.0.0', true); // Custom scripts wp_enqueue_script('fancybox'); // Enqueue it! wp_register_script('mecatinascripts', get_template_directory_uri() . '/js/main.js', array('jquery'), '1.0.0', true); // Custom scripts wp_enqueue_script('mecatinascripts'); // Enqueue it! } } add_action('init', 'mecatina_header_scripts'); // Add Custom Scripts to wp_head // Load Styles function mecatina_styles(){ wp_register_style('opensans', 'https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic', array(), '1.0', 'all'); wp_enqueue_style('opensans'); // Enqueue it! wp_register_style('notoserif', 'https://fonts.googleapis.com/css?family=Noto+Serif:400,400italic,700,700italic', array(), '1.0', 'all'); wp_enqueue_style('notoserif'); // Enqueue it! wp_register_style('jqueryui', get_template_directory_uri() . '/js/jqueryui/jquery-ui.min.css', array(), '1.0', 'all'); wp_enqueue_style('jqueryui'); // Enqueue it! wp_register_style('fancybox', get_template_directory_uri() . '/js/fancybox/jquery.fancybox.css', array(), '1.0', 'all'); wp_enqueue_style('fancybox'); // Enqueue it! wp_register_style('mecatina', get_template_directory_uri() . '/style.css', array(), '1.0', 'all'); wp_enqueue_style('mecatina'); // Enqueue it! } add_action('wp_enqueue_scripts', 'mecatina_styles'); // Add Theme Stylesheet // Remove thumbnail width and height dimensions that prevent fluid images in the_thumbnail function remove_thumbnail_dimensions( $html ){ $html = preg_replace('/(width|height)=\"\d*\"\s/', "", $html); return $html; } add_filter('post_thumbnail_html', 'remove_thumbnail_dimensions', 10); // Remove width and height dynamic attributes to thumbnails add_filter('image_send_to_editor', 'remove_thumbnail_dimensions', 10); // Remove width and height dynamic attributes to post images // Excerpt length function custom_excerpt_length( $length ) { if(is_page('home')){ return 13; }else{ return 30; } } add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); /*------------------------------------*\ Custom Post Types \*------------------------------------*/ function create_post_types(){ // Team register_post_type('team', array( 'labels' => array( 'name' => __('Team', 'mecatina'), 'singular_name' => __('Team', 'mecatina'), 'add_new' => __('Add New', 'mecatina'), 'add_new_item' => __('Add New Member', 'mecatina'), 'edit' => __('Edit', 'mecatina'), 'edit_item' => __('Edit Member', 'mecatina'), 'new_item' => __('New Member', 'mecatina'), 'view' => __('View Member', 'mecatina'), 'view_item' => __('View Member', 'mecatina'), 'search_items' => __('Search Member', 'mecatina'), 'not_found' => __('No Members found', 'mecatina'), 'not_found_in_trash' => __('No Members found in Trash', 'mecatina') ), 'public' => true, 'hierarchical' => false, 'has_archive' => false, 'supports' => array( 'title', 'editor', 'thumbnail' ), 'can_export' => true, 'menu_position' => 5 )); // Testimonials register_post_type('testimonial', array( 'labels' => array( 'name' => __('Testimonial', 'mecatina'), 'singular_name' => __('Testimonial', 'mecatina'), 'add_new' => __('Add New', 'mecatina'), 'add_new_item' => __('Add New Testimonial', 'mecatina'), 'edit' => __('Edit', 'mecatina'), 'edit_item' => __('Edit Testimonial', 'mecatina'), 'new_item' => __('New Testimonial', 'mecatina'), 'view' => __('View Testimonial', 'mecatina'), 'view_item' => __('View Testimonial', 'mecatina'), 'search_items' => __('Search Testimonial', 'mecatina'), 'not_found' => __('No Testimonials found', 'mecatina'), 'not_found_in_trash' => __('No Testimonials found in Trash', 'mecatina') ), 'public' => true, 'hierarchical' => false, 'has_archive' => false, 'supports' => array( 'title', 'editor' ), 'can_export' => true, 'menu_position' => 5 )); } add_action('init', 'create_post_types'); ?> get_header(); ?> _e('The River', 'mecatina'); ?> _e('A Salmon Sanctuary', 'mecatina'); ?> _e('Gros Mecatina River is approximately 40 km in length and flows into the Gulf of St. Lawrence. The Salmon River is located in an exquisite fishing destination on the Quebec Lower North Shore and connection of larger lakes.', 'mecatina'); ?> _e('Within the river, salmon pools are uniquely situated above and below each waterfall making this adventure second to none. Access to the salmon pools can only be reached by boat from the camp. Barely touched by man, this river is exclusive, abundant and full of salmon. It’s truly the experience of a lifetime.', 'mecatina'); ?> _e('View Transportation Options:', 'mecatina'); ?> get_template_part('testimonial'); ?> get_footer(); ?>
\s*(*.<\/iframe>)\s*<\/p>/iU', '\1', $content); } add_filter('the_content', 'filter_ptags_on_images'); // Making jQuery Google API function modify_jquery(){ if(!is_admin()){ wp_deregister_script('jquery'); wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3', true); wp_enqueue_script('jquery'); } } add_action('init', 'modify_jquery'); // Content width if(!isset($content_width)){ $content_width = 680; } // Remove Emoji function disable_wp_emojicons() { // all actions related to emojis remove_action( 'admin_print_styles', 'print_emoji_styles' ); remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); remove_action( 'wp_print_styles', 'print_emoji_styles' ); remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); // filter to remove TinyMCE emojis add_filter( 'tiny_mce_plugins', 'disable_emojicons_tinymce' ); } add_action( 'init', 'disable_wp_emojicons' ); function disable_emojicons_tinymce( $plugins ) { if ( is_array( $plugins ) ) { return array_diff( $plugins, array( 'wpemoji' ) ); } else { return array(); } } // Theme support function setup_theme(){ // Add Thumbnail Theme Support add_theme_support('post-thumbnails'); add_image_size('large', 700, '', true); // Large Thumbnail add_image_size('medium', 560, 325, true); // Medium Thumbnail add_image_size('small', 375, 350, true); // Small Thumbnail // Localisation Support load_theme_textdomain('mecatina', get_template_directory() . '/languages'); } add_action( 'after_setup_theme', 'setup_theme' ); // Load scripts function mecatina_header_scripts(){ if($GLOBALS['pagenow'] != 'wp-login.php' && !is_admin()){ wp_register_script('jqueryui', get_template_directory_uri() . '/js/jqueryui/jquery-ui.min.js', array('jquery'), '1.0.0', true); // Custom scripts wp_enqueue_script('jqueryui'); // Enqueue it! /* wp_register_script('shuffle', get_template_directory_uri() . '/js/jquery.shuffle.js', array('jquery'), '1.0.0', true); // Custom scripts wp_enqueue_script('shuffle'); // Enqueue it! */ wp_register_script('fancybox', get_template_directory_uri() . '/js/fancybox/jquery.fancybox.pack.js', array('jquery'), '1.0.0', true); // Custom scripts wp_enqueue_script('fancybox'); // Enqueue it! wp_register_script('mecatinascripts', get_template_directory_uri() . '/js/main.js', array('jquery'), '1.0.0', true); // Custom scripts wp_enqueue_script('mecatinascripts'); // Enqueue it! } } add_action('init', 'mecatina_header_scripts'); // Add Custom Scripts to wp_head // Load Styles function mecatina_styles(){ wp_register_style('opensans', 'https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic', array(), '1.0', 'all'); wp_enqueue_style('opensans'); // Enqueue it! wp_register_style('notoserif', 'https://fonts.googleapis.com/css?family=Noto+Serif:400,400italic,700,700italic', array(), '1.0', 'all'); wp_enqueue_style('notoserif'); // Enqueue it! wp_register_style('jqueryui', get_template_directory_uri() . '/js/jqueryui/jquery-ui.min.css', array(), '1.0', 'all'); wp_enqueue_style('jqueryui'); // Enqueue it! wp_register_style('fancybox', get_template_directory_uri() . '/js/fancybox/jquery.fancybox.css', array(), '1.0', 'all'); wp_enqueue_style('fancybox'); // Enqueue it! wp_register_style('mecatina', get_template_directory_uri() . '/style.css', array(), '1.0', 'all'); wp_enqueue_style('mecatina'); // Enqueue it! } add_action('wp_enqueue_scripts', 'mecatina_styles'); // Add Theme Stylesheet // Remove thumbnail width and height dimensions that prevent fluid images in the_thumbnail function remove_thumbnail_dimensions( $html ){ $html = preg_replace('/(width|height)=\"\d*\"\s/', "", $html); return $html; } add_filter('post_thumbnail_html', 'remove_thumbnail_dimensions', 10); // Remove width and height dynamic attributes to thumbnails add_filter('image_send_to_editor', 'remove_thumbnail_dimensions', 10); // Remove width and height dynamic attributes to post images // Excerpt length function custom_excerpt_length( $length ) { if(is_page('home')){ return 13; }else{ return 30; } } add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); /*------------------------------------*\ Custom Post Types \*------------------------------------*/ function create_post_types(){ // Team register_post_type('team', array( 'labels' => array( 'name' => __('Team', 'mecatina'), 'singular_name' => __('Team', 'mecatina'), 'add_new' => __('Add New', 'mecatina'), 'add_new_item' => __('Add New Member', 'mecatina'), 'edit' => __('Edit', 'mecatina'), 'edit_item' => __('Edit Member', 'mecatina'), 'new_item' => __('New Member', 'mecatina'), 'view' => __('View Member', 'mecatina'), 'view_item' => __('View Member', 'mecatina'), 'search_items' => __('Search Member', 'mecatina'), 'not_found' => __('No Members found', 'mecatina'), 'not_found_in_trash' => __('No Members found in Trash', 'mecatina') ), 'public' => true, 'hierarchical' => false, 'has_archive' => false, 'supports' => array( 'title', 'editor', 'thumbnail' ), 'can_export' => true, 'menu_position' => 5 )); // Testimonials register_post_type('testimonial', array( 'labels' => array( 'name' => __('Testimonial', 'mecatina'), 'singular_name' => __('Testimonial', 'mecatina'), 'add_new' => __('Add New', 'mecatina'), 'add_new_item' => __('Add New Testimonial', 'mecatina'), 'edit' => __('Edit', 'mecatina'), 'edit_item' => __('Edit Testimonial', 'mecatina'), 'new_item' => __('New Testimonial', 'mecatina'), 'view' => __('View Testimonial', 'mecatina'), 'view_item' => __('View Testimonial', 'mecatina'), 'search_items' => __('Search Testimonial', 'mecatina'), 'not_found' => __('No Testimonials found', 'mecatina'), 'not_found_in_trash' => __('No Testimonials found in Trash', 'mecatina') ), 'public' => true, 'hierarchical' => false, 'has_archive' => false, 'supports' => array( 'title', 'editor' ), 'can_export' => true, 'menu_position' => 5 )); } add_action('init', 'create_post_types'); ?> get_header(); ?> _e('The River', 'mecatina'); ?> _e('A Salmon Sanctuary', 'mecatina'); ?> _e('Gros Mecatina River is approximately 40 km in length and flows into the Gulf of St. Lawrence. The Salmon River is located in an exquisite fishing destination on the Quebec Lower North Shore and connection of larger lakes.', 'mecatina'); ?> _e('Within the river, salmon pools are uniquely situated above and below each waterfall making this adventure second to none. Access to the salmon pools can only be reached by boat from the camp. Barely touched by man, this river is exclusive, abundant and full of salmon. It’s truly the experience of a lifetime.', 'mecatina'); ?> _e('View Transportation Options:', 'mecatina'); ?> get_template_part('testimonial'); ?> get_footer(); ?>
_e('Gros Mecatina River is approximately 40 km in length and flows into the Gulf of St. Lawrence. The Salmon River is located in an exquisite fishing destination on the Quebec Lower North Shore and connection of larger lakes.', 'mecatina'); ?>
_e('Within the river, salmon pools are uniquely situated above and below each waterfall making this adventure second to none. Access to the salmon pools can only be reached by boat from the camp. Barely touched by man, this river is exclusive, abundant and full of salmon. It’s truly the experience of a lifetime.', 'mecatina'); ?>