/** * Called on load action. * * @return void */ public static function load() { global $wpdb; if (isset($_GET['action']) && $_GET['action'] == 'dbdumpdl') { //check permissions check_admin_referer('backwpupdbdumpdl'); if (!current_user_can('backwpup_jobs_edit')) { die; } //doing dump header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/octet-stream; charset=" . get_bloginfo('charset')); header("Content-Disposition: attachment; filename=" . DB_NAME . ".sql;"); try { $sql_dump = new BackWPup_MySQLDump(); foreach ($sql_dump->tables_to_dump as $key => $table) { if ($wpdb->prefix != substr($table, 0, strlen($wpdb->prefix))) { unset($sql_dump->tables_to_dump[$key]); } } $sql_dump->execute(); unset($sql_dump); } catch (Exception $e) { die($e->getMessage()); } die; } }
public static function initdb() { $settings = SwpmSettings::get_instance(); $installed_version = $settings->get_value('swpm-active-version'); //Set other default settings values $reg_prompt_email_subject = "Complete your registration"; $reg_prompt_email_body = "Dear {first_name} {last_name}" . "\n\nThank you for joining us!" . "\n\nPlease complete your registration by visiting the following link:" . "\n\n{reg_link}" . "\n\nThank You"; $reg_email_subject = "Your registration is complete"; $reg_email_body = "Dear {first_name} {last_name}\n\n" . "Your registration is now complete!\n\n" . "Registration details:\n" . "Username: {user_name}\n" . "Password: {password}\n\n" . "Please login to the member area at the following URL:\n\n" . "{login_link}\n\n" . "Thank You"; $upgrade_email_subject = "Subject for email sent after account upgrade"; $upgrade_email_body = "Dear {first_name} {last_name}" . "\n\nYour Account Has Been Upgraded." . "\n\nThank You"; $reset_email_subject = get_bloginfo('name') . ": New Password"; $reset_email_body = "Dear {first_name} {last_name}" . "\n\nHere is your new password:"******"\n\nUsername: {user_name}" . "\nPassword: {password}" . "\n\nYou can change the password from the edit profile section of the site (after you log into the site)" . "\n\nThank You"; $status_change_email_subject = "Account Updated!"; $status_change_email_body = "Dear {first_name} {last_name}," . "\n\nYour account status has been updated!" . " Please login to the member area at the following URL:" . "\n\n {login_link}" . "\n\nThank You"; $bulk_activate_email_subject = "Account Activated!"; $bulk_activate_email_body = "Hi," . "\n\nYour account has been activated!" . "\n\nYou can now login to the member area." . "\n\nThank You"; if (empty($installed_version)) { //Do fresh install tasks //Create the mandatory pages (if they are not there) SwpmMiscUtils::create_mandatory_wp_pages(); //End of page creation $settings->set_value('reg-complete-mail-subject', stripslashes($reg_email_subject))->set_value('reg-complete-mail-body', stripslashes($reg_email_body))->set_value('reg-prompt-complete-mail-subject', stripslashes($reg_prompt_email_subject))->set_value('reg-prompt-complete-mail-body', stripslashes($reg_prompt_email_body))->set_value('upgrade-complete-mail-subject', stripslashes($upgrade_email_subject))->set_value('upgrade-complete-mail-body', stripslashes($upgrade_email_body))->set_value('reset-mail-subject', stripslashes($reset_email_subject))->set_value('reset-mail-body', stripslashes($reset_email_body))->set_value('account-change-email-subject', stripslashes($status_change_email_subject))->set_value('account-change-email-body', stripslashes($status_change_email_body))->set_value('email-from', trim(get_option('admin_email'))); $settings->set_value('bulk-activate-notify-mail-subject', stripslashes($bulk_activate_email_subject)); $settings->set_value('bulk-activate-notify-mail-body', stripslashes($bulk_activate_email_body)); } if (version_compare($installed_version, SIMPLE_WP_MEMBERSHIP_VER) == -1) { //Do upgrade tasks } $settings->set_value('swpm-active-version', SIMPLE_WP_MEMBERSHIP_VER)->save(); //save everything. }
function um_add_user_frontend($args) { global $ultimatemember; extract($args); if (isset($user_email) && !isset($user_login)) { $user_login = $user_email; } if (isset($username) && !isset($args['user_login'])) { $user_login = $username; } if (isset($username) && is_email($username)) { $user_email = $username; } if (!isset($user_password)) { $user_password = $ultimatemember->validation->generate(); } $unique_userID = $ultimatemember->query->count_users() + 1; if (!isset($user_email)) { $user_email = 'nobody' . $unique_userID . '@' . get_bloginfo('name'); } if (!isset($user_login)) { $user_login = '******' . $unique_userID; } $creds['user_login'] = $user_login; $creds['user_password'] = $user_password; $creds['user_email'] = $user_email; $args['submitted'] = array_merge($args['submitted'], $creds); $args = array_merge($args, $creds); do_action('um_before_new_user_register', $args); $user_id = wp_create_user($user_login, $user_password, $user_email); do_action('um_after_new_user_register', $user_id, $args); return $user_id; }
/** * Generate the data from the PHPDoc markup. * * @param string $path Directory or file to scan for PHPDoc * @param string $format What format the data is returned in: [json|array]. * * @return string|array */ protected function _get_phpdoc_data($path, $format = 'json') { $output_cache_file = dirname(__DIR__) . '/cache-phpdoc.json'; /** * Force delete last cache of phpdoc * Compare directory and WordPress Version for detecting */ $delete_output_cache_file = false; $wp_parser_root_import_dir = get_option('wp_parser_root_import_dir', ''); $directory_to_compare = wp_normalize_path(__DIR__); if (false !== strpos($wp_parser_root_import_dir, $directory_to_compare)) { $current_wp_version = get_bloginfo('version'); $wp_parser_imported_wp_version = get_option('wp_parser_imported_wp_version', $current_wp_version); $delete_output_cache_file = $wp_parser_imported_wp_version != $current_wp_version; } /** * Delete last cache of phpdoc, true for deleting or false to skip * * Default: false or compare wordpress version see above */ $delete_output_cache_file = apply_filters('sublime_delete_phpdoc_output_cache', $delete_output_cache_file); if ($delete_output_cache_file) { if (false !== stream_resolve_include_path($output_cache_file)) { unlink($output_cache_file); } } if (false !== stream_resolve_include_path($output_cache_file)) { if ($output = file_get_contents($output_cache_file)) { $output = 'json' == $format ? $output : json_decode($output, true); } } else { WP_CLI::line(sprintf('Extracting PHPDoc from %s. This may take a few minutes...', $path)); $is_file = is_file($path); $files = $is_file ? array($path) : Importer::set_parser_phpdoc($path); $path = $is_file ? dirname($path) : $path; if ($files instanceof WP_Error) { WP_CLI::error(sprintf('Problem with %1$s: %2$s', $path, $files->get_error_message())); exit; } $output = Importer::get_parser_phpdoc($files, $path); /** * Generate cache file from phpdoc, true for generate or false to skip * * Default: true */ if (apply_filters('sublime_create_phpdoc_output_cache', true)) { file_put_contents($output_cache_file, json_encode($output, JSON_PRETTY_PRINT)); } if ('json' == $format) { $output = json_encode($output, JSON_PRETTY_PRINT); } } if ($helper_directory = realpath(dirname(__DIR__) . '/missing')) { $helpers = glob($helper_directory . '/*.php'); if (is_array($helpers)) { $output = array_merge($output, Importer::get_parser_phpdoc($helpers, $helper_directory)); } } return $output; }
function themepark_remove_cssjs_ver($src) { if (strpos($src, 'ver=' . get_bloginfo('version'))) { $src = remove_query_arg('ver', $src); } return $src; }
public function constant($mm_config = array()) { // Set theme primary information. foreach ($mm_config as $key => $value) { $this->constant[$key] = $value; } // Set theme identificators and prefixes. $this->constant['MM_OPTIONS_NAME'] = $this->constant['MM_WARE_SLUG'] . '_options'; $this->constant['MM_OPTIONS_DB_NAME'] = $this->constant['MM_OPTIONS_NAME']; $this->constant['MM_TEXTDOMAIN'] = $this->constant['MM_WARE_SLUG']; $this->constant['MM_TEXTDOMAIN_ADMIN'] = $this->constant['MM_WARE_SLUG'] . '_admin'; $this->constant['MM_THEME_PAGE_SLUG'] = $this->constant['MM_OPTIONS_NAME']; // Set theme static locations. // DIRECTORIES $this->constant['MM_WARE_DIR'] = dirname($this->constant['MM_WARE_INIT_FILE']); $this->constant['MM_WARE_FRAMEWORK_DIR'] = $this->constant['MM_WARE_DIR'] . '/framework'; $this->constant['MM_WARE_EXTENSIONS_DIR'] = $this->constant['MM_WARE_DIR'] . '/extensions'; $this->constant['MM_WARE_SRC_DIR'] = $this->constant['MM_WARE_DIR'] . '/src'; $this->constant['MM_WARE_CSS_DIR'] = $this->constant['MM_WARE_SRC_DIR'] . '/css'; // URL's if (is_multisite()) { $home_url = get_home_url(); } else { $wpurl = get_bloginfo('wpurl'); $home_url = $wpurl; } $ware_dir_explode = array_reverse(explode('/', str_replace('\\', '/', $this->constant['MM_WARE_DIR']))); $this->constant['MM_WARE_URL'] = $home_url . '/' . $ware_dir_explode[2] . '/' . $ware_dir_explode[1] . '/' . $ware_dir_explode[0]; $this->constant['MM_WARE_SRC_URL'] = $this->constant['MM_WARE_URL'] . '/src'; $this->constant['MM_WARE_CSS_URL'] = $this->constant['MM_WARE_SRC_URL'] . '/css'; $this->constant['MM_WARE_JS_URL'] = $this->constant['MM_WARE_SRC_URL'] . '/js'; $this->constant['MM_WARE_FONTS_URL'] = $this->constant['MM_WARE_SRC_URL'] . '/fonts'; $this->constant['MM_WARE_IMG_URL'] = $this->constant['MM_WARE_SRC_URL'] . '/img'; }
/** * Refresh the parameters passed to the JavaScript via JSON. * * @since 3.4.0 * @since 4.2.0 Moved from WP_Customize_Upload_Control. * * @see WP_Customize_Control::to_json() */ public function to_json() { parent::to_json(); $this->json['label'] = html_entity_decode($this->label, ENT_QUOTES, get_bloginfo('charset')); $this->json['mime_type'] = $this->mime_type; $this->json['button_labels'] = $this->button_labels; $this->json['canUpload'] = current_user_can('upload_files'); $value = $this->value(); if (is_object($this->setting)) { if ($this->setting->default) { // Fake an attachment model - needs all fields used by template. // Note that the default value must be a URL, NOT an attachment ID. $type = in_array(substr($this->setting->default, -3), array('jpg', 'png', 'gif', 'bmp')) ? 'image' : 'document'; $default_attachment = array('id' => 1, 'url' => $this->setting->default, 'type' => $type, 'icon' => wp_mime_type_icon($type), 'title' => basename($this->setting->default)); if ('image' === $type) { $default_attachment['sizes'] = array('full' => array('url' => $this->setting->default)); } $this->json['defaultAttachment'] = $default_attachment; } if ($value && $this->setting->default && $value === $this->setting->default) { // Set the default as the attachment. $this->json['attachment'] = $this->json['defaultAttachment']; } elseif ($value) { $this->json['attachment'] = wp_prepare_attachment_for_js($value); } } }
/** * Constructor */ public function __construct() { $remove = array_diff(array_keys($_GET), $this->baseUrlParamNames); if ($remove) { $this->baseUrl = remove_query_arg($remove); } else { $this->baseUrl = $_SERVER['REQUEST_URI']; } parent::__construct(); // add special filter for url fields $this->input->addFilter(create_function('$str', 'return "http://" == $str || "ftp://" == $str ? "" : $str;')); // enqueue required sripts and styles global $wp_styles; if (!is_a($wp_styles, 'WP_Styles')) { $wp_styles = new WP_Styles(); } wp_enqueue_style('pmwi-admin-style', PMWI_ROOT_URL . '/static/css/admin.css', array(), PMWI_VERSION); if (version_compare(get_bloginfo('version'), '3.8-RC1') >= 0) { wp_enqueue_style('pmwi-admin-style-wp-3.8', PMWI_ROOT_URL . '/static/css/admin-wp-3.8.css'); } wp_enqueue_script('pmwi-script', PMWI_ROOT_URL . '/static/js/pmwi.js', array('jquery')); wp_enqueue_script('pmwi-admin-script', PMWI_ROOT_URL . '/static/js/admin.js', array('jquery', 'jquery-ui-core', 'jquery-ui-resizable', 'jquery-ui-dialog', 'jquery-ui-datepicker', 'jquery-ui-draggable', 'jquery-ui-droppable', 'pmxi-admin-script'), PMWI_VERSION); global $woocommerce; $woocommerce_witepanel_params = array('remove_item_notice' => __("Remove this item? If you have previously reduced this item's stock, or this order was submitted by a customer, will need to manually restore the item's stock.", 'wpai_woocommerce_addon_plugin'), 'remove_attribute' => __('Remove this attribute?', 'wpai_woocommerce_addon_plugin'), 'name_label' => __('Name', 'wpai_woocommerce_addon_plugin'), 'remove_label' => __('Remove', 'wpai_woocommerce_addon_plugin'), 'click_to_toggle' => __('Click to toggle', 'wpai_woocommerce_addon_plugin'), 'values_label' => __('Value(s)', 'wpai_woocommerce_addon_plugin'), 'text_attribute_tip' => __('Enter some text, or some attributes by pipe (|) separating values.', 'wpai_woocommerce_addon_plugin'), 'visible_label' => __('Visible on the product page', 'wpai_woocommerce_addon_plugin'), 'used_for_variations_label' => __('Used for variations', 'wpai_woocommerce_addon_plugin'), 'new_attribute_prompt' => __('Enter a name for the new attribute term:', 'wpai_woocommerce_addon_plugin'), 'calc_totals' => __("Calculate totals based on order items, discount amount, and shipping? Note, you will need to (optionally) calculate tax rows and cart discounts manually.", 'wpai_woocommerce_addon_plugin'), 'calc_line_taxes' => __("Calculate line taxes? This will calculate taxes based on the customers country. If no billing/shipping is set it will use the store base country.", 'wpai_woocommerce_addon_plugin'), 'copy_billing' => __("Copy billing information to shipping information? This will remove any currently entered shipping information.", 'wpai_woocommerce_addon_plugin'), 'load_billing' => __("Load the customer's billing information? This will remove any currently entered billing information.", 'wpai_woocommerce_addon_plugin'), 'load_shipping' => __("Load the customer's shipping information? This will remove any currently entered shipping information.", 'wpai_woocommerce_addon_plugin'), 'featured_label' => __('Featured', 'wpai_woocommerce_addon_plugin'), 'tax_or_vat' => $woocommerce->countries->tax_or_vat(), 'prices_include_tax' => get_option('woocommerce_prices_include_tax'), 'round_at_subtotal' => get_option('woocommerce_tax_round_at_subtotal'), 'meta_name' => __('Meta Name', 'wpai_woocommerce_addon_plugin'), 'meta_value' => __('Meta Value', 'wpai_woocommerce_addon_plugin'), 'no_customer_selected' => __('No customer selected', 'wpai_woocommerce_addon_plugin'), 'tax_label' => __('Tax Label:', 'wpai_woocommerce_addon_plugin'), 'compound_label' => __('Compound:', 'wpai_woocommerce_addon_plugin'), 'cart_tax_label' => __('Cart Tax:', 'wpai_woocommerce_addon_plugin'), 'shipping_tax_label' => __('Shipping Tax:', 'wpai_woocommerce_addon_plugin'), 'plugin_url' => $woocommerce->plugin_url(), 'ajax_url' => admin_url('admin-ajax.php'), 'add_order_item_nonce' => wp_create_nonce("add-order-item"), 'add_attribute_nonce' => wp_create_nonce("add-attribute"), 'calc_totals_nonce' => wp_create_nonce("calc-totals"), 'get_customer_details_nonce' => wp_create_nonce("get-customer-details"), 'search_products_nonce' => wp_create_nonce("search-products"), 'calendar_image' => $woocommerce->plugin_url() . '/assets/images/calendar.png', 'post_id' => null); wp_localize_script('woocommerce_writepanel', 'woocommerce_writepanel_params', $woocommerce_witepanel_params); wp_enqueue_style('pmwi-woo-style', $woocommerce->plugin_url() . '/assets/css/admin.css'); }
function compo_cloud() { global $wpdb; $topurl = get_bloginfo("url"); $start = 10; $total = 24; $query = "SELECT {$wpdb->terms}.term_id, {$wpdb->terms}.name, {$wpdb->term_taxonomy}.count, {$wpdb->terms}.slug FROM (({$wpdb->term_relationships} INNER JOIN {$wpdb->posts} ON {$wpdb->term_relationships}.object_id = {$wpdb->posts}.ID) INNER JOIN {$wpdb->term_taxonomy} ON {$wpdb->term_relationships}.term_taxonomy_id = {$wpdb->term_taxonomy}.term_taxonomy_id) INNER JOIN {$wpdb->terms} ON {$wpdb->term_taxonomy}.term_id = {$wpdb->terms}.term_id WHERE ((({$wpdb->term_taxonomy}.taxonomy)='post_tag') AND (({$wpdb->posts}.post_status)='publish')) GROUP BY {$wpdb->terms}.name ORDER BY count DESC, {$wpdb->terms}.name"; # LIMIT $start,$total"; $terms = $wpdb->get_results($query); shuffle($terms); $data = array(); foreach ($terms as $e) { if ($e->count < 2) { continue; } $data[] = "{$e->count}|{$e->name}|{$e->slug}"; if (count($data) >= $total) { break; } } natcasesort($data); $out = array(); $n = 0; foreach ($data as $v) { $z = intval(8 + $n * 0.5); list($x, $name, $slug) = explode("|", $v); // $name = htmlentities($name); $out[] = "<a href='{$topurl}/tag/{$slug}' style='font-size:{$z}px'>{$name}</a>"; $n += 1; } shuffle($out); echo implode(" ", $out); }
function tography_lite_enqueue_stylesheets() { //Bootstrap ======================================================= wp_register_style('bootstrap', TOGRAPHY_LITE_CSS . '/bootstrap.css', array(), '3.1', 'all'); wp_enqueue_style('bootstrap'); //================================================================= if (is_page_template('page-portfolio-thirds.php') || is_archive()) { //Isotope ================================================ wp_register_style('isotope', TOGRAPHY_LITE_CSS . '/isotope.css', array(), '1.0', 'all'); wp_enqueue_style('isotope'); //================================================================= //Photoswipe ====================================================== wp_register_style('photoswipe', TOGRAPHY_LITE_CSS . '/photoswipe.css', array(), '2.0.0', 'all'); wp_enqueue_style('photoswipe'); //================================================================= //Photoswipe Skin ====================================================== wp_register_style('photoswipe-skin', TOGRAPHY_LITE_CSS . '/default-skin/default-skin.css', array(), '2.0.0', 'all'); wp_enqueue_style('photoswipe-skin'); //================================================================= } if (is_single() || is_archive()) { //Photoswipe ====================================================== wp_register_style('photoswipe', TOGRAPHY_LITE_CSS . '/photoswipe.css', array(), '2.0.0', 'all'); wp_enqueue_style('photoswipe'); //================================================================= //Photoswipe Skin ====================================================== wp_register_style('photoswipe-skin', TOGRAPHY_LITE_CSS . '/default-skin/default-skin.css', array(), '2.0.0', 'all'); wp_enqueue_style('photoswipe-skin'); //================================================================= } //Main Stylesheet ================================================= wp_register_style('main-stylesheet', get_bloginfo('stylesheet_url'), array('bootstrap'), '1.0', 'all'); wp_enqueue_style('main-stylesheet'); //================================================================= }
function amazingtimes_enqueue_styles() { wp_enqueue_style('amazingtimes-lato-fonts', '//fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic', array(), CHILD_THEME_VERSION); wp_enqueue_style('amazingtimes-gvollkorn-fonts', '//fonts.googleapis.com/css?family=Vollkorn:400italic,700italic,400,700', array(), CHILD_THEME_VERSION); wp_enqueue_script('amazingtimes-responsive-menu', get_bloginfo('stylesheet_directory') . '/js/responsive-menu.js', array('jquery'), '1.0.0'); wp_enqueue_style('dashicons'); }
/** * Cultiv8 Theme Customizer * * @package Cultiv8 */ function cultiv8_customize_register($wp_customize) { // Site Logo functionality if Jetpack is not installed or WP4.5 which has site logo built in if (!function_exists('the_custom_logo') && !function_exists('jetpack_the_site_logo')) { $wp_customize->get_section('title_tagline')->title = __('Site Title, Tagline, and Logo', 'cultiv8'); $wp_customize->add_setting('cultiv8_site_logo', array('default' => '', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'postMessage')); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'cultiv8_site_logo', array('label' => esc_html__('Site Logo', 'cultiv8'), 'section' => 'title_tagline', 'settings' => 'cultiv8_site_logo', 'description' => sprintf(__('The Site Logo is displayed in the header. Uncheck <code>%s</code> to display only the logo. ', 'cultiv8'), __('Display Header Text'))))); } // Podcasting options cultiv8_customize_createSection($wp_customize, array('id' => 'podcast', 'title' => _x('Podcasting', 'Customizer section title', 'cultiv8'), 'description' => _x('Settings for audio podcast', 'Customizer section description', 'cultiv8'))); cultiv8_customize_createSetting($wp_customize, array('id' => 'cultiv8_podcast_desc', 'label' => _x('Podcast Description', 'Customizer setting', 'cutiv8'), 'type' => 'textarea', 'default' => get_bloginfo('description'), 'section' => 'podcast')); cultiv8_customize_createSetting($wp_customize, array('id' => 'cultiv8_podcast_author', 'label' => _x('Podcast Author', 'Customizer setting', 'cultiv8'), 'type' => 'text', 'default' => get_bloginfo('name'), 'section' => 'podcast')); cultiv8_customize_createSetting($wp_customize, array('id' => 'cultiv8_podcast_logo', 'label' => _x('Podcast Logo', 'Customizer setting', 'cultiv8'), 'type' => 'image', 'default' => '', 'section' => 'podcast', 'description' => _x('Logo used in podcast feed. Must be 1400 x 1400 jpg or png.', 'Podcast logo option description', 'cultiv8'))); // RSS cultiv8_customize_createSection($wp_customize, array('id' => 'rss', 'title' => _x('RSS Options', 'Customizer section title', 'cultiv8'), 'description' => _x('Settings for RSS feed', 'Customizer section description', 'cultiv8'))); cultiv8_customize_createSetting($wp_customize, array('id' => 'cultiv8_feed_logo', 'label' => _x('RSS feed Logo', 'Customizer setting', 'cultiv8'), 'type' => 'image', 'default' => '', 'section' => 'rss', 'description' => _x('Logo used in RSS feed. Sometimes a white + transparent logo does not show well in RSS readers. Use this to display a different logo than your site logo.', 'RSS feed logo option description', 'cultiv8'))); // Panel options $panels = 12; // New panels for ($i = 9; $i <= $panels; $i++) { $wp_customize->add_section('pique_panel' . $i, array('title' => esc_html__('Panel ' . $i, 'pique'), 'active_callback' => 'is_front_page', 'panel' => 'pique_options_panel', 'description' => __('Add a background image to your panel by setting a featured image in the page editor. If you don’t select a page, this panel will not be displayed.', 'pique'))); $wp_customize->add_setting('pique_panel' . $i, array('default' => false, 'sanitize_callback' => 'pique_sanitize_numeric_value')); $wp_customize->add_control('pique_panel' . $i, array('label' => esc_html__('Panel Content', 'pique'), 'section' => 'pique_panel' . $i, 'type' => 'dropdown-pages')); $wp_customize->add_setting('pique_panel' . $i . '_background', array('default' => 'default', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage')); $wp_customize->add_control('pique_panel' . $i . '_background', array('label' => esc_html__('Background Color', 'pique'), 'section' => 'pique_panel' . $i, 'type' => 'color')); $wp_customize->add_setting('pique_panel' . $i . '_opacity', array('default' => 'default', 'sanitize_callback' => 'pique_sanitize_opacity', 'transport' => 'postMessage')); $wp_customize->add_control('pique_panel' . $i . '_opacity', array('label' => esc_html__('Featured Image Opacity', 'pique'), 'section' => 'pique_panel' . $i, 'type' => 'select', 'description' => esc_html('Set the opacity of the featured image over the panel background.', 'pique'), 'choices' => array('0.25' => esc_html__('25%', 'pique'), '0.5' => esc_html__('50%', 'pique'), '0.75' => esc_html__('75%', 'pique'), '1' => esc_html__('100%', 'pique')))); } for ($i = 1; $i <= $panels; $i++) { cultiv8_customize_createSetting($wp_customize, array('id' => 'cultiv8_panel' . $i . '_hidetitle', 'label' => _x('Hide Title', 'Customizer setting', 'cultiv8'), 'type' => 'checkbox', 'default' => false, 'section' => 'pique_panel' . $i, 'transport' => 'postMessage', 'description' => __('Check to hide the title in this section', 'cultiv8'))); cultiv8_customize_createSetting($wp_customize, array('id' => 'cultiv8_panel' . $i . '_height', 'label' => _x('Auto height', 'Customizer setting', 'cultiv8'), 'type' => 'checkbox', 'default' => false, 'section' => 'pique_panel' . $i, 'transport' => 'postMessage', 'description' => __('Check to adjust panel height to content', 'cultiv8'))); cultiv8_customize_createSetting($wp_customize, array('id' => 'cultiv8_panel' . $i . '_hideinmenu', 'label' => _x('Hide from Menu', 'Customizer setting', 'cultiv8'), 'type' => 'checkbox', 'default' => false, 'section' => 'pique_panel' . $i, 'description' => __('Check to hide this pane from the top menu if the <code>Add an anchor menu to the front page</code> option is selected.', 'cultiv8'))); } }
function display_clink_main_slug() { // validate and update clink_main_slug value $clink_main_slug_option = get_option('clink_main_slug'); if ($clink_main_slug_option) { $clink_main_slug_option = str_replace(' ', '-', $clink_main_slug_option); // Replaces all spaces with hyphens. $clink_main_slug_option = preg_replace('/[^A-Za-z0-9\\-]/', '', $clink_main_slug_option); // Removes special chars. update_option('clink_main_slug', $value = $clink_main_slug_option); $clink_main_slug_option = get_option('clink_main_slug'); } elseif (empty($clink_main_slug_option)) { update_option('clink_main_slug', $value = 'clink'); $clink_main_slug_option = get_option('clink_main_slug'); } // Flush rewrite rules after Clink settings update if (isset($_GET['settings-updated'])) { flush_rewrite_rules(); } $clink_slug_structure = get_bloginfo('url') . '/' . $clink_main_slug_option . '/link-name'; ?> <input type="text" name="clink_main_slug" id="clink_main_slug" value="<?php echo $clink_main_slug_option; ?> " /> <p class="description clink-description"><?php _e('Enter the clink plugin base slug for links. In default it set to <code>clink</code>', 'aryan-themes'); ?> </p> <p class="description clink-description"><?php printf(__('Current links structure is like: <code>%s</code>', 'aryan-themes'), $clink_slug_structure); ?> </p> <?php }
public function sendContact() { $res = new responseGmp(); $time = time(); $prevSendTime = (int) get_option(GMP_CODE . '_last__time_contact_send'); if ($prevSendTime && $time - $prevSendTime < 5 * 60) { // Only one message per five minutes $res->pushError(__('Please don\'t send contact requests so often - wait for response for your previous requests.')); $res->ajaxExec(); } $data = reqGmp::get('post'); $fields = $this->getModule()->getContactFormFields(); foreach ($fields as $fName => $fData) { $validate = isset($fData['validate']) ? $fData['validate'] : false; $data[$fName] = isset($data[$fName]) ? trim($data[$fName]) : ''; if ($validate) { $error = ''; foreach ($validate as $v) { if (!empty($error)) { break; } switch ($v) { case 'notEmpty': if (empty($data[$fName])) { $error = $fData['html'] == 'selectbox' ? __('Please select %s', GMP_LANG_CODE) : __('Please enter %s', GMP_LANG_CODE); $error = sprintf($error, $fData['label']); } break; case 'email': if (!is_email($data[$fName])) { $error = __('Please enter valid email address', GMP_LANG_CODE); } break; } if (!empty($error)) { $res->pushError($error, $fName); } } } } if (!$res->error()) { $msg = 'Message from: ' . get_bloginfo('name') . ', Host: ' . $_SERVER['HTTP_HOST'] . '<br />'; $msg .= 'Plugin: ' . GMP_WP_PLUGIN_NAME . '<br />'; foreach ($fields as $fName => $fData) { if (in_array($fName, array('name', 'email', 'subject'))) { continue; } if ($fName == 'category') { $data[$fName] = $fData['options'][$data[$fName]]; } $msg .= '<b>' . $fData['label'] . '</b>: ' . nl2br($data[$fName]) . '<br />'; } if (frameGmp::_()->getModule('mail')->send('*****@*****.**', $data['subject'], $msg, $data['name'], $data['email'])) { update_option(GMP_CODE . '_last__time_contact_send', $time); } else { $res->pushError(frameGmp::_()->getModule('mail')->getMailErrors()); } } $res->ajaxExec(); }
function dess_page_title($title) { if (empty($title) && (is_home() || is_front_page())) { return __('Home', 'pro-blogg') . ' | ' . get_bloginfo('description'); } return $title; }
function loginRedirect($redirect_to, $request_redirect_to, $user) { if (is_a($user, 'WP_User') && $user->has_cap('edit_posts') === false) { return get_bloginfo('siteurl'); } return $redirect_to; }
public function send_recipient_email($name = '', $email = '', $gift_message = '', $payment_id = 0) { if (!class_exists('RCP_Discounts')) { return false; } global $edd_options; $db = new RCP_Discounts(); $site_name = get_bloginfo('name'); $discount = $db->get_by('code', md5($name . $email . $payment_id)); $subject = sprintf(__('Gift Certificate to %s', 'rcp-gifts'), $site_name); $from_name = isset($edd_options['from_name']) ? $edd_options['from_name'] : get_bloginfo('name'); $from_email = isset($edd_options['from_email']) ? $edd_options['from_email'] : get_option('admin_email'); $body = '<p>' . __("Hello!", "rcp-gifts") . '</p>'; $body .= '<p>' . sprintf(__("Someone has gifted you a membership to %s", "rcp-gifts"), $site_name) . '</p>'; if (!empty($gift_message) && __('Enter the a message to send to the recipient', 'rcp-gifts') != $gift_message) { $body .= '<p>' . __("The following message was included with the gift: ", "rcp-gifts") . '</p>'; $body .= '<blockquote>' . $gift_message . '</blockquote>'; } $body .= '<p>' . sprintf(__("Enter %s during registration to redeem your gift.", "rcp-gifts"), $discount->code) . '</p>'; $body .= '<p>' . sprintf(__("Visit %s to claim your membership gift.", "rcp-gifts"), '<a href="' . home_url() . '">' . home_url() . '</a>') . '</p>'; $emails = new EDD_Emails(); $emails->__set('from_address', $from_email); $emails->__set('from_name', $from_name); $emails->send($email, $subject, $body); }
function getDomainStats() { $data = array(); $modelConfig =& WYSIJA::get('config', 'model'); $url = admin_url('admin.php'); $helperToolbox =& WYSIJA::get('toolbox', 'helper'); $data['domain_name'] = $helperToolbox->_make_domain_name($url); $data['url'] = $url; $data[uniqid()] = uniqid('WYSIJA'); $data['installed'] = $modelConfig->getValue('installed_time'); $data['contacts'] = $modelConfig->getValue('emails_notified'); $data['wysijaversion'] = WYSIJA::get_version(); $data['WPversion'] = get_bloginfo('version'); $data['sending_method'] = $modelConfig->getValue('sending_method'); if ($data['sending_method'] == 'smtp') { $data['smtp_host'] = $modelConfig->getValue('smtp_host'); } $modelList =& WYSIJA::get('list', 'model'); $data['number_list'] = $modelList->count(); $modelNL =& WYSIJA::get('email', 'model'); $data['number_sent_nl'] = $modelNL->count(array('status' => 2)); $data['number_sub'] = $modelConfig->getValue('total_subscribers'); $data['optin_status'] = $modelConfig->getValue('confirm_dbleoptin'); $data['list_plugins'] = unserialize(get_option('active_plugins')); $data = base64_encode(serialize($data)); return $data; }
function wpdocs_hack_wp_title_for_home($title) { if (empty($title) && (is_home() || is_front_page())) { $title = __(get_bloginfo('title'), 'textdomain') . ' | ' . get_bloginfo('description'); } return $title; }
function relevanssi_wpml_filter($data) { $use_filter = get_option('relevanssi_wpml_only_current'); if ('on' == $use_filter) { //save current blog language $lang = get_bloginfo('language'); $filtered_hits = array(); foreach ($data[0] as $hit) { if (isset($hit->blog_id)) { switch_to_blog($hit->blog_id); } global $sitepress; if (function_exists('icl_object_id') && $sitepress->is_translated_post_type($hit->post_type)) { if ($hit->ID == icl_object_id($hit->ID, $hit->post_type, false, ICL_LANGUAGE_CODE)) { $filtered_hits[] = $hit; } } elseif (function_exists('icl_object_id') && function_exists('pll_is_translated_post_type')) { if (pll_is_translated_post_type($hit->post_type)) { if ($hit->ID == icl_object_id($hit->ID, $hit->post_type, false, ICL_LANGUAGE_CODE)) { $filtered_hits[] = $hit; } } } elseif (get_bloginfo('language') == $lang) { $filtered_hits[] = $hit; } if (isset($hit->blog_id)) { restore_current_blog(); } } return array($filtered_hits, $data[1]); } return $data; }
/** * Batch has been successfully imported. * * @param Batch $batch */ public function imported(Batch $batch) { $links = array(); $output = ''; $types = array('page', 'post'); // Only keep published posts of type $types. $posts = array_filter($batch->get_posts(), function (Post $post) use($types) { return $post->get_post_status() == 'publish' && in_array($post->get_type(), $types); }); // Create links for each of the posts. foreach ($posts as $post) { $post_id = $this->post_dao->get_id_by_guid($post->get_guid()); $links[] = array('link' => get_permalink($post_id), 'title' => $post->get_title()); } $links = apply_filters('sme_imported_post_links', $links); foreach ($links as $link) { $output .= '<li><a href="' . $link['link'] . '" target="_blank">' . $link['title'] . '</a></li>'; } if ($output !== '') { $output = '<ul>' . $output . '</ul>'; $message = '<h3>Posts deployed to ' . get_bloginfo('name') . ':</h3>' . $output; $this->api->add_deploy_message($batch->get_id(), $message, 'info', 102); } $this->api->add_deploy_message($batch->get_id(), 'Batch has been successfully imported!', 'success', 101); }
/** * Test whether force rewrite should be enabled or not. */ function wpseo_title_test() { $options = get_option('wpseo_titles'); $options['forcerewritetitle'] = false; $options['title_test'] = 1; update_option('wpseo_titles', $options); // Setting title_test to > 0 forces the plugin to output the title below through a filter in class-frontend.php. $expected_title = 'This is a Yoast Test Title'; WPSEO_Utils::clear_cache(); $args = array('user-agent' => sprintf('WordPress/%1$s; %2$s - Yoast', $GLOBALS['wp_version'], get_site_url())); $resp = wp_remote_get(get_bloginfo('url'), $args); if ($resp && !is_wp_error($resp) && (200 == $resp['response']['code'] && isset($resp['body']))) { $res = preg_match('`<title>([^<]+)</title>`im', $resp['body'], $matches); if ($res && strcmp($matches[1], $expected_title) !== 0) { $options['forcerewritetitle'] = true; $resp = wp_remote_get(get_bloginfo('url'), $args); $res = false; if ($resp && !is_wp_error($resp) && (200 == $resp['response']['code'] && isset($resp['body']))) { $res = preg_match('`/<title>([^>]+)</title>`im', $resp['body'], $matches); } } if (!$res || $matches[1] != $expected_title) { $options['forcerewritetitle'] = false; } } else { // If that dies, let's make sure the titles are correct and force the output. $options['forcerewritetitle'] = true; } $options['title_test'] = 0; update_option('wpseo_titles', $options); }
/** * Function that generates a sample CSV file from the database using the relevant course IDs. */ function WPCW_data_export_userImportSample() { WPCW_data_export_sendHeaders_CSV(); // Start CSV $out = fopen('php://output', 'w'); // The headings $headings = array('first_name', 'last_name', 'email_address', 'courses_to_add_to'); fputcsv($out, $headings); // Use existing course IDs to make it more useful. If there are no courses // Create some dummy courses to add. $courseList = array(); $courseList[1] = __('Test Course', 'wp_courseware') . ' A'; $courseList[2] = __('Test Course', 'wp_courseware') . ' B'; $courseListOfIDs = 0; foreach ($courseList as $courseID => $courseName) { $data = array(); $data[] = 'John'; $data[] = 'Smith'; $data[] = get_bloginfo('admin_email'); // Sequentially add each ID to the list if ($courseListOfIDs) { $courseListOfIDs .= ',' . $courseID; } else { $courseListOfIDs = $courseID; } $data[] = $courseListOfIDs; // Not removing any courses $data[] = false; fputcsv($out, $data); } // All done fclose($out); }
function builder_filter_wp_title($title, $seperator, $direction) { global $paged, $page; if (is_feed()) { return $title; } $seperator = ' ' . trim($seperator) . ' '; if (builder_is_home() && apply_filters('builder_filter_flip_title_direction_on_home', true)) { $direction = 'right' == $direction ? 'left' : 'right'; } if ($paged >= 2 || $page >= 2) { $page_description = sprintf(__('Page %s', 'it-l10n-Builder-Cohen'), max($paged, $page)); if ('right' == $direction) { $title .= $page_description . $seperator; } else { if (is_rtl()) { $title = $seperator . $page_description . $title; } else { $title .= $seperator . $page_description; } } } if ('right' == $direction) { $title .= get_bloginfo('name'); } else { $title = get_bloginfo('name') . $title; } return $title; }
function default_options() { $this->version = ARRAS_VERSION; $this->donate = false; $this->feed_url = get_bloginfo('rss2_url'); $this->comments_feed_url = get_bloginfo('comments_rss2_url'); $this->footer_title = __('Copyright', 'arras'); $this->footer_message = '<p>' . sprintf(__('Copyright %s. All Rights Reserved.', 'arras'), get_bloginfo('name')) . '</p>'; $this->featured_cat = 0; $this->topnav_home = __('Home', 'arras'); $this->topnav_display = 'categories'; $this->topnav_linkcat = 0; $this->slideshow_count = 4; $this->featured_count = 3; $this->index_count = get_option('posts_per_page'); $this->featured_display = 'default'; $this->news_display = 'line'; $this->archive_display = 'quick'; $this->display_author = true; $this->post_author = true; $this->post_date = true; $this->post_cats = true; $this->post_tags = true; $this->single_meta_pos = 'top'; $this->single_custom_fields = 'Score:score,Pros:pros,Cons:cons'; $this->featured_display_meta_inpic = true; $this->news_display_meta_inpic = true; $this->layout = '2c-r-fixed'; $this->style = 'default'; $this->featured_thumb_w = 205; $this->featured_thumb_h = 110; $this->news_thumb_w = 205; $this->news_thumb_h = 110; }
/** * Plugin activation * * @access public * @return void * @author Ralf Hortt **/ public function activation() { // First time installation if ($this->is_first_time()) { $users = get_users(); if ($users) { foreach ($users as $user) { update_usermeta($user->ID, 'authentication', '1'); } } add_option('confirm-user-registration', array('administrator' => get_bloginfo('admin_email'), 'error' => __('<strong>ERROR:</strong> Your account has to be confirmed by an administrator before you can login', 'confirm-user-registration'), 'from' => get_bloginfo('name') . ' <' . get_bloginfo('admin_email') . ">\n", 'subject' => __('Account Confirmation: ' . get_bloginfo('name'), 'confirm-user-registration'), 'message' => __("You account has been approved by an administrator!\nLogin @ " . get_bloginfo('url') . "/wp-login.php\n\nThis message is auto generated\n", 'confirm-user-registration'))); // Upgrade } else { if ($this->is_upgrade()) { // Create new option array add_option('confirm-user-registration', array('administrator' => get_option('cur_administrator'), 'error' => get_option('cur_error'), 'from' => get_option('cur_from'), 'subject' => get_option('cur_subject'), 'message' => get_option('cur_message'))); // Cleanup delete_option('cur_administrator'); delete_option('cur_error'); delete_option('cur_from'); delete_option('cur_subject'); delete_option('cur_message'); } } }
function action_admin_head() { echo '<script src="http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js" type="text/javascript"></script>'; echo '<script src="' . get_bloginfo('url') . '/wp-content/plugins/ultimate-google-fonts/ugfonts-js.js" type="text/javascript"></script>'; //css echo "<style type='text/css' media='screen'>\n h2.ug-simpleshadow { text-align: center; font-family:'Crushed',serif; text-shadow: 2px 2px 2px #000; }\n h2.ug-fire { text-align: center; background: #000; color: #fff; font-family:'UnifrakturMaguntia',serif; text-shadow: 0 0 4px white, 0 -5px 4px #FFFF33, 2px -10px 6px #FFDD33, -2px -15px 11px #FF8800, 2px -25px 18px #FF2200; }\n h2.ug-white { text-align: center; font-family:'Permanent Marker',serif; text-shadow: 2px 2px 7px #111; color: #f5f5f5; }\n h2.ug-emboss { text-align: center; background: #ccc; color: #ccc; text-shadow: -1px -1px white, 1px 1px #333; }\n h2.ug-blurry { text-align: center; background: #000; font-family:'Fontdiner Swanky',serif; font-size: 30px; color: transparent; text-shadow: #fff 0 0 5px; }\n h2.ug-stroked { text-align: center; font-family:'Luckiest Guy',serif; color:red; font-weight: bold; text-shadow: 1px 1px 0px #000, -1px -1px 0px #000; }\n h2.ug-threedee { font-family:'Slackey',serif; font-size: 30px; text-align: center; color:rgba(255,255,0,.7) ; font-weight: bold; text-shadow: 1px 1px rgba(255,128,0,.7), 2px 2px rgba(255,128,0,.7), 3px 3px rgba(255,128,0,.7), 4px 4px rgba(255,128,0,.7), 5px 5px rgba(255,128,0,.7); }\n </style>"; }
/** * Defines an array of options that will be used to generate the settings page and be saved in the database. * When creating the "id" fields, make sure to use all lowercase and no spaces. * */ function optionsframework_options() { // Test data $test_array = array("one" => "One", "two" => "Two", "three" => "Three", "four" => "Four", "five" => "Five"); // Multicheck Array $multicheck_array = array("one" => "French Toast", "two" => "Pancake", "three" => "Omelette", "four" => "Crepe", "five" => "Waffle"); // Multicheck Defaults $multicheck_defaults = array("one" => "1", "five" => "1"); // Background Defaults $background_defaults = array('color' => '', 'image' => '', 'repeat' => 'repeat', 'position' => 'top center', 'attachment' => 'scroll'); // Pull all the categories into an array $options_categories = array(); $options_categories_obj = get_categories(); foreach ($options_categories_obj as $category) { $options_categories[$category->cat_ID] = $category->cat_name; } // Pull all the pages into an array $options_pages = array(); $options_pages_obj = get_pages('sort_column=post_parent,menu_order'); $options_pages[''] = 'Select a page:'; foreach ($options_pages_obj as $page) { $options_pages[$page->ID] = $page->post_title; } // If using image radio buttons, define a directory path $imagepath = get_bloginfo('stylesheet_directory') . '/admin/images/'; $options_menu_page = array('name' => 'general', 'pagename' => 'general-options', 'title' => 'General Settings'); $options = array(); $options = array(array("name" => "Basic Settings", "type" => "heading"), array("name" => "Input Text Mini", "desc" => "A mini text input field.", "id" => "example_text_mini", "std" => "Default", "class" => "mini", "type" => "text"), array("name" => "Input Text", "desc" => "A text input field.", "id" => "example_text", "std" => "Default Value", "type" => "text"), array("name" => "Textarea", "desc" => "Textarea description.", "id" => "example_textarea", "std" => "Default Text", "type" => "textarea"), array("name" => "Input Select Small", "desc" => "Small Select Box.", "id" => "example_select", "std" => "three", "type" => "select", "class" => "mini", "options" => $test_array), array("name" => "Input Select Wide", "desc" => "A wider select box.", "id" => "example_select_wide", "std" => "two", "type" => "select", "options" => $test_array), array("name" => "Select a Category", "desc" => "Passed an array of categories with cat_ID and cat_name", "id" => "example_select_categories", "type" => "select", "options" => $options_categories), array("name" => "Select a Page", "desc" => "Passed an pages with ID and post_title", "id" => "example_select_pages", "type" => "select", "options" => $options_pages), array("name" => "Input Radio (one)", "desc" => "Radio select with default options 'one'.", "id" => "example_radio", "std" => "one", "type" => "radio", "options" => $test_array), array("name" => "Example Info", "desc" => "This is just some example information you can put in the panel.", "type" => "info"), array("name" => "Input Checkbox", "desc" => "Example checkbox, defaults to true.", "id" => "example_checkbox", "std" => "1", "type" => "checkbox"), array("name" => "Advanced Settings", "type" => "heading"), array("name" => "Check to Show a Hidden Text Input", "desc" => "Click here and see what happens.", "id" => "example_showhidden", "type" => "checkbox"), array("name" => "Hidden Text Input", "desc" => "This option is hidden unless activated by a checkbox click.", "id" => "example_text_hidden", "std" => "Hello", "class" => "hidden", "type" => "text"), array("name" => "Uploader Test", "desc" => "This creates a full size uploader that previews the image.", "id" => "example_uploader", "type" => "upload"), array("name" => "Example Image Selector", "desc" => "Images for layout.", "id" => "example_images", "std" => "2c-l-fixed", "type" => "images", "options" => array('1col-fixed' => $imagepath . '1col.png', '2c-l-fixed' => $imagepath . '2cl.png', '2c-r-fixed' => $imagepath . '2cr.png')), array("name" => "Example Background", "desc" => "Change the background CSS.", "id" => "example_background", "std" => $background_defaults, "type" => "background"), array("name" => "Multicheck", "desc" => "Multicheck description.", "id" => "example_multicheck", "std" => $multicheck_defaults, "type" => "multicheck", "options" => $multicheck_array), array("name" => "Colorpicker", "desc" => "No color selected by default.", "id" => "example_colorpicker", "std" => "", "type" => "color"), array("name" => "Typography", "desc" => "Example typography.", "id" => "example_typography", "std" => array('size' => '12px', 'face' => 'verdana', 'style' => 'bold italic', 'color' => '#123456'), "type" => "typography")); return $options; }
/** * Check if installation environment meets minimum PB requirements. * Can be shared by other plugins that depend on Pressbooks. Example usage: * * if ( ! @include_once( WP_PLUGIN_DIR . '/pressbooks/compatibility.php' ) ) { * add_action( 'admin_notices', function () { * echo '<div id="message" class="error fade"><p>' . __( 'Cannot find Pressbooks install.', 'pressbooks' ) . '</p></div>'; * } ); * return; * } * elseif ( ! pb_meets_minimum_requirements() ) { * return; * } * * * @return bool */ function pb_meets_minimum_requirements() { $is_compatible = true; // --------------------------------------------------------------------------------------------------------------- // PHP Version // --------------------------------------------------------------------------------------------------------------- // Override PHP version at your own risk! global $pb_minimum_php; if (empty($pb_minimum_php)) { $pb_minimum_php = '5.6.0'; } if (!version_compare(PHP_VERSION, $pb_minimum_php, '>=')) { add_action('admin_notices', '_pb_minimum_php'); $is_compatible = false; } // --------------------------------------------------------------------------------------------------------------- // WordPress Version // --------------------------------------------------------------------------------------------------------------- // Override WP version at your own risk! global $pb_minimum_wp; if (empty($pb_minimum_wp)) { $pb_minimum_wp = '4.4'; } if (!is_multisite() || !version_compare(get_bloginfo('version'), $pb_minimum_wp, '>=')) { add_action('admin_notices', '_pb_minimum_wp'); $is_compatible = false; } return $is_compatible; }
/** * Enqueue scripts and styles for the front end. * * @since Twenty Fourteen 1.0 */ function ieseg2_scripts() { //<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700,300,400italic' rel='stylesheet' type='text/css'> // Add Source Sans. wp_enqueue_style('ieseg-source-sans', 'http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700,300,400italic', array(), null); // Add Genericons font, used in the main stylesheet. //wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.0.2' ); // Load our main stylesheet. //wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri(), array( 'genericons' ) ); wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', false, '1.0'); wp_enqueue_style('bootstrap-theme', get_template_directory_uri() . '/css/bootstrap-theme.min.css', array('bootstrap'), '1.0'); wp_enqueue_style('animate', get_template_directory_uri() . '/css/animate.css', false, '1.0'); // utile pour wow.js wp_enqueue_style('style-ieseg', get_template_directory_uri() . '/css/ieseg.min.css', array('bootstrap'), '1.0'); if (is_page(array(1766, 59))) { wp_enqueue_style('style-timeline', get_template_directory_uri() . '/css/timeline.css'); } //wp_enqueue_style('fancybox','/wp-content/themes/'.get_template().'/lib/fancybox/jquery.fancybox-1.3.4.css',false,'1.0'); // Load the Internet Explorer specific stylesheet. //wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style', 'genericons' ), '20131205' ); //wp_style_add_data( 'twentyfourteen-ie', 'conditional', 'lt IE 9' ); //BX slider if (is_front_page() || is_page_template('template-page-programs.php')) { wp_enqueue_script('bxslider', get_template_directory_uri() . '/js/jquery.bxslider.min.js', array('jquery'), '1.0', true); wp_enqueue_style('style-bxslider', get_template_directory_uri() . '/css/jquery.bxslider.css', array('style-ieseg'), '1.0'); } wp_enqueue_script('ieseg-script', get_template_directory_uri() . '/js/ieseg.js', array('jquery'), '1.0', true); wp_enqueue_script('bootstrap-script', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '1.0', true); wp_enqueue_script('wow', get_template_directory_uri() . '/js/wow.min.js', array('jquery'), '1.0', true); //wp_enqueue_script( 'responsive-nav', get_template_directory_uri() . '/js/responsive-nav.min.js', array( 'jquery' ), '1.0', true ); //menu de gauche responsive if (is_page(array('mib-class-profile', 'mib-career-opportunities', 'mfm-student-profiles', 'msc-digital-marketing-crm-class-profile', 'msc-business-analysis-consulting-class-profile', 'msc-accounting-audit-control', 'msc-finance-class-profile', 'msc-banking-capital-markets-class-profile', 'msc-in-negotiation-for-organizations-class-profile', 'msc-big-data-analytics-business-class-profile', 'imba-class-profile', 'programme-grande-ecole', 33306, 33325))) { wp_enqueue_script('classprofiles', get_bloginfo('template_directory') . '/js/classprofiles.js', array(), '1.1', true); } }