/** * The template includes necessary functions for theme. * * @package prague * @since 1.0.0 * */ if ( ! isset( $content_width ) ) { $content_width = 1200; // pixel } // ------------------------------------------ // Global define for theme // ------------------------------------------ defined( 'PRAGUE_URI' ) or define( 'PRAGUE_URI', get_template_directory_uri() ); defined( 'PRAGUE_T_PATH' ) or define( 'PRAGUE_T_PATH', get_template_directory() ); defined( 'PRAGUE_F_PATH' ) or define( 'PRAGUE_F_PATH', PRAGUE_T_PATH . '/include' ); // ------------------------------------------ // Framework integration // ------------------------------------------ /* Include all styles and scripts. */ require_once PRAGUE_F_PATH .'/custom/action-config.php'; /* Helper functions */ require_once PRAGUE_F_PATH .'/custom/helper-functions.php'; /* Svg stroke animation */ require_once PRAGUE_F_PATH .'/custom/lib/FoxEasySVG.php'; /* Lazu load */ require_once PRAGUE_F_PATH .'/custom/foxlazy.php'; // Plugin activation class. require_once PRAGUE_F_PATH .'/plugins/class-tgm-plugin-activation.php'; require PRAGUE_T_PATH . '/vendor/autoload.php'; /** * Initialize the plugin tracker * * @return void */ function appsero_init_tracker_prague() { if ( ! class_exists( 'Appsero\Client' ) ) { require_once PRAGUE_T_PATH . '/vendor/appsero/client/src/Client.php'; } $client = new \Appsero\Client( '46dfbfb1-c9cc-4e93-817d-2c535a465cef', 'Prague', __FILE__ ); // Active insights $client->insights()->init(); // Active automatic updater $client->updater(); } appsero_init_tracker_prague(); // Woocommerce support if ( class_exists( 'WooCommerce' ) ) { require_once PRAGUE_T_PATH . '/woocommerce-support.php'; } // ------------------------------------------ // Setting theme after setup // ------------------------------------------ if ( ! function_exists( 'prague_after_setup' ) ) { function prague_after_setup() { load_theme_textdomain( 'prague', PRAGUE_T_PATH .'/languages' ); register_nav_menus( array( 'top-menu' => esc_html__( 'Top menu', 'prague' ), 'footer-menu' => esc_html__( 'Footer menu', 'prague' ), ) ); add_theme_support( 'custom-header' ); add_theme_support( 'custom-background' ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption') ); add_theme_support( 'post-thumbnails' ); add_theme_support( 'title-tag' ); remove_theme_support( 'widgets-block-editor' ); } } add_action( 'after_setup_theme', 'prague_after_setup' ); /* * Check need minimal requirements (PHP and WordPress version) */ if ( version_compare( $GLOBALS['wp_version'], '4.3', '<' ) || version_compare( PHP_VERSION, '5.3', '<' ) ) { function prague_requirements_notice() { $message = sprintf( __( 'prague theme needs minimal WordPress version 4.3 and PHP 5.3
You are running version WordPress - %s, PHP - %s.
Please upgrade need module and try again.', 'prague' ), $GLOBALS['wp_version'], PHP_VERSION ); printf( '

%s

', $message ); } add_action( 'admin_notices', 'prague_requirements_notice' ); } /* * Add custom classes to body */ if ( ! function_exists( 'prague_wp_body_classes' ) ) { function prague_wp_body_classes( $classes ) { global $prague_body_class; if ( is_page() || is_home() ) { $post_id = get_queried_object_id(); } else { $post_id = get_the_ID(); } $meta_data = get_post_meta( $post_id, 'prague_post_options', true ); if( isset($meta_data['bottom_menu']) && $meta_data['bottom_menu'] ) { $prague_body_class .= ' bottom_menu'; } else { $prague_body_class .= ''; } $prague_body_class = explode(' ', $prague_body_class); foreach ($prague_body_class as $class){ $classes[] = $class; } return $classes; } } add_filter( 'body_class','prague_wp_body_classes' ); function prague_set_script( $scripts, $handle, $src, $deps = array(), $ver = false, $in_footer = false ) { $script = $scripts->query( $handle, 'registered' ); if ( $script ) { // If already added $script->src = $src; $script->deps = $deps; $script->ver = $ver; $script->args = $in_footer; unset( $script->extra['group'] ); if ( $in_footer ) { $script->add_data( 'group', 1 ); } } else { // Add the script if ( $in_footer ) { $scripts->add( $handle, $src, $deps, $ver, 1 ); } else { $scripts->add( $handle, $src, $deps, $ver ); } } } function prague_replace_scripts( $scripts ) { $assets_url = PRAGUE_URI . '/assets/js/'; // prague_set_script( $scripts, 'jquery-migrate', $assets_url . 'jquery-migrate.min.js', array(), '1.4.1-wp' ); // prague_set_script( $scripts, 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.12.4-wp' ); } add_action( 'wp_default_scripts', 'prague_replace_scripts' ); 1.0Groupe CS inc.https://groupecs.ca/fradminhttps://groupecs.ca/fr/author/admin/Accueilrich600338<blockquote class="wp-embedded-content" data-secret="IoLzrTN8K0"><a href="https://groupecs.ca/fr/">Accueil</a></blockquote><iframe sandbox="allow-scripts" security="restricted" src="https://groupecs.ca/fr/embed/#?secret=IoLzrTN8K0" width="600" height="338" title="« Accueil » — Groupe CS Inc." data-secret="IoLzrTN8K0" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" class="wp-embedded-content"></iframe><script type="text/javascript"> /*! This file is auto-generated */ !function(d,l){"use strict";var e=!1,o=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){for(var r,a,i,s=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=new RegExp("^https?:$","i"),c=0;c<n.length;c++)n[c].style.display="none";for(c=0;c<s.length;c++)if(r=s[c],e.source===r.contentWindow){if(r.removeAttribute("style"),"height"===t.message){if(1e3<(i=parseInt(t.value,10)))i=1e3;else if(~~i<200)i=200;r.height=i}if("link"===t.message)if(a=l.createElement("a"),i=l.createElement("a"),a.href=r.getAttribute("src"),i.href=t.value,o.test(i.protocol))if(i.host===a.host)if(l.activeElement===r)d.top.location.href=t.value}}},e)d.addEventListener("message",d.wp.receiveEmbedMessage,!1),l.addEventListener("DOMContentLoaded",t,!1),d.addEventListener("load",t,!1);function t(){if(!o){o=!0;for(var e,t,r,a=-1!==navigator.appVersion.indexOf("MSIE 10"),i=!!navigator.userAgent.match(/Trident.*rv:11\./),s=l.querySelectorAll("iframe.wp-embedded-content"),n=0;n<s.length;n++){if(!(r=(t=s[n]).getAttribute("data-secret")))r=Math.random().toString(36).substr(2,10),t.src+="#?secret="+r,t.setAttribute("data-secret",r);if(a||i)(e=t.cloneNode(!0)).removeAttribute("security"),t.parentNode.replaceChild(e,t);t.contentWindow.postMessage({message:"ready",secret:r},"*")}}}}(window,document); </script>