BluePrint-Q %s Edition. Version %s, © 2014-%s.', 'bpq' ), admin::url_landing(), sales::edition_name(), BPQ_VERSION, date( 'Y' ) ); } /** * Explicitly calls out WP as the version number that is normally * in the bottom-right corner of the admin backend screens. * @return string The desired text */ function admin_footer_right() { global $wp_version; return sprintf( __( 'WordPress, Version %s.', 'bpq' ), $wp_version ); } /** * Normally, the head titles in the admin screens look something like this: * Name of page < Theme title - WordPress * This function removes the '<' and everything after it. * * @param string $admin_title The full title as it would normally appear * @param string $title The plain title of the page * @return string The desired title that will appear in the browser tab and/or title bar */ function admin_title( $admin_title, $title ) { return $title; } /** * Add classes to the body that represent the current tone selections. * @param type $classes The classes that WP has already figured out * @return array The massaged classes */ function body_classes( $classes ) { $tones = tones(); foreach ( $tones as $key => $tone ) { $tone_name = pathinfo( basename( $tone, '.css' ), PATHINFO_EXTENSION ); $classes[] = $key.'-'.$tone_name; } return $classes; } /** * Introduces the Bootstrap framework to this theme - points to the CDN and falls back to local if it fails. * @link http://stackoverflow.com/questions/23267905/how-to-provide-a-local-fallback-for-font-awesome-if-cdn-fails * @link http://rlbisbe.net/2013/11/20/angular-js-for-windows-store-apps-first-look/ */ function queue_bootstrap() { // CSS. $cdn_url = \ski\path::get_request_protocol().'://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css'; if ( wp_remote_fopen( $cdn_url ) !== false ) wp_enqueue_style( 'bootstrap_css', $cdn_url, array(), BPQ_VERSION ); else wp_enqueue_style( 'bootstrap_css', get_template_directory_uri().'/packages/bootstrap-3.3.4/dist/css/bootstrap.min.css', array(), BPQ_VERSION ); // JS. $cdn_url = \ski\path::get_request_protocol().'://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js'; if ( wp_remote_fopen( $cdn_url ) !== false ) wp_enqueue_script( 'bootstrap_js', $cdn_url, array( 'jquery' ), BPQ_VERSION, true ); else wp_enqueue_script( 'bootstrap_js', get_template_directory_uri().'/packages/bootstrap-3.3.4/dist/js/bootstrap.min.js', array( 'jquery' ), BPQ_VERSION, true ); } /** * One place to queue up this theme's CSS/JS. */ function queue_bpq() { wp_enqueue_style( 'bpq_css', get_template_directory_uri().'/bpq.css', array( 'bootstrap_css' ), BPQ_VERSION ); wp_enqueue_script( 'bpq_js', get_template_directory_uri().'/bpq.js', array( 'bootstrap_js' ), BPQ_VERSION, true ); } /** * Queues up this theme's CSS/JS. Handles skip links for WP accessibility * requirements. Also queues up auxiliary scripts based on the selected options. * @link https://make.wordpress.org/themes/handbook/review/accessibility/required/#skip-links */ function queue_core() { // First, the core BluePrint-Q scripts/styles. queue_bpq(); // Then, support skip links for accessibility requirements wp_enqueue_script( 'bpq_skipfix_js', get_template_directory_uri().'/services/bpq.service.skipfix.js', array(), BPQ_VERSION, true ); // OPTION: Navbar affix $opt_affix = get_theme_mod( 'bpq_opt_navigation_affix', 1 ); if ( !empty( $opt_affix ) ) { // Finally, a navbar fix to handle the sliding logistics. wp_enqueue_script( 'bpq_navfix_js', get_template_directory_uri().'/services/bpq.service.navfix.js', array( 'bootstrap_js' ), BPQ_VERSION, true ); } } /** * Introduces the Font Awesome icons to this theme - points to the CDN and falls back to local if it fails. * @link http://stackoverflow.com/questions/23267905/how-to-provide-a-local-fallback-for-font-awesome-if-cdn-fails * @link http://rlbisbe.net/2013/11/20/angular-js-for-windows-store-apps-first-look/ */ function queue_font_awesome() { // CSS. $cdn_url = \ski\path::get_request_protocol().'://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'; if ( wp_remote_fopen( $cdn_url ) !== false ) wp_enqueue_style( 'font_awesome_css', $cdn_url, array(), BPQ_VERSION ); else wp_enqueue_style( 'font_awesome_css', get_template_directory_uri().'/packages/font-awesome-4.3.0/css/font-awesome.min.css', array(), BPQ_VERSION ); } /** * WP provides their own styles for the login screen - this function * introduces the BluePrint-Q styling also. */ function queue_login() { // First BootStrap. queue_bootstrap(); // Then cascade into the BluePrint-Q scripts/styles. queue_bpq(); } /** * Queues up the current tone. */ function queue_tone() { // Queue up the CSS associated with the selected tones; that is, if there is a selection. // // Note: The Theme Customizer appears to cache old CSS - to make these tones load properly // whenever a new tone is selected, we use the current time as the version number. $tones = tones(); foreach ( $tones as $key => $tone ) { wp_enqueue_style( 'bpq_tone_'.$key.'_css', $tone, array( 'bootstrap_css' ), BPQ_VERSION ); } } /** * Calls out plugins that are to be installed for this theme. * @link https://github.com/thomasgriffin/TGM-Plugin-Activation */ function register_packaged_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( // bpq.bridge array( 'name' => 'BluePrint-Q: Bridge', // The plugin name. 'slug' => 'bpq.bridge', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.bridge.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // bpq.contact array( 'name' => 'BluePrint-Q: Contact', // The plugin name. 'slug' => 'bpq.contact', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.contact.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // bpq.templates array( 'name' => 'BluePrint-Q: Templates', // The plugin name. 'slug' => 'bpq.templates', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.templates.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // contact-form-7 array( 'name' => 'Contact Form 7', // The plugin name. 'slug' => 'contact-form-7', // The plugin slug (typically the folder name). 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // content-aware-sidebars array( 'name' => 'Content Aware Sidebars', // The plugin name. 'slug' => 'content-aware-sidebars', // The plugin slug (typically the folder name). 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // enable-media-replace array( 'name' => 'Enable Media Replace', // The plugin name. 'slug' => 'enable-media-replace', // The plugin slug (typically the folder name). 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // regenerate-thumbnails array( 'name' => 'Regenerate Thumbnails', // The plugin name. 'slug' => 'regenerate-thumbnails', // The plugin slug (typically the folder name). 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // sendpress array( 'name' => 'SendPress', // The plugin name. 'slug' => 'sendpress', // The plugin slug (typically the folder name). 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // simple image array( 'name' => 'Simple Image Widget', // The plugin name. 'slug' => 'simple-image-widget', // The plugin slug (typically the folder name). 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), /** * Note: * This commented block is unnecessary for bpq purposes, * but keeping it around to demonstrate original examples. */ /* // This is an example of how to include a plugin pre-packaged with a theme. array( 'name' => 'Debug Bar', // The plugin name. 'slug' => 'debug-bar', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/debug-bar.zip', // The plugin source. 'required' => true, // If false, the plugin is only 'recommended' instead of required. 'version' => '', // E.g. 1.0.0. If set, the active plugin must be this version or higher. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. 'external_url' => '', // If set, overrides default API URL and points to an external URL. ), // This is an example of how to include a plugin from a private repo in your theme. array( 'name' => 'TGM New Media Plugin', // The plugin name. 'slug' => 'tgm-new-media-plugin', // The plugin slug (typically the folder name). 'source' => 'https://s3.amazonaws.com/tgm/tgm-new-media-plugin.zip', // The plugin source. 'required' => true, // If false, the plugin is only 'recommended' instead of required. 'external_url' => 'https://github.com/thomasgriffin/New-Media-Image-Uploader', // If set, overrides default API URL and points to an external URL. ), // This is an example of how to include a plugin from the WordPress Plugin Repository. array( 'name' => 'BuddyPress', 'slug' => 'buddypress', 'required' => false, ), */ ); /** * Some plugins are only intended for the architect edition. */ if ( BPQ_EDITION >= 2 ) { $plugins_architect = array( // bpq.banners array( 'name' => 'BluePrint-Q: Banners', // The plugin name. 'slug' => 'bpq.banners', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.banners.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // bpq.benefits array( 'name' => 'BluePrint-Q: Benefits', // The plugin name. 'slug' => 'bpq.benefits', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.benefits.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // bpq.favicon array( 'name' => 'BluePrint-Q: Favicon', // The plugin name. 'slug' => 'bpq.favicon', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.favicon.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // bpq.menus array( 'name' => 'BluePrint-Q: Menus', // The plugin name. 'slug' => 'bpq.menus', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.menus.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // bpq.partners array( 'name' => 'BluePrint-Q: Partners', // The plugin name. 'slug' => 'bpq.partners', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.partners.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // bpq.profile array( 'name' => 'BluePrint-Q: Profile', // The plugin name. 'slug' => 'bpq.profile', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.profile.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // bpq.span array( 'name' => 'BluePrint-Q: Span', // The plugin name. 'slug' => 'bpq.span', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.span.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // bpq.sidebars array( 'name' => 'BluePrint-Q: Sidebars', // The plugin name. 'slug' => 'bpq.sidebars', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.sidebars.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // bpq.team array( 'name' => 'BluePrint-Q: Team', // The plugin name. 'slug' => 'bpq.team', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.team.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // bpq.testimonials array( 'name' => 'BluePrint-Q: Testimonials', // The plugin name. 'slug' => 'bpq.testimonials', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.testimonials.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // bootstrap-3-shortcodes array( 'name' => 'Bootstrap 3 Shortcodes', // The plugin name. 'slug' => 'bootstrap-3-shortcodes', // The plugin slug (typically the folder name). 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // crayon-syntax-highlighter array( 'name' => 'Crayon Syntax Highlighter', // The plugin name. 'slug' => 'crayon-syntax-highlighter', // The plugin slug (typically the folder name). 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // stops-core-theme-and-plugin-updates array( 'name' => 'Easy Updates Manager', // The plugin name. 'slug' => 'stops-core-theme-and-plugin-updates', // The plugin slug (typically the folder name). 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // woocommerce array( 'name' => 'WooCommerce', // The plugin name. 'slug' => 'woocommerce', // The plugin slug (typically the folder name). 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // wordpress-seo array( 'name' => 'Yoast SEO', // The plugin name. 'slug' => 'wordpress-seo', // The plugin slug (typically the folder name). 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), ); $plugins = array_merge( $plugins, $plugins_architect ); } /** * Some plugins are only intended for the premium edition. */ if ( BPQ_EDITION >= 3 ) { $plugins_premium = array( // bpq.analytics array( 'name' => 'BluePrint-Q: Analytics', // The plugin name. 'slug' => 'bpq.analytics', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.analytics.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // bpq.highlight array( 'name' => 'BluePrint-Q: Highlight', // The plugin name. 'slug' => 'bpq.highlight', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.highlight.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // bpq.login array( 'name' => 'BluePrint-Q: Login', // The plugin name. 'slug' => 'bpq.login', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.login.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // bpq.social array( 'name' => 'BluePrint-Q: Social', // The plugin name. 'slug' => 'bpq.social', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.social.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // bpq.stripes array( 'name' => 'BluePrint-Q: Stripes', // The plugin name. 'slug' => 'bpq.stripes', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/bpq.stripes.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // js_composer array( 'name' => 'Visual Composer', // The plugin name. 'slug' => 'js_composer', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/js_composer.4.6.2.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), // revslider array( 'name' => 'Revolution Slider', // The plugin name. 'slug' => 'revslider', // The plugin slug (typically the folder name). 'source' => get_template_directory() . '/plugins/revslider.4.6.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), ); $plugins = array_merge( $plugins, $plugins_premium ); } /** * 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( 'id' => 'tgmpa', // Unique ID for hashing notices for multiple instances of TGMPA. 'default_path' => '', // Default absolute path to pre-packaged plugins. 'menu' => 'tgmpa-install-plugins', // Menu slug. 'has_notices' => true, // Show admin notices or not. 'dismissable' => true, // If false, a user cannot dismiss the nag message. 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. 'is_automatic' => false, // Automatically activate plugins after installation or not. 'message' => '', // Message to output right before the plugins table. 'strings' => array( 'page_title' => __( 'Install Required Plugins', 'tgmpa' ), 'menu_title' => __( 'Install Plugins', 'tgmpa' ), 'installing' => __( 'Installing Plugin: %s', 'tgmpa' ), // %s = plugin name. 'oops' => __( 'Something went wrong with the plugin API.', 'tgmpa' ), 'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.', 'tgmpa' ), // %1$s = plugin name(s). 'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.', 'tgmpa' ), // %1$s = plugin name(s). 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.', 'tgmpa' ), // %1$s = plugin name(s). 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.', 'tgmpa' ), // %1$s = plugin name(s). 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'tgmpa' ), // %1$s = plugin name(s). 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.', 'tgmpa' ), // %1$s = plugin name(s). 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.', 'tgmpa' ), // %1$s = plugin name(s). 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.', 'tgmpa' ), // %1$s = plugin name(s). 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins', 'tgmpa' ), 'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins', 'tgmpa' ), 'return' => __( 'Return to Required Plugins Installer', 'tgmpa' ), 'plugin_activated' => __( 'Plugin activated successfully.', 'tgmpa' ), 'complete' => __( 'All plugins installed and activated successfully. %s', 'tgmpa' ), // %s = dashboard link. 'nag_type' => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'. ) ); tgmpa( $plugins, $config ); } /** * There are a number of features that are not turned on by default - turn them on. * * @link http://codex.wordpress.org/Function_Reference/add_theme_support * @link http://docs.woothemes.com/document/third-party-custom-theme-compatibility/ * @link http://codex.wordpress.org/Title_Tag * @link http://codex.wordpress.org/Function_Reference/add_post_type_support */ function register_feature_support() { // Allow pages to use explicit excerpts too (not just posts). add_post_type_support( 'page', 'excerpt' ); // Support for WooCommerce, if activated. if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) { add_theme_support( 'woocommerce' ); } // Support management of the document title tag by themes and plugins. add_theme_support( 'title-tag' ); // Support for RSS. add_theme_support( 'automatic-feed-links' ); // Keep in mind that if menu locations are registered, then an explicit // call to add theme support for 'menus' is unnecessary. // @link http://codex.wordpress.org/Function_Reference/register_nav_menu add_theme_support( 'menus' ); // Support a number of post formats. // @link http://codex.wordpress.org/Post_Formats add_theme_support( 'post-formats', array( 'aside', 'chat', 'link', 'quote', 'status' ) ); // Support featured images. add_theme_support( 'post-thumbnails' ); // Note: Add/remove support to suppress recommendations that // can improperly trigger false positives from potential // automated theme-check processes. add_theme_support( 'custom-background' ); add_theme_support( 'custom-header' ); remove_theme_support( 'custom-background' ); remove_theme_support( 'custom-header' ); } /** * The title typically appears in a browser's tab and/or title bar. * * @param string $title The plain title of the page * @return string The desired title that will appear in the browser tab and/or title bar */ function title( $title ) { return get_bloginfo( 'name' ).' · '.get_bloginfo( 'description' ); } /** * Figures the CSS paths to all selected tones. * @return array An array of the selected tone CSS paths */ function tones() { // Defaults for each tone, if none are selected. $color_default = 'tones/colors/bpq.tone.color.gradient-blues.css'; $flair_default = 'tones/flairs/bpq.tone.flair.architect.css'; $type_default = 'tones/types/bpq.tone.type.soundwave.css'; // OPTION: Tone $opt_tone_color = get_theme_mod( 'bpq_opt_tone_color', $color_default ); $opt_tone_flair = get_theme_mod( 'bpq_opt_tone_flair', $flair_default ); $opt_tone_type = get_theme_mod( 'bpq_opt_tone_type', $type_default ); // Construct a list of all tones to return - let potential // child theme versions override parent versions. return array ( 'color' => \ski\question::locate_template_uri( $opt_tone_color ), 'flair' => \ski\question::locate_template_uri( $opt_tone_flair ), 'type' => \ski\question::locate_template_uri( $opt_tone_type ), ); } /** * This is a dummy action so that custom BluePrint-Q hooks can * mainly be called out in the corresponding hooks file. */ function unused_action() { // Intentionally blank. } /** * This is a dummy filter so that custom BluePrint-Q hooks can * mainly be called out in the corresponding hooks file. * * @param mixed $incoming The text to be altered * @return string The text that was passed in */ function unused_filter( $incoming ) { return $incoming; } /** * Perform setup of Visual Composer - specifically, for VC to * initialize as "built into the theme"; this will hide certain * tabs under the Settings -> Visual Composer page. * * Note: These VC-related functions only make sense for the * premium edition of BluePrint-Q. * * @link http://kb.wpbakery.com/index.php?title=Vc_set_as_theme * @link http://kb.wpbakery.com/index.php?title=Visual_Composer_Theme_Integration * @link https://wpbakery.atlassian.net/wiki/pages/viewpage.action?pageId=524294 */ function vc_integrate() { if( function_exists( 'vc_set_as_theme' ) ) { // Remove a bunch of settings that do not make sense if integrated within a theme. vc_set_as_theme( true ); // The template overrides are not stored in the default location. vc_set_shortcodes_templates_dir( get_template_directory().'/templates/vc' ); } } ?>