namespace Google\Site_Kit_Dependencies\GuzzleHttp; /** * Debug function used to describe the provided value type and class. * * @param mixed $input Any type of variable to describe the type of. This * parameter misses a typehint because of that. * * @return string Returns a string containing the type of the variable and * if a class is provided, the class name. * * @deprecated describe_type will be removed in guzzlehttp/guzzle:8.0. Use Utils::describeType instead. */ function describe_type($input) : string { return \Google\Site_Kit_Dependencies\GuzzleHttp\Utils::describeType($input); } /** * Parses an array of header lines into an associative array of headers. * * @param iterable $lines Header lines array of strings in the following * format: "Name: Value" * * @deprecated headers_from_lines will be removed in guzzlehttp/guzzle:8.0. Use Utils::headersFromLines instead. */ function headers_from_lines(iterable $lines) : array { return \Google\Site_Kit_Dependencies\GuzzleHttp\Utils::headersFromLines($lines); } /** * Returns a debug stream based on the provided variable. * * @param mixed $value Optional value * * @return resource * * @deprecated debug_resource will be removed in guzzlehttp/guzzle:8.0. Use Utils::debugResource instead. */ function debug_resource($value = null) { return \Google\Site_Kit_Dependencies\GuzzleHttp\Utils::debugResource($value); } /** * Chooses and creates a default handler to use based on the environment. * * The returned handler is not wrapped by any default middlewares. * * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system. * * @throws \RuntimeException if no viable Handler is available. * * @deprecated choose_handler will be removed in guzzlehttp/guzzle:8.0. Use Utils::chooseHandler instead. */ function choose_handler() : callable { return \Google\Site_Kit_Dependencies\GuzzleHttp\Utils::chooseHandler(); } /** * Get the default User-Agent string to use with Guzzle. * * @deprecated default_user_agent will be removed in guzzlehttp/guzzle:8.0. Use Utils::defaultUserAgent instead. */ function default_user_agent() : string { return \Google\Site_Kit_Dependencies\GuzzleHttp\Utils::defaultUserAgent(); } /** * Returns the default cacert bundle for the current system. * * First, the openssl.cafile and curl.cainfo php.ini settings are checked. * If those settings are not configured, then the common locations for * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X * and Windows are checked. If any of these file locations are found on * disk, they will be utilized. * * Note: the result of this function is cached for subsequent calls. * * @throws \RuntimeException if no bundle can be found. * * @deprecated default_ca_bundle will be removed in guzzlehttp/guzzle:8.0. This function is not needed in PHP 5.6+. */ function default_ca_bundle() : string { return \Google\Site_Kit_Dependencies\GuzzleHttp\Utils::defaultCaBundle(); } /** * Creates an associative array of lowercase header names to the actual * header casing. * * @deprecated normalize_header_keys will be removed in guzzlehttp/guzzle:8.0. Use Utils::normalizeHeaderKeys instead. */ function normalize_header_keys(array $headers) : array { return \Google\Site_Kit_Dependencies\GuzzleHttp\Utils::normalizeHeaderKeys($headers); } /** * Returns true if the provided host matches any of the no proxy areas. * * This method will strip a port from the host if it is present. Each pattern * can be matched with an exact match (e.g., "foo.com" == "foo.com") or a * partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" == * "baz.foo.com", but ".foo.com" != "foo.com"). * * Areas are matched in the following cases: * 1. "*" (without quotes) always matches any hosts. * 2. An exact match. * 3. The area starts with "." and the area is the last part of the host. e.g. * '.mit.edu' will match any host that ends with '.mit.edu'. * * @param string $host Host to check against the patterns. * @param string[] $noProxyArray An array of host patterns. * * @throws Exception\InvalidArgumentException * * @deprecated is_host_in_noproxy will be removed in guzzlehttp/guzzle:8.0. Use Utils::isHostInNoProxy instead. */ function is_host_in_noproxy(string $host, array $noProxyArray) : bool { return \Google\Site_Kit_Dependencies\GuzzleHttp\Utils::isHostInNoProxy($host, $noProxyArray); } /** * Wrapper for json_decode that throws when an error occurs. * * @param string $json JSON data to parse * @param bool $assoc When true, returned objects will be converted * into associative arrays. * @param int $depth User specified recursion depth. * @param int $options Bitmask of JSON decode options. * * @return object|array|string|int|float|bool|null * * @throws Exception\InvalidArgumentException if the JSON cannot be decoded. * * @see https://www.php.net/manual/en/function.json-decode.php * @deprecated json_decode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonDecode instead. */ function json_decode(string $json, bool $assoc = \false, int $depth = 512, int $options = 0) { return \Google\Site_Kit_Dependencies\GuzzleHttp\Utils::jsonDecode($json, $assoc, $depth, $options); } /** * Wrapper for JSON encoding that throws when an error occurs. * * @param mixed $value The value being encoded * @param int $options JSON encode option bitmask * @param int $depth Set the maximum depth. Must be greater than zero. * * @throws Exception\InvalidArgumentException if the JSON cannot be encoded. * * @see https://www.php.net/manual/en/function.json-encode.php * @deprecated json_encode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonEncode instead. */ function json_encode($value, int $options = 0, int $depth = 512) : string { return \Google\Site_Kit_Dependencies\GuzzleHttp\Utils::jsonEncode($value, $options, $depth); }

関連記事

no image

– Официальный сайт Pinco играть онлайн Зеркало и вход.8622

Пинко казино – Официальный сайт Pinco играть онлайн | Зеркало и вход ▶️ ИГРАТЬ Содержимое Пинко казино – Официальный сайт Pinco Играть онлайн, зеркало и вход в Pinco Казино В наше время интернета и технологий, казино стали доступны для игроков из всего мира. Пинко казино – это официальный сайт, который предлагает игрокам возможность играть в […]

no image

– Официальный сайт Pinco играть онлайн Зеркало и вход.5493

Пинко казино – Официальный сайт Pinco играть онлайн | Зеркало и вход ▶️ ИГРАТЬ Содержимое Пинко Казино – Официальный Сайт Преимущества Официального Сайта Pinco Казино Как играть на Официальном Сайте Pinco Казино Описание и Функции Преимущества игры в Pinco казино Как Зарегистрироваться и Войти в Пинко Казино Шаги для регистрации Шаги для входа Зеркало и […]

/** * * IT-RAYS Framework * * @author IT-RAYS * @license Commercial License * @link http://www.it-rays.net * @copyright 2017 IT-RAYS Themes * @package ITFramework * @version 1.0.0 * */ if ( ! defined( 'ABSPATH' ) ) exit( 'Access Denied.' ); if ( ! function_exists('itr_theme_sidebars') ){ function itr_theme_sidebars(){ $foot_top_cols = itr_theme_option('foot_top_widg_cols'); $foot_mid_cols = itr_theme_option('foot_mid_widg_cols'); $foot_bot_cols = itr_theme_option('foot_bot_widg_cols'); register_sidebar(array( 'name' => 'Primary SideBar', 'id' => 'sidebar-1', 'before_widget' => '
', 'after_widget' => '
', )); register_sidebar(array( 'name' => 'Secondary SideBar', 'id' => 'sidebar-2', 'before_widget' => '
', 'after_widget' => '
', )); /***** Footer Widgets *****/ register_sidebar( array( 'name' => 'Middle Footer Widgets', 'id' => 'midle-footer-widgets', 'before_widget' => '
', 'after_widget' => '
', 'description' => 'Appears in the middle footer area', )); register_sidebar( array( 'name' => 'Footer Bottom Widgets', 'id' => 'footer-bottom-widgets', 'before_widget' => '
', 'after_widget' => '
', 'description' => 'Appears in the footer bottom bar', )); /****************** Custom side bar *************************/ $sbs = itr_theme_option('sidebars'); for ( $i = 1; $i <= $sbs ; $i++ ) { $sidb = itr_theme_option('sidebar_'.$i); register_sidebar(array( 'name' => $sidb, 'id' => 'side-'.$i, 'before_widget' => '
', 'after_widget' => '
', )); } } } add_action( 'widgets_init', 'itr_theme_sidebars', 11 ); if ( ! defined( 'ABSPATH' ) ) exit( 'Access Denied.' ); class itr_demo_Importer { public function __construct() { add_action( 'wp_ajax_itr_import_action', array( &$this, 'itr_import_demo_files' ) ); } public function itr_check_import() { $plug_dir = trailingslashit( ABSPATH ) . 'wp-content/plugins/munza-core'; if ( ! defined( 'WP_LOAD_IMPORTERS' ) ) define( 'WP_LOAD_IMPORTERS', true ); require_once ABSPATH . 'wp-admin/includes/import.php'; if ( ! class_exists( 'WP_Importer' ) ) { $class_wp_importer = ABSPATH . 'wp-admin/includes/class-wp-importer.php'; if ( file_exists( $class_wp_importer ) ) require $class_wp_importer; } if ( ! class_exists( 'WP_Import' ) ) { $class_wp_import = $plug_dir . '/includes/importer/wordpress-importer.php'; if ( file_exists( $class_wp_import ) ) require $class_wp_import; } } public function itr_main_wp_options() { /* setting menu -------------------- */ $main_menu = get_term_by('name', esc_html__( 'Main Menu', 'munza' ), 'nav_menu'); $one_page = get_term_by('name', esc_html__( 'One Page Menu', 'munza' ), 'nav_menu'); $top_menu = get_term_by('name', esc_html__( 'Top Bar Menu', 'munza' ), 'nav_menu'); $locations = array( 'main-menu' => $main_menu->term_id, 'one-page' => $one_page->term_id, 'top-bar-menu' => $top_menu->term_id, ); set_theme_mod( 'nav_menu_locations', $locations ); /* setting custom menu fields -------------------------------- */ $menu_items = wp_get_nav_menu_items( 'main-menu' ); if ( ! empty( $menu_items ) ) { if ( ! empty( $menu_fields ) ) { foreach ( $menu_items as $menu_key => $menu_item ) { foreach ( $menu_fields as $field_key => $field_data ) { if ( $field_key == $menu_item->title ) { foreach ( $field_data as $key => $value ) { update_post_meta( $menu_item->ID, '_menu_item_' . $key, $value ); } } } } } } /* setting home-page ---------------------- */ update_option( 'show_on_front', 'page' ); update_option( 'page_on_front', itr_get_ID_by_slug( 'home' ) ); update_option( 'page_for_posts', itr_get_ID_by_slug( 'blog' ) ); } public function itr_import_theme_opts() { $itr_opts_file = ITR_FRAMEWORK_PLUGIN_URI . '/importer/content/theme_options.txt'; $data = wp_remote_get( $itr_opts_file ); $options = unserialize( $data['body'] ); if ( !empty( $data ) || is_array( $data ) ) { foreach ( $options as $option ) { update_option( $option->option_name, unserialize( $option->option_value ) ); } } } public function itr_import_grids() { if ( class_exists( 'raysgrid_globals' ) ) { $itr_grid_file = ITR_FRAMEWORK_PLUGIN_URI . '/importer/content/rays_grid.json'; $response = wp_remote_get( $itr_grid_file ); $body = wp_remote_retrieve_body($response); $port_data = json_decode( $body, true ); $itemArray = array(); global $wpdb, $table_prefix; $itr_settings_tbl = $table_prefix . 'raysgrid_setting'; $gridSetting = $wpdb->get_results( " SELECT * FROM {$itr_settings_tbl} " ); $grst_Alias = array(); foreach ($gridSetting as $rg_alias) { $grst_Alias[] = $rg_alias->alias; } $grst_Alias2 = implode(" ", $grst_Alias); foreach ($port_data as $row) { if (strpos($grst_Alias2, $row['alias']) !== false) { $getAlias = $wpdb->get_row( "SELECT * FROM {$itr_settings_tbl} WHERE alias=%s ", $row['alias'] ); $settingData = $itemArray; $where = array('id' => $getAlias->id); $wpdb->update($itr_settings_tbl, $settingData, $where); } else { unset($row['oldalias']); $wpdb->insert($itr_settings_tbl, $row); } } } } public function itr_import_sliders(){ $plug_dir = trailingslashit( ABSPATH ) . 'wp-content/plugins/munza-core'; if (class_exists('RevSlider')) { $rvfile = $plug_dir . '/assets/sliders/'; $rev_files = array( $rvfile.'home-1-slider.zip', $rvfile.'home-2-slider.zip', $rvfile.'home-3-slider.zip', ); foreach ($rev_files as $rev_file) { $_FILES['import_file']['tmp_name'] = $rev_file; $slider = new RevSlider(); $slider->importSliderFromPost(true, 'none'); } } } public function itr_widgets_func() { register_sidebar(array( 'name' => 'Secondary SideBar', 'id' => 'sidebar-2', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', )); register_sidebar( array( 'name' => 'Middle Footer Widgets', 'id' => 'midle-footer-widgets', 'before_widget' => '
    ', 'after_widget' => '
    ', 'description' => 'Appears in the middle footer area', 'before_title' => '

    ', 'after_title' => '

    ' )); register_sidebar( array( 'name' => 'Footer Bottom Widgets', 'id' => 'footer-bottom-widgets', 'before_widget' => '
    ', 'after_widget' => '
    ', 'description' => 'Appears in the footer bottom bar', 'before_title' => '

    ', 'after_title' => '

    ' )); // Add data to widgets $widgets_file = ITR_FRAMEWORK_PLUGIN_URI . '/importer/content/widgets.json'; $widgets_json = wp_remote_get( $widgets_file ); $widget_data = $widgets_json['body']; $this->itr_import_widget_data( $widget_data ); die(); } public function itr_import_widget_data( $widget_data ) { $json_data = json_decode( $widget_data, true ); $sidebar_data = $json_data[0]; $widget_data = $json_data[1]; foreach ( $widget_data as $widget_data_title => $widget_data_value ) { $widgets[ $widget_data_title ] = array(); foreach ( $widget_data_value as $widget_data_key => $widget_data_array ) { if ( is_int( $widget_data_key ) ) { $widgets[ $widget_data_title ][ $widget_data_key ] = 'on'; } } } unset( $widgets[''] ); foreach ( $sidebar_data as $title => $sidebar ) { $count = count( $sidebar ); for ( $i = 0; $i < $count; $i++ ) { $widget = array(); $widget['type'] = trim( substr( $sidebar[ $i ], 0, strrpos( $sidebar[ $i ], '-' ) ) ); $widget['type-index'] = trim( substr( $sidebar[ $i ], strrpos( $sidebar[ $i ], '-' ) + 1 ) ); if ( ! isset( $widgets[ $widget['type'] ][ $widget['type-index'] ] ) ) { unset( $sidebar_data[ $title ][ $i ] ); } } $sidebar_data[ $title ] = array_values( $sidebar_data[ $title ] ); } foreach ( $widgets as $widget_title => $widget_value ) { foreach ( $widget_value as $widget_key => $widget_value ) { $widgets[ $widget_title ][ $widget_key ] = $widget_data[ $widget_title ][ $widget_key ]; } } $sidebar_data = array( array_filter( $sidebar_data ), $widgets ); $this->itr_parse_import_data( $sidebar_data ); } public function itr_parse_import_data( $import_array ) { global $wp_registered_sidebars; $sidebars_data = $import_array[0]; $widget_data = $import_array[1]; $current_sidebars = get_option( 'sidebars_widgets' ); $new_widgets = array(); foreach ( $sidebars_data as $import_sidebar => $import_widgets ) { foreach ( $import_widgets as $import_widget ) { // If the sidebar exists. if ( isset( $wp_registered_sidebars[ $import_sidebar ] ) ) { $title = trim( substr( $import_widget, 0, strrpos( $import_widget, '-' ) ) ); $index = trim( substr( $import_widget, strrpos( $import_widget, '-' ) + 1 ) ); $current_widget_data = get_option( 'widget_' . $title ); $new_widget_name = $this->itr_get_new_widget_name( $title, $index ); $new_index = trim( substr( $new_widget_name, strrpos( $new_widget_name, '-' ) + 1 ) ); if ( ! empty( $new_widgets[ $title ] ) && is_array( $new_widgets[ $title ] ) ) { while ( array_key_exists( $new_index, $new_widgets[ $title ] ) ) { $new_index++; } } $current_sidebars[ $import_sidebar ][] = $title . '-' . $new_index; if ( array_key_exists( $title, $new_widgets ) ) { if ( 'nav_menu' == $title & ! is_numeric( $index ) ) { $menu = wp_get_nav_menu_object( $index ); $menu_id = $menu->term_id; $new_widgets[ $title ][ $new_index ] = $menu_id; } else { $new_widgets[ $title ][ $new_index ] = $widget_data[ $title ][ $index ]; } $multiwidget = $new_widgets[ $title ]['_multiwidget']; unset( $new_widgets[ $title ]['_multiwidget'] ); $new_widgets[ $title ]['_multiwidget'] = $multiwidget; } else { if ( 'nav_menu' == $title & ! is_numeric( $index ) ) { $menu = wp_get_nav_menu_object( $index ); $menu_id = $menu->term_id; $current_widget_data[ $new_index ] = $menu_id; } else { $current_widget_data[ $new_index ] = $widget_data[ $title ][ $index ]; } $current_multiwidget = isset( $current_widget_data['_multiwidget'] ) ? $current_widget_data['_multiwidget'] : false; $new_multiwidget = isset( $widget_data[ $title ]['_multiwidget'] ) ? $widget_data[ $title ]['_multiwidget'] : false; $multiwidget = ( $current_multiwidget != $new_multiwidget ) ? $current_multiwidget : 1; unset( $current_widget_data['_multiwidget'] ); $current_widget_data['_multiwidget'] = $multiwidget; $new_widgets[ $title ] = $current_widget_data; } } // End if(). } // End foreach(). } // End foreach(). if ( isset( $new_widgets ) && isset( $current_sidebars ) ) { update_option( 'sidebars_widgets', $current_sidebars ); foreach ( $new_widgets as $title => $content ) { update_option( 'widget_' . $title, $content ); } return true; } return false; } public function itr_get_new_widget_name( $widget_name, $widget_index ) { $current_sidebars = get_option( 'sidebars_widgets' ); $all_widget_array = array(); foreach ( $current_sidebars as $sidebar => $widgets ) { if ( ! empty( $widgets ) && is_array( $widgets ) && 'wp_inactive_widgets' != $sidebar ) { foreach ( $widgets as $widget ) { $all_widget_array[] = $widget; } } } while ( in_array( $widget_name . '-' . $widget_index, $all_widget_array ) ) { $widget_index++; } $new_widget_name = $widget_name . '-' . $widget_index; return $new_widget_name; } public function itr_import_conent() { $import_filepath = ITR_FRAMEWORK_PLUGIN_DIR . '/importer/content/content.xml'; $attachment = ( ! empty( $_POST['attachment'] ) ) ? true : false; $itr_wp_import = new WP_Import(); $itr_wp_import->fetch_attachments = $attachment; $itr_wp_import->import( $import_filepath ); $this->itr_main_wp_options(); } public function itr_import_demo_files() { wp_delete_nav_menu( 'main-menu' ); $this->itr_check_import(); // Import theme options... $this->itr_import_theme_opts(); //Import Content... $this->itr_import_conent(); //Import Portfolio Grids... $this->itr_import_grids(); //Import Sliders... $this->itr_import_sliders(); //Add sidebar widget areas $this->itr_widgets_func(); } } new itr_demo_Importer(); if ( ! defined( 'ABSPATH' ) ) { die( '-1' ); } /** * Class WPBakeryShortCode_Vc_Progress_Bar */ class WPBakeryShortCode_Vc_Progress_Bar extends WPBakeryShortCode { /** * @param $atts * @return mixed */ public static function convertAttributesToNewProgressBar( $atts ) { if ( isset( $atts['values'] ) && strlen( $atts['values'] ) > 0 ) { $values = vc_param_group_parse_atts( $atts['values'] ); if ( ! is_array( $values ) ) { $temp = explode( ',', $atts['values'] ); $paramValues = array(); foreach ( $temp as $value ) { $data = explode( '|', $value ); $colorIndex = 2; $newLine = array(); $newLine['value'] = isset( $data[0] ) ? $data[0] : 0; $newLine['label'] = isset( $data[1] ) ? $data[1] : ''; if ( isset( $data[1] ) && preg_match( '/^\d{1,3}\%$/', $data[1] ) ) { $colorIndex ++; $newLine['value'] = (float) str_replace( '%', '', $data[1] ); $newLine['label'] = isset( $data[2] ) ? $data[2] : ''; } if ( isset( $data[ $colorIndex ] ) ) { $newLine['customcolor'] = $data[ $colorIndex ]; } $paramValues[] = $newLine; } $atts['values'] = rawurlencode( wp_json_encode( $paramValues ) ); } } return $atts; } }