Archived
Updates
This commit is contained in:
1 parent
70d2335bba
commit
7428b67da5
1086 files changed
+94145
-59082
No files matched your search
@@ -3,6 +3,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// getid3.lib.php - part of getID3() //
|
||||
@@ -282,7 +283,6 @@ class getid3_lib
|
||||
}
|
||||
} else {
|
||||
throw new Exception('ERROR: Cannot have signed integers larger than '.(8 * PHP_INT_SIZE).'-bits ('.strlen($byteword).') in self::BigEndian2Int()');
|
||||
break;
|
||||
}
|
||||
}
|
||||
return self::CastAsInt($intvalue);
|
||||
@@ -635,7 +635,7 @@ class getid3_lib
|
||||
}
|
||||
if (is_readable($filename_source) && is_file($filename_source) && ($fp_src = fopen($filename_source, 'rb'))) {
|
||||
if (($fp_dest = fopen($filename_dest, 'wb'))) {
|
||||
if (fseek($fp_src, $offset, SEEK_SET) == 0) {
|
||||
if (fseek($fp_src, $offset) == 0) {
|
||||
$byteslefttowrite = $length;
|
||||
while (($byteslefttowrite > 0) && ($buffer = fread($fp_src, min($byteslefttowrite, getID3::FREAD_BUFFER_SIZE)))) {
|
||||
$byteswritten = fwrite($fp_dest, $buffer, $byteslefttowrite);
|
||||
@@ -986,6 +986,19 @@ class getid3_lib
|
||||
throw new Exception('PHP does not have iconv() support - cannot convert from '.$in_charset.' to '.$out_charset);
|
||||
}
|
||||
|
||||
public static function recursiveMultiByteCharString2HTML($data, $charset='ISO-8859-1') {
|
||||
if (is_string($data)) {
|
||||
return self::MultiByteCharString2HTML($data, $charset);
|
||||
} elseif (is_array($data)) {
|
||||
$return_data = array();
|
||||
foreach ($data as $key => $value) {
|
||||
$return_data[$key] = self::recursiveMultiByteCharString2HTML($value, $charset);
|
||||
}
|
||||
return $return_data;
|
||||
}
|
||||
// integer, float, objects, resources, etc
|
||||
return $data;
|
||||
}
|
||||
|
||||
public static function MultiByteCharString2HTML($string, $charset='ISO-8859-1') {
|
||||
$string = (string) $string; // in case trying to pass a numeric (float, int) string, would otherwise return an empty string
|
||||
@@ -1210,16 +1223,21 @@ class getid3_lib
|
||||
$newvaluelength = strlen(trim($value));
|
||||
foreach ($ThisFileInfo['comments'][$tagname] as $existingkey => $existingvalue) {
|
||||
$oldvaluelength = strlen(trim($existingvalue));
|
||||
if (($newvaluelength > $oldvaluelength) && (substr(trim($value), 0, strlen($existingvalue)) == $existingvalue)) {
|
||||
if ((strlen($existingvalue) > 10) && ($newvaluelength > $oldvaluelength) && (substr(trim($value), 0, strlen($existingvalue)) == $existingvalue)) {
|
||||
$ThisFileInfo['comments'][$tagname][$existingkey] = trim($value);
|
||||
break 2;
|
||||
//break 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (is_array($value) || empty($ThisFileInfo['comments'][$tagname]) || !in_array(trim($value), $ThisFileInfo['comments'][$tagname])) {
|
||||
$value = (is_string($value) ? trim($value) : $value);
|
||||
$ThisFileInfo['comments'][$tagname][] = $value;
|
||||
if (!is_numeric($key)) {
|
||||
$ThisFileInfo['comments'][$tagname][$key] = $value;
|
||||
} else {
|
||||
$ThisFileInfo['comments'][$tagname][] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1227,20 +1245,23 @@ class getid3_lib
|
||||
}
|
||||
|
||||
// Copy to ['comments_html']
|
||||
foreach ($ThisFileInfo['comments'] as $field => $values) {
|
||||
if ($field == 'picture') {
|
||||
// pictures can take up a lot of space, and we don't need multiple copies of them
|
||||
// let there be a single copy in [comments][picture], and not elsewhere
|
||||
continue;
|
||||
}
|
||||
foreach ($values as $index => $value) {
|
||||
if (is_array($value)) {
|
||||
$ThisFileInfo['comments_html'][$field][$index] = $value;
|
||||
} else {
|
||||
$ThisFileInfo['comments_html'][$field][$index] = str_replace('�', '', self::MultiByteCharString2HTML($value, $ThisFileInfo['encoding']));
|
||||
if (!empty($ThisFileInfo['comments'])) {
|
||||
foreach ($ThisFileInfo['comments'] as $field => $values) {
|
||||
if ($field == 'picture') {
|
||||
// pictures can take up a lot of space, and we don't need multiple copies of them
|
||||
// let there be a single copy in [comments][picture], and not elsewhere
|
||||
continue;
|
||||
}
|
||||
foreach ($values as $index => $value) {
|
||||
if (is_array($value)) {
|
||||
$ThisFileInfo['comments_html'][$field][$index] = $value;
|
||||
} else {
|
||||
$ThisFileInfo['comments_html'][$field][$index] = str_replace('�', '', self::MultiByteCharString2HTML($value, $ThisFileInfo['encoding']));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1339,4 +1360,17 @@ class getid3_lib
|
||||
}
|
||||
return $filesize;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Workaround for Bug #37268 (https://bugs.php.net/bug.php?id=37268)
|
||||
* @param string $path A path.
|
||||
* @param string $suffix If the name component ends in suffix this will also be cut off.
|
||||
* @return string
|
||||
*/
|
||||
public static function mb_basename($path, $suffix = null) {
|
||||
$splited = preg_split('#/#', rtrim($path, '/ '));
|
||||
return substr(basename('X'.$splited[count($splited) - 1], $suffix), 1);
|
||||
}
|
||||
|
||||
}
|
||||
+67
-47
@@ -3,6 +3,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Please see readme.txt for more information //
|
||||
@@ -17,18 +18,21 @@ if (!defined('GETID3_OS_ISWINDOWS')) {
|
||||
if (!defined('GETID3_INCLUDEPATH')) {
|
||||
define('GETID3_INCLUDEPATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
|
||||
}
|
||||
// Workaround Bug #39923 (https://bugs.php.net/bug.php?id=39923)
|
||||
if (!defined('IMG_JPG') && defined('IMAGETYPE_JPEG')) {
|
||||
define('IMG_JPG', IMAGETYPE_JPEG);
|
||||
}
|
||||
|
||||
// attempt to define temp dir as something flexible but reliable
|
||||
$temp_dir = ini_get('upload_tmp_dir');
|
||||
if ($temp_dir && (!is_dir($temp_dir) || !is_readable($temp_dir))) {
|
||||
$temp_dir = '';
|
||||
}
|
||||
if (!$temp_dir && function_exists('sys_get_temp_dir')) {
|
||||
// PHP v5.2.1+
|
||||
if (!$temp_dir) {
|
||||
// sys_get_temp_dir() may give inaccessible temp dir, e.g. with open_basedir on virtual hosts
|
||||
$temp_dir = sys_get_temp_dir();
|
||||
}
|
||||
$temp_dir = realpath($temp_dir);
|
||||
$temp_dir = @realpath($temp_dir); // see https://github.com/JamesHeinrich/getID3/pull/10
|
||||
$open_basedir = ini_get('open_basedir');
|
||||
if ($open_basedir) {
|
||||
// e.g. "/var/www/vhosts/getid3.org/httpdocs/:/tmp/"
|
||||
@@ -57,7 +61,9 @@ if (!$temp_dir) {
|
||||
$temp_dir = '*'; // invalid directory name should force tempnam() to use system default temp dir
|
||||
}
|
||||
// $temp_dir = '/something/else/'; // feel free to override temp dir here if it works better for your system
|
||||
define('GETID3_TEMP_DIR', $temp_dir);
|
||||
if (!defined('GETID3_TEMP_DIR')) {
|
||||
define('GETID3_TEMP_DIR', $temp_dir);
|
||||
}
|
||||
unset($open_basedir, $temp_dir);
|
||||
|
||||
// End: Defines
|
||||
@@ -97,13 +103,13 @@ class getID3
|
||||
public $fp; // Filepointer to file being analysed.
|
||||
public $info; // Result array.
|
||||
public $tempdir = GETID3_TEMP_DIR;
|
||||
public $memory_limit = 0;
|
||||
|
||||
// Protected variables
|
||||
protected $startup_error = '';
|
||||
protected $startup_warning = '';
|
||||
protected $memory_limit = 0;
|
||||
|
||||
const VERSION = '1.9.7-20130705';
|
||||
const VERSION = '1.9.8-20140511';
|
||||
const FREAD_BUFFER_SIZE = 32768;
|
||||
|
||||
const ATTACHMENTS_NONE = false;
|
||||
@@ -112,13 +118,6 @@ class getID3
|
||||
// public: constructor
|
||||
public function __construct() {
|
||||
|
||||
// Check for PHP version
|
||||
$required_php_version = '5.0.5';
|
||||
if (version_compare(PHP_VERSION, $required_php_version, '<')) {
|
||||
$this->startup_error .= 'getID3() requires PHP v'.$required_php_version.' or higher - you are running v'.PHP_VERSION;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check memory
|
||||
$this->memory_limit = ini_get('memory_limit');
|
||||
if (preg_match('#([0-9]+)M#i', $this->memory_limit, $matches)) {
|
||||
@@ -261,16 +260,32 @@ class getID3
|
||||
$filename = preg_replace('#(.+)'.preg_quote(DIRECTORY_SEPARATOR).'{2,}#U', '\1'.DIRECTORY_SEPARATOR, $filename);
|
||||
|
||||
// open local file
|
||||
if (is_readable($filename) && is_file($filename) && ($this->fp = fopen($filename, 'rb'))) {
|
||||
//if (is_readable($filename) && is_file($filename) && ($this->fp = fopen($filename, 'rb'))) { // see http://www.getid3.org/phpBB3/viewtopic.php?t=1720
|
||||
if ((is_readable($filename) || file_exists($filename)) && is_file($filename) && ($this->fp = fopen($filename, 'rb'))) {
|
||||
// great
|
||||
} else {
|
||||
throw new getid3_exception('Could not open "'.$filename.'" (does not exist, or is not a file)');
|
||||
$errormessagelist = array();
|
||||
if (!is_readable($filename)) {
|
||||
$errormessagelist[] = '!is_readable';
|
||||
}
|
||||
if (!is_file($filename)) {
|
||||
$errormessagelist[] = '!is_file';
|
||||
}
|
||||
if (!file_exists($filename)) {
|
||||
$errormessagelist[] = '!file_exists';
|
||||
}
|
||||
if (empty($errormessagelist)) {
|
||||
$errormessagelist[] = 'fopen failed';
|
||||
}
|
||||
throw new getid3_exception('Could not open "'.$filename.'" ('.implode('; ', $errormessagelist).')');
|
||||
}
|
||||
|
||||
$this->info['filesize'] = filesize($filename);
|
||||
// set redundant parameters - might be needed in some include file
|
||||
$this->info['filename'] = basename($filename);
|
||||
// filenames / filepaths in getID3 are always expressed with forward slashes (unix-style) for both Windows and other to try and minimize confusion
|
||||
$filename = str_replace('\\', '/', $filename);
|
||||
$this->info['filepath'] = str_replace('\\', '/', realpath(dirname($filename)));
|
||||
$this->info['filename'] = getid3_lib::mb_basename($filename);
|
||||
$this->info['filenamepath'] = $this->info['filepath'].'/'.$this->info['filename'];
|
||||
|
||||
|
||||
@@ -352,7 +367,7 @@ class getID3
|
||||
|
||||
// ID3v2 detection (NOT parsing), even if ($this->option_tag_id3v2 == false) done to make fileformat easier
|
||||
if (!$this->option_tag_id3v2) {
|
||||
fseek($this->fp, 0, SEEK_SET);
|
||||
fseek($this->fp, 0);
|
||||
$header = fread($this->fp, 10);
|
||||
if ((substr($header, 0, 3) == 'ID3') && (strlen($header) == 10)) {
|
||||
$this->info['id3v2']['header'] = true;
|
||||
@@ -363,7 +378,7 @@ class getID3
|
||||
}
|
||||
|
||||
// read 32 kb file data
|
||||
fseek($this->fp, $this->info['avdataoffset'], SEEK_SET);
|
||||
fseek($this->fp, $this->info['avdataoffset']);
|
||||
$formattest = fread($this->fp, 32774);
|
||||
|
||||
// determine format
|
||||
@@ -588,6 +603,14 @@ class getID3
|
||||
'mime_type' => 'audio/basic',
|
||||
),
|
||||
|
||||
// AMR - audio - Adaptive Multi Rate
|
||||
'amr' => array(
|
||||
'pattern' => '^\x23\x21AMR\x0A', // #!AMR[0A]
|
||||
'group' => 'audio',
|
||||
'module' => 'amr',
|
||||
'mime_type' => 'audio/amr',
|
||||
),
|
||||
|
||||
// AVR - audio - Audio Visual Research
|
||||
'avr' => array(
|
||||
'pattern' => '^2BIT',
|
||||
@@ -1161,6 +1184,7 @@ class getID3
|
||||
'matroska' => array('matroska' , 'UTF-8'),
|
||||
'flac' => array('vorbiscomment' , 'UTF-8'),
|
||||
'divxtag' => array('divx' , 'ISO-8859-1'),
|
||||
'iptc' => array('iptc' , 'ISO-8859-1'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1181,7 +1205,11 @@ class getID3
|
||||
$value = trim($value, " \r\n\t"); // do not trim nulls from $value!! Unicode characters will get mangled if trailing nulls are removed!
|
||||
}
|
||||
if ($value) {
|
||||
$this->info['tags'][trim($tag_name)][trim($tag_key)][] = $value;
|
||||
if (!is_numeric($key)) {
|
||||
$this->info['tags'][trim($tag_name)][trim($tag_key)][$key] = $value;
|
||||
} else {
|
||||
$this->info['tags'][trim($tag_name)][trim($tag_key)][] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($tag_key == 'picture') {
|
||||
@@ -1196,14 +1224,7 @@ class getID3
|
||||
|
||||
if ($this->option_tags_html) {
|
||||
foreach ($this->info['tags'][$tag_name] as $tag_key => $valuearray) {
|
||||
foreach ($valuearray as $key => $value) {
|
||||
if (is_string($value)) {
|
||||
//$this->info['tags_html'][$tag_name][$tag_key][$key] = getid3_lib::MultiByteCharString2HTML($value, $encoding);
|
||||
$this->info['tags_html'][$tag_name][$tag_key][$key] = str_replace('�', '', trim(getid3_lib::MultiByteCharString2HTML($value, $encoding)));
|
||||
} else {
|
||||
$this->info['tags_html'][$tag_name][$tag_key][$key] = $value;
|
||||
}
|
||||
}
|
||||
$this->info['tags_html'][$tag_name][$tag_key] = getid3_lib::recursiveMultiByteCharString2HTML($valuearray, $encoding);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1259,7 +1280,6 @@ class getID3
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public function getHashdata($algorithm) {
|
||||
switch ($algorithm) {
|
||||
case 'md5':
|
||||
@@ -1565,8 +1585,11 @@ class getID3
|
||||
}
|
||||
|
||||
|
||||
abstract class getid3_handler
|
||||
{
|
||||
abstract class getid3_handler {
|
||||
|
||||
/**
|
||||
* @var getID3
|
||||
*/
|
||||
protected $getid3; // pointer
|
||||
|
||||
protected $data_string_flag = false; // analyzing filepointer or string
|
||||
@@ -1593,7 +1616,7 @@ abstract class getid3_handler
|
||||
// Analyze from string instead
|
||||
public function AnalyzeString($string) {
|
||||
// Enter string mode
|
||||
$this->setStringMode($string);
|
||||
$this->setStringMode($string);
|
||||
|
||||
// Save info
|
||||
$saved_avdataoffset = $this->getid3->info['avdataoffset'];
|
||||
@@ -1634,10 +1657,10 @@ abstract class getid3_handler
|
||||
$this->data_string_position += $bytes;
|
||||
return substr($this->data_string, $this->data_string_position - $bytes, $bytes);
|
||||
}
|
||||
$pos = $this->ftell() + $bytes;
|
||||
if (!getid3_lib::intValueSupported($pos)) {
|
||||
$pos = $this->ftell() + $bytes;
|
||||
if (!getid3_lib::intValueSupported($pos)) {
|
||||
throw new getid3_exception('cannot fread('.$bytes.' from '.$this->ftell().') because beyond PHP filesystem limit', 10);
|
||||
}
|
||||
}
|
||||
return fread($this->getid3->fp, $bytes);
|
||||
}
|
||||
|
||||
@@ -1657,14 +1680,14 @@ abstract class getid3_handler
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
$pos = $bytes;
|
||||
if ($whence == SEEK_CUR) {
|
||||
} else {
|
||||
$pos = $bytes;
|
||||
if ($whence == SEEK_CUR) {
|
||||
$pos = $this->ftell() + $bytes;
|
||||
} elseif ($whence == SEEK_END) {
|
||||
$pos = $this->info['filesize'] + $bytes;
|
||||
}
|
||||
if (!getid3_lib::intValueSupported($pos)) {
|
||||
} elseif ($whence == SEEK_END) {
|
||||
$pos = $this->getid3->info['filesize'] + $bytes;
|
||||
}
|
||||
if (!getid3_lib::intValueSupported($pos)) {
|
||||
throw new getid3_exception('cannot fseek('.$pos.') because beyond PHP filesystem limit', 10);
|
||||
}
|
||||
}
|
||||
@@ -1682,20 +1705,17 @@ abstract class getid3_handler
|
||||
return $this->dependency_to == $module;
|
||||
}
|
||||
|
||||
protected function error($text)
|
||||
{
|
||||
protected function error($text) {
|
||||
$this->getid3->info['error'][] = $text;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function warning($text)
|
||||
{
|
||||
protected function warning($text) {
|
||||
return $this->getid3->warning($text);
|
||||
}
|
||||
|
||||
protected function notice($text)
|
||||
{
|
||||
protected function notice($text) {
|
||||
// does nothing for now
|
||||
}
|
||||
|
||||
|
||||
@@ -24,4 +24,4 @@ made publicly available to all getID3() users.
|
||||
The licensee may not sub-license getID3() itself, meaning that any
|
||||
commercially released product containing all or parts of getID3() must
|
||||
have added functionality beyond what is available in getID3();
|
||||
getID3() itself may not be re-licensed by the licensee.
|
||||
getID3() itself may not be re-licensed by the licensee.
|
||||
@@ -2,6 +2,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
*****************************************************************
|
||||
@@ -25,4 +26,4 @@ getID3 Commercial License: http://getid3.org/#gCL (payment required)
|
||||
*****************************************************************
|
||||
|
||||
Copies of each of the above licenses are included in the 'licenses'
|
||||
directory of the getID3 distribution.
|
||||
directory of the getID3 distribution.
|
||||
@@ -3,6 +3,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// See readme.txt for more details //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -15,8 +16,7 @@
|
||||
|
||||
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, true);
|
||||
|
||||
class getid3_asf extends getid3_handler
|
||||
{
|
||||
class getid3_asf extends getid3_handler {
|
||||
|
||||
public function __construct(getID3 $getid3) {
|
||||
parent::__construct($getid3); // extends getid3_handler::__construct()
|
||||
@@ -66,25 +66,22 @@ class getid3_asf extends getid3_handler
|
||||
|
||||
$info['fileformat'] = 'asf';
|
||||
|
||||
fseek($this->getid3->fp, $info['avdataoffset'], SEEK_SET);
|
||||
$HeaderObjectData = fread($this->getid3->fp, 30);
|
||||
$this->fseek($info['avdataoffset']);
|
||||
$HeaderObjectData = $this->fread(30);
|
||||
|
||||
$thisfile_asf_headerobject['objectid'] = substr($HeaderObjectData, 0, 16);
|
||||
$thisfile_asf_headerobject['objectid_guid'] = $this->BytestringToGUID($thisfile_asf_headerobject['objectid']);
|
||||
if ($thisfile_asf_headerobject['objectid'] != GETID3_ASF_Header_Object) {
|
||||
$info['warning'][] = 'ASF header GUID {'.$this->BytestringToGUID($thisfile_asf_headerobject['objectid']).'} does not match expected "GETID3_ASF_Header_Object" GUID {'.$this->BytestringToGUID(GETID3_ASF_Header_Object).'}';
|
||||
unset($info['fileformat']);
|
||||
unset($info['asf']);
|
||||
return false;
|
||||
break;
|
||||
unset($info['fileformat'], $info['asf']);
|
||||
return $this->error('ASF header GUID {'.$this->BytestringToGUID($thisfile_asf_headerobject['objectid']).'} does not match expected "GETID3_ASF_Header_Object" GUID {'.$this->BytestringToGUID(GETID3_ASF_Header_Object).'}');
|
||||
}
|
||||
$thisfile_asf_headerobject['objectsize'] = getid3_lib::LittleEndian2Int(substr($HeaderObjectData, 16, 8));
|
||||
$thisfile_asf_headerobject['headerobjects'] = getid3_lib::LittleEndian2Int(substr($HeaderObjectData, 24, 4));
|
||||
$thisfile_asf_headerobject['reserved1'] = getid3_lib::LittleEndian2Int(substr($HeaderObjectData, 28, 1));
|
||||
$thisfile_asf_headerobject['reserved2'] = getid3_lib::LittleEndian2Int(substr($HeaderObjectData, 29, 1));
|
||||
|
||||
$NextObjectOffset = ftell($this->getid3->fp);
|
||||
$ASFHeaderData = fread($this->getid3->fp, $thisfile_asf_headerobject['objectsize'] - 30);
|
||||
$NextObjectOffset = $this->ftell();
|
||||
$ASFHeaderData = $this->fread($thisfile_asf_headerobject['objectsize'] - 30);
|
||||
$offset = 0;
|
||||
|
||||
for ($HeaderObjectsCounter = 0; $HeaderObjectsCounter < $thisfile_asf_headerobject['headerobjects']; $HeaderObjectsCounter++) {
|
||||
@@ -284,7 +281,7 @@ class getid3_asf extends getid3_handler
|
||||
$offset += 4;
|
||||
$thisfile_asf_headerextensionobject['extension_data'] = substr($ASFHeaderData, $offset, $thisfile_asf_headerextensionobject['extension_data_size']);
|
||||
$unhandled_sections = 0;
|
||||
$thisfile_asf_headerextensionobject['extension_data_parsed'] = $this->ASF_HeaderExtensionObjectDataParse($thisfile_asf_headerextensionobject['extension_data'], $unhandled_sections);
|
||||
$thisfile_asf_headerextensionobject['extension_data_parsed'] = $this->HeaderExtensionObjectDataParse($thisfile_asf_headerextensionobject['extension_data'], $unhandled_sections);
|
||||
if ($unhandled_sections === 0) {
|
||||
unset($thisfile_asf_headerextensionobject['extension_data']);
|
||||
}
|
||||
@@ -332,7 +329,7 @@ class getid3_asf extends getid3_handler
|
||||
|
||||
$thisfile_asf_codeclistobject_codecentries_current['type_raw'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
|
||||
$offset += 2;
|
||||
$thisfile_asf_codeclistobject_codecentries_current['type'] = $this->ASFCodecListObjectTypeLookup($thisfile_asf_codeclistobject_codecentries_current['type_raw']);
|
||||
$thisfile_asf_codeclistobject_codecentries_current['type'] = self::codecListObjectTypeLookup($thisfile_asf_codeclistobject_codecentries_current['type_raw']);
|
||||
|
||||
$CodecNameLength = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2)) * 2; // 2 bytes per character
|
||||
$offset += 2;
|
||||
@@ -826,22 +823,14 @@ class getid3_asf extends getid3_handler
|
||||
break;
|
||||
|
||||
case 'id3':
|
||||
// id3v2 module might not be loaded
|
||||
if (class_exists('getid3_id3v2')) {
|
||||
$tempfile = tempnam(GETID3_TEMP_DIR, 'getID3');
|
||||
$tempfilehandle = fopen($tempfile, 'wb');
|
||||
$tempThisfileInfo = array('encoding'=>$info['encoding']);
|
||||
fwrite($tempfilehandle, $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
|
||||
fclose($tempfilehandle);
|
||||
$this->getid3->include_module('tag.id3v2');
|
||||
|
||||
$getid3_temp = new getID3();
|
||||
$getid3_temp->openfile($tempfile);
|
||||
$getid3_id3v2 = new getid3_id3v2($getid3_temp);
|
||||
$getid3_id3v2->Analyze();
|
||||
$info['id3v2'] = $getid3_temp->info['id3v2'];
|
||||
unset($getid3_temp, $getid3_id3v2);
|
||||
$getid3_id3v2 = new getid3_id3v2($this->getid3);
|
||||
$getid3_id3v2->AnalyzeString($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
|
||||
unset($getid3_id3v2);
|
||||
|
||||
unlink($tempfile);
|
||||
if ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length'] > 1024) {
|
||||
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'] = '<value too large to display>';
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -860,7 +849,7 @@ class getid3_asf extends getid3_handler
|
||||
$wm_picture_offset = 0;
|
||||
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type_id'] = getid3_lib::LittleEndian2Int(substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 1));
|
||||
$wm_picture_offset += 1;
|
||||
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type'] = $this->WMpictureTypeLookup($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type_id']);
|
||||
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type'] = self::WMpictureTypeLookup($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type_id']);
|
||||
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_size'] = getid3_lib::LittleEndian2Int(substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 4));
|
||||
$wm_picture_offset += 4;
|
||||
|
||||
@@ -1156,8 +1145,8 @@ class getid3_asf extends getid3_handler
|
||||
}
|
||||
}
|
||||
|
||||
while (ftell($this->getid3->fp) < $info['avdataend']) {
|
||||
$NextObjectDataHeader = fread($this->getid3->fp, 24);
|
||||
while ($this->ftell() < $info['avdataend']) {
|
||||
$NextObjectDataHeader = $this->fread(24);
|
||||
$offset = 0;
|
||||
$NextObjectGUID = substr($NextObjectDataHeader, 0, 16);
|
||||
$offset += 16;
|
||||
@@ -1179,7 +1168,7 @@ class getid3_asf extends getid3_handler
|
||||
$thisfile_asf['data_object'] = array();
|
||||
$thisfile_asf_dataobject = &$thisfile_asf['data_object'];
|
||||
|
||||
$DataObjectData = $NextObjectDataHeader.fread($this->getid3->fp, 50 - 24);
|
||||
$DataObjectData = $NextObjectDataHeader.$this->fread(50 - 24);
|
||||
$offset = 24;
|
||||
|
||||
$thisfile_asf_dataobject['objectid'] = $NextObjectGUID;
|
||||
@@ -1207,9 +1196,9 @@ class getid3_asf extends getid3_handler
|
||||
// * * Error Correction Present bits 1 // If set, use Opaque Data Packet structure, else use Payload structure
|
||||
// * Error Correction Data
|
||||
|
||||
$info['avdataoffset'] = ftell($this->getid3->fp);
|
||||
fseek($this->getid3->fp, ($thisfile_asf_dataobject['objectsize'] - 50), SEEK_CUR); // skip actual audio/video data
|
||||
$info['avdataend'] = ftell($this->getid3->fp);
|
||||
$info['avdataoffset'] = $this->ftell();
|
||||
$this->fseek(($thisfile_asf_dataobject['objectsize'] - 50), SEEK_CUR); // skip actual audio/video data
|
||||
$info['avdataend'] = $this->ftell();
|
||||
break;
|
||||
|
||||
case GETID3_ASF_Simple_Index_Object:
|
||||
@@ -1229,7 +1218,7 @@ class getid3_asf extends getid3_handler
|
||||
$thisfile_asf['simple_index_object'] = array();
|
||||
$thisfile_asf_simpleindexobject = &$thisfile_asf['simple_index_object'];
|
||||
|
||||
$SimpleIndexObjectData = $NextObjectDataHeader.fread($this->getid3->fp, 56 - 24);
|
||||
$SimpleIndexObjectData = $NextObjectDataHeader.$this->fread(56 - 24);
|
||||
$offset = 24;
|
||||
|
||||
$thisfile_asf_simpleindexobject['objectid'] = $NextObjectGUID;
|
||||
@@ -1246,7 +1235,7 @@ class getid3_asf extends getid3_handler
|
||||
$thisfile_asf_simpleindexobject['index_entries_count'] = getid3_lib::LittleEndian2Int(substr($SimpleIndexObjectData, $offset, 4));
|
||||
$offset += 4;
|
||||
|
||||
$IndexEntriesData = $SimpleIndexObjectData.fread($this->getid3->fp, 6 * $thisfile_asf_simpleindexobject['index_entries_count']);
|
||||
$IndexEntriesData = $SimpleIndexObjectData.$this->fread(6 * $thisfile_asf_simpleindexobject['index_entries_count']);
|
||||
for ($IndexEntriesCounter = 0; $IndexEntriesCounter < $thisfile_asf_simpleindexobject['index_entries_count']; $IndexEntriesCounter++) {
|
||||
$thisfile_asf_simpleindexobject['index_entries'][$IndexEntriesCounter]['packet_number'] = getid3_lib::LittleEndian2Int(substr($IndexEntriesData, $offset, 4));
|
||||
$offset += 4;
|
||||
@@ -1283,7 +1272,7 @@ class getid3_asf extends getid3_handler
|
||||
$thisfile_asf['asf_index_object'] = array();
|
||||
$thisfile_asf_asfindexobject = &$thisfile_asf['asf_index_object'];
|
||||
|
||||
$ASFIndexObjectData = $NextObjectDataHeader.fread($this->getid3->fp, 34 - 24);
|
||||
$ASFIndexObjectData = $NextObjectDataHeader.$this->fread(34 - 24);
|
||||
$offset = 24;
|
||||
|
||||
$thisfile_asf_asfindexobject['objectid'] = $NextObjectGUID;
|
||||
@@ -1297,7 +1286,7 @@ class getid3_asf extends getid3_handler
|
||||
$thisfile_asf_asfindexobject['index_blocks_count'] = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 4));
|
||||
$offset += 4;
|
||||
|
||||
$ASFIndexObjectData .= fread($this->getid3->fp, 4 * $thisfile_asf_asfindexobject['index_specifiers_count']);
|
||||
$ASFIndexObjectData .= $this->fread(4 * $thisfile_asf_asfindexobject['index_specifiers_count']);
|
||||
for ($IndexSpecifiersCounter = 0; $IndexSpecifiersCounter < $thisfile_asf_asfindexobject['index_specifiers_count']; $IndexSpecifiersCounter++) {
|
||||
$IndexSpecifierStreamNumber = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 2));
|
||||
$offset += 2;
|
||||
@@ -1307,17 +1296,17 @@ class getid3_asf extends getid3_handler
|
||||
$thisfile_asf_asfindexobject['index_specifiers'][$IndexSpecifiersCounter]['index_type_text'] = $this->ASFIndexObjectIndexTypeLookup($thisfile_asf_asfindexobject['index_specifiers'][$IndexSpecifiersCounter]['index_type']);
|
||||
}
|
||||
|
||||
$ASFIndexObjectData .= fread($this->getid3->fp, 4);
|
||||
$ASFIndexObjectData .= $this->fread(4);
|
||||
$thisfile_asf_asfindexobject['index_entry_count'] = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 4));
|
||||
$offset += 4;
|
||||
|
||||
$ASFIndexObjectData .= fread($this->getid3->fp, 8 * $thisfile_asf_asfindexobject['index_specifiers_count']);
|
||||
$ASFIndexObjectData .= $this->fread(8 * $thisfile_asf_asfindexobject['index_specifiers_count']);
|
||||
for ($IndexSpecifiersCounter = 0; $IndexSpecifiersCounter < $thisfile_asf_asfindexobject['index_specifiers_count']; $IndexSpecifiersCounter++) {
|
||||
$thisfile_asf_asfindexobject['block_positions'][$IndexSpecifiersCounter] = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 8));
|
||||
$offset += 8;
|
||||
}
|
||||
|
||||
$ASFIndexObjectData .= fread($this->getid3->fp, 4 * $thisfile_asf_asfindexobject['index_specifiers_count'] * $thisfile_asf_asfindexobject['index_entry_count']);
|
||||
$ASFIndexObjectData .= $this->fread(4 * $thisfile_asf_asfindexobject['index_specifiers_count'] * $thisfile_asf_asfindexobject['index_entry_count']);
|
||||
for ($IndexEntryCounter = 0; $IndexEntryCounter < $thisfile_asf_asfindexobject['index_entry_count']; $IndexEntryCounter++) {
|
||||
for ($IndexSpecifiersCounter = 0; $IndexSpecifiersCounter < $thisfile_asf_asfindexobject['index_specifiers_count']; $IndexSpecifiersCounter++) {
|
||||
$thisfile_asf_asfindexobject['offsets'][$IndexSpecifiersCounter][$IndexEntryCounter] = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 4));
|
||||
@@ -1332,9 +1321,9 @@ class getid3_asf extends getid3_handler
|
||||
if ($this->GUIDname($NextObjectGUIDtext)) {
|
||||
$info['warning'][] = 'unhandled GUID "'.$this->GUIDname($NextObjectGUIDtext).'" {'.$NextObjectGUIDtext.'} in ASF body at offset '.($offset - 16 - 8);
|
||||
} else {
|
||||
$info['warning'][] = 'unknown GUID {'.$NextObjectGUIDtext.'} in ASF body at offset '.(ftell($this->getid3->fp) - 16 - 8);
|
||||
$info['warning'][] = 'unknown GUID {'.$NextObjectGUIDtext.'} in ASF body at offset '.($this->ftell() - 16 - 8);
|
||||
}
|
||||
fseek($this->getid3->fp, ($NextObjectSize - 16 - 8), SEEK_CUR);
|
||||
$this->fseek(($NextObjectSize - 16 - 8), SEEK_CUR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1433,10 +1422,10 @@ class getid3_asf extends getid3_handler
|
||||
$thisfile_video['dataformat'] = (!empty($thisfile_video['dataformat']) ? $thisfile_video['dataformat'] : 'asf');
|
||||
}
|
||||
if (!empty($thisfile_video['streams'])) {
|
||||
$thisfile_video['streams']['resolution_x'] = 0;
|
||||
$thisfile_video['streams']['resolution_y'] = 0;
|
||||
$thisfile_video['resolution_x'] = 0;
|
||||
$thisfile_video['resolution_y'] = 0;
|
||||
foreach ($thisfile_video['streams'] as $key => $valuearray) {
|
||||
if (($valuearray['resolution_x'] > $thisfile_video['streams']['resolution_x']) || ($valuearray['resolution_y'] > $thisfile_video['streams']['resolution_y'])) {
|
||||
if (($valuearray['resolution_x'] > $thisfile_video['resolution_x']) || ($valuearray['resolution_y'] > $thisfile_video['resolution_y'])) {
|
||||
$thisfile_video['resolution_x'] = $valuearray['resolution_x'];
|
||||
$thisfile_video['resolution_y'] = $valuearray['resolution_y'];
|
||||
}
|
||||
@@ -1451,15 +1440,14 @@ class getid3_asf extends getid3_handler
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function ASFCodecListObjectTypeLookup($CodecListType) {
|
||||
static $ASFCodecListObjectTypeLookup = array();
|
||||
if (empty($ASFCodecListObjectTypeLookup)) {
|
||||
$ASFCodecListObjectTypeLookup[0x0001] = 'Video Codec';
|
||||
$ASFCodecListObjectTypeLookup[0x0002] = 'Audio Codec';
|
||||
$ASFCodecListObjectTypeLookup[0xFFFF] = 'Unknown Codec';
|
||||
}
|
||||
public static function codecListObjectTypeLookup($CodecListType) {
|
||||
static $lookup = array(
|
||||
0x0001 => 'Video Codec',
|
||||
0x0002 => 'Audio Codec',
|
||||
0xFFFF => 'Unknown Codec'
|
||||
);
|
||||
|
||||
return (isset($ASFCodecListObjectTypeLookup[$CodecListType]) ? $ASFCodecListObjectTypeLookup[$CodecListType] : 'Invalid Codec Type');
|
||||
return (isset($lookup[$CodecListType]) ? $lookup[$CodecListType] : 'Invalid Codec Type');
|
||||
}
|
||||
|
||||
public static function KnownGUIDs() {
|
||||
@@ -1666,31 +1654,37 @@ class getid3_asf extends getid3_handler
|
||||
}
|
||||
|
||||
public static function WMpictureTypeLookup($WMpictureType) {
|
||||
static $WMpictureTypeLookup = array();
|
||||
if (empty($WMpictureTypeLookup)) {
|
||||
$WMpictureTypeLookup[0x03] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'Front Cover');
|
||||
$WMpictureTypeLookup[0x04] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'Back Cover');
|
||||
$WMpictureTypeLookup[0x00] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'User Defined');
|
||||
$WMpictureTypeLookup[0x05] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'Leaflet Page');
|
||||
$WMpictureTypeLookup[0x06] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'Media Label');
|
||||
$WMpictureTypeLookup[0x07] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'Lead Artist');
|
||||
$WMpictureTypeLookup[0x08] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'Artist');
|
||||
$WMpictureTypeLookup[0x09] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'Conductor');
|
||||
$WMpictureTypeLookup[0x0A] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'Band');
|
||||
$WMpictureTypeLookup[0x0B] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'Composer');
|
||||
$WMpictureTypeLookup[0x0C] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'Lyricist');
|
||||
$WMpictureTypeLookup[0x0D] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'Recording Location');
|
||||
$WMpictureTypeLookup[0x0E] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'During Recording');
|
||||
$WMpictureTypeLookup[0x0F] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'During Performance');
|
||||
$WMpictureTypeLookup[0x10] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'Video Screen Capture');
|
||||
$WMpictureTypeLookup[0x12] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'Illustration');
|
||||
$WMpictureTypeLookup[0x13] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'Band Logotype');
|
||||
$WMpictureTypeLookup[0x14] = getid3_lib::iconv_fallback('ISO-8859-1', 'UTF-16LE', 'Publisher Logotype');
|
||||
static $lookup = null;
|
||||
if ($lookup === null) {
|
||||
$lookup = array(
|
||||
0x03 => 'Front Cover',
|
||||
0x04 => 'Back Cover',
|
||||
0x00 => 'User Defined',
|
||||
0x05 => 'Leaflet Page',
|
||||
0x06 => 'Media Label',
|
||||
0x07 => 'Lead Artist',
|
||||
0x08 => 'Artist',
|
||||
0x09 => 'Conductor',
|
||||
0x0A => 'Band',
|
||||
0x0B => 'Composer',
|
||||
0x0C => 'Lyricist',
|
||||
0x0D => 'Recording Location',
|
||||
0x0E => 'During Recording',
|
||||
0x0F => 'During Performance',
|
||||
0x10 => 'Video Screen Capture',
|
||||
0x12 => 'Illustration',
|
||||
0x13 => 'Band Logotype',
|
||||
0x14 => 'Publisher Logotype'
|
||||
);
|
||||
$lookup = array_map(function($str) {
|
||||
return getid3_lib::iconv_fallback('UTF-8', 'UTF-16LE', $str);
|
||||
}, $lookup);
|
||||
}
|
||||
return (isset($WMpictureTypeLookup[$WMpictureType]) ? $WMpictureTypeLookup[$WMpictureType] : '');
|
||||
|
||||
return (isset($lookup[$WMpictureType]) ? $lookup[$WMpictureType] : '');
|
||||
}
|
||||
|
||||
public function ASF_HeaderExtensionObjectDataParse(&$asf_header_extension_object_data, &$unhandled_sections) {
|
||||
public function HeaderExtensionObjectDataParse(&$asf_header_extension_object_data, &$unhandled_sections) {
|
||||
// http://msdn.microsoft.com/en-us/library/bb643323.aspx
|
||||
|
||||
$offset = 0;
|
||||
@@ -1825,7 +1819,7 @@ class getid3_asf extends getid3_handler
|
||||
|
||||
$descriptionRecord['data_type'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset, 2));
|
||||
$offset += 2;
|
||||
$descriptionRecord['data_type_text'] = $this->ASFmetadataLibraryObjectDataTypeLookup($descriptionRecord['data_type']);
|
||||
$descriptionRecord['data_type_text'] = self::metadataLibraryObjectDataTypeLookup($descriptionRecord['data_type']);
|
||||
|
||||
$descriptionRecord['data_length'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset, 4));
|
||||
$offset += 4;
|
||||
@@ -1897,7 +1891,7 @@ class getid3_asf extends getid3_handler
|
||||
|
||||
$descriptionRecord['data_type'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset, 2));
|
||||
$offset += 2;
|
||||
$descriptionRecord['data_type_text'] = $this->ASFmetadataLibraryObjectDataTypeLookup($descriptionRecord['data_type']);
|
||||
$descriptionRecord['data_type_text'] = self::metadataLibraryObjectDataTypeLookup($descriptionRecord['data_type']);
|
||||
|
||||
$descriptionRecord['data_length'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset, 4));
|
||||
$offset += 4;
|
||||
@@ -1937,8 +1931,8 @@ class getid3_asf extends getid3_handler
|
||||
}
|
||||
|
||||
|
||||
public static function ASFmetadataLibraryObjectDataTypeLookup($id) {
|
||||
static $ASFmetadataLibraryObjectDataTypeLookup = array(
|
||||
public static function metadataLibraryObjectDataTypeLookup($id) {
|
||||
static $lookup = array(
|
||||
0x0000 => 'Unicode string', // The data consists of a sequence of Unicode characters
|
||||
0x0001 => 'BYTE array', // The type of the data is implementation-specific
|
||||
0x0002 => 'BOOL', // The data is 2 bytes long and should be interpreted as a 16-bit unsigned integer. Only 0x0000 or 0x0001 are permitted values
|
||||
@@ -1947,7 +1941,7 @@ class getid3_asf extends getid3_handler
|
||||
0x0005 => 'WORD', // The data is 2 bytes long and should be interpreted as a 16-bit unsigned integer
|
||||
0x0006 => 'GUID', // The data is 16 bytes long and should be interpreted as a 128-bit GUID
|
||||
);
|
||||
return (isset($ASFmetadataLibraryObjectDataTypeLookup[$id]) ? $ASFmetadataLibraryObjectDataTypeLookup[$id] : 'invalid');
|
||||
return (isset($lookup[$id]) ? $lookup[$id] : 'invalid');
|
||||
}
|
||||
|
||||
public function ASF_WMpicture(&$data) {
|
||||
@@ -1964,7 +1958,7 @@ class getid3_asf extends getid3_handler
|
||||
$offset = 0;
|
||||
$WMpicture['image_type_id'] = getid3_lib::LittleEndian2Int(substr($data, $offset, 1));
|
||||
$offset += 1;
|
||||
$WMpicture['image_type'] = $this->WMpictureTypeLookup($WMpicture['image_type_id']);
|
||||
$WMpicture['image_type'] = self::WMpictureTypeLookup($WMpicture['image_type_id']);
|
||||
$WMpicture['image_size'] = getid3_lib::LittleEndian2Int(substr($data, $offset, 4));
|
||||
$offset += 4;
|
||||
|
||||
@@ -2016,4 +2010,4 @@ class getid3_asf extends getid3_handler
|
||||
return $string;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
// //
|
||||
// FLV module by Seth Kaufman <sethØwhirl-i-gig*com> //
|
||||
// //
|
||||
@@ -38,6 +39,11 @@
|
||||
// * version 0.6.1 (30 May 2011) //
|
||||
// prevent infinite loops in expGolombUe() //
|
||||
// //
|
||||
// * version 0.7.0 (16 Jul 2013) //
|
||||
// handle GETID3_FLV_VIDEO_VP6FLV_ALPHA //
|
||||
// improved AVCSequenceParameterSetReader::readData() //
|
||||
// by Xander Schouwerwou <schouwerwouØgmail*com> //
|
||||
// //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// module.audio-video.flv.php //
|
||||
@@ -67,38 +73,38 @@ define('H264_PROFILE_HIGH422', 122);
|
||||
define('H264_PROFILE_HIGH444', 144);
|
||||
define('H264_PROFILE_HIGH444_PREDICTIVE', 244);
|
||||
|
||||
class getid3_flv extends getid3_handler
|
||||
{
|
||||
class getid3_flv extends getid3_handler {
|
||||
|
||||
const magic = 'FLV';
|
||||
|
||||
public $max_frames = 100000; // break out of the loop if too many frames have been scanned; only scan this many if meta frame does not contain useful duration
|
||||
|
||||
public function Analyze() {
|
||||
$info = &$this->getid3->info;
|
||||
|
||||
fseek($this->getid3->fp, $info['avdataoffset'], SEEK_SET);
|
||||
$this->fseek($info['avdataoffset']);
|
||||
|
||||
$FLVdataLength = $info['avdataend'] - $info['avdataoffset'];
|
||||
$FLVheader = fread($this->getid3->fp, 5);
|
||||
$FLVheader = $this->fread(5);
|
||||
|
||||
$info['fileformat'] = 'flv';
|
||||
$info['flv']['header']['signature'] = substr($FLVheader, 0, 3);
|
||||
$info['flv']['header']['version'] = getid3_lib::BigEndian2Int(substr($FLVheader, 3, 1));
|
||||
$TypeFlags = getid3_lib::BigEndian2Int(substr($FLVheader, 4, 1));
|
||||
|
||||
$magic = 'FLV';
|
||||
if ($info['flv']['header']['signature'] != $magic) {
|
||||
$info['error'][] = 'Expecting "'.getid3_lib::PrintHexBytes($magic).'" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes($info['flv']['header']['signature']).'"';
|
||||
unset($info['flv']);
|
||||
unset($info['fileformat']);
|
||||
if ($info['flv']['header']['signature'] != self::magic) {
|
||||
$info['error'][] = 'Expecting "'.getid3_lib::PrintHexBytes(self::magic).'" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes($info['flv']['header']['signature']).'"';
|
||||
unset($info['flv'], $info['fileformat']);
|
||||
return false;
|
||||
}
|
||||
|
||||
$info['flv']['header']['hasAudio'] = (bool) ($TypeFlags & 0x04);
|
||||
$info['flv']['header']['hasVideo'] = (bool) ($TypeFlags & 0x01);
|
||||
|
||||
$FrameSizeDataLength = getid3_lib::BigEndian2Int(fread($this->getid3->fp, 4));
|
||||
$FrameSizeDataLength = getid3_lib::BigEndian2Int($this->fread(4));
|
||||
$FLVheaderFrameLength = 9;
|
||||
if ($FrameSizeDataLength > $FLVheaderFrameLength) {
|
||||
fseek($this->getid3->fp, $FrameSizeDataLength - $FLVheaderFrameLength, SEEK_CUR);
|
||||
$this->fseek($FrameSizeDataLength - $FLVheaderFrameLength, SEEK_CUR);
|
||||
}
|
||||
$Duration = 0;
|
||||
$found_video = false;
|
||||
@@ -108,15 +114,15 @@ class getid3_flv extends getid3_handler
|
||||
$tagParseCount = 0;
|
||||
$info['flv']['framecount'] = array('total'=>0, 'audio'=>0, 'video'=>0);
|
||||
$flv_framecount = &$info['flv']['framecount'];
|
||||
while (((ftell($this->getid3->fp) + 16) < $info['avdataend']) && (($tagParseCount++ <= $this->max_frames) || !$found_valid_meta_playtime)) {
|
||||
$ThisTagHeader = fread($this->getid3->fp, 16);
|
||||
while ((($this->ftell() + 16) < $info['avdataend']) && (($tagParseCount++ <= $this->max_frames) || !$found_valid_meta_playtime)) {
|
||||
$ThisTagHeader = $this->fread(16);
|
||||
|
||||
$PreviousTagLength = getid3_lib::BigEndian2Int(substr($ThisTagHeader, 0, 4));
|
||||
$TagType = getid3_lib::BigEndian2Int(substr($ThisTagHeader, 4, 1));
|
||||
$DataLength = getid3_lib::BigEndian2Int(substr($ThisTagHeader, 5, 3));
|
||||
$Timestamp = getid3_lib::BigEndian2Int(substr($ThisTagHeader, 8, 3));
|
||||
$LastHeaderByte = getid3_lib::BigEndian2Int(substr($ThisTagHeader, 15, 1));
|
||||
$NextOffset = ftell($this->getid3->fp) - 1 + $DataLength;
|
||||
$NextOffset = $this->ftell() - 1 + $DataLength;
|
||||
if ($Timestamp > $Duration) {
|
||||
$Duration = $Timestamp;
|
||||
}
|
||||
@@ -140,7 +146,7 @@ class getid3_flv extends getid3_handler
|
||||
$found_video = true;
|
||||
$info['flv']['video']['videoCodec'] = $LastHeaderByte & 0x07;
|
||||
|
||||
$FLVvideoHeader = fread($this->getid3->fp, 11);
|
||||
$FLVvideoHeader = $this->fread(11);
|
||||
|
||||
if ($info['flv']['video']['videoCodec'] == GETID3_FLV_VIDEO_H264) {
|
||||
// this code block contributed by: moysevichØgmail*com
|
||||
@@ -160,7 +166,7 @@ class getid3_flv extends getid3_handler
|
||||
//$spsSize = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 9, 2));
|
||||
$spsSize = getid3_lib::LittleEndian2Int(substr($FLVvideoHeader, 9, 2));
|
||||
// read the first SequenceParameterSet
|
||||
$sps = fread($this->getid3->fp, $spsSize);
|
||||
$sps = $this->fread($spsSize);
|
||||
if (strlen($sps) == $spsSize) { // make sure that whole SequenceParameterSet was red
|
||||
$spsReader = new AVCSequenceParameterSetReader($sps);
|
||||
$spsReader->readData();
|
||||
@@ -185,19 +191,15 @@ class getid3_flv extends getid3_handler
|
||||
//$PictureSizeEnc <<= 1;
|
||||
//$info['video']['resolution_y'] = ($PictureSizeEnc & 0xFF00) >> 8;
|
||||
|
||||
$PictureSizeEnc['x'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 4, 2));
|
||||
$PictureSizeEnc['y'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 5, 2));
|
||||
$PictureSizeEnc['x'] >>= 7;
|
||||
$PictureSizeEnc['y'] >>= 7;
|
||||
$PictureSizeEnc['x'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 4, 2)) >> 7;
|
||||
$PictureSizeEnc['y'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 5, 2)) >> 7;
|
||||
$info['video']['resolution_x'] = $PictureSizeEnc['x'] & 0xFF;
|
||||
$info['video']['resolution_y'] = $PictureSizeEnc['y'] & 0xFF;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
$PictureSizeEnc['x'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 4, 3));
|
||||
$PictureSizeEnc['y'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 6, 3));
|
||||
$PictureSizeEnc['x'] >>= 7;
|
||||
$PictureSizeEnc['y'] >>= 7;
|
||||
$PictureSizeEnc['x'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 4, 3)) >> 7;
|
||||
$PictureSizeEnc['y'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 6, 3)) >> 7;
|
||||
$info['video']['resolution_x'] = $PictureSizeEnc['x'] & 0xFFFF;
|
||||
$info['video']['resolution_y'] = $PictureSizeEnc['y'] & 0xFFFF;
|
||||
break;
|
||||
@@ -233,8 +235,22 @@ class getid3_flv extends getid3_handler
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
} elseif ($info['flv']['video']['videoCodec'] == GETID3_FLV_VIDEO_VP6FLV_ALPHA) {
|
||||
|
||||
/* contributed by schouwerwouØgmail*com */
|
||||
if (!isset($info['video']['resolution_x'])) { // only when meta data isn't set
|
||||
$PictureSizeEnc['x'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 6, 2));
|
||||
$PictureSizeEnc['y'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 7, 2));
|
||||
$info['video']['resolution_x'] = ($PictureSizeEnc['x'] & 0xFF) << 3;
|
||||
$info['video']['resolution_y'] = ($PictureSizeEnc['y'] & 0xFF) << 3;
|
||||
}
|
||||
/* end schouwerwouØgmail*com */
|
||||
|
||||
}
|
||||
if (!empty($info['video']['resolution_x']) && !empty($info['video']['resolution_y'])) {
|
||||
$info['video']['pixel_aspect_ratio'] = $info['video']['resolution_x'] / $info['video']['resolution_y'];
|
||||
}
|
||||
$info['video']['pixel_aspect_ratio'] = $info['video']['resolution_x'] / $info['video']['resolution_y'];
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -242,8 +258,8 @@ class getid3_flv extends getid3_handler
|
||||
case GETID3_FLV_TAG_META:
|
||||
if (!$found_meta) {
|
||||
$found_meta = true;
|
||||
fseek($this->getid3->fp, -1, SEEK_CUR);
|
||||
$datachunk = fread($this->getid3->fp, $DataLength);
|
||||
$this->fseek(-1, SEEK_CUR);
|
||||
$datachunk = $this->fread($DataLength);
|
||||
$AMFstream = new AMFStream($datachunk);
|
||||
$reader = new AMFReader($AMFstream);
|
||||
$eventName = $reader->readData();
|
||||
@@ -279,7 +295,7 @@ class getid3_flv extends getid3_handler
|
||||
// noop
|
||||
break;
|
||||
}
|
||||
fseek($this->getid3->fp, $NextOffset, SEEK_SET);
|
||||
$this->fseek($NextOffset);
|
||||
}
|
||||
|
||||
$info['playtime_seconds'] = $Duration / 1000;
|
||||
@@ -288,16 +304,16 @@ class getid3_flv extends getid3_handler
|
||||
}
|
||||
|
||||
if ($info['flv']['header']['hasAudio']) {
|
||||
$info['audio']['codec'] = $this->FLVaudioFormat($info['flv']['audio']['audioFormat']);
|
||||
$info['audio']['sample_rate'] = $this->FLVaudioRate($info['flv']['audio']['audioRate']);
|
||||
$info['audio']['bits_per_sample'] = $this->FLVaudioBitDepth($info['flv']['audio']['audioSampleSize']);
|
||||
$info['audio']['codec'] = self::audioFormatLookup($info['flv']['audio']['audioFormat']);
|
||||
$info['audio']['sample_rate'] = self::audioRateLookup($info['flv']['audio']['audioRate']);
|
||||
$info['audio']['bits_per_sample'] = self::audioBitDepthLookup($info['flv']['audio']['audioSampleSize']);
|
||||
|
||||
$info['audio']['channels'] = $info['flv']['audio']['audioType'] + 1; // 0=mono,1=stereo
|
||||
$info['audio']['lossless'] = ($info['flv']['audio']['audioFormat'] ? false : true); // 0=uncompressed
|
||||
$info['audio']['dataformat'] = 'flv';
|
||||
}
|
||||
if (!empty($info['flv']['header']['hasVideo'])) {
|
||||
$info['video']['codec'] = $this->FLVvideoCodec($info['flv']['video']['videoCodec']);
|
||||
$info['video']['codec'] = self::videoCodecLookup($info['flv']['video']['videoCodec']);
|
||||
$info['video']['dataformat'] = 'flv';
|
||||
$info['video']['lossless'] = false;
|
||||
}
|
||||
@@ -308,17 +324,17 @@ class getid3_flv extends getid3_handler
|
||||
$info['bitrate'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / $info['playtime_seconds'];
|
||||
}
|
||||
if (isset($info['flv']['meta']['onMetaData']['audiocodecid'])) {
|
||||
$info['audio']['codec'] = $this->FLVaudioFormat($info['flv']['meta']['onMetaData']['audiocodecid']);
|
||||
$info['audio']['codec'] = self::audioFormatLookup($info['flv']['meta']['onMetaData']['audiocodecid']);
|
||||
}
|
||||
if (isset($info['flv']['meta']['onMetaData']['videocodecid'])) {
|
||||
$info['video']['codec'] = $this->FLVvideoCodec($info['flv']['meta']['onMetaData']['videocodecid']);
|
||||
$info['video']['codec'] = self::videoCodecLookup($info['flv']['meta']['onMetaData']['videocodecid']);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public function FLVaudioFormat($id) {
|
||||
$FLVaudioFormat = array(
|
||||
public static function audioFormatLookup($id) {
|
||||
static $lookup = array(
|
||||
0 => 'Linear PCM, platform endian',
|
||||
1 => 'ADPCM',
|
||||
2 => 'mp3',
|
||||
@@ -330,35 +346,35 @@ class getid3_flv extends getid3_handler
|
||||
8 => 'G.711 mu-law logarithmic PCM',
|
||||
9 => 'reserved',
|
||||
10 => 'AAC',
|
||||
11 => false, // unknown?
|
||||
11 => 'Speex',
|
||||
12 => false, // unknown?
|
||||
13 => false, // unknown?
|
||||
14 => 'mp3 8kHz',
|
||||
15 => 'Device-specific sound',
|
||||
);
|
||||
return (isset($FLVaudioFormat[$id]) ? $FLVaudioFormat[$id] : false);
|
||||
return (isset($lookup[$id]) ? $lookup[$id] : false);
|
||||
}
|
||||
|
||||
public function FLVaudioRate($id) {
|
||||
$FLVaudioRate = array(
|
||||
public static function audioRateLookup($id) {
|
||||
static $lookup = array(
|
||||
0 => 5500,
|
||||
1 => 11025,
|
||||
2 => 22050,
|
||||
3 => 44100,
|
||||
);
|
||||
return (isset($FLVaudioRate[$id]) ? $FLVaudioRate[$id] : false);
|
||||
return (isset($lookup[$id]) ? $lookup[$id] : false);
|
||||
}
|
||||
|
||||
public function FLVaudioBitDepth($id) {
|
||||
$FLVaudioBitDepth = array(
|
||||
public static function audioBitDepthLookup($id) {
|
||||
static $lookup = array(
|
||||
0 => 8,
|
||||
1 => 16,
|
||||
);
|
||||
return (isset($FLVaudioBitDepth[$id]) ? $FLVaudioBitDepth[$id] : false);
|
||||
return (isset($lookup[$id]) ? $lookup[$id] : false);
|
||||
}
|
||||
|
||||
public function FLVvideoCodec($id) {
|
||||
$FLVvideoCodec = array(
|
||||
public static function videoCodecLookup($id) {
|
||||
static $lookup = array(
|
||||
GETID3_FLV_VIDEO_H263 => 'Sorenson H.263',
|
||||
GETID3_FLV_VIDEO_SCREEN => 'Screen video',
|
||||
GETID3_FLV_VIDEO_VP6FLV => 'On2 VP6',
|
||||
@@ -366,7 +382,7 @@ class getid3_flv extends getid3_handler
|
||||
GETID3_FLV_VIDEO_SCREENV2 => 'Screen video v2',
|
||||
GETID3_FLV_VIDEO_H264 => 'Sorenson H.264',
|
||||
);
|
||||
return (isset($FLVvideoCodec[$id]) ? $FLVvideoCodec[$id] : false);
|
||||
return (isset($lookup[$id]) ? $lookup[$id] : false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -374,7 +390,7 @@ class AMFStream {
|
||||
public $bytes;
|
||||
public $pos;
|
||||
|
||||
public function AMFStream(&$bytes) {
|
||||
public function __construct(&$bytes) {
|
||||
$this->bytes =& $bytes;
|
||||
$this->pos = 0;
|
||||
}
|
||||
@@ -457,7 +473,7 @@ class AMFStream {
|
||||
class AMFReader {
|
||||
public $stream;
|
||||
|
||||
public function AMFReader(&$stream) {
|
||||
public function __construct(&$stream) {
|
||||
$this->stream =& $stream;
|
||||
}
|
||||
|
||||
@@ -619,60 +635,60 @@ class AVCSequenceParameterSetReader {
|
||||
public $width;
|
||||
public $height;
|
||||
|
||||
public function AVCSequenceParameterSetReader($sps) {
|
||||
public function __construct($sps) {
|
||||
$this->sps = $sps;
|
||||
}
|
||||
|
||||
public function readData() {
|
||||
$this->skipBits(8);
|
||||
$this->skipBits(8);
|
||||
$profile = $this->getBits(8); // read profile
|
||||
$this->skipBits(16);
|
||||
$this->expGolombUe(); // read sps id
|
||||
if (in_array($profile, array(H264_PROFILE_HIGH, H264_PROFILE_HIGH10, H264_PROFILE_HIGH422, H264_PROFILE_HIGH444, H264_PROFILE_HIGH444_PREDICTIVE))) {
|
||||
if ($this->expGolombUe() == 3) {
|
||||
$this->skipBits(1);
|
||||
}
|
||||
$this->expGolombUe();
|
||||
$this->expGolombUe();
|
||||
$this->skipBits(1);
|
||||
if ($this->getBit()) {
|
||||
for ($i = 0; $i < 8; $i++) {
|
||||
if ($this->getBit()) {
|
||||
$size = $i < 6 ? 16 : 64;
|
||||
$lastScale = 8;
|
||||
$nextScale = 8;
|
||||
for ($j = 0; $j < $size; $j++) {
|
||||
if ($nextScale != 0) {
|
||||
$deltaScale = $this->expGolombUe();
|
||||
$nextScale = ($lastScale + $deltaScale + 256) % 256;
|
||||
}
|
||||
if ($nextScale != 0) {
|
||||
$lastScale = $nextScale;
|
||||
}
|
||||
}
|
||||
}
|
||||
$profile = $this->getBits(8); // read profile
|
||||
if ($profile > 0) {
|
||||
$this->skipBits(8);
|
||||
$level_idc = $this->getBits(8); // level_idc
|
||||
$this->expGolombUe(); // seq_parameter_set_id // sps
|
||||
$this->expGolombUe(); // log2_max_frame_num_minus4
|
||||
$picOrderType = $this->expGolombUe(); // pic_order_cnt_type
|
||||
if ($picOrderType == 0) {
|
||||
$this->expGolombUe(); // log2_max_pic_order_cnt_lsb_minus4
|
||||
} elseif ($picOrderType == 1) {
|
||||
$this->skipBits(1); // delta_pic_order_always_zero_flag
|
||||
$this->expGolombSe(); // offset_for_non_ref_pic
|
||||
$this->expGolombSe(); // offset_for_top_to_bottom_field
|
||||
$num_ref_frames_in_pic_order_cnt_cycle = $this->expGolombUe(); // num_ref_frames_in_pic_order_cnt_cycle
|
||||
for ($i = 0; $i < $num_ref_frames_in_pic_order_cnt_cycle; $i++) {
|
||||
$this->expGolombSe(); // offset_for_ref_frame[ i ]
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->expGolombUe();
|
||||
$pocType = $this->expGolombUe();
|
||||
if ($pocType == 0) {
|
||||
$this->expGolombUe();
|
||||
} elseif ($pocType == 1) {
|
||||
$this->skipBits(1);
|
||||
$this->expGolombSe();
|
||||
$this->expGolombSe();
|
||||
$pocCycleLength = $this->expGolombUe();
|
||||
for ($i = 0; $i < $pocCycleLength; $i++) {
|
||||
$this->expGolombSe();
|
||||
$this->expGolombUe(); // num_ref_frames
|
||||
$this->skipBits(1); // gaps_in_frame_num_value_allowed_flag
|
||||
$pic_width_in_mbs_minus1 = $this->expGolombUe(); // pic_width_in_mbs_minus1
|
||||
$pic_height_in_map_units_minus1 = $this->expGolombUe(); // pic_height_in_map_units_minus1
|
||||
|
||||
$frame_mbs_only_flag = $this->getBits(1); // frame_mbs_only_flag
|
||||
if ($frame_mbs_only_flag == 0) {
|
||||
$this->skipBits(1); // mb_adaptive_frame_field_flag
|
||||
}
|
||||
$this->skipBits(1); // direct_8x8_inference_flag
|
||||
$frame_cropping_flag = $this->getBits(1); // frame_cropping_flag
|
||||
|
||||
$frame_crop_left_offset = 0;
|
||||
$frame_crop_right_offset = 0;
|
||||
$frame_crop_top_offset = 0;
|
||||
$frame_crop_bottom_offset = 0;
|
||||
|
||||
if ($frame_cropping_flag) {
|
||||
$frame_crop_left_offset = $this->expGolombUe(); // frame_crop_left_offset
|
||||
$frame_crop_right_offset = $this->expGolombUe(); // frame_crop_right_offset
|
||||
$frame_crop_top_offset = $this->expGolombUe(); // frame_crop_top_offset
|
||||
$frame_crop_bottom_offset = $this->expGolombUe(); // frame_crop_bottom_offset
|
||||
}
|
||||
$this->skipBits(1); // vui_parameters_present_flag
|
||||
// etc
|
||||
|
||||
$this->width = (($pic_width_in_mbs_minus1 + 1) * 16) - ($frame_crop_left_offset * 2) - ($frame_crop_right_offset * 2);
|
||||
$this->height = ((2 - $frame_mbs_only_flag) * ($pic_height_in_map_units_minus1 + 1) * 16) - ($frame_crop_top_offset * 2) - ($frame_crop_bottom_offset * 2);
|
||||
}
|
||||
$this->expGolombUe();
|
||||
$this->skipBits(1);
|
||||
$this->width = ($this->expGolombUe() + 1) * 16;
|
||||
$heightMap = $this->expGolombUe() + 1;
|
||||
$this->height = (2 - $this->getBit()) * $heightMap * 16;
|
||||
}
|
||||
|
||||
public function skipBits($bits) {
|
||||
@@ -726,4 +742,4 @@ class AVCSequenceParameterSetReader {
|
||||
public function getHeight() {
|
||||
return $this->height;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// See readme.txt for more details //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -281,10 +282,8 @@ class getid3_matroska extends getid3_handler
|
||||
|
||||
switch ($trackarray['CodecID']) {
|
||||
case 'V_MS/VFW/FOURCC':
|
||||
if (!getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, false)) {
|
||||
$this->warning('Unable to parse codec private data ['.basename(__FILE__).':'.__LINE__.'] because cannot include "module.audio-video.riff.php"');
|
||||
break;
|
||||
}
|
||||
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, true);
|
||||
|
||||
$parsed = getid3_riff::ParseBITMAPINFOHEADER($trackarray['CodecPrivate']);
|
||||
$track_info['codec'] = getid3_riff::fourccLookup($parsed['fourcc']);
|
||||
$info['matroska']['track_codec_parsed'][$trackarray['TrackNumber']] = $parsed;
|
||||
@@ -335,10 +334,7 @@ class getid3_matroska extends getid3_handler
|
||||
case 'A_MPEG/L3':
|
||||
case 'A_MPEG/L2':
|
||||
case 'A_FLAC':
|
||||
if (!getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.'.($track_info['dataformat'] == 'mp2' ? 'mp3' : $track_info['dataformat']).'.php', __FILE__, false)) {
|
||||
$this->warning('Unable to parse audio data ['.basename(__FILE__).':'.__LINE__.'] because cannot include "module.audio.'.$track_info['dataformat'].'.php"');
|
||||
break;
|
||||
}
|
||||
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.'.($track_info['dataformat'] == 'mp2' ? 'mp3' : $track_info['dataformat']).'.php', __FILE__, true);
|
||||
|
||||
if (!isset($info['matroska']['track_data_offsets'][$trackarray['TrackNumber']])) {
|
||||
$this->warning('Unable to parse audio data ['.basename(__FILE__).':'.__LINE__.'] because $info[matroska][track_data_offsets]['.$trackarray['TrackNumber'].'] not set');
|
||||
@@ -385,10 +381,6 @@ class getid3_matroska extends getid3_handler
|
||||
}
|
||||
if (!empty($getid3_temp->info['warning'])) {
|
||||
foreach ($getid3_temp->info['warning'] as $newerror) {
|
||||
if ($track_info['dataformat'] == 'mp3' && preg_match('/^Probable truncated file: expecting \d+ bytes of audio data, only found \d+ \(short by \d+ bytes\)$/', $newerror)) {
|
||||
// LAME/Xing header is probably set, but audio data is chunked into Matroska file and near-impossible to verify if audio stream is complete, so ignore useless warning
|
||||
continue;
|
||||
}
|
||||
$this->warning($class.'() says: ['.$newerror.']');
|
||||
}
|
||||
}
|
||||
@@ -400,7 +392,7 @@ class getid3_matroska extends getid3_handler
|
||||
case 'A_AAC/MPEG2/LC/SBR':
|
||||
case 'A_AAC/MPEG4/LC':
|
||||
case 'A_AAC/MPEG4/LC/SBR':
|
||||
$this->warning($trackarray['CodecID'].' audio data contains no header, audio/video bitrates can\'t be calculated');
|
||||
$this->warning($trackarray['CodecID'].' audio data contains no header, audio/video bitrates can\'t be calculated');
|
||||
break;
|
||||
|
||||
case 'A_VORBIS':
|
||||
@@ -415,10 +407,7 @@ class getid3_matroska extends getid3_handler
|
||||
}
|
||||
$vorbis_offset -= 1;
|
||||
|
||||
if (!getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.ogg.php', __FILE__, false)) {
|
||||
$this->warning('Unable to parse audio data ['.basename(__FILE__).':'.__LINE__.'] because cannot include "module.audio.ogg.php"');
|
||||
break;
|
||||
}
|
||||
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.ogg.php', __FILE__, true);
|
||||
|
||||
// create temp instance
|
||||
$getid3_temp = new getID3();
|
||||
@@ -455,10 +444,7 @@ class getid3_matroska extends getid3_handler
|
||||
break;
|
||||
|
||||
case 'A_MS/ACM':
|
||||
if (!getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, false)) {
|
||||
$this->warning('Unable to parse audio data ['.basename(__FILE__).':'.__LINE__.'] because cannot include "module.audio-video.riff.php"');
|
||||
break;
|
||||
}
|
||||
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, true);
|
||||
|
||||
$parsed = getid3_riff::parseWAVEFORMATex($trackarray['CodecPrivate']);
|
||||
foreach ($parsed as $key => $value) {
|
||||
@@ -515,7 +501,6 @@ class getid3_matroska extends getid3_handler
|
||||
switch ($top_element['id']) {
|
||||
|
||||
case EBML_ID_EBML:
|
||||
$info['fileformat'] = 'matroska';
|
||||
$info['matroska']['header']['offset'] = $top_element['offset'];
|
||||
$info['matroska']['header']['length'] = $top_element['length'];
|
||||
|
||||
@@ -534,6 +519,7 @@ class getid3_matroska extends getid3_handler
|
||||
case EBML_ID_DOCTYPE:
|
||||
$element_data['data'] = getid3_lib::trimNullByte($element_data['data']);
|
||||
$info['matroska']['doctype'] = $element_data['data'];
|
||||
$info['fileformat'] = $element_data['data'];
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1526,8 +1512,8 @@ class getid3_matroska extends getid3_handler
|
||||
$CodecIDlist['V_MPEG4/ISO/AVC'] = 'h264';
|
||||
$CodecIDlist['V_MPEG4/ISO/SP'] = 'mpeg4';
|
||||
$CodecIDlist['V_VP8'] = 'vp8';
|
||||
$CodecIDlist['V_MS/VFW/FOURCC'] = 'riff';
|
||||
$CodecIDlist['A_MS/ACM'] = 'riff';
|
||||
$CodecIDlist['V_MS/VFW/FOURCC'] = 'vcm'; // Microsoft (TM) Video Codec Manager (VCM)
|
||||
$CodecIDlist['A_MS/ACM'] = 'acm'; // Microsoft (TM) Audio Codec Manager (ACM)
|
||||
}
|
||||
return (isset($CodecIDlist[$codecid]) ? $CodecIDlist[$codecid] : $codecid);
|
||||
}
|
||||
@@ -1762,4 +1748,4 @@ class getid3_matroska extends getid3_handler
|
||||
return $info;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// See readme.txt for more details //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -30,7 +31,7 @@ class getid3_quicktime extends getid3_handler
|
||||
$info['quicktime']['hinting'] = false;
|
||||
$info['quicktime']['controller'] = 'standard'; // may be overridden if 'ctyp' atom is present
|
||||
|
||||
fseek($this->getid3->fp, $info['avdataoffset'], SEEK_SET);
|
||||
$this->fseek($info['avdataoffset']);
|
||||
|
||||
$offset = 0;
|
||||
$atomcounter = 0;
|
||||
@@ -40,15 +41,15 @@ class getid3_quicktime extends getid3_handler
|
||||
$info['error'][] = 'Unable to parse atom at offset '.$offset.' because beyond '.round(PHP_INT_MAX / 1073741824).'GB limit of PHP filesystem functions';
|
||||
break;
|
||||
}
|
||||
fseek($this->getid3->fp, $offset, SEEK_SET);
|
||||
$AtomHeader = fread($this->getid3->fp, 8);
|
||||
$this->fseek($offset);
|
||||
$AtomHeader = $this->fread(8);
|
||||
|
||||
$atomsize = getid3_lib::BigEndian2Int(substr($AtomHeader, 0, 4));
|
||||
$atomname = substr($AtomHeader, 4, 4);
|
||||
|
||||
// 64-bit MOV patch by jlegateØktnc*com
|
||||
if ($atomsize == 1) {
|
||||
$atomsize = getid3_lib::BigEndian2Int(fread($this->getid3->fp, 8));
|
||||
$atomsize = getid3_lib::BigEndian2Int($this->fread(8));
|
||||
}
|
||||
|
||||
$info['quicktime'][$atomname]['name'] = $atomname;
|
||||
@@ -66,58 +67,8 @@ class getid3_quicktime extends getid3_handler
|
||||
// to read user data atoms, you should allow for the terminating 0.
|
||||
break;
|
||||
}
|
||||
switch ($atomname) {
|
||||
case 'mdat': // Media DATa atom
|
||||
// 'mdat' contains the actual data for the audio/video
|
||||
if (($atomsize > 8) && (!isset($info['avdataend_tmp']) || ($info['quicktime'][$atomname]['size'] > ($info['avdataend_tmp'] - $info['avdataoffset'])))) {
|
||||
|
||||
$info['avdataoffset'] = $info['quicktime'][$atomname]['offset'] + 8;
|
||||
$OldAVDataEnd = $info['avdataend'];
|
||||
$info['avdataend'] = $info['quicktime'][$atomname]['offset'] + $info['quicktime'][$atomname]['size'];
|
||||
|
||||
$getid3_temp = new getID3();
|
||||
$getid3_temp->openfile($this->getid3->filename);
|
||||
$getid3_temp->info['avdataoffset'] = $info['avdataoffset'];
|
||||
$getid3_temp->info['avdataend'] = $info['avdataend'];
|
||||
$getid3_mp3 = new getid3_mp3($getid3_temp);
|
||||
if ($getid3_mp3->MPEGaudioHeaderValid($getid3_mp3->MPEGaudioHeaderDecode(fread($this->getid3->fp, 4)))) {
|
||||
$getid3_mp3->getOnlyMPEGaudioInfo($getid3_temp->info['avdataoffset'], false);
|
||||
if (!empty($getid3_temp->info['warning'])) {
|
||||
foreach ($getid3_temp->info['warning'] as $value) {
|
||||
$info['warning'][] = $value;
|
||||
}
|
||||
}
|
||||
if (!empty($getid3_temp->info['mpeg'])) {
|
||||
$info['mpeg'] = $getid3_temp->info['mpeg'];
|
||||
if (isset($info['mpeg']['audio'])) {
|
||||
$info['audio']['dataformat'] = 'mp3';
|
||||
$info['audio']['codec'] = (!empty($info['mpeg']['audio']['encoder']) ? $info['mpeg']['audio']['encoder'] : (!empty($info['mpeg']['audio']['codec']) ? $info['mpeg']['audio']['codec'] : (!empty($info['mpeg']['audio']['LAME']) ? 'LAME' :'mp3')));
|
||||
$info['audio']['sample_rate'] = $info['mpeg']['audio']['sample_rate'];
|
||||
$info['audio']['channels'] = $info['mpeg']['audio']['channels'];
|
||||
$info['audio']['bitrate'] = $info['mpeg']['audio']['bitrate'];
|
||||
$info['audio']['bitrate_mode'] = strtolower($info['mpeg']['audio']['bitrate_mode']);
|
||||
$info['bitrate'] = $info['audio']['bitrate'];
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($getid3_mp3, $getid3_temp);
|
||||
$info['avdataend'] = $OldAVDataEnd;
|
||||
unset($OldAVDataEnd);
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
case 'free': // FREE space atom
|
||||
case 'skip': // SKIP atom
|
||||
case 'wide': // 64-bit expansion placeholder atom
|
||||
// 'free', 'skip' and 'wide' are just padding, contains no useful data at all
|
||||
break;
|
||||
|
||||
default:
|
||||
$atomHierarchy = array();
|
||||
$info['quicktime'][$atomname] = $this->QuicktimeParseAtom($atomname, $atomsize, fread($this->getid3->fp, $atomsize), $offset, $atomHierarchy, $this->ParseAllPossibleAtoms);
|
||||
break;
|
||||
}
|
||||
$atomHierarchy = array();
|
||||
$info['quicktime'][$atomname] = $this->QuicktimeParseAtom($atomname, $atomsize, $this->fread(min($atomsize, round($this->getid3->memory_limit / 2))), $offset, $atomHierarchy, $this->ParseAllPossibleAtoms);
|
||||
|
||||
$offset += $atomsize;
|
||||
$atomcounter++;
|
||||
@@ -172,15 +123,12 @@ class getid3_quicktime extends getid3_handler
|
||||
|
||||
$info = &$this->getid3->info;
|
||||
|
||||
//$atom_parent = array_pop($atomHierarchy);
|
||||
$atom_parent = end($atomHierarchy); // http://www.getid3.org/phpBB3/viewtopic.php?t=1717
|
||||
$atom_parent = end($atomHierarchy); // not array_pop($atomHierarchy); see http://www.getid3.org/phpBB3/viewtopic.php?t=1717
|
||||
array_push($atomHierarchy, $atomname);
|
||||
$atom_structure['hierarchy'] = implode(' ', $atomHierarchy);
|
||||
$atom_structure['name'] = $atomname;
|
||||
$atom_structure['size'] = $atomsize;
|
||||
$atom_structure['offset'] = $baseoffset;
|
||||
//echo getid3_lib::PrintHexBytes(substr($atom_data, 0, 8)).'<br>';
|
||||
//echo getid3_lib::PrintHexBytes(substr($atom_data, 0, 8), false).'<br><br>';
|
||||
switch ($atomname) {
|
||||
case 'moov': // MOVie container atom
|
||||
case 'trak': // TRAcK container atom
|
||||
@@ -200,27 +148,27 @@ class getid3_quicktime extends getid3_handler
|
||||
break;
|
||||
|
||||
case 'ilst': // Item LiST container atom
|
||||
$atom_structure['subatoms'] = $this->QuicktimeParseContainerAtom($atom_data, $baseoffset + 8, $atomHierarchy, $ParseAllPossibleAtoms);
|
||||
|
||||
// some "ilst" atoms contain data atoms that have a numeric name, and the data is far more accessible if the returned array is compacted
|
||||
$allnumericnames = true;
|
||||
foreach ($atom_structure['subatoms'] as $subatomarray) {
|
||||
if (!is_integer($subatomarray['name']) || (count($subatomarray['subatoms']) != 1)) {
|
||||
$allnumericnames = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($allnumericnames) {
|
||||
$newData = array();
|
||||
if ($atom_structure['subatoms'] = $this->QuicktimeParseContainerAtom($atom_data, $baseoffset + 8, $atomHierarchy, $ParseAllPossibleAtoms)) {
|
||||
// some "ilst" atoms contain data atoms that have a numeric name, and the data is far more accessible if the returned array is compacted
|
||||
$allnumericnames = true;
|
||||
foreach ($atom_structure['subatoms'] as $subatomarray) {
|
||||
foreach ($subatomarray['subatoms'] as $newData_subatomarray) {
|
||||
unset($newData_subatomarray['hierarchy'], $newData_subatomarray['name']);
|
||||
$newData[$subatomarray['name']] = $newData_subatomarray;
|
||||
if (!is_integer($subatomarray['name']) || (count($subatomarray['subatoms']) != 1)) {
|
||||
$allnumericnames = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$atom_structure['data'] = $newData;
|
||||
unset($atom_structure['subatoms']);
|
||||
if ($allnumericnames) {
|
||||
$newData = array();
|
||||
foreach ($atom_structure['subatoms'] as $subatomarray) {
|
||||
foreach ($subatomarray['subatoms'] as $newData_subatomarray) {
|
||||
unset($newData_subatomarray['hierarchy'], $newData_subatomarray['name']);
|
||||
$newData[$subatomarray['name']] = $newData_subatomarray;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$atom_structure['data'] = $newData;
|
||||
unset($atom_structure['subatoms']);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -308,46 +256,46 @@ class getid3_quicktime extends getid3_handler
|
||||
case 'geID':
|
||||
case 'plID':
|
||||
case 'sfID': // iTunes store country
|
||||
case '©alb': // ALBum
|
||||
case '©art': // ARTist
|
||||
case '©ART':
|
||||
case '©aut':
|
||||
case '©cmt': // CoMmenT
|
||||
case '©com': // COMposer
|
||||
case '©cpy':
|
||||
case '©day': // content created year
|
||||
case '©dir':
|
||||
case '©ed1':
|
||||
case '©ed2':
|
||||
case '©ed3':
|
||||
case '©ed4':
|
||||
case '©ed5':
|
||||
case '©ed6':
|
||||
case '©ed7':
|
||||
case '©ed8':
|
||||
case '©ed9':
|
||||
case '©enc':
|
||||
case '©fmt':
|
||||
case '©gen': // GENre
|
||||
case '©grp': // GRouPing
|
||||
case '©hst':
|
||||
case '©inf':
|
||||
case '©lyr': // LYRics
|
||||
case '©mak':
|
||||
case '©mod':
|
||||
case '©nam': // full NAMe
|
||||
case '©ope':
|
||||
case '©PRD':
|
||||
case '©prd':
|
||||
case '©prf':
|
||||
case '©req':
|
||||
case '©src':
|
||||
case '©swr':
|
||||
case '©too': // encoder
|
||||
case '©trk': // TRacK
|
||||
case '©url':
|
||||
case '©wrn':
|
||||
case '©wrt': // WRiTer
|
||||
case "\xA9".'alb': // ALBum
|
||||
case "\xA9".'art': // ARTist
|
||||
case "\xA9".'ART':
|
||||
case "\xA9".'aut':
|
||||
case "\xA9".'cmt': // CoMmenT
|
||||
case "\xA9".'com': // COMposer
|
||||
case "\xA9".'cpy':
|
||||
case "\xA9".'day': // content created year
|
||||
case "\xA9".'dir':
|
||||
case "\xA9".'ed1':
|
||||
case "\xA9".'ed2':
|
||||
case "\xA9".'ed3':
|
||||
case "\xA9".'ed4':
|
||||
case "\xA9".'ed5':
|
||||
case "\xA9".'ed6':
|
||||
case "\xA9".'ed7':
|
||||
case "\xA9".'ed8':
|
||||
case "\xA9".'ed9':
|
||||
case "\xA9".'enc':
|
||||
case "\xA9".'fmt':
|
||||
case "\xA9".'gen': // GENre
|
||||
case "\xA9".'grp': // GRouPing
|
||||
case "\xA9".'hst':
|
||||
case "\xA9".'inf':
|
||||
case "\xA9".'lyr': // LYRics
|
||||
case "\xA9".'mak':
|
||||
case "\xA9".'mod':
|
||||
case "\xA9".'nam': // full NAMe
|
||||
case "\xA9".'ope':
|
||||
case "\xA9".'PRD':
|
||||
case "\xA9".'prd':
|
||||
case "\xA9".'prf':
|
||||
case "\xA9".'req':
|
||||
case "\xA9".'src':
|
||||
case "\xA9".'swr':
|
||||
case "\xA9".'too': // encoder
|
||||
case "\xA9".'trk': // TRacK
|
||||
case "\xA9".'url':
|
||||
case "\xA9".'wrn':
|
||||
case "\xA9".'wrt': // WRiTer
|
||||
case '----': // itunes specific
|
||||
if ($atom_parent == 'udta') {
|
||||
// User data atom handler
|
||||
@@ -370,7 +318,7 @@ class getid3_quicktime extends getid3_handler
|
||||
$boxsmalltype = substr($atom_data, $atomoffset + 2, 2);
|
||||
$boxsmalldata = substr($atom_data, $atomoffset + 4, $boxsmallsize);
|
||||
if ($boxsmallsize <= 1) {
|
||||
$info['warning'][] = 'Invalid QuickTime atom smallbox size "'.$boxsmallsize.'" in atom "'.$atomname.'" at offset: '.($atom_structure['offset'] + $atomoffset);
|
||||
$info['warning'][] = 'Invalid QuickTime atom smallbox size "'.$boxsmallsize.'" in atom "'.preg_replace('#[^a-zA-Z0-9 _\\-]#', '?', $atomname).'" at offset: '.($atom_structure['offset'] + $atomoffset);
|
||||
$atom_structure['data'] = null;
|
||||
$atomoffset = strlen($atom_data);
|
||||
break;
|
||||
@@ -380,7 +328,7 @@ class getid3_quicktime extends getid3_handler
|
||||
$atom_structure['data'] = $boxsmalldata;
|
||||
break;
|
||||
default:
|
||||
$info['warning'][] = 'Unknown QuickTime smallbox type: "'.getid3_lib::PrintHexBytes($boxsmalltype).'" at offset '.$baseoffset;
|
||||
$info['warning'][] = 'Unknown QuickTime smallbox type: "'.preg_replace('#[^a-zA-Z0-9 _\\-]#', '?', $boxsmalltype).'" ('.trim(getid3_lib::PrintHexBytes($boxsmalltype)).') at offset '.$baseoffset;
|
||||
$atom_structure['data'] = $atom_data;
|
||||
break;
|
||||
}
|
||||
@@ -392,7 +340,7 @@ class getid3_quicktime extends getid3_handler
|
||||
$boxtype = substr($atom_data, $atomoffset + 4, 4);
|
||||
$boxdata = substr($atom_data, $atomoffset + 8, $boxsize - 8);
|
||||
if ($boxsize <= 1) {
|
||||
$info['warning'][] = 'Invalid QuickTime atom box size "'.$boxsize.'" in atom "'.$atomname.'" at offset: '.($atom_structure['offset'] + $atomoffset);
|
||||
$info['warning'][] = 'Invalid QuickTime atom box size "'.$boxsize.'" in atom "'.preg_replace('#[^a-zA-Z0-9 _\\-]#', '?', $atomname).'" at offset: '.($atom_structure['offset'] + $atomoffset);
|
||||
$atom_structure['data'] = null;
|
||||
$atomoffset = strlen($atom_data);
|
||||
break;
|
||||
@@ -409,7 +357,7 @@ class getid3_quicktime extends getid3_handler
|
||||
$atom_structure['version'] = getid3_lib::BigEndian2Int(substr($boxdata, 0, 1));
|
||||
$atom_structure['flags_raw'] = getid3_lib::BigEndian2Int(substr($boxdata, 1, 3));
|
||||
switch ($atom_structure['flags_raw']) {
|
||||
case 0: // data flag
|
||||
case 0: // data flag
|
||||
case 21: // tmpo/cpil flag
|
||||
switch ($atomname) {
|
||||
case 'cpil':
|
||||
@@ -460,17 +408,27 @@ class getid3_quicktime extends getid3_handler
|
||||
}
|
||||
break;
|
||||
|
||||
case 1: // text flag
|
||||
case 1: // text flag
|
||||
case 13: // image flag
|
||||
default:
|
||||
$atom_structure['data'] = substr($boxdata, 8);
|
||||
if ($atomname == 'covr') {
|
||||
// not a foolproof check, but better than nothing
|
||||
if (preg_match('#^\xFF\xD8\xFF#', $atom_structure['data'])) {
|
||||
$atom_structure['image_mime'] = 'image/jpeg';
|
||||
} elseif (preg_match('#^\x89\x50\x4E\x47\x0D\x0A\x1A\x0A#', $atom_structure['data'])) {
|
||||
$atom_structure['image_mime'] = 'image/png';
|
||||
} elseif (preg_match('#^GIF#', $atom_structure['data'])) {
|
||||
$atom_structure['image_mime'] = 'image/gif';
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
$info['warning'][] = 'Unknown QuickTime box type: "'.getid3_lib::PrintHexBytes($boxtype).'" at offset '.$baseoffset;
|
||||
$info['warning'][] = 'Unknown QuickTime box type: "'.preg_replace('#[^a-zA-Z0-9 _\\-]#', '?', $boxtype).'" ('.trim(getid3_lib::PrintHexBytes($boxtype)).') at offset '.$baseoffset;
|
||||
$atom_structure['data'] = $atom_data;
|
||||
|
||||
}
|
||||
@@ -840,7 +798,12 @@ if (!empty($atom_structure['sample_description_table'][$i]['width']) && !empty($
|
||||
$sttsEntriesDataOffset = 8;
|
||||
//$FrameRateCalculatorArray = array();
|
||||
$frames_count = 0;
|
||||
for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
|
||||
|
||||
$max_stts_entries_to_scan = min(floor($this->getid3->memory_limit / 10000), $atom_structure['number_entries']);
|
||||
if ($max_stts_entries_to_scan < $atom_structure['number_entries']) {
|
||||
$info['warning'][] = 'QuickTime atom "stts" has '.$atom_structure['number_entries'].' but only scanning the first '.$max_stts_entries_to_scan.' entries due to limited PHP memory available ('.floor($this->getid3->memory_limit / 1048576).'MB).';
|
||||
}
|
||||
for ($i = 0; $i < $max_stts_entries_to_scan; $i++) {
|
||||
$atom_structure['time_to_sample_table'][$i]['sample_count'] = getid3_lib::BigEndian2Int(substr($atom_data, $sttsEntriesDataOffset, 4));
|
||||
$sttsEntriesDataOffset += 4;
|
||||
$atom_structure['time_to_sample_table'][$i]['sample_duration'] = getid3_lib::BigEndian2Int(substr($atom_data, $sttsEntriesDataOffset, 4));
|
||||
@@ -1086,8 +1049,8 @@ if (!empty($atom_structure['sample_description_table'][$i]['width']) && !empty($
|
||||
case 'sync': // SYNChronization atom
|
||||
case 'scpt': // tranSCriPT atom
|
||||
case 'ssrc': // non-primary SouRCe atom
|
||||
for ($i = 0; $i < (strlen($atom_data) % 4); $i++) {
|
||||
$atom_structure['track_id'][$i] = getid3_lib::BigEndian2Int(substr($atom_data, $i * 4, 4));
|
||||
for ($i = 0; $i < strlen($atom_data); $i += 4) {
|
||||
@$atom_structure['track_id'][] = getid3_lib::BigEndian2Int(substr($atom_data, $i, 4));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1260,10 +1223,76 @@ if (!empty($atom_structure['sample_description_table'][$i]['width']) && !empty($
|
||||
break;
|
||||
|
||||
case 'mdat': // Media DATa atom
|
||||
// 'mdat' contains the actual data for the audio/video, possibly also subtitles
|
||||
|
||||
/* due to lack of known documentation, this is a kludge implementation. If you know of documentation on how mdat is properly structed, please send it to info@getid3.org */
|
||||
|
||||
// first, skip any 'wide' padding, and second 'mdat' header (with specified size of zero?)
|
||||
$mdat_offset = 0;
|
||||
while (true) {
|
||||
if (substr($atom_data, $mdat_offset, 8) == "\x00\x00\x00\x08".'wide') {
|
||||
$mdat_offset += 8;
|
||||
} elseif (substr($atom_data, $mdat_offset, 8) == "\x00\x00\x00\x00".'mdat') {
|
||||
$mdat_offset += 8;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// check to see if it looks like chapter titles, in the form of unterminated strings with a leading 16-bit size field
|
||||
while (($chapter_string_length = getid3_lib::BigEndian2Int(substr($atom_data, $mdat_offset, 2)))
|
||||
&& ($chapter_string_length < 1000)
|
||||
&& ($chapter_string_length <= (strlen($atom_data) - $mdat_offset - 2))
|
||||
&& preg_match('#^[\x20-\xFF]+$#', substr($atom_data, $mdat_offset + 2, $chapter_string_length), $chapter_matches)) {
|
||||
$mdat_offset += (2 + $chapter_string_length);
|
||||
@$info['quicktime']['comments']['chapters'][] = $chapter_matches[0];
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (($atomsize > 8) && (!isset($info['avdataend_tmp']) || ($info['quicktime'][$atomname]['size'] > ($info['avdataend_tmp'] - $info['avdataoffset'])))) {
|
||||
|
||||
$info['avdataoffset'] = $atom_structure['offset'] + 8; // $info['quicktime'][$atomname]['offset'] + 8;
|
||||
$OldAVDataEnd = $info['avdataend'];
|
||||
$info['avdataend'] = $atom_structure['offset'] + $atom_structure['size']; // $info['quicktime'][$atomname]['offset'] + $info['quicktime'][$atomname]['size'];
|
||||
|
||||
$getid3_temp = new getID3();
|
||||
$getid3_temp->openfile($this->getid3->filename);
|
||||
$getid3_temp->info['avdataoffset'] = $info['avdataoffset'];
|
||||
$getid3_temp->info['avdataend'] = $info['avdataend'];
|
||||
$getid3_mp3 = new getid3_mp3($getid3_temp);
|
||||
if ($getid3_mp3->MPEGaudioHeaderValid($getid3_mp3->MPEGaudioHeaderDecode($this->fread(4)))) {
|
||||
$getid3_mp3->getOnlyMPEGaudioInfo($getid3_temp->info['avdataoffset'], false);
|
||||
if (!empty($getid3_temp->info['warning'])) {
|
||||
foreach ($getid3_temp->info['warning'] as $value) {
|
||||
$info['warning'][] = $value;
|
||||
}
|
||||
}
|
||||
if (!empty($getid3_temp->info['mpeg'])) {
|
||||
$info['mpeg'] = $getid3_temp->info['mpeg'];
|
||||
if (isset($info['mpeg']['audio'])) {
|
||||
$info['audio']['dataformat'] = 'mp3';
|
||||
$info['audio']['codec'] = (!empty($info['mpeg']['audio']['encoder']) ? $info['mpeg']['audio']['encoder'] : (!empty($info['mpeg']['audio']['codec']) ? $info['mpeg']['audio']['codec'] : (!empty($info['mpeg']['audio']['LAME']) ? 'LAME' :'mp3')));
|
||||
$info['audio']['sample_rate'] = $info['mpeg']['audio']['sample_rate'];
|
||||
$info['audio']['channels'] = $info['mpeg']['audio']['channels'];
|
||||
$info['audio']['bitrate'] = $info['mpeg']['audio']['bitrate'];
|
||||
$info['audio']['bitrate_mode'] = strtolower($info['mpeg']['audio']['bitrate_mode']);
|
||||
$info['bitrate'] = $info['audio']['bitrate'];
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($getid3_mp3, $getid3_temp);
|
||||
$info['avdataend'] = $OldAVDataEnd;
|
||||
unset($OldAVDataEnd);
|
||||
|
||||
}
|
||||
|
||||
unset($mdat_offset, $chapter_string_length, $chapter_matches);
|
||||
break;
|
||||
|
||||
case 'free': // FREE space atom
|
||||
case 'skip': // SKIP atom
|
||||
case 'wide': // 64-bit expansion placeholder atom
|
||||
// 'mdat' data is too big to deal with, contains no useful metadata
|
||||
// 'free', 'skip' and 'wide' are just padding, contains no useful data at all
|
||||
|
||||
// When writing QuickTime files, it is sometimes necessary to update an atom's size.
|
||||
@@ -1329,7 +1358,7 @@ if (!empty($atom_structure['sample_description_table'][$i]['width']) && !empty($
|
||||
//$atom_structure['data'] = $atom_data;
|
||||
break;
|
||||
|
||||
case '©xyz': // GPS latitude+longitude+altitude
|
||||
case "\xA9".'xyz': // GPS latitude+longitude+altitude
|
||||
$atom_structure['data'] = $atom_data;
|
||||
if (preg_match('#([\\+\\-][0-9\\.]+)([\\+\\-][0-9\\.]+)([\\+\\-][0-9\\.]+)?/$#i', $atom_data, $matches)) {
|
||||
@list($all, $latitude, $longitude, $altitude) = $matches;
|
||||
@@ -1358,16 +1387,12 @@ if (!empty($atom_structure['sample_description_table'][$i]['width']) && !empty($
|
||||
$info['quicktime']['comments']['picture'][] = array('image_mime'=>$atom_structure['image_mime'], 'data'=>$atom_data, 'description'=>$atom_structure['description']);
|
||||
}
|
||||
break;
|
||||
case 'NCHD': // MakerNoteVersion
|
||||
// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html
|
||||
$atom_structure['data'] = $atom_data;
|
||||
break;
|
||||
case 'NCTG': // NikonTags
|
||||
// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html#NCTG
|
||||
case 'NCTG': // Nikon - http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html#NCTG
|
||||
$atom_structure['data'] = $this->QuicktimeParseNikonNCTG($atom_data);
|
||||
break;
|
||||
case 'NCDB': // NikonTags
|
||||
// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html
|
||||
case 'NCHD': // Nikon:MakerNoteVersion - http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html
|
||||
case 'NCDB': // Nikon - http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html
|
||||
case 'CNCV': // Canon:CompressorVersion - http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Canon.html
|
||||
$atom_structure['data'] = $atom_data;
|
||||
break;
|
||||
|
||||
@@ -1391,7 +1416,7 @@ if (!empty($atom_structure['sample_description_table'][$i]['width']) && !empty($
|
||||
break;
|
||||
|
||||
default:
|
||||
$info['warning'][] = 'Unknown QuickTime atom type: "'.$atomname.'" ('.trim(getid3_lib::PrintHexBytes($atomname)).') at offset '.$baseoffset;
|
||||
$info['warning'][] = 'Unknown QuickTime atom type: "'.preg_replace('#[^a-zA-Z0-9 _\\-]#', '?', $atomname).'" ('.trim(getid3_lib::PrintHexBytes($atomname)).') at offset '.$baseoffset;
|
||||
$atom_structure['data'] = $atom_data;
|
||||
break;
|
||||
}
|
||||
@@ -2086,58 +2111,58 @@ echo 'QuicktimeParseNikonNCTG()::unknown $data_size_type: '.$data_size_type.'<br
|
||||
public function CopyToAppropriateCommentsSection($keyname, $data, $boxname='') {
|
||||
static $handyatomtranslatorarray = array();
|
||||
if (empty($handyatomtranslatorarray)) {
|
||||
$handyatomtranslatorarray['©cpy'] = 'copyright';
|
||||
$handyatomtranslatorarray['©day'] = 'creation_date'; // iTunes 4.0
|
||||
$handyatomtranslatorarray['©dir'] = 'director';
|
||||
$handyatomtranslatorarray['©ed1'] = 'edit1';
|
||||
$handyatomtranslatorarray['©ed2'] = 'edit2';
|
||||
$handyatomtranslatorarray['©ed3'] = 'edit3';
|
||||
$handyatomtranslatorarray['©ed4'] = 'edit4';
|
||||
$handyatomtranslatorarray['©ed5'] = 'edit5';
|
||||
$handyatomtranslatorarray['©ed6'] = 'edit6';
|
||||
$handyatomtranslatorarray['©ed7'] = 'edit7';
|
||||
$handyatomtranslatorarray['©ed8'] = 'edit8';
|
||||
$handyatomtranslatorarray['©ed9'] = 'edit9';
|
||||
$handyatomtranslatorarray['©fmt'] = 'format';
|
||||
$handyatomtranslatorarray['©inf'] = 'information';
|
||||
$handyatomtranslatorarray['©prd'] = 'producer';
|
||||
$handyatomtranslatorarray['©prf'] = 'performers';
|
||||
$handyatomtranslatorarray['©req'] = 'system_requirements';
|
||||
$handyatomtranslatorarray['©src'] = 'source_credit';
|
||||
$handyatomtranslatorarray['©wrt'] = 'writer';
|
||||
$handyatomtranslatorarray["\xA9".'cpy'] = 'copyright';
|
||||
$handyatomtranslatorarray["\xA9".'day'] = 'creation_date'; // iTunes 4.0
|
||||
$handyatomtranslatorarray["\xA9".'dir'] = 'director';
|
||||
$handyatomtranslatorarray["\xA9".'ed1'] = 'edit1';
|
||||
$handyatomtranslatorarray["\xA9".'ed2'] = 'edit2';
|
||||
$handyatomtranslatorarray["\xA9".'ed3'] = 'edit3';
|
||||
$handyatomtranslatorarray["\xA9".'ed4'] = 'edit4';
|
||||
$handyatomtranslatorarray["\xA9".'ed5'] = 'edit5';
|
||||
$handyatomtranslatorarray["\xA9".'ed6'] = 'edit6';
|
||||
$handyatomtranslatorarray["\xA9".'ed7'] = 'edit7';
|
||||
$handyatomtranslatorarray["\xA9".'ed8'] = 'edit8';
|
||||
$handyatomtranslatorarray["\xA9".'ed9'] = 'edit9';
|
||||
$handyatomtranslatorarray["\xA9".'fmt'] = 'format';
|
||||
$handyatomtranslatorarray["\xA9".'inf'] = 'information';
|
||||
$handyatomtranslatorarray["\xA9".'prd'] = 'producer';
|
||||
$handyatomtranslatorarray["\xA9".'prf'] = 'performers';
|
||||
$handyatomtranslatorarray["\xA9".'req'] = 'system_requirements';
|
||||
$handyatomtranslatorarray["\xA9".'src'] = 'source_credit';
|
||||
$handyatomtranslatorarray["\xA9".'wrt'] = 'writer';
|
||||
|
||||
// http://www.geocities.com/xhelmboyx/quicktime/formats/qtm-layout.txt
|
||||
$handyatomtranslatorarray['©nam'] = 'title'; // iTunes 4.0
|
||||
$handyatomtranslatorarray['©cmt'] = 'comment'; // iTunes 4.0
|
||||
$handyatomtranslatorarray['©wrn'] = 'warning';
|
||||
$handyatomtranslatorarray['©hst'] = 'host_computer';
|
||||
$handyatomtranslatorarray['©mak'] = 'make';
|
||||
$handyatomtranslatorarray['©mod'] = 'model';
|
||||
$handyatomtranslatorarray['©PRD'] = 'product';
|
||||
$handyatomtranslatorarray['©swr'] = 'software';
|
||||
$handyatomtranslatorarray['©aut'] = 'author';
|
||||
$handyatomtranslatorarray['©ART'] = 'artist';
|
||||
$handyatomtranslatorarray['©trk'] = 'track';
|
||||
$handyatomtranslatorarray['©alb'] = 'album'; // iTunes 4.0
|
||||
$handyatomtranslatorarray['©com'] = 'comment';
|
||||
$handyatomtranslatorarray['©gen'] = 'genre'; // iTunes 4.0
|
||||
$handyatomtranslatorarray['©ope'] = 'composer';
|
||||
$handyatomtranslatorarray['©url'] = 'url';
|
||||
$handyatomtranslatorarray['©enc'] = 'encoder';
|
||||
$handyatomtranslatorarray["\xA9".'nam'] = 'title'; // iTunes 4.0
|
||||
$handyatomtranslatorarray["\xA9".'cmt'] = 'comment'; // iTunes 4.0
|
||||
$handyatomtranslatorarray["\xA9".'wrn'] = 'warning';
|
||||
$handyatomtranslatorarray["\xA9".'hst'] = 'host_computer';
|
||||
$handyatomtranslatorarray["\xA9".'mak'] = 'make';
|
||||
$handyatomtranslatorarray["\xA9".'mod'] = 'model';
|
||||
$handyatomtranslatorarray["\xA9".'PRD'] = 'product';
|
||||
$handyatomtranslatorarray["\xA9".'swr'] = 'software';
|
||||
$handyatomtranslatorarray["\xA9".'aut'] = 'author';
|
||||
$handyatomtranslatorarray["\xA9".'ART'] = 'artist';
|
||||
$handyatomtranslatorarray["\xA9".'trk'] = 'track';
|
||||
$handyatomtranslatorarray["\xA9".'alb'] = 'album'; // iTunes 4.0
|
||||
$handyatomtranslatorarray["\xA9".'com'] = 'comment';
|
||||
$handyatomtranslatorarray["\xA9".'gen'] = 'genre'; // iTunes 4.0
|
||||
$handyatomtranslatorarray["\xA9".'ope'] = 'composer';
|
||||
$handyatomtranslatorarray["\xA9".'url'] = 'url';
|
||||
$handyatomtranslatorarray["\xA9".'enc'] = 'encoder';
|
||||
|
||||
// http://atomicparsley.sourceforge.net/mpeg-4files.html
|
||||
$handyatomtranslatorarray['©art'] = 'artist'; // iTunes 4.0
|
||||
$handyatomtranslatorarray["\xA9".'art'] = 'artist'; // iTunes 4.0
|
||||
$handyatomtranslatorarray['aART'] = 'album_artist';
|
||||
$handyatomtranslatorarray['trkn'] = 'track_number'; // iTunes 4.0
|
||||
$handyatomtranslatorarray['disk'] = 'disc_number'; // iTunes 4.0
|
||||
$handyatomtranslatorarray['gnre'] = 'genre'; // iTunes 4.0
|
||||
$handyatomtranslatorarray['©too'] = 'encoder'; // iTunes 4.0
|
||||
$handyatomtranslatorarray["\xA9".'too'] = 'encoder'; // iTunes 4.0
|
||||
$handyatomtranslatorarray['tmpo'] = 'bpm'; // iTunes 4.0
|
||||
$handyatomtranslatorarray['cprt'] = 'copyright'; // iTunes 4.0?
|
||||
$handyatomtranslatorarray['cpil'] = 'compilation'; // iTunes 4.0
|
||||
$handyatomtranslatorarray['covr'] = 'picture'; // iTunes 4.0
|
||||
$handyatomtranslatorarray['rtng'] = 'rating'; // iTunes 4.0
|
||||
$handyatomtranslatorarray['©grp'] = 'grouping'; // iTunes 4.2
|
||||
$handyatomtranslatorarray["\xA9".'grp'] = 'grouping'; // iTunes 4.2
|
||||
$handyatomtranslatorarray['stik'] = 'stik'; // iTunes 4.9
|
||||
$handyatomtranslatorarray['pcst'] = 'podcast'; // iTunes 4.9
|
||||
$handyatomtranslatorarray['catg'] = 'category'; // iTunes 4.9
|
||||
@@ -2145,7 +2170,7 @@ echo 'QuicktimeParseNikonNCTG()::unknown $data_size_type: '.$data_size_type.'<br
|
||||
$handyatomtranslatorarray['purl'] = 'podcast_url'; // iTunes 4.9
|
||||
$handyatomtranslatorarray['egid'] = 'episode_guid'; // iTunes 4.9
|
||||
$handyatomtranslatorarray['desc'] = 'description'; // iTunes 5.0
|
||||
$handyatomtranslatorarray['©lyr'] = 'lyrics'; // iTunes 5.0
|
||||
$handyatomtranslatorarray["\xA9".'lyr'] = 'lyrics'; // iTunes 5.0
|
||||
$handyatomtranslatorarray['tvnn'] = 'tv_network_name'; // iTunes 6.0
|
||||
$handyatomtranslatorarray['tvsh'] = 'tv_show_name'; // iTunes 6.0
|
||||
$handyatomtranslatorarray['tvsn'] = 'tv_season'; // iTunes 6.0
|
||||
@@ -2218,4 +2243,4 @@ echo 'QuicktimeParseNikonNCTG()::unknown $data_size_type: '.$data_size_type.'<br
|
||||
return substr($pascalstring, 1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// See readme.txt for more details //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -26,8 +27,9 @@ getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.mp3.php', __FILE_
|
||||
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.ac3.php', __FILE__, true);
|
||||
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.dts.php', __FILE__, true);
|
||||
|
||||
class getid3_riff extends getid3_handler
|
||||
{
|
||||
class getid3_riff extends getid3_handler {
|
||||
|
||||
protected $container = 'riff'; // default
|
||||
|
||||
public function Analyze() {
|
||||
$info = &$this->getid3->info;
|
||||
@@ -58,7 +60,8 @@ class getid3_riff extends getid3_handler
|
||||
switch ($RIFFtype) {
|
||||
|
||||
case 'FORM': // AIFF, AIFC
|
||||
$info['fileformat'] = 'aiff';
|
||||
//$info['fileformat'] = 'aiff';
|
||||
$this->container = 'aiff';
|
||||
$thisfile_riff['header_size'] = $this->EitherEndian2Int($RIFFsize);
|
||||
$thisfile_riff[$RIFFsubtype] = $this->ParseRIFF($offset, ($offset + $thisfile_riff['header_size'] - 4));
|
||||
break;
|
||||
@@ -66,13 +69,18 @@ class getid3_riff extends getid3_handler
|
||||
case 'RIFF': // AVI, WAV, etc
|
||||
case 'SDSS': // SDSS is identical to RIFF, just renamed. Used by SmartSound QuickTracks (www.smartsound.com)
|
||||
case 'RMP3': // RMP3 is identical to RIFF, just renamed. Used by [unknown program] when creating RIFF-MP3s
|
||||
$info['fileformat'] = 'riff';
|
||||
//$info['fileformat'] = 'riff';
|
||||
$this->container = 'riff';
|
||||
$thisfile_riff['header_size'] = $this->EitherEndian2Int($RIFFsize);
|
||||
if ($RIFFsubtype == 'RMP3') {
|
||||
// RMP3 is identical to WAVE, just renamed. Used by [unknown program] when creating RIFF-MP3s
|
||||
$RIFFsubtype = 'WAVE';
|
||||
}
|
||||
$thisfile_riff[$RIFFsubtype] = $this->ParseRIFF($offset, ($offset + $thisfile_riff['header_size'] - 4));
|
||||
if ($RIFFsubtype != 'AMV ') {
|
||||
// AMV files are RIFF-AVI files with parts of the spec deliberately broken, such as chunk size fields hardcoded to zero (because players known in hardware that these fields are always a certain size
|
||||
// Handled separately in ParseRIFFAMV()
|
||||
$thisfile_riff[$RIFFsubtype] = $this->ParseRIFF($offset, ($offset + $thisfile_riff['header_size'] - 4));
|
||||
}
|
||||
if (($info['avdataend'] - $info['filesize']) == 1) {
|
||||
// LiteWave appears to incorrectly *not* pad actual output file
|
||||
// to nearest WORD boundary so may appear to be short by one
|
||||
@@ -110,16 +118,19 @@ class getid3_riff extends getid3_handler
|
||||
$nextRIFFoffset = $chunkdata['offset'] + $chunkdata['size'];
|
||||
|
||||
switch ($nextRIFFheaderID) {
|
||||
|
||||
case 'RIFF':
|
||||
$chunkdata['chunks'] = $this->ParseRIFF($chunkdata['offset'] + 4, $nextRIFFoffset);
|
||||
|
||||
if (!isset($thisfile_riff[$nextRIFFtype])) {
|
||||
$thisfile_riff[$nextRIFFtype] = array();
|
||||
}
|
||||
$thisfile_riff[$nextRIFFtype][] = $chunkdata;
|
||||
break;
|
||||
|
||||
case 'AMV ':
|
||||
unset($info['riff']);
|
||||
$info['amv'] = $this->ParseRIFFAMV($chunkdata['offset'] + 4, $nextRIFFoffset);
|
||||
break;
|
||||
|
||||
case 'JUNK':
|
||||
// ignore
|
||||
$thisfile_riff[$nextRIFFheaderID][] = $chunkdata;
|
||||
@@ -152,13 +163,17 @@ class getid3_riff extends getid3_handler
|
||||
|
||||
default:
|
||||
$this->error('Cannot parse RIFF (this is maybe not a RIFF / WAV / AVI file?) - expecting "FORM|RIFF|SDSS|RMP3" found "'.$RIFFsubtype.'" instead');
|
||||
unset($info['fileformat']);
|
||||
//unset($info['fileformat']);
|
||||
return false;
|
||||
}
|
||||
|
||||
$streamindex = 0;
|
||||
switch ($RIFFsubtype) {
|
||||
|
||||
// http://en.wikipedia.org/wiki/Wav
|
||||
case 'WAVE':
|
||||
$info['fileformat'] = 'wav';
|
||||
|
||||
if (empty($thisfile_audio['bitrate_mode'])) {
|
||||
$thisfile_audio['bitrate_mode'] = 'cbr';
|
||||
}
|
||||
@@ -588,10 +603,13 @@ class getid3_riff extends getid3_handler
|
||||
}
|
||||
break;
|
||||
|
||||
// http://en.wikipedia.org/wiki/Audio_Video_Interleave
|
||||
case 'AVI ':
|
||||
$info['fileformat'] = 'avi';
|
||||
$info['mime_type'] = 'video/avi';
|
||||
|
||||
$thisfile_video['bitrate_mode'] = 'vbr'; // maybe not, but probably
|
||||
$thisfile_video['dataformat'] = 'avi';
|
||||
$info['mime_type'] = 'video/avi';
|
||||
|
||||
if (isset($thisfile_riff[$RIFFsubtype]['movi']['offset'])) {
|
||||
$info['avdataoffset'] = $thisfile_riff[$RIFFsubtype]['movi']['offset'] + 8;
|
||||
@@ -825,7 +843,7 @@ class getid3_riff extends getid3_handler
|
||||
|
||||
switch ($strhfccType) {
|
||||
case 'vids':
|
||||
$thisfile_riff_raw_strf_strhfccType_streamindex = self::ParseBITMAPINFOHEADER(substr($strfData, 0, 40), ($info['fileformat'] == 'riff'));
|
||||
$thisfile_riff_raw_strf_strhfccType_streamindex = self::ParseBITMAPINFOHEADER(substr($strfData, 0, 40), ($this->container == 'riff'));
|
||||
$thisfile_video['bits_per_sample'] = $thisfile_riff_raw_strf_strhfccType_streamindex['biBitCount'];
|
||||
|
||||
if ($thisfile_riff_video_current['codec'] == 'DV') {
|
||||
@@ -875,11 +893,28 @@ class getid3_riff extends getid3_handler
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 'AMV ':
|
||||
$info['fileformat'] = 'amv';
|
||||
$info['mime_type'] = 'video/amv';
|
||||
|
||||
$thisfile_video['bitrate_mode'] = 'vbr'; // it's MJPEG, presumably contant-quality encoding, thereby VBR
|
||||
$thisfile_video['dataformat'] = 'mjpeg';
|
||||
$thisfile_video['codec'] = 'mjpeg';
|
||||
$thisfile_video['lossless'] = false;
|
||||
$thisfile_video['bits_per_sample'] = 24;
|
||||
|
||||
$thisfile_audio['dataformat'] = 'adpcm';
|
||||
$thisfile_audio['lossless'] = false;
|
||||
break;
|
||||
|
||||
|
||||
// http://en.wikipedia.org/wiki/CD-DA
|
||||
case 'CDDA':
|
||||
$thisfile_audio['bitrate_mode'] = 'cbr';
|
||||
$info['fileformat'] = 'cda';
|
||||
unset($info['mime_type']);
|
||||
|
||||
$thisfile_audio_dataformat = 'cda';
|
||||
$thisfile_audio['lossless'] = true;
|
||||
unset($info['mime_type']);
|
||||
|
||||
$info['avdataoffset'] = 44;
|
||||
|
||||
@@ -901,6 +936,7 @@ class getid3_riff extends getid3_handler
|
||||
$info['playtime_seconds'] = $thisfile_riff_CDDA_fmt_0['playtime_seconds'];
|
||||
|
||||
// hardcoded data for CD-audio
|
||||
$thisfile_audio['lossless'] = true;
|
||||
$thisfile_audio['sample_rate'] = 44100;
|
||||
$thisfile_audio['channels'] = 2;
|
||||
$thisfile_audio['bits_per_sample'] = 16;
|
||||
@@ -909,13 +945,15 @@ class getid3_riff extends getid3_handler
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
// http://en.wikipedia.org/wiki/AIFF
|
||||
case 'AIFF':
|
||||
case 'AIFC':
|
||||
$info['fileformat'] = 'aiff';
|
||||
$info['mime_type'] = 'audio/x-aiff';
|
||||
|
||||
$thisfile_audio['bitrate_mode'] = 'cbr';
|
||||
$thisfile_audio_dataformat = 'aiff';
|
||||
$thisfile_audio['lossless'] = true;
|
||||
$info['mime_type'] = 'audio/x-aiff';
|
||||
|
||||
if (isset($thisfile_riff[$RIFFsubtype]['SSND'][0]['offset'])) {
|
||||
$info['avdataoffset'] = $thisfile_riff[$RIFFsubtype]['SSND'][0]['offset'] + 8;
|
||||
@@ -1028,12 +1066,15 @@ class getid3_riff extends getid3_handler
|
||||
*/
|
||||
break;
|
||||
|
||||
// http://en.wikipedia.org/wiki/8SVX
|
||||
case '8SVX':
|
||||
$info['fileformat'] = '8svx';
|
||||
$info['mime_type'] = 'audio/8svx';
|
||||
|
||||
$thisfile_audio['bitrate_mode'] = 'cbr';
|
||||
$thisfile_audio_dataformat = '8svx';
|
||||
$thisfile_audio['bits_per_sample'] = 8;
|
||||
$thisfile_audio['channels'] = 1; // overridden below, if need be
|
||||
$info['mime_type'] = 'audio/x-aiff';
|
||||
|
||||
if (isset($thisfile_riff[$RIFFsubtype]['BODY'][0]['offset'])) {
|
||||
$info['avdataoffset'] = $thisfile_riff[$RIFFsubtype]['BODY'][0]['offset'] + 8;
|
||||
@@ -1108,31 +1149,31 @@ class getid3_riff extends getid3_handler
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 'CDXA':
|
||||
$info['mime_type'] = 'video/mpeg';
|
||||
$info['fileformat'] = 'vcd'; // Asume Video CD
|
||||
$info['mime_type'] = 'video/mpeg';
|
||||
|
||||
if (!empty($thisfile_riff['CDXA']['data'][0]['size'])) {
|
||||
if (getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.mpeg.php', __FILE__, false)) {
|
||||
$getid3_temp = new getID3();
|
||||
$getid3_temp->openfile($this->getid3->filename);
|
||||
$getid3_mpeg = new getid3_mpeg($getid3_temp);
|
||||
$getid3_mpeg->Analyze();
|
||||
if (empty($getid3_temp->info['error'])) {
|
||||
$info['audio'] = $getid3_temp->info['audio'];
|
||||
$info['video'] = $getid3_temp->info['video'];
|
||||
$info['mpeg'] = $getid3_temp->info['mpeg'];
|
||||
$info['warning'] = $getid3_temp->info['warning'];
|
||||
}
|
||||
unset($getid3_temp, $getid3_mpeg);
|
||||
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.mpeg.php', __FILE__, true);
|
||||
|
||||
$getid3_temp = new getID3();
|
||||
$getid3_temp->openfile($this->getid3->filename);
|
||||
$getid3_mpeg = new getid3_mpeg($getid3_temp);
|
||||
$getid3_mpeg->Analyze();
|
||||
if (empty($getid3_temp->info['error'])) {
|
||||
$info['audio'] = $getid3_temp->info['audio'];
|
||||
$info['video'] = $getid3_temp->info['video'];
|
||||
$info['mpeg'] = $getid3_temp->info['mpeg'];
|
||||
$info['warning'] = $getid3_temp->info['warning'];
|
||||
}
|
||||
unset($getid3_temp, $getid3_mpeg);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
$info['error'][] = 'Unknown RIFF type: expecting one of (WAVE|RMP3|AVI |CDDA|AIFF|AIFC|8SVX|CDXA), found "'.$RIFFsubtype.'" instead';
|
||||
unset($info['fileformat']);
|
||||
break;
|
||||
//unset($info['fileformat']);
|
||||
}
|
||||
|
||||
switch ($RIFFsubtype) {
|
||||
@@ -1150,6 +1191,7 @@ class getid3_riff extends getid3_handler
|
||||
|
||||
if (isset($thisfile_riff[$RIFFsubtype]['id3 '])) {
|
||||
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.id3v2.php', __FILE__, true);
|
||||
|
||||
$getid3_temp = new getID3();
|
||||
$getid3_temp->openfile($this->getid3->filename);
|
||||
$getid3_id3v2 = new getid3_id3v2($getid3_temp);
|
||||
@@ -1278,6 +1320,115 @@ class getid3_riff extends getid3_handler
|
||||
return true;
|
||||
}
|
||||
|
||||
public function ParseRIFFAMV($startoffset, $maxoffset) {
|
||||
// AMV files are RIFF-AVI files with parts of the spec deliberately broken, such as chunk size fields hardcoded to zero (because players known in hardware that these fields are always a certain size
|
||||
|
||||
// https://code.google.com/p/amv-codec-tools/wiki/AmvDocumentation
|
||||
//typedef struct _amvmainheader {
|
||||
//FOURCC fcc; // 'amvh'
|
||||
//DWORD cb;
|
||||
//DWORD dwMicroSecPerFrame;
|
||||
//BYTE reserve[28];
|
||||
//DWORD dwWidth;
|
||||
//DWORD dwHeight;
|
||||
//DWORD dwSpeed;
|
||||
//DWORD reserve0;
|
||||
//DWORD reserve1;
|
||||
//BYTE bTimeSec;
|
||||
//BYTE bTimeMin;
|
||||
//WORD wTimeHour;
|
||||
//} AMVMAINHEADER;
|
||||
|
||||
$info = &$this->getid3->info;
|
||||
$RIFFchunk = false;
|
||||
|
||||
try {
|
||||
|
||||
$this->fseek($startoffset);
|
||||
$maxoffset = min($maxoffset, $info['avdataend']);
|
||||
$AMVheader = $this->fread(284);
|
||||
if (substr($AMVheader, 0, 8) != 'hdrlamvh') {
|
||||
throw new Exception('expecting "hdrlamv" at offset '.($startoffset + 0).', found "'.substr($AMVheader, 0, 8).'"');
|
||||
}
|
||||
if (substr($AMVheader, 8, 4) != "\x38\x00\x00\x00") { // "amvh" chunk size, hardcoded to 0x38 = 56 bytes
|
||||
throw new Exception('expecting "0x38000000" at offset '.($startoffset + 8).', found "'.getid3_lib::PrintHexBytes(substr($AMVheader, 8, 4)).'"');
|
||||
}
|
||||
$RIFFchunk = array();
|
||||
$RIFFchunk['amvh']['us_per_frame'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 12, 4));
|
||||
$RIFFchunk['amvh']['reserved28'] = substr($AMVheader, 16, 28); // null? reserved?
|
||||
$RIFFchunk['amvh']['resolution_x'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 44, 4));
|
||||
$RIFFchunk['amvh']['resolution_y'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 48, 4));
|
||||
$RIFFchunk['amvh']['frame_rate_int'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 52, 4));
|
||||
$RIFFchunk['amvh']['reserved0'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 56, 4)); // 1? reserved?
|
||||
$RIFFchunk['amvh']['reserved1'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 60, 4)); // 0? reserved?
|
||||
$RIFFchunk['amvh']['runtime_sec'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 64, 1));
|
||||
$RIFFchunk['amvh']['runtime_min'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 65, 1));
|
||||
$RIFFchunk['amvh']['runtime_hrs'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 66, 2));
|
||||
|
||||
$info['video']['frame_rate'] = 1000000 / $RIFFchunk['amvh']['us_per_frame'];
|
||||
$info['video']['resolution_x'] = $RIFFchunk['amvh']['resolution_x'];
|
||||
$info['video']['resolution_y'] = $RIFFchunk['amvh']['resolution_y'];
|
||||
$info['playtime_seconds'] = ($RIFFchunk['amvh']['runtime_hrs'] * 3600) + ($RIFFchunk['amvh']['runtime_min'] * 60) + $RIFFchunk['amvh']['runtime_sec'];
|
||||
|
||||
// the rest is all hardcoded(?) and does not appear to be useful until you get to audio info at offset 256, even then everything is probably hardcoded
|
||||
|
||||
if (substr($AMVheader, 68, 20) != 'LIST'."\x00\x00\x00\x00".'strlstrh'."\x38\x00\x00\x00") {
|
||||
throw new Exception('expecting "LIST<0x00000000>strlstrh<0x38000000>" at offset '.($startoffset + 68).', found "'.getid3_lib::PrintHexBytes(substr($AMVheader, 68, 20)).'"');
|
||||
}
|
||||
// followed by 56 bytes of null: substr($AMVheader, 88, 56) -> 144
|
||||
if (substr($AMVheader, 144, 8) != 'strf'."\x24\x00\x00\x00") {
|
||||
throw new Exception('expecting "strf<0x24000000>" at offset '.($startoffset + 144).', found "'.getid3_lib::PrintHexBytes(substr($AMVheader, 144, 8)).'"');
|
||||
}
|
||||
// followed by 36 bytes of null: substr($AMVheader, 144, 36) -> 180
|
||||
|
||||
if (substr($AMVheader, 188, 20) != 'LIST'."\x00\x00\x00\x00".'strlstrh'."\x30\x00\x00\x00") {
|
||||
throw new Exception('expecting "LIST<0x00000000>strlstrh<0x30000000>" at offset '.($startoffset + 188).', found "'.getid3_lib::PrintHexBytes(substr($AMVheader, 188, 20)).'"');
|
||||
}
|
||||
// followed by 48 bytes of null: substr($AMVheader, 208, 48) -> 256
|
||||
if (substr($AMVheader, 256, 8) != 'strf'."\x14\x00\x00\x00") {
|
||||
throw new Exception('expecting "strf<0x14000000>" at offset '.($startoffset + 256).', found "'.getid3_lib::PrintHexBytes(substr($AMVheader, 256, 8)).'"');
|
||||
}
|
||||
// followed by 20 bytes of a modified WAVEFORMATEX:
|
||||
// typedef struct {
|
||||
// WORD wFormatTag; //(Fixme: this is equal to PCM's 0x01 format code)
|
||||
// WORD nChannels; //(Fixme: this is always 1)
|
||||
// DWORD nSamplesPerSec; //(Fixme: for all known sample files this is equal to 22050)
|
||||
// DWORD nAvgBytesPerSec; //(Fixme: for all known sample files this is equal to 44100)
|
||||
// WORD nBlockAlign; //(Fixme: this seems to be 2 in AMV files, is this correct ?)
|
||||
// WORD wBitsPerSample; //(Fixme: this seems to be 16 in AMV files instead of the expected 4)
|
||||
// WORD cbSize; //(Fixme: this seems to be 0 in AMV files)
|
||||
// WORD reserved;
|
||||
// } WAVEFORMATEX;
|
||||
$RIFFchunk['strf']['wformattag'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 264, 2));
|
||||
$RIFFchunk['strf']['nchannels'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 266, 2));
|
||||
$RIFFchunk['strf']['nsamplespersec'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 268, 4));
|
||||
$RIFFchunk['strf']['navgbytespersec'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 272, 4));
|
||||
$RIFFchunk['strf']['nblockalign'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 276, 2));
|
||||
$RIFFchunk['strf']['wbitspersample'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 278, 2));
|
||||
$RIFFchunk['strf']['cbsize'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 280, 2));
|
||||
$RIFFchunk['strf']['reserved'] = getid3_lib::LittleEndian2Int(substr($AMVheader, 282, 2));
|
||||
|
||||
|
||||
$info['audio']['lossless'] = false;
|
||||
$info['audio']['sample_rate'] = $RIFFchunk['strf']['nsamplespersec'];
|
||||
$info['audio']['channels'] = $RIFFchunk['strf']['nchannels'];
|
||||
$info['audio']['bits_per_sample'] = $RIFFchunk['strf']['wbitspersample'];
|
||||
$info['audio']['bitrate'] = $info['audio']['sample_rate'] * $info['audio']['channels'] * $info['audio']['bits_per_sample'];
|
||||
$info['audio']['bitrate_mode'] = 'cbr';
|
||||
|
||||
|
||||
} catch (getid3_exception $e) {
|
||||
if ($e->getCode() == 10) {
|
||||
$this->warning('RIFFAMV parser: '.$e->getMessage());
|
||||
} else {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
return $RIFFchunk;
|
||||
}
|
||||
|
||||
|
||||
public function ParseRIFF($startoffset, $maxoffset) {
|
||||
$info = &$this->getid3->info;
|
||||
|
||||
@@ -1329,7 +1480,7 @@ class getid3_riff extends getid3_handler
|
||||
$getid3_temp->openfile($this->getid3->filename);
|
||||
$getid3_temp->info['avdataoffset'] = $this->ftell() - 4;
|
||||
$getid3_temp->info['avdataend'] = $this->ftell() + $AudioChunkSize;
|
||||
$getid3_mp3 = new getid3_mp3($getid3_temp);
|
||||
$getid3_mp3 = new getid3_mp3($getid3_temp, __CLASS__);
|
||||
$getid3_mp3->getOnlyMPEGaudioInfo($getid3_temp->info['avdataoffset'], false);
|
||||
if (isset($getid3_temp->info['mpeg']['audio'])) {
|
||||
$info['mpeg']['audio'] = $getid3_temp->info['mpeg']['audio'];
|
||||
@@ -1412,7 +1563,7 @@ class getid3_riff extends getid3_handler
|
||||
$getid3_temp->openfile($this->getid3->filename);
|
||||
$getid3_temp->info['avdataoffset'] = $info['avdataoffset'];
|
||||
$getid3_temp->info['avdataend'] = $info['avdataend'];
|
||||
$getid3_mp3 = new getid3_mp3($getid3_temp);
|
||||
$getid3_mp3 = new getid3_mp3($getid3_temp, __CLASS__);
|
||||
$getid3_mp3->getOnlyMPEGaudioInfo($info['avdataoffset'], false);
|
||||
if (empty($getid3_temp->info['error'])) {
|
||||
$info['audio'] = $getid3_temp->info['audio'];
|
||||
@@ -2426,10 +2577,10 @@ class getid3_riff extends getid3_handler
|
||||
}
|
||||
|
||||
private function EitherEndian2Int($byteword, $signed=false) {
|
||||
if ($this->getid3->info['fileformat'] == 'riff') {
|
||||
if ($this->container == 'riff') {
|
||||
return getid3_lib::LittleEndian2Int($byteword, $signed);
|
||||
}
|
||||
return getid3_lib::BigEndian2Int($byteword, false, $signed);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// See readme.txt for more details //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -470,4 +471,4 @@ class getid3_ac3 extends getid3_handler
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// See readme.txt for more details //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -287,4 +288,4 @@ class getid3_dts extends getid3_handler
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// See readme.txt for more details //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -439,4 +440,4 @@ class getid3_flac extends getid3_handler
|
||||
return (isset($lookup[$type_id]) ? $lookup[$type_id] : 'reserved');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// See readme.txt for more details //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -95,8 +96,8 @@ class getid3_mp3 extends getid3_handler
|
||||
|
||||
// Not sure what version of LAME this is - look in padding of last frame for longer version string
|
||||
$PossibleLAMEversionStringOffset = $info['avdataend'] - $PossiblyLongerLAMEversion_FrameLength;
|
||||
fseek($this->getid3->fp, $PossibleLAMEversionStringOffset);
|
||||
$PossiblyLongerLAMEversion_Data = fread($this->getid3->fp, $PossiblyLongerLAMEversion_FrameLength);
|
||||
$this->fseek($PossibleLAMEversionStringOffset);
|
||||
$PossiblyLongerLAMEversion_Data = $this->fread($PossiblyLongerLAMEversion_FrameLength);
|
||||
switch (substr($CurrentDataLAMEversionString, -1)) {
|
||||
case 'a':
|
||||
case 'b':
|
||||
@@ -422,12 +423,12 @@ class getid3_mp3 extends getid3_handler
|
||||
$MPEGaudioEmphasisLookup = self::MPEGaudioEmphasisArray();
|
||||
}
|
||||
|
||||
if (fseek($this->getid3->fp, $offset, SEEK_SET) != 0) {
|
||||
if ($this->fseek($offset) != 0) {
|
||||
$info['error'][] = 'decodeMPEGaudioHeader() failed to seek to next offset at '.$offset;
|
||||
return false;
|
||||
}
|
||||
//$headerstring = fread($this->getid3->fp, 1441); // worst-case max length = 32kHz @ 320kbps layer 3 = 1441 bytes/frame
|
||||
$headerstring = fread($this->getid3->fp, 226); // LAME header at offset 36 + 190 bytes of Xing/LAME data
|
||||
//$headerstring = $this->fread(1441); // worst-case max length = 32kHz @ 320kbps layer 3 = 1441 bytes/frame
|
||||
$headerstring = $this->fread(226); // LAME header at offset 36 + 190 bytes of Xing/LAME data
|
||||
|
||||
// MP3 audio frame structure:
|
||||
// $aa $aa $aa $aa [$bb $bb] $cc...
|
||||
@@ -890,19 +891,21 @@ class getid3_mp3 extends getid3_handler
|
||||
|
||||
if (($ExpectedNumberOfAudioBytes > 0) && ($ExpectedNumberOfAudioBytes != ($info['avdataend'] - $info['avdataoffset']))) {
|
||||
if ($ExpectedNumberOfAudioBytes > ($info['avdataend'] - $info['avdataoffset'])) {
|
||||
if (isset($info['fileformat']) && ($info['fileformat'] == 'riff')) {
|
||||
if ($this->isDependencyFor('matroska') || $this->isDependencyFor('riff')) {
|
||||
// ignore, audio data is broken into chunks so will always be data "missing"
|
||||
} elseif (($ExpectedNumberOfAudioBytes - ($info['avdataend'] - $info['avdataoffset'])) == 1) {
|
||||
$info['warning'][] = 'Last byte of data truncated (this is a known bug in Meracl ID3 Tag Writer before v1.3.5)';
|
||||
} else {
|
||||
$info['warning'][] = 'Probable truncated file: expecting '.$ExpectedNumberOfAudioBytes.' bytes of audio data, only found '.($info['avdataend'] - $info['avdataoffset']).' (short by '.($ExpectedNumberOfAudioBytes - ($info['avdataend'] - $info['avdataoffset'])).' bytes)';
|
||||
}
|
||||
elseif (($ExpectedNumberOfAudioBytes - ($info['avdataend'] - $info['avdataoffset'])) == 1) {
|
||||
$this->warning('Last byte of data truncated (this is a known bug in Meracl ID3 Tag Writer before v1.3.5)');
|
||||
}
|
||||
else {
|
||||
$this->warning('Probable truncated file: expecting '.$ExpectedNumberOfAudioBytes.' bytes of audio data, only found '.($info['avdataend'] - $info['avdataoffset']).' (short by '.($ExpectedNumberOfAudioBytes - ($info['avdataend'] - $info['avdataoffset'])).' bytes)');
|
||||
}
|
||||
} else {
|
||||
if ((($info['avdataend'] - $info['avdataoffset']) - $ExpectedNumberOfAudioBytes) == 1) {
|
||||
// $prenullbytefileoffset = ftell($this->getid3->fp);
|
||||
// fseek($this->getid3->fp, $info['avdataend'], SEEK_SET);
|
||||
// $PossibleNullByte = fread($this->getid3->fp, 1);
|
||||
// fseek($this->getid3->fp, $prenullbytefileoffset, SEEK_SET);
|
||||
// $prenullbytefileoffset = $this->ftell();
|
||||
// $this->fseek($info['avdataend']);
|
||||
// $PossibleNullByte = $this->fread(1);
|
||||
// $this->fseek($prenullbytefileoffset);
|
||||
// if ($PossibleNullByte === "\x00") {
|
||||
$info['avdataend']--;
|
||||
// $info['warning'][] = 'Extra null byte at end of MP3 data assumed to be RIFF padding and therefore ignored';
|
||||
@@ -1118,8 +1121,8 @@ class getid3_mp3 extends getid3_handler
|
||||
public function FreeFormatFrameLength($offset, $deepscan=false) {
|
||||
$info = &$this->getid3->info;
|
||||
|
||||
fseek($this->getid3->fp, $offset, SEEK_SET);
|
||||
$MPEGaudioData = fread($this->getid3->fp, 32768);
|
||||
$this->fseek($offset);
|
||||
$MPEGaudioData = $this->fread(32768);
|
||||
|
||||
$SyncPattern1 = substr($MPEGaudioData, 0, 4);
|
||||
// may be different pattern due to padding
|
||||
@@ -1166,8 +1169,8 @@ class getid3_mp3 extends getid3_handler
|
||||
$ActualFrameLengthValues = array();
|
||||
$nextoffset = $offset + $framelength;
|
||||
while ($nextoffset < ($info['avdataend'] - 6)) {
|
||||
fseek($this->getid3->fp, $nextoffset - 1, SEEK_SET);
|
||||
$NextSyncPattern = fread($this->getid3->fp, 6);
|
||||
$this->fseek($nextoffset - 1);
|
||||
$NextSyncPattern = $this->fread(6);
|
||||
if ((substr($NextSyncPattern, 1, strlen($SyncPattern1)) == $SyncPattern1) || (substr($NextSyncPattern, 1, strlen($SyncPattern2)) == $SyncPattern2)) {
|
||||
// good - found where expected
|
||||
$ActualFrameLengthValues[] = $framelength;
|
||||
@@ -1215,22 +1218,22 @@ class getid3_mp3 extends getid3_handler
|
||||
$Distribution['padding'] = array();
|
||||
|
||||
$info = &$this->getid3->info;
|
||||
fseek($this->getid3->fp, $info['avdataoffset'], SEEK_SET);
|
||||
$this->fseek($info['avdataoffset']);
|
||||
|
||||
$max_frames_scan = 5000;
|
||||
$frames_scanned = 0;
|
||||
|
||||
$previousvalidframe = $info['avdataoffset'];
|
||||
while (ftell($this->getid3->fp) < $info['avdataend']) {
|
||||
while ($this->ftell() < $info['avdataend']) {
|
||||
set_time_limit(30);
|
||||
$head4 = fread($this->getid3->fp, 4);
|
||||
$head4 = $this->fread(4);
|
||||
if (strlen($head4) < 4) {
|
||||
break;
|
||||
}
|
||||
if ($head4{0} != "\xFF") {
|
||||
for ($i = 1; $i < 4; $i++) {
|
||||
if ($head4{$i} == "\xFF") {
|
||||
fseek($this->getid3->fp, $i - 4, SEEK_CUR);
|
||||
$this->fseek($i - 4, SEEK_CUR);
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
@@ -1258,9 +1261,9 @@ class getid3_mp3 extends getid3_handler
|
||||
$LongMPEGfrequencyLookup[$head4]);
|
||||
}
|
||||
if ($MPEGaudioHeaderLengthCache[$head4] > 4) {
|
||||
$WhereWeWere = ftell($this->getid3->fp);
|
||||
fseek($this->getid3->fp, $MPEGaudioHeaderLengthCache[$head4] - 4, SEEK_CUR);
|
||||
$next4 = fread($this->getid3->fp, 4);
|
||||
$WhereWeWere = $this->ftell();
|
||||
$this->fseek($MPEGaudioHeaderLengthCache[$head4] - 4, SEEK_CUR);
|
||||
$next4 = $this->fread(4);
|
||||
if ($next4{0} == "\xFF") {
|
||||
if (!isset($MPEGaudioHeaderDecodeCache[$next4])) {
|
||||
$MPEGaudioHeaderDecodeCache[$next4] = self::MPEGaudioHeaderDecode($next4);
|
||||
@@ -1269,7 +1272,7 @@ class getid3_mp3 extends getid3_handler
|
||||
$MPEGaudioHeaderValidCache[$next4] = self::MPEGaudioHeaderValid($MPEGaudioHeaderDecodeCache[$next4], false, false);
|
||||
}
|
||||
if ($MPEGaudioHeaderValidCache[$next4]) {
|
||||
fseek($this->getid3->fp, -4, SEEK_CUR);
|
||||
$this->fseek(-4, SEEK_CUR);
|
||||
|
||||
getid3_lib::safe_inc($Distribution['bitrate'][$LongMPEGbitrateLookup[$head4]]);
|
||||
getid3_lib::safe_inc($Distribution['layer'][$LongMPEGlayerLookup[$head4]]);
|
||||
@@ -1277,7 +1280,7 @@ class getid3_mp3 extends getid3_handler
|
||||
getid3_lib::safe_inc($Distribution['padding'][intval($LongMPEGpaddingLookup[$head4])]);
|
||||
getid3_lib::safe_inc($Distribution['frequency'][$LongMPEGfrequencyLookup[$head4]]);
|
||||
if ($max_frames_scan && (++$frames_scanned >= $max_frames_scan)) {
|
||||
$pct_data_scanned = (ftell($this->getid3->fp) - $info['avdataoffset']) / ($info['avdataend'] - $info['avdataoffset']);
|
||||
$pct_data_scanned = ($this->ftell() - $info['avdataoffset']) / ($info['avdataend'] - $info['avdataoffset']);
|
||||
$info['warning'][] = 'too many MPEG audio frames to scan, only scanned first '.$max_frames_scan.' frames ('.number_format($pct_data_scanned * 100, 1).'% of file) and extrapolated distribution, playtime and bitrate may be incorrect.';
|
||||
foreach ($Distribution as $key1 => $value1) {
|
||||
foreach ($value1 as $key2 => $value2) {
|
||||
@@ -1290,7 +1293,7 @@ class getid3_mp3 extends getid3_handler
|
||||
}
|
||||
}
|
||||
unset($next4);
|
||||
fseek($this->getid3->fp, $WhereWeWere - 3, SEEK_SET);
|
||||
$this->fseek($WhereWeWere - 3);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1355,13 +1358,13 @@ class getid3_mp3 extends getid3_handler
|
||||
|
||||
}
|
||||
|
||||
fseek($this->getid3->fp, $avdataoffset, SEEK_SET);
|
||||
$this->fseek($avdataoffset);
|
||||
$sync_seek_buffer_size = min(128 * 1024, $info['avdataend'] - $avdataoffset);
|
||||
if ($sync_seek_buffer_size <= 0) {
|
||||
$info['error'][] = 'Invalid $sync_seek_buffer_size at offset '.$avdataoffset;
|
||||
return false;
|
||||
}
|
||||
$header = fread($this->getid3->fp, $sync_seek_buffer_size);
|
||||
$header = $this->fread($sync_seek_buffer_size);
|
||||
$sync_seek_buffer_size = strlen($header);
|
||||
$SynchSeekOffset = 0;
|
||||
while ($SynchSeekOffset < $sync_seek_buffer_size) {
|
||||
@@ -1473,7 +1476,7 @@ class getid3_mp3 extends getid3_handler
|
||||
|
||||
$dummy = array('error'=>$info['error'], 'warning'=>$info['warning'], 'avdataend'=>$info['avdataend'], 'avdataoffset'=>$info['avdataoffset']);
|
||||
$synchstartoffset = $info['avdataoffset'];
|
||||
fseek($this->getid3->fp, $info['avdataoffset'], SEEK_SET);
|
||||
$this->fseek($info['avdataoffset']);
|
||||
|
||||
// you can play with these numbers:
|
||||
$max_frames_scan = 50000;
|
||||
@@ -1488,13 +1491,13 @@ class getid3_mp3 extends getid3_handler
|
||||
$pct_data_scanned = 0;
|
||||
for ($current_segment = 0; $current_segment < $max_scan_segments; $current_segment++) {
|
||||
$frames_scanned_this_segment = 0;
|
||||
if (ftell($this->getid3->fp) >= $info['avdataend']) {
|
||||
if ($this->ftell() >= $info['avdataend']) {
|
||||
break;
|
||||
}
|
||||
$scan_start_offset[$current_segment] = max(ftell($this->getid3->fp), $info['avdataoffset'] + round($current_segment * (($info['avdataend'] - $info['avdataoffset']) / $max_scan_segments)));
|
||||
$scan_start_offset[$current_segment] = max($this->ftell(), $info['avdataoffset'] + round($current_segment * (($info['avdataend'] - $info['avdataoffset']) / $max_scan_segments)));
|
||||
if ($current_segment > 0) {
|
||||
fseek($this->getid3->fp, $scan_start_offset[$current_segment], SEEK_SET);
|
||||
$buffer_4k = fread($this->getid3->fp, 4096);
|
||||
$this->fseek($scan_start_offset[$current_segment]);
|
||||
$buffer_4k = $this->fread(4096);
|
||||
for ($j = 0; $j < (strlen($buffer_4k) - 4); $j++) {
|
||||
if (($buffer_4k{$j} == "\xFF") && ($buffer_4k{($j + 1)} > "\xE0")) { // synch detected
|
||||
if ($this->decodeMPEGaudioHeader($scan_start_offset[$current_segment] + $j, $dummy, false, false, $FastMode)) {
|
||||
@@ -1523,7 +1526,7 @@ class getid3_mp3 extends getid3_handler
|
||||
}
|
||||
$frames_scanned++;
|
||||
if ($frames_scan_per_segment && (++$frames_scanned_this_segment >= $frames_scan_per_segment)) {
|
||||
$this_pct_scanned = (ftell($this->getid3->fp) - $scan_start_offset[$current_segment]) / ($info['avdataend'] - $info['avdataoffset']);
|
||||
$this_pct_scanned = ($this->ftell() - $scan_start_offset[$current_segment]) / ($info['avdataend'] - $info['avdataoffset']);
|
||||
if (($current_segment == 0) && (($this_pct_scanned * $max_scan_segments) >= 1)) {
|
||||
// file likely contains < $max_frames_scan, just scan as one segment
|
||||
$max_scan_segments = 1;
|
||||
@@ -2006,4 +2009,4 @@ class getid3_mp3 extends getid3_handler
|
||||
return (isset($LAMEpresetUsedLookup[$LAMEtag['preset_used_id']]) ? $LAMEpresetUsedLookup[$LAMEtag['preset_used_id']] : 'new/unknown preset: '.$LAMEtag['preset_used_id'].' - report to info@getid3.org');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// See readme.txt for more details //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -114,6 +115,66 @@ class getid3_ogg extends getid3_handler
|
||||
$info['audio']['bitrate_mode'] = 'vbr';
|
||||
}
|
||||
|
||||
} elseif (substr($filedata, 0, 7) == "\x80".'theora') {
|
||||
|
||||
// http://www.theora.org/doc/Theora.pdf (section 6.2)
|
||||
|
||||
$info['ogg']['pageheader']['theora']['theora_magic'] = substr($filedata, $filedataoffset, 7); // hard-coded to "\x80.'theora'
|
||||
$filedataoffset += 7;
|
||||
$info['ogg']['pageheader']['theora']['version_major'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset, 1));
|
||||
$filedataoffset += 1;
|
||||
$info['ogg']['pageheader']['theora']['version_minor'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset, 1));
|
||||
$filedataoffset += 1;
|
||||
$info['ogg']['pageheader']['theora']['version_revision'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset, 1));
|
||||
$filedataoffset += 1;
|
||||
$info['ogg']['pageheader']['theora']['frame_width_macroblocks'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset, 2));
|
||||
$filedataoffset += 2;
|
||||
$info['ogg']['pageheader']['theora']['frame_height_macroblocks'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset, 2));
|
||||
$filedataoffset += 2;
|
||||
$info['ogg']['pageheader']['theora']['resolution_x'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset, 3));
|
||||
$filedataoffset += 3;
|
||||
$info['ogg']['pageheader']['theora']['resolution_y'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset, 3));
|
||||
$filedataoffset += 3;
|
||||
$info['ogg']['pageheader']['theora']['picture_offset_x'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset, 1));
|
||||
$filedataoffset += 1;
|
||||
$info['ogg']['pageheader']['theora']['picture_offset_y'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset, 1));
|
||||
$filedataoffset += 1;
|
||||
$info['ogg']['pageheader']['theora']['frame_rate_numerator'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset, 4));
|
||||
$filedataoffset += 4;
|
||||
$info['ogg']['pageheader']['theora']['frame_rate_denominator'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset, 4));
|
||||
$filedataoffset += 4;
|
||||
$info['ogg']['pageheader']['theora']['pixel_aspect_numerator'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset, 3));
|
||||
$filedataoffset += 3;
|
||||
$info['ogg']['pageheader']['theora']['pixel_aspect_denominator'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset, 3));
|
||||
$filedataoffset += 3;
|
||||
$info['ogg']['pageheader']['theora']['color_space_id'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset, 1));
|
||||
$filedataoffset += 1;
|
||||
$info['ogg']['pageheader']['theora']['nominal_bitrate'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset, 3));
|
||||
$filedataoffset += 3;
|
||||
$info['ogg']['pageheader']['theora']['flags'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset, 2));
|
||||
$filedataoffset += 2;
|
||||
|
||||
$info['ogg']['pageheader']['theora']['quality'] = ($info['ogg']['pageheader']['theora']['flags'] & 0xFC00) >> 10;
|
||||
$info['ogg']['pageheader']['theora']['kfg_shift'] = ($info['ogg']['pageheader']['theora']['flags'] & 0x03E0) >> 5;
|
||||
$info['ogg']['pageheader']['theora']['pixel_format_id'] = ($info['ogg']['pageheader']['theora']['flags'] & 0x0018) >> 3;
|
||||
$info['ogg']['pageheader']['theora']['reserved'] = ($info['ogg']['pageheader']['theora']['flags'] & 0x0007) >> 0; // should be 0
|
||||
$info['ogg']['pageheader']['theora']['color_space'] = self::TheoraColorSpace($info['ogg']['pageheader']['theora']['color_space_id']);
|
||||
$info['ogg']['pageheader']['theora']['pixel_format'] = self::TheoraPixelFormat($info['ogg']['pageheader']['theora']['pixel_format_id']);
|
||||
|
||||
$info['video']['dataformat'] = 'theora';
|
||||
$info['mime_type'] = 'video/ogg';
|
||||
//$info['audio']['bitrate_mode'] = 'abr';
|
||||
//$info['audio']['lossless'] = false;
|
||||
$info['video']['resolution_x'] = $info['ogg']['pageheader']['theora']['resolution_x'];
|
||||
$info['video']['resolution_y'] = $info['ogg']['pageheader']['theora']['resolution_y'];
|
||||
if ($info['ogg']['pageheader']['theora']['frame_rate_denominator'] > 0) {
|
||||
$info['video']['frame_rate'] = (float) $info['ogg']['pageheader']['theora']['frame_rate_numerator'] / $info['ogg']['pageheader']['theora']['frame_rate_denominator'];
|
||||
}
|
||||
if ($info['ogg']['pageheader']['theora']['pixel_aspect_denominator'] > 0) {
|
||||
$info['video']['pixel_aspect_ratio'] = (float) $info['ogg']['pageheader']['theora']['pixel_aspect_numerator'] / $info['ogg']['pageheader']['theora']['pixel_aspect_denominator'];
|
||||
}
|
||||
$info['warning'][] = 'Ogg Theora (v3) not fully supported in this version of getID3 ['.$this->getid3->version().'] -- bitrate, playtime and all audio data are currently unavailable';
|
||||
|
||||
|
||||
} elseif (substr($filedata, 0, 8) == "fishead\x00") {
|
||||
|
||||
@@ -172,8 +233,8 @@ class getid3_ogg extends getid3_handler
|
||||
|
||||
} elseif (substr($filedata, 1, 6) == 'theora') {
|
||||
|
||||
$info['video']['dataformat'] = 'theora';
|
||||
$info['error'][] = 'Ogg Theora not correctly handled in this version of getID3 ['.$this->getid3->version().']';
|
||||
$info['video']['dataformat'] = 'theora1';
|
||||
$info['error'][] = 'Ogg Theora (v1) not correctly handled in this version of getID3 ['.$this->getid3->version().']';
|
||||
//break;
|
||||
|
||||
} elseif (substr($filedata, 1, 6) == 'vorbis') {
|
||||
@@ -668,4 +729,28 @@ class getid3_ogg extends getid3_handler
|
||||
return round($qval, 1); // 5 or 4.9
|
||||
}
|
||||
|
||||
}
|
||||
public static function TheoraColorSpace($colorspace_id) {
|
||||
// http://www.theora.org/doc/Theora.pdf (table 6.3)
|
||||
static $TheoraColorSpaceLookup = array();
|
||||
if (empty($TheoraColorSpaceLookup)) {
|
||||
$TheoraColorSpaceLookup[0] = 'Undefined';
|
||||
$TheoraColorSpaceLookup[1] = 'Rec. 470M';
|
||||
$TheoraColorSpaceLookup[2] = 'Rec. 470BG';
|
||||
$TheoraColorSpaceLookup[3] = 'Reserved';
|
||||
}
|
||||
return (isset($TheoraColorSpaceLookup[$colorspace_id]) ? $TheoraColorSpaceLookup[$colorspace_id] : null);
|
||||
}
|
||||
|
||||
public static function TheoraPixelFormat($pixelformat_id) {
|
||||
// http://www.theora.org/doc/Theora.pdf (table 6.4)
|
||||
static $TheoraPixelFormatLookup = array();
|
||||
if (empty($TheoraPixelFormatLookup)) {
|
||||
$TheoraPixelFormatLookup[0] = '4:2:0';
|
||||
$TheoraPixelFormatLookup[1] = 'Reserved';
|
||||
$TheoraPixelFormatLookup[2] = '4:2:2';
|
||||
$TheoraPixelFormatLookup[3] = '4:4:4';
|
||||
}
|
||||
return (isset($TheoraPixelFormatLookup[$pixelformat_id]) ? $TheoraPixelFormatLookup[$pixelformat_id] : null);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// See readme.txt for more details //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -32,8 +33,8 @@ class getid3_apetag extends getid3_handler
|
||||
|
||||
if ($this->overrideendoffset == 0) {
|
||||
|
||||
fseek($this->getid3->fp, 0 - $id3v1tagsize - $apetagheadersize - $lyrics3tagsize, SEEK_END);
|
||||
$APEfooterID3v1 = fread($this->getid3->fp, $id3v1tagsize + $apetagheadersize + $lyrics3tagsize);
|
||||
$this->fseek(0 - $id3v1tagsize - $apetagheadersize - $lyrics3tagsize, SEEK_END);
|
||||
$APEfooterID3v1 = $this->fread($id3v1tagsize + $apetagheadersize + $lyrics3tagsize);
|
||||
|
||||
//if (preg_match('/APETAGEX.{24}TAG.{125}$/i', $APEfooterID3v1)) {
|
||||
if (substr($APEfooterID3v1, strlen($APEfooterID3v1) - $id3v1tagsize - $apetagheadersize, 8) == 'APETAGEX') {
|
||||
@@ -51,8 +52,8 @@ class getid3_apetag extends getid3_handler
|
||||
|
||||
} else {
|
||||
|
||||
fseek($this->getid3->fp, $this->overrideendoffset - $apetagheadersize, SEEK_SET);
|
||||
if (fread($this->getid3->fp, 8) == 'APETAGEX') {
|
||||
$this->fseek($this->overrideendoffset - $apetagheadersize);
|
||||
if ($this->fread(8) == 'APETAGEX') {
|
||||
$info['ape']['tag_offset_end'] = $this->overrideendoffset;
|
||||
}
|
||||
|
||||
@@ -68,21 +69,21 @@ class getid3_apetag extends getid3_handler
|
||||
// shortcut
|
||||
$thisfile_ape = &$info['ape'];
|
||||
|
||||
fseek($this->getid3->fp, $thisfile_ape['tag_offset_end'] - $apetagheadersize, SEEK_SET);
|
||||
$APEfooterData = fread($this->getid3->fp, 32);
|
||||
$this->fseek($thisfile_ape['tag_offset_end'] - $apetagheadersize);
|
||||
$APEfooterData = $this->fread(32);
|
||||
if (!($thisfile_ape['footer'] = $this->parseAPEheaderFooter($APEfooterData))) {
|
||||
$info['error'][] = 'Error parsing APE footer at offset '.$thisfile_ape['tag_offset_end'];
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isset($thisfile_ape['footer']['flags']['header']) && $thisfile_ape['footer']['flags']['header']) {
|
||||
fseek($this->getid3->fp, $thisfile_ape['tag_offset_end'] - $thisfile_ape['footer']['raw']['tagsize'] - $apetagheadersize, SEEK_SET);
|
||||
$thisfile_ape['tag_offset_start'] = ftell($this->getid3->fp);
|
||||
$APEtagData = fread($this->getid3->fp, $thisfile_ape['footer']['raw']['tagsize'] + $apetagheadersize);
|
||||
$this->fseek($thisfile_ape['tag_offset_end'] - $thisfile_ape['footer']['raw']['tagsize'] - $apetagheadersize);
|
||||
$thisfile_ape['tag_offset_start'] = $this->ftell();
|
||||
$APEtagData = $this->fread($thisfile_ape['footer']['raw']['tagsize'] + $apetagheadersize);
|
||||
} else {
|
||||
$thisfile_ape['tag_offset_start'] = $thisfile_ape['tag_offset_end'] - $thisfile_ape['footer']['raw']['tagsize'];
|
||||
fseek($this->getid3->fp, $thisfile_ape['tag_offset_start'], SEEK_SET);
|
||||
$APEtagData = fread($this->getid3->fp, $thisfile_ape['footer']['raw']['tagsize']);
|
||||
$this->fseek($thisfile_ape['tag_offset_start']);
|
||||
$APEtagData = $this->fread($thisfile_ape['footer']['raw']['tagsize']);
|
||||
}
|
||||
$info['avdataend'] = $thisfile_ape['tag_offset_start'];
|
||||
|
||||
@@ -367,4 +368,4 @@ class getid3_apetag extends getid3_handler
|
||||
return in_array(strtolower($itemkey), $APEtagItemIsUTF8Lookup);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// See readme.txt for more details //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -25,9 +26,9 @@ class getid3_id3v1 extends getid3_handler
|
||||
return false;
|
||||
}
|
||||
|
||||
fseek($this->getid3->fp, -256, SEEK_END);
|
||||
$preid3v1 = fread($this->getid3->fp, 128);
|
||||
$id3v1tag = fread($this->getid3->fp, 128);
|
||||
$this->fseek(-256, SEEK_END);
|
||||
$preid3v1 = $this->fread(128);
|
||||
$id3v1tag = $this->fread(128);
|
||||
|
||||
if (substr($id3v1tag, 0, 3) == 'TAG') {
|
||||
|
||||
@@ -356,4 +357,4 @@ class getid3_id3v1 extends getid3_handler
|
||||
return $ID3v1Tag;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// See readme.txt for more details //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -51,8 +52,8 @@ class getid3_id3v2 extends getid3_handler
|
||||
$thisfile_id3v2_flags = &$thisfile_id3v2['flags'];
|
||||
|
||||
|
||||
fseek($this->getid3->fp, $this->StartingOffset, SEEK_SET);
|
||||
$header = fread($this->getid3->fp, 10);
|
||||
$this->fseek($this->StartingOffset);
|
||||
$header = $this->fread(10);
|
||||
if (substr($header, 0, 3) == 'ID3' && strlen($header) == 10) {
|
||||
|
||||
$thisfile_id3v2['majorversion'] = ord($header{3});
|
||||
@@ -131,7 +132,7 @@ class getid3_id3v2 extends getid3_handler
|
||||
}
|
||||
if ($sizeofframes > 0) {
|
||||
|
||||
$framedata = fread($this->getid3->fp, $sizeofframes); // read all frames from file into $framedata variable
|
||||
$framedata = $this->fread($sizeofframes); // read all frames from file into $framedata variable
|
||||
|
||||
// if entire frame data is unsynched, de-unsynch it now (ID3v2.3.x)
|
||||
if (!empty($thisfile_id3v2_flags['unsynch']) && ($id3v2_majorversion <= 3)) {
|
||||
@@ -423,7 +424,7 @@ class getid3_id3v2 extends getid3_handler
|
||||
// ID3v2 size 4 * %0xxxxxxx
|
||||
|
||||
if (isset($thisfile_id3v2_flags['isfooter']) && $thisfile_id3v2_flags['isfooter']) {
|
||||
$footer = fread($this->getid3->fp, 10);
|
||||
$footer = $this->fread(10);
|
||||
if (substr($footer, 0, 3) == '3DI') {
|
||||
$thisfile_id3v2['footer'] = true;
|
||||
$thisfile_id3v2['majorversion_footer'] = ord($footer{3});
|
||||
@@ -642,7 +643,12 @@ class getid3_id3v2 extends getid3_handler
|
||||
$parsedFrame['description'] = $frame_description;
|
||||
$parsedFrame['data'] = substr($parsedFrame['data'], $frame_terminatorpos + strlen($this->TextEncodingTerminatorLookup($frame_textencoding)));
|
||||
if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
|
||||
$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = trim(getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']));
|
||||
$commentkey = ($parsedFrame['description'] ? $parsedFrame['description'] : (isset($info['id3v2']['comments'][$parsedFrame['framenameshort']]) ? count($info['id3v2']['comments'][$parsedFrame['framenameshort']]) : 0));
|
||||
if (!isset($info['id3v2']['comments'][$parsedFrame['framenameshort']]) || !array_key_exists($commentkey, $info['id3v2']['comments'][$parsedFrame['framenameshort']])) {
|
||||
$info['id3v2']['comments'][$parsedFrame['framenameshort']][$commentkey] = trim(getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']));
|
||||
} else {
|
||||
$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = trim(getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']));
|
||||
}
|
||||
}
|
||||
//unset($parsedFrame['data']); do not unset, may be needed elsewhere, e.g. for replaygain
|
||||
|
||||
@@ -1077,7 +1083,12 @@ class getid3_id3v2 extends getid3_handler
|
||||
$parsedFrame['description'] = $frame_description;
|
||||
$parsedFrame['data'] = $frame_text;
|
||||
if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
|
||||
$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']);
|
||||
$commentkey = ($parsedFrame['description'] ? $parsedFrame['description'] : (!empty($info['id3v2']['comments'][$parsedFrame['framenameshort']]) ? count($info['id3v2']['comments'][$parsedFrame['framenameshort']]) : 0));
|
||||
if (!isset($info['id3v2']['comments'][$parsedFrame['framenameshort']]) || !array_key_exists($commentkey, $info['id3v2']['comments'][$parsedFrame['framenameshort']])) {
|
||||
$info['id3v2']['comments'][$parsedFrame['framenameshort']][$commentkey] = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']);
|
||||
} else {
|
||||
$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1885,7 +1896,7 @@ class getid3_id3v2 extends getid3_handler
|
||||
$frame_offset += 2;
|
||||
$parsedFrame['bitsperpoint'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
|
||||
$frame_bytesperpoint = ceil($parsedFrame['bitsperpoint'] / 8);
|
||||
for ($i = 0; $i < $frame_indexpoints; $i++) {
|
||||
for ($i = 0; $i < $parsedFrame['indexpoints']; $i++) {
|
||||
$parsedFrame['indexes'][$i] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesperpoint));
|
||||
$frame_offset += $frame_bytesperpoint;
|
||||
}
|
||||
@@ -3411,4 +3422,3 @@ class getid3_id3v2 extends getid3_handler
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// See readme.txt for more details //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -27,8 +28,8 @@ class getid3_lyrics3 extends getid3_handler
|
||||
return false;
|
||||
}
|
||||
|
||||
fseek($this->getid3->fp, (0 - 128 - 9 - 6), SEEK_END); // end - ID3v1 - "LYRICSEND" - [Lyrics3size]
|
||||
$lyrics3_id3v1 = fread($this->getid3->fp, 128 + 9 + 6);
|
||||
$this->fseek((0 - 128 - 9 - 6), SEEK_END); // end - ID3v1 - "LYRICSEND" - [Lyrics3size]
|
||||
$lyrics3_id3v1 = $this->fread(128 + 9 + 6);
|
||||
$lyrics3lsz = substr($lyrics3_id3v1, 0, 6); // Lyrics3size
|
||||
$lyrics3end = substr($lyrics3_id3v1, 6, 9); // LYRICSEND or LYRICS200
|
||||
$id3v1tag = substr($lyrics3_id3v1, 15, 128); // ID3v1
|
||||
@@ -68,9 +69,9 @@ class getid3_lyrics3 extends getid3_handler
|
||||
|
||||
if (isset($info['ape']['tag_offset_start']) && ($info['ape']['tag_offset_start'] > 15)) {
|
||||
|
||||
fseek($this->getid3->fp, $info['ape']['tag_offset_start'] - 15, SEEK_SET);
|
||||
$lyrics3lsz = fread($this->getid3->fp, 6);
|
||||
$lyrics3end = fread($this->getid3->fp, 9);
|
||||
$this->fseek($info['ape']['tag_offset_start'] - 15);
|
||||
$lyrics3lsz = $this->fread(6);
|
||||
$lyrics3end = $this->fread(9);
|
||||
|
||||
if ($lyrics3end == 'LYRICSEND') {
|
||||
// Lyrics3v1, APE, maybe ID3v1
|
||||
@@ -101,20 +102,19 @@ class getid3_lyrics3 extends getid3_handler
|
||||
|
||||
if (!isset($info['ape'])) {
|
||||
$GETID3_ERRORARRAY = &$info['warning'];
|
||||
if (getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.apetag.php', __FILE__, false)) {
|
||||
$getid3_temp = new getID3();
|
||||
$getid3_temp->openfile($this->getid3->filename);
|
||||
$getid3_apetag = new getid3_apetag($getid3_temp);
|
||||
$getid3_apetag->overrideendoffset = $info['lyrics3']['tag_offset_start'];
|
||||
$getid3_apetag->Analyze();
|
||||
if (!empty($getid3_temp->info['ape'])) {
|
||||
$info['ape'] = $getid3_temp->info['ape'];
|
||||
}
|
||||
if (!empty($getid3_temp->info['replay_gain'])) {
|
||||
$info['replay_gain'] = $getid3_temp->info['replay_gain'];
|
||||
}
|
||||
unset($getid3_temp, $getid3_apetag);
|
||||
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.apetag.php', __FILE__, true);
|
||||
$getid3_temp = new getID3();
|
||||
$getid3_temp->openfile($this->getid3->filename);
|
||||
$getid3_apetag = new getid3_apetag($getid3_temp);
|
||||
$getid3_apetag->overrideendoffset = $info['lyrics3']['tag_offset_start'];
|
||||
$getid3_apetag->Analyze();
|
||||
if (!empty($getid3_temp->info['ape'])) {
|
||||
$info['ape'] = $getid3_temp->info['ape'];
|
||||
}
|
||||
if (!empty($getid3_temp->info['replay_gain'])) {
|
||||
$info['replay_gain'] = $getid3_temp->info['replay_gain'];
|
||||
}
|
||||
unset($getid3_temp, $getid3_apetag);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -132,11 +132,11 @@ class getid3_lyrics3 extends getid3_handler
|
||||
return false;
|
||||
}
|
||||
|
||||
fseek($this->getid3->fp, $endoffset, SEEK_SET);
|
||||
$this->fseek($endoffset);
|
||||
if ($length <= 0) {
|
||||
return false;
|
||||
}
|
||||
$rawdata = fread($this->getid3->fp, $length);
|
||||
$rawdata = $this->fread($length);
|
||||
|
||||
$ParsedLyrics3['raw']['lyrics3version'] = $version;
|
||||
$ParsedLyrics3['raw']['lyrics3tagsize'] = $length;
|
||||
@@ -169,7 +169,7 @@ class getid3_lyrics3 extends getid3_handler
|
||||
$ParsedLyrics3['raw']['LYR'] = trim(substr($rawdata, 11, strlen($rawdata) - 11 - 9));
|
||||
$this->Lyrics3LyricsTimestampParse($ParsedLyrics3);
|
||||
} else {
|
||||
$info['error'][] = '"LYRICSEND" expected at '.(ftell($this->getid3->fp) - 11 + $length - 9).' but found "'.substr($rawdata, strlen($rawdata) - 9, 9).'" instead';
|
||||
$info['error'][] = '"LYRICSEND" expected at '.($this->ftell() - 11 + $length - 9).' but found "'.substr($rawdata, strlen($rawdata) - 9, 9).'" instead';
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -217,7 +217,7 @@ class getid3_lyrics3 extends getid3_handler
|
||||
$this->Lyrics3LyricsTimestampParse($ParsedLyrics3);
|
||||
}
|
||||
} else {
|
||||
$info['error'][] = '"LYRICS200" expected at '.(ftell($this->getid3->fp) - 11 + $length - 9).' but found "'.substr($rawdata, strlen($rawdata) - 9, 9).'" instead';
|
||||
$info['error'][] = '"LYRICS200" expected at '.($this->ftell() - 11 + $length - 9).' but found "'.substr($rawdata, strlen($rawdata) - 9, 9).'" instead';
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -291,4 +291,4 @@ class getid3_lyrics3 extends getid3_handler
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
-16
@@ -2,6 +2,7 @@
|
||||
/// getID3() by James Heinrich <info@getid3.org> //
|
||||
// available at http://getid3.sourceforge.net //
|
||||
// or http://www.getid3.org //
|
||||
// also https://github.com/JamesHeinrich/getID3 //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
*****************************************************************
|
||||
@@ -67,13 +68,13 @@ What does getID3() do?
|
||||
===========================================================================
|
||||
|
||||
Reads & parses (to varying degrees):
|
||||
# tags:
|
||||
¤ tags:
|
||||
* APE (v1 and v2)
|
||||
* ID3v1 (& ID3v1.1)
|
||||
* ID3v2 (v2.4, v2.3, v2.2)
|
||||
* Lyrics3 (v1 & v2)
|
||||
|
||||
# audio-lossy:
|
||||
¤ audio-lossy:
|
||||
* MP3/MP2/MP1
|
||||
* MPC / Musepack
|
||||
* Ogg (Vorbis, OggFLAC, Speex)
|
||||
@@ -85,7 +86,7 @@ Reads & parses (to varying degrees):
|
||||
* DSS
|
||||
* VQF
|
||||
|
||||
# audio-lossless:
|
||||
¤ audio-lossless:
|
||||
* AIFF
|
||||
* AU
|
||||
* Bonk
|
||||
@@ -104,7 +105,7 @@ Reads & parses (to varying degrees):
|
||||
* WAV (RIFF)
|
||||
* WavPack
|
||||
|
||||
# audio-video:
|
||||
¤ audio-video:
|
||||
* ASF: ASF, Windows Media Audio (WMA), Windows Media Video (WMV)
|
||||
* AVI (RIFF)
|
||||
* Flash
|
||||
@@ -114,7 +115,7 @@ Reads & parses (to varying degrees):
|
||||
* Quicktime (including MP4)
|
||||
* RealVideo
|
||||
|
||||
# still image:
|
||||
¤ still image:
|
||||
* BMP
|
||||
* GIF
|
||||
* JPEG
|
||||
@@ -123,7 +124,7 @@ Reads & parses (to varying degrees):
|
||||
* SWF (Flash)
|
||||
* PhotoCD
|
||||
|
||||
# data:
|
||||
¤ data:
|
||||
* ISO-9660 CD-ROM image (directory structure)
|
||||
* SZIP (limited support)
|
||||
* ZIP (directory structure)
|
||||
@@ -309,7 +310,7 @@ http://www.getid3.org/phpBB3/viewforum.php?f=7
|
||||
(http://web.inter.nl.net/users/hvdh/lossless/lossless.htm)
|
||||
* Support for RIFF-INFO chunks
|
||||
* http://lotto.st-andrews.ac.uk/~njh/tag_interchange.html
|
||||
(thanks Nick Humfrey <njh@surgeradio*co*uk>)
|
||||
(thanks Nick Humfrey <njhØsurgeradio*co*uk>)
|
||||
* http://abcavi.narod.ru/sof/abcavi/infotags.htm
|
||||
(thanks Kibi)
|
||||
* Better support for Bink video
|
||||
@@ -324,23 +325,23 @@ http://www.getid3.org/phpBB3/viewforum.php?f=7
|
||||
* Support for IFF
|
||||
* Support for ICO
|
||||
* Support for ANI
|
||||
* Support for EXE (comments, author, etc) (thanks p*quaedackers@planet*nl)
|
||||
* Support for EXE (comments, author, etc) (thanks p*quaedackersØplanet*nl)
|
||||
* Support for DVD-IFO (region, subtitles, aspect ratio, etc)
|
||||
(thanks p*quaedackers@planet*nl)
|
||||
(thanks p*quaedackersØplanet*nl)
|
||||
* More complete support for SWF - parsing encapsulated MP3 and/or JPEG content
|
||||
(thanks n8n8@yahoo*com)
|
||||
(thanks n8n8Øyahoo*com)
|
||||
* Support for a2b
|
||||
* Optional scan-through-frames for AVI verification
|
||||
(thanks rockcohen@massive-interactive*nl)
|
||||
* Support for TTF (thanks info@butterflyx*com)
|
||||
(thanks rockcohenØmassive-interactive*nl)
|
||||
* Support for TTF (thanks infoØbutterflyx*com)
|
||||
* Support for DSS (http://www.getid3.org/phpBB3/viewtopic.php?t=171)
|
||||
* Support for SMAF (http://smaf-yamaha.com/what/demo.html)
|
||||
http://www.getid3.org/phpBB3/viewtopic.php?t=182
|
||||
* Support for AMR (http://www.getid3.org/phpBB3/viewtopic.php?t=195)
|
||||
* Support for 3gpp (http://www.getid3.org/phpBB3/viewtopic.php?t=195)
|
||||
* Support for ID4 (http://www.wackysoft.cjb.net grizlyY2K@hotmail*com)
|
||||
* Support for ID4 (http://www.wackysoft.cjb.net grizlyY2KØhotmail*com)
|
||||
* Parse XML data returned in Ogg comments
|
||||
* Parse XML data from Quicktime SMIL metafiles (klausrath@mac*com)
|
||||
* Parse XML data from Quicktime SMIL metafiles (klausrathØmac*com)
|
||||
* ID3v2 genre string creator function
|
||||
* More complete parsing of JPG
|
||||
* Support for all old-style ASF packets
|
||||
@@ -424,7 +425,7 @@ http://www.getid3.org/phpBB3/viewtopic.php?t=25
|
||||
"movi" chunk that fits in the first 2GB, should issue error
|
||||
to show that playtime is incorrect. Other data should be mostly
|
||||
correct, assuming that data is constant throughout the file)
|
||||
|
||||
* PHP <= v5 on Windows cannot read UTF-8 filenames
|
||||
|
||||
|
||||
Known Bugs/Issues in other programs
|
||||
@@ -600,4 +601,4 @@ Reference material:
|
||||
* http://cpansearch.perl.org/src/RGIBSON/Audio-DSS-0.02/lib/Audio/DSS.pm
|
||||
* http://trac.musepack.net/trac/wiki/SV8Specification
|
||||
* http://wyday.com/cuesharp/specification.php
|
||||
* http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html
|
||||
* http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html
|
||||
+126
-35
@@ -22,7 +22,7 @@ function _wp_admin_bar_init() {
|
||||
return false;
|
||||
|
||||
/* Load the admin bar class code ready for instantiation */
|
||||
require( ABSPATH . WPINC . '/class-wp-admin-bar.php' );
|
||||
require_once( ABSPATH . WPINC . '/class-wp-admin-bar.php' );
|
||||
|
||||
/* Instantiate the admin bar */
|
||||
|
||||
@@ -44,9 +44,6 @@ function _wp_admin_bar_init() {
|
||||
|
||||
return true;
|
||||
}
|
||||
// Don't remove. Wrong way to disable.
|
||||
add_action( 'template_redirect', '_wp_admin_bar_init', 0 );
|
||||
add_action( 'admin_init', '_wp_admin_bar_init' );
|
||||
|
||||
/**
|
||||
* Render the admin bar to the page based on the $wp_admin_bar->menu member var.
|
||||
@@ -92,8 +89,6 @@ function wp_admin_bar_render() {
|
||||
*/
|
||||
do_action( 'wp_after_admin_bar_render' );
|
||||
}
|
||||
add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
|
||||
add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );
|
||||
|
||||
/**
|
||||
* Add the WordPress logo menu.
|
||||
@@ -105,11 +100,8 @@ add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );
|
||||
function wp_admin_bar_wp_menu( $wp_admin_bar ) {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'id' => 'wp-logo',
|
||||
'title' => '<span class="ab-icon"></span>',
|
||||
'title' => '<span class="ab-icon"></span><span class="screen-reader-text">' . __( 'About WordPress' ) . '</span>',
|
||||
'href' => self_admin_url( 'about.php' ),
|
||||
'meta' => array(
|
||||
'title' => __('About WordPress'),
|
||||
),
|
||||
) );
|
||||
|
||||
if ( is_user_logged_in() ) {
|
||||
@@ -118,7 +110,7 @@ function wp_admin_bar_wp_menu( $wp_admin_bar ) {
|
||||
'parent' => 'wp-logo',
|
||||
'id' => 'about',
|
||||
'title' => __('About WordPress'),
|
||||
'href' => self_admin_url( 'about.php' ),
|
||||
'href' => self_admin_url( 'about.php' ),
|
||||
) );
|
||||
}
|
||||
|
||||
@@ -135,7 +127,7 @@ function wp_admin_bar_wp_menu( $wp_admin_bar ) {
|
||||
'parent' => 'wp-logo-external',
|
||||
'id' => 'documentation',
|
||||
'title' => __('Documentation'),
|
||||
'href' => __('http://codex.wordpress.org/'),
|
||||
'href' => __('https://codex.wordpress.org/'),
|
||||
) );
|
||||
|
||||
// Add forums link
|
||||
@@ -198,7 +190,6 @@ function wp_admin_bar_my_account_item( $wp_admin_bar ) {
|
||||
'href' => $profile_url,
|
||||
'meta' => array(
|
||||
'class' => $class,
|
||||
'title' => __('My Account'),
|
||||
),
|
||||
) );
|
||||
}
|
||||
@@ -270,8 +261,9 @@ function wp_admin_bar_site_menu( $wp_admin_bar ) {
|
||||
|
||||
$blogname = get_bloginfo('name');
|
||||
|
||||
if ( empty( $blogname ) )
|
||||
if ( ! $blogname ) {
|
||||
$blogname = preg_replace( '#^(https?://)?(www.)?#', '', get_home_url() );
|
||||
}
|
||||
|
||||
if ( is_network_admin() ) {
|
||||
$blogname = sprintf( __('Network Admin: %s'), esc_html( get_current_site()->site_name ) );
|
||||
@@ -337,10 +329,16 @@ function wp_admin_bar_my_sites_menu( $wp_admin_bar ) {
|
||||
if ( count( $wp_admin_bar->user->blogs ) < 1 && ! is_super_admin() )
|
||||
return;
|
||||
|
||||
if ( $wp_admin_bar->user->active_blog ) {
|
||||
$my_sites_url = get_admin_url( $wp_admin_bar->user->active_blog->blog_id, 'my-sites.php' );
|
||||
} else {
|
||||
$my_sites_url = admin_url( 'my-sites.php' );
|
||||
}
|
||||
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'id' => 'my-sites',
|
||||
'title' => __( 'My Sites' ),
|
||||
'href' => admin_url( 'my-sites.php' ),
|
||||
'href' => $my_sites_url,
|
||||
) );
|
||||
|
||||
if ( is_super_admin() ) {
|
||||
@@ -402,7 +400,12 @@ function wp_admin_bar_my_sites_menu( $wp_admin_bar ) {
|
||||
|
||||
$blavatar = '<div class="blavatar"></div>';
|
||||
|
||||
$blogname = empty( $blog->blogname ) ? $blog->domain : $blog->blogname;
|
||||
$blogname = $blog->blogname;
|
||||
|
||||
if ( ! $blogname ) {
|
||||
$blogname = preg_replace( '#^(https?://)?(www.)?#', '', get_home_url() );
|
||||
}
|
||||
|
||||
$menu_id = 'blog-' . $blog->userblog_id;
|
||||
|
||||
$wp_admin_bar->add_menu( array(
|
||||
@@ -530,22 +533,24 @@ function wp_admin_bar_edit_menu( $wp_admin_bar ) {
|
||||
if ( ! empty( $current_object->post_type )
|
||||
&& ( $post_type_object = get_post_type_object( $current_object->post_type ) )
|
||||
&& current_user_can( 'edit_post', $current_object->ID )
|
||||
&& $post_type_object->show_ui && $post_type_object->show_in_admin_bar )
|
||||
&& $post_type_object->show_ui && $post_type_object->show_in_admin_bar
|
||||
&& $edit_post_link = get_edit_post_link( $current_object->ID ) )
|
||||
{
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'id' => 'edit',
|
||||
'title' => $post_type_object->labels->edit_item,
|
||||
'href' => get_edit_post_link( $current_object->ID )
|
||||
'href' => $edit_post_link
|
||||
) );
|
||||
} elseif ( ! empty( $current_object->taxonomy )
|
||||
&& ( $tax = get_taxonomy( $current_object->taxonomy ) )
|
||||
&& current_user_can( $tax->cap->edit_terms )
|
||||
&& $tax->show_ui )
|
||||
&& $tax->show_ui
|
||||
&& $edit_term_link = get_edit_term_link( $current_object->term_id, $current_object->taxonomy ) )
|
||||
{
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'id' => 'edit',
|
||||
'title' => $tax->labels->edit_item,
|
||||
'href' => get_edit_term_link( $current_object->term_id, $current_object->taxonomy )
|
||||
'href' => $edit_term_link
|
||||
) );
|
||||
}
|
||||
}
|
||||
@@ -601,9 +606,6 @@ function wp_admin_bar_new_content_menu( $wp_admin_bar ) {
|
||||
'id' => 'new-content',
|
||||
'title' => $title,
|
||||
'href' => admin_url( current( array_keys( $actions ) ) ),
|
||||
'meta' => array(
|
||||
'title' => _x( 'Add New', 'admin bar menu group label' ),
|
||||
),
|
||||
) );
|
||||
|
||||
foreach ( $actions as $link => $action ) {
|
||||
@@ -654,19 +656,39 @@ function wp_admin_bar_comments_menu( $wp_admin_bar ) {
|
||||
function wp_admin_bar_appearance_menu( $wp_admin_bar ) {
|
||||
$wp_admin_bar->add_group( array( 'parent' => 'site-name', 'id' => 'appearance' ) );
|
||||
|
||||
if ( current_user_can( 'switch_themes' ) || current_user_can( 'edit_theme_options' ) )
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'themes', 'title' => __('Themes'), 'href' => admin_url('themes.php') ) );
|
||||
$current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||
$customize_url = add_query_arg( 'url', urlencode( $current_url ), wp_customize_url() );
|
||||
|
||||
if ( ! current_user_can( 'edit_theme_options' ) )
|
||||
return;
|
||||
if ( current_user_can( 'switch_themes' ) ) {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'appearance',
|
||||
'id' => 'themes',
|
||||
'title' => __( 'Themes' ),
|
||||
'href' => admin_url( 'themes.php' ),
|
||||
'meta' => array(
|
||||
'class' => 'hide-if-customize',
|
||||
),
|
||||
) );
|
||||
|
||||
if ( current_user_can( 'customize' ) ) {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'appearance',
|
||||
'id' => 'customize-themes',
|
||||
'title' => __( 'Themes' ),
|
||||
'href' => add_query_arg( urlencode( 'autofocus[section]' ), 'themes', $customize_url ), // urlencode() needed due to #16859
|
||||
'meta' => array(
|
||||
'class' => 'hide-if-no-customize',
|
||||
),
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( current_user_can( 'customize' ) ) {
|
||||
$current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'appearance',
|
||||
'id' => 'customize',
|
||||
'title' => __('Customize'),
|
||||
'href' => add_query_arg( 'url', urlencode( $current_url ), wp_customize_url() ),
|
||||
'href' => $customize_url,
|
||||
'meta' => array(
|
||||
'class' => 'hide-if-no-customize',
|
||||
),
|
||||
@@ -674,17 +696,85 @@ function wp_admin_bar_appearance_menu( $wp_admin_bar ) {
|
||||
add_action( 'wp_before_admin_bar_render', 'wp_customize_support_script' );
|
||||
}
|
||||
|
||||
if ( current_theme_supports( 'widgets' ) )
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'widgets', 'title' => __('Widgets'), 'href' => admin_url('widgets.php') ) );
|
||||
if ( ! current_user_can( 'edit_theme_options' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( current_theme_supports( 'widgets' ) ) {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'appearance',
|
||||
'id' => 'widgets',
|
||||
'title' => __( 'Widgets' ),
|
||||
'href' => admin_url( 'widgets.php' ),
|
||||
'meta' => array(
|
||||
'class' => 'hide-if-customize',
|
||||
),
|
||||
) );
|
||||
|
||||
if ( current_user_can( 'customize' ) ) {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'appearance',
|
||||
'id' => 'customize-widgets',
|
||||
'title' => __( 'Widgets' ),
|
||||
'href' => add_query_arg( urlencode( 'autofocus[panel]' ), 'widgets', $customize_url ), // urlencode() needed due to #16859
|
||||
'meta' => array(
|
||||
'class' => 'hide-if-no-customize',
|
||||
),
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) )
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'menus', 'title' => __('Menus'), 'href' => admin_url('nav-menus.php') ) );
|
||||
|
||||
if ( current_theme_supports( 'custom-background' ) )
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'background', 'title' => __('Background'), 'href' => admin_url('themes.php?page=custom-background') ) );
|
||||
if ( current_theme_supports( 'custom-background' ) ) {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'appearance',
|
||||
'id' => 'background',
|
||||
'title' => __( 'Background' ),
|
||||
'href' => admin_url( 'themes.php?page=custom-background' ),
|
||||
'meta' => array(
|
||||
'class' => 'hide-if-customize',
|
||||
),
|
||||
) );
|
||||
|
||||
if ( current_user_can( 'customize' ) ) {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'appearance',
|
||||
'id' => 'customize-background',
|
||||
'title' => __( 'Background' ),
|
||||
'href' => add_query_arg( urlencode( 'autofocus[control]' ), 'background_image', $customize_url ), // urlencode() needed due to #16859
|
||||
'meta' => array(
|
||||
'class' => 'hide-if-no-customize',
|
||||
),
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( current_theme_supports( 'custom-header' ) ) {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'appearance',
|
||||
'id' => 'header',
|
||||
'title' => __( 'Header' ),
|
||||
'href' => admin_url( 'themes.php?page=custom-header' ),
|
||||
'meta' => array(
|
||||
'class' => 'hide-if-customize',
|
||||
),
|
||||
) );
|
||||
|
||||
if ( current_user_can( 'customize' ) ) {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'appearance',
|
||||
'id' => 'customize-header',
|
||||
'title' => __( 'Header' ),
|
||||
'href' => add_query_arg( urlencode( 'autofocus[control]' ), 'header_image', $customize_url ), // urlencode() needed due to #16859
|
||||
'meta' => array(
|
||||
'class' => 'hide-if-no-customize',
|
||||
),
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( current_theme_supports( 'custom-header' ) )
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'header', 'title' => __('Header'), 'href' => admin_url('themes.php?page=custom-header') ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -727,6 +817,7 @@ function wp_admin_bar_search_menu( $wp_admin_bar ) {
|
||||
|
||||
$form = '<form action="' . esc_url( home_url( '/' ) ) . '" method="get" id="adminbarsearch">';
|
||||
$form .= '<input class="adminbar-input" name="s" id="adminbar-search" type="text" value="" maxlength="150" />';
|
||||
$form .= '<label for="adminbar-search" class="screen-reader-text">' . __( 'Search' ) . '</label>';
|
||||
$form .= '<input type="submit" class="adminbar-button" value="' . __('Search') . '"/>';
|
||||
$form .= '</form>';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* These functions must be used within the WordPress Loop.
|
||||
*
|
||||
* @link http://codex.wordpress.org/Author_Templates
|
||||
* @link https://codex.wordpress.org/Author_Templates
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Template
|
||||
@@ -16,7 +16,6 @@
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @uses $authordata The current author's DB object.
|
||||
* @uses apply_filters() Calls 'the_author' hook on the author display name.
|
||||
*
|
||||
* @param string $deprecated Deprecated.
|
||||
* @return string The author's display name.
|
||||
@@ -50,7 +49,7 @@ function get_the_author($deprecated = '') {
|
||||
*
|
||||
* @since 0.71
|
||||
* @see get_the_author()
|
||||
* @link http://codex.wordpress.org/Template_Tags/the_author
|
||||
* @link https://codex.wordpress.org/Template_Tags/the_author
|
||||
*
|
||||
* @param string $deprecated Deprecated.
|
||||
* @param string $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
|
||||
@@ -71,10 +70,6 @@ function the_author( $deprecated = '', $deprecated_echo = true ) {
|
||||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @uses $post The current post's DB object.
|
||||
* @uses get_post_meta() Retrieves the ID of the author who last edited the current post.
|
||||
* @uses get_userdata() Retrieves the author's DB object.
|
||||
* @uses apply_filters() Calls 'the_modified_author' hook on the author display name.
|
||||
* @return string The author's display name.
|
||||
*/
|
||||
function get_the_modified_author() {
|
||||
@@ -106,9 +101,8 @@ function the_modified_author() {
|
||||
|
||||
/**
|
||||
* Retrieve the requested data of the author of the current post.
|
||||
* @link http://codex.wordpress.org/Template_Tags/the_author_meta
|
||||
* @link https://codex.wordpress.org/Template_Tags/the_author_meta
|
||||
* @since 2.8.0
|
||||
* @uses $authordata The current author's DB object (if $user_id not specified).
|
||||
* @param string $field selects the field of the users record.
|
||||
* @param int $user_id Optional. User ID.
|
||||
* @return string The author's field from the current author's DB object.
|
||||
@@ -141,7 +135,7 @@ function get_the_author_meta( $field = '', $user_id = false ) {
|
||||
|
||||
/**
|
||||
* Retrieve the requested data of the author of the current post.
|
||||
* @link http://codex.wordpress.org/Template_Tags/the_author_meta
|
||||
* @link https://codex.wordpress.org/Template_Tags/the_author_meta
|
||||
* @since 2.8.0
|
||||
* @param string $field selects the field of the users record.
|
||||
* @param int $user_id Optional. User ID.
|
||||
@@ -168,9 +162,6 @@ function the_author_meta( $field = '', $user_id = false ) {
|
||||
*
|
||||
* If the author has a home page set, return an HTML link, otherwise just return the
|
||||
* author's name.
|
||||
*
|
||||
* @uses get_the_author_meta()
|
||||
* @uses get_the_author()
|
||||
*/
|
||||
function get_the_author_link() {
|
||||
if ( get_the_author_meta('url') ) {
|
||||
@@ -186,11 +177,9 @@ function get_the_author_link() {
|
||||
* If the author has a home page set, echo an HTML link, otherwise just echo the
|
||||
* author's name.
|
||||
*
|
||||
* @link http://codex.wordpress.org/Template_Tags/the_author_link
|
||||
* @link https://codex.wordpress.org/Template_Tags/the_author_link
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @uses get_the_author_link()
|
||||
*/
|
||||
function the_author_link() {
|
||||
echo get_the_author_link();
|
||||
@@ -201,8 +190,6 @@ function the_author_link() {
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @uses $post The current post in the Loop's DB object.
|
||||
* @uses count_user_posts()
|
||||
* @return int The number of posts by the author.
|
||||
*/
|
||||
function get_the_author_posts() {
|
||||
@@ -210,15 +197,14 @@ function get_the_author_posts() {
|
||||
if ( ! $post ) {
|
||||
return 0;
|
||||
}
|
||||
return count_user_posts( $post->post_author );
|
||||
return count_user_posts( $post->post_author, $post->post_type );
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the number of posts by the author of the current post.
|
||||
*
|
||||
* @link http://codex.wordpress.org/Template_Tags/the_author_posts
|
||||
* @link https://codex.wordpress.org/Template_Tags/the_author_posts
|
||||
* @since 0.71
|
||||
* @uses get_the_author_posts() Echoes returned value from function.
|
||||
*/
|
||||
function the_author_posts() {
|
||||
echo get_the_author_posts();
|
||||
@@ -231,11 +217,8 @@ function the_author_posts() {
|
||||
* reason for this, is that another function is used to help in printing the
|
||||
* link to the author's posts.
|
||||
*
|
||||
* @link http://codex.wordpress.org/Template_Tags/the_author_posts_link
|
||||
* @link https://codex.wordpress.org/Template_Tags/the_author_posts_link
|
||||
* @since 1.2.0
|
||||
* @uses $authordata The current author's DB object.
|
||||
* @uses get_author_posts_url()
|
||||
* @uses get_the_author()
|
||||
* @param string $deprecated Deprecated.
|
||||
*/
|
||||
function the_author_posts_link($deprecated = '') {
|
||||
@@ -304,7 +287,7 @@ function get_author_posts_url($author_id, $author_nicename = '') {
|
||||
/**
|
||||
* List all the authors of the blog, with several options available.
|
||||
*
|
||||
* @link http://codex.wordpress.org/Template_Tags/wp_list_authors
|
||||
* @link https://codex.wordpress.org/Template_Tags/wp_list_authors
|
||||
*
|
||||
* @since 1.2.0
|
||||
*
|
||||
@@ -354,7 +337,7 @@ function wp_list_authors( $args = '' ) {
|
||||
$authors = get_users( $query_args );
|
||||
|
||||
$author_count = array();
|
||||
foreach ( (array) $wpdb->get_results( "SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE post_type = 'post' AND " . get_private_posts_cap_sql( 'post' ) . " GROUP BY post_author" ) as $row ) {
|
||||
foreach ( (array) $wpdb->get_results( "SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE " . get_private_posts_cap_sql( 'post' ) . " GROUP BY post_author" ) as $row ) {
|
||||
$author_count[$row->post_author] = $row->count;
|
||||
}
|
||||
foreach ( $authors as $author_id ) {
|
||||
@@ -468,4 +451,3 @@ function is_multi_author() {
|
||||
function __clear_multi_author_cache() {
|
||||
delete_transient( 'is_multi_author' );
|
||||
}
|
||||
add_action('transition_post_status', '__clear_multi_author_cache');
|
||||
@@ -34,8 +34,8 @@
|
||||
* or 0|false. Default 1|true.
|
||||
* @type int|bool $show_name Whether to show link name if available. Accepts 1|true or
|
||||
* 0|false. Default 0|false.
|
||||
* @type string $before The HTML or text to prepend to each bookmark. Default '<li>'.
|
||||
* @type string $after The HTML or text to append to each bookmark. Default '</li>'.
|
||||
* @type string $before The HTML or text to prepend to each bookmark. Default `<li>`.
|
||||
* @type string $after The HTML or text to append to each bookmark. Default `</li>`.
|
||||
* @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
|
||||
|
||||
+11
-12
@@ -10,9 +10,10 @@
|
||||
* Retrieve Bookmark data
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @uses $wpdb Database Object
|
||||
*
|
||||
* @param mixed $bookmark
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @param int|stdClass $bookmark
|
||||
* @param string $output Optional. Either OBJECT, ARRAY_N, or ARRAY_A constant
|
||||
* @param string $filter Optional, default is 'raw'.
|
||||
* @return array|object Type returned depends on $output value.
|
||||
@@ -60,8 +61,6 @@ function get_bookmark($bookmark, $output = OBJECT, $filter = 'raw') {
|
||||
* Retrieve single bookmark data item or field.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @uses get_bookmark() Gets bookmark object using $bookmark as ID
|
||||
* @uses sanitize_bookmark_field() Sanitizes Bookmark field based on $context.
|
||||
*
|
||||
* @param string $field The name of the data field to return
|
||||
* @param int $bookmark The bookmark ID to get field
|
||||
@@ -93,7 +92,7 @@ function get_bookmark_field( $field, $bookmark, $context = 'display' ) {
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database access abstraction object.
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @param string|array $args {
|
||||
* Optional. String or array of arguments to retrieve bookmarks.
|
||||
@@ -250,7 +249,7 @@ function get_bookmarks( $args = '' ) {
|
||||
break;
|
||||
default:
|
||||
$orderparams = array();
|
||||
$keys = array( 'link_id', 'link_name', 'link_url', 'link_visible', 'link_rating', 'link_owner', 'link_updated', 'link_notes' );
|
||||
$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 );
|
||||
|
||||
@@ -387,17 +386,18 @@ function sanitize_bookmark_field($field, $value, $bookmark_id, $context) {
|
||||
} else {
|
||||
$value = esc_attr($value);
|
||||
}
|
||||
} else if ( 'db' == $context ) {
|
||||
} 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);
|
||||
else if ( 'js' == $context )
|
||||
$value = esc_js($value);
|
||||
if ( 'attribute' == $context ) {
|
||||
$value = esc_attr( $value );
|
||||
} elseif ( 'js' == $context ) {
|
||||
$value = esc_js( $value );
|
||||
}
|
||||
}
|
||||
|
||||
return $value;
|
||||
@@ -407,7 +407,6 @@ function sanitize_bookmark_field($field, $value, $bookmark_id, $context) {
|
||||
* Deletes bookmark cache
|
||||
*
|
||||
* @since 2.7.0
|
||||
* @uses wp_cache_delete() Deletes the contents of 'get_bookmarks'
|
||||
*/
|
||||
function clean_bookmark_cache( $bookmark_id ) {
|
||||
wp_cache_delete( $bookmark_id, 'bookmark' );
|
||||
|
||||
+14
-4
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Object Cache API
|
||||
*
|
||||
* @link http://codex.wordpress.org/Function_Reference/WP_Cache
|
||||
* @link https://codex.wordpress.org/Function_Reference/WP_Cache
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Cache
|
||||
@@ -103,7 +103,7 @@ function wp_cache_flush() {
|
||||
* @param int|string $key What the contents in the cache are called
|
||||
* @param string $group Where the cache contents are grouped
|
||||
* @param bool $force Whether to force an update of the local cache from the persistent cache (default is false)
|
||||
* @param &bool $found Whether key was found in the cache. Disambiguates a return of false, a storable value.
|
||||
* @param bool &$found Whether key was found in the cache. Disambiguates a return of false, a storable value.
|
||||
* @return bool|mixed False on failure to retrieve contents or the cache
|
||||
* contents on success
|
||||
*/
|
||||
@@ -217,7 +217,6 @@ function wp_cache_add_global_groups( $groups ) {
|
||||
*/
|
||||
function wp_cache_add_non_persistent_groups( $groups ) {
|
||||
// Default cache doesn't persist so nothing to do here.
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -306,6 +305,15 @@ class WP_Object_Cache {
|
||||
*/
|
||||
private $blog_prefix;
|
||||
|
||||
/**
|
||||
* Holds the value of `is_multisite()`
|
||||
*
|
||||
* @var bool
|
||||
* @access private
|
||||
* @since 3.5.0
|
||||
*/
|
||||
private $multisite;
|
||||
|
||||
/**
|
||||
* Make private properties readable for backwards compatibility.
|
||||
*
|
||||
@@ -664,6 +672,9 @@ class WP_Object_Cache {
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @access protected
|
||||
* @param string $key
|
||||
* @param string $group
|
||||
* @return bool
|
||||
*/
|
||||
protected function _exists( $key, $group ) {
|
||||
return isset( $this->cache[ $group ] ) && ( isset( $this->cache[ $group ][ $key ] ) || array_key_exists( $key, $this->cache[ $group ] ) );
|
||||
@@ -673,7 +684,6 @@ class WP_Object_Cache {
|
||||
* Sets up object properties; PHP 5 style constructor
|
||||
*
|
||||
* @since 2.0.8
|
||||
* @return null|WP_Object_Cache If cache is disabled, returns null.
|
||||
*/
|
||||
public function __construct() {
|
||||
global $blog_id;
|
||||
|
||||
+16
-11
@@ -69,8 +69,8 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
|
||||
return;
|
||||
|
||||
// Some PHP setups turn requests for / into /index.php in REQUEST_URI
|
||||
// See: http://trac.wordpress.org/ticket/5017
|
||||
// See: http://trac.wordpress.org/ticket/7173
|
||||
// See: https://core.trac.wordpress.org/ticket/5017
|
||||
// See: https://core.trac.wordpress.org/ticket/7173
|
||||
// Disabled, for now:
|
||||
// $original['path'] = preg_replace('|/index\.php$|', '/', $original['path']);
|
||||
|
||||
@@ -83,6 +83,11 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
|
||||
if ( !isset($redirect['query']) )
|
||||
$redirect['query'] = '';
|
||||
|
||||
// If the original URL ended with non-breaking spaces, they were almost
|
||||
// certainly inserted by accident. Let's remove them, so the reader doesn't
|
||||
// see a 404 error with no obvious cause.
|
||||
$redirect['path'] = preg_replace( '|(%C2%A0)+$|i', '', $redirect['path'] );
|
||||
|
||||
// It's not a preview, so remove it from URL
|
||||
if ( get_query_var( 'preview' ) ) {
|
||||
$redirect['query'] = remove_query_arg( 'preview', $redirect['query'] );
|
||||
@@ -194,7 +199,7 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
|
||||
} elseif ( is_category() || is_tag() || is_tax() ) { // Terms (Tags/categories)
|
||||
|
||||
$term_count = 0;
|
||||
foreach ( $wp_query->tax_query->queries as $tax_query )
|
||||
foreach ( $wp_query->tax_query->queried_terms as $tax_query )
|
||||
$term_count += count( $tax_query['terms'] );
|
||||
|
||||
$obj = $wp_query->get_queried_object();
|
||||
@@ -254,11 +259,11 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
|
||||
|
||||
// paging and feeds
|
||||
if ( get_query_var('paged') || is_feed() || get_query_var('cpage') ) {
|
||||
while ( preg_match( "#/$wp_rewrite->pagination_base/?[0-9]+?(/+)?$#", $redirect['path'] ) || preg_match( '#/(comments/?)?(feed|rss|rdf|atom|rss2)(/+)?$#', $redirect['path'] ) || preg_match( '#/comment-page-[0-9]+(/+)?$#', $redirect['path'] ) ) {
|
||||
while ( preg_match( "#/$wp_rewrite->pagination_base/?[0-9]+?(/+)?$#", $redirect['path'] ) || preg_match( '#/(comments/?)?(feed|rss|rdf|atom|rss2)(/+)?$#', $redirect['path'] ) || preg_match( "#/{$wp_rewrite->comments_pagination_base}-[0-9]+(/+)?$#", $redirect['path'] ) ) {
|
||||
// Strip off paging and feed
|
||||
$redirect['path'] = preg_replace("#/$wp_rewrite->pagination_base/?[0-9]+?(/+)?$#", '/', $redirect['path']); // strip off any existing paging
|
||||
$redirect['path'] = preg_replace('#/(comments/?)?(feed|rss2?|rdf|atom)(/+|$)#', '/', $redirect['path']); // strip off feed endings
|
||||
$redirect['path'] = preg_replace('#/comment-page-[0-9]+?(/+)?$#', '/', $redirect['path']); // strip off any existing comment paging
|
||||
$redirect['path'] = preg_replace("#/{$wp_rewrite->comments_pagination_base}-[0-9]+?(/+)?$#", '/', $redirect['path']); // strip off any existing comment paging
|
||||
}
|
||||
|
||||
$addl_path = '';
|
||||
@@ -302,7 +307,7 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
|
||||
}
|
||||
|
||||
if ( get_option('page_comments') && ( ( 'newest' == get_option('default_comments_page') && get_query_var('cpage') > 0 ) || ( 'newest' != get_option('default_comments_page') && get_query_var('cpage') > 1 ) ) ) {
|
||||
$addl_path = ( !empty( $addl_path ) ? trailingslashit($addl_path) : '' ) . user_trailingslashit( 'comment-page-' . get_query_var('cpage'), 'commentpaged' );
|
||||
$addl_path = ( !empty( $addl_path ) ? trailingslashit($addl_path) : '' ) . user_trailingslashit( $wp_rewrite->comments_pagination_base . '-' . get_query_var('cpage'), 'commentpaged' );
|
||||
$redirect['query'] = remove_query_arg( 'cpage', $redirect['query'] );
|
||||
}
|
||||
|
||||
@@ -492,6 +497,9 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
|
||||
* @since 3.4.0
|
||||
* @access private
|
||||
*
|
||||
* @param string $query_string
|
||||
* @param array $args_to_check
|
||||
* @param string $url
|
||||
* @return string The altered query string
|
||||
*/
|
||||
function _remove_qs_args_if_not_in_url( $query_string, Array $args_to_check, $url ) {
|
||||
@@ -512,7 +520,8 @@ function _remove_qs_args_if_not_in_url( $query_string, Array $args_to_check, $ur
|
||||
* Attempts to guess the correct URL based on query vars
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @uses $wpdb
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @return bool|string The correct URL if one is found. False on failure.
|
||||
*/
|
||||
@@ -549,8 +558,6 @@ function redirect_guess_404_permalink() {
|
||||
return false;
|
||||
}
|
||||
|
||||
add_action('template_redirect', 'redirect_canonical');
|
||||
|
||||
function wp_redirect_admin_locations() {
|
||||
global $wp_rewrite;
|
||||
if ( ! ( is_404() && $wp_rewrite->using_permalinks() ) )
|
||||
@@ -578,5 +585,3 @@ function wp_redirect_admin_locations() {
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 );
|
||||
@@ -13,14 +13,12 @@
|
||||
* the name in value of the 'name' key. The capabilities are stored as an array
|
||||
* in the value of the 'capability' key.
|
||||
*
|
||||
* <code>
|
||||
* array (
|
||||
* 'rolename' => array (
|
||||
* 'name' => 'rolename',
|
||||
* 'capabilities' => array()
|
||||
* )
|
||||
* )
|
||||
* </code>
|
||||
* array (
|
||||
* 'rolename' => array (
|
||||
* 'name' => 'rolename',
|
||||
* 'capabilities' => array()
|
||||
* )
|
||||
* )
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @package WordPress
|
||||
@@ -92,7 +90,10 @@ class WP_Roles {
|
||||
* @return mixed|bool Return value of the callback, false otherwise.
|
||||
*/
|
||||
public function __call( $name, $arguments ) {
|
||||
return call_user_func_array( array( $this, $name ), $arguments );
|
||||
if ( '_init' === $name ) {
|
||||
return call_user_func_array( array( $this, $name ), $arguments );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -104,7 +105,8 @@ class WP_Roles {
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @access protected
|
||||
* @uses $wpdb Used to get the database prefix.
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
* @global array $wp_user_roles Used to set the 'roles' property value.
|
||||
*/
|
||||
protected function _init() {
|
||||
@@ -416,16 +418,31 @@ class WP_Role {
|
||||
* @since 2.0.0
|
||||
* @package WordPress
|
||||
* @subpackage User
|
||||
*
|
||||
* @property string $nickname
|
||||
* @property string $user_description
|
||||
* @property string $user_firstname
|
||||
* @property string $user_lastname
|
||||
* @property string $user_login
|
||||
* @property string $user_pass
|
||||
* @property string $user_nicename
|
||||
* @property string $user_email
|
||||
* @property string $user_url
|
||||
* @property string $user_registered
|
||||
* @property string $user_activation_key
|
||||
* @property string $user_status
|
||||
* @property string $display_name
|
||||
* @property string $spam
|
||||
* @property string $deleted
|
||||
*/
|
||||
class WP_User {
|
||||
/**
|
||||
* User data container.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access private
|
||||
* @var array
|
||||
* @var object
|
||||
*/
|
||||
var $data;
|
||||
public $data;
|
||||
|
||||
/**
|
||||
* The user's ID.
|
||||
@@ -494,7 +511,6 @@ class WP_User {
|
||||
* @param int|string|stdClass|WP_User $id User's ID, a WP_User object, or a user object from the DB.
|
||||
* @param string $name Optional. User's username
|
||||
* @param int $blog_id Optional Blog ID, defaults to current blog.
|
||||
* @return WP_User
|
||||
*/
|
||||
public function __construct( $id = 0, $name = '', $blog_id = '' ) {
|
||||
if ( ! isset( self::$back_compat_keys ) ) {
|
||||
@@ -509,7 +525,7 @@ class WP_User {
|
||||
);
|
||||
}
|
||||
|
||||
if ( is_a( $id, 'WP_User' ) ) {
|
||||
if ( $id instanceof WP_User ) {
|
||||
$this->init( $id->data, $blog_id );
|
||||
return;
|
||||
} elseif ( is_object( $id ) ) {
|
||||
@@ -522,13 +538,17 @@ class WP_User {
|
||||
$id = 0;
|
||||
}
|
||||
|
||||
if ( $id )
|
||||
if ( $id ) {
|
||||
$data = self::get_data_by( 'id', $id );
|
||||
else
|
||||
} else {
|
||||
$data = self::get_data_by( 'login', $name );
|
||||
}
|
||||
|
||||
if ( $data )
|
||||
if ( $data ) {
|
||||
$this->init( $data, $blog_id );
|
||||
} else {
|
||||
$this->data = new stdClass;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -551,7 +571,7 @@ class WP_User {
|
||||
*
|
||||
* @param string $field The field to query against: 'id', 'slug', 'email' or 'login'
|
||||
* @param string|int $value The field value
|
||||
* @return object Raw user object
|
||||
* @return object|false Raw user object
|
||||
*/
|
||||
public static function get_data_by( $field, $value ) {
|
||||
global $wpdb;
|
||||
@@ -612,6 +632,8 @@ class WP_User {
|
||||
* Magic method for checking the existence of a certain custom field
|
||||
*
|
||||
* @since 3.3.0
|
||||
* @param string $key
|
||||
* @return bool
|
||||
*/
|
||||
public function __isset( $key ) {
|
||||
if ( 'id' == $key ) {
|
||||
@@ -632,6 +654,8 @@ class WP_User {
|
||||
* Magic method for accessing custom fields
|
||||
*
|
||||
* @since 3.3.0
|
||||
* @param string $key
|
||||
* @return mixed
|
||||
*/
|
||||
public function __get( $key ) {
|
||||
if ( 'id' == $key ) {
|
||||
@@ -915,6 +939,8 @@ class WP_User {
|
||||
public function add_cap( $cap, $grant = true ) {
|
||||
$this->caps[$cap] = $grant;
|
||||
update_user_meta( $this->ID, $this->cap_key, $this->caps );
|
||||
$this->get_role_caps();
|
||||
$this->update_user_level_from_caps();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -926,10 +952,13 @@ class WP_User {
|
||||
* @param string $cap Capability name.
|
||||
*/
|
||||
public function remove_cap( $cap ) {
|
||||
if ( ! isset( $this->caps[$cap] ) )
|
||||
if ( ! isset( $this->caps[ $cap ] ) ) {
|
||||
return;
|
||||
unset( $this->caps[$cap] );
|
||||
}
|
||||
unset( $this->caps[ $cap ] );
|
||||
update_user_meta( $this->ID, $this->cap_key, $this->caps );
|
||||
$this->get_role_caps();
|
||||
$this->update_user_level_from_caps();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -982,7 +1011,7 @@ class WP_User {
|
||||
* @since 2.0.0
|
||||
* @since 3.7.0 Added the user object.
|
||||
*
|
||||
* @param array $allcaps An array of all the role's capabilities.
|
||||
* @param array $allcaps An array of all the user's capabilities.
|
||||
* @param array $caps Actual capabilities for meta capability.
|
||||
* @param array $args Optional parameters passed to has_cap(), typically object ID.
|
||||
* @param WP_User $user The user object.
|
||||
@@ -1205,8 +1234,8 @@ function map_meta_cap( $cap, $user_id ) {
|
||||
/**
|
||||
* Filter whether the user is allowed to add post meta to a post.
|
||||
*
|
||||
* The dynamic portion of the hook name, $meta_key, refers to the
|
||||
* meta key passed to map_meta_cap().
|
||||
* The dynamic portion of the hook name, `$meta_key`, refers to the
|
||||
* meta key passed to {@see map_meta_cap()}.
|
||||
*
|
||||
* @since 3.3.0
|
||||
*
|
||||
@@ -1316,6 +1345,9 @@ function map_meta_cap( $cap, $user_id ) {
|
||||
case 'customize' :
|
||||
$caps[] = 'edit_theme_options';
|
||||
break;
|
||||
case 'delete_site':
|
||||
$caps[] = 'manage_options';
|
||||
break;
|
||||
default:
|
||||
// Handle meta capabilities for custom post types.
|
||||
$post_type_meta_caps = _post_type_meta_capabilities();
|
||||
@@ -1371,21 +1403,25 @@ function current_user_can( $capability ) {
|
||||
* @return bool
|
||||
*/
|
||||
function current_user_can_for_blog( $blog_id, $capability ) {
|
||||
if ( is_multisite() )
|
||||
switch_to_blog( $blog_id );
|
||||
$switched = is_multisite() ? switch_to_blog( $blog_id ) : false;
|
||||
|
||||
$current_user = wp_get_current_user();
|
||||
|
||||
if ( empty( $current_user ) )
|
||||
if ( empty( $current_user ) ) {
|
||||
if ( $switched ) {
|
||||
restore_current_blog();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
$args = array_slice( func_get_args(), 2 );
|
||||
$args = array_merge( array( $capability ), $args );
|
||||
|
||||
$can = call_user_func_array( array( $current_user, 'has_cap' ), $args );
|
||||
|
||||
if ( is_multisite() )
|
||||
if ( $switched ) {
|
||||
restore_current_blog();
|
||||
}
|
||||
|
||||
return $can;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,6 @@ function get_category_parents( $id, $link = false, $separator = '/', $nicename =
|
||||
* Retrieve post categories.
|
||||
*
|
||||
* @since 0.71
|
||||
* @uses $post
|
||||
*
|
||||
* @param int $id Optional, default to current post ID. The post ID.
|
||||
* @return array
|
||||
@@ -248,7 +247,6 @@ function get_the_category_list( $separator = '', $parents='', $post_id = false )
|
||||
* As of 2.7, the function can be used anywhere if it is provided a post ID or post object.
|
||||
*
|
||||
* @since 1.2.0
|
||||
* @uses has_category()
|
||||
*
|
||||
* @param int|string|array $category Category ID, name or slug, or array of said.
|
||||
* @param int|object $post Optional. Post to check instead of the current post. (since 2.7.0)
|
||||
@@ -289,36 +287,51 @@ function category_description( $category = 0 ) {
|
||||
/**
|
||||
* Display or retrieve the HTML dropdown list of categories.
|
||||
*
|
||||
* The list of arguments is below:
|
||||
* 'show_option_all' (string) - Text to display for showing all categories.
|
||||
* 'show_option_none' (string) - Text to display for showing no categories.
|
||||
* 'option_none_value' (mixed) - Value to use when no category is selected.
|
||||
* 'orderby' (string) default is 'ID' - What column to use for ordering the
|
||||
* categories.
|
||||
* 'order' (string) default is 'ASC' - What direction to order categories.
|
||||
* 'show_count' (bool|int) default is 0 - Whether to show how many posts are
|
||||
* in the category.
|
||||
* 'hide_empty' (bool|int) default is 1 - Whether to hide categories that
|
||||
* don't have any posts attached to them.
|
||||
* 'child_of' (int) default is 0 - See {@link get_categories()}.
|
||||
* 'exclude' (string) - See {@link get_categories()}.
|
||||
* 'echo' (bool|int) default is 1 - Whether to display or retrieve content.
|
||||
* 'depth' (int) - The max depth.
|
||||
* 'tab_index' (int) - Tab index for select element.
|
||||
* 'name' (string) - The name attribute value for select element.
|
||||
* 'id' (string) - The ID attribute value for select element. Defaults to name if omitted.
|
||||
* 'class' (string) - The class attribute value for select element.
|
||||
* 'selected' (int) - Which category ID is selected.
|
||||
* 'taxonomy' (string) - The name of the taxonomy to retrieve. Defaults to category.
|
||||
*
|
||||
* The 'hierarchical' argument, which is disabled by default, will override the
|
||||
* depth argument, unless it is true. When the argument is false, it will
|
||||
* display all of the categories. When it is enabled it will use the value in
|
||||
* the 'depth' argument.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @since 4.2.0 Introduced the `value_field` argument.
|
||||
*
|
||||
* @param string|array $args Optional. Override default arguments.
|
||||
* @param string|array $args {
|
||||
* Optional. Array or string of arguments to generate a categories drop-down element.
|
||||
*
|
||||
* @type string $show_option_all Text to display for showing all categories. Default empty.
|
||||
* @type string $show_option_none Text to display for showing no categories. Default empty.
|
||||
* @type string $option_none_value Value to use when no category is selected. Default empty.
|
||||
* @type string $orderby Which column to use for ordering categories. See get_terms() for a list
|
||||
* of accepted values. Default 'id' (term_id).
|
||||
* @type string $order Whether to order terms in ascending or descending order. Accepts 'ASC'
|
||||
* or 'DESC'. Default 'ASC'.
|
||||
* @type bool $pad_counts See get_terms() for an argument description. Default false.
|
||||
* @type bool|int $show_count Whether to include post counts. Accepts 0, 1, or their bool equivalents.
|
||||
* Default 0.
|
||||
* @type bool|int $hide_empty Whether to hide categories that don't have any posts. Accepts 0, 1, or
|
||||
* their bool equivalents. Default 1.
|
||||
* @type int $child_of Term ID to retrieve child terms of. See get_terms(). Default 0.
|
||||
* @type array|string $exclude Array or comma/space-separated string of term ids to exclude.
|
||||
* If `$include` is non-empty, `$exclude` is ignored. Default empty array.
|
||||
* @type bool|int $echo Whether to echo or return the generated markup. Accepts 0, 1, or their
|
||||
* bool equivalents. Default 1.
|
||||
* @type bool|int $hierarchical Whether to traverse the taxonomy hierarchy. Accepts 0, 1, or their bool
|
||||
* equivalents. Default 0.
|
||||
* @type int $depth Maximum depth. Default 0.
|
||||
* @type int $tab_index Tab index for the select element. Default 0 (no tabindex).
|
||||
* @type string $name Value for the 'name' attribute of the select element. Default 'cat'.
|
||||
* @type string $id Value for the 'id' attribute of the select element. Defaults to the value
|
||||
* of `$name`.
|
||||
* @type string $class Value for the 'class' attribute of the select element. Default 'postform'.
|
||||
* @type int|string $selected Value of the option that should be selected. Default 0.
|
||||
* @type string $value_field Term field that should be used to populate the 'value' attribute
|
||||
* of the option elements. Accepts any valid term field: 'term_id', 'name',
|
||||
* 'slug', 'term_group', 'term_taxonomy_id', 'taxonomy', 'description',
|
||||
* 'parent', 'count'. Default 'term_id'.
|
||||
* @type string $taxonomy Name of the category to retrieve. Default 'category'.
|
||||
* @type bool $hide_if_empty True to skip generating markup if no categories are found.
|
||||
* Default false (create select element even if no categories are found).
|
||||
* }
|
||||
* @return string HTML content only if 'echo' argument is 0.
|
||||
*/
|
||||
function wp_dropdown_categories( $args = '' ) {
|
||||
@@ -332,7 +345,8 @@ function wp_dropdown_categories( $args = '' ) {
|
||||
'name' => 'cat', 'id' => '',
|
||||
'class' => 'postform', 'depth' => 0,
|
||||
'tab_index' => 0, 'taxonomy' => 'category',
|
||||
'hide_if_empty' => false, 'option_none_value' => -1
|
||||
'hide_if_empty' => false, 'option_none_value' => -1,
|
||||
'value_field' => 'term_id',
|
||||
);
|
||||
|
||||
$defaults['selected'] = ( is_category() ) ? get_query_var( 'cat' ) : 0;
|
||||
@@ -356,7 +370,12 @@ function wp_dropdown_categories( $args = '' ) {
|
||||
if ( (int) $tab_index > 0 ) {
|
||||
$tab_index_attribute = " tabindex=\"$tab_index\"";
|
||||
}
|
||||
$categories = get_terms( $r['taxonomy'], $r );
|
||||
|
||||
// Avoid clashes with the 'name' param of get_terms().
|
||||
$get_terms_args = $r;
|
||||
unset( $get_terms_args['name'] );
|
||||
$categories = get_terms( $r['taxonomy'], $get_terms_args );
|
||||
|
||||
$name = esc_attr( $r['name'] );
|
||||
$class = esc_attr( $r['class'] );
|
||||
$id = $r['id'] ? esc_attr( $r['id'] ) : $name;
|
||||
@@ -460,7 +479,7 @@ function wp_dropdown_categories( $args = '' ) {
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param string|array $args Optional. Override default arguments.
|
||||
* @return string HTML content only if 'echo' argument is 0.
|
||||
* @return false|null|string HTML content only if 'echo' argument is 0.
|
||||
*/
|
||||
function wp_list_categories( $args = '' ) {
|
||||
$defaults = array(
|
||||
@@ -588,8 +607,8 @@ function wp_list_categories( $args = '' ) {
|
||||
*
|
||||
* @since 2.3.0
|
||||
*
|
||||
* @param array|string $args Optional. Override default arguments.
|
||||
* @return array Generated tag cloud, only if no failures and 'array' is set for the 'format' argument.
|
||||
* @param array|string|null $args Optional. Override default arguments.
|
||||
* @return null|false Generated tag cloud, only if no failures and 'array' is set for the 'format' argument.
|
||||
*/
|
||||
function wp_tag_cloud( $args = '' ) {
|
||||
$defaults = array(
|
||||
@@ -857,11 +876,11 @@ function _wp_object_count_sort_cb( $a, $b ) {
|
||||
function walk_category_tree() {
|
||||
$args = func_get_args();
|
||||
// the user's options are the third parameter
|
||||
if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') )
|
||||
if ( empty( $args[2]['walker'] ) || ! ( $args[2]['walker'] instanceof Walker ) ) {
|
||||
$walker = new Walker_Category;
|
||||
else
|
||||
} else {
|
||||
$walker = $args[2]['walker'];
|
||||
|
||||
}
|
||||
return call_user_func_array(array( &$walker, 'walk' ), $args );
|
||||
}
|
||||
|
||||
@@ -971,6 +990,11 @@ class Walker_Category extends Walker {
|
||||
$category
|
||||
);
|
||||
|
||||
// Don't generate an element if the category name is empty.
|
||||
if ( ! $cat_name ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$link = '<a href="' . esc_url( get_term_link( $category ) ) . '" ';
|
||||
if ( $args['use_desc_for_title'] && ! empty( $category->description ) ) {
|
||||
/**
|
||||
@@ -1023,16 +1047,35 @@ class Walker_Category extends Walker {
|
||||
}
|
||||
if ( 'list' == $args['style'] ) {
|
||||
$output .= "\t<li";
|
||||
$class = 'cat-item cat-item-' . $category->term_id;
|
||||
$css_classes = array(
|
||||
'cat-item',
|
||||
'cat-item-' . $category->term_id,
|
||||
);
|
||||
|
||||
if ( ! empty( $args['current_category'] ) ) {
|
||||
$_current_category = get_term( $args['current_category'], $category->taxonomy );
|
||||
if ( $category->term_id == $args['current_category'] ) {
|
||||
$class .= ' current-cat';
|
||||
$css_classes[] = 'current-cat';
|
||||
} elseif ( $category->term_id == $_current_category->parent ) {
|
||||
$class .= ' current-cat-parent';
|
||||
$css_classes[] = 'current-cat-parent';
|
||||
}
|
||||
}
|
||||
$output .= ' class="' . $class . '"';
|
||||
|
||||
/**
|
||||
* Filter the list of CSS classes to include with each category in the list.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @see wp_list_categories()
|
||||
*
|
||||
* @param array $css_classes An array of CSS classes to be applied to each list item.
|
||||
* @param object $category Category data object.
|
||||
* @param int $depth Depth of page, used for padding.
|
||||
* @param array $args An array of wp_list_categories() arguments.
|
||||
*/
|
||||
$css_classes = implode( ' ', apply_filters( 'category_css_class', $css_classes, $category, $depth, $args ) );
|
||||
|
||||
$output .= ' class="' . $css_classes . '"';
|
||||
$output .= ">$link\n";
|
||||
} else {
|
||||
$output .= "\t$link<br />\n";
|
||||
@@ -1092,7 +1135,8 @@ class Walker_CategoryDropdown extends Walker {
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @param object $category Category data object.
|
||||
* @param int $depth Depth of category. Used for padding.
|
||||
* @param array $args Uses 'selected' and 'show_count' keys, if they exist. @see wp_dropdown_categories()
|
||||
* @param array $args Uses 'selected', 'show_count', and 'value_field' keys, if they exist.
|
||||
* See {@see wp_dropdown_categories()}.
|
||||
*/
|
||||
public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
|
||||
$pad = str_repeat(' ', $depth * 3);
|
||||
@@ -1100,7 +1144,12 @@ class Walker_CategoryDropdown extends Walker {
|
||||
/** This filter is documented in wp-includes/category-template.php */
|
||||
$cat_name = apply_filters( 'list_cats', $category->name, $category );
|
||||
|
||||
$output .= "\t<option class=\"level-$depth\" value=\"".$category->term_id."\"";
|
||||
if ( ! isset( $args['value_field'] ) || ! isset( $category->{$args['value_field']} ) ) {
|
||||
$args['value_field'] = 'term_id';
|
||||
}
|
||||
|
||||
$output .= "\t<option class=\"level-$depth\" value=\"" . esc_attr( $category->{$args['value_field']} ) . "\"";
|
||||
|
||||
if ( $category->term_id == $args['selected'] )
|
||||
$output .= ' selected="selected"';
|
||||
$output .= '>';
|
||||
@@ -1291,24 +1340,27 @@ function get_the_term_list( $id, $taxonomy, $before = '', $sep = '', $after = ''
|
||||
if ( empty( $terms ) )
|
||||
return false;
|
||||
|
||||
$links = array();
|
||||
|
||||
foreach ( $terms as $term ) {
|
||||
$link = get_term_link( $term, $taxonomy );
|
||||
if ( is_wp_error( $link ) )
|
||||
if ( is_wp_error( $link ) ) {
|
||||
return $link;
|
||||
$term_links[] = '<a href="' . esc_url( $link ) . '" rel="tag">' . $term->name . '</a>';
|
||||
}
|
||||
$links[] = '<a href="' . esc_url( $link ) . '" rel="tag">' . $term->name . '</a>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the term links for a given taxonomy.
|
||||
*
|
||||
* The dynamic portion of the filter name, $taxonomy, refers
|
||||
* The dynamic portion of the filter name, `$taxonomy`, refers
|
||||
* to the taxonomy slug.
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param array $term_links An array of term links.
|
||||
* @param array $links An array of term links.
|
||||
*/
|
||||
$term_links = apply_filters( "term_links-$taxonomy", $term_links );
|
||||
$term_links = apply_filters( "term_links-$taxonomy", $links );
|
||||
|
||||
return $before . join( $sep, $term_links ) . $after;
|
||||
}
|
||||
@@ -1323,7 +1375,7 @@ function get_the_term_list( $id, $taxonomy, $before = '', $sep = '', $after = ''
|
||||
* @param string $before Optional. Before list.
|
||||
* @param string $sep Optional. Separate items using this.
|
||||
* @param string $after Optional. After list.
|
||||
* @return null|bool False on WordPress error. Returns null when displaying.
|
||||
* @return false|null False on WordPress error. Returns null when displaying.
|
||||
*/
|
||||
function the_terms( $id, $taxonomy, $before = '', $sep = ', ', $after = '' ) {
|
||||
$term_list = get_the_term_list( $id, $taxonomy, $before, $sep, $after );
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @see get_terms() Type of arguments that can be changed.
|
||||
* @link http://codex.wordpress.org/Function_Reference/get_categories
|
||||
* @link https://codex.wordpress.org/Function_Reference/get_categories
|
||||
*
|
||||
* @param string|array $args Optional. Change the defaults retrieving categories.
|
||||
* @return array List of categories.
|
||||
@@ -24,13 +24,14 @@ function get_categories( $args = '' ) {
|
||||
$args = wp_parse_args( $args, $defaults );
|
||||
|
||||
$taxonomy = $args['taxonomy'];
|
||||
|
||||
/**
|
||||
* Filter the taxonomy used to retrieve terms when calling get_categories().
|
||||
* Filter the taxonomy used to retrieve terms when calling {@see get_categories()}.
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param string $taxonomy Taxonomy to retrieve terms from.
|
||||
* @param array $args An array of arguments. @see get_terms()
|
||||
* @param array $args An array of arguments. See {@see get_terms()}.
|
||||
*/
|
||||
$taxonomy = apply_filters( 'get_categories_taxonomy', $taxonomy, $args );
|
||||
|
||||
@@ -63,7 +64,6 @@ function get_categories( $args = '' ) {
|
||||
* The category will converted to maintain backwards compatibility.
|
||||
*
|
||||
* @since 1.5.1
|
||||
* @uses get_term() Used to get the category data from the taxonomy.
|
||||
*
|
||||
* @param int|object $category Category ID or Category row object
|
||||
* @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
|
||||
@@ -210,7 +210,6 @@ function cat_is_ancestor_of( $cat1, $cat2 ) {
|
||||
* Sanitizes category data based on context.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @uses sanitize_term() See this function for what context are supported.
|
||||
*
|
||||
* @param object|array $category Category data
|
||||
* @param string $context Optional. Default is 'display'.
|
||||
@@ -224,7 +223,6 @@ function sanitize_category( $category, $context = 'display' ) {
|
||||
* Sanitizes data in single category key field.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @uses sanitize_term_field() See function for more details.
|
||||
*
|
||||
* @param string $field Category key to sanitize
|
||||
* @param mixed $value Category value to sanitize
|
||||
@@ -243,7 +241,6 @@ function sanitize_category_field( $field, $value, $cat_id, $context ) {
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @see get_terms() For list of arguments to pass.
|
||||
* @uses apply_filters() Calls 'get_tags' hook on array of tags and with $args.
|
||||
*
|
||||
* @param string|array $args Tag arguments to use when retrieving tags.
|
||||
* @return array List of tags.
|
||||
@@ -297,7 +294,6 @@ function get_tag( $tag, $output = OBJECT, $filter = 'raw' ) {
|
||||
* Remove the category cache data based on ID.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @uses clean_term_cache() Clears the cache for the category based on ID
|
||||
*
|
||||
* @param int $id Category ID
|
||||
*/
|
||||
|
||||
@@ -151,7 +151,7 @@ class IXR_Value {
|
||||
/**
|
||||
* Checks whether or not the supplied array is a struct or not
|
||||
*
|
||||
* @param unknown_type $array
|
||||
* @param array $array
|
||||
* @return boolean
|
||||
*/
|
||||
function isStruct($array)
|
||||
@@ -228,6 +228,13 @@ class IXR_Message
|
||||
// Bail if there are too many elements to parse
|
||||
$element_limit = 30000;
|
||||
if ( function_exists( 'apply_filters' ) ) {
|
||||
/**
|
||||
* Filter the number of elements to parse in an XML-RPC response.
|
||||
*
|
||||
* @since 4.0.0
|
||||
*
|
||||
* @param int $element_limit Default elements limit.
|
||||
*/
|
||||
$element_limit = apply_filters( 'xmlrpc_element_limit', $element_limit );
|
||||
}
|
||||
if ( $element_limit && 2 * $element_limit < substr_count( $this->message, '<' ) ) {
|
||||
@@ -395,7 +402,11 @@ class IXR_Server
|
||||
{
|
||||
if (!$data) {
|
||||
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] !== 'POST') {
|
||||
header('Content-Type: text/plain'); // merged from WP #9093
|
||||
if ( function_exists( 'status_header' ) ) {
|
||||
status_header( 405 ); // WP #20986
|
||||
header( 'Allow: POST' );
|
||||
}
|
||||
header('Content-Type: text/plain'); // merged from WP #9093
|
||||
die('XML-RPC server accepts POST requests only.');
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,9 @@ class WP_Feed_Cache_Transient {
|
||||
}
|
||||
|
||||
public function save($data) {
|
||||
if ( is_a($data, 'SimplePie') )
|
||||
if ( $data instanceof SimplePie ) {
|
||||
$data = $data->data;
|
||||
}
|
||||
|
||||
set_transient($this->name, $data, $this->lifetime);
|
||||
set_transient($this->mod_name, time(), $this->lifetime);
|
||||
|
||||
+164
-61
@@ -5,7 +5,7 @@
|
||||
* Standardizes the HTTP requests for WordPress. Handles cookies, gzip encoding and decoding, chunk
|
||||
* decoding, if HTTP 1.1 and various other difficult HTTP protocol implementations.
|
||||
*
|
||||
* @link http://trac.wordpress.org/ticket/4779 HTTP API Proposal
|
||||
* @link https://core.trac.wordpress.org/ticket/4779 HTTP API Proposal
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage HTTP
|
||||
@@ -182,7 +182,9 @@ class WP_Http {
|
||||
if ( function_exists( 'wp_kses_bad_protocol' ) ) {
|
||||
if ( $r['reject_unsafe_urls'] )
|
||||
$url = wp_http_validate_url( $url );
|
||||
$url = wp_kses_bad_protocol( $url, array( 'http', 'https', 'ssl' ) );
|
||||
if ( $url ) {
|
||||
$url = wp_kses_bad_protocol( $url, array( 'http', 'https', 'ssl' ) );
|
||||
}
|
||||
}
|
||||
|
||||
$arrURL = @parse_url( $url );
|
||||
@@ -208,8 +210,9 @@ class WP_Http {
|
||||
* If we are streaming to a file but no filename was given drop it in the WP temp dir
|
||||
* and pick its name using the basename of the $url.
|
||||
*/
|
||||
if ( $r['stream'] && empty( $r['filename'] ) )
|
||||
$r['filename'] = get_temp_dir() . basename( $url );
|
||||
if ( $r['stream'] && empty( $r['filename'] ) ) {
|
||||
$r['filename'] = wp_unique_filename( get_temp_dir(), basename( $url ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* Force some settings if we are streaming to a file and check for existence and perms
|
||||
@@ -225,7 +228,7 @@ class WP_Http {
|
||||
$r['headers'] = array();
|
||||
|
||||
if ( ! is_array( $r['headers'] ) ) {
|
||||
$processedHeaders = WP_Http::processHeaders( $r['headers'], $url );
|
||||
$processedHeaders = self::processHeaders( $r['headers'], $url );
|
||||
$r['headers'] = $processedHeaders['headers'];
|
||||
}
|
||||
|
||||
@@ -244,7 +247,7 @@ class WP_Http {
|
||||
}
|
||||
|
||||
// Construct Cookie: header if any cookies are set.
|
||||
WP_Http::buildCookieHeader( $r );
|
||||
self::buildCookieHeader( $r );
|
||||
|
||||
// Avoid issues where mbstring.func_overload is enabled.
|
||||
mbstring_binary_safe_encoding();
|
||||
@@ -298,7 +301,7 @@ class WP_Http {
|
||||
* @param array $args Request arguments
|
||||
* @param string $url URL to Request
|
||||
*
|
||||
* @return string|bool Class name for the first transport that claims to support the request. False if no transport claims to support the request.
|
||||
* @return string|false Class name for the first transport that claims to support the request. False if no transport claims to support the request.
|
||||
*/
|
||||
public function _get_first_available_transport( $args, $url = null ) {
|
||||
/**
|
||||
@@ -524,6 +527,9 @@ class WP_Http {
|
||||
$cookies[] = new WP_Http_Cookie( $value, $url );
|
||||
}
|
||||
|
||||
// Cast the Response Code to an int
|
||||
$response['code'] = intval( $response['code'] );
|
||||
|
||||
return array('response' => $response, 'headers' => $newheaders, 'cookies' => $cookies);
|
||||
}
|
||||
|
||||
@@ -615,8 +621,8 @@ class WP_Http {
|
||||
* are supported, eg *.wordpress.org will allow for all subdomains of wordpress.org to be contacted.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @link http://core.trac.wordpress.org/ticket/8927 Allow preventing external requests.
|
||||
* @link http://core.trac.wordpress.org/ticket/14636 Allow wildcard domains in WP_ACCESSIBLE_HOSTS
|
||||
* @link https://core.trac.wordpress.org/ticket/8927 Allow preventing external requests.
|
||||
* @link https://core.trac.wordpress.org/ticket/14636 Allow wildcard domains in WP_ACCESSIBLE_HOSTS
|
||||
*
|
||||
* @param string $uri URI of url.
|
||||
* @return bool True to block, false to allow.
|
||||
@@ -668,23 +674,89 @@ class WP_Http {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* A wrapper for PHP's parse_url() function that handles edgecases in < PHP 5.4.7
|
||||
*
|
||||
* PHP 5.4.7 expanded parse_url()'s ability to handle non-absolute url's, including
|
||||
* schemeless and relative url's with :// in the path, this works around those
|
||||
* limitations providing a standard output on PHP 5.2~5.4+.
|
||||
*
|
||||
* Error suppression is used as prior to PHP 5.3.3, an E_WARNING would be generated
|
||||
* when URL parsing failed.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access protected
|
||||
*
|
||||
* @param string $url The URL to parse.
|
||||
* @return bool|array False on failure; Array of URL components on success;
|
||||
* See parse_url()'s return values.
|
||||
*/
|
||||
protected static function parse_url( $url ) {
|
||||
$parts = @parse_url( $url );
|
||||
if ( ! $parts ) {
|
||||
// < PHP 5.4.7 compat, trouble with relative paths including a scheme break in the path
|
||||
if ( '/' == $url[0] && false !== strpos( $url, '://' ) ) {
|
||||
// Since we know it's a relative path, prefix with a scheme/host placeholder and try again
|
||||
if ( ! $parts = @parse_url( 'placeholder://placeholder' . $url ) ) {
|
||||
return $parts;
|
||||
}
|
||||
// Remove the placeholder values
|
||||
unset( $parts['scheme'], $parts['host'] );
|
||||
} else {
|
||||
return $parts;
|
||||
}
|
||||
}
|
||||
|
||||
// < PHP 5.4.7 compat, doesn't detect schemeless URL's host field
|
||||
if ( '//' == substr( $url, 0, 2 ) && ! isset( $parts['host'] ) ) {
|
||||
list( $parts['host'], $slashless_path ) = explode( '/', substr( $parts['path'], 2 ), 2 );
|
||||
$parts['path'] = "/{$slashless_path}";
|
||||
}
|
||||
|
||||
return $parts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a relative URL to an absolute URL relative to a given URL.
|
||||
*
|
||||
* If an Absolute URL is provided, no processing of that URL is done.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @access public
|
||||
* @param string $maybe_relative_path The URL which might be relative
|
||||
* @param string $url The URL which $maybe_relative_path is relative to
|
||||
* @return string An Absolute URL, in a failure condition where the URL cannot be parsed, the relative URL will be returned.
|
||||
*/
|
||||
public static function make_absolute_url( $maybe_relative_path, $url ) {
|
||||
if ( empty( $url ) )
|
||||
return $maybe_relative_path;
|
||||
|
||||
// Check for a scheme.
|
||||
if ( false !== strpos( $maybe_relative_path, '://' ) )
|
||||
if ( ! $url_parts = WP_HTTP::parse_url( $url ) ) {
|
||||
return $maybe_relative_path;
|
||||
}
|
||||
|
||||
if ( ! $url_parts = @parse_url( $url ) )
|
||||
if ( ! $relative_url_parts = WP_HTTP::parse_url( $maybe_relative_path ) ) {
|
||||
return $maybe_relative_path;
|
||||
}
|
||||
|
||||
if ( ! $relative_url_parts = @parse_url( $maybe_relative_path ) )
|
||||
// Check for a scheme on the 'relative' url
|
||||
if ( ! empty( $relative_url_parts['scheme'] ) ) {
|
||||
return $maybe_relative_path;
|
||||
}
|
||||
|
||||
$absolute_path = $url_parts['scheme'] . '://' . $url_parts['host'];
|
||||
if ( isset( $url_parts['port'] ) )
|
||||
$absolute_path .= ':' . $url_parts['port'];
|
||||
$absolute_path = $url_parts['scheme'] . '://';
|
||||
|
||||
// Schemeless URL's will make it this far, so we check for a host in the relative url and convert it to a protocol-url
|
||||
if ( isset( $relative_url_parts['host'] ) ) {
|
||||
$absolute_path .= $relative_url_parts['host'];
|
||||
if ( isset( $relative_url_parts['port'] ) )
|
||||
$absolute_path .= ':' . $relative_url_parts['port'];
|
||||
} else {
|
||||
$absolute_path .= $url_parts['host'];
|
||||
if ( isset( $url_parts['port'] ) )
|
||||
$absolute_path .= ':' . $url_parts['port'];
|
||||
}
|
||||
|
||||
// Start off with the Absolute URL path.
|
||||
$path = ! empty( $url_parts['path'] ) ? $url_parts['path'] : '/';
|
||||
@@ -823,12 +895,12 @@ class WP_Http_Streams {
|
||||
|
||||
$r = wp_parse_args( $args, $defaults );
|
||||
|
||||
if ( isset($r['headers']['User-Agent']) ) {
|
||||
if ( isset( $r['headers']['User-Agent'] ) ) {
|
||||
$r['user-agent'] = $r['headers']['User-Agent'];
|
||||
unset($r['headers']['User-Agent']);
|
||||
} else if ( isset($r['headers']['user-agent']) ) {
|
||||
unset( $r['headers']['User-Agent'] );
|
||||
} elseif ( isset( $r['headers']['user-agent'] ) ) {
|
||||
$r['user-agent'] = $r['headers']['user-agent'];
|
||||
unset($r['headers']['user-agent']);
|
||||
unset( $r['headers']['user-agent'] );
|
||||
}
|
||||
|
||||
// Construct Cookie: header if any cookies are set.
|
||||
@@ -848,6 +920,11 @@ class WP_Http_Streams {
|
||||
}
|
||||
}
|
||||
|
||||
// Always pass a Path, defaulting to the root in cases such as http://example.com
|
||||
if ( ! isset( $arrURL['path'] ) ) {
|
||||
$arrURL['path'] = '/';
|
||||
}
|
||||
|
||||
if ( isset( $r['headers']['Host'] ) || isset( $r['headers']['host'] ) ) {
|
||||
if ( isset( $r['headers']['Host'] ) )
|
||||
$arrURL['host'] = $r['headers']['Host'];
|
||||
@@ -952,15 +1029,19 @@ class WP_Http_Streams {
|
||||
else
|
||||
$requestPath = $arrURL['path'] . ( isset($arrURL['query']) ? '?' . $arrURL['query'] : '' );
|
||||
|
||||
if ( empty($requestPath) )
|
||||
$requestPath .= '/';
|
||||
|
||||
$strHeaders = strtoupper($r['method']) . ' ' . $requestPath . ' HTTP/' . $r['httpversion'] . "\r\n";
|
||||
|
||||
if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) )
|
||||
$include_port_in_host_header = (
|
||||
( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) ||
|
||||
( 'http' == $arrURL['scheme'] && 80 != $arrURL['port'] ) ||
|
||||
( 'https' == $arrURL['scheme'] && 443 != $arrURL['port'] )
|
||||
);
|
||||
|
||||
if ( $include_port_in_host_header ) {
|
||||
$strHeaders .= 'Host: ' . $arrURL['host'] . ':' . $arrURL['port'] . "\r\n";
|
||||
else
|
||||
} else {
|
||||
$strHeaders .= 'Host: ' . $arrURL['host'] . "\r\n";
|
||||
}
|
||||
|
||||
if ( isset($r['user-agent']) )
|
||||
$strHeaders .= 'User-agent: ' . $r['user-agent'] . "\r\n";
|
||||
@@ -1020,8 +1101,10 @@ class WP_Http_Streams {
|
||||
|
||||
$this_block_size = strlen( $block );
|
||||
|
||||
if ( isset( $r['limit_response_size'] ) && ( $bytes_written + $this_block_size ) > $r['limit_response_size'] )
|
||||
$block = substr( $block, 0, ( $r['limit_response_size'] - $bytes_written ) );
|
||||
if ( isset( $r['limit_response_size'] ) && ( $bytes_written + $this_block_size ) > $r['limit_response_size'] ) {
|
||||
$this_block_size = ( $r['limit_response_size'] - $bytes_written );
|
||||
$block = substr( $block, 0, $this_block_size );
|
||||
}
|
||||
|
||||
$bytes_written_to_file = fwrite( $stream_handle, $block );
|
||||
|
||||
@@ -1248,6 +1331,15 @@ class WP_Http_Curl {
|
||||
*/
|
||||
private $stream_handle = false;
|
||||
|
||||
/**
|
||||
* The total bytes written in the current request.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access private
|
||||
* @var int
|
||||
*/
|
||||
private $bytes_written_total = 0;
|
||||
|
||||
/**
|
||||
* Send a HTTP request to a URI using cURL extension.
|
||||
*
|
||||
@@ -1268,12 +1360,12 @@ class WP_Http_Curl {
|
||||
|
||||
$r = wp_parse_args( $args, $defaults );
|
||||
|
||||
if ( isset($r['headers']['User-Agent']) ) {
|
||||
if ( isset( $r['headers']['User-Agent'] ) ) {
|
||||
$r['user-agent'] = $r['headers']['User-Agent'];
|
||||
unset($r['headers']['User-Agent']);
|
||||
} else if ( isset($r['headers']['user-agent']) ) {
|
||||
unset( $r['headers']['User-Agent'] );
|
||||
} elseif ( isset( $r['headers']['user-agent'] ) ) {
|
||||
$r['user-agent'] = $r['headers']['user-agent'];
|
||||
unset($r['headers']['user-agent']);
|
||||
unset( $r['headers']['user-agent'] );
|
||||
}
|
||||
|
||||
// Construct Cookie: header if any cookies are set.
|
||||
@@ -1420,21 +1512,32 @@ class WP_Http_Curl {
|
||||
curl_exec( $handle );
|
||||
$theHeaders = WP_Http::processHeaders( $this->headers, $url );
|
||||
$theBody = $this->body;
|
||||
$bytes_written_total = $this->bytes_written_total;
|
||||
|
||||
$this->headers = '';
|
||||
$this->body = '';
|
||||
$this->bytes_written_total = 0;
|
||||
|
||||
$curl_error = curl_errno( $handle );
|
||||
|
||||
// If an error occurred, or, no response.
|
||||
if ( $curl_error || ( 0 == strlen( $theBody ) && empty( $theHeaders['headers'] ) ) ) {
|
||||
if ( CURLE_WRITE_ERROR /* 23 */ == $curl_error && $r['stream'] ) {
|
||||
fclose( $this->stream_handle );
|
||||
return new WP_Error( 'http_request_failed', __( 'Failed to write request to temporary file.' ) );
|
||||
}
|
||||
if ( $curl_error = curl_error( $handle ) ) {
|
||||
curl_close( $handle );
|
||||
return new WP_Error( 'http_request_failed', $curl_error );
|
||||
if ( CURLE_WRITE_ERROR /* 23 */ == $curl_error ) {
|
||||
if ( ! $this->max_body_length || $this->max_body_length != $bytes_written_total ) {
|
||||
if ( $r['stream'] ) {
|
||||
curl_close( $handle );
|
||||
fclose( $this->stream_handle );
|
||||
return new WP_Error( 'http_request_failed', __( 'Failed to write request to temporary file.' ) );
|
||||
} else {
|
||||
curl_close( $handle );
|
||||
return new WP_Error( 'http_request_failed', curl_error( $handle ) );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ( $curl_error = curl_error( $handle ) ) {
|
||||
curl_close( $handle );
|
||||
return new WP_Error( 'http_request_failed', $curl_error );
|
||||
}
|
||||
}
|
||||
if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array( 301, 302 ) ) ) {
|
||||
curl_close( $handle );
|
||||
@@ -1442,10 +1545,6 @@ class WP_Http_Curl {
|
||||
}
|
||||
}
|
||||
|
||||
$response = array();
|
||||
$response['code'] = curl_getinfo( $handle, CURLINFO_HTTP_CODE );
|
||||
$response['message'] = get_status_header_desc($response['code']);
|
||||
|
||||
curl_close( $handle );
|
||||
|
||||
if ( $r['stream'] )
|
||||
@@ -1454,7 +1553,7 @@ class WP_Http_Curl {
|
||||
$response = array(
|
||||
'headers' => $theHeaders['headers'],
|
||||
'body' => null,
|
||||
'response' => $response,
|
||||
'response' => $theHeaders['response'],
|
||||
'cookies' => $theHeaders['cookies'],
|
||||
'filename' => $r['filename']
|
||||
);
|
||||
@@ -1489,7 +1588,7 @@ class WP_Http_Curl {
|
||||
* Grab the body of the cURL request
|
||||
*
|
||||
* The contents of the document are passed in chunks, so we append to the $body property for temporary storage.
|
||||
* Returning a length shorter than the length of $data passed in will cause cURL to abort the request as "completed"
|
||||
* Returning a length shorter than the length of $data passed in will cause cURL to abort the request with CURLE_WRITE_ERROR
|
||||
*
|
||||
* @since 3.6.0
|
||||
* @access private
|
||||
@@ -1498,8 +1597,10 @@ class WP_Http_Curl {
|
||||
private function stream_body( $handle, $data ) {
|
||||
$data_length = strlen( $data );
|
||||
|
||||
if ( $this->max_body_length && ( strlen( $this->body ) + $data_length ) > $this->max_body_length )
|
||||
$data = substr( $data, 0, ( $this->max_body_length - $data_length ) );
|
||||
if ( $this->max_body_length && ( $this->bytes_written_total + $data_length ) > $this->max_body_length ) {
|
||||
$data_length = ( $this->max_body_length - $this->bytes_written_total );
|
||||
$data = substr( $data, 0, $data_length );
|
||||
}
|
||||
|
||||
if ( $this->stream_handle ) {
|
||||
$bytes_written = fwrite( $this->stream_handle, $data );
|
||||
@@ -1508,6 +1609,8 @@ class WP_Http_Curl {
|
||||
$bytes_written = $data_length;
|
||||
}
|
||||
|
||||
$this->bytes_written_total += $bytes_written;
|
||||
|
||||
// Upon event of this function returning less than strlen( $data ) curl will error with CURLE_WRITE_ERROR.
|
||||
return $bytes_written;
|
||||
}
|
||||
@@ -1567,14 +1670,13 @@ class WP_Http_Curl {
|
||||
* </ol>
|
||||
*
|
||||
* An example can be as seen below.
|
||||
* <code>
|
||||
* define('WP_PROXY_HOST', '192.168.84.101');
|
||||
* define('WP_PROXY_PORT', '8080');
|
||||
* define('WP_PROXY_BYPASS_HOSTS', 'localhost, www.example.com, *.wordpress.org');
|
||||
* </code>
|
||||
*
|
||||
* @link http://core.trac.wordpress.org/ticket/4011 Proxy support ticket in WordPress.
|
||||
* @link http://core.trac.wordpress.org/ticket/14636 Allow wildcard domains in WP_PROXY_BYPASS_HOSTS
|
||||
* define('WP_PROXY_HOST', '192.168.84.101');
|
||||
* define('WP_PROXY_PORT', '8080');
|
||||
* define('WP_PROXY_BYPASS_HOSTS', 'localhost, www.example.com, *.wordpress.org');
|
||||
*
|
||||
* @link https://core.trac.wordpress.org/ticket/4011 Proxy support ticket in WordPress.
|
||||
* @link https://core.trac.wordpress.org/ticket/14636 Allow wildcard domains in WP_PROXY_BYPASS_HOSTS
|
||||
* @since 2.8.0
|
||||
*/
|
||||
class WP_HTTP_Proxy {
|
||||
@@ -1692,7 +1794,6 @@ class WP_HTTP_Proxy {
|
||||
* some proxies can not handle this. We also have the constant available for defining other
|
||||
* hosts that won't be sent through the proxy.
|
||||
*
|
||||
* @uses WP_PROXY_BYPASS_HOSTS
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param string $uri URI to check.
|
||||
@@ -1868,7 +1969,7 @@ class WP_Http_Cookie {
|
||||
}
|
||||
} else {
|
||||
if ( !isset( $data['name'] ) )
|
||||
return false;
|
||||
return;
|
||||
|
||||
// Set properties based directly on parameters.
|
||||
foreach ( array( 'name', 'value', 'path', 'domain', 'port' ) as $field ) {
|
||||
@@ -1987,7 +2088,7 @@ class WP_Http_Encoding {
|
||||
* @param string $raw String to compress.
|
||||
* @param int $level Optional, default is 9. Compression level, 9 is highest.
|
||||
* @param string $supports Optional, not used. When implemented it will choose the right compression based on what the server supports.
|
||||
* @return string|bool False on failure.
|
||||
* @return string|false False on failure.
|
||||
*/
|
||||
public static function compress( $raw, $level = 9, $supports = null ) {
|
||||
return gzdeflate( $raw, $level );
|
||||
@@ -2015,7 +2116,7 @@ class WP_Http_Encoding {
|
||||
if ( false !== ( $decompressed = @gzinflate( $compressed ) ) )
|
||||
return $decompressed;
|
||||
|
||||
if ( false !== ( $decompressed = WP_Http_Encoding::compatible_gzinflate( $compressed ) ) )
|
||||
if ( false !== ( $decompressed = self::compatible_gzinflate( $compressed ) ) )
|
||||
return $decompressed;
|
||||
|
||||
if ( false !== ( $decompressed = @gzuncompress( $compressed ) ) )
|
||||
@@ -2041,10 +2142,10 @@ class WP_Http_Encoding {
|
||||
* Warning: Magic numbers within. Due to the potential different formats that the compressed
|
||||
* data may be returned in, some "magic offsets" are needed to ensure proper decompression
|
||||
* takes place. For a simple progmatic way to determine the magic offset in use, see:
|
||||
* http://core.trac.wordpress.org/ticket/18273
|
||||
* https://core.trac.wordpress.org/ticket/18273
|
||||
*
|
||||
* @since 2.8.1
|
||||
* @link http://core.trac.wordpress.org/ticket/18273
|
||||
* @link https://core.trac.wordpress.org/ticket/18273
|
||||
* @link http://au2.php.net/manual/en/function.gzinflate.php#70875
|
||||
* @link http://au2.php.net/manual/en/function.gzinflate.php#77336
|
||||
*
|
||||
@@ -2087,11 +2188,13 @@ class WP_Http_Encoding {
|
||||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param string $url
|
||||
* @param array $args
|
||||
* @return string Types of encoding to accept.
|
||||
*/
|
||||
public static function accept_encoding( $url, $args ) {
|
||||
$type = array();
|
||||
$compression_enabled = WP_Http_Encoding::is_available();
|
||||
$compression_enabled = self::is_available();
|
||||
|
||||
if ( ! $args['decompress'] ) // Decompression specifically disabled.
|
||||
$compression_enabled = false;
|
||||
@@ -2149,7 +2252,7 @@ class WP_Http_Encoding {
|
||||
if ( is_array( $headers ) ) {
|
||||
if ( array_key_exists('content-encoding', $headers) && ! empty( $headers['content-encoding'] ) )
|
||||
return true;
|
||||
} else if ( is_string( $headers ) ) {
|
||||
} elseif ( is_string( $headers ) ) {
|
||||
return ( stripos($headers, 'content-encoding:') !== false );
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* API for fetching the HTML to embed remote content based on a provided URL.
|
||||
* Used internally by the {@link WP_Embed} class, but is designed to be generic.
|
||||
*
|
||||
* @link http://codex.wordpress.org/oEmbed oEmbed Codex Article
|
||||
* @link https://codex.wordpress.org/oEmbed oEmbed Codex Article
|
||||
* @link http://oembed.com/ oEmbed Homepage
|
||||
*
|
||||
* @package WordPress
|
||||
@@ -21,6 +21,8 @@ class WP_oEmbed {
|
||||
public $providers = array();
|
||||
public static $early_providers = array();
|
||||
|
||||
private $compat_methods = array( '_fetch_with_format', '_parse_json', '_parse_xml', '_parse_body' );
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@@ -42,18 +44,18 @@ class WP_oEmbed {
|
||||
'#https?://flic\.kr/.*#i' => array( 'https://www.flickr.com/services/oembed/', true ),
|
||||
'#https?://(.+\.)?smugmug\.com/.*#i' => array( 'http://api.smugmug.com/services/oembed/', true ),
|
||||
'#https?://(www\.)?hulu\.com/watch/.*#i' => array( 'http://www.hulu.com/api/oembed.{format}', true ),
|
||||
'http://revision3.com/*' => array( 'http://revision3.com/api/oembed/', false ),
|
||||
'http://i*.photobucket.com/albums/*' => array( 'http://photobucket.com/oembed', false ),
|
||||
'http://gi*.photobucket.com/groups/*' => array( 'http://photobucket.com/oembed', false ),
|
||||
'#https?://(www\.)?scribd\.com/doc/.*#i' => array( 'http://www.scribd.com/services/oembed', true ),
|
||||
'#https?://wordpress.tv/.*#i' => array( 'http://wordpress.tv/oembed/', true ),
|
||||
'#https?://wordpress.tv/.*#i' => array( 'http://wordpress.tv/oembed/', true ),
|
||||
'#https?://(.+\.)?polldaddy\.com/.*#i' => array( 'https://polldaddy.com/oembed/', true ),
|
||||
'#https?://poll\.fm/.*#i' => array( 'https://polldaddy.com/oembed/', true ),
|
||||
'#https?://(www\.)?funnyordie\.com/videos/.*#i' => array( 'http://www.funnyordie.com/oembed', true ),
|
||||
'#https?://(www\.)?twitter\.com/.+?/status(es)?/.*#i' => array( 'https://api.twitter.com/1/statuses/oembed.{format}', true ),
|
||||
'#https?://vine.co/v/.*#i' => array( 'https://vine.co/oembed.{format}', true ),
|
||||
'#https?://(www\.)?soundcloud\.com/.*#i' => array( 'http://soundcloud.com/oembed', true ),
|
||||
'#https?://(www\.)?slideshare\.net/.*#i' => array( 'https://www.slideshare.net/api/oembed/2', true ),
|
||||
'#http://instagr(\.am|am\.com)/p/.*#i' => array( 'http://api.instagram.com/oembed', true ),
|
||||
'#https?://(.+?\.)?slideshare\.net/.*#i' => array( 'https://www.slideshare.net/api/oembed/2', true ),
|
||||
'#https?://instagr(\.am|am\.com)/p/.*#i' => array( 'https://api.instagram.com/oembed', true ),
|
||||
'#https?://(www\.)?rdio\.com/.*#i' => array( 'http://www.rdio.com/api/oembed/', true ),
|
||||
'#https?://rd\.io/x/.*#i' => array( 'http://www.rdio.com/api/oembed/', true ),
|
||||
'#https?://(open|play)\.spotify\.com/.*#i' => array( 'https://embed.spotify.com/oembed/', true ),
|
||||
@@ -64,6 +66,9 @@ class WP_oEmbed {
|
||||
'#https?://(www\.)?mixcloud\.com/.*#i' => array( 'http://www.mixcloud.com/oembed', true ),
|
||||
'#https?://(www\.|embed\.)?ted\.com/talks/.*#i' => array( 'http://www.ted.com/talks/oembed.{format}', true ),
|
||||
'#https?://(www\.)?(animoto|video214)\.com/play/.*#i' => array( 'http://animoto.com/oembeds/create', true ),
|
||||
'#https?://(.+)\.tumblr\.com/post/.*#i' => array( 'https://www.tumblr.com/oembed/1.0', true ),
|
||||
'#https?://(www\.)?kickstarter\.com/projects/.*#i' => array( 'https://www.kickstarter.com/services/oembed', true ),
|
||||
'#https?://kck\.st/.*#i' => array( 'https://www.kickstarter.com/services/oembed', true ),
|
||||
);
|
||||
|
||||
if ( ! empty( self::$early_providers['add'] ) ) {
|
||||
@@ -91,12 +96,11 @@ class WP_oEmbed {
|
||||
* | ------------ | -------------------- | ----- | --------- |
|
||||
* | Provider | Flavor | SSL | Since |
|
||||
* | ------------ | -------------------- | ----- | --------- |
|
||||
* | Blip | blip.tv | | 2.9.0 |
|
||||
* | Blip | blip.tv | ! | 2.9.0 |
|
||||
* | Dailymotion | dailymotion.com | Yes | 2.9.0 |
|
||||
* | Flickr | flickr.com | Yes | 2.9.0 |
|
||||
* | Hulu | hulu.com | Yes | 2.9.0 |
|
||||
* | Photobucket | photobucket.com | | 2.9.0 |
|
||||
* | Revision3 | revision3.com | | 2.9.0 |
|
||||
* | Photobucket | photobucket.com | ! | 2.9.0 |
|
||||
* | Scribd | scribd.com | Yes | 2.9.0 |
|
||||
* | Vimeo | vimeo.com | Yes | 2.9.0 |
|
||||
* | WordPress.tv | wordpress.tv | Yes | 2.9.0 |
|
||||
@@ -109,12 +113,12 @@ class WP_oEmbed {
|
||||
* | ------------ | -------------------- | ----- | --------- |
|
||||
* | Twitter | twitter.com | Yes | 3.4.0 |
|
||||
* | ------------ | -------------------- | ----- | --------- |
|
||||
* | Instagram | instagram.com | | 3.5.0 |
|
||||
* | Instagram | instagr.am | | 3.5.0 |
|
||||
* | Instagram | instagram.com | Yes | 3.5.0 |
|
||||
* | Instagram | instagr.am | Yes | 3.5.0 |
|
||||
* | Slideshare | slideshare.net | Yes | 3.5.0 |
|
||||
* | SoundCloud | soundcloud.com | Yes | 3.5.0 |
|
||||
* | ------------ | -------------------- | ----- | --------- |
|
||||
* | Dailymotion | dai.ly | | 3.6.0 |
|
||||
* | Dailymotion | dai.ly | ! | 3.6.0 |
|
||||
* | Flickr | flic.kr | Yes | 3.6.0 |
|
||||
* | Rdio | rdio.com | Yes | 3.6.0 |
|
||||
* | Rdio | rd.io | Yes | 3.6.0 |
|
||||
@@ -133,6 +137,12 @@ class WP_oEmbed {
|
||||
* | TED | ted.com | Yes | 4.0.0 |
|
||||
* | YouTube | youtube.com/playlist | Yes | 4.0.0 |
|
||||
* | ------------ | -------------------- | ----- | --------- |
|
||||
* | Vine | vine.co | Yes | 4.1.0 |
|
||||
* | ------------ | -------------------- | ----- | --------- |
|
||||
* | Tumblr | tumblr.com | Yes | 4.2.0 |
|
||||
* | Kickstarter | kickstarter.com | Yes | 4.2.0 |
|
||||
* | Kickstarter | kck.st | Yes | 4.2.0 |
|
||||
* | ------------ | -------------------- | ----- | --------- |
|
||||
*
|
||||
* No longer supported providers:
|
||||
*
|
||||
@@ -143,6 +153,8 @@ class WP_oEmbed {
|
||||
* | ------------ | -------------------- | ----- | --------- | --------- |
|
||||
* | Viddler | viddler.com | Yes | 2.9.0 | 4.0.0 |
|
||||
* | ------------ | -------------------- | ----- | --------- | --------- |
|
||||
* | Revision3 | revision3.com | ! | 2.9.0 | 4.2.0 |
|
||||
* | ------------ | -------------------- | ----- | --------- | --------- |
|
||||
*
|
||||
* @see wp_oembed_add_provider()
|
||||
*
|
||||
@@ -167,7 +179,10 @@ class WP_oEmbed {
|
||||
* @return mixed|bool Return value of the callback, false otherwise.
|
||||
*/
|
||||
public function __call( $name, $arguments ) {
|
||||
return call_user_func_array( array( $this, $name ), $arguments );
|
||||
if ( in_array( $name, $this->compat_methods ) ) {
|
||||
return call_user_func_array( array( $this, $name ), $arguments );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -267,9 +282,9 @@ class WP_oEmbed {
|
||||
*
|
||||
* @param string $url The URL to the content that should be attempted to be embedded.
|
||||
* @param array $args Optional arguments. Usually passed from a shortcode.
|
||||
* @return bool|string False on failure, otherwise the UNSANITIZED (and potentially unsafe) HTML that should be used to embed.
|
||||
* @return false|string False on failure, otherwise the UNSANITIZED (and potentially unsafe) HTML that should be used to embed.
|
||||
*/
|
||||
function get_html( $url, $args = '' ) {
|
||||
public function get_html( $url, $args = '' ) {
|
||||
$provider = $this->get_provider( $url, $args );
|
||||
|
||||
if ( !$provider || false === $data = $this->fetch( $provider, $url, $args ) )
|
||||
@@ -288,9 +303,9 @@ class WP_oEmbed {
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to find oEmbed provider discovery <link> tags at the given URL.
|
||||
* Attempts to discover link tags at the given URL for an oEmbed provider.
|
||||
*
|
||||
* @param string $url The URL that should be inspected for discovery <link> tags.
|
||||
* @param string $url The URL that should be inspected for discovery `<link>` tags.
|
||||
* @return bool|string False on failure, otherwise the oEmbed provider URL.
|
||||
*/
|
||||
public function discover( $url ) {
|
||||
@@ -339,12 +354,12 @@ class WP_oEmbed {
|
||||
}
|
||||
}
|
||||
|
||||
if ( $tagfound && preg_match_all( '/<link([^<>]+)>/i', $html, $links ) ) {
|
||||
if ( $tagfound && preg_match_all( '#<link([^<>]+)/?>#iU', $html, $links ) ) {
|
||||
foreach ( $links[1] as $link ) {
|
||||
$atts = shortcode_parse_atts( $link );
|
||||
|
||||
if ( !empty($atts['type']) && !empty($linktypes[$atts['type']]) && !empty($atts['href']) ) {
|
||||
$providers[$linktypes[$atts['type']]] = $atts['href'];
|
||||
$providers[$linktypes[$atts['type']]] = htmlspecialchars_decode( $atts['href'] );
|
||||
|
||||
// Stop here if it's JSON (that's all we need)
|
||||
if ( 'json' == $linktypes[$atts['type']] )
|
||||
@@ -493,7 +508,7 @@ class WP_oEmbed {
|
||||
*
|
||||
* @param object $data A data object result from an oEmbed provider.
|
||||
* @param string $url The URL to the content that is desired to be embedded.
|
||||
* @return bool|string False on error, otherwise the HTML needed to embed.
|
||||
* @return false|string False on error, otherwise the HTML needed to embed.
|
||||
*/
|
||||
public function data2html( $data, $url ) {
|
||||
if ( ! is_object( $data ) || empty( $data->type ) )
|
||||
@@ -544,17 +559,39 @@ class WP_oEmbed {
|
||||
/**
|
||||
* Strip any new lines from the HTML.
|
||||
*
|
||||
* @access private
|
||||
* @access public
|
||||
* @param string $html Existing HTML.
|
||||
* @param object $data Data object from WP_oEmbed::data2html()
|
||||
* @param string $url The original URL passed to oEmbed.
|
||||
* @return string Possibly modified $html
|
||||
*/
|
||||
private function _strip_newlines( $html, $data, $url ) {
|
||||
if ( false !== strpos( $html, "\n" ) )
|
||||
$html = str_replace( array( "\r\n", "\n" ), '', $html );
|
||||
public function _strip_newlines( $html, $data, $url ) {
|
||||
if ( false === strpos( $html, "\n" ) ) {
|
||||
return $html;
|
||||
}
|
||||
|
||||
return $html;
|
||||
$count = 1;
|
||||
$found = array();
|
||||
$token = '__PRE__';
|
||||
$search = array( "\t", "\n", "\r", ' ' );
|
||||
$replace = array( '__TAB__', '__NL__', '__CR__', '__SPACE__' );
|
||||
$tokenized = str_replace( $search, $replace, $html );
|
||||
|
||||
preg_match_all( '#(<pre[^>]*>.+?</pre>)#i', $tokenized, $matches, PREG_SET_ORDER );
|
||||
foreach ( $matches as $i => $match ) {
|
||||
$tag_html = str_replace( $replace, $search, $match[0] );
|
||||
$tag_token = $token . $i;
|
||||
|
||||
$found[ $tag_token ] = $tag_html;
|
||||
$html = str_replace( $tag_html, $tag_token, $html, $count );
|
||||
}
|
||||
|
||||
$replaced = str_replace( $replace, $search, $html );
|
||||
$stripped = str_replace( array( "\r\n", "\n" ), '', $replaced );
|
||||
$pre = array_values( $found );
|
||||
$tokens = array_keys( $found );
|
||||
|
||||
return str_replace( $tokens, $pre, $stripped );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -565,7 +602,6 @@ class WP_oEmbed {
|
||||
* @access private
|
||||
*
|
||||
* @see WP_oEmbed
|
||||
* @uses WP_oEmbed
|
||||
*
|
||||
* @return WP_oEmbed object.
|
||||
*/
|
||||
|
||||
@@ -409,7 +409,7 @@ class SMTP
|
||||
// RFC 2104 HMAC implementation for php.
|
||||
// Creates an md5 HMAC.
|
||||
// Eliminates the need to install mhash to compute a HMAC
|
||||
// Hacked by Lance Rushing
|
||||
// by Lance Rushing
|
||||
|
||||
$b = 64; // byte length for md5
|
||||
if (strlen($key) > $b) {
|
||||
|
||||
@@ -363,9 +363,11 @@ class WP_Admin_Bar {
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="wpadminbar" class="<?php echo $class; ?>" role="navigation">
|
||||
<a class="screen-reader-shortcut" href="#wp-toolbar" tabindex="1"><?php _e('Skip to toolbar'); ?></a>
|
||||
<div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="<?php esc_attr_e('Top navigation toolbar.'); ?>" tabindex="0">
|
||||
<div id="wpadminbar" class="<?php echo $class; ?>">
|
||||
<?php if ( ! is_admin() ) { ?>
|
||||
<a class="screen-reader-shortcut" href="#wp-toolbar" tabindex="1"><?php _e( 'Skip to toolbar' ); ?></a>
|
||||
<?php } ?>
|
||||
<div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="<?php esc_attr_e( 'Toolbar' ); ?>" tabindex="0">
|
||||
<?php foreach ( $root->children as $group ) {
|
||||
$this->_render_group( $group );
|
||||
} ?>
|
||||
|
||||
@@ -11,9 +11,8 @@ class WP_Ajax_Response {
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @var array
|
||||
* @access private
|
||||
*/
|
||||
private $responses = array();
|
||||
public $responses = array();
|
||||
|
||||
/**
|
||||
* Constructor - Passes args to {@link WP_Ajax_Response::add()}.
|
||||
@@ -22,65 +21,12 @@ class WP_Ajax_Response {
|
||||
* @see WP_Ajax_Response::add()
|
||||
*
|
||||
* @param string|array $args Optional. Will be passed to add() method.
|
||||
* @return WP_Ajax_Response
|
||||
*/
|
||||
public function __construct( $args = '' ) {
|
||||
if ( !empty($args) )
|
||||
$this->add($args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Make private properties readable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $name Property to get.
|
||||
* @return mixed Property.
|
||||
*/
|
||||
public function __get( $name ) {
|
||||
return $this->$name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make private properties settable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $name Property to set.
|
||||
* @param mixed $value Property value.
|
||||
* @return mixed Newly-set property.
|
||||
*/
|
||||
public function __set( $name, $value ) {
|
||||
return $this->$name = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make private properties checkable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $name Property to check if set.
|
||||
* @return bool Whether the property is set.
|
||||
*/
|
||||
public function __isset( $name ) {
|
||||
return isset( $this->$name );
|
||||
}
|
||||
|
||||
/**
|
||||
* Make private properties un-settable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $name Property to unset.
|
||||
*/
|
||||
public function __unset( $name ) {
|
||||
unset( $this->$name );
|
||||
}
|
||||
|
||||
/**
|
||||
* Append to XML response based on given arguments.
|
||||
*
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,6 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Customize Manager.
|
||||
* WordPress Customize Manager classes
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Customize
|
||||
* @since 3.4.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Customize Manager class.
|
||||
*
|
||||
* Bootstraps the Customize experience on the server-side.
|
||||
*
|
||||
@@ -10,8 +18,6 @@
|
||||
* Serves as a factory for Customize Controls and Settings, and
|
||||
* instantiates default Customize Controls and Settings.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Customize
|
||||
* @since 3.4.0
|
||||
*/
|
||||
final class WP_Customize_Manager {
|
||||
@@ -37,7 +43,7 @@ final class WP_Customize_Manager {
|
||||
protected $previewing = false;
|
||||
|
||||
/**
|
||||
* Methods and properties deailing with managing widgets in the customizer.
|
||||
* Methods and properties deailing with managing widgets in the Customizer.
|
||||
*
|
||||
* @var WP_Customize_Widgets
|
||||
*/
|
||||
@@ -54,7 +60,16 @@ final class WP_Customize_Manager {
|
||||
protected $customized;
|
||||
|
||||
/**
|
||||
* $_POST values for Customize Settings.
|
||||
* Controls that may be rendered from JS templates.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $registered_control_types = array();
|
||||
|
||||
/**
|
||||
* Unsanitized values for Customize Settings parsed from $_POST['customized'].
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
@@ -66,23 +81,23 @@ final class WP_Customize_Manager {
|
||||
* @since 3.4.0
|
||||
*/
|
||||
public function __construct() {
|
||||
require( ABSPATH . WPINC . '/class-wp-customize-setting.php' );
|
||||
require( ABSPATH . WPINC . '/class-wp-customize-panel.php' );
|
||||
require( ABSPATH . WPINC . '/class-wp-customize-section.php' );
|
||||
require( ABSPATH . WPINC . '/class-wp-customize-control.php' );
|
||||
require( ABSPATH . WPINC . '/class-wp-customize-widgets.php' );
|
||||
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 . '/class-wp-customize-widgets.php' );
|
||||
|
||||
$this->widgets = new WP_Customize_Widgets( $this );
|
||||
|
||||
add_filter( 'wp_die_handler', array( $this, 'wp_die_handler' ) );
|
||||
|
||||
add_action( 'setup_theme', array( $this, 'setup_theme' ) );
|
||||
add_action( 'wp_loaded', array( $this, 'wp_loaded' ) );
|
||||
add_action( 'setup_theme', array( $this, 'setup_theme' ) );
|
||||
add_action( 'wp_loaded', array( $this, 'wp_loaded' ) );
|
||||
|
||||
// Run wp_redirect_status late to make sure we override the status last.
|
||||
add_action( 'wp_redirect_status', array( $this, 'wp_redirect_status' ), 1000 );
|
||||
|
||||
// Do not spawn cron (especially the alternate cron) while running the customizer.
|
||||
// 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.
|
||||
@@ -90,9 +105,11 @@ final class WP_Customize_Manager {
|
||||
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_save', array( $this, 'save' ) );
|
||||
add_action( 'wp_ajax_customize_refresh_nonces', array( $this, 'refresh_nonces' ) );
|
||||
|
||||
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' ) );
|
||||
}
|
||||
@@ -101,11 +118,27 @@ final class WP_Customize_Manager {
|
||||
* Return true if it's an AJAX request.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @since 4.2.0 Added `$action` param.
|
||||
* @access public
|
||||
*
|
||||
* @return bool
|
||||
* @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() {
|
||||
return isset( $_POST['customized'] ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX );
|
||||
public function doing_ajax( $action = null ) {
|
||||
$doing_ajax = ( defined( 'DOING_AJAX' ) && DOING_AJAX );
|
||||
if ( ! $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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,11 +151,13 @@ final class WP_Customize_Manager {
|
||||
* @param mixed $message UI message
|
||||
*/
|
||||
protected function wp_die( $ajax_message, $message = null ) {
|
||||
if ( $this->doing_ajax() )
|
||||
if ( $this->doing_ajax() || isset( $_POST['customized'] ) ) {
|
||||
wp_die( $ajax_message );
|
||||
}
|
||||
|
||||
if ( ! $message )
|
||||
if ( ! $message ) {
|
||||
$message = __( 'Cheatin’ uh?' );
|
||||
}
|
||||
|
||||
wp_die( $message );
|
||||
}
|
||||
@@ -135,8 +170,9 @@ final class WP_Customize_Manager {
|
||||
* @return string
|
||||
*/
|
||||
public function wp_die_handler() {
|
||||
if ( $this->doing_ajax() )
|
||||
if ( $this->doing_ajax() || isset( $_POST['customized'] ) ) {
|
||||
return '_ajax_wp_die_handler';
|
||||
}
|
||||
|
||||
return '_default_wp_die_handler';
|
||||
}
|
||||
@@ -151,10 +187,12 @@ final class WP_Customize_Manager {
|
||||
public function setup_theme() {
|
||||
send_origin_headers();
|
||||
|
||||
if ( is_admin() && ! $this->doing_ajax() )
|
||||
auth_redirect();
|
||||
elseif ( $this->doing_ajax() && ! is_user_logged_in() )
|
||||
$this->wp_die( 0 );
|
||||
$doing_ajax_or_is_customized = ( $this->doing_ajax() || isset( $_POST['customized'] ) );
|
||||
if ( is_admin() && ! $doing_ajax_or_is_customized ) {
|
||||
auth_redirect();
|
||||
} elseif ( $doing_ajax_or_is_customized && ! is_user_logged_in() ) {
|
||||
$this->wp_die( 0 );
|
||||
}
|
||||
|
||||
show_admin_bar( false );
|
||||
|
||||
@@ -172,16 +210,19 @@ final class WP_Customize_Manager {
|
||||
} 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' ) )
|
||||
if ( ! current_user_can( 'switch_themes' ) ) {
|
||||
$this->wp_die( -1 );
|
||||
}
|
||||
|
||||
// If the theme has errors while loading, bail.
|
||||
if ( $this->theme()->errors() )
|
||||
if ( $this->theme()->errors() ) {
|
||||
$this->wp_die( -1 );
|
||||
}
|
||||
|
||||
// If the theme isn't allowed per multisite settings, bail.
|
||||
if ( ! $this->theme()->is_allowed() )
|
||||
if ( ! $this->theme()->is_allowed() ) {
|
||||
$this->wp_die( -1 );
|
||||
}
|
||||
}
|
||||
|
||||
$this->start_previewing_theme();
|
||||
@@ -193,7 +234,8 @@ final class WP_Customize_Manager {
|
||||
* @since 3.4.0
|
||||
*/
|
||||
public function after_setup_theme() {
|
||||
if ( ! $this->doing_ajax() && ! validate_current_theme() ) {
|
||||
$doing_ajax_or_is_customized = ( $this->doing_ajax() || isset( $_SERVER['customized'] ) );
|
||||
if ( ! $doing_ajax_or_is_customized && ! validate_current_theme() ) {
|
||||
wp_redirect( 'themes.php?broken=true' );
|
||||
exit;
|
||||
}
|
||||
@@ -207,8 +249,9 @@ final class WP_Customize_Manager {
|
||||
*/
|
||||
public function start_previewing_theme() {
|
||||
// Bail if we're already previewing.
|
||||
if ( $this->is_preview() )
|
||||
if ( $this->is_preview() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->previewing = true;
|
||||
|
||||
@@ -217,7 +260,7 @@ final class WP_Customize_Manager {
|
||||
add_filter( 'stylesheet', array( $this, 'get_stylesheet' ) );
|
||||
add_filter( 'pre_option_current_theme', array( $this, 'current_theme' ) );
|
||||
|
||||
// @link: http://core.trac.wordpress.org/ticket/20027
|
||||
// @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' ) );
|
||||
|
||||
@@ -244,8 +287,9 @@ final class WP_Customize_Manager {
|
||||
* @since 3.4.0
|
||||
*/
|
||||
public function stop_previewing_theme() {
|
||||
if ( ! $this->is_preview() )
|
||||
if ( ! $this->is_preview() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->previewing = false;
|
||||
|
||||
@@ -254,7 +298,7 @@ final class WP_Customize_Manager {
|
||||
remove_filter( 'stylesheet', array( $this, 'get_stylesheet' ) );
|
||||
remove_filter( 'pre_option_current_theme', array( $this, 'current_theme' ) );
|
||||
|
||||
// @link: http://core.trac.wordpress.org/ticket/20027
|
||||
// @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' ) );
|
||||
|
||||
@@ -281,6 +325,9 @@ final class WP_Customize_Manager {
|
||||
* @return WP_Theme
|
||||
*/
|
||||
public function theme() {
|
||||
if ( ! $this->theme ) {
|
||||
$this->theme = wp_get_theme();
|
||||
}
|
||||
return $this->theme;
|
||||
}
|
||||
|
||||
@@ -390,27 +437,64 @@ final class WP_Customize_Manager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Decode the $_POST['customized'] values for a specific Customize Setting.
|
||||
* Parse the incoming $_POST['customized'] JSON data and store the unsanitized
|
||||
* settings for subsequent post_value() lookups.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @since 4.1.1
|
||||
*
|
||||
* @param mixed $setting A WP_Customize_Setting derived object
|
||||
* @return string $post_value Sanitized value
|
||||
* @return array
|
||||
*/
|
||||
public function post_value( $setting ) {
|
||||
public function unsanitized_post_values() {
|
||||
if ( ! isset( $this->_post_values ) ) {
|
||||
if ( isset( $_POST['customized'] ) )
|
||||
if ( isset( $_POST['customized'] ) ) {
|
||||
$this->_post_values = json_decode( wp_unslash( $_POST['customized'] ), true );
|
||||
else
|
||||
$this->_post_values = false;
|
||||
}
|
||||
if ( empty( $this->_post_values ) ) { // if not isset or if JSON error
|
||||
$this->_post_values = array();
|
||||
}
|
||||
}
|
||||
if ( empty( $this->_post_values ) ) {
|
||||
return array();
|
||||
} else {
|
||||
return $this->_post_values;
|
||||
}
|
||||
|
||||
if ( isset( $this->_post_values[ $setting->id ] ) )
|
||||
return $setting->sanitize( $this->_post_values[ $setting->id ] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Print javascript settings.
|
||||
* Return the sanitized value for a given setting from the request's POST data.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @since 4.1.1 Introduced 'default' parameter.
|
||||
*
|
||||
* @param WP_Customize_Setting $setting A WP_Customize_Setting derived object
|
||||
* @param mixed $default value returned $setting has no post value (added in 4.2.0).
|
||||
* @return string|mixed $post_value Sanitized value or the $default provided
|
||||
*/
|
||||
public function post_value( $setting, $default = null ) {
|
||||
$post_values = $this->unsanitized_post_values();
|
||||
if ( array_key_exists( $setting->id, $post_values ) ) {
|
||||
return $setting->sanitize( $post_values[ $setting->id ] );
|
||||
} else {
|
||||
return $default;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Override a setting's (unsanitized) value as found in any incoming $_POST['customized'].
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access public
|
||||
*
|
||||
* @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();
|
||||
$this->_post_values[ $setting_id ] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print JavaScript settings.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*/
|
||||
@@ -423,6 +507,7 @@ final class WP_Customize_Manager {
|
||||
add_action( 'wp', array( $this, 'customize_preview_override_404_status' ) );
|
||||
add_action( 'wp_head', array( $this, 'customize_preview_base' ) );
|
||||
add_action( 'wp_head', array( $this, 'customize_preview_html5' ) );
|
||||
add_action( 'wp_head', array( $this, 'customize_preview_loading_style' ) );
|
||||
add_action( 'wp_footer', array( $this, 'customize_preview_settings' ), 20 );
|
||||
add_action( 'shutdown', array( $this, 'customize_preview_signature' ), 1000 );
|
||||
add_filter( 'wp_die_handler', array( $this, 'remove_preview_signature' ) );
|
||||
@@ -465,7 +550,7 @@ final class WP_Customize_Manager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a workaround to handle HTML5 tags in IE < 9
|
||||
* Print a workaround to handle HTML5 tags in IE < 9.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*/
|
||||
@@ -483,7 +568,27 @@ final class WP_Customize_Manager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Print javascript settings for preview frame.
|
||||
* Print CSS for loading indicators for the Customizer preview.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access public
|
||||
*/
|
||||
public function customize_preview_loading_style() {
|
||||
?><style>
|
||||
body.wp-customizer-unloading {
|
||||
opacity: 0.25;
|
||||
cursor: progress !important;
|
||||
-webkit-transition: opacity 0.5s;
|
||||
transition: opacity 0.5s;
|
||||
}
|
||||
body.wp-customizer-unloading * {
|
||||
pointer-events: none !important;
|
||||
}
|
||||
</style><?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Print JavaScript settings for preview frame.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*/
|
||||
@@ -491,7 +596,12 @@ final class WP_Customize_Manager {
|
||||
$settings = array(
|
||||
'values' => array(),
|
||||
'channel' => wp_unslash( $_POST['customize_messenger_channel'] ),
|
||||
'activePanels' => array(),
|
||||
'activeSections' => array(),
|
||||
'activeControls' => array(),
|
||||
'l10n' => array(
|
||||
'loading' => __( 'Loading ...' ),
|
||||
),
|
||||
);
|
||||
|
||||
if ( 2 == $this->nonce_tick ) {
|
||||
@@ -504,19 +614,28 @@ final class WP_Customize_Manager {
|
||||
foreach ( $this->settings as $id => $setting ) {
|
||||
$settings['values'][ $id ] = $setting->js_value();
|
||||
}
|
||||
foreach ( $this->panels as $id => $panel ) {
|
||||
$settings['activePanels'][ $id ] = $panel->active();
|
||||
foreach ( $panel->sections as $id => $section ) {
|
||||
$settings['activeSections'][ $id ] = $section->active();
|
||||
}
|
||||
}
|
||||
foreach ( $this->sections as $id => $section ) {
|
||||
$settings['activeSections'][ $id ] = $section->active();
|
||||
}
|
||||
foreach ( $this->controls as $id => $control ) {
|
||||
$settings['activeControls'][ $id ] = $control->active();
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var _wpCustomizeSettings = <?php echo json_encode( $settings ); ?>;
|
||||
var _wpCustomizeSettings = <?php echo wp_json_encode( $settings ); ?>;
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a signature so we can ensure the customizer was properly executed.
|
||||
* Prints a signature so we can ensure the Customizer was properly executed.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*/
|
||||
@@ -525,7 +644,7 @@ final class WP_Customize_Manager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the signature in case we experience a case where the customizer was not properly executed.
|
||||
* Removes the signature in case we experience a case where the Customizer was not properly executed.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*/
|
||||
@@ -608,10 +727,14 @@ final class WP_Customize_Manager {
|
||||
* @since 3.4.0
|
||||
*/
|
||||
public function save() {
|
||||
if ( ! $this->is_preview() )
|
||||
die;
|
||||
if ( ! $this->is_preview() ) {
|
||||
wp_send_json_error( 'not_preview' );
|
||||
}
|
||||
|
||||
check_ajax_referer( 'save-customize_' . $this->get_stylesheet(), 'nonce' );
|
||||
$action = 'save-customize_' . $this->get_stylesheet();
|
||||
if ( ! check_ajax_referer( $action, 'nonce', false ) ) {
|
||||
wp_send_json_error( 'invalid_nonce' );
|
||||
}
|
||||
|
||||
// Do we have to switch themes?
|
||||
if ( ! $this->is_theme_active() ) {
|
||||
@@ -646,7 +769,47 @@ final class WP_Customize_Manager {
|
||||
*/
|
||||
do_action( 'customize_save_after', $this );
|
||||
|
||||
die;
|
||||
/**
|
||||
* Filter 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 $data Additional information passed back to the 'saved'
|
||||
* event on `wp.customize`.
|
||||
* @param WP_Customize_Manager $this WP_Customize_Manager instance.
|
||||
*/
|
||||
$response = apply_filters( 'customize_save_response', array(), $this );
|
||||
wp_send_json_success( $response );
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh nonces for the current preview.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
public function refresh_nonces() {
|
||||
if ( ! $this->is_preview() ) {
|
||||
wp_send_json_error( 'not_preview' );
|
||||
}
|
||||
|
||||
$nonces = array(
|
||||
'save' => wp_create_nonce( 'save-customize_' . $this->get_stylesheet() ),
|
||||
'preview' => wp_create_nonce( 'preview-customize_' . $this->get_stylesheet() ),
|
||||
);
|
||||
|
||||
/**
|
||||
* Filter nonces for a customize_refresh_nonces AJAX request.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param array $nonces Array of refreshed nonces for save and
|
||||
* preview actions.
|
||||
* @param WP_Customize_Manager $this WP_Customize_Manager instance.
|
||||
*/
|
||||
$nonces = apply_filters( 'customize_refresh_nonces', $nonces, $this );
|
||||
wp_send_json_success( $nonces );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -659,14 +822,75 @@ final class WP_Customize_Manager {
|
||||
* constructor.
|
||||
*/
|
||||
public function add_setting( $id, $args = array() ) {
|
||||
if ( is_a( $id, 'WP_Customize_Setting' ) )
|
||||
if ( $id instanceof WP_Customize_Setting ) {
|
||||
$setting = $id;
|
||||
else
|
||||
} else {
|
||||
$setting = new WP_Customize_Setting( $this, $id, $args );
|
||||
|
||||
}
|
||||
$this->settings[ $setting->id ] = $setting;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register 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 frontend 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 string $setting_ids The setting IDs to add.
|
||||
* @return WP_Customize_Setting The settings 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';
|
||||
|
||||
/**
|
||||
* Filter 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 string $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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a customize setting.
|
||||
*
|
||||
@@ -676,8 +900,9 @@ final class WP_Customize_Manager {
|
||||
* @return WP_Customize_Setting
|
||||
*/
|
||||
public function get_setting( $id ) {
|
||||
if ( isset( $this->settings[ $id ] ) )
|
||||
if ( isset( $this->settings[ $id ] ) ) {
|
||||
return $this->settings[ $id ];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -701,10 +926,9 @@ final class WP_Customize_Manager {
|
||||
* @param array $args Optional. Panel arguments. Default empty array.
|
||||
*/
|
||||
public function add_panel( $id, $args = array() ) {
|
||||
if ( is_a( $id, 'WP_Customize_Panel' ) ) {
|
||||
if ( $id instanceof WP_Customize_Panel ) {
|
||||
$panel = $id;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$panel = new WP_Customize_Panel( $this, $id, $args );
|
||||
}
|
||||
|
||||
@@ -747,11 +971,11 @@ final class WP_Customize_Manager {
|
||||
* @param array $args Section arguments.
|
||||
*/
|
||||
public function add_section( $id, $args = array() ) {
|
||||
if ( is_a( $id, 'WP_Customize_Section' ) )
|
||||
if ( $id instanceof WP_Customize_Section ) {
|
||||
$section = $id;
|
||||
else
|
||||
} else {
|
||||
$section = new WP_Customize_Section( $this, $id, $args );
|
||||
|
||||
}
|
||||
$this->sections[ $section->id ] = $section;
|
||||
}
|
||||
|
||||
@@ -789,11 +1013,11 @@ final class WP_Customize_Manager {
|
||||
* constructor.
|
||||
*/
|
||||
public function add_control( $id, $args = array() ) {
|
||||
if ( is_a( $id, 'WP_Customize_Control' ) )
|
||||
if ( $id instanceof WP_Customize_Control ) {
|
||||
$control = $id;
|
||||
else
|
||||
} else {
|
||||
$control = new WP_Customize_Control( $this, $id, $args );
|
||||
|
||||
}
|
||||
$this->controls[ $control->id ] = $control;
|
||||
}
|
||||
|
||||
@@ -822,21 +1046,48 @@ final class WP_Customize_Manager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to compare two objects by priority.
|
||||
* Register a customize control type.
|
||||
*
|
||||
* Registered types are eligible to be rendered via JS and created dynamically.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $control Name of a custom control which is a subclass of
|
||||
* {@see WP_Customize_Control}.
|
||||
*/
|
||||
public function register_control_type( $control ) {
|
||||
$this->registered_control_types[] = $control;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render JS templates for all registered control types.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
*/
|
||||
public function render_control_templates() {
|
||||
foreach ( $this->registered_control_types as $control_type ) {
|
||||
$control = new $control_type( $this, 'temp', array() );
|
||||
$control->print_template();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to compare two objects by priority, ensuring sort stability via instance_number.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param object $a Object A.
|
||||
* @param object $b Object B.
|
||||
* @param WP_Customize_Panel|WP_Customize_Section|WP_Customize_Control $a Object A.
|
||||
* @param WP_Customize_Panel|WP_Customize_Section|WP_Customize_Control $b Object B.
|
||||
* @return int
|
||||
*/
|
||||
protected final function _cmp_priority( $a, $b ) {
|
||||
$ap = $a->priority;
|
||||
$bp = $b->priority;
|
||||
|
||||
if ( $ap == $bp )
|
||||
return 0;
|
||||
return ( $ap > $bp ) ? 1 : -1;
|
||||
protected function _cmp_priority( $a, $b ) {
|
||||
if ( $a->priority === $b->priority ) {
|
||||
return $a->instance_number - $a->instance_number;
|
||||
} else {
|
||||
return $a->priority - $b->priority;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -850,8 +1101,8 @@ final class WP_Customize_Manager {
|
||||
*/
|
||||
public function prepare_controls() {
|
||||
|
||||
$this->controls = array_reverse( $this->controls );
|
||||
$controls = array();
|
||||
uasort( $this->controls, array( $this, '_cmp_priority' ) );
|
||||
|
||||
foreach ( $this->controls as $id => $control ) {
|
||||
if ( ! isset( $this->sections[ $control->section ] ) || ! $control->check_capabilities() ) {
|
||||
@@ -864,8 +1115,6 @@ final class WP_Customize_Manager {
|
||||
$this->controls = $controls;
|
||||
|
||||
// Prepare sections.
|
||||
// Reversing makes uasort sort by time added when conflicts occur.
|
||||
$this->sections = array_reverse( $this->sections );
|
||||
uasort( $this->sections, array( $this, '_cmp_priority' ) );
|
||||
$sections = array();
|
||||
|
||||
@@ -878,19 +1127,17 @@ final class WP_Customize_Manager {
|
||||
|
||||
if ( ! $section->panel ) {
|
||||
// Top-level section.
|
||||
$sections[] = $section;
|
||||
$sections[ $section->id ] = $section;
|
||||
} else {
|
||||
// This section belongs to a panel.
|
||||
if ( isset( $this->panels [ $section->panel ] ) ) {
|
||||
$this->panels[ $section->panel ]->sections[] = $section;
|
||||
$this->panels[ $section->panel ]->sections[ $section->id ] = $section;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->sections = $sections;
|
||||
|
||||
// Prepare panels.
|
||||
// Reversing makes uasort sort by time added when conflicts occur.
|
||||
$this->panels = array_reverse( $this->panels );
|
||||
uasort( $this->panels, array( $this, '_cmp_priority' ) );
|
||||
$panels = array();
|
||||
|
||||
@@ -899,8 +1146,8 @@ final class WP_Customize_Manager {
|
||||
continue;
|
||||
}
|
||||
|
||||
usort( $panel->sections, array( $this, '_cmp_priority' ) );
|
||||
$panels[] = $panel;
|
||||
uasort( $panel->sections, array( $this, '_cmp_priority' ) );
|
||||
$panels[ $panel->id ] = $panel;
|
||||
}
|
||||
$this->panels = $panels;
|
||||
|
||||
@@ -927,6 +1174,58 @@ final class WP_Customize_Manager {
|
||||
*/
|
||||
public function register_controls() {
|
||||
|
||||
/* Control Types (custom control classes) */
|
||||
$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_Theme_Control' );
|
||||
|
||||
/* Themes */
|
||||
|
||||
$this->add_section( new WP_Customize_Themes_Section( $this, 'themes', array(
|
||||
'title' => $this->theme()->display( 'Name' ),
|
||||
'capability' => 'switch_themes',
|
||||
'priority' => 0,
|
||||
) ) );
|
||||
|
||||
// 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',
|
||||
) ) );
|
||||
|
||||
require_once( ABSPATH . 'wp-admin/includes/theme.php' );
|
||||
|
||||
// Theme Controls.
|
||||
|
||||
// Add a control for the active/original theme.
|
||||
if ( ! $this->is_theme_active() ) {
|
||||
$themes = wp_prepare_themes_for_js( array( wp_get_theme( $this->original_stylesheet ) ) );
|
||||
$active_theme = current( $themes );
|
||||
$active_theme['isActiveTheme'] = true;
|
||||
$this->add_control( new WP_Customize_Theme_Control( $this, $active_theme['id'], array(
|
||||
'theme' => $active_theme,
|
||||
'section' => 'themes',
|
||||
'settings' => 'active_theme',
|
||||
) ) );
|
||||
}
|
||||
|
||||
$themes = wp_prepare_themes_for_js();
|
||||
foreach ( $themes as $theme ) {
|
||||
if ( $theme['active'] || $theme['id'] === $this->original_stylesheet ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$theme_id = 'theme_' . $theme['id'];
|
||||
$theme['isActiveTheme'] = false;
|
||||
$this->add_control( new WP_Customize_Theme_Control( $this, $theme_id, array(
|
||||
'theme' => $theme,
|
||||
'section' => 'themes',
|
||||
'settings' => 'active_theme',
|
||||
) ) );
|
||||
}
|
||||
|
||||
/* Site Title & Tagline */
|
||||
|
||||
$this->add_section( 'title_tagline', array(
|
||||
@@ -1102,15 +1401,21 @@ final class WP_Customize_Manager {
|
||||
$menus = wp_get_nav_menus();
|
||||
$num_locations = count( array_keys( $locations ) );
|
||||
|
||||
if ( 1 == $num_locations ) {
|
||||
$description = __( 'Your theme supports one menu. Select which menu you would like to use.' );
|
||||
} else {
|
||||
$description = sprintf( _n( 'Your theme supports %s menu. Select which menu appears in each location.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) );
|
||||
}
|
||||
|
||||
$this->add_section( 'nav', array(
|
||||
'title' => __( 'Navigation' ),
|
||||
'theme_supports' => 'menus',
|
||||
'priority' => 100,
|
||||
'description' => sprintf( _n('Your theme supports %s menu. Select which menu you would like to use.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) ) . "\n\n" . __('You can edit your menu content on the Menus screen in the Appearance section.'),
|
||||
'description' => $description . "\n\n" . __( 'You can edit your menu content on the Menus screen in the Appearance section.' ),
|
||||
) );
|
||||
|
||||
if ( $menus ) {
|
||||
$choices = array( 0 => __( '— Select —' ) );
|
||||
$choices = array( '' => __( '— Select —' ) );
|
||||
foreach ( $menus as $menu ) {
|
||||
$choices[ $menu->term_id ] = wp_html_excerpt( $menu->name, 40, '…' );
|
||||
}
|
||||
@@ -1135,53 +1440,68 @@ final class WP_Customize_Manager {
|
||||
/* Static Front Page */
|
||||
// #WP19627
|
||||
|
||||
$this->add_section( 'static_front_page', array(
|
||||
'title' => __( 'Static Front Page' ),
|
||||
// 'theme_supports' => 'static-front-page',
|
||||
'priority' => 120,
|
||||
'description' => __( 'Your theme supports a static front page.' ),
|
||||
) );
|
||||
// Replicate behavior from options-reading.php and hide front page options if there are no pages
|
||||
if ( get_pages() ) {
|
||||
$this->add_section( 'static_front_page', array(
|
||||
'title' => __( 'Static Front Page' ),
|
||||
// 'theme_supports' => 'static-front-page',
|
||||
'priority' => 120,
|
||||
'description' => __( 'Your theme supports a static front page.' ),
|
||||
) );
|
||||
|
||||
$this->add_setting( 'show_on_front', array(
|
||||
'default' => get_option( 'show_on_front' ),
|
||||
'capability' => 'manage_options',
|
||||
'type' => 'option',
|
||||
// 'theme_supports' => 'static-front-page',
|
||||
) );
|
||||
$this->add_setting( 'show_on_front', array(
|
||||
'default' => get_option( 'show_on_front' ),
|
||||
'capability' => 'manage_options',
|
||||
'type' => 'option',
|
||||
// 'theme_supports' => 'static-front-page',
|
||||
) );
|
||||
|
||||
$this->add_control( 'show_on_front', array(
|
||||
'label' => __( 'Front page displays' ),
|
||||
'section' => 'static_front_page',
|
||||
'type' => 'radio',
|
||||
'choices' => array(
|
||||
'posts' => __( 'Your latest posts' ),
|
||||
'page' => __( 'A static page' ),
|
||||
),
|
||||
) );
|
||||
$this->add_control( 'show_on_front', array(
|
||||
'label' => __( 'Front page 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',
|
||||
// 'theme_supports' => 'static-front-page',
|
||||
) );
|
||||
$this->add_setting( 'page_on_front', array(
|
||||
'type' => 'option',
|
||||
'capability' => 'manage_options',
|
||||
// 'theme_supports' => 'static-front-page',
|
||||
) );
|
||||
|
||||
$this->add_control( 'page_on_front', array(
|
||||
'label' => __( 'Front page' ),
|
||||
'section' => 'static_front_page',
|
||||
'type' => 'dropdown-pages',
|
||||
) );
|
||||
$this->add_control( 'page_on_front', array(
|
||||
'label' => __( 'Front page' ),
|
||||
'section' => 'static_front_page',
|
||||
'type' => 'dropdown-pages',
|
||||
) );
|
||||
|
||||
$this->add_setting( 'page_for_posts', array(
|
||||
'type' => 'option',
|
||||
'capability' => 'manage_options',
|
||||
// 'theme_supports' => 'static-front-page',
|
||||
) );
|
||||
$this->add_setting( 'page_for_posts', array(
|
||||
'type' => 'option',
|
||||
'capability' => 'manage_options',
|
||||
// 'theme_supports' => 'static-front-page',
|
||||
) );
|
||||
|
||||
$this->add_control( 'page_for_posts', array(
|
||||
'label' => __( 'Posts page' ),
|
||||
'section' => 'static_front_page',
|
||||
'type' => 'dropdown-pages',
|
||||
) );
|
||||
$this->add_control( 'page_for_posts', array(
|
||||
'label' => __( 'Posts page' ),
|
||||
'section' => 'static_front_page',
|
||||
'type' => 'dropdown-pages',
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add settings from the POST data that were not added with code, e.g. dynamically-created settings for Widgets
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access public
|
||||
*
|
||||
* @see add_dynamic_settings()
|
||||
*/
|
||||
public function register_dynamic_settings() {
|
||||
$this->add_dynamic_settings( array_keys( $this->unsanitized_post_values() ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1239,7 +1559,6 @@ function sanitize_hex_color( $color ) {
|
||||
* Returns either '', a 3 or 6 digit hex color (without a #), or null.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @uses sanitize_hex_color()
|
||||
*
|
||||
* @param string $color
|
||||
* @return string|null
|
||||
|
||||
@@ -1,15 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Customize Panel Class.
|
||||
*
|
||||
* A UI container for sections, managed by the WP_Customize_Manager.
|
||||
* WordPress Customize Panel classes
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Customize
|
||||
* @since 4.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Customize Panel class.
|
||||
*
|
||||
* A UI container for sections, managed by the WP_Customize_Manager.
|
||||
*
|
||||
* @since 4.0.0
|
||||
*
|
||||
* @see WP_Customize_Manager
|
||||
*/
|
||||
class WP_Customize_Panel {
|
||||
|
||||
/**
|
||||
* Incremented with each new class instantiation, then stored in $instance_number.
|
||||
*
|
||||
* Used when sorting two instances whose priorities are equal.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access protected
|
||||
* @var int
|
||||
*/
|
||||
protected static $instance_count = 0;
|
||||
|
||||
/**
|
||||
* Order in which this instance was created in relation to other instances.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
* @var int
|
||||
*/
|
||||
public $instance_number;
|
||||
|
||||
/**
|
||||
* WP_Customize_Manager instance.
|
||||
*
|
||||
@@ -82,6 +110,30 @@ class WP_Customize_Panel {
|
||||
*/
|
||||
public $sections;
|
||||
|
||||
/**
|
||||
* Type of this panel.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'default';
|
||||
|
||||
/**
|
||||
* Active callback.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
*
|
||||
* @see WP_Customize_Section::active()
|
||||
*
|
||||
* @var callable Callback is called with one argument, the instance of
|
||||
* {@see WP_Customize_Section}, and returns bool to indicate
|
||||
* whether the section is active (such as it relates to the URL
|
||||
* currently being previewed).
|
||||
*/
|
||||
public $active_callback = '';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
@@ -103,10 +155,68 @@ class WP_Customize_Panel {
|
||||
|
||||
$this->manager = $manager;
|
||||
$this->id = $id;
|
||||
if ( empty( $this->active_callback ) ) {
|
||||
$this->active_callback = array( $this, 'active_callback' );
|
||||
}
|
||||
self::$instance_count += 1;
|
||||
$this->instance_number = self::$instance_count;
|
||||
|
||||
$this->sections = array(); // Users cannot customize the $sections array.
|
||||
}
|
||||
|
||||
return $this;
|
||||
/**
|
||||
* Check whether panel is active to current Customizer preview.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
*
|
||||
* @return bool Whether the panel is active to the current preview.
|
||||
*/
|
||||
final public function active() {
|
||||
$panel = $this;
|
||||
$active = call_user_func( $this->active_callback, $this );
|
||||
|
||||
/**
|
||||
* Filter response of WP_Customize_Panel::active().
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @param bool $active Whether the Customizer panel is active.
|
||||
* @param WP_Customize_Panel $panel {@see WP_Customize_Panel} instance.
|
||||
*/
|
||||
$active = apply_filters( 'customize_panel_active', $active, $panel );
|
||||
|
||||
return $active;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default callback used when invoking {@see WP_Customize_Panel::active()}.
|
||||
*
|
||||
* Subclasses can override this with their specific logic, or they may
|
||||
* provide an 'active_callback' argument to the constructor.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
*
|
||||
* @return bool Always true.
|
||||
*/
|
||||
public function active_callback() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gather the parameters passed to client JavaScript via JSON.
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @return array The array to be exported to the client as JSON.
|
||||
*/
|
||||
public function json() {
|
||||
$array = wp_array_slice_assoc( (array) $this, array( 'title', 'description', 'priority', 'type' ) );
|
||||
$array['content'] = $this->get_content();
|
||||
$array['active'] = $this->active();
|
||||
$array['instanceNumber'] = $this->instance_number;
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,7 +227,7 @@ class WP_Customize_Panel {
|
||||
*
|
||||
* @return bool False if theme doesn't support the panel or the user doesn't have the capability.
|
||||
*/
|
||||
public final function check_capabilities() {
|
||||
final public function check_capabilities() {
|
||||
if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) {
|
||||
return false;
|
||||
}
|
||||
@@ -129,12 +239,27 @@ class WP_Customize_Panel {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the panel's content template for insertion into the Customizer pane.
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @return string Content for the panel.
|
||||
*/
|
||||
final public function get_content() {
|
||||
ob_start();
|
||||
$this->maybe_render();
|
||||
$template = trim( ob_get_contents() );
|
||||
ob_end_clean();
|
||||
return $template;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check capabilities and render the panel.
|
||||
*
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public final function maybe_render() {
|
||||
final public function maybe_render() {
|
||||
if ( ! $this->check_capabilities() ) {
|
||||
return;
|
||||
}
|
||||
@@ -151,8 +276,8 @@ class WP_Customize_Panel {
|
||||
/**
|
||||
* Fires before rendering a specific Customizer panel.
|
||||
*
|
||||
* The dynamic portion of the hook name, $this->id, refers to the ID
|
||||
* of the specific Customizer panel to be rendered.
|
||||
* The dynamic portion of the hook name, `$this->id`, refers to
|
||||
* the ID of the specific Customizer panel to be rendered.
|
||||
*
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@@ -162,39 +287,47 @@ class WP_Customize_Panel {
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the panel, and the sections that have been added to it.
|
||||
* Render the panel container, and then its contents.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$classes = 'accordion-section control-section control-panel control-panel-' . $this->type;
|
||||
?>
|
||||
<li id="accordion-panel-<?php echo esc_attr( $this->id ); ?>" class="control-section control-panel accordion-section">
|
||||
<li id="accordion-panel-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>">
|
||||
<h3 class="accordion-section-title" tabindex="0">
|
||||
<?php echo esc_html( $this->title ); ?>
|
||||
<span class="screen-reader-text"><?php _e( 'Press return or enter to open this panel' ); ?></span>
|
||||
</h3>
|
||||
<ul class="accordion-sub-container control-panel-content">
|
||||
<li class="accordion-section control-section<?php if ( empty( $this->description ) ) echo ' cannot-expand'; ?>">
|
||||
<div class="accordion-section-title" tabindex="0">
|
||||
<span class="preview-notice"><?php
|
||||
/* translators: %s is the site/panel title in the Customizer */
|
||||
echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title">' . esc_html( $this->title ) . '</strong>' );
|
||||
?></span>
|
||||
</div>
|
||||
<?php if ( ! empty( $this->description ) ) : ?>
|
||||
<div class="accordion-section-content description">
|
||||
<?php echo $this->description; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php
|
||||
foreach ( $this->sections as $section ) {
|
||||
$section->maybe_render();
|
||||
}
|
||||
?>
|
||||
<?php $this->render_content(); ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the sections that have been added to the panel.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render_content() {
|
||||
?>
|
||||
<li class="panel-meta accordion-section control-section<?php if ( empty( $this->description ) ) { echo ' cannot-expand'; } ?>">
|
||||
<div class="accordion-section-title" tabindex="0">
|
||||
<span class="preview-notice"><?php
|
||||
/* translators: %s is the site/panel title in the Customizer */
|
||||
echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title">' . esc_html( $this->title ) . '</strong>' );
|
||||
?></span>
|
||||
</div>
|
||||
<?php if ( ! empty( $this->description ) ) : ?>
|
||||
<div class="accordion-section-content description">
|
||||
<?php echo $this->description; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Customize Section Class.
|
||||
*
|
||||
* A UI container for controls, managed by the WP_Customize_Manager.
|
||||
* WordPress Customize Section classes
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Customize
|
||||
* @since 3.4.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Customize Section class.
|
||||
*
|
||||
* A UI container for controls, managed by the WP_Customize_Manager class.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @see WP_Customize_Manager
|
||||
*/
|
||||
class WP_Customize_Section {
|
||||
|
||||
/**
|
||||
* Incremented with each new class instantiation, then stored in $instance_number.
|
||||
*
|
||||
* Used when sorting two instances whose priorities are equal.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access protected
|
||||
* @var int
|
||||
*/
|
||||
protected static $instance_count = 0;
|
||||
|
||||
/**
|
||||
* Order in which this instance was created in relation to other instances.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
* @var int
|
||||
*/
|
||||
public $instance_number;
|
||||
|
||||
/**
|
||||
* WP_Customize_Manager instance.
|
||||
*
|
||||
@@ -91,6 +119,30 @@ class WP_Customize_Section {
|
||||
*/
|
||||
public $controls;
|
||||
|
||||
/**
|
||||
* Type of this section.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'default';
|
||||
|
||||
/**
|
||||
* Active callback.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
*
|
||||
* @see WP_Customize_Section::active()
|
||||
*
|
||||
* @var callable Callback is called with one argument, the instance of
|
||||
* {@see WP_Customize_Section}, and returns bool to indicate
|
||||
* whether the section is active (such as it relates to the URL
|
||||
* currently being previewed).
|
||||
*/
|
||||
public $active_callback = '';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
@@ -105,16 +157,75 @@ class WP_Customize_Section {
|
||||
public function __construct( $manager, $id, $args = array() ) {
|
||||
$keys = array_keys( get_object_vars( $this ) );
|
||||
foreach ( $keys as $key ) {
|
||||
if ( isset( $args[ $key ] ) )
|
||||
if ( isset( $args[ $key ] ) ) {
|
||||
$this->$key = $args[ $key ];
|
||||
}
|
||||
}
|
||||
|
||||
$this->manager = $manager;
|
||||
$this->id = $id;
|
||||
if ( empty( $this->active_callback ) ) {
|
||||
$this->active_callback = array( $this, 'active_callback' );
|
||||
}
|
||||
self::$instance_count += 1;
|
||||
$this->instance_number = self::$instance_count;
|
||||
|
||||
$this->controls = array(); // Users cannot customize the $controls array.
|
||||
}
|
||||
|
||||
return $this;
|
||||
/**
|
||||
* Check whether section is active to current Customizer preview.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
*
|
||||
* @return bool Whether the section is active to the current preview.
|
||||
*/
|
||||
final public function active() {
|
||||
$section = $this;
|
||||
$active = call_user_func( $this->active_callback, $this );
|
||||
|
||||
/**
|
||||
* Filter response of {@see WP_Customize_Section::active()}.
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @param bool $active Whether the Customizer section is active.
|
||||
* @param WP_Customize_Section $section {@see WP_Customize_Section} instance.
|
||||
*/
|
||||
$active = apply_filters( 'customize_section_active', $active, $section );
|
||||
|
||||
return $active;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default callback used when invoking {@see WP_Customize_Section::active()}.
|
||||
*
|
||||
* Subclasses can override this with their specific logic, or they may provide
|
||||
* an 'active_callback' argument to the constructor.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
*
|
||||
* @return bool Always true.
|
||||
*/
|
||||
public function active_callback() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gather the parameters passed to client JavaScript via JSON.
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @return array The array to be exported to the client as JSON.
|
||||
*/
|
||||
public function json() {
|
||||
$array = wp_array_slice_assoc( (array) $this, array( 'title', 'description', 'priority', 'panel', 'type' ) );
|
||||
$array['content'] = $this->get_content();
|
||||
$array['active'] = $this->active();
|
||||
$array['instanceNumber'] = $this->instance_number;
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -125,24 +236,42 @@ class WP_Customize_Section {
|
||||
*
|
||||
* @return bool False if theme doesn't support the section or user doesn't have the capability.
|
||||
*/
|
||||
public final function check_capabilities() {
|
||||
if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) )
|
||||
final public function check_capabilities() {
|
||||
if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( $this->theme_supports && ! call_user_func_array( 'current_theme_supports', (array) $this->theme_supports ) )
|
||||
if ( $this->theme_supports && ! call_user_func_array( 'current_theme_supports', (array) $this->theme_supports ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the section's content template for insertion into the Customizer pane.
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @return string Contents of the section.
|
||||
*/
|
||||
final public function get_content() {
|
||||
ob_start();
|
||||
$this->maybe_render();
|
||||
$template = trim( ob_get_contents() );
|
||||
ob_end_clean();
|
||||
return $template;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check capabilities and render the section.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*/
|
||||
public final function maybe_render() {
|
||||
if ( ! $this->check_capabilities() )
|
||||
final public function maybe_render() {
|
||||
if ( ! $this->check_capabilities() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires before rendering a Customizer section.
|
||||
@@ -155,7 +284,7 @@ class WP_Customize_Section {
|
||||
/**
|
||||
* Fires before rendering a specific Customizer section.
|
||||
*
|
||||
* The dynamic portion of the hook name, $this->id, refers to the ID
|
||||
* The dynamic portion of the hook name, `$this->id`, refers to the ID
|
||||
* of the specific Customizer section to be rendered.
|
||||
*
|
||||
* @since 3.4.0
|
||||
@@ -171,10 +300,7 @@ class WP_Customize_Section {
|
||||
* @since 3.4.0
|
||||
*/
|
||||
protected function render() {
|
||||
$classes = 'control-section accordion-section';
|
||||
if ( $this->panel ) {
|
||||
$classes .= ' control-subsection';
|
||||
}
|
||||
$classes = 'accordion-section control-section control-section-' . $this->type;
|
||||
?>
|
||||
<li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>">
|
||||
<h3 class="accordion-section-title" tabindex="0">
|
||||
@@ -183,14 +309,145 @@ class WP_Customize_Section {
|
||||
</h3>
|
||||
<ul class="accordion-section-content">
|
||||
<?php if ( ! empty( $this->description ) ) : ?>
|
||||
<li><p class="description customize-section-description"><?php echo $this->description; ?></p></li>
|
||||
<li class="customize-section-description-container">
|
||||
<p class="description customize-section-description"><?php echo $this->description; ?></p>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
foreach ( $this->controls as $control )
|
||||
$control->maybe_render();
|
||||
?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Customize Themes Section class.
|
||||
*
|
||||
* A UI container for theme controls, which behaves like a backwards Panel.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @see WP_Customize_Section
|
||||
*/
|
||||
class WP_Customize_Themes_Section extends WP_Customize_Section {
|
||||
|
||||
/**
|
||||
* Customize section type.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'themes';
|
||||
|
||||
/**
|
||||
* Render the themes section, which behaves like a panel.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access protected
|
||||
*/
|
||||
protected function render() {
|
||||
$classes = 'accordion-section control-section control-section-' . $this->type;
|
||||
?>
|
||||
<li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>">
|
||||
<h3 class="accordion-section-title">
|
||||
<?php
|
||||
if ( $this->manager->is_theme_active() ) {
|
||||
/* translators: %s: theme name */
|
||||
printf( __( '<span>Active theme</span> %s' ), $this->title );
|
||||
} else {
|
||||
/* translators: %s: theme name */
|
||||
printf( __( '<span>Previewing theme</span> %s' ), $this->title );
|
||||
}
|
||||
?>
|
||||
|
||||
<button type="button" class="button change-theme"><?php _ex( 'Change', 'theme' ); ?></button>
|
||||
</h3>
|
||||
<div class="customize-themes-panel control-panel-content themes-php">
|
||||
<h2>
|
||||
<?php _e( 'Themes' ); ?>
|
||||
<span class="title-count theme-count"><?php echo count( $this->controls ) + 1 /* Active theme */; ?></span>
|
||||
</h2>
|
||||
|
||||
<h3 class="accordion-section-title customize-section-title">
|
||||
<?php
|
||||
if ( $this->manager->is_theme_active() ) {
|
||||
/* translators: %s: theme name */
|
||||
printf( __( '<span>Active theme</span> %s' ), $this->title );
|
||||
} else {
|
||||
/* translators: %s: theme name */
|
||||
printf( __( '<span>Previewing theme</span> %s' ), $this->title );
|
||||
}
|
||||
?>
|
||||
<button type="button" class="button customize-theme"><?php _e( 'Customize' ); ?></button>
|
||||
</h3>
|
||||
|
||||
<div class="theme-overlay" tabindex="0" role="dialog" aria-label="<?php esc_attr_e( 'Theme Details' ); ?>"></div>
|
||||
|
||||
<div id="customize-container"></div>
|
||||
<?php if ( count( $this->controls ) > 4 ) : ?>
|
||||
<p><label for="themes-filter">
|
||||
<span class="screen-reader-text"><?php _e( 'Search installed themes...' ); ?></span>
|
||||
<input type="text" id="themes-filter" placeholder="<?php esc_attr_e( 'Search installed themes...' ); ?>" />
|
||||
</label></p>
|
||||
<?php endif; ?>
|
||||
<div class="theme-browser rendered">
|
||||
<ul class="themes accordion-section-content">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php }
|
||||
}
|
||||
|
||||
/**
|
||||
* Customizer section representing widget area (sidebar).
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @see WP_Customize_Section
|
||||
*/
|
||||
class WP_Customize_Sidebar_Section extends WP_Customize_Section {
|
||||
|
||||
/**
|
||||
* Type of this section.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'sidebar';
|
||||
|
||||
/**
|
||||
* Unique identifier.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $sidebar_id;
|
||||
|
||||
/**
|
||||
* Gather the parameters passed to client JavaScript via JSON.
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @return array The array to be exported to the client as JSON.
|
||||
*/
|
||||
public function json() {
|
||||
$json = parent::json();
|
||||
$json['sidebarId'] = $this->sidebar_id;
|
||||
return $json;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the current sidebar is rendered on the page.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
*
|
||||
* @return bool Whether sidebar is rendered.
|
||||
*/
|
||||
public function active_callback() {
|
||||
return $this->manager->widgets->is_sidebar_rendered( $this->sidebar_id );
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* Customize Setting Class.
|
||||
*
|
||||
* Handles saving and sanitizing of settings.
|
||||
* WordPress Customize Setting classes
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Customize
|
||||
* @since 3.4.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Customize Setting class.
|
||||
*
|
||||
* Handles saving and sanitizing of settings.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @see WP_Customize_Manager
|
||||
*/
|
||||
class WP_Customize_Setting {
|
||||
/**
|
||||
* @access public
|
||||
@@ -52,15 +60,21 @@ class WP_Customize_Setting {
|
||||
public $sanitize_callback = '';
|
||||
public $sanitize_js_callback = '';
|
||||
|
||||
protected $id_data = array();
|
||||
|
||||
/**
|
||||
* Cached and sanitized $_POST value for the setting.
|
||||
* Whether or not the setting is initially dirty when created.
|
||||
*
|
||||
* @access private
|
||||
* @var mixed
|
||||
* This is used to ensure that a setting will be sent from the pane to the
|
||||
* preview when loading the Customizer. Normally a setting only is synced to
|
||||
* the preview if it has been changed. This allows the setting to be sent
|
||||
* from the start.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access public
|
||||
* @var bool
|
||||
*/
|
||||
private $_post_value;
|
||||
public $dirty = false;
|
||||
|
||||
protected $id_data = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
@@ -73,7 +87,6 @@ class WP_Customize_Setting {
|
||||
* @param string $id An specific ID of the setting. Can be a
|
||||
* theme mod or option name.
|
||||
* @param array $args Setting arguments.
|
||||
* @return WP_Customize_Setting $setting
|
||||
*/
|
||||
public function __construct( $manager, $id, $args = array() ) {
|
||||
$keys = array_keys( get_object_vars( $this ) );
|
||||
@@ -99,16 +112,54 @@ class WP_Customize_Setting {
|
||||
|
||||
if ( $this->sanitize_js_callback )
|
||||
add_filter( "customize_sanitize_js_{$this->id}", $this->sanitize_js_callback, 10, 2 );
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID for the current blog when the preview() method was called.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access protected
|
||||
* @var int
|
||||
*/
|
||||
protected $_previewed_blog_id;
|
||||
|
||||
/**
|
||||
* Return true if the current blog is not the same as the previewed blog.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access public
|
||||
*
|
||||
* @return bool|null Returns null if preview() has not been called yet.
|
||||
*/
|
||||
public function is_current_blog_previewed() {
|
||||
if ( ! isset( $this->_previewed_blog_id ) ) {
|
||||
return null;
|
||||
}
|
||||
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;
|
||||
|
||||
/**
|
||||
* Handle previewing the setting.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*/
|
||||
public function preview() {
|
||||
if ( ! isset( $this->_original_value ) ) {
|
||||
$this->_original_value = $this->value();
|
||||
}
|
||||
if ( ! isset( $this->_previewed_blog_id ) ) {
|
||||
$this->_previewed_blog_id = get_current_blog_id();
|
||||
}
|
||||
|
||||
switch( $this->type ) {
|
||||
case 'theme_mod' :
|
||||
add_filter( 'theme_mod_' . $this->id_data[ 'base' ], array( $this, '_preview_filter' ) );
|
||||
@@ -124,22 +175,38 @@ class WP_Customize_Setting {
|
||||
default :
|
||||
|
||||
/**
|
||||
* Fires when the WP_Customize_Setting::preview() method is called for settings
|
||||
* Fires when the {@see 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.
|
||||
* The dynamic portion of the hook name, `$this->id`, refers to the setting ID.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param WP_Customize_Setting $this WP_Customize_Setting instance.
|
||||
* @param WP_Customize_Setting $this {@see WP_Customize_Setting} instance.
|
||||
*/
|
||||
do_action( 'customize_preview_' . $this->id, $this );
|
||||
do_action( "customize_preview_{$this->id}", $this );
|
||||
|
||||
/**
|
||||
* Fires when the {@see 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 $this {@see WP_Customize_Setting} instance.
|
||||
*/
|
||||
do_action( "customize_preview_{$this->type}", $this );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to filter the theme mods and options.
|
||||
*
|
||||
* If switch_to_blog() was called after the preview() method, and the current
|
||||
* blog is now not the same blog, then this method does a no-op and returns
|
||||
* the original value.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @uses WP_Customize_Setting::multidimensional_replace()
|
||||
*
|
||||
@@ -147,7 +214,19 @@ class WP_Customize_Setting {
|
||||
* @return mixed New or old value.
|
||||
*/
|
||||
public function _preview_filter( $original ) {
|
||||
return $this->multidimensional_replace( $original, $this->id_data[ 'keys' ], $this->post_value() );
|
||||
if ( ! $this->is_current_blog_previewed() ) {
|
||||
return $original;
|
||||
}
|
||||
|
||||
$undefined = new stdClass(); // symbol hack
|
||||
$post_value = $this->post_value( $undefined );
|
||||
if ( $undefined === $post_value ) {
|
||||
$value = $this->_original_value;
|
||||
} else {
|
||||
$value = $post_value;
|
||||
}
|
||||
|
||||
return $this->multidimensional_replace( $original, $this->id_data['keys'], $value );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -156,9 +235,9 @@ class WP_Customize_Setting {
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @return bool False if cap check fails or value isn't set.
|
||||
* @return false|null False if cap check fails or value isn't set.
|
||||
*/
|
||||
public final function save() {
|
||||
final public function save() {
|
||||
$value = $this->post_value();
|
||||
|
||||
if ( ! $this->check_capabilities() || ! isset( $value ) )
|
||||
@@ -167,12 +246,12 @@ class WP_Customize_Setting {
|
||||
/**
|
||||
* Fires when the WP_Customize_Setting::save() method is called.
|
||||
*
|
||||
* The dynamic portion of the hook name, $this->id_data['base'] refers to
|
||||
* The dynamic portion of the hook name, `$this->id_data['base']` refers to
|
||||
* the base slug of the setting name.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param WP_Customize_Setting $this WP_Customize_Setting instance.
|
||||
* @param WP_Customize_Setting $this {@see WP_Customize_Setting} instance.
|
||||
*/
|
||||
do_action( 'customize_save_' . $this->id_data[ 'base' ], $this );
|
||||
|
||||
@@ -187,18 +266,8 @@ class WP_Customize_Setting {
|
||||
* @param mixed $default A default value which is used as a fallback. Default is null.
|
||||
* @return mixed The default value on failure, otherwise the sanitized value.
|
||||
*/
|
||||
public final function post_value( $default = null ) {
|
||||
// Check for a cached value
|
||||
if ( isset( $this->_post_value ) )
|
||||
return $this->_post_value;
|
||||
|
||||
// Call the manager for the post value
|
||||
$result = $this->manager->post_value( $this );
|
||||
|
||||
if ( isset( $result ) )
|
||||
return $this->_post_value = $result;
|
||||
else
|
||||
return $default;
|
||||
final public function post_value( $default = null ) {
|
||||
return $this->manager->post_value( $this, $default );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -242,10 +311,10 @@ class WP_Customize_Setting {
|
||||
default :
|
||||
|
||||
/**
|
||||
* Fires when the WP_Customize_Setting::update() method is called for settings
|
||||
* Fires when the {@see 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.
|
||||
* The dynamic portion of the hook name, `$this->type`, refers to the type of setting.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
@@ -282,7 +351,7 @@ class WP_Customize_Setting {
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param mixed $value The value to update.
|
||||
* @return mixed The result of saving the value.
|
||||
* @return bool|null The result of saving the value.
|
||||
*/
|
||||
protected function _update_option( $value ) {
|
||||
// Handle non-array option.
|
||||
@@ -317,7 +386,7 @@ class WP_Customize_Setting {
|
||||
/**
|
||||
* Filter a Customize setting value not handled as a theme_mod or option.
|
||||
*
|
||||
* The dynamic portion of the hook name, $this->id_date['base'], refers to
|
||||
* The dynamic portion of the hook name, `$this->id_date['base']`, refers to
|
||||
* the base slug of the setting name.
|
||||
*
|
||||
* For settings handled as theme_mods or options, see those corresponding
|
||||
@@ -351,12 +420,12 @@ class WP_Customize_Setting {
|
||||
/**
|
||||
* Filter a Customize setting value for use in JavaScript.
|
||||
*
|
||||
* The dynamic portion of the hook name, $this->id, refers to the setting ID.
|
||||
* 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 $this WP_Customize_Setting instance.
|
||||
* @param WP_Customize_Setting $this {@see WP_Customize_Setting} instance.
|
||||
*/
|
||||
$value = apply_filters( "customize_sanitize_js_{$this->id}", $this->value(), $this );
|
||||
|
||||
@@ -373,7 +442,7 @@ class WP_Customize_Setting {
|
||||
*
|
||||
* @return bool False if theme doesn't support the setting or user can't change setting, otherwise true.
|
||||
*/
|
||||
public final function check_capabilities() {
|
||||
final public function check_capabilities() {
|
||||
if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) )
|
||||
return false;
|
||||
|
||||
@@ -413,8 +482,15 @@ class WP_Customize_Setting {
|
||||
$node = &$node[ $key ];
|
||||
}
|
||||
|
||||
if ( $create && ! isset( $node[ $last ] ) )
|
||||
$node[ $last ] = array();
|
||||
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;
|
||||
@@ -457,7 +533,7 @@ class WP_Customize_Setting {
|
||||
*
|
||||
* @param $root
|
||||
* @param $keys
|
||||
* @param $default A default value which is used as a fallback. Default is null.
|
||||
* @param mixed $default A default value which is used as a fallback. Default is null.
|
||||
* @return mixed The requested value or the default value.
|
||||
*/
|
||||
final protected function multidimensional_get( $root, $keys, $default = null ) {
|
||||
@@ -488,9 +564,9 @@ class WP_Customize_Setting {
|
||||
*
|
||||
* Results should be properly handled using another setting or callback.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Customize
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @see WP_Customize_Setting
|
||||
*/
|
||||
class WP_Customize_Filter_Setting extends WP_Customize_Setting {
|
||||
|
||||
@@ -505,9 +581,9 @@ class WP_Customize_Filter_Setting extends WP_Customize_Setting {
|
||||
*
|
||||
* Results should be properly handled using another setting or callback.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Customize
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @see WP_Customize_Setting
|
||||
*/
|
||||
final class WP_Customize_Header_Image_Setting extends WP_Customize_Setting {
|
||||
public $id = 'header_image_data';
|
||||
@@ -533,18 +609,17 @@ final class WP_Customize_Header_Image_Setting extends WP_Customize_Setting {
|
||||
}
|
||||
|
||||
/**
|
||||
* Class WP_Customize_Background_Image_Setting
|
||||
* Customizer Background Image Setting class.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Customize
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @see WP_Customize_Setting
|
||||
*/
|
||||
final class WP_Customize_Background_Image_Setting extends WP_Customize_Setting {
|
||||
public $id = 'background_image_thumb';
|
||||
|
||||
/**
|
||||
* @since 3.4.0
|
||||
* @uses remove_theme_mod()
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* Customize Widgets Class
|
||||
*
|
||||
* Implements widget management in the Customizer.
|
||||
* WordPress Customize Widgets classes
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Customize
|
||||
* @since 3.9.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Customize Widgets class.
|
||||
*
|
||||
* Implements widget management in the Customizer.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
* @see WP_Customize_Manager
|
||||
*/
|
||||
final class WP_Customize_Widgets {
|
||||
|
||||
/**
|
||||
@@ -32,20 +40,6 @@ final class WP_Customize_Widgets {
|
||||
'rss', 'search', 'tag_cloud', 'text',
|
||||
);
|
||||
|
||||
/**
|
||||
* @since 3.9.0
|
||||
* @access protected
|
||||
* @var
|
||||
*/
|
||||
protected $_customized;
|
||||
|
||||
/**
|
||||
* @since 3.9.0
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $_prepreview_added_filters = array();
|
||||
|
||||
/**
|
||||
* @since 3.9.0
|
||||
* @access protected
|
||||
@@ -67,6 +61,18 @@ final class WP_Customize_Widgets {
|
||||
*/
|
||||
protected $old_sidebars_widgets = array();
|
||||
|
||||
/**
|
||||
* Mapping of setting type to setting ID pattern.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $setting_id_patterns = array(
|
||||
'widget_instance' => '/^(widget_.+?)(?:\[(\d+)\])?$/',
|
||||
'sidebar_widgets' => '/^sidebars_widgets\[(.+?)\]$/',
|
||||
);
|
||||
|
||||
/**
|
||||
* Initial loader.
|
||||
*
|
||||
@@ -78,7 +84,8 @@ final class WP_Customize_Widgets {
|
||||
public function __construct( $manager ) {
|
||||
$this->manager = $manager;
|
||||
|
||||
add_action( 'after_setup_theme', array( $this, 'setup_widget_addition_previews' ) );
|
||||
add_filter( 'customize_dynamic_setting_args', array( $this, 'filter_customize_dynamic_setting_args' ), 10, 2 );
|
||||
add_action( 'after_setup_theme', array( $this, 'register_settings' ) );
|
||||
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_register', array( $this, 'schedule_customize_register' ), 1 );
|
||||
@@ -88,12 +95,85 @@ final class WP_Customize_Widgets {
|
||||
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_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 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the widget setting type given a setting ID.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access protected
|
||||
*
|
||||
* @param $setting_id Setting ID.
|
||||
* @return string|null Setting type. Null otherwise.
|
||||
*/
|
||||
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;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inspect the incoming customized data for any widget settings, and dynamically add them up-front so widgets will be initialized properly.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access public
|
||||
*/
|
||||
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 ) );
|
||||
|
||||
/*
|
||||
* Preview settings right away so that widgets and sidebars will get registered properly.
|
||||
* But don't do this if a customize_save because this will cause WP to think there is nothing
|
||||
* changed that needs to be saved.
|
||||
*/
|
||||
if ( ! $this->manager->doing_ajax( 'customize_save' ) ) {
|
||||
foreach ( $settings as $setting ) {
|
||||
$setting->preview();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine the arguments for a dynamically-created setting.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access public
|
||||
*
|
||||
* @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']`.
|
||||
* @return false|array 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an unslashed post value or return a default.
|
||||
*
|
||||
@@ -110,184 +190,13 @@ final class WP_Customize_Widgets {
|
||||
return $default;
|
||||
}
|
||||
|
||||
return wp_unslash( $_POST[$name] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up widget addition previews.
|
||||
*
|
||||
* Since the widgets get registered on 'widgets_init' before the customizer
|
||||
* settings are set up on 'customize_register', we have to filter the options
|
||||
* similarly to how the setting previewer will filter the options later.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function setup_widget_addition_previews() {
|
||||
$is_customize_preview = false;
|
||||
|
||||
if ( ! empty( $this->manager ) && ! is_admin() && 'on' === $this->get_post_value( 'wp_customize' ) ) {
|
||||
$is_customize_preview = check_ajax_referer( 'preview-customize_' . $this->manager->get_stylesheet(), 'nonce', false );
|
||||
}
|
||||
|
||||
$is_ajax_widget_update = false;
|
||||
if ( $this->manager->doing_ajax() && 'update-widget' === $this->get_post_value( 'action' ) ) {
|
||||
$is_ajax_widget_update = check_ajax_referer( 'update-widget', 'nonce', false );
|
||||
}
|
||||
|
||||
$is_ajax_customize_save = false;
|
||||
if ( $this->manager->doing_ajax() && 'customize_save' === $this->get_post_value( 'action' ) ) {
|
||||
$is_ajax_customize_save = check_ajax_referer( 'save-customize_' . $this->manager->get_stylesheet(), 'nonce', false );
|
||||
}
|
||||
|
||||
$is_valid_request = ( $is_ajax_widget_update || $is_customize_preview || $is_ajax_customize_save );
|
||||
if ( ! $is_valid_request ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Input from customizer preview.
|
||||
if ( isset( $_POST['customized'] ) ) {
|
||||
$this->_customized = json_decode( $this->get_post_value( 'customized' ), true );
|
||||
} else { // Input from ajax widget update request.
|
||||
$this->_customized = array();
|
||||
$id_base = $this->get_post_value( 'id_base' );
|
||||
$widget_number = $this->get_post_value( 'widget_number', false );
|
||||
$option_name = 'widget_' . $id_base;
|
||||
$this->_customized[ $option_name ] = array();
|
||||
if ( preg_match( '/^[0-9]+$/', $widget_number ) ) {
|
||||
$option_name .= '[' . $widget_number . ']';
|
||||
$this->_customized[ $option_name ][ $widget_number ] = array();
|
||||
}
|
||||
}
|
||||
|
||||
$function = array( $this, 'prepreview_added_sidebars_widgets' );
|
||||
|
||||
$hook = 'option_sidebars_widgets';
|
||||
add_filter( $hook, $function );
|
||||
$this->_prepreview_added_filters[] = compact( 'hook', 'function' );
|
||||
|
||||
$hook = 'default_option_sidebars_widgets';
|
||||
add_filter( $hook, $function );
|
||||
$this->_prepreview_added_filters[] = compact( 'hook', 'function' );
|
||||
|
||||
$function = array( $this, 'prepreview_added_widget_instance' );
|
||||
foreach ( $this->_customized as $setting_id => $value ) {
|
||||
if ( preg_match( '/^(widget_.+?)(?:\[(\d+)\])?$/', $setting_id, $matches ) ) {
|
||||
$option = $matches[1];
|
||||
|
||||
$hook = sprintf( 'option_%s', $option );
|
||||
if ( ! has_filter( $hook, $function ) ) {
|
||||
add_filter( $hook, $function );
|
||||
$this->_prepreview_added_filters[] = compact( 'hook', 'function' );
|
||||
}
|
||||
|
||||
$hook = sprintf( 'default_option_%s', $option );
|
||||
if ( ! has_filter( $hook, $function ) ) {
|
||||
add_filter( $hook, $function );
|
||||
$this->_prepreview_added_filters[] = compact( 'hook', 'function' );
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure the option is registered so that the update_option()
|
||||
* won't fail due to the filters providing a default value, which
|
||||
* causes the update_option() to get confused.
|
||||
*/
|
||||
add_option( $option, array() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure that newly-added widgets will appear in the widgets_sidebars.
|
||||
*
|
||||
* This is necessary because the customizer's setting preview filters
|
||||
* are added after the widgets_init action, which is too late for the
|
||||
* widgets to be set up properly.
|
||||
*
|
||||
* @since 3.9.0
|
||||
* @access public
|
||||
*
|
||||
* @param array $sidebars_widgets Associative array of sidebars and their widgets.
|
||||
* @return array Filtered array of sidebars and their widgets.
|
||||
*/
|
||||
public function prepreview_added_sidebars_widgets( $sidebars_widgets ) {
|
||||
foreach ( $this->_customized as $setting_id => $value ) {
|
||||
if ( preg_match( '/^sidebars_widgets\[(.+?)\]$/', $setting_id, $matches ) ) {
|
||||
$sidebar_id = $matches[1];
|
||||
$sidebars_widgets[ $sidebar_id ] = $value;
|
||||
}
|
||||
}
|
||||
return $sidebars_widgets;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure newly-added widgets have empty instances so they
|
||||
* will be recognized.
|
||||
*
|
||||
* This is necessary because the customizer's setting preview
|
||||
* filters are added after the widgets_init action, which is
|
||||
* too late for the widgets to be set up properly.
|
||||
*
|
||||
* @since 3.9.0
|
||||
* @access public
|
||||
*
|
||||
* @param array|bool|mixed $value Widget instance(s), false if open was empty.
|
||||
* @return array|mixed Widget instance(s) with additions.
|
||||
*/
|
||||
public function prepreview_added_widget_instance( $value = false ) {
|
||||
if ( ! preg_match( '/^(?:default_)?option_(widget_(.+))/', current_filter(), $matches ) ) {
|
||||
return $value;
|
||||
}
|
||||
$id_base = $matches[2];
|
||||
|
||||
foreach ( $this->_customized as $setting_id => $setting ) {
|
||||
$parsed_setting_id = $this->parse_widget_setting_id( $setting_id );
|
||||
if ( is_wp_error( $parsed_setting_id ) || $id_base !== $parsed_setting_id['id_base'] ) {
|
||||
continue;
|
||||
}
|
||||
$widget_number = $parsed_setting_id['number'];
|
||||
|
||||
if ( is_null( $widget_number ) ) {
|
||||
// Single widget.
|
||||
if ( false === $value ) {
|
||||
$value = array();
|
||||
}
|
||||
} else {
|
||||
// Multi widget.
|
||||
if ( empty( $value ) ) {
|
||||
$value = array( '_multiwidget' => 1 );
|
||||
}
|
||||
if ( ! isset( $value[ $widget_number ] ) ) {
|
||||
$value[ $widget_number ] = array();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove pre-preview filters.
|
||||
*
|
||||
* Removes filters added in setup_widget_addition_previews()
|
||||
* to ensure widgets are populating the options during
|
||||
* 'widgets_init'.
|
||||
*
|
||||
* @since 3.9.0
|
||||
* @access public
|
||||
*/
|
||||
public function remove_prepreview_filters() {
|
||||
foreach ( $this->_prepreview_added_filters as $prepreview_added_filter ) {
|
||||
remove_filter( $prepreview_added_filter['hook'], $prepreview_added_filter['function'] );
|
||||
}
|
||||
$this->_prepreview_added_filters = array();
|
||||
return wp_unslash( $_POST[ $name ] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Override sidebars_widgets for theme switch.
|
||||
*
|
||||
* When switching a theme via the customizer, supply any previously-configured
|
||||
* 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
|
||||
@@ -310,10 +219,11 @@ final class WP_Customize_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 );
|
||||
unset( $GLOBALS['_wp_sidebars_widgets'] ); // reset global cache var used by wp_get_sidebars_widgets()
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter old_sidebars_widgets_data customizer setting.
|
||||
* Filter old_sidebars_widgets_data Customizer setting.
|
||||
*
|
||||
* When switching themes, filter the Customizer setting
|
||||
* old_sidebars_widgets_data to supply initial $sidebars_widgets before they
|
||||
@@ -325,7 +235,7 @@ final class WP_Customize_Widgets {
|
||||
* @since 3.9.0
|
||||
* @access public
|
||||
*
|
||||
* @param array $sidebars_widgets
|
||||
* @param array $old_sidebars_widgets
|
||||
*/
|
||||
public function filter_customize_value_old_sidebars_widgets_data( $old_sidebars_widgets ) {
|
||||
return $this->old_sidebars_widgets;
|
||||
@@ -380,7 +290,7 @@ final class WP_Customize_Widgets {
|
||||
* @access public
|
||||
*/
|
||||
public function schedule_customize_register() {
|
||||
if ( is_admin() ) { // @todo for some reason, $wp_customize->is_preview() is true here?
|
||||
if ( is_admin() ) {
|
||||
$this->customize_register();
|
||||
} else {
|
||||
add_action( 'wp', array( $this, 'customize_register' ) );
|
||||
@@ -388,7 +298,7 @@ final class WP_Customize_Widgets {
|
||||
}
|
||||
|
||||
/**
|
||||
* Register customizer settings and controls for all sidebars and widgets.
|
||||
* Register Customizer settings and controls for all sidebars and widgets.
|
||||
*
|
||||
* @since 3.9.0
|
||||
* @access public
|
||||
@@ -412,12 +322,9 @@ final class WP_Customize_Widgets {
|
||||
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 );
|
||||
|
||||
$setting_args['sanitize_callback'] = array( $this, 'sanitize_widget_instance' );
|
||||
$setting_args['sanitize_js_callback'] = array( $this, 'sanitize_widget_js_instance' );
|
||||
|
||||
$this->manager->add_setting( $setting_id, $setting_args );
|
||||
|
||||
if ( ! $this->manager->get_setting( $setting_id ) ) {
|
||||
$this->manager->add_setting( $setting_id, $setting_args );
|
||||
}
|
||||
$new_setting_ids[] = $setting_id;
|
||||
}
|
||||
|
||||
@@ -429,6 +336,7 @@ final class WP_Customize_Widgets {
|
||||
$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 );
|
||||
}
|
||||
@@ -452,11 +360,12 @@ final class WP_Customize_Widgets {
|
||||
if ( $is_registered_sidebar || $is_inactive_widgets ) {
|
||||
$setting_id = sprintf( 'sidebars_widgets[%s]', $sidebar_id );
|
||||
$setting_args = $this->get_setting_args( $setting_id );
|
||||
|
||||
$setting_args['sanitize_callback'] = array( $this, 'sanitize_sidebar_widgets' );
|
||||
$setting_args['sanitize_js_callback'] = array( $this, 'sanitize_sidebar_widgets_js_instance' );
|
||||
|
||||
$this->manager->add_setting( $setting_id, $setting_args );
|
||||
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.
|
||||
@@ -468,6 +377,7 @@ final class WP_Customize_Widgets {
|
||||
'description' => $GLOBALS['wp_registered_sidebars'][ $sidebar_id ]['description'],
|
||||
'priority' => array_search( $sidebar_id, array_keys( $wp_registered_sidebars ) ),
|
||||
'panel' => 'widgets',
|
||||
'sidebar_id' => $sidebar_id,
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -481,7 +391,8 @@ final class WP_Customize_Widgets {
|
||||
*/
|
||||
$section_args = apply_filters( 'customizer_widgets_section_args', $section_args, $section_id, $sidebar_id );
|
||||
|
||||
$this->manager->add_section( $section_id, $section_args );
|
||||
$section = new WP_Customize_Sidebar_Section( $this->manager, $section_id, $section_args );
|
||||
$this->manager->add_section( $section );
|
||||
|
||||
$control = new WP_Widget_Area_Customize_Control( $this->manager, $setting_id, array(
|
||||
'section' => $section_id,
|
||||
@@ -521,20 +432,17 @@ final class WP_Customize_Widgets {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* We have to register these settings later than customize_preview_init
|
||||
* so that other filters have had a chance to run.
|
||||
*/
|
||||
if ( did_action( 'customize_preview_init' ) ) {
|
||||
if ( ! $this->manager->doing_ajax( 'customize_save' ) ) {
|
||||
foreach ( $new_setting_ids as $new_setting_id ) {
|
||||
$this->manager->get_setting( $new_setting_id )->preview();
|
||||
}
|
||||
}
|
||||
$this->remove_prepreview_filters();
|
||||
|
||||
add_filter( 'sidebars_widgets', array( $this, 'preview_sidebars_widgets' ), 1 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Covert a widget_id into its corresponding customizer setting ID (option name).
|
||||
* Covert a widget_id into its corresponding Customizer setting ID (option name).
|
||||
*
|
||||
* @since 3.9.0
|
||||
* @access public
|
||||
@@ -556,9 +464,9 @@ final class WP_Customize_Widgets {
|
||||
* Determine 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
|
||||
* 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
|
||||
* 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 is_wide_widget_in_customizer filter.
|
||||
*
|
||||
@@ -664,7 +572,7 @@ final class WP_Customize_Widgets {
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue scripts and styles for customizer panel and export data to JavaScript.
|
||||
* Enqueue scripts and styles for Customizer panel and export data to JavaScript.
|
||||
*
|
||||
* @since 3.9.0
|
||||
* @access public
|
||||
@@ -726,6 +634,8 @@ final class WP_Customize_Widgets {
|
||||
'removeBtnLabel' => __( 'Remove' ),
|
||||
'removeBtnTooltip' => __( 'Trash widget by moving it to the inactive widgets sidebar.' ),
|
||||
'error' => __( 'An error has occurred. Please reload the page and try again.' ),
|
||||
'widgetMovedUp' => __( 'Widget moved up' ),
|
||||
'widgetMovedDown' => __( 'Widget moved down' ),
|
||||
),
|
||||
'tpl' => array(
|
||||
'widgetReorderNav' => $widget_reorder_nav_tpl,
|
||||
@@ -740,7 +650,7 @@ final class WP_Customize_Widgets {
|
||||
$wp_scripts->add_data(
|
||||
'customize-widgets',
|
||||
'data',
|
||||
sprintf( 'var _wpCustomizeWidgetsSettings = %s;', json_encode( $settings ) )
|
||||
sprintf( 'var _wpCustomizeWidgetsSettings = %s;', wp_json_encode( $settings ) )
|
||||
);
|
||||
}
|
||||
|
||||
@@ -758,11 +668,13 @@ final class WP_Customize_Widgets {
|
||||
<label class="screen-reader-text" for="widgets-search"><?php _e( 'Search Widgets' ); ?></label>
|
||||
<input type="search" id="widgets-search" placeholder="<?php esc_attr_e( 'Search widgets…' ) ?>" />
|
||||
</div>
|
||||
<div id="available-widgets-list">
|
||||
<?php foreach ( $this->get_available_widgets() as $available_widget ): ?>
|
||||
<div id="widget-tpl-<?php echo esc_attr( $available_widget['id'] ) ?>" data-widget-id="<?php echo esc_attr( $available_widget['id'] ) ?>" class="widget-tpl <?php echo esc_attr( $available_widget['id'] ) ?>" tabindex="0">
|
||||
<?php echo $available_widget['control_tpl']; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div><!-- #available-widgets-list -->
|
||||
</div><!-- #available-widgets -->
|
||||
</div><!-- #widgets-left -->
|
||||
<?php
|
||||
@@ -800,6 +712,15 @@ final class WP_Customize_Widgets {
|
||||
'transport' => 'refresh',
|
||||
'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' );
|
||||
} else if ( preg_match( $this->setting_id_patterns['widget_instance'], $id, $matches ) ) {
|
||||
$args['sanitize_callback'] = array( $this, 'sanitize_widget_instance' );
|
||||
$args['sanitize_js_callback'] = array( $this, 'sanitize_widget_js_instance' );
|
||||
}
|
||||
|
||||
$args = array_merge( $args, $overrides );
|
||||
|
||||
/**
|
||||
@@ -827,15 +748,10 @@ final class WP_Customize_Widgets {
|
||||
* @return array Array of sanitized widget IDs.
|
||||
*/
|
||||
public function sanitize_sidebar_widgets( $widget_ids ) {
|
||||
global $wp_registered_widgets;
|
||||
|
||||
$widget_ids = array_map( 'strval', (array) $widget_ids );
|
||||
$widget_ids = array_map( 'strval', (array) $widget_ids );
|
||||
$sanitized_widget_ids = array();
|
||||
|
||||
foreach ( $widget_ids as $widget_id ) {
|
||||
if ( array_key_exists( $widget_id, $wp_registered_widgets ) ) {
|
||||
$sanitized_widget_ids[] = $widget_id;
|
||||
}
|
||||
$sanitized_widget_ids[] = preg_replace( '/[^a-z0-9_\-]/', '', $widget_id );
|
||||
}
|
||||
return $sanitized_widget_ids;
|
||||
}
|
||||
@@ -952,7 +868,7 @@ final class WP_Customize_Widgets {
|
||||
|
||||
call_user_func_array( 'wp_widget_control', $args );
|
||||
$replacements = array(
|
||||
'<form action="" method="post">' => '<div class="form">',
|
||||
'<form method="post">' => '<div class="form">',
|
||||
'</form>' => '</div><!-- .form -->',
|
||||
);
|
||||
|
||||
@@ -964,25 +880,38 @@ final class WP_Customize_Widgets {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add hooks for the customizer preview.
|
||||
* Add hooks for the Customizer preview.
|
||||
*
|
||||
* @since 3.9.0
|
||||
* @access public
|
||||
*/
|
||||
public function customize_preview_init() {
|
||||
add_filter( 'sidebars_widgets', array( $this, 'preview_sidebars_widgets' ), 1 );
|
||||
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 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh nonce for widget updates.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access public
|
||||
*
|
||||
* @param array $nonces Array of nonces.
|
||||
* @return array $nonces Array of nonces.
|
||||
*/
|
||||
public function refresh_nonces( $nonces ) {
|
||||
$nonces['update-widget'] = wp_create_nonce( 'update-widget' );
|
||||
return $nonces;
|
||||
}
|
||||
|
||||
/**
|
||||
* When previewing, make sure the proper previewing widgets are used.
|
||||
*
|
||||
* Because wp_get_sidebars_widgets() gets called early at 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, we have to reset
|
||||
* before the Customizer preview filter is added, we have to reset
|
||||
* it after the filter has been added.
|
||||
*
|
||||
* @since 3.9.0
|
||||
@@ -1039,7 +968,7 @@ final class WP_Customize_Widgets {
|
||||
*/
|
||||
public function export_preview_data() {
|
||||
|
||||
// Prepare customizer settings to pass to Javascript.
|
||||
// Prepare Customizer settings to pass to JavaScript.
|
||||
$settings = array(
|
||||
'renderedSidebars' => array_fill_keys( array_unique( $this->rendered_sidebars ), true ),
|
||||
'renderedWidgets' => array_fill_keys( array_keys( $this->rendered_widgets ), true ),
|
||||
@@ -1055,7 +984,7 @@ final class WP_Customize_Widgets {
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var _wpWidgetCustomizerPreviewSettings = <?php echo json_encode( $settings ); ?>;
|
||||
var _wpWidgetCustomizerPreviewSettings = <?php echo wp_json_encode( $settings ); ?>;
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
@@ -1311,8 +1240,8 @@ final class WP_Customize_Widgets {
|
||||
|
||||
// Clean up any input vars that were manually added
|
||||
foreach ( $added_input_vars as $key ) {
|
||||
unset( $_POST[$key] );
|
||||
unset( $_REQUEST[$key] );
|
||||
unset( $_POST[ $key ] );
|
||||
unset( $_REQUEST[ $key ] );
|
||||
}
|
||||
|
||||
// Make sure the expected option was updated.
|
||||
@@ -1329,25 +1258,31 @@ final class WP_Customize_Widgets {
|
||||
}
|
||||
}
|
||||
|
||||
// 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();
|
||||
|
||||
// Obtain the widget instance.
|
||||
$option = get_option( $option_name );
|
||||
|
||||
$option = $this->get_captured_option( $option_name );
|
||||
if ( null !== $parsed_id['number'] ) {
|
||||
$instance = $option[$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).
|
||||
*/
|
||||
$setting_id = $this->get_setting_id( $widget_id );
|
||||
$this->manager->set_post_value( $setting_id, $instance );
|
||||
|
||||
// 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' );
|
||||
@@ -1379,8 +1314,8 @@ final class WP_Customize_Widgets {
|
||||
wp_die( -1 );
|
||||
}
|
||||
|
||||
if ( ! isset( $_POST['widget-id'] ) ) {
|
||||
wp_send_json_error();
|
||||
if ( empty( $_POST['widget-id'] ) ) {
|
||||
wp_send_json_error( 'missing_widget-id' );
|
||||
}
|
||||
|
||||
/** This action is documented in wp-admin/includes/ajax-actions.php */
|
||||
@@ -1394,15 +1329,22 @@ final class WP_Customize_Widgets {
|
||||
|
||||
$widget_id = $this->get_post_value( 'widget-id' );
|
||||
$parsed_id = $this->parse_widget_id( $widget_id );
|
||||
$id_base = $parsed_id['id_base'];
|
||||
$id_base = $parsed_id['id_base'];
|
||||
|
||||
if ( isset( $_POST['widget-' . $id_base] ) && is_array( $_POST['widget-' . $id_base] ) && preg_match( '/__i__|%i%/', key( $_POST['widget-' . $id_base] ) ) ) {
|
||||
wp_send_json_error();
|
||||
$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();
|
||||
wp_send_json_error( $updated_widget->get_error_message() );
|
||||
}
|
||||
|
||||
$form = $updated_widget['form'];
|
||||
@@ -1458,6 +1400,25 @@ final class WP_Customize_Widgets {
|
||||
return $this->_captured_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the option that was captured from being saved.
|
||||
*
|
||||
* @since 4.2.0
|
||||
* @access protected
|
||||
*
|
||||
* @param string $option_name Option name.
|
||||
* @param mixed $default Optional. Default value to return if the option does not exist.
|
||||
* @return mixed Value set for the option.
|
||||
*/
|
||||
protected function get_captured_option( $option_name, $default = false ) {
|
||||
if ( array_key_exists( $option_name, $this->_captured_options ) ) {
|
||||
$value = $this->_captured_options[ $option_name ];
|
||||
} else {
|
||||
$value = $default;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of captured widget option updates.
|
||||
*
|
||||
@@ -1492,21 +1453,21 @@ final class WP_Customize_Widgets {
|
||||
* @since 3.9.0
|
||||
* @access public
|
||||
*
|
||||
* @param mixed $new_value
|
||||
* @param string $option_name
|
||||
* @param mixed $old_value
|
||||
* @return mixed
|
||||
* @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;
|
||||
}
|
||||
|
||||
if ( ! isset( $this->_captured_options[$option_name] ) ) {
|
||||
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;
|
||||
$this->_captured_options[ $option_name ] = $new_value;
|
||||
|
||||
return $old_value;
|
||||
}
|
||||
@@ -1517,14 +1478,14 @@ final class WP_Customize_Widgets {
|
||||
* @since 3.9.0
|
||||
* @access public
|
||||
*
|
||||
* @param mixed $value Option
|
||||
* @return mixed
|
||||
* @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];
|
||||
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 );
|
||||
@@ -1553,4 +1514,36 @@ final class WP_Customize_Widgets {
|
||||
$this->_captured_options = array();
|
||||
$this->_is_capturing_option_updates = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 3.9.0
|
||||
* @deprecated 4.2.0 Deprecated in favor of customize_dynamic_setting_args filter.
|
||||
*/
|
||||
public function setup_widget_addition_previews() {
|
||||
_deprecated_function( __METHOD__, '4.2.0' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 3.9.0
|
||||
* @deprecated 4.2.0 Deprecated in favor of customize_dynamic_setting_args filter.
|
||||
*/
|
||||
public function prepreview_added_sidebars_widgets() {
|
||||
_deprecated_function( __METHOD__, '4.2.0' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 3.9.0
|
||||
* @deprecated 4.2.0 Deprecated in favor of customize_dynamic_setting_args filter.
|
||||
*/
|
||||
public function prepreview_added_widget_instance() {
|
||||
_deprecated_function( __METHOD__, '4.2.0' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 3.9.0
|
||||
* @deprecated 4.2.0 Deprecated in favor of customize_dynamic_setting_args filter.
|
||||
*/
|
||||
public function remove_prepreview_filters() {
|
||||
_deprecated_function( __METHOD__, '4.2.0' );
|
||||
}
|
||||
}
|
||||
+102
-43
@@ -48,7 +48,7 @@ final class _WP_Editors {
|
||||
* @type string $tabfocus_elements The previous and next element ID to move the focus to
|
||||
* when pressing the Tab key in TinyMCE. Defualt ':prev,:next'.
|
||||
* @type string $editor_css Intended for extra styles for both Visual and Text editors.
|
||||
* Should include <style> tags, and can use "scoped". Default empty.
|
||||
* Should include `<style>` tags, and can use "scoped". Default empty.
|
||||
* @type string $editor_class Extra classes to add to the editor textarea elemen. Default empty.
|
||||
* @type bool $teeny Whether to output the minimal editor config. Examples include
|
||||
* Press This and the Comment editor. Default false.
|
||||
@@ -76,20 +76,21 @@ final class _WP_Editors {
|
||||
$settings = apply_filters( 'wp_editor_settings', $settings, $editor_id );
|
||||
|
||||
$set = wp_parse_args( $settings, array(
|
||||
'wpautop' => true,
|
||||
'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,
|
||||
'dfw' => false,
|
||||
'tinymce' => true,
|
||||
'quicktags' => true
|
||||
'wpautop' => true,
|
||||
'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,
|
||||
'dfw' => false,
|
||||
'_content_editor_dfw' => false,
|
||||
'tinymce' => true,
|
||||
'quicktags' => true
|
||||
) );
|
||||
|
||||
self::$this_tinymce = ( $set['tinymce'] && user_can_richedit() );
|
||||
@@ -116,12 +117,6 @@ final class _WP_Editors {
|
||||
// A cookie (set when a user resizes the editor) overrides the height.
|
||||
$cookie = (int) get_user_setting( 'ed_size' );
|
||||
|
||||
// Upgrade an old TinyMCE cookie if it is still around, and the new one isn't.
|
||||
if ( ! $cookie && isset( $_COOKIE['TinyMCE_content_size'] ) ) {
|
||||
parse_str( $_COOKIE['TinyMCE_content_size'], $cookie );
|
||||
$cookie = $cookie['ch'];
|
||||
}
|
||||
|
||||
if ( $cookie )
|
||||
$set['editor_height'] = $cookie;
|
||||
}
|
||||
@@ -177,13 +172,13 @@ final class _WP_Editors {
|
||||
$switch_class = 'tmce-active';
|
||||
}
|
||||
|
||||
$buttons .= '<a id="' . $editor_id . '-html" class="wp-switch-editor switch-html" onclick="switchEditors.switchto(this);">' . _x( 'Text', 'Name for the Text editor tab (formerly HTML)' ) . "</a>\n";
|
||||
$buttons .= '<a id="' . $editor_id . '-tmce" class="wp-switch-editor switch-tmce" onclick="switchEditors.switchto(this);">' . __('Visual') . "</a>\n";
|
||||
$buttons .= '<button type="button" id="' . $editor_id . '-tmce" class="wp-switch-editor switch-tmce" onclick="switchEditors.switchto(this);">' . __('Visual') . "</button>\n";
|
||||
$buttons .= '<button type="button" id="' . $editor_id . '-html" class="wp-switch-editor switch-html" onclick="switchEditors.switchto(this);">' . _x( 'Text', 'Name for the Text editor tab (formerly HTML)' ) . "</button>\n";
|
||||
}
|
||||
|
||||
$wrap_class = 'wp-core-ui wp-editor-wrap ' . $switch_class;
|
||||
|
||||
if ( $set['dfw'] ) {
|
||||
if ( $set['_content_editor_dfw'] ) {
|
||||
$wrap_class .= ' has-dfw';
|
||||
}
|
||||
|
||||
@@ -249,6 +244,10 @@ final class _WP_Editors {
|
||||
self::editor_settings($editor_id, $set);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $editor_id
|
||||
* @param array $set
|
||||
*/
|
||||
public static function editor_settings($editor_id, $set) {
|
||||
$first_run = false;
|
||||
|
||||
@@ -278,6 +277,10 @@ final class _WP_Editors {
|
||||
if ( $set['dfw'] )
|
||||
$qtInit['buttons'] .= ',fullscreen';
|
||||
|
||||
if ( $set['_content_editor_dfw'] ) {
|
||||
$qtInit['buttons'] .= ',dfw';
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the Quicktags settings.
|
||||
*
|
||||
@@ -351,6 +354,7 @@ final class _WP_Editors {
|
||||
'wordpress',
|
||||
'wpautoresize',
|
||||
'wpeditimage',
|
||||
'wpemoji',
|
||||
'wpgallery',
|
||||
'wplink',
|
||||
'wpdialogs',
|
||||
@@ -418,7 +422,7 @@ final class _WP_Editors {
|
||||
$url = set_url_scheme( $url );
|
||||
$mce_external_plugins[ $name ] = $url;
|
||||
$plugurl = dirname( $url );
|
||||
$strings = $str1 = $str2 = '';
|
||||
$strings = '';
|
||||
|
||||
// Try to load langs/[locale].js and langs/[locale]_dlg.js
|
||||
if ( ! in_array( $name, $loaded_langs, true ) ) {
|
||||
@@ -489,17 +493,19 @@ final class _WP_Editors {
|
||||
'entities' => '38,amp,60,lt,62,gt',
|
||||
'entity_encoding' => 'raw',
|
||||
'keep_styles' => false,
|
||||
'cache_suffix' => 'wp-mce-' . $GLOBALS['tinymce_version'],
|
||||
|
||||
// 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_disable_captions' => $no_captions,
|
||||
'wpeditimage_html5_captions' => current_theme_supports( 'html5', 'caption' ),
|
||||
'plugins' => implode( ',', $plugins ),
|
||||
);
|
||||
|
||||
if ( ! empty( $mce_external_plugins ) ) {
|
||||
self::$first_init['external_plugins'] = json_encode( $mce_external_plugins );
|
||||
self::$first_init['external_plugins'] = wp_json_encode( $mce_external_plugins );
|
||||
}
|
||||
|
||||
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||
@@ -545,6 +551,15 @@ final class _WP_Editors {
|
||||
$mce_buttons = apply_filters( 'teeny_mce_buttons', array('bold', 'italic', 'underline', 'blockquote', 'strikethrough', 'bullist', 'numlist', 'alignleft', 'aligncenter', 'alignright', 'undo', 'redo', 'link', 'unlink', 'fullscreen'), $editor_id );
|
||||
$mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = array();
|
||||
} else {
|
||||
$mce_buttons = array( 'bold', 'italic', 'strikethrough', 'bullist', 'numlist', 'blockquote', 'hr', 'alignleft', 'aligncenter', 'alignright', 'link', 'unlink', 'wp_more', 'spellchecker' );
|
||||
|
||||
if ( $set['_content_editor_dfw'] ) {
|
||||
$mce_buttons[] = 'dfw';
|
||||
} else {
|
||||
$mce_buttons[] = 'fullscreen';
|
||||
}
|
||||
|
||||
$mce_buttons[] = 'wp_adv';
|
||||
|
||||
/**
|
||||
* Filter the first-row list of TinyMCE buttons (Visual tab).
|
||||
@@ -554,7 +569,13 @@ final class _WP_Editors {
|
||||
* @param array $buttons First-row list of buttons.
|
||||
* @param string $editor_id Unique editor identifier, e.g. 'content'.
|
||||
*/
|
||||
$mce_buttons = apply_filters( 'mce_buttons', array('bold', 'italic', 'strikethrough', 'bullist', 'numlist', 'blockquote', 'hr', 'alignleft', 'aligncenter', 'alignright', 'link', 'unlink', 'wp_more', 'spellchecker', 'fullscreen', 'wp_adv' ), $editor_id );
|
||||
$mce_buttons = apply_filters( 'mce_buttons', $mce_buttons, $editor_id );
|
||||
|
||||
$mce_buttons_2 = array( 'formatselect', 'underline', 'alignjustify', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo' );
|
||||
|
||||
if ( ! wp_is_mobile() ) {
|
||||
$mce_buttons_2[] = 'wp_help';
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the second-row list of TinyMCE buttons (Visual tab).
|
||||
@@ -564,7 +585,7 @@ final class _WP_Editors {
|
||||
* @param array $buttons Second-row list of buttons.
|
||||
* @param string $editor_id Unique editor identifier, e.g. 'content'.
|
||||
*/
|
||||
$mce_buttons_2 = apply_filters( 'mce_buttons_2', array( 'formatselect', 'underline', 'alignjustify', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo', 'wp_help' ), $editor_id );
|
||||
$mce_buttons_2 = apply_filters( 'mce_buttons_2', $mce_buttons_2, $editor_id );
|
||||
|
||||
/**
|
||||
* Filter the third-row list of TinyMCE buttons (Visual tab).
|
||||
@@ -600,6 +621,8 @@ final class _WP_Editors {
|
||||
}
|
||||
}
|
||||
|
||||
$body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
|
||||
|
||||
if ( !empty($set['tinymce']['body_class']) ) {
|
||||
$body_class .= ' ' . $set['tinymce']['body_class'];
|
||||
unset($set['tinymce']['body_class']);
|
||||
@@ -733,7 +756,15 @@ final class _WP_Editors {
|
||||
) );
|
||||
}
|
||||
|
||||
public static function wp_mce_translation() {
|
||||
/**
|
||||
* Translates the default TinyMCE strings and returns them as JSON encoded object ready to be loaded with tinymce.addI18n().
|
||||
* Can be used directly (_WP_Editors::wp_mce_translation()) by passing the same locale as set in the TinyMCE init object.
|
||||
*
|
||||
* @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().
|
||||
* @return string Translation object, JSON encoded.
|
||||
*/
|
||||
public static function wp_mce_translation( $mce_locale = '', $json_only = false ) {
|
||||
|
||||
$mce_translation = array(
|
||||
// Default TinyMCE strings
|
||||
@@ -852,6 +883,11 @@ final class _WP_Editors {
|
||||
'Insert/edit link' => __( 'Insert/edit link' ),
|
||||
'Remove link' => __( 'Remove link' ),
|
||||
|
||||
'Color' => __( 'Color' ),
|
||||
'Custom color' => __( 'Custom color' ),
|
||||
'Custom...' => _x( 'Custom...', 'label for custom color' ),
|
||||
'No color' => __( 'No color' ),
|
||||
|
||||
// Spelling, search/replace plugins
|
||||
'Could not find the specified string.' => __( 'Could not find the specified string.' ),
|
||||
'Replace' => _x( 'Replace', 'find/replace' ),
|
||||
@@ -868,6 +904,7 @@ final class _WP_Editors {
|
||||
'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' ),
|
||||
@@ -875,6 +912,7 @@ final class _WP_Editors {
|
||||
'Table properties' => __( 'Table properties' ),
|
||||
'Row properties' => __( 'Table row properties' ),
|
||||
'Cell properties' => __( 'Table cell properties' ),
|
||||
'Border color' => __( 'Border color' ),
|
||||
|
||||
'Row' => __( 'Row' ),
|
||||
'Rows' => __( 'Rows' ),
|
||||
@@ -903,10 +941,15 @@ final class _WP_Editors {
|
||||
'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' ),
|
||||
@@ -927,7 +970,7 @@ final class _WP_Editors {
|
||||
/* 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’re 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-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help' ),
|
||||
'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' ),
|
||||
'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.' ),
|
||||
|
||||
@@ -945,7 +988,10 @@ final class _WP_Editors {
|
||||
'Toolbar Toggle' => __( 'Toolbar Toggle' ),
|
||||
'Insert Read More tag' => __( 'Insert Read More tag' ),
|
||||
'Read more...' => __( 'Read more...' ), // Title on the placeholder inside the editor
|
||||
'Distraction Free Writing' => __( 'Distraction Free Writing' ),
|
||||
'Distraction-free writing mode' => __( 'Distraction-free writing mode' ),
|
||||
'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 ' => __( 'Edit' ), // Tooltip for the 'edit' button in the image toolbar
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -959,8 +1005,9 @@ final class _WP_Editors {
|
||||
* Url
|
||||
*/
|
||||
|
||||
$baseurl = self::$baseurl;
|
||||
$mce_locale = self::$mce_locale;
|
||||
if ( ! $mce_locale ) {
|
||||
$mce_locale = self::$mce_locale;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter translated strings prepared for TinyMCE.
|
||||
@@ -973,6 +1020,12 @@ final class _WP_Editors {
|
||||
$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 ( false !== strpos( $value, '&' ) ) {
|
||||
$mce_translation[$key] = html_entity_decode( $value, ENT_QUOTES, 'UTF-8' );
|
||||
}
|
||||
@@ -983,7 +1036,13 @@ final class _WP_Editors {
|
||||
$mce_translation['_dir'] = 'rtl';
|
||||
}
|
||||
|
||||
return "tinymce.addI18n( '$mce_locale', " . json_encode( $mce_translation ) . ");\n" .
|
||||
if ( $json_only ) {
|
||||
return wp_json_encode( $mce_translation );
|
||||
}
|
||||
|
||||
$baseurl = self::$baseurl ? self::$baseurl : includes_url( 'js/tinymce' );
|
||||
|
||||
return "tinymce.addI18n( '$mce_locale', " . wp_json_encode( $mce_translation ) . ");\n" .
|
||||
"tinymce.ScriptLoader.markDone( '$baseurl/langs/$mce_locale.js' );\n";
|
||||
}
|
||||
|
||||
@@ -1185,7 +1244,7 @@ final class _WP_Editors {
|
||||
$width = isset( $content_width ) && 800 > $content_width ? $content_width : 800;
|
||||
$width = $width + 22; // compensate for the padding and border
|
||||
$dfw_width = get_user_setting( 'dfw_width', $width );
|
||||
$save = isset( $post->post_status ) && $post->post_status == 'publish' ? __('Update') : __('Save');
|
||||
$save = $post && $post->post_status == 'publish' ? __('Update') : __('Save');
|
||||
|
||||
?>
|
||||
<div id="wp-fullscreen-body" class="wp-core-ui<?php if ( is_rtl() ) echo ' rtl'; ?>" data-theme-width="<?php echo (int) $width; ?>" data-dfw-width="<?php echo (int) $dfw_width; ?>">
|
||||
@@ -1219,7 +1278,7 @@ final class _WP_Editors {
|
||||
|
||||
/**
|
||||
* Filter the list of TinyMCE buttons for the fullscreen
|
||||
* 'Distraction Free Writing' editor.
|
||||
* 'Distraction-Free Writing' editor.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*
|
||||
@@ -1250,7 +1309,7 @@ final class _WP_Editors {
|
||||
|
||||
<div id="wp-fullscreen-save">
|
||||
<input type="button" class="button button-primary right" value="<?php echo $save; ?>" onclick="wp.editor.fullscreen.save();" />
|
||||
<span class="wp-fullscreen-saved-message"><?php if ( $post->post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?></span>
|
||||
<span class="wp-fullscreen-saved-message"><?php if ( $post && $post->post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?></span>
|
||||
<span class="wp-fullscreen-error-message"><?php _e('Save failed.'); ?></span>
|
||||
<span class="spinner"></span>
|
||||
</div>
|
||||
@@ -1277,7 +1336,7 @@ final class _WP_Editors {
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param array $args Optional. Accepts 'pagenum' and 's' (search) arguments.
|
||||
* @return array Results.
|
||||
* @return false|array Results.
|
||||
*/
|
||||
public static function wp_link_query( $args = array() ) {
|
||||
$pts = get_post_types( array( 'public' => true ), 'objects' );
|
||||
@@ -1382,13 +1441,13 @@ final class _WP_Editors {
|
||||
<div id="link-options">
|
||||
<p class="howto"><?php _e( 'Enter the destination URL' ); ?></p>
|
||||
<div>
|
||||
<label><span><?php _e( 'URL' ); ?></span><input id="url-field" type="text" name="href" /></label>
|
||||
<label><span><?php _e( 'URL' ); ?></span><input id="wp-link-url" type="text" /></label>
|
||||
</div>
|
||||
<div>
|
||||
<label><span><?php _e( 'Title' ); ?></span><input id="link-title-field" type="text" name="linktitle" /></label>
|
||||
<div class="wp-link-text-field">
|
||||
<label><span><?php _e( 'Link Text' ); ?></span><input id="wp-link-text" type="text" /></label>
|
||||
</div>
|
||||
<div class="link-target">
|
||||
<label><span> </span><input type="checkbox" id="link-target-checkbox" /> <?php _e( 'Open link in a new window/tab' ); ?></label>
|
||||
<label><span> </span><input type="checkbox" id="wp-link-target" /> <?php _e( 'Open link in a new window/tab' ); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<p class="howto"><a href="#" id="wp-link-search-toggle"><?php _e( 'Or link to existing content' ); ?></a></p>
|
||||
@@ -1396,7 +1455,7 @@ final class _WP_Editors {
|
||||
<div class="link-search-wrapper">
|
||||
<label>
|
||||
<span class="search-label"><?php _e( 'Search' ); ?></span>
|
||||
<input type="search" id="search-field" class="link-search-field" autocomplete="off" />
|
||||
<input type="search" id="wp-link-search" class="link-search-field" autocomplete="off" />
|
||||
<span class="spinner"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -43,9 +43,6 @@ class WP_Embed {
|
||||
* calls {@link do_shortcode()}, and then re-registers the old shortcodes.
|
||||
*
|
||||
* @uses $shortcode_tags
|
||||
* @uses remove_all_shortcodes()
|
||||
* @uses add_shortcode()
|
||||
* @uses do_shortcode()
|
||||
*
|
||||
* @param string $content Content to parse
|
||||
* @return string Content with shortcode parsed
|
||||
@@ -80,11 +77,9 @@ class WP_Embed {
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
jQuery(document).ready(function($){
|
||||
$.get("<?php echo admin_url( 'admin-ajax.php?action=oembed-cache&post=' . $post->ID, 'relative' ); ?>");
|
||||
});
|
||||
/* ]]> */
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
@@ -122,17 +117,6 @@ class WP_Embed {
|
||||
* Attempts to convert a URL into embed HTML. Starts by checking the URL against the regex of the registered embed handlers.
|
||||
* If none of the regex matches and it's enabled, then the URL will be given to the {@link WP_oEmbed} class.
|
||||
*
|
||||
* @uses wp_oembed_get()
|
||||
* @uses wp_parse_args()
|
||||
* @uses wp_embed_defaults()
|
||||
* @uses WP_Embed::maybe_make_link()
|
||||
* @uses get_option()
|
||||
* @uses author_can()
|
||||
* @uses wp_cache_get()
|
||||
* @uses wp_cache_set()
|
||||
* @uses get_post_meta()
|
||||
* @uses update_post_meta()
|
||||
*
|
||||
* @param array $attr {
|
||||
* Shortcode attributes. Optional.
|
||||
*
|
||||
@@ -140,7 +124,8 @@ class WP_Embed {
|
||||
* @type int $height Height of the embed in pixels.
|
||||
* }
|
||||
* @param string $url The URL attempting to be embedded.
|
||||
* @return string The embed HTML on success, otherwise the original URL.
|
||||
* @return string|false The embed HTML on success, otherwise the original URL.
|
||||
* `->maybe_make_link()` can return false on failure.
|
||||
*/
|
||||
public function shortcode( $attr, $url = '' ) {
|
||||
$post = get_post();
|
||||
@@ -149,6 +134,7 @@ class WP_Embed {
|
||||
$url = $attr['src'];
|
||||
}
|
||||
|
||||
|
||||
if ( empty( $url ) )
|
||||
return '';
|
||||
|
||||
@@ -156,7 +142,7 @@ class WP_Embed {
|
||||
$attr = wp_parse_args( $attr, wp_embed_defaults( $url ) );
|
||||
|
||||
// kses converts & into & and we need to undo this
|
||||
// See http://core.trac.wordpress.org/ticket/11311
|
||||
// See https://core.trac.wordpress.org/ticket/11311
|
||||
$url = str_replace( '&', '&', $url );
|
||||
|
||||
// Look for known internal handlers
|
||||
@@ -237,13 +223,13 @@ class WP_Embed {
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter whether to inspect the given URL for discoverable <link> tags.
|
||||
* Filter whether to inspect the given URL for discoverable link tags.
|
||||
*
|
||||
* @since 2.9.0
|
||||
*
|
||||
* @see WP_oEmbed::discover()
|
||||
*
|
||||
* @param bool $enable Whether to enable <link> tag discovery. Default false.
|
||||
* @param bool $enable Whether to enable `<link>` tag discovery. Default false.
|
||||
*/
|
||||
$attr['discover'] = ( apply_filters( 'embed_oembed_discover', false ) && author_can( $post_ID, 'unfiltered_html' ) );
|
||||
|
||||
@@ -326,31 +312,29 @@ class WP_Embed {
|
||||
* @return string Potentially modified $content.
|
||||
*/
|
||||
public function autoembed( $content ) {
|
||||
return preg_replace_callback( '|^\s*(https?://[^\s"]+)\s*$|im', array( $this, 'autoembed_callback' ), $content );
|
||||
return preg_replace_callback( '|^(\s*)(https?://[^\s"]+)(\s*)$|im', array( $this, 'autoembed_callback' ), $content );
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function for {@link WP_Embed::autoembed()}.
|
||||
*
|
||||
* @uses WP_Embed::shortcode()
|
||||
*
|
||||
* @param array $match A regex match array.
|
||||
* @return string The embed HTML on success, otherwise the original URL.
|
||||
*/
|
||||
public function autoembed_callback( $match ) {
|
||||
$oldval = $this->linkifunknown;
|
||||
$this->linkifunknown = false;
|
||||
$return = $this->shortcode( array(), $match[1] );
|
||||
$return = $this->shortcode( array(), $match[2] );
|
||||
$this->linkifunknown = $oldval;
|
||||
|
||||
return "\n$return\n";
|
||||
return $match[1] . $return . $match[3];
|
||||
}
|
||||
|
||||
/**
|
||||
* Conditionally makes a hyperlink based on an internal class variable.
|
||||
*
|
||||
* @param string $url URL to potentially be linked.
|
||||
* @return string Linked URL or the original URL.
|
||||
* @return false|string Linked URL or the original URL. False if 'return_false_on_fail' is true.
|
||||
*/
|
||||
public function maybe_make_link( $url ) {
|
||||
if ( $this->return_false_on_fail ) {
|
||||
|
||||
@@ -24,18 +24,16 @@ class WP_Error {
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @var array
|
||||
* @access private
|
||||
*/
|
||||
private $errors = array();
|
||||
public $errors = array();
|
||||
|
||||
/**
|
||||
* Stores the list of data for error codes.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @var array
|
||||
* @access private
|
||||
*/
|
||||
private $error_data = array();
|
||||
public $error_data = array();
|
||||
|
||||
/**
|
||||
* Initialize the error.
|
||||
@@ -53,7 +51,6 @@ class WP_Error {
|
||||
* @param string|int $code Error code
|
||||
* @param string $message Error message
|
||||
* @param mixed $data Optional. Error data.
|
||||
* @return WP_Error
|
||||
*/
|
||||
public function __construct( $code = '', $message = '', $data = '' ) {
|
||||
if ( empty($code) )
|
||||
@@ -65,58 +62,6 @@ class WP_Error {
|
||||
$this->error_data[$code] = $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make private properties readable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $name Property to get.
|
||||
* @return mixed Property.
|
||||
*/
|
||||
public function __get( $name ) {
|
||||
return $this->$name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make private properties settable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $name Property to set.
|
||||
* @param mixed $value Property value.
|
||||
* @return mixed Newly-set property.
|
||||
*/
|
||||
public function __set( $name, $value ) {
|
||||
return $this->$name = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make private properties checkable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $name Property to check if set.
|
||||
* @return bool Whether the property is set.
|
||||
*/
|
||||
public function __isset( $name ) {
|
||||
return isset( $this->$name );
|
||||
}
|
||||
|
||||
/**
|
||||
* Make private properties un-settable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $name Property to unset.
|
||||
*/
|
||||
public function __unset( $name ) {
|
||||
unset( $this->$name );
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all error codes.
|
||||
*
|
||||
@@ -242,6 +187,21 @@ class WP_Error {
|
||||
|
||||
$this->error_data[$code] = $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the specified error.
|
||||
*
|
||||
* This function removes all error messages associated with the specified
|
||||
* error code, along with any error data for that code.
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @param string|int $code Error code.
|
||||
*/
|
||||
public function remove( $code ) {
|
||||
unset( $this->errors[ $code ] );
|
||||
unset( $this->error_data[ $code ] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -254,8 +214,6 @@ class WP_Error {
|
||||
* @param mixed $thing Check if unknown variable is a WP_Error object.
|
||||
* @return bool True, if WP_Error. False, if not WP_Error.
|
||||
*/
|
||||
function is_wp_error($thing) {
|
||||
if ( is_object($thing) && is_a($thing, 'WP_Error') )
|
||||
return true;
|
||||
return false;
|
||||
function is_wp_error( $thing ) {
|
||||
return ( $thing instanceof WP_Error );
|
||||
}
|
||||
@@ -7,7 +7,18 @@
|
||||
*
|
||||
*/
|
||||
class WP_HTTP_IXR_Client extends IXR_Client {
|
||||
public $scheme;
|
||||
/**
|
||||
* @var IXR_Error
|
||||
*/
|
||||
public $error;
|
||||
|
||||
/**
|
||||
* @param string $server
|
||||
* @param string|bool $path
|
||||
* @param int|bool $port
|
||||
* @param int $timeout
|
||||
*/
|
||||
public function __construct($server, $path = false, $port = false, $timeout = 15) {
|
||||
if ( ! $path ) {
|
||||
// Assume we have been given a URL instead
|
||||
|
||||
@@ -15,8 +15,10 @@
|
||||
* @uses WP_Image_Editor Extends class
|
||||
*/
|
||||
class WP_Image_Editor_GD extends WP_Image_Editor {
|
||||
|
||||
protected $image = false; // GD Resource
|
||||
/**
|
||||
* @var resource
|
||||
*/
|
||||
protected $image; // GD Resource
|
||||
|
||||
public function __destruct() {
|
||||
if ( $this->image ) {
|
||||
@@ -114,7 +116,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
|
||||
$this->update_size( $size[0], $size[1] );
|
||||
$this->mime_type = $size['mime'];
|
||||
|
||||
return true;
|
||||
return $this->set_quality();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -229,8 +231,9 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
|
||||
}
|
||||
|
||||
$image = $this->_resize( $size_data['width'], $size_data['height'], $size_data['crop'] );
|
||||
$duplicate = ( ( $orig_size['width'] == $size_data['width'] ) && ( $orig_size['height'] == $size_data['height'] ) );
|
||||
|
||||
if( ! is_wp_error( $image ) ) {
|
||||
if ( ! is_wp_error( $image ) && ! $duplicate ) {
|
||||
$resized = $this->_save( $image );
|
||||
|
||||
imagedestroy( $image );
|
||||
@@ -253,7 +256,6 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
|
||||
* @since 3.5.0
|
||||
* @access public
|
||||
*
|
||||
* @param string|int $src The source file or Attachment ID.
|
||||
* @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.
|
||||
@@ -305,9 +307,12 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
|
||||
*/
|
||||
public function rotate( $angle ) {
|
||||
if ( function_exists('imagerotate') ) {
|
||||
$rotated = imagerotate( $this->image, $angle, 0 );
|
||||
$transparency = imagecolorallocatealpha( $this->image, 255, 255, 255, 127 );
|
||||
$rotated = imagerotate( $this->image, $angle, $transparency );
|
||||
|
||||
if ( is_resource( $rotated ) ) {
|
||||
imagealphablending( $rotated, true );
|
||||
imagesavealpha( $rotated, true );
|
||||
imagedestroy( $this->image );
|
||||
$this->image = $rotated;
|
||||
$this->update_size();
|
||||
@@ -353,8 +358,8 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
|
||||
* @since 3.5.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $destfilename
|
||||
* @param string $mime_type
|
||||
* @param string|null $filename
|
||||
* @param string|null $mime_type
|
||||
* @return array|WP_Error {'path'=>string, 'file'=>string, 'width'=>int, 'height'=>int, 'mime-type'=>string}
|
||||
*/
|
||||
public function save( $filename = null, $mime_type = null ) {
|
||||
@@ -368,6 +373,12 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
|
||||
return $saved;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param resource $image
|
||||
* @param string|null $filename
|
||||
* @param string|null $mime_type
|
||||
* @return WP_Error|array
|
||||
*/
|
||||
protected function _save( $image, $filename = null, $mime_type = null ) {
|
||||
list( $filename, $extension, $mime_type ) = $this->get_output_format( $filename, $mime_type );
|
||||
|
||||
|
||||
@@ -15,8 +15,10 @@
|
||||
* @uses WP_Image_Editor Extends class
|
||||
*/
|
||||
class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
||||
|
||||
protected $image = null; // Imagick Object
|
||||
/**
|
||||
* @var Imagick
|
||||
*/
|
||||
protected $image; // Imagick Object
|
||||
|
||||
public function __destruct() {
|
||||
if ( $this->image instanceof Imagick ) {
|
||||
@@ -140,10 +142,11 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
||||
}
|
||||
|
||||
$updated_size = $this->update_size();
|
||||
if ( is_wp_error( $updated_size ) )
|
||||
return $updated_size;
|
||||
if ( is_wp_error( $updated_size ) ) {
|
||||
return $updated_size;
|
||||
}
|
||||
|
||||
return true;
|
||||
return $this->set_quality();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -187,6 +190,8 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
||||
*
|
||||
* @param int $width
|
||||
* @param int $height
|
||||
*
|
||||
* @return true|WP_Error
|
||||
*/
|
||||
protected function update_size( $width = null, $height = null ) {
|
||||
$size = null;
|
||||
@@ -296,8 +301,9 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
||||
}
|
||||
|
||||
$resize_result = $this->resize( $size_data['width'], $size_data['height'], $size_data['crop'] );
|
||||
$duplicate = ( ( $orig_size['width'] == $size_data['width'] ) && ( $orig_size['height'] == $size_data['height'] ) );
|
||||
|
||||
if( ! is_wp_error( $resize_result ) ) {
|
||||
if ( ! is_wp_error( $resize_result ) && ! $duplicate ) {
|
||||
$resized = $this->_save( $this->image );
|
||||
|
||||
$this->image->clear();
|
||||
@@ -324,7 +330,6 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
||||
* @since 3.5.0
|
||||
* @access public
|
||||
*
|
||||
* @param string|int $src The source file or Attachment ID.
|
||||
* @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.
|
||||
|
||||
@@ -125,7 +125,6 @@ abstract class WP_Image_Editor {
|
||||
* @access public
|
||||
* @abstract
|
||||
*
|
||||
* @param string|int $src The source file or Attachment ID.
|
||||
* @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.
|
||||
@@ -194,6 +193,7 @@ abstract class WP_Image_Editor {
|
||||
*
|
||||
* @param int $width
|
||||
* @param int $height
|
||||
* @return true
|
||||
*/
|
||||
protected function update_size( $width = null, $height = null ) {
|
||||
$this->size = array(
|
||||
@@ -213,34 +213,7 @@ abstract class WP_Image_Editor {
|
||||
*/
|
||||
public function get_quality() {
|
||||
if ( ! $this->quality ) {
|
||||
/**
|
||||
* Filter the default image compression quality setting.
|
||||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @param int $quality Quality level between 1 (low) and 100 (high).
|
||||
* @param string $mime_type Image mime type.
|
||||
*/
|
||||
$quality = apply_filters( 'wp_editor_set_quality', $this->default_quality, $this->mime_type );
|
||||
|
||||
if ( 'image/jpeg' == $this->mime_type ) {
|
||||
/**
|
||||
* Filter the JPEG compression quality for backward-compatibility.
|
||||
*
|
||||
* 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 ( ! $this->set_quality( $quality ) ) {
|
||||
$this->quality = $this->default_quality;
|
||||
}
|
||||
}
|
||||
$this->set_quality();
|
||||
}
|
||||
|
||||
return $this->quality;
|
||||
@@ -256,8 +229,49 @@ abstract class WP_Image_Editor {
|
||||
* @return boolean|WP_Error True if set successfully; WP_Error on failure.
|
||||
*/
|
||||
public function set_quality( $quality = null ) {
|
||||
if ( null === $quality ) {
|
||||
/**
|
||||
* Filter the default image compression quality setting.
|
||||
*
|
||||
* Applies only during initial editor instantiation, or when set_quality() is run
|
||||
* manually without the `$quality` argument.
|
||||
*
|
||||
* set_quality() has priority over the filter.
|
||||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @param int $quality Quality level between 1 (low) and 100 (high).
|
||||
* @param string $mime_type Image mime type.
|
||||
*/
|
||||
$quality = apply_filters( 'wp_editor_set_quality', $this->default_quality, $this->mime_type );
|
||||
|
||||
if ( 'image/jpeg' == $this->mime_type ) {
|
||||
/**
|
||||
* Filter the JPEG compression quality for backward-compatibility.
|
||||
*
|
||||
* Applies only during initial editor instantiation, or when set_quality() is run
|
||||
* manually without the `$quality` argument.
|
||||
*
|
||||
* set_quality() 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 = $this->default_quality;
|
||||
}
|
||||
}
|
||||
|
||||
// Allow 0, but squash to 1 due to identical images in GD, and for backwards compatibility.
|
||||
if ( $quality == 0 ) {
|
||||
if ( 0 === $quality ) {
|
||||
$quality = 1;
|
||||
}
|
||||
|
||||
@@ -374,7 +388,7 @@ abstract class WP_Image_Editor {
|
||||
* @since 3.5.0
|
||||
* @access public
|
||||
*
|
||||
* @return string suffix
|
||||
* @return false|string suffix
|
||||
*/
|
||||
public function get_suffix() {
|
||||
if ( ! $this->get_size() )
|
||||
|
||||
@@ -44,6 +44,7 @@ final class WP_Theme implements ArrayAccess {
|
||||
'twentytwelve' => 'Twenty Twelve',
|
||||
'twentythirteen' => 'Twenty Thirteen',
|
||||
'twentyfourteen' => 'Twenty Fourteen',
|
||||
'twentyfifteen' => 'Twenty Fifteen',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -273,7 +274,7 @@ final class WP_Theme implements ArrayAccess {
|
||||
// Set the parent, if we're a child theme.
|
||||
if ( $this->template != $this->stylesheet ) {
|
||||
// If we are a parent, then there is a problem. Only two generations allowed! Cancel things out.
|
||||
if ( is_a( $_child, 'WP_Theme' ) && $_child->template == $this->stylesheet ) {
|
||||
if ( $_child instanceof WP_Theme && $_child->template == $this->stylesheet ) {
|
||||
$_child->parent = null;
|
||||
$_child->errors = new WP_Error( 'theme_parent_invalid', sprintf( __( 'The "%s" theme is not a valid parent theme.' ), $_child->template ) );
|
||||
$_child->cache_add( 'theme', array( 'headers' => $_child->headers, 'errors' => $_child->errors, 'stylesheet' => $_child->stylesheet, 'template' => $_child->template ) );
|
||||
@@ -635,6 +636,9 @@ final class WP_Theme implements ArrayAccess {
|
||||
case 'Tags' :
|
||||
$value = array_filter( array_map( 'trim', explode( ',', strip_tags( $value ) ) ) );
|
||||
break;
|
||||
case 'Version' :
|
||||
$value = strip_tags( $value );
|
||||
break;
|
||||
}
|
||||
|
||||
return $value;
|
||||
@@ -854,8 +858,6 @@ final class WP_Theme implements ArrayAccess {
|
||||
* for all other URLs returned by WP_Theme, so we pass it to the public function
|
||||
* get_theme_root_uri() and allow it to run the theme_root_uri filter.
|
||||
*
|
||||
* @uses get_theme_root_uri()
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @access public
|
||||
*
|
||||
@@ -1034,8 +1036,8 @@ final class WP_Theme implements ArrayAccess {
|
||||
* @since 3.4.0
|
||||
* @access public
|
||||
*
|
||||
* @return True if the textdomain was successfully loaded or has already been loaded. False if
|
||||
* no textdomain was specified in the file headers, or if the domain could not be loaded.
|
||||
* @return bool True if the textdomain was successfully loaded or has already been loaded.
|
||||
* False if no textdomain was specified in the file headers, or if the domain could not be loaded.
|
||||
*/
|
||||
public function load_textdomain() {
|
||||
if ( isset( $this->textdomain_loaded ) )
|
||||
|
||||
@@ -25,19 +25,17 @@ class Walker {
|
||||
* DB fields to use.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $db_fields;
|
||||
public $db_fields;
|
||||
|
||||
/**
|
||||
* Max number of pages walked by the paged walker
|
||||
*
|
||||
* @since 2.7.0
|
||||
* @access protected
|
||||
* @var int
|
||||
*/
|
||||
protected $max_pages = 1;
|
||||
public $max_pages = 1;
|
||||
|
||||
/**
|
||||
* Whether the current element has children or not.
|
||||
@@ -45,62 +43,9 @@ class Walker {
|
||||
* To be used in start_el().
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access protected
|
||||
* @var bool
|
||||
*/
|
||||
protected $has_children;
|
||||
|
||||
/**
|
||||
* Make private properties readable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $name Property to get.
|
||||
* @return mixed Property.
|
||||
*/
|
||||
public function __get( $name ) {
|
||||
return $this->$name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make private properties settable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $name Property to set.
|
||||
* @param mixed $value Property value.
|
||||
* @return mixed Newly-set property.
|
||||
*/
|
||||
public function __set( $name, $value ) {
|
||||
return $this->$name = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make private properties checkable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $name Property to check if set.
|
||||
* @return bool Whether the property is set.
|
||||
*/
|
||||
public function __isset( $name ) {
|
||||
return isset( $this->$name );
|
||||
}
|
||||
|
||||
/**
|
||||
* Make private properties un-settable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $name Property to unset.
|
||||
*/
|
||||
public function __unset( $name ) {
|
||||
unset( $this->$name );
|
||||
}
|
||||
public $has_children;
|
||||
|
||||
/**
|
||||
* Starts the list before the elements are added.
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -135,11 +135,11 @@ class WP {
|
||||
$this->query_vars = array();
|
||||
$post_type_query_vars = array();
|
||||
|
||||
if ( is_array($extra_query_vars) )
|
||||
if ( is_array( $extra_query_vars ) ) {
|
||||
$this->extra_query_vars = & $extra_query_vars;
|
||||
else if (! empty($extra_query_vars))
|
||||
parse_str($extra_query_vars, $this->extra_query_vars);
|
||||
|
||||
} elseif ( ! empty( $extra_query_vars ) ) {
|
||||
parse_str( $extra_query_vars, $this->extra_query_vars );
|
||||
}
|
||||
// Process PATH_INFO, REQUEST_URI, and 404 for permalinks.
|
||||
|
||||
// Fetch the rewrite rules.
|
||||
@@ -205,7 +205,7 @@ class WP {
|
||||
preg_match("#^$match#", urldecode($request_match), $matches) ) {
|
||||
|
||||
if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$matches\[([0-9]+)\]/', $query, $varmatch ) ) {
|
||||
// this is a verbose page match, lets check to be sure about it
|
||||
// This is a verbose page match, let's check to be sure about it.
|
||||
if ( ! get_page_by_path( $matches[ $varmatch[1] ] ) )
|
||||
continue;
|
||||
}
|
||||
@@ -357,7 +357,7 @@ class WP {
|
||||
} elseif ( in_array( $status, array( 403, 500, 502, 503 ) ) ) {
|
||||
$exit_required = true;
|
||||
}
|
||||
} else if ( empty($this->query_vars['feed']) ) {
|
||||
} elseif ( empty( $this->query_vars['feed'] ) ) {
|
||||
$headers['Content-Type'] = get_option('html_type') . '; charset=' . get_option('blog_charset');
|
||||
} else {
|
||||
// We're showing a feed, so WP is indeed the only thing that last changed
|
||||
@@ -532,7 +532,6 @@ class WP {
|
||||
/**
|
||||
* Set up the Loop based on the query variables.
|
||||
*
|
||||
* @uses WP::$query_vars
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public function query_posts() {
|
||||
@@ -542,7 +541,7 @@ class WP {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Headers for 404, if nothing is found for requested URL.
|
||||
* Set the Headers for 404, if nothing is found for requested URL.
|
||||
*
|
||||
* Issue a 404 if a request doesn't match any posts and doesn't match
|
||||
* any object (e.g. an existing-but-empty category, tag, author) and a 404 was not already
|
||||
@@ -662,80 +661,13 @@ class WP_MatchesMapRegex {
|
||||
*/
|
||||
public $_pattern = '(\$matches\[[1-9]+[0-9]*\])'; // magic number
|
||||
|
||||
/**
|
||||
* Make private properties readable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $name Property to get.
|
||||
* @return mixed Property.
|
||||
*/
|
||||
public function __get( $name ) {
|
||||
return $this->$name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make private properties settable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $name Property to set.
|
||||
* @param mixed $value Property value.
|
||||
* @return mixed Newly-set property.
|
||||
*/
|
||||
public function __set( $name, $value ) {
|
||||
return $this->$name = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make private properties checkable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $name Property to check if set.
|
||||
* @return bool Whether the property is set.
|
||||
*/
|
||||
public function __isset( $name ) {
|
||||
return isset( $this->$name );
|
||||
}
|
||||
|
||||
/**
|
||||
* Make private properties un-settable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $name Property to unset.
|
||||
*/
|
||||
public function __unset( $name ) {
|
||||
unset( $this->$name );
|
||||
}
|
||||
|
||||
/**
|
||||
* Make private/protected methods readable for backwards compatibility.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
*
|
||||
* @param callable $name Method to call.
|
||||
* @param array $arguments Arguments to pass when calling.
|
||||
* @return mixed|bool Return value of the callback, false otherwise.
|
||||
*/
|
||||
public function __call( $name, $arguments ) {
|
||||
return call_user_func_array( array( $this, $name ), $arguments );
|
||||
}
|
||||
|
||||
/**
|
||||
* constructor
|
||||
*
|
||||
* @param string $subject subject if regex
|
||||
* @param array $matches data to use in map
|
||||
* @return self
|
||||
*/
|
||||
public function WP_MatchesMapRegex($subject, $matches) {
|
||||
public function __construct($subject, $matches) {
|
||||
$this->_subject = $subject;
|
||||
$this->_matches = $matches;
|
||||
$this->output = $this->_map();
|
||||
|
||||
@@ -89,7 +89,7 @@ class WP_Dependencies {
|
||||
* @return array Handles of items that have been processed.
|
||||
*/
|
||||
public function do_items( $handles = false, $group = false ) {
|
||||
/**
|
||||
/*
|
||||
* If nothing is passed, print the queue. If a string is passed,
|
||||
* print that item. If an array is passed, print those items.
|
||||
*/
|
||||
@@ -99,7 +99,7 @@ class WP_Dependencies {
|
||||
foreach( $this->to_do as $key => $handle ) {
|
||||
if ( !in_array($handle, $this->done, true) && isset($this->registered[$handle]) ) {
|
||||
|
||||
/**
|
||||
/*
|
||||
* A single item may alias a set of items, by having dependencies,
|
||||
* but no source. Queuing the item queues the dependencies.
|
||||
*
|
||||
@@ -107,13 +107,13 @@ class WP_Dependencies {
|
||||
* <code>add( 'scriptaculous', false, array( 'scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls' ) );</code>
|
||||
*
|
||||
* The src property is false.
|
||||
**/
|
||||
*/
|
||||
if ( ! $this->registered[$handle]->src ) {
|
||||
$this->done[] = $handle;
|
||||
continue;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Attempt to process the item. If successful,
|
||||
* add the handle to the done array.
|
||||
*
|
||||
|
||||
@@ -47,13 +47,15 @@ class WP_Scripts extends WP_Dependencies {
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints scripts
|
||||
* Prints scripts.
|
||||
*
|
||||
* Prints the scripts passed to it or the print queue. Also prints all necessary dependencies.
|
||||
*
|
||||
* @param mixed $handles (optional) Scripts to be printed. (void) prints queue, (string) prints that script, (array of strings) prints those scripts.
|
||||
* @param int $group (optional) If scripts were queued in groups prints this group number.
|
||||
* @return array Scripts that have been printed
|
||||
* @param mixed $handles Optional. Scripts to be printed. (void) prints queue, (string) prints
|
||||
* that script, (array of strings) prints those scripts. Default false.
|
||||
* @param int $group Optional. If scripts were queued in groups prints this group number.
|
||||
* Default false.
|
||||
* @return array Scripts that have been printed.
|
||||
*/
|
||||
public function print_scripts( $handles = false, $group = false ) {
|
||||
return $this->do_items( $handles, $group );
|
||||
@@ -93,15 +95,25 @@ class WP_Scripts extends WP_Dependencies {
|
||||
if ( false === $group && in_array($handle, $this->in_footer, true) )
|
||||
$this->in_footer = array_diff( $this->in_footer, (array) $handle );
|
||||
|
||||
if ( null === $this->registered[$handle]->ver )
|
||||
$obj = $this->registered[$handle];
|
||||
|
||||
if ( null === $obj->ver ) {
|
||||
$ver = '';
|
||||
else
|
||||
$ver = $this->registered[$handle]->ver ? $this->registered[$handle]->ver : $this->default_version;
|
||||
} else {
|
||||
$ver = $obj->ver ? $obj->ver : $this->default_version;
|
||||
}
|
||||
|
||||
if ( isset($this->args[$handle]) )
|
||||
$ver = $ver ? $ver . '&' . $this->args[$handle] : $this->args[$handle];
|
||||
|
||||
$src = $this->registered[$handle]->src;
|
||||
$src = $obj->src;
|
||||
$cond_before = $cond_after = '';
|
||||
$conditional = isset( $obj->extra['conditional'] ) ? $obj->extra['conditional'] : '';
|
||||
|
||||
if ( $conditional ) {
|
||||
$cond_before = "<!--[if {$conditional}]>\n";
|
||||
$cond_after = "<![endif]-->\n";
|
||||
}
|
||||
|
||||
if ( $this->do_concat ) {
|
||||
/**
|
||||
@@ -113,7 +125,7 @@ class WP_Scripts extends WP_Dependencies {
|
||||
* @param string $handle Script handle.
|
||||
*/
|
||||
$srce = apply_filters( 'script_loader_src', $src, $handle );
|
||||
if ( $this->in_default_dir($srce) ) {
|
||||
if ( $this->in_default_dir( $srce ) && ! $conditional ) {
|
||||
$this->print_code .= $this->print_extra_script( $handle, false );
|
||||
$this->concat .= "$handle,";
|
||||
$this->concat_version .= "$handle$ver";
|
||||
@@ -124,13 +136,24 @@ class WP_Scripts extends WP_Dependencies {
|
||||
}
|
||||
}
|
||||
|
||||
$has_conditional_data = $conditional && $this->get_data( $handle, 'data' );
|
||||
|
||||
if ( $has_conditional_data ) {
|
||||
echo $cond_before;
|
||||
}
|
||||
|
||||
$this->print_extra_script( $handle );
|
||||
if ( !preg_match('|^(https?:)?//|', $src) && ! ( $this->content_url && 0 === strpos($src, $this->content_url) ) ) {
|
||||
|
||||
if ( $has_conditional_data ) {
|
||||
echo $cond_after;
|
||||
}
|
||||
|
||||
if ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $this->content_url && 0 === strpos( $src, $this->content_url ) ) ) {
|
||||
$src = $this->base_url . $src;
|
||||
}
|
||||
|
||||
if ( !empty($ver) )
|
||||
$src = add_query_arg('ver', $ver, $src);
|
||||
if ( ! empty( $ver ) )
|
||||
$src = add_query_arg( 'ver', $ver, $src );
|
||||
|
||||
/** This filter is documented in wp-includes/class.wp-scripts.php */
|
||||
$src = esc_url( apply_filters( 'script_loader_src', $src, $handle ) );
|
||||
@@ -138,10 +161,24 @@ class WP_Scripts extends WP_Dependencies {
|
||||
if ( ! $src )
|
||||
return true;
|
||||
|
||||
if ( $this->do_concat )
|
||||
$this->print_html .= "<script type='text/javascript' src='$src'></script>\n";
|
||||
else
|
||||
echo "<script type='text/javascript' src='$src'></script>\n";
|
||||
$tag = "{$cond_before}<script type='text/javascript' src='$src'></script>\n{$cond_after}";
|
||||
|
||||
/**
|
||||
* Filter the HTML script tag of an enqueued script.
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @param string $tag The `<script>` tag for the enqueued script.
|
||||
* @param string $handle The script's registered handle.
|
||||
* @param string $src The script's source URL.
|
||||
*/
|
||||
$tag = apply_filters( 'script_loader_tag', $tag, $handle, $src );
|
||||
|
||||
if ( $this->do_concat ) {
|
||||
$this->print_html .= $tag;
|
||||
} else {
|
||||
echo $tag;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -167,7 +204,7 @@ class WP_Scripts extends WP_Dependencies {
|
||||
$l10n[$key] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
|
||||
$script = "var $object_name = " . json_encode($l10n) . ';';
|
||||
$script = "var $object_name = " . wp_json_encode( $l10n ) . ';';
|
||||
|
||||
if ( !empty($after) )
|
||||
$script .= "\n$after;";
|
||||
|
||||
@@ -39,6 +39,10 @@ class WP_Styles extends WP_Dependencies {
|
||||
do_action_ref_array( 'wp_default_styles', array(&$this) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $handle
|
||||
* @return bool
|
||||
*/
|
||||
public function do_item( $handle ) {
|
||||
if ( !parent::do_item($handle) )
|
||||
return false;
|
||||
@@ -103,53 +107,77 @@ class WP_Styles extends WP_Dependencies {
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset($obj->extra['conditional']) && $obj->extra['conditional'] ) {
|
||||
$tag = "<!--[if {$obj->extra['conditional']}]>\n" . $tag . "<![endif]-->\n";
|
||||
$conditional_pre = $conditional_post = '';
|
||||
if ( isset( $obj->extra['conditional'] ) && $obj->extra['conditional'] ) {
|
||||
$conditional_pre = "<!--[if {$obj->extra['conditional']}]>\n";
|
||||
$conditional_post = "<![endif]-->\n";
|
||||
}
|
||||
|
||||
if ( $this->do_concat ) {
|
||||
$this->print_html .= $conditional_pre;
|
||||
$this->print_html .= $tag;
|
||||
if ( $inline_style = $this->print_inline_style( $handle, false ) )
|
||||
$this->print_html .= sprintf( "<style type='text/css'>\n%s\n</style>\n", $inline_style );
|
||||
if ( $inline_style = $this->print_inline_style( $handle, false ) ) {
|
||||
$this->print_html .= sprintf( "<style id='%s-inline-css' type='text/css'>\n%s\n</style>\n", esc_attr( $handle ), $inline_style );
|
||||
}
|
||||
$this->print_html .= $conditional_post;
|
||||
} else {
|
||||
echo $conditional_pre;
|
||||
echo $tag;
|
||||
$this->print_inline_style( $handle );
|
||||
echo $conditional_post;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $handle
|
||||
* @param string $code
|
||||
*/
|
||||
public function add_inline_style( $handle, $code ) {
|
||||
if ( !$code )
|
||||
if ( ! $code ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$after = $this->get_data( $handle, 'after' );
|
||||
if ( !$after )
|
||||
if ( ! $after ) {
|
||||
$after = array();
|
||||
}
|
||||
|
||||
$after[] = $code;
|
||||
|
||||
return $this->add_data( $handle, 'after', $after );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $handle
|
||||
* @param bool $echo
|
||||
* @return bool
|
||||
*/
|
||||
public function print_inline_style( $handle, $echo = true ) {
|
||||
$output = $this->get_data( $handle, 'after' );
|
||||
|
||||
if ( empty( $output ) )
|
||||
if ( empty( $output ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$output = implode( "\n", $output );
|
||||
|
||||
if ( !$echo )
|
||||
if ( ! $echo ) {
|
||||
return $output;
|
||||
}
|
||||
|
||||
echo "<style type='text/css'>\n";
|
||||
echo "$output\n";
|
||||
echo "</style>\n";
|
||||
printf( "<style id='%s-inline-css' type='text/css'>\n%s\n</style>\n", esc_attr( $handle ), $output );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $handles
|
||||
* @param bool $recursion
|
||||
* @param mixed $group
|
||||
* @return bool
|
||||
*/
|
||||
public function all_deps( $handles, $recursion = false, $group = false ) {
|
||||
$r = parent::all_deps( $handles, $recursion );
|
||||
if ( !$recursion ) {
|
||||
@@ -165,6 +193,12 @@ class WP_Styles extends WP_Dependencies {
|
||||
return $r;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $src
|
||||
* @param string $ver
|
||||
* @param string $handle
|
||||
* @return string
|
||||
*/
|
||||
public function _css_href( $src, $ver, $handle ) {
|
||||
if ( !is_bool($src) && !preg_match('|^(https?:)?//|', $src) && ! ( $this->content_url && 0 === strpos($src, $this->content_url) ) ) {
|
||||
$src = $this->base_url . $src;
|
||||
@@ -185,6 +219,10 @@ class WP_Styles extends WP_Dependencies {
|
||||
return esc_url( $src );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $src
|
||||
* @return bool
|
||||
*/
|
||||
public function in_default_dir($src) {
|
||||
if ( ! $this->default_dirs )
|
||||
return true;
|
||||
|
||||
@@ -35,10 +35,13 @@ function get_comment_author( $comment_ID = 0 ) {
|
||||
* Filter the returned comment author name.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
|
||||
*
|
||||
* @param string $author The comment author's username.
|
||||
* @param string $author The comment author's username.
|
||||
* @param int $comment_ID The comment ID.
|
||||
* @param object $comment The comment object.
|
||||
*/
|
||||
return apply_filters( 'get_comment_author', $author );
|
||||
return apply_filters( 'get_comment_author', $author, $comment_ID, $comment );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -50,14 +53,17 @@ function get_comment_author( $comment_ID = 0 ) {
|
||||
*/
|
||||
function comment_author( $comment_ID = 0 ) {
|
||||
$author = get_comment_author( $comment_ID );
|
||||
|
||||
/**
|
||||
* Filter the comment author's name for display.
|
||||
*
|
||||
* @since 1.2.0
|
||||
* @since 4.1.0 The `$comment_ID` parameter was added.
|
||||
*
|
||||
* @param string $author The comment author's username.
|
||||
* @param string $author The comment author's username.
|
||||
* @param int $comment_ID The comment ID.
|
||||
*/
|
||||
$author = apply_filters( 'comment_author', $author );
|
||||
$author = apply_filters( 'comment_author', $author, $comment_ID );
|
||||
echo $author;
|
||||
}
|
||||
|
||||
@@ -71,14 +77,18 @@ function comment_author( $comment_ID = 0 ) {
|
||||
*/
|
||||
function get_comment_author_email( $comment_ID = 0 ) {
|
||||
$comment = get_comment( $comment_ID );
|
||||
|
||||
/**
|
||||
* Filter the comment author's returned email address.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
|
||||
*
|
||||
* @param string $comment_author_email The comment author's email address.
|
||||
* @param int $comment_ID The comment ID.
|
||||
* @param object $comment The comment object.
|
||||
*/
|
||||
return apply_filters( 'get_comment_author_email', $comment->comment_author_email );
|
||||
return apply_filters( 'get_comment_author_email', $comment->comment_author_email, $comment_ID, $comment );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -96,14 +106,17 @@ function get_comment_author_email( $comment_ID = 0 ) {
|
||||
*/
|
||||
function comment_author_email( $comment_ID = 0 ) {
|
||||
$author_email = get_comment_author_email( $comment_ID );
|
||||
|
||||
/**
|
||||
* Filter the comment author's email for display.
|
||||
*
|
||||
* @since 1.2.0
|
||||
* @since 4.1.0 The `$comment_ID` parameter was added.
|
||||
*
|
||||
* @param string $author_email The comment author's email address.
|
||||
* @param int $comment_ID The comment ID.
|
||||
*/
|
||||
echo apply_filters( 'author_email', $author_email );
|
||||
echo apply_filters( 'author_email', $author_email, $comment_ID );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -147,17 +160,20 @@ function comment_author_email_link( $linktext = '', $before = '', $after = '' )
|
||||
*/
|
||||
function get_comment_author_email_link( $linktext = '', $before = '', $after = '' ) {
|
||||
global $comment;
|
||||
|
||||
/**
|
||||
* Filter the comment author's email for display.
|
||||
*
|
||||
* Care should be taken to protect the email address and assure that email
|
||||
* harvesters do not capture your commenters' email address.
|
||||
* harvesters do not capture your commenter's email address.
|
||||
*
|
||||
* @since 1.2.0
|
||||
* @since 4.1.0 The `$comment` parameter was added.
|
||||
*
|
||||
* @param string $comment_author_email The comment author's email address.
|
||||
* @param object $comment The comment object.
|
||||
*/
|
||||
$email = apply_filters( 'comment_email', $comment->comment_author_email );
|
||||
$email = apply_filters( 'comment_email', $comment->comment_author_email, $comment );
|
||||
if ((!empty($email)) && ($email != '@')) {
|
||||
$display = ($linktext != '') ? $linktext : $email;
|
||||
$return = $before;
|
||||
@@ -194,11 +210,14 @@ function get_comment_author_link( $comment_ID = 0 ) {
|
||||
* Filter the comment author's link for display.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 4.1.0 The `$author` and `$comment_ID` parameters were added.
|
||||
*
|
||||
* @param string $return The HTML-formatted comment author link.
|
||||
* Empty for an invalid URL.
|
||||
* @param string $return The HTML-formatted comment author link.
|
||||
* Empty for an invalid URL.
|
||||
* @param string $author The comment author's username.
|
||||
* @param int $comment_ID The comment ID.
|
||||
*/
|
||||
return apply_filters( 'get_comment_author_link', $return );
|
||||
return apply_filters( 'get_comment_author_link', $return, $author, $comment_ID );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -231,10 +250,13 @@ function get_comment_author_IP( $comment_ID = 0 ) {
|
||||
* Filter the comment author's returned IP address.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
|
||||
*
|
||||
* @param string $comment_author_IP The comment author's IP address.
|
||||
* @param int $comment_ID The comment ID.
|
||||
* @param object $comment The comment object.
|
||||
*/
|
||||
return apply_filters( 'get_comment_author_IP', $comment->comment_author_IP );
|
||||
return apply_filters( 'get_comment_author_IP', $comment->comment_author_IP, $comment_ID, $comment );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -262,14 +284,18 @@ function get_comment_author_url( $comment_ID = 0 ) {
|
||||
$comment = get_comment( $comment_ID );
|
||||
$url = ('http://' == $comment->comment_author_url) ? '' : $comment->comment_author_url;
|
||||
$url = esc_url( $url, array('http', 'https') );
|
||||
|
||||
/**
|
||||
* Filter the comment author's URL.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
|
||||
*
|
||||
* @param string $url The comment author's URL.
|
||||
* @param string $url The comment author's URL.
|
||||
* @param int $comment_ID The comment ID.
|
||||
* @param object $comment The comment object.
|
||||
*/
|
||||
return apply_filters( 'get_comment_author_url', $url );
|
||||
return apply_filters( 'get_comment_author_url', $url, $comment_ID, $comment );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -282,14 +308,17 @@ function get_comment_author_url( $comment_ID = 0 ) {
|
||||
*/
|
||||
function comment_author_url( $comment_ID = 0 ) {
|
||||
$author_url = get_comment_author_url( $comment_ID );
|
||||
|
||||
/**
|
||||
* Filter the comment author's URL for display.
|
||||
*
|
||||
* @since 1.2.0
|
||||
* @since 4.1.0 The `$comment_ID` parameter was added.
|
||||
*
|
||||
* @param string $author_url The comment author's URL.
|
||||
* @param int $comment_ID The comment ID.
|
||||
*/
|
||||
echo apply_filters( 'comment_url', $author_url );
|
||||
echo apply_filters( 'comment_url', $author_url, $comment_ID );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -317,8 +346,11 @@ function get_comment_author_url_link( $linktext = '', $before = '', $after = ''
|
||||
$display = ($linktext != '') ? $linktext : $url;
|
||||
$display = str_replace( 'http://www.', '', $display );
|
||||
$display = str_replace( 'http://', '', $display );
|
||||
if ( '/' == substr($display, -1) )
|
||||
|
||||
if ( '/' == substr($display, -1) ) {
|
||||
$display = substr($display, 0, -1);
|
||||
}
|
||||
|
||||
$return = "$before<a href='$url' rel='external'>$display</a>$after";
|
||||
|
||||
/**
|
||||
@@ -388,15 +420,15 @@ function get_comment_class( $class = '', $comment_id = null, $post_id = null ) {
|
||||
// Get the comment type (comment, trackback),
|
||||
$classes[] = ( empty( $comment->comment_type ) ) ? 'comment' : $comment->comment_type;
|
||||
|
||||
// If the comment author has an id (registered), then print the log in name
|
||||
if ( $comment->user_id > 0 && $user = get_userdata($comment->user_id) ) {
|
||||
// For all registered users, 'byuser'
|
||||
// Add classes for comment authors that are registered users.
|
||||
if ( $comment->user_id > 0 && $user = get_userdata( $comment->user_id ) ) {
|
||||
$classes[] = 'byuser';
|
||||
$classes[] = 'comment-author-' . sanitize_html_class($user->user_nicename, $comment->user_id);
|
||||
$classes[] = 'comment-author-' . sanitize_html_class( $user->user_nicename, $comment->user_id );
|
||||
// For comment authors who are the author of the post
|
||||
if ( $post = get_post($post_id) ) {
|
||||
if ( $comment->user_id === $post->post_author )
|
||||
if ( $comment->user_id === $post->post_author ) {
|
||||
$classes[] = 'bypostauthor';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -445,9 +477,10 @@ function get_comment_class( $class = '', $comment_id = null, $post_id = null ) {
|
||||
* @param array $classes An array of comment classes.
|
||||
* @param string $class A comma-separated list of additional classes added to the list.
|
||||
* @param int $comment_id The comment id.
|
||||
* @param object $comment The comment
|
||||
* @param int|WP_Post $post_id The post ID or WP_Post object.
|
||||
*/
|
||||
return apply_filters( 'comment_class', $classes, $class, $comment_id, $post_id );
|
||||
return apply_filters( 'comment_class', $classes, $class, $comment_id, $comment, $post_id );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -506,6 +539,7 @@ function get_comment_excerpt( $comment_ID = 0 ) {
|
||||
$comment = get_comment( $comment_ID );
|
||||
$comment_text = strip_tags($comment->comment_content);
|
||||
$blah = explode(' ', $comment_text);
|
||||
|
||||
if (count($blah) > 20) {
|
||||
$k = 20;
|
||||
$use_dotdotdot = 1;
|
||||
@@ -513,6 +547,7 @@ function get_comment_excerpt( $comment_ID = 0 ) {
|
||||
$k = count($blah);
|
||||
$use_dotdotdot = 0;
|
||||
}
|
||||
|
||||
$excerpt = '';
|
||||
for ($i=0; $i<$k; $i++) {
|
||||
$excerpt .= $blah[$i] . ' ';
|
||||
@@ -523,10 +558,13 @@ function get_comment_excerpt( $comment_ID = 0 ) {
|
||||
* Filter the retrieved comment excerpt.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
|
||||
*
|
||||
* @param string $excerpt The comment excerpt text.
|
||||
* @param string $excerpt The comment excerpt text.
|
||||
* @param int $comment_ID The comment ID.
|
||||
* @param object $comment The comment object.
|
||||
*/
|
||||
return apply_filters( 'get_comment_excerpt', $excerpt );
|
||||
return apply_filters( 'get_comment_excerpt', $excerpt, $comment_ID, $comment );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -539,14 +577,17 @@ function get_comment_excerpt( $comment_ID = 0 ) {
|
||||
*/
|
||||
function comment_excerpt( $comment_ID = 0 ) {
|
||||
$comment_excerpt = get_comment_excerpt($comment_ID);
|
||||
|
||||
/**
|
||||
* Filter the comment excerpt for display.
|
||||
*
|
||||
* @since 1.2.0
|
||||
* @since 4.1.0 The `$comment_ID` parameter was added.
|
||||
*
|
||||
* @param string $comment_excerpt The comment excerpt text.
|
||||
* @param int $comment_ID The comment ID.
|
||||
*/
|
||||
echo apply_filters( 'comment_excerpt', $comment_excerpt );
|
||||
echo apply_filters( 'comment_excerpt', $comment_excerpt, $comment_ID );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -558,14 +599,17 @@ function comment_excerpt( $comment_ID = 0 ) {
|
||||
*/
|
||||
function get_comment_ID() {
|
||||
global $comment;
|
||||
|
||||
/**
|
||||
* Filter the returned comment ID.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 4.1.0 The `$comment_ID` parameter was added.
|
||||
*
|
||||
* @param int $comment_ID The current comment ID.
|
||||
* @param int $comment_ID The current comment ID.
|
||||
* @param object $comment The comment object.
|
||||
*/
|
||||
return apply_filters( 'get_comment_ID', $comment->comment_ID );
|
||||
return apply_filters( 'get_comment_ID', $comment->comment_ID, $comment );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -614,7 +658,7 @@ function get_comment_link( $comment = null, $args = array() ) {
|
||||
$args['page'] = ( !empty($in_comment_loop) ) ? get_query_var('cpage') : get_page_of_comment( $comment->comment_ID, $args );
|
||||
|
||||
if ( $wp_rewrite->using_permalinks() )
|
||||
$link = user_trailingslashit( trailingslashit( get_permalink( $comment->comment_post_ID ) ) . 'comment-page-' . $args['page'], 'comment' );
|
||||
$link = user_trailingslashit( trailingslashit( get_permalink( $comment->comment_post_ID ) ) . $wp_rewrite->comments_pagination_base . '-' . $args['page'], 'comment' );
|
||||
else
|
||||
$link = add_query_arg( 'cpage', $args['page'], get_permalink( $comment->comment_post_ID ) );
|
||||
} else {
|
||||
@@ -663,7 +707,7 @@ function get_comments_link( $post_id = 0 ) {
|
||||
* @since 0.71
|
||||
*
|
||||
* @param string $deprecated Not Used.
|
||||
* @param bool $deprecated_2 Not Used.
|
||||
* @param string $deprecated_2 Not Used.
|
||||
*/
|
||||
function comments_link( $deprecated = '', $deprecated_2 = '' ) {
|
||||
if ( !empty( $deprecated ) )
|
||||
@@ -869,10 +913,13 @@ function get_comment_type( $comment_ID = 0 ) {
|
||||
* Filter the returned comment type.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
|
||||
*
|
||||
* @param string $comment_type The type of comment, such as 'comment', 'pingback', or 'trackback'.
|
||||
* @param int $comment_ID The comment ID.
|
||||
* @param object $comment The comment object.
|
||||
*/
|
||||
return apply_filters( 'get_comment_type', $comment->comment_type );
|
||||
return apply_filters( 'get_comment_type', $comment->comment_type, $comment_ID, $comment );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1091,7 +1138,6 @@ function comments_template( $file = '/comments.php', $separate_comments = false
|
||||
|
||||
/*
|
||||
* Comment author information fetched from the comment cookies.
|
||||
* Uuses wp_get_current_commenter().
|
||||
*/
|
||||
$commenter = wp_get_current_commenter();
|
||||
|
||||
@@ -1112,15 +1158,21 @@ function comments_template( $file = '/comments.php', $separate_comments = false
|
||||
*/
|
||||
$comment_author_url = esc_url($commenter['comment_author_url']);
|
||||
|
||||
/** @todo Use API instead of SELECTs. */
|
||||
if ( $user_ID) {
|
||||
$comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND (comment_approved = '1' OR ( user_id = %d AND comment_approved = '0' ) ) ORDER BY comment_date_gmt", $post->ID, $user_ID));
|
||||
} else if ( empty($comment_author) ) {
|
||||
$comments = get_comments( array('post_id' => $post->ID, 'status' => 'approve', 'order' => 'ASC') );
|
||||
} else {
|
||||
$comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND ( comment_approved = '1' OR ( comment_author = %s AND comment_author_email = %s AND comment_approved = '0' ) ) ORDER BY comment_date_gmt", $post->ID, wp_specialchars_decode($comment_author,ENT_QUOTES), $comment_author_email));
|
||||
$comment_args = array(
|
||||
'order' => 'ASC',
|
||||
'orderby' => 'comment_date_gmt',
|
||||
'status' => 'approve',
|
||||
'post_id' => $post->ID,
|
||||
);
|
||||
|
||||
if ( $user_ID ) {
|
||||
$comment_args['include_unapproved'] = array( $user_ID );
|
||||
} elseif ( ! empty( $comment_author_email ) ) {
|
||||
$comment_args['include_unapproved'] = array( $comment_author_email );
|
||||
}
|
||||
|
||||
$comments = get_comments( $comment_args );
|
||||
|
||||
/**
|
||||
* Filter the comments array.
|
||||
*
|
||||
@@ -1222,14 +1274,30 @@ function comments_popup_link( $zero = false, $one = false, $more = false, $css_c
|
||||
global $wpcommentspopupfile, $wpcommentsjavascript;
|
||||
|
||||
$id = get_the_ID();
|
||||
|
||||
if ( false === $zero ) $zero = __( 'No Comments' );
|
||||
if ( false === $one ) $one = __( '1 Comment' );
|
||||
if ( false === $more ) $more = __( '% Comments' );
|
||||
if ( false === $none ) $none = __( 'Comments Off' );
|
||||
|
||||
$title = get_the_title();
|
||||
$number = get_comments_number( $id );
|
||||
|
||||
if ( false === $zero ) {
|
||||
/* translators: %s: post title */
|
||||
$zero = sprintf( __( 'No Comments<span class="screen-reader-text"> on %s</span>' ), $title );
|
||||
}
|
||||
|
||||
if ( false === $one ) {
|
||||
/* translators: %s: post title */
|
||||
$one = sprintf( __( '1 Comment<span class="screen-reader-text"> on %s</span>' ), $title );
|
||||
}
|
||||
|
||||
if ( false === $more ) {
|
||||
/* translators: 1: Number of comments 2: post title */
|
||||
$more = _n( '%1$s Comment<span class="screen-reader-text"> on %2$s</span>', '%1$s Comments<span class="screen-reader-text"> on %2$s</span>', $number );
|
||||
$more = sprintf( $more, number_format_i18n( $number ), $title );
|
||||
}
|
||||
|
||||
if ( false === $none ) {
|
||||
/* translators: %s: post title */
|
||||
$none = sprintf( __( 'Comments Off<span class="screen-reader-text"> on %s</span>' ), $title );
|
||||
}
|
||||
|
||||
if ( 0 == $number && !comments_open() && !pings_open() ) {
|
||||
echo '<span' . ((!empty($css_class)) ? ' class="' . esc_attr( $css_class ) . '"' : '') . '>' . $none . '</span>';
|
||||
return;
|
||||
@@ -1259,7 +1327,6 @@ function comments_popup_link( $zero = false, $one = false, $more = false, $css_c
|
||||
if ( !empty( $css_class ) ) {
|
||||
echo ' class="'.$css_class.'" ';
|
||||
}
|
||||
$title = the_title_attribute( array('echo' => 0 ) );
|
||||
|
||||
$attributes = '';
|
||||
/**
|
||||
@@ -1271,7 +1338,7 @@ function comments_popup_link( $zero = false, $one = false, $more = false, $css_c
|
||||
*/
|
||||
echo apply_filters( 'comments_popup_link_attributes', $attributes );
|
||||
|
||||
echo ' title="' . esc_attr( sprintf( __('Comment on %s'), $title ) ) . '">';
|
||||
echo '>';
|
||||
comments_number( $zero, $one, $more );
|
||||
echo '</a>';
|
||||
}
|
||||
@@ -1300,18 +1367,19 @@ function comments_popup_link( $zero = false, $one = false, $more = false, $css_c
|
||||
* @param int $comment Comment being replied to. Default current comment.
|
||||
* @param int|WP_Post $post Post ID or WP_Post object the comment is going to be displayed on.
|
||||
* Default current post.
|
||||
* @return mixed Link to show comment form, if successful. False, if comments are closed.
|
||||
* @return null|false|string Link to show comment form, if successful. False, if comments are closed.
|
||||
*/
|
||||
function get_comment_reply_link( $args = array(), $comment = null, $post = null ) {
|
||||
|
||||
$defaults = array(
|
||||
'add_below' => 'comment',
|
||||
'respond_id' => 'respond',
|
||||
'reply_text' => __('Reply'),
|
||||
'login_text' => __('Log in to Reply'),
|
||||
'depth' => 0,
|
||||
'before' => '',
|
||||
'after' => ''
|
||||
'add_below' => 'comment',
|
||||
'respond_id' => 'respond',
|
||||
'reply_text' => __( 'Reply' ),
|
||||
'reply_to_text' => __( 'Reply to %s' ),
|
||||
'login_text' => __( 'Log in to Reply' ),
|
||||
'depth' => 0,
|
||||
'before' => '',
|
||||
'after' => ''
|
||||
);
|
||||
|
||||
$args = wp_parse_args( $args, $defaults );
|
||||
@@ -1320,24 +1388,46 @@ function get_comment_reply_link( $args = array(), $comment = null, $post = null
|
||||
return;
|
||||
}
|
||||
|
||||
$add_below = $args['add_below'];
|
||||
$respond_id = $args['respond_id'];
|
||||
$reply_text = $args['reply_text'];
|
||||
|
||||
$comment = get_comment( $comment );
|
||||
|
||||
if ( empty( $post ) ) {
|
||||
$post = $comment->comment_post_ID;
|
||||
}
|
||||
|
||||
$post = get_post( $post );
|
||||
|
||||
if ( ! comments_open( $post->ID ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the comment reply link arguments.
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @param array $args Comment reply link arguments. See {@see get_comment_reply_link()}
|
||||
* for more information on accepted arguments.
|
||||
* @param object $comment The object of the comment being replied to.
|
||||
* @param WP_Post $post The {@see WP_Post} object.
|
||||
*/
|
||||
$args = apply_filters( 'comment_reply_link_args', $args, $comment, $post );
|
||||
|
||||
if ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) {
|
||||
$link = '<a rel="nofollow" class="comment-reply-login" href="' . esc_url( wp_login_url( get_permalink() ) ) . '">' . $args['login_text'] . '</a>';
|
||||
$link = sprintf( '<a rel="nofollow" class="comment-reply-login" href="%s">%s</a>',
|
||||
esc_url( wp_login_url( get_permalink() ) ),
|
||||
$args['login_text']
|
||||
);
|
||||
} else {
|
||||
$link = "<a class='comment-reply-link' href='" . esc_url( add_query_arg( 'replytocom', $comment->comment_ID ) ) . "#" . $respond_id . "' onclick='return addComment.moveForm(\"$add_below-$comment->comment_ID\", \"$comment->comment_ID\", \"$respond_id\", \"$post->ID\")'>$reply_text</a>";
|
||||
$onclick = sprintf( 'return addComment.moveForm( "%1$s-%2$s", "%2$s", "%3$s", "%4$s" )',
|
||||
$args['add_below'], $comment->comment_ID, $args['respond_id'], $post->ID
|
||||
);
|
||||
|
||||
$link = sprintf( "<a class='comment-reply-link' href='%s' onclick='%s' aria-label='%s'>%s</a>",
|
||||
esc_url( add_query_arg( 'replytocom', $comment->comment_ID ) ) . "#" . $args['respond_id'],
|
||||
$onclick,
|
||||
esc_attr( sprintf( $args['reply_to_text'], $comment->comment_author ) ),
|
||||
$args['reply_text']
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Filter the comment reply link.
|
||||
@@ -1390,7 +1480,7 @@ function comment_reply_link($args = array(), $comment = null, $post = null) {
|
||||
* }
|
||||
* @param int|WP_Post $post Optional. Post ID or WP_Post object the comment is going to be displayed on.
|
||||
* Default current post.
|
||||
* @return string|bool|null Link to show comment form, if successful. False, if comments are closed.
|
||||
* @return false|null|string Link to show comment form, if successful. False, if comments are closed.
|
||||
*/
|
||||
function get_post_reply_link($args = array(), $post = null) {
|
||||
$defaults = array(
|
||||
@@ -1403,9 +1493,7 @@ function get_post_reply_link($args = array(), $post = null) {
|
||||
);
|
||||
|
||||
$args = wp_parse_args($args, $defaults);
|
||||
$add_below = $args['add_below'];
|
||||
$respond_id = $args['respond_id'];
|
||||
$reply_text = $args['reply_text'];
|
||||
|
||||
$post = get_post($post);
|
||||
|
||||
if ( ! comments_open( $post->ID ) ) {
|
||||
@@ -1413,9 +1501,20 @@ function get_post_reply_link($args = array(), $post = null) {
|
||||
}
|
||||
|
||||
if ( get_option('comment_registration') && ! is_user_logged_in() ) {
|
||||
$link = '<a rel="nofollow" href="' . wp_login_url( get_permalink() ) . '">' . $args['login_text'] . '</a>';
|
||||
$link = sprintf( '<a rel="nofollow" class="comment-reply-login" href="%s">%s</a>',
|
||||
wp_login_url( get_permalink() ),
|
||||
$args['login_text']
|
||||
);
|
||||
} else {
|
||||
$link = "<a rel='nofollow' class='comment-reply-link' href='" . get_permalink($post->ID) . "#$respond_id' onclick='return addComment.moveForm(\"$add_below-$post->ID\", \"0\", \"$respond_id\", \"$post->ID\")'>$reply_text</a>";
|
||||
$onclick = sprintf( 'return addComment.moveForm( "%1$s-%2$s", "0", "%3$s", "%2$s" )',
|
||||
$args['add_below'], $post->ID, $args['respond_id']
|
||||
);
|
||||
|
||||
$link = sprintf( "<a rel='nofollow' class='comment-reply-link' href='%s' onclick='%s'>%s</a>",
|
||||
get_permalink( $post->ID ) . '#' . $args['respond_id'],
|
||||
$onclick,
|
||||
$args['reply_text']
|
||||
);
|
||||
}
|
||||
$formatted_link = $args['before'] . $link . $args['after'];
|
||||
/**
|
||||
@@ -1525,7 +1624,7 @@ function comment_id_fields( $id = 0 ) {
|
||||
/**
|
||||
* Display text based on comment reply status.
|
||||
*
|
||||
* Only affects users with Javascript disabled.
|
||||
* Only affects users with JavaScript disabled.
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
@@ -1819,9 +1918,16 @@ class Walker_Comment extends Walker {
|
||||
|
||||
<?php comment_text( get_comment_id(), array_merge( $args, array( 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
|
||||
|
||||
<div class="reply">
|
||||
<?php comment_reply_link( array_merge( $args, array( 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
|
||||
</div>
|
||||
<?php
|
||||
comment_reply_link( array_merge( $args, array(
|
||||
'add_below' => $add_below,
|
||||
'depth' => $depth,
|
||||
'max_depth' => $args['max_depth'],
|
||||
'before' => '<div class="reply">',
|
||||
'after' => '</div>'
|
||||
) ) );
|
||||
?>
|
||||
|
||||
<?php if ( 'div' != $args['style'] ) : ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -1869,9 +1975,15 @@ class Walker_Comment extends Walker {
|
||||
<?php comment_text(); ?>
|
||||
</div><!-- .comment-content -->
|
||||
|
||||
<div class="reply">
|
||||
<?php comment_reply_link( array_merge( $args, array( 'add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
|
||||
</div><!-- .reply -->
|
||||
<?php
|
||||
comment_reply_link( array_merge( $args, array(
|
||||
'add_below' => 'div-comment',
|
||||
'depth' => $depth,
|
||||
'max_depth' => $args['max_depth'],
|
||||
'before' => '<div class="reply">',
|
||||
'after' => '</div>'
|
||||
) ) );
|
||||
?>
|
||||
</article><!-- .comment-body -->
|
||||
<?php
|
||||
}
|
||||
@@ -2034,6 +2146,8 @@ function wp_list_comments( $args = array(), $comments = null ) {
|
||||
* in the array of fields.
|
||||
*
|
||||
* @since 3.0.0
|
||||
* @since 4.1.0 Introduced the 'class_submit' argument.
|
||||
* @since 4.2.0 Introduced 'submit_button' and 'submit_fields' arguments.
|
||||
*
|
||||
* @param array $args {
|
||||
* Optional. Default arguments and form fields to override.
|
||||
@@ -2047,19 +2161,25 @@ function wp_list_comments( $args = array(), $comments = null ) {
|
||||
* }
|
||||
* @type string $comment_field The comment textarea field HTML.
|
||||
* @type string $must_log_in HTML element for a 'must be logged in to comment' message.
|
||||
* @type string $logged_in_as HTML element for a 'logged in as <user>' message.
|
||||
* @type string $logged_in_as HTML element for a 'logged in as [user]' message.
|
||||
* @type string $comment_notes_before HTML element for a message displayed before the comment form.
|
||||
* Default 'Your email address will not be published.'.
|
||||
* @type string $comment_notes_after HTML element for a message displayed after the comment form.
|
||||
* Default 'You may use these HTML tags and attributes ...'.
|
||||
* @type string $id_form The comment form element id attribute. Default 'commentform'.
|
||||
* @type string $id_submit The comment submit element id attribute. Default 'submit'.
|
||||
* @type string $class_submit The comment submit element class attribute. Default 'submit'.
|
||||
* @type string $name_submit The comment submit element name attribute. Default 'submit'.
|
||||
* @type string $title_reply The translatable 'reply' button label. Default 'Leave a Reply'.
|
||||
* @type string $title_reply_to The translatable 'reply-to' button label. Default 'Leave a Reply to %s',
|
||||
* where %s is the author of the comment being replied to.
|
||||
* @type string $cancel_reply_link The translatable 'cancel reply' button label. Default 'Cancel reply'.
|
||||
* @type string $label_submit The translatable 'submit' button label. Default 'Post a comment'.
|
||||
* @type string $submit_button HTML format for the Submit button.
|
||||
* Default: '<input name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s" />'.
|
||||
* @type string $submit_field HTML format for the markup surrounding the Submit button and comment hidden
|
||||
* fields. Default: '<p class="form-submit">%1$s %2$s</a>', where %1$s is the
|
||||
* submit button markup and %2$s is the comment hidden fields.
|
||||
* @type string $format The comment form format. Default 'xhtml'. Accepts 'xhtml', 'html5'.
|
||||
* }
|
||||
* @param int|WP_Post $post_id Post ID or WP_Post object to generate the form for. Default current post.
|
||||
@@ -2078,12 +2198,13 @@ function comment_form( $args = array(), $post_id = null ) {
|
||||
|
||||
$req = get_option( 'require_name_email' );
|
||||
$aria_req = ( $req ? " aria-required='true'" : '' );
|
||||
$html_req = ( $req ? " required='required'" : '' );
|
||||
$html5 = 'html5' === $args['format'];
|
||||
$fields = array(
|
||||
'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
|
||||
'<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',
|
||||
'<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . $html_req . ' /></p>',
|
||||
'email' => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
|
||||
'<input id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',
|
||||
'<input id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" aria-describedby="email-notes"' . $aria_req . $html_req . ' /></p>',
|
||||
'url' => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label> ' .
|
||||
'<input id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',
|
||||
);
|
||||
@@ -2100,20 +2221,23 @@ function comment_form( $args = array(), $post_id = null ) {
|
||||
$fields = apply_filters( 'comment_form_default_fields', $fields );
|
||||
$defaults = array(
|
||||
'fields' => $fields,
|
||||
'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label> <textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',
|
||||
'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label> <textarea id="comment" name="comment" cols="45" rows="8" aria-describedby="form-allowed-tags" aria-required="true" required="required"></textarea></p>',
|
||||
/** This filter is documented in wp-includes/link-template.php */
|
||||
'must_log_in' => '<p class="must-log-in">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
|
||||
/** This filter is documented in wp-includes/link-template.php */
|
||||
'logged_in_as' => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>' ), get_edit_user_link(), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
|
||||
'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email address will not be published.' ) . ( $req ? $required_text : '' ) . '</p>',
|
||||
'comment_notes_after' => '<p class="form-allowed-tags">' . sprintf( __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s' ), ' <code>' . allowed_tags() . '</code>' ) . '</p>',
|
||||
'comment_notes_before' => '<p class="comment-notes"><span id="email-notes">' . __( 'Your email address will not be published.' ) . '</span>'. ( $req ? $required_text : '' ) . '</p>',
|
||||
'comment_notes_after' => '<p class="form-allowed-tags" id="form-allowed-tags">' . sprintf( __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s' ), ' <code>' . allowed_tags() . '</code>' ) . '</p>',
|
||||
'id_form' => 'commentform',
|
||||
'id_submit' => 'submit',
|
||||
'class_submit' => 'submit',
|
||||
'name_submit' => 'submit',
|
||||
'title_reply' => __( 'Leave a Reply' ),
|
||||
'title_reply_to' => __( 'Leave a Reply to %s' ),
|
||||
'cancel_reply_link' => __( 'Cancel reply' ),
|
||||
'label_submit' => __( 'Post Comment' ),
|
||||
'submit_button' => '<input name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s" />',
|
||||
'submit_field' => '<p class="form-submit">%1$s %2$s</p>',
|
||||
'format' => 'xhtml',
|
||||
);
|
||||
|
||||
@@ -2128,8 +2252,7 @@ function comment_form( $args = array(), $post_id = null ) {
|
||||
*/
|
||||
$args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) );
|
||||
|
||||
?>
|
||||
<?php if ( comments_open( $post_id ) ) : ?>
|
||||
if ( comments_open( $post_id ) ) : ?>
|
||||
<?php
|
||||
/**
|
||||
* Fires before the comment form.
|
||||
@@ -2154,7 +2277,7 @@ function comment_form( $args = array(), $post_id = null ) {
|
||||
<form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>" class="comment-form"<?php echo $html5 ? ' novalidate' : ''; ?>>
|
||||
<?php
|
||||
/**
|
||||
* Fires at the top of the comment form, inside the <form> tag.
|
||||
* Fires at the top of the comment form, inside the form tag.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@@ -2201,7 +2324,7 @@ function comment_form( $args = array(), $post_id = null ) {
|
||||
/**
|
||||
* Filter a comment form field for display.
|
||||
*
|
||||
* The dynamic portion of the filter hook, $name, refers to the name
|
||||
* The dynamic portion of the filter hook, `$name`, refers to the name
|
||||
* of the comment form field. Such as 'author', 'email', or 'url'.
|
||||
*
|
||||
* @since 3.0.0
|
||||
@@ -2229,11 +2352,45 @@ function comment_form( $args = array(), $post_id = null ) {
|
||||
echo apply_filters( 'comment_form_field_comment', $args['comment_field'] );
|
||||
?>
|
||||
<?php echo $args['comment_notes_after']; ?>
|
||||
<p class="form-submit">
|
||||
<input name="<?php echo esc_attr( $args['name_submit'] ); ?>" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" />
|
||||
<?php comment_id_fields( $post_id ); ?>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
$submit_button = sprintf(
|
||||
$args['submit_button'],
|
||||
esc_attr( $args['name_submit'] ),
|
||||
esc_attr( $args['id_submit'] ),
|
||||
esc_attr( $args['class_submit'] ),
|
||||
esc_attr( $args['label_submit'] )
|
||||
);
|
||||
|
||||
/**
|
||||
* Filter the submit button for the comment form to display.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param string $submit_button HTML markup for the submit button.
|
||||
* @param array $args Arguments passed to `comment_form()`.
|
||||
*/
|
||||
$submit_button = apply_filters( 'comment_form_submit_button', $submit_button, $args );
|
||||
|
||||
$submit_field = sprintf(
|
||||
$args['submit_field'],
|
||||
$submit_button,
|
||||
get_comment_id_fields( $post_id )
|
||||
);
|
||||
|
||||
/**
|
||||
* Filter the submit field for the comment form to display.
|
||||
*
|
||||
* The submit field includes the submit button, hidden fields for the
|
||||
* comment form, and any wrapper markup.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param string $submit_field HTML markup for the submit field.
|
||||
* @param array $args Arguments passed to comment_form().
|
||||
*/
|
||||
echo apply_filters( 'comment_form_submit_field', $submit_field, $args );
|
||||
|
||||
/**
|
||||
* Fires at the bottom of the comment form, inside the closing </form> tag.
|
||||
*
|
||||
|
||||
+672
-167
File diff suppressed because it is too large.
Load diff
+37
-13
@@ -13,25 +13,43 @@ if ( !function_exists('_') ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( !function_exists('mb_substr') ):
|
||||
function mb_substr( $str, $start, $length=null, $encoding=null ) {
|
||||
return _mb_substr($str, $start, $length, $encoding);
|
||||
if ( ! function_exists( 'mb_substr' ) ) :
|
||||
function mb_substr( $str, $start, $length = null, $encoding = null ) {
|
||||
return _mb_substr( $str, $start, $length, $encoding );
|
||||
}
|
||||
endif;
|
||||
|
||||
function _mb_substr( $str, $start, $length=null, $encoding=null ) {
|
||||
// the solution below, works only for utf-8, so in case of a different
|
||||
// charset, just use built-in substr
|
||||
function _mb_substr( $str, $start, $length = null, $encoding = null ) {
|
||||
// The solution below works only for UTF-8,
|
||||
// so in case of a different charset just use built-in substr()
|
||||
$charset = get_option( 'blog_charset' );
|
||||
if ( !in_array( $charset, array('utf8', 'utf-8', 'UTF8', 'UTF-8') ) ) {
|
||||
return is_null( $length )? substr( $str, $start ) : substr( $str, $start, $length);
|
||||
if ( ! in_array( $charset, array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) ) {
|
||||
return is_null( $length ) ? substr( $str, $start ) : substr( $str, $start, $length );
|
||||
}
|
||||
// use the regex unicode support to separate the UTF-8 characters into an array
|
||||
// Use the regex unicode support to separate the UTF-8 characters into an array
|
||||
preg_match_all( '/./us', $str, $match );
|
||||
$chars = is_null( $length )? array_slice( $match[0], $start ) : array_slice( $match[0], $start, $length );
|
||||
$chars = is_null( $length ) ? array_slice( $match[0], $start ) : array_slice( $match[0], $start, $length );
|
||||
return implode( '', $chars );
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'mb_strlen' ) ) :
|
||||
function mb_strlen( $str, $encoding = null ) {
|
||||
return _mb_strlen( $str, $encoding );
|
||||
}
|
||||
endif;
|
||||
|
||||
function _mb_strlen( $str, $encoding = null ) {
|
||||
// The solution below works only for UTF-8,
|
||||
// so in case of a different charset just use built-in strlen()
|
||||
$charset = get_option( 'blog_charset' );
|
||||
if ( ! in_array( $charset, array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) ) {
|
||||
return strlen( $str );
|
||||
}
|
||||
// Use the regex unicode support to separate the UTF-8 characters into an array
|
||||
preg_match_all( '/./us', $str, $match );
|
||||
return count( $match[0] );
|
||||
}
|
||||
|
||||
if ( !function_exists('hash_hmac') ):
|
||||
function hash_hmac($algo, $data, $key, $raw_output = false) {
|
||||
return _hash_hmac($algo, $data, $key, $raw_output);
|
||||
@@ -65,7 +83,7 @@ if ( !function_exists('json_encode') ) {
|
||||
function json_encode( $string ) {
|
||||
global $wp_json;
|
||||
|
||||
if ( !is_a($wp_json, 'Services_JSON') ) {
|
||||
if ( ! ( $wp_json instanceof Services_JSON ) ) {
|
||||
require_once( ABSPATH . WPINC . '/class-json.php' );
|
||||
$wp_json = new Services_JSON();
|
||||
}
|
||||
@@ -78,7 +96,7 @@ if ( !function_exists('json_decode') ) {
|
||||
function json_decode( $string, $assoc_array = false ) {
|
||||
global $wp_json;
|
||||
|
||||
if ( !is_a($wp_json, 'Services_JSON') ) {
|
||||
if ( ! ($wp_json instanceof Services_JSON ) ) {
|
||||
require_once( ABSPATH . WPINC . '/class-json.php' );
|
||||
$wp_json = new Services_JSON();
|
||||
}
|
||||
@@ -122,4 +140,10 @@ function hash_equals( $a, $b ) {
|
||||
|
||||
return $result === 0;
|
||||
}
|
||||
endif;
|
||||
endif;
|
||||
|
||||
// JSON_PRETTY_PRINT was introduced in PHP 5.4
|
||||
// Defined here to prevent a notice when using it with wp_json_encode()
|
||||
if ( ! defined( 'JSON_PRETTY_PRINT' ) ) {
|
||||
define( 'JSON_PRETTY_PRINT', 128 );
|
||||
}
|
||||
+17
-15
@@ -13,17 +13,18 @@
|
||||
* WordPress site, if the schedule time has passed.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @link http://codex.wordpress.org/Function_Reference/wp_schedule_single_event
|
||||
* @link https://codex.wordpress.org/Function_Reference/wp_schedule_single_event
|
||||
*
|
||||
* @param int $timestamp Timestamp for when to run the event.
|
||||
* @param string $hook Action hook to execute when cron is run.
|
||||
* @param array $args Optional. Arguments to pass to the hook's callback function.
|
||||
*/
|
||||
function wp_schedule_single_event( $timestamp, $hook, $args = array()) {
|
||||
// don't schedule a duplicate if there's already an identical event due in the next 10 minutes
|
||||
// don't schedule a duplicate if there's already an identical event due within 10 minutes of it
|
||||
$next = wp_next_scheduled($hook, $args);
|
||||
if ( $next && $next <= $timestamp + 10 * MINUTE_IN_SECONDS )
|
||||
if ( $next && abs( $next - $timestamp ) <= 10 * MINUTE_IN_SECONDS ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$crons = _get_cron_array();
|
||||
$event = (object) array( 'hook' => $hook, 'timestamp' => $timestamp, 'schedule' => false, 'args' => $args );
|
||||
@@ -65,7 +66,7 @@ function wp_schedule_single_event( $timestamp, $hook, $args = array()) {
|
||||
* @param string $recurrence How often the event should recur.
|
||||
* @param string $hook Action hook to execute when cron is run.
|
||||
* @param array $args Optional. Arguments to pass to the hook's callback function.
|
||||
* @return bool|null False on failure, null when complete with scheduling event.
|
||||
* @return false|null False on failure, null when complete with scheduling event.
|
||||
*/
|
||||
function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array()) {
|
||||
$crons = _get_cron_array();
|
||||
@@ -98,7 +99,7 @@ function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array()) {
|
||||
* @param string $recurrence How often the event should recur.
|
||||
* @param string $hook Action hook to execute when cron is run.
|
||||
* @param array $args Optional. Arguments to pass to the hook's callback function.
|
||||
* @return bool|null False on failure. Null when event is rescheduled.
|
||||
* @return false|null False on failure. Null when event is rescheduled.
|
||||
*/
|
||||
function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array() ) {
|
||||
$crons = _get_cron_array();
|
||||
@@ -245,9 +246,10 @@ function spawn_cron( $gmt_time = 0 ) {
|
||||
if ( isset($keys[0]) && $keys[0] > $gmt_time )
|
||||
return;
|
||||
|
||||
if ( defined('ALTERNATE_WP_CRON') && ALTERNATE_WP_CRON ) {
|
||||
if ( !empty($_POST) || defined('DOING_AJAX') )
|
||||
if ( defined( 'ALTERNATE_WP_CRON' ) && ALTERNATE_WP_CRON ) {
|
||||
if ( ! empty( $_POST ) || defined( 'DOING_AJAX' ) || defined( 'XMLRPC_REQUEST' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$doing_wp_cron = sprintf( '%.22F', $gmt_time );
|
||||
set_transient( 'doing_cron', $doing_wp_cron );
|
||||
@@ -347,17 +349,17 @@ function wp_cron() {
|
||||
* 60*60*24*7 or 604800. The value of 'interval' would then be 604800.
|
||||
*
|
||||
* The 'display' is the description. For the 'weekly' key, the 'display' would
|
||||
* be <code>__('Once Weekly')</code>.
|
||||
* be `__( 'Once Weekly' )`.
|
||||
*
|
||||
* For your plugin, you will be passed an array. you can easily add your
|
||||
* schedule by doing the following.
|
||||
* <code>
|
||||
* // filter parameter variable name is 'array'
|
||||
* $array['weekly'] = array(
|
||||
* 'interval' => 604800,
|
||||
* 'display' => __('Once Weekly')
|
||||
* );
|
||||
* </code>
|
||||
*
|
||||
* // Filter parameter variable name is 'array'.
|
||||
* $array['weekly'] = array(
|
||||
* 'interval' => 604800,
|
||||
* 'display' => __( 'Once Weekly' )
|
||||
* );
|
||||
*
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
-webkit-transition: none;
|
||||
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 * {
|
||||
@@ -81,7 +82,7 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
width: 100%;
|
||||
min-width: 600px; /* match the min-width of the body in wp-admin.css */
|
||||
z-index: 99999;
|
||||
background: #222;
|
||||
background: #23282d;
|
||||
}
|
||||
|
||||
#wpadminbar .ab-sub-wrapper,
|
||||
@@ -136,7 +137,7 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
padding: 0;
|
||||
-webkit-box-shadow: 0 3px 5px rgba(0,0,0,0.2);
|
||||
box-shadow: 0 3px 5px rgba(0,0,0,0.2);
|
||||
background: #333;
|
||||
background: #32373c;
|
||||
display: none;
|
||||
position: absolute;
|
||||
float: none;
|
||||
@@ -210,14 +211,14 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
#wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus,
|
||||
#wpadminbar .ab-top-menu > li:hover > .ab-item,
|
||||
#wpadminbar .ab-top-menu > li.hover > .ab-item {
|
||||
background: #333;
|
||||
color: #2ea2cc;
|
||||
background: #32373c;
|
||||
color: #00b9eb;
|
||||
}
|
||||
|
||||
#wpadminbar > #wp-toolbar li:hover span.ab-label,
|
||||
#wpadminbar > #wp-toolbar li.hover span.ab-label,
|
||||
#wpadminbar > #wp-toolbar a:focus span.ab-label {
|
||||
color: #2ea2cc;
|
||||
color: #00b9eb;
|
||||
}
|
||||
|
||||
#wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon,
|
||||
@@ -237,7 +238,8 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
#wpadminbar .ab-icon:before,
|
||||
#wpadminbar .ab-item:before,
|
||||
#wpadminbar #adminbarsearch:before {
|
||||
color: #999;
|
||||
color: #a0a5aa;
|
||||
color: rgba(240,245,250,0.6);
|
||||
}
|
||||
|
||||
#wpadminbar .ab-icon:before,
|
||||
@@ -254,14 +256,16 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
}
|
||||
|
||||
#wpadminbar .ab-submenu .ab-item {
|
||||
color: #eee;
|
||||
color: #b4b9be;
|
||||
color: rgba(240,245,250,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: #eee;
|
||||
color: #b4b9be;
|
||||
color: rgba(240,245,250,0.7);
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks .menupop ul li a:hover,
|
||||
@@ -278,8 +282,9 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before {
|
||||
color: #2ea2cc;
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
#wpadminbar li #adminbarsearch.adminbar-focused:before {
|
||||
color: #00b9eb;
|
||||
}
|
||||
|
||||
#wpadminbar .menupop .menupop > .ab-item:before,
|
||||
@@ -325,17 +330,17 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
|
||||
#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,
|
||||
#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu {
|
||||
background: #4b4b4b;
|
||||
background: #464b50;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks .menupop .ab-sub-secondary > li > a:hover,
|
||||
#wpadminbar .quicklinks .menupop .ab-sub-secondary > li .ab-item:focus a {
|
||||
color: #2ea2cc;
|
||||
color: #00b9eb;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks a span#ab-updates {
|
||||
background: #eee;
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
display: inline;
|
||||
padding: 2px 5px;
|
||||
font-size: 10px;
|
||||
@@ -383,6 +388,10 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
min-width: 270px;
|
||||
}
|
||||
|
||||
#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar .ab-item {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#wpadminbar #wp-admin-bar-user-actions > li {
|
||||
margin-right: 16px;
|
||||
margin-left: 16px;
|
||||
@@ -432,11 +441,11 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img {
|
||||
width: 16px;
|
||||
#wpadminbar #wp-admin-bar-my-account.with-avatar > a img {
|
||||
width: auto;
|
||||
height: 16px;
|
||||
padding: 0;
|
||||
border: 1px solid #888;
|
||||
border: 1px solid #82878c;
|
||||
background: #eee;
|
||||
line-height: 24px;
|
||||
vertical-align: middle;
|
||||
@@ -445,6 +454,10 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar > a img {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* WP Logo
|
||||
*/
|
||||
@@ -477,7 +490,7 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks li a:hover .blavatar {
|
||||
color: #2ea2cc;
|
||||
color: #00b9eb;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks li .blavatar:before {
|
||||
@@ -548,6 +561,10 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
/**
|
||||
* Search
|
||||
*/
|
||||
#wpadminbar.ie8 #wp-admin-bar-search {
|
||||
display: block;
|
||||
min-width: 32px;
|
||||
}
|
||||
#wpadminbar #wp-admin-bar-search .ab-item {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
@@ -557,6 +574,7 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
position: relative;
|
||||
height: 32px;
|
||||
padding: 0 2px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#wpadminbar #adminbarsearch:before {
|
||||
@@ -577,6 +595,7 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
font: 13px/24px "Open Sans", sans-serif;
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
max-width: none;
|
||||
padding: 0 24px 0 3px;
|
||||
margin: 0;
|
||||
color: #ccc;
|
||||
@@ -612,12 +631,18 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
}
|
||||
|
||||
#wpadminbar.ie8 > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input {
|
||||
margin-top: 4px;
|
||||
background-color: #464646;
|
||||
/* IE8 z-index bug with transparent / empty elements - fill in with an encoded transparent GIF */
|
||||
background: transparent 100% 0 repeat scroll url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
|
||||
}
|
||||
|
||||
/* IE8 doesn't redraw the pseudo elements unless you make a change to the content */
|
||||
#wpadminbar.ie8 #adminbarsearch.adminbar-focused:before {
|
||||
content: '\f179 '; /* extra space */
|
||||
}
|
||||
|
||||
#wpadminbar.ie8 > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus {
|
||||
background-color: #fff;
|
||||
background: #fff;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder {
|
||||
@@ -642,8 +667,10 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
*/
|
||||
.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;
|
||||
@@ -744,8 +771,6 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
@media screen and ( max-width: 782px ) {
|
||||
/* Toolbar Touchification*/
|
||||
html #wpadminbar {
|
||||
right: 0 !important;
|
||||
z-index: 500 !important;
|
||||
height: 46px;
|
||||
min-width: 300px;
|
||||
|
||||
@@ -1054,7 +1079,6 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
}
|
||||
|
||||
#wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
#wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-shadow:none;text-transform:none;letter-spacing:normal;font:400 13px/32px "Open Sans",sans-serif;-webkit-border-radius:0;border-radius:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-transition:none;transition:none;-webkit-font-smoothing:subpixel-antialiased}.rtl #wpadminbar *{font-family:Tahoma,sans-serif}html:lang(he-il) .rtl #wpadminbar *{font-family:Arial,sans-serif}#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#eee}#wpadminbar #wp-admin-bar-my-sites a.ab-item,#wpadminbar #wp-admin-bar-site-name a.ab-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#wpadminbar ul li:after,#wpadminbar ul li:before{content:normal}#wpadminbar a,#wpadminbar a img,#wpadminbar a img:hover,#wpadminbar a:hover{outline:0;border:none;text-decoration:none;background:0 0}#wpadminbar a:active,#wpadminbar a:focus,#wpadminbar div,#wpadminbar input[type=email],#wpadminbar input[type=number],#wpadminbar input[type=password],#wpadminbar input[type=search],#wpadminbar input[type=text],#wpadminbar input[type=url],#wpadminbar select,#wpadminbar textarea{-webkit-box-shadow:none;box-shadow:none;outline:0}#wpadminbar{direction:rtl;color:#ccc;font:400 13px/32px "Open Sans",sans-serif;height:32px;position:fixed;top:0;right:0;width:100%;min-width:600px;z-index:99999;background:#222}#wpadminbar .ab-sub-wrapper,#wpadminbar ul,#wpadminbar ul li{background:0 0;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:0}#wpadminbar .quicklinks .ab-top-secondary>li{float:left}#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .quicklinks a,#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;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2);background:#333;display:none;position:absolute;float:none}#wpadminbar.ie7 .menupop .ab-sub-wrapper,#wpadminbar.ie7 .shortlink-input{top:32px;right:0}#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:700}#wpadminbar .quicklinks .menupop ul li .ab-item,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li .ab-item,#wpadminbar .shortlink-input,#wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item{line-height:26px;height:26px;white-space:nowrap;min-width:140px}#wpadminbar .shortlink-input{width:200px}#wpadminbar li.hover>.ab-sub-wrapper,#wpadminbar.nojs li:hover>.ab-sub-wrapper{display:block}#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 .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{background:#333;color:#2ea2cc}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#2ea2cc}#wpadminbar .ab-icon,#wpadminbar .ab-item:before,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon{position:relative;float:right;font:400 20px/1 dashicons;speak:none;padding:4px 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-image:none!important;margin-left:6px}#wpadminbar #adminbarsearch:before,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:before{color:#999;position:relative;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#wpadminbar .ab-label{display:inline-block;height:32px}#wpadminbar .ab-submenu .ab-item,#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:#eee}#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:bLine truncated
|
||||
#wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-shadow:none;text-transform:none;letter-spacing:normal;font:400 13px/32px "Open Sans",sans-serif;-webkit-border-radius:0;border-radius:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-transition:none;transition:none;-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto}.rtl #wpadminbar *{font-family:Tahoma,sans-serif}html:lang(he-il) .rtl #wpadminbar *{font-family:Arial,sans-serif}#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#eee}#wpadminbar #wp-admin-bar-my-sites a.ab-item,#wpadminbar #wp-admin-bar-site-name a.ab-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#wpadminbar ul li:after,#wpadminbar ul li:before{content:normal}#wpadminbar a,#wpadminbar a img,#wpadminbar a img:hover,#wpadminbar a:hover{outline:0;border:none;text-decoration:none;background:0 0}#wpadminbar a:active,#wpadminbar a:focus,#wpadminbar div,#wpadminbar input[type=email],#wpadminbar input[type=number],#wpadminbar input[type=password],#wpadminbar input[type=search],#wpadminbar input[type=text],#wpadminbar input[type=url],#wpadminbar select,#wpadminbar textarea{-webkit-box-shadow:none;box-shadow:none;outline:0}#wpadminbar{direction:rtl;color:#ccc;font:400 13px/32px "Open Sans",sans-serif;height:32px;position:fixed;top:0;right:0;width:100%;min-width:600px;z-index:99999;background:#23282d}#wpadminbar .ab-sub-wrapper,#wpadminbar ul,#wpadminbar ul li{background:0 0;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:0}#wpadminbar .quicklinks .ab-top-secondary>li{float:left}#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .quicklinks a,#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;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2);background:#32373c;display:none;position:absolute;float:none}#wpadminbar.ie7 .menupop .ab-sub-wrapper,#wpadminbar.ie7 .shortlink-input{top:32px;right:0}#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:700}#wpadminbar .quicklinks .menupop ul li .ab-item,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li .ab-item,#wpadminbar .shortlink-input,#wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item{line-height:26px;height:26px;white-space:nowrap;min-width:140px}#wpadminbar .shortlink-input{width:200px}#wpadminbar li.hover>.ab-sub-wrapper,#wpadminbar.nojs li:hover>.ab-sub-wrapper{display:block}#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 .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{background:#32373c;color:#00b9eb}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#00b9eb}#wpadminbar .ab-icon,#wpadminbar .ab-item:before,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon{position:relative;float:right;font:400 20px/1 dashicons;speak:none;padding:4px 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-image:none!important;margin-left:6px}#wpadminbar #adminbarsearch:before,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:before{color:#a0a5aa;color:rgba(240,245,250,.6);position:relative;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#wpadminbar .ab-label{display:inline-block;height:32px}#wpadminbar .ab-submenu .ab-item,#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:#b4b9be;color:rgba(240,245,250,.7)}#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbLine truncated
|
||||
@@ -16,6 +16,7 @@
|
||||
-webkit-transition: none;
|
||||
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 * {
|
||||
@@ -81,7 +82,7 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
width: 100%;
|
||||
min-width: 600px; /* match the min-width of the body in wp-admin.css */
|
||||
z-index: 99999;
|
||||
background: #222;
|
||||
background: #23282d;
|
||||
}
|
||||
|
||||
#wpadminbar .ab-sub-wrapper,
|
||||
@@ -136,7 +137,7 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
padding: 0;
|
||||
-webkit-box-shadow: 0 3px 5px rgba(0,0,0,0.2);
|
||||
box-shadow: 0 3px 5px rgba(0,0,0,0.2);
|
||||
background: #333;
|
||||
background: #32373c;
|
||||
display: none;
|
||||
position: absolute;
|
||||
float: none;
|
||||
@@ -210,14 +211,14 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
#wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus,
|
||||
#wpadminbar .ab-top-menu > li:hover > .ab-item,
|
||||
#wpadminbar .ab-top-menu > li.hover > .ab-item {
|
||||
background: #333;
|
||||
color: #2ea2cc;
|
||||
background: #32373c;
|
||||
color: #00b9eb;
|
||||
}
|
||||
|
||||
#wpadminbar > #wp-toolbar li:hover span.ab-label,
|
||||
#wpadminbar > #wp-toolbar li.hover span.ab-label,
|
||||
#wpadminbar > #wp-toolbar a:focus span.ab-label {
|
||||
color: #2ea2cc;
|
||||
color: #00b9eb;
|
||||
}
|
||||
|
||||
#wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon,
|
||||
@@ -237,7 +238,8 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
#wpadminbar .ab-icon:before,
|
||||
#wpadminbar .ab-item:before,
|
||||
#wpadminbar #adminbarsearch:before {
|
||||
color: #999;
|
||||
color: #a0a5aa;
|
||||
color: rgba(240,245,250,0.6);
|
||||
}
|
||||
|
||||
#wpadminbar .ab-icon:before,
|
||||
@@ -254,14 +256,16 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
}
|
||||
|
||||
#wpadminbar .ab-submenu .ab-item {
|
||||
color: #eee;
|
||||
color: #b4b9be;
|
||||
color: rgba(240,245,250,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: #eee;
|
||||
color: #b4b9be;
|
||||
color: rgba(240,245,250,0.7);
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks .menupop ul li a:hover,
|
||||
@@ -278,8 +282,9 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
#wpadminbar li .ab-item:focus:before,
|
||||
#wpadminbar li.hover .ab-icon:before,
|
||||
#wpadminbar li.hover .ab-item:before,
|
||||
#wpadminbar li:hover #adminbarsearch:before {
|
||||
color: #2ea2cc;
|
||||
#wpadminbar li:hover #adminbarsearch:before,
|
||||
#wpadminbar li #adminbarsearch.adminbar-focused:before {
|
||||
color: #00b9eb;
|
||||
}
|
||||
|
||||
#wpadminbar .menupop .menupop > .ab-item:before,
|
||||
@@ -325,17 +330,17 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
|
||||
#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,
|
||||
#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu {
|
||||
background: #4b4b4b;
|
||||
background: #464b50;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks .menupop .ab-sub-secondary > li > a:hover,
|
||||
#wpadminbar .quicklinks .menupop .ab-sub-secondary > li .ab-item:focus a {
|
||||
color: #2ea2cc;
|
||||
color: #00b9eb;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks a span#ab-updates {
|
||||
background: #eee;
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
display: inline;
|
||||
padding: 2px 5px;
|
||||
font-size: 10px;
|
||||
@@ -383,6 +388,10 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
min-width: 270px;
|
||||
}
|
||||
|
||||
#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar .ab-item {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#wpadminbar #wp-admin-bar-user-actions > li {
|
||||
margin-left: 16px;
|
||||
margin-right: 16px;
|
||||
@@ -432,11 +441,11 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img {
|
||||
width: 16px;
|
||||
#wpadminbar #wp-admin-bar-my-account.with-avatar > a img {
|
||||
width: auto;
|
||||
height: 16px;
|
||||
padding: 0;
|
||||
border: 1px solid #888;
|
||||
border: 1px solid #82878c;
|
||||
background: #eee;
|
||||
line-height: 24px;
|
||||
vertical-align: middle;
|
||||
@@ -445,6 +454,10 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar > a img {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* WP Logo
|
||||
*/
|
||||
@@ -477,7 +490,7 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks li a:hover .blavatar {
|
||||
color: #2ea2cc;
|
||||
color: #00b9eb;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks li .blavatar:before {
|
||||
@@ -548,6 +561,10 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
/**
|
||||
* Search
|
||||
*/
|
||||
#wpadminbar.ie8 #wp-admin-bar-search {
|
||||
display: block;
|
||||
min-width: 32px;
|
||||
}
|
||||
#wpadminbar #wp-admin-bar-search .ab-item {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
@@ -557,6 +574,7 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
position: relative;
|
||||
height: 32px;
|
||||
padding: 0 2px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#wpadminbar #adminbarsearch:before {
|
||||
@@ -577,6 +595,7 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
font: 13px/24px "Open Sans", sans-serif;
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
max-width: none;
|
||||
padding: 0 3px 0 24px;
|
||||
margin: 0;
|
||||
color: #ccc;
|
||||
@@ -612,12 +631,18 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
}
|
||||
|
||||
#wpadminbar.ie8 > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input {
|
||||
margin-top: 4px;
|
||||
background-color: #464646;
|
||||
/* IE8 z-index bug with transparent / empty elements - fill in with an encoded transparent GIF */
|
||||
background: transparent 0 0 repeat scroll url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
|
||||
}
|
||||
|
||||
/* IE8 doesn't redraw the pseudo elements unless you make a change to the content */
|
||||
#wpadminbar.ie8 #adminbarsearch.adminbar-focused:before {
|
||||
content: '\f179 '; /* extra space */
|
||||
}
|
||||
|
||||
#wpadminbar.ie8 > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus {
|
||||
background-color: #fff;
|
||||
background: #fff;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder {
|
||||
@@ -642,8 +667,10 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
*/
|
||||
.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;
|
||||
@@ -744,8 +771,6 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
@media screen and ( max-width: 782px ) {
|
||||
/* Toolbar Touchification*/
|
||||
html #wpadminbar {
|
||||
left: 0 !important;
|
||||
z-index: 500 !important;
|
||||
height: 46px;
|
||||
min-width: 300px;
|
||||
|
||||
@@ -1054,7 +1079,6 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
}
|
||||
|
||||
#wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
#wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-shadow:none;text-transform:none;letter-spacing:normal;font:400 13px/32px "Open Sans",sans-serif;-webkit-border-radius:0;border-radius:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-transition:none;transition:none;-webkit-font-smoothing:subpixel-antialiased}.rtl #wpadminbar *{font-family:Tahoma,sans-serif}html:lang(he-il) .rtl #wpadminbar *{font-family:Arial,sans-serif}#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#eee}#wpadminbar #wp-admin-bar-my-sites a.ab-item,#wpadminbar #wp-admin-bar-site-name a.ab-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#wpadminbar ul li:after,#wpadminbar ul li:before{content:normal}#wpadminbar a,#wpadminbar a img,#wpadminbar a img:hover,#wpadminbar a:hover{outline:0;border:none;text-decoration:none;background:0 0}#wpadminbar a:active,#wpadminbar a:focus,#wpadminbar div,#wpadminbar input[type=email],#wpadminbar input[type=number],#wpadminbar input[type=password],#wpadminbar input[type=search],#wpadminbar input[type=text],#wpadminbar input[type=url],#wpadminbar select,#wpadminbar textarea{-webkit-box-shadow:none;box-shadow:none;outline:0}#wpadminbar{direction:ltr;color:#ccc;font:400 13px/32px "Open Sans",sans-serif;height:32px;position:fixed;top:0;left:0;width:100%;min-width:600px;z-index:99999;background:#222}#wpadminbar .ab-sub-wrapper,#wpadminbar ul,#wpadminbar ul li{background:0 0;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:0}#wpadminbar .quicklinks .ab-top-secondary>li{float:right}#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .quicklinks a,#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;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2);background:#333;display:none;position:absolute;float:none}#wpadminbar.ie7 .menupop .ab-sub-wrapper,#wpadminbar.ie7 .shortlink-input{top:32px;left:0}#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:700}#wpadminbar .quicklinks .menupop ul li .ab-item,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li .ab-item,#wpadminbar .shortlink-input,#wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item{line-height:26px;height:26px;white-space:nowrap;min-width:140px}#wpadminbar .shortlink-input{width:200px}#wpadminbar li.hover>.ab-sub-wrapper,#wpadminbar.nojs li:hover>.ab-sub-wrapper{display:block}#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 .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{background:#333;color:#2ea2cc}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#2ea2cc}#wpadminbar .ab-icon,#wpadminbar .ab-item:before,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon{position:relative;float:left;font:400 20px/1 dashicons;speak:none;padding:4px 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-image:none!important;margin-right:6px}#wpadminbar #adminbarsearch:before,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:before{color:#999;position:relative;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#wpadminbar .ab-label{display:inline-block;height:32px}#wpadminbar .ab-submenu .ab-item,#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:#eee}#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:beforLine truncated
|
||||
#wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-shadow:none;text-transform:none;letter-spacing:normal;font:400 13px/32px "Open Sans",sans-serif;-webkit-border-radius:0;border-radius:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-transition:none;transition:none;-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto}.rtl #wpadminbar *{font-family:Tahoma,sans-serif}html:lang(he-il) .rtl #wpadminbar *{font-family:Arial,sans-serif}#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#eee}#wpadminbar #wp-admin-bar-my-sites a.ab-item,#wpadminbar #wp-admin-bar-site-name a.ab-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#wpadminbar ul li:after,#wpadminbar ul li:before{content:normal}#wpadminbar a,#wpadminbar a img,#wpadminbar a img:hover,#wpadminbar a:hover{outline:0;border:none;text-decoration:none;background:0 0}#wpadminbar a:active,#wpadminbar a:focus,#wpadminbar div,#wpadminbar input[type=email],#wpadminbar input[type=number],#wpadminbar input[type=password],#wpadminbar input[type=search],#wpadminbar input[type=text],#wpadminbar input[type=url],#wpadminbar select,#wpadminbar textarea{-webkit-box-shadow:none;box-shadow:none;outline:0}#wpadminbar{direction:ltr;color:#ccc;font:400 13px/32px "Open Sans",sans-serif;height:32px;position:fixed;top:0;left:0;width:100%;min-width:600px;z-index:99999;background:#23282d}#wpadminbar .ab-sub-wrapper,#wpadminbar ul,#wpadminbar ul li{background:0 0;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:0}#wpadminbar .quicklinks .ab-top-secondary>li{float:right}#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .quicklinks a,#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;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2);background:#32373c;display:none;position:absolute;float:none}#wpadminbar.ie7 .menupop .ab-sub-wrapper,#wpadminbar.ie7 .shortlink-input{top:32px;left:0}#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:700}#wpadminbar .quicklinks .menupop ul li .ab-item,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li .ab-item,#wpadminbar .shortlink-input,#wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item{line-height:26px;height:26px;white-space:nowrap;min-width:140px}#wpadminbar .shortlink-input{width:200px}#wpadminbar li.hover>.ab-sub-wrapper,#wpadminbar.nojs li:hover>.ab-sub-wrapper{display:block}#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 .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{background:#32373c;color:#00b9eb}#wpadminbar>#wp-toolbar a:focus span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label,#wpadminbar>#wp-toolbar li:hover span.ab-label{color:#00b9eb}#wpadminbar .ab-icon,#wpadminbar .ab-item:before,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon{position:relative;float:left;font:400 20px/1 dashicons;speak:none;padding:4px 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-image:none!important;margin-right:6px}#wpadminbar #adminbarsearch:before,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:before{color:#a0a5aa;color:rgba(240,245,250,.6);position:relative;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#wpadminbar .ab-label{display:inline-block;height:32px}#wpadminbar .ab-submenu .ab-item,#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:#b4b9be;color:rgba(240,245,250,.7)}#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar lLine truncated
|
||||
@@ -8,7 +8,7 @@ buttons in the following files are updated.
|
||||
|
||||
WordPress-style Buttons
|
||||
=======================
|
||||
Create a button by adding the %60.button` class to an element. For backwards
|
||||
Create a button by adding the `.button` class to an element. For backwards
|
||||
compatibility, we support several other classes (such as `.button-secondary`),
|
||||
but these will *not* work with the stackable classes described below.
|
||||
|
||||
@@ -144,7 +144,7 @@ TABLE OF CONTENTS:
|
||||
.wp-core-ui .button-secondary:focus {
|
||||
background: #fafafa;
|
||||
border-color: #999;
|
||||
color: #222;
|
||||
color: #23282d;
|
||||
}
|
||||
|
||||
.wp-core-ui .button.focus,
|
||||
@@ -164,7 +164,7 @@ TABLE OF CONTENTS:
|
||||
.wp-core-ui .button-secondary:active {
|
||||
background: #eee;
|
||||
border-color: #999;
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
-webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
|
||||
box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
|
||||
}
|
||||
@@ -187,7 +187,7 @@ TABLE OF CONTENTS:
|
||||
.wp-core-ui .button-secondary:disabled,
|
||||
.wp-core-ui .button-secondary.disabled,
|
||||
.wp-core-ui .button-disabled {
|
||||
color: #aaa !important;
|
||||
color: #a0a5aa !important;
|
||||
border-color: #ddd !important;
|
||||
background: #f7f7f7 !important;
|
||||
-webkit-box-shadow: none !important;
|
||||
@@ -201,8 +201,8 @@ TABLE OF CONTENTS:
|
||||
---------------------------------------------------------------------------- */
|
||||
|
||||
.wp-core-ui .button-primary {
|
||||
background: #2ea2cc;
|
||||
border-color: #0074a2;
|
||||
background: #00a0d2;
|
||||
border-color: #0073aa;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.5), 0 1px 0 rgba( 0, 0, 0, 0.15 );
|
||||
box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.5 ), 0 1px 0 rgba( 0, 0, 0, 0.15 );
|
||||
color: #fff;
|
||||
@@ -213,8 +213,8 @@ TABLE OF CONTENTS:
|
||||
.wp-core-ui .button-primary:hover,
|
||||
.wp-core-ui .button-primary.focus,
|
||||
.wp-core-ui .button-primary:focus {
|
||||
background: #1e8cbe;
|
||||
border-color: #0074a2;
|
||||
background: #0091cd;
|
||||
border-color: #0073aa;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.6 );
|
||||
box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.6 );
|
||||
color: #fff;
|
||||
@@ -237,8 +237,8 @@ TABLE OF CONTENTS:
|
||||
.wp-core-ui .button-primary.active:hover,
|
||||
.wp-core-ui .button-primary.active:focus,
|
||||
.wp-core-ui .button-primary:active {
|
||||
background: #1b7aa6;
|
||||
border-color: #005684;
|
||||
background: #0073aa;
|
||||
border-color: #005082;
|
||||
color: rgba( 255, 255, 255, 0.95 );
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba( 0, 0, 0, 0.1 );
|
||||
box-shadow: inset 0 1px 0 rgba( 0, 0, 0, 0.1 );
|
||||
@@ -340,11 +340,7 @@ TABLE OF CONTENTS:
|
||||
|
||||
/* Reset responsive styles in Press This, Customizer */
|
||||
|
||||
.wp-core-ui.wp-customizer .button,
|
||||
.press-this.wp-core-ui .button,
|
||||
.press-this input#publish,
|
||||
.press-this input#save-post,
|
||||
.press-this a.preview {
|
||||
.wp-core-ui.wp-customizer .button {
|
||||
padding: 0 10px 1px;
|
||||
font-size: 13px;
|
||||
line-height: 26px;
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
.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:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-core-ui button::-moz-focus-inner,.wp-core-ui input[type=button]::-moz-focus-inner,.wp-core-ui input[type=reset]::-moz-focus-inner,.wp-core-ui input[type=submit]::-moz-focus-inner{border-width:0;border-style:none;padding:0}.wp-core-ui .button-group.button-large .button,.wp-core-ui .button.button-large{height:30px;line-height:28px;padding:0 12px 2px}.wp-core-ui .button-group.button-small .button,.wp-core-ui .button.button-small{height:24px;line-height:22px;padding:0 8px 1px;font-size:11px}.wp-core-ui .button-group.button-hero .button,.wp-core-ui .button.button-hero{font-size:14px;height:46px;line-height:44px;padding:0 36px}.wp-core-ui .button:active,.wp-core-ui .button:focus{outline:0}.wp-core-ui .button.hidden{display:none}.wp-core-ui input[type=reset],.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:focus,.wp-core-ui input[type=reset]:hover{background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;padding:0 2px 1px;width:auto}.wp-core-ui .button,.wp-core-ui .button-secondary{color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top}.wp-core-ui p .button{vertical-align:baseline}.wp-core-ui .button-secondary:focus,.wp-core-ui .button-secondary:hover,.wp-core-ui .button.focus,.wp-core-ui .button.hover,.wp-core-ui .button:focus,.wp-core-ui .button:hover{background:#fafafa;border-color:#999;color:#222}.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.wp-core-ui .button-secondary:active,.wp-core-ui .button.active,.wp-core-ui .button.active:hover,.wp-core-ui .button:active{background:#eee;border-color:#999;color:#333;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button.active:focus{-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.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,.wp-core-ui .button:disabled,.wp-core-ui .button[disabled]{color:#aaa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default}.wp-core-ui .button-primary{background:#2ea2cc;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none}.wp-core-ui .button-primary.focus,.wp-core-ui .button-primary.hover,.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#1e8cbe;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6);box-shadow:inset 0 1px 0 rgba(120,200,230,.6);color:#fff}.wp-core-ui .button-primary.focus,.wp-core-ui .button-primary:focus{border-color:#0e3950;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:inset 0 1px 0 rgba(120,200,230,.6),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.wp-core-ui .button-primary.active,.wp-core-ui .button-primary.active:focus,.wp-core-ui .button-primary.active:hover,.wp-core-ui .button-primary:active{background:#1b7aa6;border-color:#005684;color:rgba(255,255,255,.95);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);vertical-align:top}.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:#94cde7!important;background:#298cba!important;border-color:#1b607f!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important;cursor:default}.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;-webkit-border-radius:0;border-radius:0;margin-left:-1px;z-index:10}.wp-core-ui .button-group>.button-primary{z-index:100}.wp-core-ui .button-group>.button:hover{z-index:20}.wp-core-ui .button-group>.button:first-child{-webkit-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.wp-core-ui Line truncated
|
||||
.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:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-core-ui button::-moz-focus-inner,.wp-core-ui input[type=button]::-moz-focus-inner,.wp-core-ui input[type=reset]::-moz-focus-inner,.wp-core-ui input[type=submit]::-moz-focus-inner{border-width:0;border-style:none;padding:0}.wp-core-ui .button-group.button-large .button,.wp-core-ui .button.button-large{height:30px;line-height:28px;padding:0 12px 2px}.wp-core-ui .button-group.button-small .button,.wp-core-ui .button.button-small{height:24px;line-height:22px;padding:0 8px 1px;font-size:11px}.wp-core-ui .button-group.button-hero .button,.wp-core-ui .button.button-hero{font-size:14px;height:46px;line-height:44px;padding:0 36px}.wp-core-ui .button:active,.wp-core-ui .button:focus{outline:0}.wp-core-ui .button.hidden{display:none}.wp-core-ui input[type=reset],.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:focus,.wp-core-ui input[type=reset]:hover{background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;padding:0 2px 1px;width:auto}.wp-core-ui .button,.wp-core-ui .button-secondary{color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top}.wp-core-ui p .button{vertical-align:baseline}.wp-core-ui .button-secondary:focus,.wp-core-ui .button-secondary:hover,.wp-core-ui .button.focus,.wp-core-ui .button.hover,.wp-core-ui .button:focus,.wp-core-ui .button:hover{background:#fafafa;border-color:#999;color:#23282d}.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.wp-core-ui .button-secondary:active,.wp-core-ui .button.active,.wp-core-ui .button.active:hover,.wp-core-ui .button:active{background:#eee;border-color:#999;color:#32373c;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button.active:focus{-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.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,.wp-core-ui .button:disabled,.wp-core-ui .button[disabled]{color:#a0a5aa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default}.wp-core-ui .button-primary{background:#00a0d2;border-color:#0073aa;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none}.wp-core-ui .button-primary.focus,.wp-core-ui .button-primary.hover,.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#0091cd;border-color:#0073aa;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6);box-shadow:inset 0 1px 0 rgba(120,200,230,.6);color:#fff}.wp-core-ui .button-primary.focus,.wp-core-ui .button-primary:focus{border-color:#0e3950;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:inset 0 1px 0 rgba(120,200,230,.6),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.wp-core-ui .button-primary.active,.wp-core-ui .button-primary.active:focus,.wp-core-ui .button-primary.active:hover,.wp-core-ui .button-primary:active{background:#0073aa;border-color:#005082;color:rgba(255,255,255,.95);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);vertical-align:top}.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:#94cde7!important;background:#298cba!important;border-color:#1b607f!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important;cursor:default}.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;-webkit-border-radius:0;border-radius:0;margin-left:-1px;z-index:10}.wp-core-ui .button-group>.button-primary{z-index:100}.wp-core-ui .button-group>.button:hover{z-index:20}.wp-core-ui .button-group>.button:first-child{-webkit-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.wpLine truncated
|
||||
+10
-14
@@ -144,7 +144,7 @@ TABLE OF CONTENTS:
|
||||
.wp-core-ui .button-secondary:focus {
|
||||
background: #fafafa;
|
||||
border-color: #999;
|
||||
color: #222;
|
||||
color: #23282d;
|
||||
}
|
||||
|
||||
.wp-core-ui .button.focus,
|
||||
@@ -164,7 +164,7 @@ TABLE OF CONTENTS:
|
||||
.wp-core-ui .button-secondary:active {
|
||||
background: #eee;
|
||||
border-color: #999;
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
-webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
|
||||
box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
|
||||
}
|
||||
@@ -187,7 +187,7 @@ TABLE OF CONTENTS:
|
||||
.wp-core-ui .button-secondary:disabled,
|
||||
.wp-core-ui .button-secondary.disabled,
|
||||
.wp-core-ui .button-disabled {
|
||||
color: #aaa !important;
|
||||
color: #a0a5aa !important;
|
||||
border-color: #ddd !important;
|
||||
background: #f7f7f7 !important;
|
||||
-webkit-box-shadow: none !important;
|
||||
@@ -201,8 +201,8 @@ TABLE OF CONTENTS:
|
||||
---------------------------------------------------------------------------- */
|
||||
|
||||
.wp-core-ui .button-primary {
|
||||
background: #2ea2cc;
|
||||
border-color: #0074a2;
|
||||
background: #00a0d2;
|
||||
border-color: #0073aa;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.5), 0 1px 0 rgba( 0, 0, 0, 0.15 );
|
||||
box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.5 ), 0 1px 0 rgba( 0, 0, 0, 0.15 );
|
||||
color: #fff;
|
||||
@@ -213,8 +213,8 @@ TABLE OF CONTENTS:
|
||||
.wp-core-ui .button-primary:hover,
|
||||
.wp-core-ui .button-primary.focus,
|
||||
.wp-core-ui .button-primary:focus {
|
||||
background: #1e8cbe;
|
||||
border-color: #0074a2;
|
||||
background: #0091cd;
|
||||
border-color: #0073aa;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.6 );
|
||||
box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.6 );
|
||||
color: #fff;
|
||||
@@ -237,8 +237,8 @@ TABLE OF CONTENTS:
|
||||
.wp-core-ui .button-primary.active:hover,
|
||||
.wp-core-ui .button-primary.active:focus,
|
||||
.wp-core-ui .button-primary:active {
|
||||
background: #1b7aa6;
|
||||
border-color: #005684;
|
||||
background: #0073aa;
|
||||
border-color: #005082;
|
||||
color: rgba( 255, 255, 255, 0.95 );
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba( 0, 0, 0, 0.1 );
|
||||
box-shadow: inset 0 1px 0 rgba( 0, 0, 0, 0.1 );
|
||||
@@ -340,11 +340,7 @@ TABLE OF CONTENTS:
|
||||
|
||||
/* Reset responsive styles in Press This, Customizer */
|
||||
|
||||
.wp-core-ui.wp-customizer .button,
|
||||
.press-this.wp-core-ui .button,
|
||||
.press-this input#publish,
|
||||
.press-this input#save-post,
|
||||
.press-this a.preview {
|
||||
.wp-core-ui.wp-customizer .button {
|
||||
padding: 0 10px 1px;
|
||||
font-size: 13px;
|
||||
line-height: 26px;
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
.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:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-core-ui button::-moz-focus-inner,.wp-core-ui input[type=button]::-moz-focus-inner,.wp-core-ui input[type=reset]::-moz-focus-inner,.wp-core-ui input[type=submit]::-moz-focus-inner{border-width:0;border-style:none;padding:0}.wp-core-ui .button-group.button-large .button,.wp-core-ui .button.button-large{height:30px;line-height:28px;padding:0 12px 2px}.wp-core-ui .button-group.button-small .button,.wp-core-ui .button.button-small{height:24px;line-height:22px;padding:0 8px 1px;font-size:11px}.wp-core-ui .button-group.button-hero .button,.wp-core-ui .button.button-hero{font-size:14px;height:46px;line-height:44px;padding:0 36px}.wp-core-ui .button:active,.wp-core-ui .button:focus{outline:0}.wp-core-ui .button.hidden{display:none}.wp-core-ui input[type=reset],.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:focus,.wp-core-ui input[type=reset]:hover{background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;padding:0 2px 1px;width:auto}.wp-core-ui .button,.wp-core-ui .button-secondary{color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top}.wp-core-ui p .button{vertical-align:baseline}.wp-core-ui .button-secondary:focus,.wp-core-ui .button-secondary:hover,.wp-core-ui .button.focus,.wp-core-ui .button.hover,.wp-core-ui .button:focus,.wp-core-ui .button:hover{background:#fafafa;border-color:#999;color:#222}.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.wp-core-ui .button-secondary:active,.wp-core-ui .button.active,.wp-core-ui .button.active:hover,.wp-core-ui .button:active{background:#eee;border-color:#999;color:#333;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button.active:focus{-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.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,.wp-core-ui .button:disabled,.wp-core-ui .button[disabled]{color:#aaa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default}.wp-core-ui .button-primary{background:#2ea2cc;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none}.wp-core-ui .button-primary.focus,.wp-core-ui .button-primary.hover,.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#1e8cbe;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6);box-shadow:inset 0 1px 0 rgba(120,200,230,.6);color:#fff}.wp-core-ui .button-primary.focus,.wp-core-ui .button-primary:focus{border-color:#0e3950;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:inset 0 1px 0 rgba(120,200,230,.6),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.wp-core-ui .button-primary.active,.wp-core-ui .button-primary.active:focus,.wp-core-ui .button-primary.active:hover,.wp-core-ui .button-primary:active{background:#1b7aa6;border-color:#005684;color:rgba(255,255,255,.95);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);vertical-align:top}.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:#94cde7!important;background:#298cba!important;border-color:#1b607f!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important;cursor:default}.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;-webkit-border-radius:0;border-radius:0;margin-right:-1px;z-index:10}.wp-core-ui .button-group>.button-primary{z-index:100}.wp-core-ui .button-group>.button:hover{z-index:20}.wp-core-ui .button-group>.button:first-child{-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.wp-core-uiLine truncated
|
||||
.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:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-core-ui button::-moz-focus-inner,.wp-core-ui input[type=button]::-moz-focus-inner,.wp-core-ui input[type=reset]::-moz-focus-inner,.wp-core-ui input[type=submit]::-moz-focus-inner{border-width:0;border-style:none;padding:0}.wp-core-ui .button-group.button-large .button,.wp-core-ui .button.button-large{height:30px;line-height:28px;padding:0 12px 2px}.wp-core-ui .button-group.button-small .button,.wp-core-ui .button.button-small{height:24px;line-height:22px;padding:0 8px 1px;font-size:11px}.wp-core-ui .button-group.button-hero .button,.wp-core-ui .button.button-hero{font-size:14px;height:46px;line-height:44px;padding:0 36px}.wp-core-ui .button:active,.wp-core-ui .button:focus{outline:0}.wp-core-ui .button.hidden{display:none}.wp-core-ui input[type=reset],.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:focus,.wp-core-ui input[type=reset]:hover{background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;padding:0 2px 1px;width:auto}.wp-core-ui .button,.wp-core-ui .button-secondary{color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top}.wp-core-ui p .button{vertical-align:baseline}.wp-core-ui .button-secondary:focus,.wp-core-ui .button-secondary:hover,.wp-core-ui .button.focus,.wp-core-ui .button.hover,.wp-core-ui .button:focus,.wp-core-ui .button:hover{background:#fafafa;border-color:#999;color:#23282d}.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.wp-core-ui .button-secondary:active,.wp-core-ui .button.active,.wp-core-ui .button.active:hover,.wp-core-ui .button:active{background:#eee;border-color:#999;color:#32373c;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.wp-core-ui .button.active:focus{-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.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,.wp-core-ui .button:disabled,.wp-core-ui .button[disabled]{color:#a0a5aa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default}.wp-core-ui .button-primary{background:#00a0d2;border-color:#0073aa;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none}.wp-core-ui .button-primary.focus,.wp-core-ui .button-primary.hover,.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#0091cd;border-color:#0073aa;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6);box-shadow:inset 0 1px 0 rgba(120,200,230,.6);color:#fff}.wp-core-ui .button-primary.focus,.wp-core-ui .button-primary:focus{border-color:#0e3950;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.6),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:inset 0 1px 0 rgba(120,200,230,.6),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.wp-core-ui .button-primary.active,.wp-core-ui .button-primary.active:focus,.wp-core-ui .button-primary.active:hover,.wp-core-ui .button-primary:active{background:#0073aa;border-color:#005082;color:rgba(255,255,255,.95);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);vertical-align:top}.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:#94cde7!important;background:#298cba!important;border-color:#1b607f!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important;cursor:default}.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;-webkit-border-radius:0;border-radius:0;margin-right:-1px;z-index:10}.wp-core-ui .button-group>.button-primary{z-index:100}.wp-core-ui .button-group>.button:hover{z-index:20}.wp-core-ui .button-group>.button:first-child{-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.wLine truncated
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
@font-face {
|
||||
font-family: "dashicons";
|
||||
src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAFk8AA4AAAAAkVwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABRAAAABwAAAAca/GHnkdERUYAAAFgAAAAHgAAACABIAAET1MvMgAAAYAAAABAAAAAYJAJaVBjbWFwAAABwAAAATMAAAKSUPpEamdhc3AAAAL0AAAACAAAAAj//wADZ2x5ZgAAAvwAAE2qAAB6bNqcwBtoZWFkAABQqAAAAC4AAAA2BqJsMGhoZWEAAFDYAAAAGgAAACQPogicaG10eAAAUPQAAAEhAAADzAu/zfNsb2NhAABSGAAAAeAAAAHox87m5m1heHAAAFP4AAAAHwAAACABRgC1bmFtZQAAVBgAAAFzAAADBkirZW9wb3N0AABVjAAAA6cAAAmJ0RPelXdlYmYAAFk0AAAABgAAAAZeiFO0AAAAAQAAAADMPaLPAAAAAM/Z1ckAAAAAz9oPBXjaY2BkYGDgA2IJBhBgYmAEwk9AzALmMQAADrABJQAAeNpjYGZvYZzAwMrAwirCsoGBgWEahGbaw2DEFAHkA6Wwg1DvcD8GBwWGr4LsF0B8IKkBpBiRlCgwMAIA9/UJS3ja3ZAxSwNBEIVnczFwub25CyoYsFgQi1QGCzHdGRGTQhEiaLRIVFCCCEklKYSAWAgWtv4L/4yNFgkKiuXszlZGziMRC3sbH8wbHjy+4gGAA+ObBZE4iJskiVFOi3bydyGCCZhRWbWgGvNDcmmS8jRHBSrSEpVoldaoQnU6oBZ16UoL7eq8LuiSjnTZuCZvCqZkqlzlHa5zk1vc5Wu+s2nr2lwcAyj4JgOFNE2K5hPyIi1TlJDXqUZNOqIO9TRoR4da6eKILExolCmaiCu8NSIfcpt7fGvBZmwYxwOn3+/fP04FucALskE6cPATh/iBFhkNvuMLPuMTPuA+7uE2bmIFy7jiX/oX/rnf8U/lmTyRx7IpG7Iua3LDe/NevcF4pb+RyMAPXqQSS/0uwL/XF+1xgaIAAAAAAf//AAJ42q29B3wUZfo4Pu/Mzsxu2mazLW032WxL2dRtIWUTIPTQQosFpCy9GEWaBFSMiEqJDRtiQ8QeFTkLx9lO145c1NNDD/XkOPVOvePrQZJ9/T3PO7vJJuJ97/v//Akz7zvvzLzz1qc/z3IiB//Iaf4wJ3ASp+FSOC3HVepsOkFv05t1xJZMdHpyuucR+ljkEbqTTH8k8gh/ONpEbuB+pt0/Exr9kPuZeCjP/cwRLuFfJcfxXJiLyi9IPVCnn+M0JBgiJrOVmK1CIKghsmTIIyaDnMbLEpysfIgEA8EQHwxUQXlVUDwQrd+dtf6WmtIHppXUzW5ZWRN9KFr/lMWyzGLJGbXYNMLum1Ihj11yySW+Am9qsy/XMg1uTbMIm/lXd+em2l3WrWWZubZUkhJ9iH/1KXZ3uiUnMDa90u675JIlY+WKyb6CJt2qkTmsTo4QDxeRGmU1lwFjYqsyGXUGqYQQnb3A5df5AuS00NGydm1LhKZEIJXVa1uiTS1raQo5vbaFP9yyFrotcP+GOj6RPoKxTGP1mGUNcWuI3ysSGFY8pMY7lkU3RDcs438knZHoAb61d4qQT9tUm+9Yxl/Lymlb5M7ow9FH+RlUS07TFKg3wu2WV8g1XCbn4uqgXlO6lqQRN2kgAZ/bVaAlxBWAfL6GXUsykQxmU0AmJklLpHy3K72BhIiZlVZJ/9i8+Y6WL5cRqbm5oaHh6YaJ9AnLsJbbryAL+77lTXl5Ba150W8xKSN7rXiD7rlCeYXOb2xseFo6jCW3twyzEnFiM1TQ2NhMn1j2Zcsdm3tnQQXn5+Xz1ug3LH2D3MNubN5MFm2GVyx0XsPTjQ0cp4L1EYY+reD0XA5XhGuE6HyuEuK2yfYCCUbf5LVVBbgqk0EqcPlEm46lAW+VWWeDAe2/FA21RQ9dQ9uueaiotrZIOFVUG208etNNR28SDpHTkNy0xJxDu2FMlbzQwR8uqo1EaouiTfAC/wwWH1X1nlyC74jkLJWX0vvZBcf3rwkBZpTD6RNtRpvOy7cKp3oPCvl9mRFyWjT0fBeOiAac/2+4k9JfpFOcGvrkwFXvJgFc9WKQyGnEbpOlArfL1wA9DWiUOzIR8+jhF0lT9oUud0bf6xcI16yr+nYebW/3tHs8nvZ6QSJNWXgvmx6WcpVH9W7XBW+39W2cXjUCHirZ5GknHXNP031wKwNuZdMXYf9FuNelqNTHGTkbtF1SuQmOWJC4MoIBh1nDmyTcaGz9wG6UOhbQf1we/Wr8sVvG89t9vgVziGot/TPJJtai6p491ukWq9Uy3WoRfl7g80UvG3/LsXG89XKSsWBOtYf+mZ4keWt+juZZLLEHOYF4iEdWS/tg/5dwY5TZtdsGZpZ4cWpLiBEnsp7YcTZrcWBg68Wv/HhliT/Jptwvq2uLer7DuRYNRbV9mWHMhi3Flv4MOX2Osk5VF+Z7p+CkW2pbancbLRbjbsjwLszR+xPLop9ijoFHrpO7Xx4tt8KMcgSm0SXh1jPLMJwqGEriDpoCuLtUhkN8+28mvTJqQpPe95sf6akA/TDwlp+Yf4TCpgmj9NL9h6LXHPLpR00Y9fLkQz/SvwXeCpBSeOCfrLDpFVhvBlhvh2G9ZXIV8O2CMlU5cYUEbxWskzRRcEJqIWkqe0EZXw6DEyJelenCqQFPlk4QJKmkYVFo8bayNKLSZZb4N5P0y/6wSet/cN+XCxd98cSNbvdlH1yu8rrqx42r1+uDyxdMKF37yGw5a8zwKcPoXw9tPbbyrKh1WzPNtoKU5LNt721RYHhYVkN73Fw59N4uydBvSTba/C637A663HadNxB0B82BoN9mNJmDZtlk9nJVAZ+rQDLI6k+zg3ceu7N1Me1e3Hpn953BzE8/MQ+DkhkriIeVDDN/0ld1pqvrTJeQv3wm3IFHPs0Mwp3WxaRo4WwoCeTESmYvpMO78FnWrohcIE8FGAuzwpkyAIuo3IIo2NzK8s6oCvhZG6SGl0aNmttG39z2Iv1wN+0OCzljKlfPJXz5qkmTVk2Sy16ilP48t83fSJ/No9sjArmBNKyeOyp6YlJ1EJ7Ab5FCeQWsYx3uaFKlMstlsD4l2ash3kCGQ1/gcAetsEYDQbuG2NME4dSdRDf/0dALy+7+seAUvZ/efzTzFVL6+F30h/5SMofMOZqx8dD30r7Nba+2zH3tVtpGOg+QjL09HbEC0knbNn9272wOYWUE+qvspSzYzUW/3E1cvsosqfId7oCK9dtURQBS+eGP7ZdtbL+sh/0SJC3Et3EjfYc+Qd/ZuJF/cO2+tWv3wfr19GwjHiEfQRs+3JcJZ2Hc3p0798JxAh9aGz0QDoehPalcBPb2ClgXWoDeZpiDPFghJbBGglwt1wC7fcI59rtNZ9NDk7yxIw7Zg9BOJ9wbdA33VQnX8grog4P14XhRbY+DgVziUf73riy2wA6P4IDxrYgw+6IJJYcHP0E6EWzEQIjqEyjwRNg/mmJhT4XDgNM98TzciGWh34gPwtI+RiNYB1MJthiV4A7CxoBdAlsBKIZTMYqBdkNG2NfTE47/R/qh70ScfhDyW9b2PZFwG3EJB3N+FL4lwyjnIS7R2/VASzjY7AZ8gtNkdtkLVLLLYS+QA0HhVNRUFqm4RTglnOob3lILUCzMl7Zl+ooO05dnz6YvHy70Z7YJp0hx7yHVmlocizDrWvT3f771Wfn5PXuel5+9VcF58kh5LVCDOqRggEhDxGcD+g3RmSzdscNioS29B1UlB63Ton/ls3ZGT42RW3cAjUWn9g0Tjx+0kL6b+Myd0b92c0BXwj/ox1FYKXauFXbuMq4NitL5MuLIV6URPj3DSmDlhgisYVNGOo/L2AWlAUYzumTJXuAOOLyw8VyS0QAUpMlsAqQBNE+IIOBlT7gAUEqmPKLXkJDKDfd5DXHxfh/R4+vy0YXP/0Tfpy/Q9396fiHkSSUZTSp/er73dbKKTPxx584f6TP0JvoM5kg9fX+pIU1vvGq6Tb+KzH/vTmJe4ZttNmWLQlVDfj790ehSqw1ag2HLdPtSu8MA2elt5DkiCmqTRk6a82HPcbL5rf8Rir9es2nxYmGU8qmFQ5ogzhr00YmsIb1Fgl/Ne8tJEtn/yqoF8oTxluGFRWpx1ta6Ey0t/D+IWiXwQR9JlniB+INETY9Gc/nn5ayWliuHPfKHP9Htwk29pxaQa799hr4d3VVs5cTYml0BK0rmktmO5XAvEoDYgw6PuL5nm6q57wTQNezgW6MH5BVnzojrYU90DxwAE2eQTlmU04C2KIHafO4ywIsZQXeayoyQMBhw/rJImDm26vFxWe/d98D8Z/eurErP/uqR2+bNF548Vyn/0ZYLG1zpu8jwqX8p33rw3bNX/qGvtXX3uQpxeYn9tKQKKK8ULh37qAd620YAkLADOqghNkBm0QO9U4hH1dU7RdUVPRA9IOQjxJBX9E6JHhCPQwfbEABgSk5j3XwCnepCHFggWQa4Ai8DAf1wQEdi5armlqnX0W7kFFr41pa1eCAk6A5DKq7fOf452k08a1vIaSynbXCkADDoL4Mtw3AcflcD8FYHI53FWbh87Bd+zQkfEQWv3mYXvCR+wDbV8ECwFtWeOVNLno+EAUyHI2Ggh+InBPKnlXmtLTr7Ei+FimrD+NmBA+jaU32ZQgdto22M/lH6H0YYRJwBIMegq/mudEaJi7o07LJy4QvwL6omFda+Sz9/990bx03sa8+IdNzIstXSnojUUBLp/Qdck4J37fzqSF/HlY+xvFBb6E/gB7SMIxge76lBsseBK/SPi2M3X0j29t+rsqryYN9XWXnzF1Kab9w439l/wln8d882/rCC4O4nYpLRUlbTUqHgtqKJNT57liSp0qsbl7QtHulNllfEXvNhFWdfwu0g9DDER7vV2S1TVsyeM7KY4cULine truncated
|
||||
src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAGBQAA4AAAAAm3wAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABRAAAABwAAAAcbYyDmkdERUYAAAFgAAAAHgAAACABIwAET1MvMgAAAYAAAABAAAAAYJYFaatjbWFwAAABwAAAASoAAAKC/cQq02dhc3AAAALsAAAACAAAAAj//wADZ2x5ZgAAAvQAAFSXAACESOAO2gZoZWFkAABXjAAAAC4AAAA2CEgozmhoZWEAAFe8AAAAGgAAACQPogifaG10eAAAV9gAAAEcAAAD2GOq3ltsb2NhAABY9AAAAe4AAAHu4pbA6m1heHAAAFrkAAAAHwAAACABSQC1bmFtZQAAWwQAAAGKAAADLCbHbA5wb3N0AABckAAAA7UAAAmnz3C/rndlYmYAAGBIAAAABgAAAAY81VSHAAAAAQAAAADMPaLPAAAAANCh83cAAAAA0KztU3jaY2BkYGDgA2IJBhBgYmAEwq9AzALmMQAADtEBKAAAeNpjYGY/yTiBgZWBhVWEZQMDA8M0CM20h8GIKQLIB0phB6He4X4MDqp/vqqzXwDxgaQGkGJEUqLAwAgAMrcKp3ja3ZA7SwNRFITPNTGy7N3jglosWCxIkHRBVAw2q6JJQEWMILGQ9dHEKjZCwCKNhZ2t/8hGG1EwWKuVOvehjbouCVhYWzlw5jAwfMUQUYZ6N0oidRLHaRLdnBVx+jcoon4azn/AwRACjKGAIqZRwgIWUUEdO2ighRMllKMCVVAlFal57ehAF3RJV03VbJq6iU3DtMypObdZ69jAjicJUUol+BhBiHxKncAMopRaRg0x9nCItiKVUb4KVbFLFdrXoS7qyFTMWpe6a5qmbc4s2Zz1bZgknYHBLH/xJ7/zG7/yCz/zEz/yA9/zLd/wFV/wKq9wmed4lqd40jvymt6Bt+9ty1huybqsyXW5LJdk5HbcO/favewt8/cSOfpBi77U+n4X6N/rG5Q9gGkAAAAAAAH//wACeNqsvQd8FGX6OD7vzM7Mbtpmsy1tN9lsS9nUbSFlEyD00EKLBaQsPWAUaRJQMSIqJTZsiA0Re1TkLBxnO107clFPDz3Uk+PUO/WOrwdJ9vX3PO/sJhvE+973//lnM/O+887MO++85enPM5zIwR85xR/iBE7iNFwKp+W4Sp1NJ+hterOO2JKJTk9O9T5CH4s8QneQ6Y9EHuEPRZvIDdzPtOdnQqMfcj8TD+W5nznCJfxVchzPhbmo/ILUC3X6OU5DgiFiMluJ2SoEghoiS4Y8YjLIabwswc7Kh0gwEAzxwUAVlFcFxf3R+l1Z626pKX1gWknd7JYVNdGHovVPWSzLLJacUYtNI+y+KRXy2CWXXOIr8KY2+3It0+DUNIuwiX91V26q3WXdUpaZa0slKdGH+FefYmenW3ICY9Mr7b5LLlkyVq6Y7Cto0q0cmcPq5AjxcBGpUVZzGdAntiqTUWeQSgjR2Qtcfp0vQE4JnS1r1rREaEoEUlm9piXa1LKGppBTa1r4Qy1r4LUF7t9QxyfSR9CXaawes6whbg3xe0UC3Yqb1HjHsuj66Ppl/I+kKxLdz7f2TRHyabtq0x3L+GtZOW2P3Bl9OPooP4NqySmaAvVGuF1ym1zDZXIurg7qNaVrSRpxkwYS8LldBVpCXAHI52vYsSQTyWA2BWRikrREyne70htIiJhZaZX0j02b7mj5chmRmpsbGhqebphIn7AMa7n9CrKw/1velJdX0JoX/RaTMrLHiifo7iuUW+j8xsaGp6VDWHJ7yzArESc2QwWNjc30iWVfttyxqW8WVHB+Xj5vjX7D0jfIPezEpk1k0Sa4xULnNTzd2MBxKpgfYXinNk7P5XBFOEeIzucqIW6bbC+QoPdNXltVgKsyGaQCl0+06Vga8FaZdTbo0IFD0VBb9NA1tP2ah4pqa4uEk0W10cYjN9105CbhIDkFyU1LzDm0B/pUyQud/KGi2kiktijaBDfwz2DxEVXfiSV4j0jOUHkpvZ8dcPzAnBBgRDkcPtFmtOm8fKtwsu+AkN+fGSGnREPvd+GIaMDx/4Y7If1FOsmp4Z0cOOvdJICzXgwSOY3YbbJU4Hb5GuBNAxrljEzEPHroRdKUfaHLndH/+gXCNWurvp1HOzo8HR6Pp6NekEhTFp7LpoekXOVSvdt1wdvt/RumV42Ai0o2ejpI59xTdC+cyoBT2fRFWH8R7nUpKvVzRs4GbZdUboI9FiSujGDAYdbwJgkXGps/sBqlzgX0H5dHvxp/9Jbx/Dafb8EcolpD/0yyibWoune3dbrFarVMt1qEnxf4fNHLxt9ydBxvvZxkLJhT7aF/pidI3uqfo3kWS+xCTiAe4pHV0l5Y/yXcGGV07bbBkSVeHNoSYsSBrCd2HM1a7BhYevEjPx5Z4leyIffL6tqi3u9wrEVDUW1/ZhizYUuxZSBDTp2jrEvVjfm+KTjoltqW2l1Gi8W4CzK8C3P0/sSy6KeYY+CR6+Lul0fLrTCiHIFhdEm49MwydKcKupK4g6YAri6V4SDf8ZtJr4ya0KT3/eZHejJAPwy85SfmH6GwacIovXT/weg1B336URNGvTz54I/0b4G3AqQULvgnK2x6BeabAebbIZhvmVwFPLugTFVOXCHBWwXzJE0UnJBaSJrKXlDGl0PnhIhXZbpwasCTpRMESSppWBRavLUsjah0mSX+TST9sj9s1Pof3PvlwkVfPHGj233ZB5ervK76cePq9frg8gUTStc8MlvOGjN8yjD614Nbjq44I2rd1kyzrSAl+Uz7e5sVGB6W1dAeN1cOb2+XZHhvSTba/C637A663HadNxB0B82BoN9mNJmDZtlk9nJVAZ+rQDLI6k+zg3cevbN1Me1Z3Hpnz53BzE8/MQ+DkhltxMNKhpk/6a863d19ulvIXz4TzsAln2YG4UzrYlK0cDaUBHJiJbMX0uHdeC1rV0QukKcCjIVR4UwZgEVUbkEUbG5lemdUBfysDVLDS6NGzW2nb259kX64i/aEhZwxlavmEr585aRJKyfJZS9RSn+e2+5vpM/m0W0RgdxAGlbNHRU9Pqk6CFfgs0ih3AbzWIcrmlSpzHIZzE9J9mqIN5Dh0Bc43EErzNFA0K4h9jRBOHkn0c1/NPTCsrt/LDhJ76f3H8l8hZQ+fhf9YaCUzCFzjmRsOPi9tHdT+6stc1+7lbaTrv0kY09vZ6yAdNH2TZ/dO5tDWBmB91XWUhas5qJfriYuX2WWVPkOd0DF3ttURQBS+eHH1stWtl7WwXoJkhbi27CBvkOfoO9s2MA/uGbvmjV7Yf56ercSj5CPoA0v7s+EvTBuz44de2A7jhetie4Ph8PQnlQuAmu7DeaFFqC3GcYgD2ZICcyRIFfLNcBqn3CO9W7T2fTQJG9si0P2ILTTCeeGHMN5VcKx3Abv4GDvcKyottfBQC7xKP99K4otsMIj2GF8KyLM/mhCyaGhV5AuBBsxEKL6BAo8EfZHUyzsqnAYcLonnocTsSy8N+KDsLSX0QjWoVSCLUYluIOwMGCVwFIAiuFkjGKgPZAR9vb2huP/SD/0H4/TD0J+y5r+JxJOIy7hYMyPwLNk6OU8xCV6ux5oCQcb3YBPcJrMLnuBSnY57AVyICicjJrKIhW3CCeFk/3DW2oBioX50vZMX9Eh+vLs2fTlQ4X+zHbhJCnuO6haXYt9EWavFv39n299Vn5+9+7n5WdvVXCePFJeA9SgDikYINIQ8dmAfkN0Jkt3bLdYaEvfAVXJAeu06F/5rB3Rk2Pk1u1AY9Gp/cPEYwcspP8mPnNH9K89HNCV8AfvcQRmip1rhZW7jGuHonS+jDjyVWmET8+wEpi5IQJz2JSRzuM0dkFpgNGMLlmyF7gDDi8sPJdkNAAFaTKbAGkAzRMiCHjZFS4AlJIpj+g1JKRyw3leQ1y830f0eLt8ZOHzP9H36Qv0/Z+eXwh5UklGk8qfnu97nawkE3/cseNH+gy9iT6DOVJP319qSNMbr5pu068k89+7k5jbfLPNpmxRqGrIz6c/Gl1qtUFrMGyebl9qdxggO72dPEdEQW3SyElzPuw9Rja99T9C8derNy5eLIxSHrXwrCaIs4Y8dCJrSF+R4Ffz3nKSRPa9snKBPGG8ZXhhkVqctaXueEsL/w+iVgl80EeSJV4g/iBR0yPRXP55Oaul5cphj/zhT3SbcFPfyQXk2m+foW9HdxZbOTE2Z9tgRslcMluxHK5FAhB7yOYR1/VuVTX3Hwe6hm18a3S/3Hb6tLgO1kTP4AYwcQbpkkU5DWiLEqjN5y4DvJgRdKepzAgJgwHnL4uEmWOrHh+X9d59D8x/ds+KqvTsrx65bd584clzlfIfbb6wwZW+kwyf+pfyLQfePXPlH/pbW3edqxCnlzhAS6qA8krh0vEd9UBv2wgAErbBC2qIDZBZdH/fFOJRdfdNUXVH90f3C/kIMeS2vinR/eIxeMF2BACYklNYN59Ap7oQBxZIlkGuwMtAwAAc0JFYuaq5Zep1tAc5hRa+tWUNbggJesKQiut2jH+O9hDPmhZyCstpO2wpAAwGymDJMByHz9UAvNVBT2dxFi4f3wuf5oSHiIJXb7MLXhLfYJlqeCBYi2pPn64lz0fCAKbDkTDQQ/EdAvlTyrjWFp15iZdCRbVhfOzgBnTtyf5MoZO203ZG/yjvH0YYRJwBIMfgVfNd6YwSF3Vp+MrKgS/Av6iaVFj7Lv383XdvHDexvyMj0nkjy1ZLuyNSQ0mk7x9wTAretfOrIv2dVz7G8kJtoT+BH9AyjmB4/E0Nkj0OXOH9uDh284Vk78C5KqsqD9Z9lZU3fyGl+caN8535J+zFf/du5Q8pCO5+IiYZLWU1LRUKbiuaWOOzZ0mSKr26cUn74pHeZLktdpsPqzjzEi4HoZchPtqjzm6Z0jZ7zshihheL+EOeMTNLine truncated
|
||||
url(../fonts/dashicons.ttf) format("truetype"),
|
||||
url(../fonts/dashicons.svg#dashicons) format("svg");
|
||||
font-weight: normal;
|
||||
@@ -444,7 +444,8 @@
|
||||
content: "\f163";
|
||||
}
|
||||
|
||||
.dashicons-exerpt-view:before {
|
||||
.dashicons-exerpt-view:before, /* Misspelled. Use .dashicons-excerpt-view instead. */
|
||||
.dashicons-excerpt-view:before {
|
||||
content: "\f164";
|
||||
}
|
||||
|
||||
@@ -619,6 +620,42 @@
|
||||
content: "\f493"
|
||||
}
|
||||
|
||||
.dashicons-controls-play:before {
|
||||
content: "\f522"
|
||||
}
|
||||
|
||||
.dashicons-controls-pause:before {
|
||||
content: "\f523"
|
||||
}
|
||||
|
||||
.dashicons-controls-forward:before {
|
||||
content: "\f519"
|
||||
}
|
||||
|
||||
.dashicons-controls-skipforward:before {
|
||||
content: "\f517"
|
||||
}
|
||||
|
||||
.dashicons-controls-back:before {
|
||||
content: "\f518"
|
||||
}
|
||||
|
||||
.dashicons-controls-skipback:before {
|
||||
content: "\f516"
|
||||
}
|
||||
|
||||
.dashicons-controls-repeat:before {
|
||||
content: "\f515"
|
||||
}
|
||||
|
||||
.dashicons-controls-volumeon:before {
|
||||
content: "\f521"
|
||||
}
|
||||
|
||||
.dashicons-controls-volumeoff:before {
|
||||
content: "\f520"
|
||||
}
|
||||
|
||||
|
||||
/* Alerts/Notifications/Flags */
|
||||
|
||||
@@ -880,6 +917,10 @@
|
||||
content: "\f470";
|
||||
}
|
||||
|
||||
.dashicons-phone:before {
|
||||
content: "\f525";
|
||||
}
|
||||
|
||||
.dashicons-smiley:before {
|
||||
content: "\f328";
|
||||
}
|
||||
@@ -891,3 +932,27 @@
|
||||
.dashicons-carrot:before {
|
||||
content: "\f511";
|
||||
}
|
||||
|
||||
.dashicons-building:before {
|
||||
content: "\f512";
|
||||
}
|
||||
|
||||
.dashicons-store:before {
|
||||
content: "\f513";
|
||||
}
|
||||
|
||||
.dashicons-album:before {
|
||||
content: "\f514";
|
||||
}
|
||||
|
||||
.dashicons-palmtree:before {
|
||||
content: "\f527";
|
||||
}
|
||||
|
||||
.dashicons-tickets-alt:before {
|
||||
content: "\f524";
|
||||
}
|
||||
|
||||
.dashicons-money:before {
|
||||
content: "\f526";
|
||||
}
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
@font-face{font-family:dashicons;src:url(../fonts/dashicons.eot)}@font-face{font-family:dashicons;src:url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAFk8AA4AAAAAkVwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABRAAAABwAAAAca/GHnkdERUYAAAFgAAAAHgAAACABIAAET1MvMgAAAYAAAABAAAAAYJAJaVBjbWFwAAABwAAAATMAAAKSUPpEamdhc3AAAAL0AAAACAAAAAj//wADZ2x5ZgAAAvwAAE2qAAB6bNqcwBtoZWFkAABQqAAAAC4AAAA2BqJsMGhoZWEAAFDYAAAAGgAAACQPogicaG10eAAAUPQAAAEhAAADzAu/zfNsb2NhAABSGAAAAeAAAAHox87m5m1heHAAAFP4AAAAHwAAACABRgC1bmFtZQAAVBgAAAFzAAADBkirZW9wb3N0AABVjAAAA6cAAAmJ0RPelXdlYmYAAFk0AAAABgAAAAZeiFO0AAAAAQAAAADMPaLPAAAAAM/Z1ckAAAAAz9oPBXjaY2BkYGDgA2IJBhBgYmAEwk9AzALmMQAADrABJQAAeNpjYGZvYZzAwMrAwirCsoGBgWEahGbaw2DEFAHkA6Wwg1DvcD8GBwWGr4LsF0B8IKkBpBiRlCgwMAIA9/UJS3ja3ZAxSwNBEIVnczFwub25CyoYsFgQi1QGCzHdGRGTQhEiaLRIVFCCCEklKYSAWAgWtv4L/4yNFgkKiuXszlZGziMRC3sbH8wbHjy+4gGAA+ObBZE4iJskiVFOi3bydyGCCZhRWbWgGvNDcmmS8jRHBSrSEpVoldaoQnU6oBZ16UoL7eq8LuiSjnTZuCZvCqZkqlzlHa5zk1vc5Wu+s2nr2lwcAyj4JgOFNE2K5hPyIi1TlJDXqUZNOqIO9TRoR4da6eKILExolCmaiCu8NSIfcpt7fGvBZmwYxwOn3+/fP04FucALskE6cPATh/iBFhkNvuMLPuMTPuA+7uE2bmIFy7jiX/oX/rnf8U/lmTyRx7IpG7Iua3LDe/NevcF4pb+RyMAPXqQSS/0uwL/XF+1xgaIAAAAAAf//AAJ42q29B3wUZfo4Pu/Mzsxu2mazLW032WxL2dRtIWUTIPTQQosFpCy9GEWaBFSMiEqJDRtiQ8QeFTkLx9lO145c1NNDD/XkOPVOvePrQZJ9/T3PO7vJJuJ97/v//Akz7zvvzLzz1qc/z3IiB//Iaf4wJ3ASp+FSOC3HVepsOkFv05t1xJZMdHpyuucR+ljkEbqTTH8k8gh/ONpEbuB+pt0/Exr9kPuZeCjP/cwRLuFfJcfxXJiLyi9IPVCnn+M0JBgiJrOVmK1CIKghsmTIIyaDnMbLEpysfIgEA8EQHwxUQXlVUDwQrd+dtf6WmtIHppXUzW5ZWRN9KFr/lMWyzGLJGbXYNMLum1Ihj11yySW+Am9qsy/XMg1uTbMIm/lXd+em2l3WrWWZubZUkhJ9iH/1KXZ3uiUnMDa90u675JIlY+WKyb6CJt2qkTmsTo4QDxeRGmU1lwFjYqsyGXUGqYQQnb3A5df5AuS00NGydm1LhKZEIJXVa1uiTS1raQo5vbaFP9yyFrotcP+GOj6RPoKxTGP1mGUNcWuI3ysSGFY8pMY7lkU3RDcs438knZHoAb61d4qQT9tUm+9Yxl/Lymlb5M7ow9FH+RlUS07TFKg3wu2WV8g1XCbn4uqgXlO6lqQRN2kgAZ/bVaAlxBWAfL6GXUsykQxmU0AmJklLpHy3K72BhIiZlVZJ/9i8+Y6WL5cRqbm5oaHh6YaJ9AnLsJbbryAL+77lTXl5Ba150W8xKSN7rXiD7rlCeYXOb2xseFo6jCW3twyzEnFiM1TQ2NhMn1j2Zcsdm3tnQQXn5+Xz1ug3LH2D3MNubN5MFm2GVyx0XsPTjQ0cp4L1EYY+reD0XA5XhGuE6HyuEuK2yfYCCUbf5LVVBbgqk0EqcPlEm46lAW+VWWeDAe2/FA21RQ9dQ9uueaiotrZIOFVUG208etNNR28SDpHTkNy0xJxDu2FMlbzQwR8uqo1EaouiTfAC/wwWH1X1nlyC74jkLJWX0vvZBcf3rwkBZpTD6RNtRpvOy7cKp3oPCvl9mRFyWjT0fBeOiAac/2+4k9JfpFOcGvrkwFXvJgFc9WKQyGnEbpOlArfL1wA9DWiUOzIR8+jhF0lT9oUud0bf6xcI16yr+nYebW/3tHs8nvZ6QSJNWXgvmx6WcpVH9W7XBW+39W2cXjUCHirZ5GknHXNP031wKwNuZdMXYf9FuNelqNTHGTkbtF1SuQmOWJC4MoIBh1nDmyTcaGz9wG6UOhbQf1we/Wr8sVvG89t9vgVziGot/TPJJtai6p491ukWq9Uy3WoRfl7g80UvG3/LsXG89XKSsWBOtYf+mZ4keWt+juZZLLEHOYF4iEdWS/tg/5dwY5TZtdsGZpZ4cWpLiBEnsp7YcTZrcWBg68Wv/HhliT/Jptwvq2uLer7DuRYNRbV9mWHMhi3Flv4MOX2Osk5VF+Z7p+CkW2pbancbLRbjbsjwLszR+xPLop9ijoFHrpO7Xx4tt8KMcgSm0SXh1jPLMJwqGEriDpoCuLtUhkN8+28mvTJqQpPe95sf6akA/TDwlp+Yf4TCpgmj9NL9h6LXHPLpR00Y9fLkQz/SvwXeCpBSeOCfrLDpFVhvBlhvh2G9ZXIV8O2CMlU5cYUEbxWskzRRcEJqIWkqe0EZXw6DEyJelenCqQFPlk4QJKmkYVFo8bayNKLSZZb4N5P0y/6wSet/cN+XCxd98cSNbvdlH1yu8rrqx42r1+uDyxdMKF37yGw5a8zwKcPoXw9tPbbyrKh1WzPNtoKU5LNt721RYHhYVkN73Fw59N4uydBvSTba/C637A663HadNxB0B82BoN9mNJmDZtlk9nJVAZ+rQDLI6k+zg3ceu7N1Me1e3Hpn953BzE8/MQ+DkhkriIeVDDN/0ld1pqvrTJeQv3wm3IFHPs0Mwp3WxaRo4WwoCeTESmYvpMO78FnWrohcIE8FGAuzwpkyAIuo3IIo2NzK8s6oCvhZG6SGl0aNmttG39z2Iv1wN+0OCzljKlfPJXz5qkmTVk2Sy16ilP48t83fSJ/No9sjArmBNKyeOyp6YlJ1EJ7Ab5FCeQWsYx3uaFKlMstlsD4l2ash3kCGQ1/gcAetsEYDQbuG2NME4dSdRDf/0dALy+7+seAUvZ/efzTzFVL6+F30h/5SMofMOZqx8dD30r7Nba+2zH3tVtpGOg+QjL09HbEC0knbNn9272wOYWUE+qvspSzYzUW/3E1cvsosqfId7oCK9dtURQBS+eGP7ZdtbL+sh/0SJC3Et3EjfYc+Qd/ZuJF/cO2+tWv3wfr19GwjHiEfQRs+3JcJZ2Hc3p0798JxAh9aGz0QDoehPalcBPb2ClgXWoDeZpiDPFghJbBGglwt1wC7fcI59rtNZ9NDk7yxIw7Zg9BOJ9wbdA33VQnX8grog4P14XhRbY+DgVziUf73riy2wA6P4IDxrYgw+6IJJYcHP0E6EWzEQIjqEyjwRNg/mmJhT4XDgNM98TzciGWh34gPwtI+RiNYB1MJthiV4A7CxoBdAlsBKIZTMYqBdkNG2NfTE47/R/qh70ScfhDyW9b2PZFwG3EJB3N+FL4lwyjnIS7R2/VASzjY7AZ8gtNkdtkLVLLLYS+QA0HhVNRUFqm4RTglnOob3lILUCzMl7Zl+ooO05dnz6YvHy70Z7YJp0hx7yHVmlocizDrWvT3f771Wfn5PXuel5+9VcF58kh5LVCDOqRggEhDxGcD+g3RmSzdscNioS29B1UlB63Ton/ls3ZGT42RW3cAjUWn9g0Tjx+0kL6b+Myd0b92c0BXwj/ox1FYKXauFXbuMq4NitL5MuLIV6URPj3DSmDlhgisYVNGOo/L2AWlAUYzumTJXuAOOLyw8VyS0QAUpMlsAqQBNE+IIOBlT7gAUEqmPKLXkJDKDfd5DXHxfh/R4+vy0YXP/0Tfpy/Q9396fiHkSSUZTSp/er73dbKKTPxx584f6TP0JvoM5kg9fX+pIU1vvGq6Tb+KzH/vTmJe4ZttNmWLQlVDfj790ehSqw1ag2HLdPtSu8MA2elt5DkiCmqTRk6a82HPcbL5rf8Rir9es2nxYmGU8qmFQ5ogzhr00YmsIb1Fgl/Ne8tJEtn/yqoF8oTxluGFRWpx1ta6Ey0t/D+IWiXwQR9JlniB+INETY9Gc/nn5ayWliuHPfKHP9Htwk29pxaQa799hr4d3VVs5cTYml0BK0rmktmO5XAvEoDYgw6PuL5nm6q57wTQNezgW6MH5BVnzojrYU90DxwAE2eQTlmU04C2KIHafO4ywIsZQXeayoyQMBhw/rJImDm26vFxWe/d98D8Z/eurErP/uqR2+bNF548Vyn/0ZYLG1zpu8jwqX8p33rw3bNX/qGvtXX3uQpxeYn9tKQKKK8ULh37qAd620YAkLADOqghNkBm0QO9U4hH1dU7RdUVPRA9IOQjxJBX9E6JHhCPQwfbEABgSk5j3XwCnepCHFggWQa4Ai8DAf1wQEdi5armlqnX0W7kFFr41pa1eCAk6A5DKq7fOf452k08a1vIaSynbXCkADDoL4Mtw3AcflcD8FYHI53FWbh87Bd+zQkfEQWv3mYXvCR+wDbV8ECwFtWeOVNLno+EAUyHI2Ggh+InBPKnlXmtLTr7Ei+FimrD+NmBA+jaU32ZQgdto22M/lH6H0YYRJwBIMegq/mudEaJi7o07LJy4QvwL6omFda+Sz9/990bx03sa8+IdNzIstXSnojUUBLp/Qdck4J37fzqSF/HlY+xvFBb6E/gB7SMIxge76lBsseBK/SPi2M3X0j29t+rsqryYN9XWXnzF1Kab9wLine truncated
|
||||
@font-face{font-family:dashicons;src:url(../fonts/dashicons.eot)}@font-face{font-family:dashicons;src:url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAGBQAA4AAAAAm3wAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABRAAAABwAAAAcbYyDmkdERUYAAAFgAAAAHgAAACABIwAET1MvMgAAAYAAAABAAAAAYJYFaatjbWFwAAABwAAAASoAAAKC/cQq02dhc3AAAALsAAAACAAAAAj//wADZ2x5ZgAAAvQAAFSXAACESOAO2gZoZWFkAABXjAAAAC4AAAA2CEgozmhoZWEAAFe8AAAAGgAAACQPogifaG10eAAAV9gAAAEcAAAD2GOq3ltsb2NhAABY9AAAAe4AAAHu4pbA6m1heHAAAFrkAAAAHwAAACABSQC1bmFtZQAAWwQAAAGKAAADLCbHbA5wb3N0AABckAAAA7UAAAmnz3C/rndlYmYAAGBIAAAABgAAAAY81VSHAAAAAQAAAADMPaLPAAAAANCh83cAAAAA0KztU3jaY2BkYGDgA2IJBhBgYmAEwq9AzALmMQAADtEBKAAAeNpjYGY/yTiBgZWBhVWEZQMDA8M0CM20h8GIKQLIB0phB6He4X4MDqp/vqqzXwDxgaQGkGJEUqLAwAgAMrcKp3ja3ZA7SwNRFITPNTGy7N3jglosWCxIkHRBVAw2q6JJQEWMILGQ9dHEKjZCwCKNhZ2t/8hGG1EwWKuVOvehjbouCVhYWzlw5jAwfMUQUYZ6N0oidRLHaRLdnBVx+jcoon4azn/AwRACjKGAIqZRwgIWUUEdO2ighRMllKMCVVAlFal57ehAF3RJV03VbJq6iU3DtMypObdZ69jAjicJUUol+BhBiHxKncAMopRaRg0x9nCItiKVUb4KVbFLFdrXoS7qyFTMWpe6a5qmbc4s2Zz1bZgknYHBLH/xJ7/zG7/yCz/zEz/yA9/zLd/wFV/wKq9wmed4lqd40jvymt6Bt+9ty1huybqsyXW5LJdk5HbcO/favewt8/cSOfpBi77U+n4X6N/rG5Q9gGkAAAAAAAH//wACeNqsvQd8FGX6OD7vzM7Mbtpmsy1tN9lsS9nUbSFlEyD00EKLBaQsPWAUaRJQMSIqJTZsiA0Re1TkLBxnO107clFPDz3Uk+PUO/WOrwdJ9vX3PO/sJhvE+973//lnM/O+887MO++85enPM5zIwR85xR/iBE7iNFwKp+W4Sp1NJ+hterOO2JKJTk9O9T5CH4s8QneQ6Y9EHuEPRZvIDdzPtOdnQqMfcj8TD+W5nznCJfxVchzPhbmo/ILUC3X6OU5DgiFiMluJ2SoEghoiS4Y8YjLIabwswc7Kh0gwEAzxwUAVlFcFxf3R+l1Z626pKX1gWknd7JYVNdGHovVPWSzLLJacUYtNI+y+KRXy2CWXXOIr8KY2+3It0+DUNIuwiX91V26q3WXdUpaZa0slKdGH+FefYmenW3ICY9Mr7b5LLlkyVq6Y7Cto0q0cmcPq5AjxcBGpUVZzGdAntiqTUWeQSgjR2Qtcfp0vQE4JnS1r1rREaEoEUlm9piXa1LKGppBTa1r4Qy1r4LUF7t9QxyfSR9CXaawes6whbg3xe0UC3Yqb1HjHsuj66Ppl/I+kKxLdz7f2TRHyabtq0x3L+GtZOW2P3Bl9OPooP4NqySmaAvVGuF1ym1zDZXIurg7qNaVrSRpxkwYS8LldBVpCXAHI52vYsSQTyWA2BWRikrREyne70htIiJhZaZX0j02b7mj5chmRmpsbGhqebphIn7AMa7n9CrKw/1velJdX0JoX/RaTMrLHiifo7iuUW+j8xsaGp6VDWHJ7yzArESc2QwWNjc30iWVfttyxqW8WVHB+Xj5vjX7D0jfIPezEpk1k0Sa4xULnNTzd2MBxKpgfYXinNk7P5XBFOEeIzucqIW6bbC+QoPdNXltVgKsyGaQCl0+06Vga8FaZdTbo0IFD0VBb9NA1tP2ah4pqa4uEk0W10cYjN9105CbhIDkFyU1LzDm0B/pUyQud/KGi2kiktijaBDfwz2DxEVXfiSV4j0jOUHkpvZ8dcPzAnBBgRDkcPtFmtOm8fKtwsu+AkN+fGSGnREPvd+GIaMDx/4Y7If1FOsmp4Z0cOOvdJICzXgwSOY3YbbJU4Hb5GuBNAxrljEzEPHroRdKUfaHLndH/+gXCNWurvp1HOzo8HR6Pp6NekEhTFp7LpoekXOVSvdt1wdvt/RumV42Ai0o2ejpI59xTdC+cyoBT2fRFWH8R7nUpKvVzRs4GbZdUboI9FiSujGDAYdbwJgkXGps/sBqlzgX0H5dHvxp/9Jbx/Dafb8EcolpD/0yyibWoune3dbrFarVMt1qEnxf4fNHLxt9ydBxvvZxkLJhT7aF/pidI3uqfo3kWS+xCTiAe4pHV0l5Y/yXcGGV07bbBkSVeHNoSYsSBrCd2HM1a7BhYevEjPx5Z4leyIffL6tqi3u9wrEVDUW1/ZhizYUuxZSBDTp2jrEvVjfm+KTjoltqW2l1Gi8W4CzK8C3P0/sSy6KeYY+CR6+Lul0fLrTCiHIFhdEm49MwydKcKupK4g6YAri6V4SDf8ZtJr4ya0KT3/eZHejJAPwy85SfmH6GwacIovXT/weg1B336URNGvTz54I/0b4G3AqQULvgnK2x6BeabAebbIZhvmVwFPLugTFVOXCHBWwXzJE0UnJBaSJrKXlDGl0PnhIhXZbpwasCTpRMESSppWBRavLUsjah0mSX+TST9sj9s1Pof3PvlwkVfPHGj233ZB5ervK76cePq9frg8gUTStc8MlvOGjN8yjD614Nbjq44I2rd1kyzrSAl+Uz7e5sVGB6W1dAeN1cOb2+XZHhvSTba/C637A663HadNxB0B82BoN9mNJmDZtlk9nJVAZ+rQDLI6k+zg3cevbN1Me1Z3Hpnz53BzE8/MQ+DkhltxMNKhpk/6a863d19ulvIXz4TzsAln2YG4UzrYlK0cDaUBHJiJbMX0uHdeC1rV0QukKcCjIVR4UwZgEVUbkEUbG5lemdUBfysDVLDS6NGzW2nb259kX64i/aEhZwxlavmEr585aRJKyfJZS9RSn+e2+5vpM/m0W0RgdxAGlbNHRU9Pqk6CFfgs0ih3AbzWIcrmlSpzHIZzE9J9mqIN5Dh0Bc43EErzNFA0K4h9jRBOHkn0c1/NPTCsrt/LDhJ76f3H8l8hZQ+fhf9YaCUzCFzjmRsOPi9tHdT+6stc1+7lbaTrv0kY09vZ6yAdNH2TZ/dO5tDWBmB91XWUhas5qJfriYuX2WWVPkOd0DF3ttURQBS+eHH1stWtl7WwXoJkhbi27CBvkOfoO9s2MA/uGbvmjV7Yf56ercSj5CPoA0v7s+EvTBuz44de2A7jhetie4Ph8PQnlQuAmu7DeaFFqC3GcYgD2ZICcyRIFfLNcBqn3CO9W7T2fTQJG9si0P2ILTTCeeGHMN5VcKx3Abv4GDvcKyottfBQC7xKP99K4otsMIj2GF8KyLM/mhCyaGhV5AuBBsxEKL6BAo8EfZHUyzsqnAYcLonnocTsSy8N+KDsLSX0QjWoVSCLUYluIOwMGCVwFIAiuFkjGKgPZAR9vb2huP/SD/0H4/TD0J+y5r+JxJOIy7hYMyPwLNk6OU8xCV6ux5oCQcb3YBPcJrMLnuBSnY57AVyICicjJrKIhW3CCeFk/3DW2oBioX50vZMX9Eh+vLs2fTlQ4X+zHbhJCnuO6haXYt9EWavFv39n299Vn5+9+7n5WdvVXCePFJeA9SgDikYINIQ8dmAfkN0Jkt3bLdYaEvfAVXJAeu06F/5rB3Rk2Pk1u1AY9Gp/cPEYwcspP8mPnNH9K89HNCV8AfvcQRmip1rhZW7jGuHonS+jDjyVWmET8+wEpi5IQJz2JSRzuM0dkFpgNGMLlmyF7gDDi8sPJdkNAAFaTKbAGkAzRMiCHjZFS4AlJIpj+g1JKRyw3leQ1y830f0eLt8ZOHzP9H36Qv0/Z+eXwh5UklGk8qfnu97nawkE3/cseNH+gy9iT6DOVJP319qSNMbr5pu068k89+7k5jbfLPNpmxRqGrIz6c/Gl1qtUFrMGyebl9qdxggO72dPEdEQW3SyElzPuw9Rja99T9C8derNy5eLIxSHrXwrCaIs4Y8dCJrSF+R4Ffz3nKSRPa9snKBPGG8ZXhhkVqctaXueEsL/w+iVgl80EeSJV4g/iBR0yPRXP55Oaul5cphj/zhT3SbcFPfyQXk2m+foW9HdxZbOTE2Z9tgRslcMluxHK5FAhB7yOYR1/VuVTX3Hwe6hm18a3S/3Hb6tLgO1kTP4AYwcQbpkkU5DWiLEqjN5y4DvJgRdKepzAgJgwHnL4uEmWOrHh+X9d59D8x/ds+KqvTsrx65bd584clzlfIfbb6wwZW+kwyf+pfyLQfePXPlH/pbW3edqxCnlzhAS6qA8krh0vEd9UBv2wgAErbBC2qIDZBZdH/fFOJRdfdNUXVH90f3C/kIMeS2vinR/eIxeMF2BACYklNYN59Ap7oQBxZIlkGuwMtAwAAc0JFYuaq5Zep1tAc5hRa+tWUNbggJesKQiut2jH+O9hDPmhZyCstpO2wpAAwGymDJMByHz9UAvNVBT2dxFi4f3wuf5oSHiIJXb7MLXhLfYJlqeCBYi2pPn64lz0fCAKbDkTDQQ/EdAvlTyrjWFp15iZdCRbVhfOzgBnTtyf5MoZO203ZG/yjvH0YYRJwBIMfgVfNd6YwSF3Vp+MrKgS/Av6iaVFj7Lv383XdvHDexvyMj0nkjy1ZLuyNSQ0mk7x9wTAretfOrIv2dVz7G8kJtoT+BH9AyjmB4/E0Nkj0OXOH9uDh284Vk78C5KqsqD9Z9lZU3fyGl+caN8535J+zLine truncated
|
||||
+229
-71
@@ -13,9 +13,12 @@
|
||||
}
|
||||
|
||||
/* TinyMCE windows */
|
||||
#mce-modal-block.mce-in {
|
||||
#mce-modal-block,
|
||||
#mce-modal-block.mce-fade {
|
||||
opacity: 0.7;
|
||||
filter: alpha(opacity=70);
|
||||
-webkit-transition: none;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.mce-window {
|
||||
@@ -24,6 +27,8 @@
|
||||
-webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
||||
box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
-webkit-transition: none;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.mce-window .mce-container-body.mce-abs-layout {
|
||||
@@ -66,7 +71,7 @@
|
||||
}
|
||||
|
||||
.mce-window .mce-window-head .mce-close:hover:before {
|
||||
color: #2ea2cc;
|
||||
color: #00a0d2;
|
||||
}
|
||||
|
||||
.mce-window .mce-window-head .mce-dragh {
|
||||
@@ -154,6 +159,108 @@ div.mce-toolbar-grp {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div.mce-inline-toolbar-grp {
|
||||
border: 1px solid #a0a5aa;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
-webkit-box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.15 );
|
||||
box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.15 );
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 8px;
|
||||
position: absolute;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
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: -18px;
|
||||
border-bottom-color: #a0a5aa;
|
||||
border-width: 9px;
|
||||
margin-right: -9px;
|
||||
}
|
||||
|
||||
div.mce-inline-toolbar-grp.mce-arrow-down:before {
|
||||
bottom: -18px;
|
||||
border-top-color: #a0a5aa;
|
||||
border-width: 9px;
|
||||
margin-right: -9px;
|
||||
}
|
||||
|
||||
div.mce-inline-toolbar-grp.mce-arrow-up:after {
|
||||
top: -16px;
|
||||
border-bottom-color: #f5f5f5;
|
||||
border-width: 8px;
|
||||
margin-right: -8px;
|
||||
}
|
||||
|
||||
div.mce-inline-toolbar-grp.mce-arrow-down:after {
|
||||
bottom: -16px;
|
||||
border-top-color: #f5f5f5;
|
||||
border-width: 8px;
|
||||
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;
|
||||
}
|
||||
@@ -183,7 +290,7 @@ div.mce-path {
|
||||
}
|
||||
|
||||
.mce-toolbar .mce-btn,
|
||||
.qt-fullscreen {
|
||||
.qt-dfw {
|
||||
border-color: transparent;
|
||||
background: transparent;
|
||||
-webkit-box-shadow: none;
|
||||
@@ -194,7 +301,7 @@ div.mce-path {
|
||||
|
||||
#wp-fullscreen-buttons .mce-btn,
|
||||
.mce-toolbar .mce-btn-group .mce-btn,
|
||||
.qt-fullscreen {
|
||||
.qt-dfw {
|
||||
border: 1px solid transparent;
|
||||
margin: 2px;
|
||||
background-image: none;
|
||||
@@ -208,19 +315,21 @@ div.mce-path {
|
||||
.mce-toolbar .mce-btn-group .mce-btn:hover,
|
||||
#wp-fullscreen-buttons .mce-btn:focus,
|
||||
.mce-toolbar .mce-btn-group .mce-btn:focus,
|
||||
.qt-fullscreen:hover,
|
||||
.qt-fullscreen:focus {
|
||||
.qt-dfw:hover,
|
||||
.qt-dfw:focus {
|
||||
background: #fafafa;
|
||||
border-color: #999;
|
||||
color: #222;
|
||||
color: #23282d;
|
||||
-webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba( 0, 0, 0, 0.08 );
|
||||
box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba( 0, 0, 0, 0.08 );
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.mce-toolbar .mce-btn-group .mce-btn.mce-active,
|
||||
#wp-fullscreen-buttons .mce-btn.mce-active,
|
||||
.mce-toolbar .mce-btn-group .mce-btn:active,
|
||||
#wp-fullscreen-buttons .mce-btn:active {
|
||||
#wp-fullscreen-buttons .mce-btn:active,
|
||||
.qt-dfw.active {
|
||||
background: #ebebeb;
|
||||
border-color: #999;
|
||||
-webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.3 );
|
||||
@@ -239,7 +348,7 @@ div.mce-path {
|
||||
#wp-fullscreen-buttons .mce-btn.mce-disabled:hover,
|
||||
.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus,
|
||||
#wp-fullscreen-buttons .mce-btn.mce-disabled:focus {
|
||||
color: #aaa;
|
||||
color: #a0a5aa;
|
||||
background: none;
|
||||
border-color: #ddd;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
@@ -253,7 +362,7 @@ div.mce-path {
|
||||
}
|
||||
|
||||
.mce-toolbar .mce-btn button,
|
||||
.qt-fullscreen {
|
||||
.qt-dfw {
|
||||
padding: 2px 3px;
|
||||
line-height: normal;
|
||||
}
|
||||
@@ -293,7 +402,7 @@ div.mce-path {
|
||||
|
||||
.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:hover {
|
||||
background-image: none;
|
||||
border-color: #bbb;
|
||||
border-color: #b4b9be;
|
||||
}
|
||||
|
||||
.mce-toolbar .mce-btn-group .mce-btn.mce-listbox span {
|
||||
@@ -317,12 +426,12 @@ div.mce-path {
|
||||
}
|
||||
|
||||
.mce-panel .mce-btn:hover i.mce-caret {
|
||||
border-top-color: #333;
|
||||
border-top-color: #32373c;
|
||||
}
|
||||
|
||||
.mce-panel .mce-active i.mce-caret {
|
||||
border-top: 0;
|
||||
border-bottom: 6px solid #333;
|
||||
border-bottom: 6px solid #32373c;
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
@@ -349,7 +458,7 @@ div.mce-path {
|
||||
.mce-menu .mce-menu-item.mce-selected,
|
||||
.mce-menu .mce-menu-item:focus {
|
||||
color: #000;
|
||||
background-color: #bbb;
|
||||
background-color: #b4b9be;
|
||||
background-image: none;
|
||||
-webkit-filter: none;
|
||||
filter: none;
|
||||
@@ -431,7 +540,7 @@ div.mce-menu .mce-menu-item-sep,
|
||||
.mce-window .mce-btn:focus {
|
||||
background: #fafafa;
|
||||
border-color: #999;
|
||||
color: #222;
|
||||
color: #23282d;
|
||||
}
|
||||
|
||||
.mce-window .mce-btn:focus {
|
||||
@@ -446,13 +555,13 @@ div.mce-menu .mce-menu-item-sep,
|
||||
.mce-window .mce-btn:active {
|
||||
background: #eee;
|
||||
border-color: #999;
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
-webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
|
||||
box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
|
||||
}
|
||||
|
||||
.mce-window .mce-btn.mce-disabled {
|
||||
color: #aaa;
|
||||
color: #a0a5aa;
|
||||
border-color: #ddd;
|
||||
background: #f7f7f7;
|
||||
-webkit-box-shadow: none;
|
||||
@@ -462,8 +571,8 @@ div.mce-menu .mce-menu-item-sep,
|
||||
}
|
||||
|
||||
.mce-window .mce-btn.mce-primary {
|
||||
background: #2ea2cc;
|
||||
border-color: #0074a2;
|
||||
background: #00a0d2;
|
||||
border-color: #0073aa;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.5), 0 1px 0 rgba( 0, 0, 0, 0.15 );
|
||||
box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.5 ), 0 1px 0 rgba( 0, 0, 0, 0.15 );
|
||||
color: #fff;
|
||||
@@ -473,7 +582,7 @@ div.mce-menu .mce-menu-item-sep,
|
||||
.mce-window .mce-btn.mce-primary:hover,
|
||||
.mce-window .mce-btn.mce-primary:focus {
|
||||
background: #1e8cbe;
|
||||
border-color: #0074a2;
|
||||
border-color: #0073aa;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.6 );
|
||||
box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.6 );
|
||||
color: #fff;
|
||||
@@ -568,7 +677,7 @@ div.mce-menu .mce-menu-item-sep,
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.qt-fullscreen {
|
||||
.qt-dfw {
|
||||
color: #777;
|
||||
line-height: 20px;
|
||||
width: 28px;
|
||||
@@ -602,6 +711,7 @@ 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,
|
||||
@@ -621,6 +731,8 @@ 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,
|
||||
.mce-close {
|
||||
font: normal 20px/1 'dashicons';
|
||||
padding: 0;
|
||||
@@ -632,7 +744,7 @@ i.mce-i-hr,
|
||||
padding-left: 2px;
|
||||
}
|
||||
|
||||
.qt-fullscreen {
|
||||
.qt-dfw {
|
||||
font: normal 20px/1 'dashicons';
|
||||
vertical-align: top;
|
||||
speak: none;
|
||||
@@ -694,7 +806,8 @@ i.mce-i-spellchecker:before {
|
||||
|
||||
i.mce-i-fullscreen:before,
|
||||
i.mce-i-wp_fullscreen:before,
|
||||
.qt-fullscreen:before {
|
||||
i.mce-i-dfw:before,
|
||||
.qt-dfw:before {
|
||||
content: '\f211';
|
||||
}
|
||||
|
||||
@@ -768,10 +881,19 @@ i.mce-i-hr:before {
|
||||
content: '\f158';
|
||||
}
|
||||
|
||||
.mce-i-wp_code:before {
|
||||
i.mce-i-wp_code:before {
|
||||
content: '\f475';
|
||||
}
|
||||
|
||||
/* RTL button icons */
|
||||
.rtl i.mce-i-outdent:before {
|
||||
content: '\f222';
|
||||
}
|
||||
|
||||
.rtl i.mce-i-indent:before {
|
||||
content: '\f221';
|
||||
}
|
||||
|
||||
/* Editors */
|
||||
.wp-editor-wrap {
|
||||
position: relative;
|
||||
@@ -807,6 +929,14 @@ i.mce-i-hr:before {
|
||||
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;
|
||||
@@ -819,26 +949,44 @@ i.mce-i-hr:before {
|
||||
}
|
||||
|
||||
.wp-switch-editor {
|
||||
background: #ebebeb;
|
||||
border: 1px solid #dedede;
|
||||
color: #777;
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
font: 13px/19px "Open Sans", sans-serif;
|
||||
height: 19px;
|
||||
margin: 5px 5px 0 0;
|
||||
padding: 3px 8px 4px;
|
||||
float: right;
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
background: #ebebeb;
|
||||
color: #777;
|
||||
cursor: pointer;
|
||||
font: 13px/19px "Open Sans", sans-serif;
|
||||
height: 20px;
|
||||
margin: 5px 5px 0 0;
|
||||
padding: 3px 8px 4px;
|
||||
border: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.wp-switch-editor:focus {
|
||||
-webkit-box-shadow:
|
||||
0 0 0 1px #5b9dd9,
|
||||
0 0 2px 1px rgba(30, 140, 190, .8);
|
||||
box-shadow:
|
||||
0 0 0 1px #5b9dd9,
|
||||
0 0 2px 1px rgba(30, 140, 190, .8);
|
||||
outline: none;
|
||||
color: #23282d;
|
||||
}
|
||||
|
||||
.wp-switch-editor:active,
|
||||
.html-active .switch-html:focus,
|
||||
.tmce-active .switch-tmce:focus {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.wp-switch-editor:active {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
.wp-switch-editor:hover {
|
||||
text-decoration: none !important;
|
||||
background: #fff;
|
||||
background-color: #f5f5f5;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.js .tmce-active .wp-editor-area {
|
||||
@@ -853,8 +1001,7 @@ i.mce-i-hr:before {
|
||||
.html-active .switch-html {
|
||||
background: #f5f5f5;
|
||||
color: #555;
|
||||
height: 20px;
|
||||
border-bottom: none;
|
||||
border-bottom-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.wp-media-buttons {
|
||||
@@ -945,17 +1092,22 @@ i.mce-i-hr:before {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.mce-toolbar .mce-btn-group .mce-btn.mce-wp-fullscreen,
|
||||
.qt-fullscreen {
|
||||
.mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw,
|
||||
.qt-dfw {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
margin: 5px 0 0 5px;
|
||||
}
|
||||
|
||||
.qt-fullscreen {
|
||||
position: static;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 782px ) {
|
||||
.mce-toolbar .mce-btn button,
|
||||
.qt-fullscreen {
|
||||
.qt-dfw {
|
||||
padding: 6px 7px;
|
||||
}
|
||||
|
||||
@@ -964,12 +1116,12 @@ i.mce-i-hr:before {
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
.qt-fullscreen {
|
||||
.qt-dfw {
|
||||
width: 36px;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
.mce-toolbar .mce-btn-group .mce-btn.mce-wp-fullscreen {
|
||||
.mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw {
|
||||
margin: 4px 0 0 4px;
|
||||
}
|
||||
|
||||
@@ -1037,7 +1189,6 @@ i.mce-i-hr:before {
|
||||
-webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
||||
box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
||||
width: 500px;
|
||||
height: 250px;
|
||||
overflow: hidden;
|
||||
margin-right: -250px;
|
||||
margin-top: -125px;
|
||||
@@ -1073,6 +1224,14 @@ i.mce-i-hr:before {
|
||||
margin-top: -250px;
|
||||
}
|
||||
|
||||
#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: #fcfcfc;
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
@@ -1113,7 +1272,7 @@ i.mce-i-hr:before {
|
||||
|
||||
#wp-link-close:hover,
|
||||
#wp-link-close:focus {
|
||||
color: #2ea2cc;
|
||||
color: #00a0d2;
|
||||
}
|
||||
|
||||
#wp-link-close:focus {
|
||||
@@ -1131,6 +1290,7 @@ i.mce-i-hr:before {
|
||||
}
|
||||
|
||||
#wp-link-wrap.search-panel-visible #link-selector {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
padding: 0 16px;
|
||||
position: absolute;
|
||||
top: 36px;
|
||||
@@ -1215,8 +1375,7 @@ i.mce-i-hr:before {
|
||||
}
|
||||
|
||||
#wp-link .link-search-wrapper .spinner {
|
||||
display: none;
|
||||
vertical-align: text-bottom;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#wp-link .link-target {
|
||||
@@ -1239,6 +1398,10 @@ i.mce-i-hr:before {
|
||||
right: 16px;
|
||||
left: 16px;
|
||||
bottom: 16px;
|
||||
top: 172px;
|
||||
}
|
||||
|
||||
.has-text-field #wp-link .query-results {
|
||||
top: 205px;
|
||||
}
|
||||
|
||||
@@ -1246,7 +1409,7 @@ i.mce-i-hr:before {
|
||||
clear: both;
|
||||
margin-bottom: 0;
|
||||
border-bottom: 1px solid #f1f1f1;
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
padding: 4px 10px 4px 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
@@ -1263,7 +1426,7 @@ i.mce-i-hr:before {
|
||||
#wp-link .query-notice .query-notice-hint {
|
||||
display: block;
|
||||
padding: 6px;
|
||||
border-right: 4px solid #2ea2cc;
|
||||
border-right: 4px solid #00a0d2;
|
||||
}
|
||||
|
||||
#wp-link .unselectable.no-matches-found {
|
||||
@@ -1294,12 +1457,12 @@ i.mce-i-hr:before {
|
||||
#wp-link li.unselectable:hover {
|
||||
background: #fff;
|
||||
cursor: auto;
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
}
|
||||
|
||||
#wp-link li.selected {
|
||||
background: #ddd;
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
}
|
||||
|
||||
#wp-link li.selected .item-title {
|
||||
@@ -1315,6 +1478,7 @@ i.mce-i-hr:before {
|
||||
width: 80%;
|
||||
width: -webkit-calc(100% - 68px);
|
||||
width: calc(100% - 68px);
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#wp-link .item-info {
|
||||
@@ -1340,12 +1504,6 @@ i.mce-i-hr:before {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
#wp-link .river-waiting .spinner {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
float: none;
|
||||
}
|
||||
|
||||
#wp-link .submitbox {
|
||||
padding: 8px 16px;
|
||||
background: #fcfcfc;
|
||||
@@ -1373,11 +1531,14 @@ i.mce-i-hr:before {
|
||||
|
||||
@media screen and ( max-width: 782px ) {
|
||||
#wp-link-wrap {
|
||||
height: 280px;
|
||||
margin-top: -140px;
|
||||
}
|
||||
|
||||
#wp-link-wrap.search-panel-visible .query-results {
|
||||
top: 195px;
|
||||
}
|
||||
|
||||
#wp-link-wrap.search-panel-visible.has-text-field .query-results {
|
||||
top: 235px;
|
||||
}
|
||||
|
||||
@@ -1533,7 +1694,7 @@ i.mce-i-hr:before {
|
||||
|
||||
.clearlooks2 .mceTop span,
|
||||
.clearlooks2 .mceFocus .mceTop span {
|
||||
color: #222;
|
||||
color: #23282d;
|
||||
}
|
||||
|
||||
.clearlooks2 .mceClose:before {
|
||||
@@ -1541,10 +1702,10 @@ i.mce-i-hr:before {
|
||||
}
|
||||
|
||||
.clearlooks2 .mceClose:hover:before {
|
||||
color: #2ea2cc;
|
||||
color: #00a0d2;
|
||||
}
|
||||
*/
|
||||
/* Distraction Free Writing mode
|
||||
/* Distraction-Free Writing mode
|
||||
* =Overlay Styles
|
||||
-------------------------------------------------------------- */
|
||||
.fullscreen-overlay {
|
||||
@@ -1656,7 +1817,7 @@ i.mce-i-hr:before {
|
||||
}
|
||||
|
||||
#wp-fullscreen-tagline {
|
||||
color: #888;
|
||||
color: #82878c;
|
||||
font-size: 18px;
|
||||
float: left;
|
||||
padding: 4px 0 0;
|
||||
@@ -1740,7 +1901,7 @@ i.mce-i-hr:before {
|
||||
white-space: nowrap;
|
||||
width: auto;
|
||||
background: none;
|
||||
color: #333333;
|
||||
color: #32373c;
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
line-height: 20px;
|
||||
@@ -1956,12 +2117,12 @@ i.mce-i-hr:before {
|
||||
font-family: Tahoma, sans-serif;
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.mce-rtl .mce-flow-layout .mce-flow-layout-item > div {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.mce-rtl .mce-listbox i.mce-caret {
|
||||
left: 6px;
|
||||
}
|
||||
@@ -1973,7 +2134,6 @@ html:lang(he-il) .rtl .quicktags-toolbar input {
|
||||
|
||||
/* HiDPI */
|
||||
@media print,
|
||||
(-o-min-device-pixel-ratio: 5/4),
|
||||
(-webkit-min-device-pixel-ratio: 1.25),
|
||||
(min-resolution: 120dpi) {
|
||||
.wp-media-buttons .add_media span.wp-media-buttons-icon,
|
||||
@@ -1981,5 +2141,3 @@ html:lang(he-il) .rtl .quicktags-toolbar input {
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: DFW responsive */
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
.mce-container,.mce-container *,.mce-widget,.mce-widget *{color:inherit;font-family:inherit}#mce-modal-block.mce-in{opacity:.7;filter:alpha(opacity=70)}.mce-window{-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);-webkit-font-smoothing:subpixel-antialiased}.mce-window .mce-container-body.mce-abs-layout{overflow:visible}.mce-window .mce-window-head{background:#fcfcfc;border-bottom:1px solid #dfdfdf;padding:0;min-height:36px}.mce-window .mce-window-head .mce-title{color:#444;font-size:18px;font-weight:600;line-height:36px;margin:0;padding:0 16px 0 36px}.mce-window .mce-window-head .mce-close{color:transparent;top:0;left:0;width:36px;height:36px;line-height:36px;text-align:center}.mce-window .mce-window-head .mce-close:before{font:400 20px/36px dashicons;text-align:center;color:#666;width:36px;height:36px;display:block}.mce-window .mce-window-head .mce-close:hover:before{color:#2ea2cc}.mce-window .mce-window-head .mce-dragh{width:-webkit-calc(100% - 36px);width:calc(100% - 36px)}.mce-wp-help .mce-window-head{border-bottom:none}#wp-link .query-results,.mce-checkbox i.mce-i-checkbox,.mce-textbox{border:1px solid #ddd;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);-webkit-transition:.05s all ease-in-out;transition:.05s all ease-in-out}#wp-link .query-results:focus,.mce-checkbox:focus i.mce-i-checkbox,.mce-textbox.mce-focus,.mce-textbox:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.mce-floatpanel.mce-popover,.mce-menu{border-color:rgba(0,0,0,.15);-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.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}.mce-menu-has-icons i.mce-ico{line-height:20px}div.mce-panel{border:0;background:#fff;-webkit-filter:none;filter:none}.mce-panel.mce-menu{border:1px solid #ddd}div.mce-tab{line-height:13px}div.mce-toolbar-grp{border-bottom:1px solid #dedede;background:#f5f5f5;padding:0;position:relative}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}div.mce-statusbar{border-top:1px solid #e5e5e5}div.mce-path{padding:2px 10px;margin:0}.mce-path,.mce-path .mce-divider,.mce-path-item{font-size:12px;line-height:18px}.mce-toolbar .mce-btn,.qt-fullscreen{border-color:transparent;background:0 0;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;cursor:pointer}#wp-fullscreen-buttons .mce-btn,.mce-toolbar .mce-btn-group .mce-btn,.qt-fullscreen{border:1px solid transparent;margin:2px;background-image:none;-webkit-border-radius:2px;border-radius:2px;-webkit-filter:none;filter:none}#wp-fullscreen-buttons .mce-btn:focus,#wp-fullscreen-buttons .mce-btn:hover,.mce-toolbar .mce-btn-group .mce-btn:focus,.mce-toolbar .mce-btn-group .mce-btn:hover,.qt-fullscreen:focus,.qt-fullscreen:hover{background:#fafafa;border-color:#999;color:#222;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08)}#wp-fullscreen-buttons .mce-btn.mce-active,#wp-fullscreen-buttons .mce-btn:active,.mce-toolbar .mce-btn-group .mce-btn.mce-active,.mce-toolbar .mce-btn-group .mce-btn:active{background:#ebebeb;border-color:#999;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.3);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.3)}.mce-toolbar .mce-btn-group .mce-btn.mce-active:hover{border-color:#555}.mce-toolbar .mce-btn-group .mce-btn.mce-active:hover i.mce-ico{color:#555}#wp-fullscreen-buttons .mce-btn.mce-disabled:focus,#wp-fullscreen-buttons .mce-btn.mce-disabled:hover,.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:hover{color:#aaa;background:0 0;border-color:#ddd;text-shadow:0 1px 0 #fff;-webkit-box-shadow:none;box-shadow:none}.mce-toolbar .mce-btn-group .mce-first,.mce-toolbar .mce-btn-group .mce-last{border-color:transparent}.mce-toolbar .mce-btn button,.qt-fullscreen{padding:2px 3px;line-height:normal}.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}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox{-webkit-border-radius:0;border-radius:0;direction:rtl;background:#fff;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 1px -1px rgba(0,0,0,.2);box-shadow:inset 0 1px 1px -1px rgba(0,0,0,.2)}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:hover{background-image:none;border-color:#bbb}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox span{font-size:13px}.mce-panel .mce-btn i.mce-caret{bordeLine truncated
|
||||
.mce-container,.mce-container *,.mce-widget,.mce-widget *{color:inherit;font-family:inherit}#mce-modal-block,#mce-modal-block.mce-fade{opacity:.7;filter:alpha(opacity=70);-webkit-transition:none;transition:none}.mce-window{-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);-webkit-font-smoothing:subpixel-antialiased;-webkit-transition:none;transition:none}.mce-window .mce-container-body.mce-abs-layout{overflow:visible}.mce-window .mce-window-head{background:#fcfcfc;border-bottom:1px solid #dfdfdf;padding:0;min-height:36px}.mce-window .mce-window-head .mce-title{color:#444;font-size:18px;font-weight:600;line-height:36px;margin:0;padding:0 16px 0 36px}.mce-window .mce-window-head .mce-close{color:transparent;top:0;left:0;width:36px;height:36px;line-height:36px;text-align:center}.mce-window .mce-window-head .mce-close:before{font:400 20px/36px dashicons;text-align:center;color:#666;width:36px;height:36px;display:block}.mce-window .mce-window-head .mce-close:hover:before{color:#00a0d2}.mce-window .mce-window-head .mce-dragh{width:-webkit-calc(100% - 36px);width:calc(100% - 36px)}.mce-wp-help .mce-window-head{border-bottom:none}#wp-link .query-results,.mce-checkbox i.mce-i-checkbox,.mce-textbox{border:1px solid #ddd;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);-webkit-transition:.05s all ease-in-out;transition:.05s all ease-in-out}#wp-link .query-results:focus,.mce-checkbox:focus i.mce-i-checkbox,.mce-textbox.mce-focus,.mce-textbox:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.mce-floatpanel.mce-popover,.mce-menu{border-color:rgba(0,0,0,.15);-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.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}.mce-menu-has-icons i.mce-ico{line-height:20px}div.mce-panel{border:0;background:#fff;-webkit-filter:none;filter:none}.mce-panel.mce-menu{border:1px solid #ddd}div.mce-tab{line-height:13px}div.mce-toolbar-grp{border-bottom:1px solid #dedede;background:#f5f5f5;padding:0;position:relative}div.mce-inline-toolbar-grp{border:1px solid #a0a5aa;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.15);box-shadow:0 1px 3px rgba(0,0,0,.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:8px;position:absolute;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;z-index:100100}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:after,div.mce-inline-toolbar-grp:before{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:-18px;border-bottom-color:#a0a5aa;border-width:9px;margin-right:-9px}div.mce-inline-toolbar-grp.mce-arrow-down:before{bottom:-18px;border-top-color:#a0a5aa;border-width:9px;margin-right:-9px}div.mce-inline-toolbar-grp.mce-arrow-up:after{top:-16px;border-bottom-color:#f5f5f5;border-width:8px;margin-right:-8px}div.mce-inline-toolbar-grp.mce-arrow-down:after{bottom:-16px;border-top-color:#f5f5f5;border-width:8px;margin-right:-8px}div.mce-inline-toolbar-grp.mce-arrow-left:after,div.mce-inline-toolbar-grp.mce-arrow-left:before{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:after,div.mce-inline-toolbar-grp.mce-arrow-right:before{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}div.mce-statusbar{border-top:1px solid #e5e5e5}div.mce-path{padding:2px 10px;margin:0}.mce-path,.mce-path .mce-divider,.mce-path-item{font-size:12px;line-height:18px}.mce-toolbar .mce-btn,.qt-dfw{border-color:transparent;background:0 0;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;cursor:pointer}#wp-fullscreen-buttons .mce-btn,.mce-toolbar .mce-btn-group .mce-btn,.qt-dfw{border:1px solid transparent;margin:2px;background-image:none;-webkit-border-radius:2px;border-radius:2px;-webkit-filter:none;filter:none}#wp-fullscreen-buttons .mce-btn:focus,#wp-fullscreen-buttons .mce-btn:hover,.mce-toolbar .mce-btn-group .mce-btn:focus,.mce-toolbar .mce-btn-group .mce-btn:hover,.qt-dfw:focus,.qtLine truncated
|
||||
+229
-71
@@ -13,9 +13,12 @@
|
||||
}
|
||||
|
||||
/* TinyMCE windows */
|
||||
#mce-modal-block.mce-in {
|
||||
#mce-modal-block,
|
||||
#mce-modal-block.mce-fade {
|
||||
opacity: 0.7;
|
||||
filter: alpha(opacity=70);
|
||||
-webkit-transition: none;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.mce-window {
|
||||
@@ -24,6 +27,8 @@
|
||||
-webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
||||
box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
-webkit-transition: none;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.mce-window .mce-container-body.mce-abs-layout {
|
||||
@@ -66,7 +71,7 @@
|
||||
}
|
||||
|
||||
.mce-window .mce-window-head .mce-close:hover:before {
|
||||
color: #2ea2cc;
|
||||
color: #00a0d2;
|
||||
}
|
||||
|
||||
.mce-window .mce-window-head .mce-dragh {
|
||||
@@ -154,6 +159,108 @@ div.mce-toolbar-grp {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div.mce-inline-toolbar-grp {
|
||||
border: 1px solid #a0a5aa;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
-webkit-box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.15 );
|
||||
box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.15 );
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 8px;
|
||||
position: absolute;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
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;
|
||||
left: 50%;
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-style: solid;
|
||||
border-color: transparent;
|
||||
content: '';
|
||||
}
|
||||
|
||||
div.mce-inline-toolbar-grp.mce-arrow-up:before {
|
||||
top: -18px;
|
||||
border-bottom-color: #a0a5aa;
|
||||
border-width: 9px;
|
||||
margin-left: -9px;
|
||||
}
|
||||
|
||||
div.mce-inline-toolbar-grp.mce-arrow-down:before {
|
||||
bottom: -18px;
|
||||
border-top-color: #a0a5aa;
|
||||
border-width: 9px;
|
||||
margin-left: -9px;
|
||||
}
|
||||
|
||||
div.mce-inline-toolbar-grp.mce-arrow-up:after {
|
||||
top: -16px;
|
||||
border-bottom-color: #f5f5f5;
|
||||
border-width: 8px;
|
||||
margin-left: -8px;
|
||||
}
|
||||
|
||||
div.mce-inline-toolbar-grp.mce-arrow-down:after {
|
||||
bottom: -16px;
|
||||
border-top-color: #f5f5f5;
|
||||
border-width: 8px;
|
||||
margin-left: -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 {
|
||||
left: 20px;
|
||||
}
|
||||
div.mce-inline-toolbar-grp.mce-arrow-left:after {
|
||||
left: 21px;
|
||||
}
|
||||
|
||||
div.mce-inline-toolbar-grp.mce-arrow-right:before,
|
||||
div.mce-inline-toolbar-grp.mce-arrow-right:after {
|
||||
left: auto;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.mce-inline-toolbar-grp.mce-arrow-right:before {
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
div.mce-inline-toolbar-grp.mce-arrow-right:after {
|
||||
right: 21px;
|
||||
}
|
||||
|
||||
div.mce-inline-toolbar-grp.mce-arrow-full {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
div.mce-inline-toolbar-grp.mce-arrow-full > div {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
div.mce-toolbar-grp > div {
|
||||
padding: 3px;
|
||||
}
|
||||
@@ -183,7 +290,7 @@ div.mce-path {
|
||||
}
|
||||
|
||||
.mce-toolbar .mce-btn,
|
||||
.qt-fullscreen {
|
||||
.qt-dfw {
|
||||
border-color: transparent;
|
||||
background: transparent;
|
||||
-webkit-box-shadow: none;
|
||||
@@ -194,7 +301,7 @@ div.mce-path {
|
||||
|
||||
#wp-fullscreen-buttons .mce-btn,
|
||||
.mce-toolbar .mce-btn-group .mce-btn,
|
||||
.qt-fullscreen {
|
||||
.qt-dfw {
|
||||
border: 1px solid transparent;
|
||||
margin: 2px;
|
||||
background-image: none;
|
||||
@@ -208,19 +315,21 @@ div.mce-path {
|
||||
.mce-toolbar .mce-btn-group .mce-btn:hover,
|
||||
#wp-fullscreen-buttons .mce-btn:focus,
|
||||
.mce-toolbar .mce-btn-group .mce-btn:focus,
|
||||
.qt-fullscreen:hover,
|
||||
.qt-fullscreen:focus {
|
||||
.qt-dfw:hover,
|
||||
.qt-dfw:focus {
|
||||
background: #fafafa;
|
||||
border-color: #999;
|
||||
color: #222;
|
||||
color: #23282d;
|
||||
-webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba( 0, 0, 0, 0.08 );
|
||||
box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba( 0, 0, 0, 0.08 );
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.mce-toolbar .mce-btn-group .mce-btn.mce-active,
|
||||
#wp-fullscreen-buttons .mce-btn.mce-active,
|
||||
.mce-toolbar .mce-btn-group .mce-btn:active,
|
||||
#wp-fullscreen-buttons .mce-btn:active {
|
||||
#wp-fullscreen-buttons .mce-btn:active,
|
||||
.qt-dfw.active {
|
||||
background: #ebebeb;
|
||||
border-color: #999;
|
||||
-webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.3 );
|
||||
@@ -239,7 +348,7 @@ div.mce-path {
|
||||
#wp-fullscreen-buttons .mce-btn.mce-disabled:hover,
|
||||
.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus,
|
||||
#wp-fullscreen-buttons .mce-btn.mce-disabled:focus {
|
||||
color: #aaa;
|
||||
color: #a0a5aa;
|
||||
background: none;
|
||||
border-color: #ddd;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
@@ -253,7 +362,7 @@ div.mce-path {
|
||||
}
|
||||
|
||||
.mce-toolbar .mce-btn button,
|
||||
.qt-fullscreen {
|
||||
.qt-dfw {
|
||||
padding: 2px 3px;
|
||||
line-height: normal;
|
||||
}
|
||||
@@ -293,7 +402,7 @@ div.mce-path {
|
||||
|
||||
.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:hover {
|
||||
background-image: none;
|
||||
border-color: #bbb;
|
||||
border-color: #b4b9be;
|
||||
}
|
||||
|
||||
.mce-toolbar .mce-btn-group .mce-btn.mce-listbox span {
|
||||
@@ -317,12 +426,12 @@ div.mce-path {
|
||||
}
|
||||
|
||||
.mce-panel .mce-btn:hover i.mce-caret {
|
||||
border-top-color: #333;
|
||||
border-top-color: #32373c;
|
||||
}
|
||||
|
||||
.mce-panel .mce-active i.mce-caret {
|
||||
border-top: 0;
|
||||
border-bottom: 6px solid #333;
|
||||
border-bottom: 6px solid #32373c;
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
@@ -349,7 +458,7 @@ div.mce-path {
|
||||
.mce-menu .mce-menu-item.mce-selected,
|
||||
.mce-menu .mce-menu-item:focus {
|
||||
color: #000;
|
||||
background-color: #bbb;
|
||||
background-color: #b4b9be;
|
||||
background-image: none;
|
||||
-webkit-filter: none;
|
||||
filter: none;
|
||||
@@ -431,7 +540,7 @@ div.mce-menu .mce-menu-item-sep,
|
||||
.mce-window .mce-btn:focus {
|
||||
background: #fafafa;
|
||||
border-color: #999;
|
||||
color: #222;
|
||||
color: #23282d;
|
||||
}
|
||||
|
||||
.mce-window .mce-btn:focus {
|
||||
@@ -446,13 +555,13 @@ div.mce-menu .mce-menu-item-sep,
|
||||
.mce-window .mce-btn:active {
|
||||
background: #eee;
|
||||
border-color: #999;
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
-webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
|
||||
box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
|
||||
}
|
||||
|
||||
.mce-window .mce-btn.mce-disabled {
|
||||
color: #aaa;
|
||||
color: #a0a5aa;
|
||||
border-color: #ddd;
|
||||
background: #f7f7f7;
|
||||
-webkit-box-shadow: none;
|
||||
@@ -462,8 +571,8 @@ div.mce-menu .mce-menu-item-sep,
|
||||
}
|
||||
|
||||
.mce-window .mce-btn.mce-primary {
|
||||
background: #2ea2cc;
|
||||
border-color: #0074a2;
|
||||
background: #00a0d2;
|
||||
border-color: #0073aa;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.5), 0 1px 0 rgba( 0, 0, 0, 0.15 );
|
||||
box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.5 ), 0 1px 0 rgba( 0, 0, 0, 0.15 );
|
||||
color: #fff;
|
||||
@@ -473,7 +582,7 @@ div.mce-menu .mce-menu-item-sep,
|
||||
.mce-window .mce-btn.mce-primary:hover,
|
||||
.mce-window .mce-btn.mce-primary:focus {
|
||||
background: #1e8cbe;
|
||||
border-color: #0074a2;
|
||||
border-color: #0073aa;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.6 );
|
||||
box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.6 );
|
||||
color: #fff;
|
||||
@@ -568,7 +677,7 @@ div.mce-menu .mce-menu-item-sep,
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.qt-fullscreen {
|
||||
.qt-dfw {
|
||||
color: #777;
|
||||
line-height: 20px;
|
||||
width: 28px;
|
||||
@@ -602,6 +711,7 @@ 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,
|
||||
@@ -621,6 +731,8 @@ 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,
|
||||
.mce-close {
|
||||
font: normal 20px/1 'dashicons';
|
||||
padding: 0;
|
||||
@@ -632,7 +744,7 @@ i.mce-i-hr,
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
.qt-fullscreen {
|
||||
.qt-dfw {
|
||||
font: normal 20px/1 'dashicons';
|
||||
vertical-align: top;
|
||||
speak: none;
|
||||
@@ -694,7 +806,8 @@ i.mce-i-spellchecker:before {
|
||||
|
||||
i.mce-i-fullscreen:before,
|
||||
i.mce-i-wp_fullscreen:before,
|
||||
.qt-fullscreen:before {
|
||||
i.mce-i-dfw:before,
|
||||
.qt-dfw:before {
|
||||
content: '\f211';
|
||||
}
|
||||
|
||||
@@ -768,10 +881,19 @@ i.mce-i-hr:before {
|
||||
content: '\f158';
|
||||
}
|
||||
|
||||
.mce-i-wp_code:before {
|
||||
i.mce-i-wp_code:before {
|
||||
content: '\f475';
|
||||
}
|
||||
|
||||
/* RTL button icons */
|
||||
.rtl i.mce-i-outdent:before {
|
||||
content: '\f222';
|
||||
}
|
||||
|
||||
.rtl i.mce-i-indent:before {
|
||||
content: '\f221';
|
||||
}
|
||||
|
||||
/* Editors */
|
||||
.wp-editor-wrap {
|
||||
position: relative;
|
||||
@@ -807,6 +929,14 @@ i.mce-i-hr:before {
|
||||
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;
|
||||
@@ -819,26 +949,44 @@ i.mce-i-hr:before {
|
||||
}
|
||||
|
||||
.wp-switch-editor {
|
||||
background: #ebebeb;
|
||||
border: 1px solid #dedede;
|
||||
color: #777;
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font: 13px/19px "Open Sans", sans-serif;
|
||||
height: 19px;
|
||||
margin: 5px 0 0 5px;
|
||||
padding: 3px 8px 4px;
|
||||
float: left;
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
background: #ebebeb;
|
||||
color: #777;
|
||||
cursor: pointer;
|
||||
font: 13px/19px "Open Sans", sans-serif;
|
||||
height: 20px;
|
||||
margin: 5px 0 0 5px;
|
||||
padding: 3px 8px 4px;
|
||||
border: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.wp-switch-editor:focus {
|
||||
-webkit-box-shadow:
|
||||
0 0 0 1px #5b9dd9,
|
||||
0 0 2px 1px rgba(30, 140, 190, .8);
|
||||
box-shadow:
|
||||
0 0 0 1px #5b9dd9,
|
||||
0 0 2px 1px rgba(30, 140, 190, .8);
|
||||
outline: none;
|
||||
color: #23282d;
|
||||
}
|
||||
|
||||
.wp-switch-editor:active,
|
||||
.html-active .switch-html:focus,
|
||||
.tmce-active .switch-tmce:focus {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.wp-switch-editor:active {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
.wp-switch-editor:hover {
|
||||
text-decoration: none !important;
|
||||
background: #fff;
|
||||
background-color: #f5f5f5;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.js .tmce-active .wp-editor-area {
|
||||
@@ -853,8 +1001,7 @@ i.mce-i-hr:before {
|
||||
.html-active .switch-html {
|
||||
background: #f5f5f5;
|
||||
color: #555;
|
||||
height: 20px;
|
||||
border-bottom: none;
|
||||
border-bottom-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.wp-media-buttons {
|
||||
@@ -945,17 +1092,22 @@ i.mce-i-hr:before {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.mce-toolbar .mce-btn-group .mce-btn.mce-wp-fullscreen,
|
||||
.qt-fullscreen {
|
||||
.mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw,
|
||||
.qt-dfw {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
margin: 5px 5px 0 0;
|
||||
}
|
||||
|
||||
.qt-fullscreen {
|
||||
position: static;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 782px ) {
|
||||
.mce-toolbar .mce-btn button,
|
||||
.qt-fullscreen {
|
||||
.qt-dfw {
|
||||
padding: 6px 7px;
|
||||
}
|
||||
|
||||
@@ -964,12 +1116,12 @@ i.mce-i-hr:before {
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
.qt-fullscreen {
|
||||
.qt-dfw {
|
||||
width: 36px;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
.mce-toolbar .mce-btn-group .mce-btn.mce-wp-fullscreen {
|
||||
.mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw {
|
||||
margin: 4px 4px 0 0;
|
||||
}
|
||||
|
||||
@@ -1037,7 +1189,6 @@ i.mce-i-hr:before {
|
||||
-webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
||||
box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
||||
width: 500px;
|
||||
height: 250px;
|
||||
overflow: hidden;
|
||||
margin-left: -250px;
|
||||
margin-top: -125px;
|
||||
@@ -1073,6 +1224,14 @@ i.mce-i-hr:before {
|
||||
margin-top: -250px;
|
||||
}
|
||||
|
||||
#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: #fcfcfc;
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
@@ -1113,7 +1272,7 @@ i.mce-i-hr:before {
|
||||
|
||||
#wp-link-close:hover,
|
||||
#wp-link-close:focus {
|
||||
color: #2ea2cc;
|
||||
color: #00a0d2;
|
||||
}
|
||||
|
||||
#wp-link-close:focus {
|
||||
@@ -1131,6 +1290,7 @@ i.mce-i-hr:before {
|
||||
}
|
||||
|
||||
#wp-link-wrap.search-panel-visible #link-selector {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
padding: 0 16px;
|
||||
position: absolute;
|
||||
top: 36px;
|
||||
@@ -1215,8 +1375,7 @@ i.mce-i-hr:before {
|
||||
}
|
||||
|
||||
#wp-link .link-search-wrapper .spinner {
|
||||
display: none;
|
||||
vertical-align: text-bottom;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#wp-link .link-target {
|
||||
@@ -1239,6 +1398,10 @@ i.mce-i-hr:before {
|
||||
left: 16px;
|
||||
right: 16px;
|
||||
bottom: 16px;
|
||||
top: 172px;
|
||||
}
|
||||
|
||||
.has-text-field #wp-link .query-results {
|
||||
top: 205px;
|
||||
}
|
||||
|
||||
@@ -1246,7 +1409,7 @@ i.mce-i-hr:before {
|
||||
clear: both;
|
||||
margin-bottom: 0;
|
||||
border-bottom: 1px solid #f1f1f1;
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
padding: 4px 6px 4px 10px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
@@ -1263,7 +1426,7 @@ i.mce-i-hr:before {
|
||||
#wp-link .query-notice .query-notice-hint {
|
||||
display: block;
|
||||
padding: 6px;
|
||||
border-left: 4px solid #2ea2cc;
|
||||
border-left: 4px solid #00a0d2;
|
||||
}
|
||||
|
||||
#wp-link .unselectable.no-matches-found {
|
||||
@@ -1294,12 +1457,12 @@ i.mce-i-hr:before {
|
||||
#wp-link li.unselectable:hover {
|
||||
background: #fff;
|
||||
cursor: auto;
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
}
|
||||
|
||||
#wp-link li.selected {
|
||||
background: #ddd;
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
}
|
||||
|
||||
#wp-link li.selected .item-title {
|
||||
@@ -1315,6 +1478,7 @@ i.mce-i-hr:before {
|
||||
width: 80%;
|
||||
width: -webkit-calc(100% - 68px);
|
||||
width: calc(100% - 68px);
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#wp-link .item-info {
|
||||
@@ -1340,12 +1504,6 @@ i.mce-i-hr:before {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
#wp-link .river-waiting .spinner {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
float: none;
|
||||
}
|
||||
|
||||
#wp-link .submitbox {
|
||||
padding: 8px 16px;
|
||||
background: #fcfcfc;
|
||||
@@ -1373,11 +1531,14 @@ i.mce-i-hr:before {
|
||||
|
||||
@media screen and ( max-width: 782px ) {
|
||||
#wp-link-wrap {
|
||||
height: 280px;
|
||||
margin-top: -140px;
|
||||
}
|
||||
|
||||
#wp-link-wrap.search-panel-visible .query-results {
|
||||
top: 195px;
|
||||
}
|
||||
|
||||
#wp-link-wrap.search-panel-visible.has-text-field .query-results {
|
||||
top: 235px;
|
||||
}
|
||||
|
||||
@@ -1533,7 +1694,7 @@ i.mce-i-hr:before {
|
||||
|
||||
.clearlooks2 .mceTop span,
|
||||
.clearlooks2 .mceFocus .mceTop span {
|
||||
color: #222;
|
||||
color: #23282d;
|
||||
}
|
||||
|
||||
.clearlooks2 .mceClose:before {
|
||||
@@ -1541,10 +1702,10 @@ i.mce-i-hr:before {
|
||||
}
|
||||
|
||||
.clearlooks2 .mceClose:hover:before {
|
||||
color: #2ea2cc;
|
||||
color: #00a0d2;
|
||||
}
|
||||
*/
|
||||
/* Distraction Free Writing mode
|
||||
/* Distraction-Free Writing mode
|
||||
* =Overlay Styles
|
||||
-------------------------------------------------------------- */
|
||||
.fullscreen-overlay {
|
||||
@@ -1656,7 +1817,7 @@ i.mce-i-hr:before {
|
||||
}
|
||||
|
||||
#wp-fullscreen-tagline {
|
||||
color: #888;
|
||||
color: #82878c;
|
||||
font-size: 18px;
|
||||
float: right;
|
||||
padding: 4px 0 0;
|
||||
@@ -1740,7 +1901,7 @@ i.mce-i-hr:before {
|
||||
white-space: nowrap;
|
||||
width: auto;
|
||||
background: none;
|
||||
color: #333333;
|
||||
color: #32373c;
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
line-height: 20px;
|
||||
@@ -1956,12 +2117,12 @@ i.mce-i-hr:before {
|
||||
font-family: Tahoma, sans-serif;
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.mce-rtl .mce-flow-layout .mce-flow-layout-item > div {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.mce-rtl .mce-listbox i.mce-caret {
|
||||
left: 6px;
|
||||
}
|
||||
@@ -1973,7 +2134,6 @@ html:lang(he-il) .rtl .quicktags-toolbar input {
|
||||
|
||||
/* HiDPI */
|
||||
@media print,
|
||||
(-o-min-device-pixel-ratio: 5/4),
|
||||
(-webkit-min-device-pixel-ratio: 1.25),
|
||||
(min-resolution: 120dpi) {
|
||||
.wp-media-buttons .add_media span.wp-media-buttons-icon,
|
||||
@@ -1981,5 +2141,3 @@ html:lang(he-il) .rtl .quicktags-toolbar input {
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: DFW responsive */
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
.mce-container,.mce-container *,.mce-widget,.mce-widget *{color:inherit;font-family:inherit}#mce-modal-block.mce-in{opacity:.7;filter:alpha(opacity=70)}.mce-window{-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);-webkit-font-smoothing:subpixel-antialiased}.mce-window .mce-container-body.mce-abs-layout{overflow:visible}.mce-window .mce-window-head{background:#fcfcfc;border-bottom:1px solid #dfdfdf;padding:0;min-height:36px}.mce-window .mce-window-head .mce-title{color:#444;font-size:18px;font-weight:600;line-height:36px;margin:0;padding:0 36px 0 16px}.mce-window .mce-window-head .mce-close{color:transparent;top:0;right:0;width:36px;height:36px;line-height:36px;text-align:center}.mce-window .mce-window-head .mce-close:before{font:400 20px/36px dashicons;text-align:center;color:#666;width:36px;height:36px;display:block}.mce-window .mce-window-head .mce-close:hover:before{color:#2ea2cc}.mce-window .mce-window-head .mce-dragh{width:-webkit-calc(100% - 36px);width:calc(100% - 36px)}.mce-wp-help .mce-window-head{border-bottom:none}#wp-link .query-results,.mce-checkbox i.mce-i-checkbox,.mce-textbox{border:1px solid #ddd;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);-webkit-transition:.05s all ease-in-out;transition:.05s all ease-in-out}#wp-link .query-results:focus,.mce-checkbox:focus i.mce-i-checkbox,.mce-textbox.mce-focus,.mce-textbox:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.mce-floatpanel.mce-popover,.mce-menu{border-color:rgba(0,0,0,.15);-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.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}.mce-menu-has-icons i.mce-ico{line-height:20px}div.mce-panel{border:0;background:#fff;-webkit-filter:none;filter:none}.mce-panel.mce-menu{border:1px solid #ddd}div.mce-tab{line-height:13px}div.mce-toolbar-grp{border-bottom:1px solid #dedede;background:#f5f5f5;padding:0;position:relative}div.mce-toolbar-grp>div{padding:3px}.has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first{padding-right:32px}.mce-toolbar .mce-btn-group{margin:0}div.mce-statusbar{border-top:1px solid #e5e5e5}div.mce-path{padding:2px 10px;margin:0}.mce-path,.mce-path .mce-divider,.mce-path-item{font-size:12px;line-height:18px}.mce-toolbar .mce-btn,.qt-fullscreen{border-color:transparent;background:0 0;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;cursor:pointer}#wp-fullscreen-buttons .mce-btn,.mce-toolbar .mce-btn-group .mce-btn,.qt-fullscreen{border:1px solid transparent;margin:2px;background-image:none;-webkit-border-radius:2px;border-radius:2px;-webkit-filter:none;filter:none}#wp-fullscreen-buttons .mce-btn:focus,#wp-fullscreen-buttons .mce-btn:hover,.mce-toolbar .mce-btn-group .mce-btn:focus,.mce-toolbar .mce-btn-group .mce-btn:hover,.qt-fullscreen:focus,.qt-fullscreen:hover{background:#fafafa;border-color:#999;color:#222;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08)}#wp-fullscreen-buttons .mce-btn.mce-active,#wp-fullscreen-buttons .mce-btn:active,.mce-toolbar .mce-btn-group .mce-btn.mce-active,.mce-toolbar .mce-btn-group .mce-btn:active{background:#ebebeb;border-color:#999;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.3);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.3)}.mce-toolbar .mce-btn-group .mce-btn.mce-active:hover{border-color:#555}.mce-toolbar .mce-btn-group .mce-btn.mce-active:hover i.mce-ico{color:#555}#wp-fullscreen-buttons .mce-btn.mce-disabled:focus,#wp-fullscreen-buttons .mce-btn.mce-disabled:hover,.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:hover{color:#aaa;background:0 0;border-color:#ddd;text-shadow:0 1px 0 #fff;-webkit-box-shadow:none;box-shadow:none}.mce-toolbar .mce-btn-group .mce-first,.mce-toolbar .mce-btn-group .mce-last{border-color:transparent}.mce-toolbar .mce-btn button,.qt-fullscreen{padding:2px 3px;line-height:normal}.mce-toolbar .mce-btn i{text-shadow:none}.mce-toolbar .mce-btn-group>div{white-space:normal}.mce-toolbar .mce-colorbutton .mce-open{border-right:0}.mce-toolbar .mce-colorbutton .mce-preview{margin:0;padding:0;top:auto;bottom:2px;left:3px;height:3px;width:20px}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox{-webkit-border-radius:0;border-radius:0;direction:ltr;background:#fff;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 1px -1px rgba(0,0,0,.2);box-shadow:inset 0 1px 1px -1px rgba(0,0,0,.2)}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:hover{background-image:none;border-color:#bbb}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox span{font-size:13px}.mce-panel .mce-btn i.mce-caret{borLine truncated
|
||||
.mce-container,.mce-container *,.mce-widget,.mce-widget *{color:inherit;font-family:inherit}#mce-modal-block,#mce-modal-block.mce-fade{opacity:.7;filter:alpha(opacity=70);-webkit-transition:none;transition:none}.mce-window{-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);-webkit-font-smoothing:subpixel-antialiased;-webkit-transition:none;transition:none}.mce-window .mce-container-body.mce-abs-layout{overflow:visible}.mce-window .mce-window-head{background:#fcfcfc;border-bottom:1px solid #dfdfdf;padding:0;min-height:36px}.mce-window .mce-window-head .mce-title{color:#444;font-size:18px;font-weight:600;line-height:36px;margin:0;padding:0 36px 0 16px}.mce-window .mce-window-head .mce-close{color:transparent;top:0;right:0;width:36px;height:36px;line-height:36px;text-align:center}.mce-window .mce-window-head .mce-close:before{font:400 20px/36px dashicons;text-align:center;color:#666;width:36px;height:36px;display:block}.mce-window .mce-window-head .mce-close:hover:before{color:#00a0d2}.mce-window .mce-window-head .mce-dragh{width:-webkit-calc(100% - 36px);width:calc(100% - 36px)}.mce-wp-help .mce-window-head{border-bottom:none}#wp-link .query-results,.mce-checkbox i.mce-i-checkbox,.mce-textbox{border:1px solid #ddd;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);-webkit-transition:.05s all ease-in-out;transition:.05s all ease-in-out}#wp-link .query-results:focus,.mce-checkbox:focus i.mce-i-checkbox,.mce-textbox.mce-focus,.mce-textbox:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.mce-floatpanel.mce-popover,.mce-menu{border-color:rgba(0,0,0,.15);-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.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}.mce-menu-has-icons i.mce-ico{line-height:20px}div.mce-panel{border:0;background:#fff;-webkit-filter:none;filter:none}.mce-panel.mce-menu{border:1px solid #ddd}div.mce-tab{line-height:13px}div.mce-toolbar-grp{border-bottom:1px solid #dedede;background:#f5f5f5;padding:0;position:relative}div.mce-inline-toolbar-grp{border:1px solid #a0a5aa;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.15);box-shadow:0 1px 3px rgba(0,0,0,.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:8px;position:absolute;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;z-index:100100}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:after,div.mce-inline-toolbar-grp:before{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:''}div.mce-inline-toolbar-grp.mce-arrow-up:before{top:-18px;border-bottom-color:#a0a5aa;border-width:9px;margin-left:-9px}div.mce-inline-toolbar-grp.mce-arrow-down:before{bottom:-18px;border-top-color:#a0a5aa;border-width:9px;margin-left:-9px}div.mce-inline-toolbar-grp.mce-arrow-up:after{top:-16px;border-bottom-color:#f5f5f5;border-width:8px;margin-left:-8px}div.mce-inline-toolbar-grp.mce-arrow-down:after{bottom:-16px;border-top-color:#f5f5f5;border-width:8px;margin-left:-8px}div.mce-inline-toolbar-grp.mce-arrow-left:after,div.mce-inline-toolbar-grp.mce-arrow-left:before{margin:0}div.mce-inline-toolbar-grp.mce-arrow-left:before{left:20px}div.mce-inline-toolbar-grp.mce-arrow-left:after{left:21px}div.mce-inline-toolbar-grp.mce-arrow-right:after,div.mce-inline-toolbar-grp.mce-arrow-right:before{left:auto;margin:0}div.mce-inline-toolbar-grp.mce-arrow-right:before{right:20px}div.mce-inline-toolbar-grp.mce-arrow-right:after{right:21px}div.mce-inline-toolbar-grp.mce-arrow-full{right: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-right:32px}.mce-toolbar .mce-btn-group{margin:0}div.mce-statusbar{border-top:1px solid #e5e5e5}div.mce-path{padding:2px 10px;margin:0}.mce-path,.mce-path .mce-divider,.mce-path-item{font-size:12px;line-height:18px}.mce-toolbar .mce-btn,.qt-dfw{border-color:transparent;background:0 0;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;cursor:pointer}#wp-fullscreen-buttons .mce-btn,.mce-toolbar .mce-btn-group .mce-btn,.qt-dfw{border:1px solid transparent;margin:2px;background-image:none;-webkit-border-radius:2px;border-radius:2px;-webkit-filter:none;filter:none}#wp-fullscreen-buttons .mce-btn:focus,#wp-fullscreen-buttons .mce-btn:hover,.mce-toolbar .mce-btn-group .mce-btn:focus,.mce-toolbar .mce-btn-group .mce-btn:hover,.qt-dfw:focus,.qt-dfLine truncated
|
||||
@@ -1,12 +1,12 @@
|
||||
/*!
|
||||
* jQuery UI CSS Framework 1.10.1
|
||||
* jQuery UI CSS Framework 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2013 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
* http://api.jqueryui.com/category/theming/
|
||||
*/
|
||||
|
||||
/* Layout helpers
|
||||
@@ -53,15 +53,21 @@
|
||||
right: 0;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
filter:Alpha(Opacity=0);
|
||||
filter:Alpha(Opacity=0); /* support: IE8 */
|
||||
}
|
||||
|
||||
.ui-front {
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled {
|
||||
cursor: default !important;
|
||||
}
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
@@ -73,15 +79,26 @@
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/*!
|
||||
* jQuery UI Resizable 1.10.1
|
||||
* jQuery UI Resizable 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2013 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Resizable#theming
|
||||
*/
|
||||
.ui-resizable {
|
||||
position: relative;
|
||||
@@ -90,6 +107,8 @@
|
||||
position: absolute;
|
||||
font-size: 0.1px;
|
||||
display: block;
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
.ui-resizable-disabled .ui-resizable-handle,
|
||||
.ui-resizable-autohide .ui-resizable-handle {
|
||||
@@ -109,7 +128,7 @@
|
||||
bottom: -5px;
|
||||
right: 0;
|
||||
}
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.ui-resizable-e {
|
||||
cursor: e-resize;
|
||||
width: 7px;
|
||||
@@ -117,7 +136,7 @@
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.ui-resizable-w {
|
||||
cursor: w-resize;
|
||||
width: 7px;
|
||||
@@ -125,15 +144,15 @@
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.ui-resizable-se {
|
||||
cursor: se-resize;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
right: -5px;
|
||||
bottom: -5px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
right: 1px;
|
||||
bottom: 1px;
|
||||
}
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.ui-resizable-sw {
|
||||
cursor: sw-resize;
|
||||
width: 9px;
|
||||
@@ -141,7 +160,7 @@
|
||||
left: -5px;
|
||||
bottom: -5px;
|
||||
}
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.ui-resizable-nw {
|
||||
cursor: nw-resize;
|
||||
width: 9px;
|
||||
@@ -149,7 +168,7 @@
|
||||
left: -5px;
|
||||
top: -5px;
|
||||
}
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.ui-resizable-ne {
|
||||
cursor: ne-resize;
|
||||
width: 9px;
|
||||
@@ -203,7 +222,7 @@
|
||||
.ui-button:focus {
|
||||
background: #fafafa;
|
||||
border-color: #999;
|
||||
color: #222;
|
||||
color: #23282d;
|
||||
}
|
||||
|
||||
.ui-button:focus {
|
||||
@@ -218,14 +237,14 @@
|
||||
.ui-button:active {
|
||||
background: #eee;
|
||||
border-color: #999;
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
-webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
|
||||
box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
|
||||
}
|
||||
|
||||
.ui-button[disabled],
|
||||
.ui-button:disabled {
|
||||
color: #aaa !important;
|
||||
color: #a0a5aa !important;
|
||||
border-color: #ddd !important;
|
||||
background: #f7f7f7 !important;
|
||||
-webkit-box-shadow: none !important;
|
||||
@@ -299,7 +318,7 @@
|
||||
}
|
||||
|
||||
.ui-button.ui-dialog-titlebar-close:hover {
|
||||
color: #2ea2cc;
|
||||
color: #00a0d2;
|
||||
}
|
||||
|
||||
.ui-dialog-titlebar-close .ui-button-text {
|
||||
|
||||
+7
-9
@@ -1,19 +1,17 @@
|
||||
/*!
|
||||
* jQuery UI CSS Framework 1.10.1
|
||||
* jQuery UI CSS Framework 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2013 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*/.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-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}/*!
|
||||
* jQuery UI Resizable 1.10.1
|
||||
* 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{width:100%;height:100%}/*!
|
||||
* jQuery UI Resizable 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2013 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Resizable#theming
|
||||
*/.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.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:9px;height:9px;right:-5px;bottom:-5px}.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:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top}.ui-button:active,.ui-button:focus{outline:0}.ui-button::-moz-focus-inner{border-width:1px 0;border-style:solid none;border-color:transparent;padding:0}.ui-button:focus,.ui-button:hover{background:#fafafa;border-color:#999;color:#222}.ui-button:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ui-button:active{background:#eee;border-color:#999;color:#333;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.ui-button:disabled,.ui-button[disabled]{color:#aaa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default}@media screen and (max-width:782px){.ui-button{padding:10px 14px;line-height:1;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;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3)}.ui-dialog-titlebar{background:#fcfcfc;border-bottom:1px solid #dfdfdf;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 16px 0 36px}.ui-button.ui-dialog-titlebar-close{background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;color:#666;cursor:pointer;display:block;padding:0;position:absolute;top:0;left:0;width:36px;height:36px;text-align:center}.ui-dialog-titlebar-close:before{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:36px;width:36px;height:36px;content:'\f158'}.ui-button.ui-dialog-titlebar-close:hover{color:#2ea2cc}.ui-dialog-titlebar-close .ui-button-text{display:none}.ui-dialog-content{padding:16px;overflow:auto}.ui-dialog-buttonpane{background:#fcfcfc;border-top:1px solid #dfdfdf;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;filter:alpha(opacity=70);z-index:100101}
|
||||
*/.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;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:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top}.ui-button:active,.ui-button:focus{outline:0}.ui-button::-moz-focus-inner{border-width:1px 0;border-style:solid none;border-color:transparent;padding:0}.ui-button:focus,.ui-button:hover{background:#fafafa;border-color:#999;color:#23282d}.ui-button:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ui-button:active{background:#eee;border-color:#999;color:#32373c;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.ui-button:disabled,.ui-button[disabled]{color:#a0a5aa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default}@media screen and (max-width:782px){.ui-button{padding:10px 14px;line-height:1;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;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3)}.ui-dialog-titlebar{background:#fcfcfc;border-bottom:1px solid #dfdfdf;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 16px 0 36px}.ui-button.ui-dialog-titlebar-close{background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;color:#666;cursor:pointer;display:block;padding:0;position:absolute;top:0;left:0;width:36px;height:36px;text-align:center}.ui-dialog-titlebar-close:before{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:36px;width:36px;height:36px;content:'\f158'}.ui-button.ui-dialog-titlebar-close:hover{color:#00a0d2}.ui-dialog-titlebar-close .ui-button-text{display:none}.ui-dialog-content{padding:16px;overflow:auto}.ui-dialog-buttonpane{background:#fcfcfc;border-top:1px solid #dfdfdf;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;filter:alpha(opacity=70);z-index:100101}
|
||||
@@ -1,12 +1,12 @@
|
||||
/*!
|
||||
* jQuery UI CSS Framework 1.10.1
|
||||
* jQuery UI CSS Framework 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2013 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
* http://api.jqueryui.com/category/theming/
|
||||
*/
|
||||
|
||||
/* Layout helpers
|
||||
@@ -53,15 +53,21 @@
|
||||
left: 0;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
filter:Alpha(Opacity=0);
|
||||
filter:Alpha(Opacity=0); /* support: IE8 */
|
||||
}
|
||||
|
||||
.ui-front {
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled {
|
||||
cursor: default !important;
|
||||
}
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
@@ -73,15 +79,26 @@
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/*!
|
||||
* jQuery UI Resizable 1.10.1
|
||||
* jQuery UI Resizable 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2013 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Resizable#theming
|
||||
*/
|
||||
.ui-resizable {
|
||||
position: relative;
|
||||
@@ -90,6 +107,8 @@
|
||||
position: absolute;
|
||||
font-size: 0.1px;
|
||||
display: block;
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
.ui-resizable-disabled .ui-resizable-handle,
|
||||
.ui-resizable-autohide .ui-resizable-handle {
|
||||
@@ -109,7 +128,7 @@
|
||||
bottom: -5px;
|
||||
left: 0;
|
||||
}
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.ui-resizable-e {
|
||||
cursor: e-resize;
|
||||
width: 7px;
|
||||
@@ -117,7 +136,7 @@
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.ui-resizable-w {
|
||||
cursor: w-resize;
|
||||
width: 7px;
|
||||
@@ -125,15 +144,15 @@
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.ui-resizable-se {
|
||||
cursor: se-resize;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
right: -5px;
|
||||
bottom: -5px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
right: 1px;
|
||||
bottom: 1px;
|
||||
}
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.ui-resizable-sw {
|
||||
cursor: sw-resize;
|
||||
width: 9px;
|
||||
@@ -141,7 +160,7 @@
|
||||
left: -5px;
|
||||
bottom: -5px;
|
||||
}
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.ui-resizable-nw {
|
||||
cursor: nw-resize;
|
||||
width: 9px;
|
||||
@@ -149,7 +168,7 @@
|
||||
left: -5px;
|
||||
top: -5px;
|
||||
}
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.ui-resizable-ne {
|
||||
cursor: ne-resize;
|
||||
width: 9px;
|
||||
@@ -203,7 +222,7 @@
|
||||
.ui-button:focus {
|
||||
background: #fafafa;
|
||||
border-color: #999;
|
||||
color: #222;
|
||||
color: #23282d;
|
||||
}
|
||||
|
||||
.ui-button:focus {
|
||||
@@ -218,14 +237,14 @@
|
||||
.ui-button:active {
|
||||
background: #eee;
|
||||
border-color: #999;
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
-webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
|
||||
box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
|
||||
}
|
||||
|
||||
.ui-button[disabled],
|
||||
.ui-button:disabled {
|
||||
color: #aaa !important;
|
||||
color: #a0a5aa !important;
|
||||
border-color: #ddd !important;
|
||||
background: #f7f7f7 !important;
|
||||
-webkit-box-shadow: none !important;
|
||||
@@ -299,7 +318,7 @@
|
||||
}
|
||||
|
||||
.ui-button.ui-dialog-titlebar-close:hover {
|
||||
color: #2ea2cc;
|
||||
color: #00a0d2;
|
||||
}
|
||||
|
||||
.ui-dialog-titlebar-close .ui-button-text {
|
||||
|
||||
+7
-9
@@ -1,19 +1,17 @@
|
||||
/*!
|
||||
* jQuery UI CSS Framework 1.10.1
|
||||
* jQuery UI CSS Framework 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2013 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*/.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-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}/*!
|
||||
* jQuery UI Resizable 1.10.1
|
||||
* 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{width:100%;height:100%}/*!
|
||||
* jQuery UI Resizable 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2013 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Resizable#theming
|
||||
*/.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.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:9px;height:9px;right:-5px;bottom:-5px}.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:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top}.ui-button:active,.ui-button:focus{outline:0}.ui-button::-moz-focus-inner{border-width:1px 0;border-style:solid none;border-color:transparent;padding:0}.ui-button:focus,.ui-button:hover{background:#fafafa;border-color:#999;color:#222}.ui-button:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ui-button:active{background:#eee;border-color:#999;color:#333;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.ui-button:disabled,.ui-button[disabled]{color:#aaa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default}@media screen and (max-width:782px){.ui-button{padding:10px 14px;line-height:1;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;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3)}.ui-dialog-titlebar{background:#fcfcfc;border-bottom:1px solid #dfdfdf;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 36px 0 16px}.ui-button.ui-dialog-titlebar-close{background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;color:#666;cursor:pointer;display:block;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center}.ui-dialog-titlebar-close:before{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:36px;width:36px;height:36px;content:'\f158'}.ui-button.ui-dialog-titlebar-close:hover{color:#2ea2cc}.ui-dialog-titlebar-close .ui-button-text{display:none}.ui-dialog-content{padding:16px;overflow:auto}.ui-dialog-buttonpane{background:#fcfcfc;border-top:1px solid #dfdfdf;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;filter:alpha(opacity=70);z-index:100101}
|
||||
*/.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;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:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top}.ui-button:active,.ui-button:focus{outline:0}.ui-button::-moz-focus-inner{border-width:1px 0;border-style:solid none;border-color:transparent;padding:0}.ui-button:focus,.ui-button:hover{background:#fafafa;border-color:#999;color:#23282d}.ui-button:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ui-button:active{background:#eee;border-color:#999;color:#32373c;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.ui-button:disabled,.ui-button[disabled]{color:#a0a5aa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default}@media screen and (max-width:782px){.ui-button{padding:10px 14px;line-height:1;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;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3)}.ui-dialog-titlebar{background:#fcfcfc;border-bottom:1px solid #dfdfdf;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 36px 0 16px}.ui-button.ui-dialog-titlebar-close{background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;color:#666;cursor:pointer;display:block;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center}.ui-dialog-titlebar-close:before{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:36px;width:36px;height:36px;content:'\f158'}.ui-button.ui-dialog-titlebar-close:hover{color:#00a0d2}.ui-dialog-titlebar-close .ui-button-text{display:none}.ui-dialog-content{padding:16px;overflow:auto}.ui-dialog-buttonpane{background:#fcfcfc;border-top:1px solid #dfdfdf;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;filter:alpha(opacity=70);z-index:100101}
|
||||
+151
-118
@@ -19,6 +19,7 @@
|
||||
.media-frame {
|
||||
font-family: "Open Sans", sans-serif;
|
||||
font-size: 12px;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.media-frame input,
|
||||
@@ -42,11 +43,11 @@
|
||||
}
|
||||
|
||||
.media-frame a.button {
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
}
|
||||
|
||||
.media-frame a.button:hover {
|
||||
color: #222;
|
||||
color: #23282d;
|
||||
}
|
||||
|
||||
.media-frame a.button-primary,
|
||||
@@ -104,19 +105,16 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Enable draggable on IE10 touch events until it's rolled into jQuery UI core */
|
||||
.ui-sortable,
|
||||
.ui-draggable {
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.meta-box-sortables.ui-sortable {
|
||||
-ms-touch-action: auto;
|
||||
touch-action: auto;
|
||||
}
|
||||
|
||||
.meta-box-sortables.ui-sortable .hndle {
|
||||
/*!
|
||||
* 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 {
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
@@ -190,7 +188,7 @@
|
||||
}
|
||||
|
||||
.media-modal-close:hover .media-modal-icon:before {
|
||||
color: #2ea2cc;
|
||||
color: #00a0d2;
|
||||
}
|
||||
|
||||
.media-modal-close:active {
|
||||
@@ -326,6 +324,11 @@
|
||||
margin-left: 4%;
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.media-sidebar .setting .name {
|
||||
max-width: 80px;
|
||||
}
|
||||
|
||||
.media-sidebar .setting select,
|
||||
@@ -445,7 +448,8 @@
|
||||
|
||||
.compat-item .field {
|
||||
float: left;
|
||||
width: 66%;
|
||||
width: 65%;
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
.compat-item .field input[type="text"],
|
||||
@@ -454,9 +458,13 @@
|
||||
.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 input[type="url"],
|
||||
.compat-item .field textarea {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.sidebar-for-errors .attachment-details,
|
||||
@@ -494,7 +502,7 @@
|
||||
margin: 0;
|
||||
line-height: 18px;
|
||||
font-size: 14px;
|
||||
color: #0074a2;
|
||||
color: #0073aa;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
@@ -509,7 +517,7 @@
|
||||
|
||||
.media-menu .active,
|
||||
.media-menu .active:hover {
|
||||
color: #222;
|
||||
color: #23282d;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@@ -560,7 +568,7 @@
|
||||
|
||||
.media-router .active,
|
||||
.media-router .active:hover {
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
}
|
||||
|
||||
.media-router .active,
|
||||
@@ -729,7 +737,14 @@
|
||||
*/
|
||||
.media-frame select.attachment-filters {
|
||||
margin-top: 11px;
|
||||
margin-left: 10px;
|
||||
margin-left: 2%;
|
||||
max-width: 42%;
|
||||
max-width: -webkit-calc(48% - 12px);
|
||||
max-width: calc(48% - 12px);
|
||||
}
|
||||
|
||||
.media-frame select.attachment-filters:last-of-type {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -744,14 +759,14 @@
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
.media-toolbar-secondary .search {
|
||||
margin-left: 16px;
|
||||
.media-toolbar-primary .search {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachments
|
||||
*/
|
||||
.attachments {
|
||||
.wp-core-ui .attachments {
|
||||
margin: 0;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
@@ -759,7 +774,7 @@
|
||||
/**
|
||||
* Attachment
|
||||
*/
|
||||
.attachment {
|
||||
.wp-core-ui .attachment {
|
||||
position: relative;
|
||||
float: right;
|
||||
padding: 8px;
|
||||
@@ -778,9 +793,9 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.attachment:focus,
|
||||
.selected.attachment:focus,
|
||||
.attachment.details:focus {
|
||||
.wp-core-ui .attachment:focus,
|
||||
.wp-core-ui .selected.attachment:focus,
|
||||
.wp-core-ui .attachment.details:focus {
|
||||
-webkit-box-shadow:
|
||||
inset 0 0 2px 3px #fff,
|
||||
inset 0 0 0 7px #5b9dd9;
|
||||
@@ -790,7 +805,7 @@
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.selected.attachment {
|
||||
.wp-core-ui .selected.attachment {
|
||||
-webkit-box-shadow:
|
||||
inset 0 0 0 5px #fff,
|
||||
inset 0 0 0 7px #ccc;
|
||||
@@ -799,7 +814,7 @@
|
||||
inset 0 0 0 7px #ccc;
|
||||
}
|
||||
|
||||
.attachment.details {
|
||||
.wp-core-ui .attachment.details {
|
||||
-webkit-box-shadow:
|
||||
inset 0 0 0 3px #fff,
|
||||
inset 0 0 0 7px #1e8cbe;
|
||||
@@ -808,7 +823,7 @@
|
||||
inset 0 0 0 7px #1e8cbe;
|
||||
}
|
||||
|
||||
.attachment-preview {
|
||||
.wp-core-ui .attachment-preview {
|
||||
position: relative;
|
||||
-webkit-box-shadow:
|
||||
inset 0 0 15px rgba( 0, 0, 0, 0.1 ),
|
||||
@@ -820,18 +835,18 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.attachment-preview:before {
|
||||
.wp-core-ui .attachment-preview:before {
|
||||
content: '';
|
||||
display: block;
|
||||
padding-top: 100%;
|
||||
}
|
||||
|
||||
.attachment .icon {
|
||||
.wp-core-ui .attachment .icon {
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.attachment .thumbnail {
|
||||
.wp-core-ui .attachment .thumbnail {
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@@ -843,15 +858,15 @@
|
||||
transition: opacity .1s;
|
||||
}
|
||||
|
||||
.attachment .portrait img {
|
||||
.wp-core-ui .attachment .portrait img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.attachment .landscape img {
|
||||
.wp-core-ui .attachment .landscape img {
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.attachment .thumbnail:after {
|
||||
.wp-core-ui .attachment .thumbnail:after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
@@ -864,42 +879,40 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
.attachment .thumbnail img {
|
||||
.wp-core-ui .attachment .thumbnail img {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
.attachment .thumbnail .centered {
|
||||
.wp-core-ui .attachment .thumbnail .centered {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
-webkit-transform: translate( 50%, 50% );
|
||||
-ms-transform: translate(50%,50%); /* Fails with spaces?? Weird! */
|
||||
transform: translate( 50%, 50% );
|
||||
-webkit-transform: translate( -50%, 50% );
|
||||
-ms-transform: translate(-50%,50%); /* Fails with spaces?? Weird! */
|
||||
transform: translate( -50%, 50% );
|
||||
}
|
||||
|
||||
.attachment .thumbnail .centered img {
|
||||
-webkit-transform: translate( -50%, -50% );
|
||||
-ms-transform: translate(-50%,-50%);
|
||||
transform: translate( -50%, -50% );
|
||||
.wp-core-ui .attachment .thumbnail .centered img {
|
||||
-webkit-transform: translate( 50%, -50% );
|
||||
-ms-transform: translate(50%,-50%);
|
||||
transform: translate( 50%, -50% );
|
||||
}
|
||||
|
||||
.attachment .thumbnail .centered img.icon {
|
||||
-webkit-transform: translate( -50%, -70% );
|
||||
-ms-transform: translate(-50%,-70%);
|
||||
transform: translate( -50%, -70% );
|
||||
.wp-core-ui .attachments-browser .attachment .thumbnail .centered img.icon {
|
||||
-webkit-transform: translate( 50%, -70% );
|
||||
-ms-transform: translate(50%,-70%);
|
||||
transform: translate( 50%, -70% );
|
||||
}
|
||||
|
||||
.ie8 .attachment img.icon {
|
||||
.ie8 .wp-core-ui .attachment img.icon {
|
||||
top: 20%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.attachment .filename {
|
||||
.wp-core-ui .attachment .filename {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
left: 0;
|
||||
@@ -914,16 +927,16 @@
|
||||
box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 );
|
||||
}
|
||||
|
||||
.attachment .filename div {
|
||||
.wp-core-ui .attachment .filename div {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.attachment .thumbnail img {
|
||||
.wp-core-ui .attachment .thumbnail img {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.attachment .close {
|
||||
display: none;
|
||||
.wp-core-ui .attachment .close {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
left: 5px;
|
||||
@@ -942,18 +955,21 @@
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.3 );
|
||||
box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.3 );
|
||||
-webkit-transition-duration: none;
|
||||
transition-duration: none;
|
||||
-webkit-transition-property: none;
|
||||
transition-property: none;
|
||||
}
|
||||
|
||||
.attachment .close:hover {
|
||||
.wp-core-ui .attachment a.close:hover,
|
||||
.wp-core-ui .attachment a.close:focus {
|
||||
-webkit-box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.6 );
|
||||
box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.6 );
|
||||
background-position: -36px 4px;
|
||||
|
||||
}
|
||||
|
||||
.attachment:hover .close {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.attachment .check {
|
||||
.wp-core-ui .attachment .check {
|
||||
display: none;
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
@@ -967,24 +983,24 @@
|
||||
box-shadow: 0 0 0 1px #fff, 0 0 0 2px rgba( 0, 0, 0, 0.15 );
|
||||
}
|
||||
|
||||
.attachment .check div {
|
||||
.wp-core-ui .attachment .check div {
|
||||
background-position: -1px 0;
|
||||
height: 15px;
|
||||
width: 15px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.attachment .check:hover div {
|
||||
.wp-core-ui .attachment .check:hover div {
|
||||
background-position: -40px 0;
|
||||
}
|
||||
|
||||
.attachment.selected .check {
|
||||
.wp-core-ui .attachment.selected .check {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.attachment.details .check,
|
||||
.attachment.selected .check:focus,
|
||||
.media-frame.mode-grid .attachment.selected .check {
|
||||
.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: #1e8cbe;
|
||||
-webkit-box-shadow:
|
||||
0 0 0 1px #fff,
|
||||
@@ -994,18 +1010,18 @@
|
||||
0 0 0 2px #1e8cbe;
|
||||
}
|
||||
|
||||
.attachment.details .check div,
|
||||
.media-frame.mode-grid .attachment.selected .check div {
|
||||
.wp-core-ui .attachment.details .check div,
|
||||
.wp-core-ui .media-frame.mode-grid .attachment.selected .check div {
|
||||
background-position: -21px 0;
|
||||
}
|
||||
|
||||
.attachment.details .check:hover div,
|
||||
.attachment.selected .check:focus div,
|
||||
.media-frame.mode-grid .attachment.selected .check:hover div {
|
||||
.wp-core-ui .attachment.details .check:hover div,
|
||||
.wp-core-ui .attachment.selected .check:focus div,
|
||||
.wp-core-ui .media-frame.mode-grid .attachment.selected .check:hover div {
|
||||
background-position: -60px 0;
|
||||
}
|
||||
|
||||
.media-frame .attachment .describe {
|
||||
.wp-core-ui .media-frame .attachment .describe {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100%;
|
||||
@@ -1061,6 +1077,14 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.attachments-browser .media-toolbar-primary {
|
||||
max-width: 33%;
|
||||
}
|
||||
|
||||
.attachments-browser .media-toolbar-secondary {
|
||||
max-width: 66%;
|
||||
}
|
||||
|
||||
.uploader-inline .close {
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
@@ -1426,18 +1450,16 @@
|
||||
}
|
||||
|
||||
.media-selection .attachment {
|
||||
width: 48px;
|
||||
width: 40px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
.media-selection .attachment .thumbnail {
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
bottom: 4px;
|
||||
right: 4px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.media-selection .attachment .icon {
|
||||
@@ -1450,7 +1472,23 @@
|
||||
background: none;
|
||||
}
|
||||
|
||||
.media-selection .attachment.selection.details .thumbnail {
|
||||
.wp-core-ui .media-selection .attachment:focus,
|
||||
.wp-core-ui .media-selection .selected.attachment:focus,
|
||||
.wp-core-ui .media-selection .attachment.details:focus {
|
||||
-webkit-box-shadow:
|
||||
0 0 0 1px #fff,
|
||||
0 0 2px 3px #5b9dd9;
|
||||
box-shadow:
|
||||
0 0 0 1px #fff,
|
||||
0 0 2px 3px #5b9dd9;
|
||||
}
|
||||
|
||||
.wp-core-ui .media-selection .selected.attachment {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.wp-core-ui .media-selection .attachment.details {
|
||||
-webkit-box-shadow:
|
||||
0 0 0 1px #fff,
|
||||
0 0 0 3px #1e8cbe;
|
||||
@@ -1483,12 +1521,19 @@
|
||||
background: url(../images/spinner.gif) no-repeat;
|
||||
-webkit-background-size: 20px 20px;
|
||||
background-size: 20px 20px;
|
||||
display: none;
|
||||
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 .spinner.is-active {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.media-toolbar .spinner {
|
||||
@@ -1510,7 +1555,7 @@
|
||||
}
|
||||
|
||||
.attachment-details .settings-save-status .spinner {
|
||||
margin: 0 5px 0;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.attachment-details .settings-save-status .saved {
|
||||
@@ -1518,7 +1563,10 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.attachment-details.save-waiting .settings-save-status .spinner,
|
||||
.attachment-details.save-waiting .settings-save-status .spinner {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.attachment-details.save-complete .settings-save-status .saved {
|
||||
display: block;
|
||||
}
|
||||
@@ -1750,8 +1798,8 @@
|
||||
padding: 12px 14px;
|
||||
width: 100%;
|
||||
min-width: 200px;
|
||||
-webkit-box-shadow: inset 2px 2px 4px -2px rgba( 0, 0, 0, 0.1 );
|
||||
box-shadow: inset 2px 2px 4px -2px rgba( 0, 0, 0, 0.1 );
|
||||
-webkit-box-shadow: inset -2px 2px 4px -2px rgba( 0, 0, 0, 0.1 );
|
||||
box-shadow: inset -2px 2px 4px -2px rgba( 0, 0, 0, 0.1 );
|
||||
}
|
||||
|
||||
.media-frame .embed-url .spinner {
|
||||
@@ -1761,7 +1809,7 @@
|
||||
}
|
||||
|
||||
.media-frame .embed-loading .embed-url .spinner {
|
||||
display: block;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.embed-link-settings,
|
||||
@@ -1775,11 +1823,18 @@
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.embed-preview img, .embed-preview iframe, .embed-preview embed {
|
||||
.embed-preview img,
|
||||
.embed-preview iframe,
|
||||
.embed-preview embed {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.embed-preview a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.embed-preview img {
|
||||
display: block;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
@@ -2142,13 +2197,6 @@
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 940px) {
|
||||
.media-frame-content .media-toolbar-primary .search,
|
||||
.media-frame-content .media-toolbar-secondary .attachment-filters {
|
||||
max-width: 134px;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Responsive layout
|
||||
*/
|
||||
@@ -2342,11 +2390,6 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.media-modal .attachments-browser .media-toolbar-primary,
|
||||
.media-modal .attachments-browser .media-toolbar-secondary {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.media-modal .attachments-browser .media-toolbar .search {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
@@ -2354,15 +2397,11 @@
|
||||
}
|
||||
|
||||
.media-modal .attachments-browser .media-toolbar .attachment-filters {
|
||||
margin: 11px 0 0;
|
||||
height: auto;
|
||||
max-width: 65%;
|
||||
max-width: -webkit-calc(100% - 38px);
|
||||
max-width: calc(100% - 38px);
|
||||
}
|
||||
|
||||
.media-modal .attachments-browser .media-toolbar .spinner {
|
||||
margin: 14px 8px 0;
|
||||
margin: 14px 2px 0;
|
||||
}
|
||||
|
||||
/* Text inputs need to be 16px, or they force zooming on iOS */
|
||||
@@ -2462,11 +2501,6 @@
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 480px) {
|
||||
.media-frame-content .media-toolbar .search,
|
||||
.media-frame-content .media-toolbar .attachment-filters {
|
||||
max-width: 90px;
|
||||
}
|
||||
|
||||
.media-modal-close {
|
||||
top: 5px;
|
||||
left: 5px;
|
||||
@@ -2504,7 +2538,6 @@
|
||||
* HiDPI Displays
|
||||
*/
|
||||
@media print,
|
||||
(-o-min-device-pixel-ratio: 5/4),
|
||||
(-webkit-min-device-pixel-ratio: 1.25),
|
||||
(min-resolution: 120dpi) {
|
||||
|
||||
|
||||
+8
-1
@@ -1 +1,8 @@
|
||||
.media-modal *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.media-frame input,.media-frame select,.media-frame textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.media-frame,.media-modal{font-family:"Open Sans",sans-serif;font-size:12px}.media-frame input,.media-frame textarea{padding:6px 8px}.media-frame select,.wp-admin .media-frame select{line-height:28px;margin-top:3px}.media-frame a{border-bottom:none;color:#21759b}.media-frame a:hover{color:#d54e21}.media-frame a.button{color:#333}.media-frame a.button:hover{color:#222}.media-frame a.button-primary,.media-frame a.button-primary:hover{color:#fff}.media-frame input[type=email],.media-frame input[type=number],.media-frame input[type=password],.media-frame input[type=search],.media-frame input[type=text],.media-frame input[type=url],.media-frame select,.media-frame textarea{font-family:"Open Sans",sans-serif;font-size:12px;border-width:1px;border-style:solid;border-color:#dfdfdf}.media-frame input[type=email]:focus,.media-frame input[type=number]:focus,.media-frame input[type=password]:focus,.media-frame input[type=search]:focus,.media-frame input[type=text]:focus,.media-frame input[type=url]:focus,.media-frame select:focus,.media-frame textarea:focus{border-color:#5b9dd9}.media-frame select{height:24px;padding:2px}.media-frame input:disabled,.media-frame input[readonly],.media-frame textarea:disabled,.media-frame textarea[readonly]{background-color:#eee}.media-frame input[type=search]{-webkit-appearance:textfield}.media-frame :-moz-placeholder{color:#a9a9a9}.media-frame .hidden{display:none}.ui-draggable,.ui-sortable{-ms-touch-action:none;touch-action:none}.meta-box-sortables.ui-sortable{-ms-touch-action:auto;touch-action:auto}.meta-box-sortables.ui-sortable .hndle{-ms-touch-action:none;touch-action:none}.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:.7;z-index:159900}.wp-customizer .media-modal-backdrop{z-index:559900}.media-modal-close{position:absolute;text-decoration:none;top:10px;left:10px;width:30px;height:30px;z-index:1000;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.media-modal-close:active{-webkit-box-shadow:none;box-shadow:none}.media-modal-close span.media-modal-icon{display:block;margin-top:5px;width:30px;height:15px;background-image:none;text-align:center}.media-modal-close .media-modal-icon:before{content:'\f158';font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#666}.media-modal-close:hover .media-modal-icon:before{color:#2ea2cc}.media-modal-close:active{outline:0}.media-modal-content{position:absolute;top:0;right:0;left:0;bottom:0;overflow:auto;min-height:300px;-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);background:#fcfcfc;-webkit-font-smoothing:subpixel-antialiased}.media-modal-icon{background-image:url(../images/uploader-icons.png);background-repeat:no-repeat}.media-toolbar{position:absolute;top:0;right:0;left:0;z-index:100;height:60px;padding:0 16px;border:0 solid #dfdfdf;overflow:hidden}.media-toolbar-primary{float:left;height:100%}.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}.media-sidebar{position:absolute;top:0;left:0;bottom:0;width:267px;padding:0 16px 24px;z-index:75;background:#f3f3f3;border-right:1px solid #ddd;overflow:auto;-webkit-overflow-scrolling:touch}.hide-toolbar .media-sidebar{bottom:0}.media-sidebar .sidebar-title{font-size:20px;margin:0;padding:12px 10px 10px;line-height:28px}.media-sidebar .sidebar-content{padding:0 10px;margin-bottom:130px}.media-sidebar .search{display:block;width:100%}.image-details h3,.media-sidebar h3{position:relative;font-weight:700;text-transform:uppercase;font-size:12px;color:#666;margin:24px 0 8px}.attachment-details .setting,.media-sidebar .setting{display:block;float:right;width:100%;margin:1px 0}.attachment-details .setting label,.media-sidebar .setting label{display:block}.attachment-details .setting .link-to-custom,.media-sidebar .setting .link-to-custom{margin:3px 2px 0}.attachment-details .setting span,.media-sidebar .setting span{min-width:30%;margin-left:4%;font-size:12px;text-align:left}.attachment-details .setting select,.media-sidebar .setting select{max-width:65%}.attachment-details .field input[type=checkbox],.attachment-details .field input[type=radio],.attachment-details .setting input[type=checkbox],.attachment-details .setting input[type=radio],.media-sidebar .field Line truncated
|
||||
.media-modal *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.media-frame input,.media-frame select,.media-frame textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.media-frame,.media-modal{font-family:"Open Sans",sans-serif;font-size:12px;-webkit-overflow-scrolling:touch}.media-frame input,.media-frame textarea{padding:6px 8px}.media-frame select,.wp-admin .media-frame select{line-height:28px;margin-top:3px}.media-frame a{border-bottom:none;color:#21759b}.media-frame a:hover{color:#d54e21}.media-frame a.button{color:#32373c}.media-frame a.button:hover{color:#23282d}.media-frame a.button-primary,.media-frame a.button-primary:hover{color:#fff}.media-frame input[type=email],.media-frame input[type=number],.media-frame input[type=password],.media-frame input[type=search],.media-frame input[type=text],.media-frame input[type=url],.media-frame select,.media-frame textarea{font-family:"Open Sans",sans-serif;font-size:12px;border-width:1px;border-style:solid;border-color:#dfdfdf}.media-frame input[type=email]:focus,.media-frame input[type=number]:focus,.media-frame input[type=password]:focus,.media-frame input[type=search]:focus,.media-frame input[type=text]:focus,.media-frame input[type=url]:focus,.media-frame select:focus,.media-frame textarea:focus{border-color:#5b9dd9}.media-frame select{height:24px;padding:2px}.media-frame input:disabled,.media-frame input[readonly],.media-frame textarea:disabled,.media-frame textarea[readonly]{background-color:#eee}.media-frame input[type=search]{-webkit-appearance:textfield}.media-frame :-moz-placeholder{color:#a9a9a9}.media-frame .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{-ms-touch-action:none;touch-action:none}.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:.7;z-index:159900}.wp-customizer .media-modal-backdrop{z-index:559900}.media-modal-close{position:absolute;text-decoration:none;top:10px;left:10px;width:30px;height:30px;z-index:1000;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.media-modal-close:active{-webkit-box-shadow:none;box-shadow:none}.media-modal-close span.media-modal-icon{display:block;margin-top:5px;width:30px;height:15px;background-image:none;text-align:center}.media-modal-close .media-modal-icon:before{content:'\f158';font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#666}.media-modal-close:hover .media-modal-icon:before{color:#00a0d2}.media-modal-close:active{outline:0}.media-modal-content{position:absolute;top:0;right:0;left:0;bottom:0;overflow:auto;min-height:300px;-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);background:#fcfcfc;-webkit-font-smoothing:subpixel-antialiased}.media-modal-icon{background-image:url(../images/uploader-icons.png);background-repeat:no-repeat}.media-toolbar{position:absolute;top:0;right:0;left:0;z-index:100;height:60px;padding:0 16px;border:0 solid #dfdfdf;overflow:hidden}.media-toolbar-primary{float:left;height:100%}.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}.media-sidebar{position:absolute;top:0;left:0;bottom:0;width:267px;padding:0 16px 24px;z-index:75;background:#f3f3f3;border-right:1px solid #ddd;overflow:auto;-webkit-overflow-scrolling:touch}.hide-toolbar .media-sidebar{bottom:0}.media-sidebar .sidebar-title{font-size:20px;margin:0;padding:12px 10px 10px;line-height:28px}.media-sidebar .sidebar-content{padding:0 10px;margin-bottom:130px}.media-sidebar .search{display:block;width:100%}.image-details h3,.media-sidebar h3{position:relative;font-weight:700;text-transform:uppercase;font-size:12px;color:#666;margin:24px 0 8px}.attachment-details .setting,.media-sidebar .setting{display:block;float:right;width:100%;margin:1px 0}.attachment-details .setting label,.media-sidebar .setting label{display:block}.attachment-details .setting .link-to-custom,.media-sidebar .setting .link-to-custom{margin:3px 2px 0}.attachment-details .setting span,.media-sidebar .setting span{min-width:30%;margin-left:4%;font-size:12px;text-align:left;word-wrap:break-word}.media-sidebar .setting .name{max-width:80px}.attachment-details .setting select,.media-sidebar .setting select{max-width:65%}.attachment-details .field input[type=checkbox],.attachment-details .field input[type=radio],.attachment-details .setting input[type=checkbox],.attachment-details .setting input[type=radio],.media-sidebar .field input[type=checkbox],.media-sidebar .field input[type=radio],.media-sidebar .setting input[type=checkbox],.media-sidebar .setting input[type=radio]{float:none;margin:8px 3px 0;padding:0}.attachment-details .setting span,.compat-item label span,.media-sidebar .setting span{float:right;min-height:22px;padding-top:8px;line-height:16px;font-weight:400;color:#666}.compat-item label span{text-align:left}.attachment-details .setting .value,.attachment-details .setting input[type=email],.attachment-details .setting input[type=number],.attachment-details .setting input[type=password],.attachment-details .setting input[type=search],.attachment-details .setting input[type=tel],.attachment-details .setting input[type=text],.attachment-details .setting input[type=url],.attachment-details .setting textarea,.media-sidebar .setting .value,.media-sidebar .setting input[type=email],.media-sidebar .setting input[type=number],.media-sidebar .setting input[type=password],.media-sidebar .setting input[type=search],.media-sidebar .setting input[type=tel],.media-sidebar .setting input[type=text],.media-sidebar .setting input[type=url],.media-sidebar .setting textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px;width:65%;float:left}.attachment-details .setting .value,.media-sidebar .setting .value{margin:0 1px;text-align:right}.attachment-details .setting textarea,.compat-item .field textarea,.media-sidebar .setting textarea{height:62px;resize:vertical}.attachment-details select,.media-sidebar select{margin-top:3px}.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:2Line truncated
|
||||
+138
-105
@@ -19,6 +19,7 @@
|
||||
.media-frame {
|
||||
font-family: "Open Sans", sans-serif;
|
||||
font-size: 12px;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.media-frame input,
|
||||
@@ -42,11 +43,11 @@
|
||||
}
|
||||
|
||||
.media-frame a.button {
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
}
|
||||
|
||||
.media-frame a.button:hover {
|
||||
color: #222;
|
||||
color: #23282d;
|
||||
}
|
||||
|
||||
.media-frame a.button-primary,
|
||||
@@ -104,19 +105,16 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Enable draggable on IE10 touch events until it's rolled into jQuery UI core */
|
||||
.ui-sortable,
|
||||
.ui-draggable {
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.meta-box-sortables.ui-sortable {
|
||||
-ms-touch-action: auto;
|
||||
touch-action: auto;
|
||||
}
|
||||
|
||||
.meta-box-sortables.ui-sortable .hndle {
|
||||
/*!
|
||||
* 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 {
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
@@ -190,7 +188,7 @@
|
||||
}
|
||||
|
||||
.media-modal-close:hover .media-modal-icon:before {
|
||||
color: #2ea2cc;
|
||||
color: #00a0d2;
|
||||
}
|
||||
|
||||
.media-modal-close:active {
|
||||
@@ -326,6 +324,11 @@
|
||||
margin-right: 4%;
|
||||
font-size: 12px;
|
||||
text-align: right;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.media-sidebar .setting .name {
|
||||
max-width: 80px;
|
||||
}
|
||||
|
||||
.media-sidebar .setting select,
|
||||
@@ -445,7 +448,8 @@
|
||||
|
||||
.compat-item .field {
|
||||
float: right;
|
||||
width: 66%;
|
||||
width: 65%;
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
.compat-item .field input[type="text"],
|
||||
@@ -454,9 +458,13 @@
|
||||
.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 input[type="url"],
|
||||
.compat-item .field textarea {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.sidebar-for-errors .attachment-details,
|
||||
@@ -494,7 +502,7 @@
|
||||
margin: 0;
|
||||
line-height: 18px;
|
||||
font-size: 14px;
|
||||
color: #0074a2;
|
||||
color: #0073aa;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
@@ -509,7 +517,7 @@
|
||||
|
||||
.media-menu .active,
|
||||
.media-menu .active:hover {
|
||||
color: #222;
|
||||
color: #23282d;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@@ -560,7 +568,7 @@
|
||||
|
||||
.media-router .active,
|
||||
.media-router .active:hover {
|
||||
color: #333;
|
||||
color: #32373c;
|
||||
}
|
||||
|
||||
.media-router .active,
|
||||
@@ -729,7 +737,14 @@
|
||||
*/
|
||||
.media-frame select.attachment-filters {
|
||||
margin-top: 11px;
|
||||
margin-right: 10px;
|
||||
margin-right: 2%;
|
||||
max-width: 42%;
|
||||
max-width: -webkit-calc(48% - 12px);
|
||||
max-width: calc(48% - 12px);
|
||||
}
|
||||
|
||||
.media-frame select.attachment-filters:last-of-type {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -744,14 +759,14 @@
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
.media-toolbar-secondary .search {
|
||||
margin-right: 16px;
|
||||
.media-toolbar-primary .search {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachments
|
||||
*/
|
||||
.attachments {
|
||||
.wp-core-ui .attachments {
|
||||
margin: 0;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
@@ -759,7 +774,7 @@
|
||||
/**
|
||||
* Attachment
|
||||
*/
|
||||
.attachment {
|
||||
.wp-core-ui .attachment {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 8px;
|
||||
@@ -778,9 +793,9 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.attachment:focus,
|
||||
.selected.attachment:focus,
|
||||
.attachment.details:focus {
|
||||
.wp-core-ui .attachment:focus,
|
||||
.wp-core-ui .selected.attachment:focus,
|
||||
.wp-core-ui .attachment.details:focus {
|
||||
-webkit-box-shadow:
|
||||
inset 0 0 2px 3px #fff,
|
||||
inset 0 0 0 7px #5b9dd9;
|
||||
@@ -790,7 +805,7 @@
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.selected.attachment {
|
||||
.wp-core-ui .selected.attachment {
|
||||
-webkit-box-shadow:
|
||||
inset 0 0 0 5px #fff,
|
||||
inset 0 0 0 7px #ccc;
|
||||
@@ -799,7 +814,7 @@
|
||||
inset 0 0 0 7px #ccc;
|
||||
}
|
||||
|
||||
.attachment.details {
|
||||
.wp-core-ui .attachment.details {
|
||||
-webkit-box-shadow:
|
||||
inset 0 0 0 3px #fff,
|
||||
inset 0 0 0 7px #1e8cbe;
|
||||
@@ -808,7 +823,7 @@
|
||||
inset 0 0 0 7px #1e8cbe;
|
||||
}
|
||||
|
||||
.attachment-preview {
|
||||
.wp-core-ui .attachment-preview {
|
||||
position: relative;
|
||||
-webkit-box-shadow:
|
||||
inset 0 0 15px rgba( 0, 0, 0, 0.1 ),
|
||||
@@ -820,18 +835,18 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.attachment-preview:before {
|
||||
.wp-core-ui .attachment-preview:before {
|
||||
content: '';
|
||||
display: block;
|
||||
padding-top: 100%;
|
||||
}
|
||||
|
||||
.attachment .icon {
|
||||
.wp-core-ui .attachment .icon {
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.attachment .thumbnail {
|
||||
.wp-core-ui .attachment .thumbnail {
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@@ -843,15 +858,15 @@
|
||||
transition: opacity .1s;
|
||||
}
|
||||
|
||||
.attachment .portrait img {
|
||||
.wp-core-ui .attachment .portrait img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.attachment .landscape img {
|
||||
.wp-core-ui .attachment .landscape img {
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.attachment .thumbnail:after {
|
||||
.wp-core-ui .attachment .thumbnail:after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
@@ -864,14 +879,12 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
.attachment .thumbnail img {
|
||||
.wp-core-ui .attachment .thumbnail img {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
.attachment .thumbnail .centered {
|
||||
.wp-core-ui .attachment .thumbnail .centered {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@@ -882,24 +895,24 @@
|
||||
transform: translate( 50%, 50% );
|
||||
}
|
||||
|
||||
.attachment .thumbnail .centered img {
|
||||
.wp-core-ui .attachment .thumbnail .centered img {
|
||||
-webkit-transform: translate( -50%, -50% );
|
||||
-ms-transform: translate(-50%,-50%);
|
||||
transform: translate( -50%, -50% );
|
||||
}
|
||||
|
||||
.attachment .thumbnail .centered img.icon {
|
||||
.wp-core-ui .attachments-browser .attachment .thumbnail .centered img.icon {
|
||||
-webkit-transform: translate( -50%, -70% );
|
||||
-ms-transform: translate(-50%,-70%);
|
||||
transform: translate( -50%, -70% );
|
||||
}
|
||||
|
||||
.ie8 .attachment img.icon {
|
||||
.ie8 .wp-core-ui .attachment img.icon {
|
||||
top: 20%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.attachment .filename {
|
||||
.wp-core-ui .attachment .filename {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
@@ -914,16 +927,16 @@
|
||||
box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 );
|
||||
}
|
||||
|
||||
.attachment .filename div {
|
||||
.wp-core-ui .attachment .filename div {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.attachment .thumbnail img {
|
||||
.wp-core-ui .attachment .thumbnail img {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.attachment .close {
|
||||
display: none;
|
||||
.wp-core-ui .attachment .close {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
@@ -942,18 +955,21 @@
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.3 );
|
||||
box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.3 );
|
||||
-webkit-transition-duration: none;
|
||||
transition-duration: none;
|
||||
-webkit-transition-property: none;
|
||||
transition-property: none;
|
||||
}
|
||||
|
||||
.attachment .close:hover {
|
||||
.wp-core-ui .attachment a.close:hover,
|
||||
.wp-core-ui .attachment a.close:focus {
|
||||
-webkit-box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.6 );
|
||||
box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.6 );
|
||||
background-position: -36px 4px;
|
||||
|
||||
}
|
||||
|
||||
.attachment:hover .close {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.attachment .check {
|
||||
.wp-core-ui .attachment .check {
|
||||
display: none;
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
@@ -967,24 +983,24 @@
|
||||
box-shadow: 0 0 0 1px #fff, 0 0 0 2px rgba( 0, 0, 0, 0.15 );
|
||||
}
|
||||
|
||||
.attachment .check div {
|
||||
.wp-core-ui .attachment .check div {
|
||||
background-position: -1px 0;
|
||||
height: 15px;
|
||||
width: 15px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.attachment .check:hover div {
|
||||
.wp-core-ui .attachment .check:hover div {
|
||||
background-position: -40px 0;
|
||||
}
|
||||
|
||||
.attachment.selected .check {
|
||||
.wp-core-ui .attachment.selected .check {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.attachment.details .check,
|
||||
.attachment.selected .check:focus,
|
||||
.media-frame.mode-grid .attachment.selected .check {
|
||||
.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: #1e8cbe;
|
||||
-webkit-box-shadow:
|
||||
0 0 0 1px #fff,
|
||||
@@ -994,18 +1010,18 @@
|
||||
0 0 0 2px #1e8cbe;
|
||||
}
|
||||
|
||||
.attachment.details .check div,
|
||||
.media-frame.mode-grid .attachment.selected .check div {
|
||||
.wp-core-ui .attachment.details .check div,
|
||||
.wp-core-ui .media-frame.mode-grid .attachment.selected .check div {
|
||||
background-position: -21px 0;
|
||||
}
|
||||
|
||||
.attachment.details .check:hover div,
|
||||
.attachment.selected .check:focus div,
|
||||
.media-frame.mode-grid .attachment.selected .check:hover div {
|
||||
.wp-core-ui .attachment.details .check:hover div,
|
||||
.wp-core-ui .attachment.selected .check:focus div,
|
||||
.wp-core-ui .media-frame.mode-grid .attachment.selected .check:hover div {
|
||||
background-position: -60px 0;
|
||||
}
|
||||
|
||||
.media-frame .attachment .describe {
|
||||
.wp-core-ui .media-frame .attachment .describe {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100%;
|
||||
@@ -1061,6 +1077,14 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.attachments-browser .media-toolbar-primary {
|
||||
max-width: 33%;
|
||||
}
|
||||
|
||||
.attachments-browser .media-toolbar-secondary {
|
||||
max-width: 66%;
|
||||
}
|
||||
|
||||
.uploader-inline .close {
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
@@ -1426,18 +1450,16 @@
|
||||
}
|
||||
|
||||
.media-selection .attachment {
|
||||
width: 48px;
|
||||
width: 40px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
.media-selection .attachment .thumbnail {
|
||||
top: 4px;
|
||||
right: 4px;
|
||||
bottom: 4px;
|
||||
left: 4px;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.media-selection .attachment .icon {
|
||||
@@ -1450,7 +1472,23 @@
|
||||
background: none;
|
||||
}
|
||||
|
||||
.media-selection .attachment.selection.details .thumbnail {
|
||||
.wp-core-ui .media-selection .attachment:focus,
|
||||
.wp-core-ui .media-selection .selected.attachment:focus,
|
||||
.wp-core-ui .media-selection .attachment.details:focus {
|
||||
-webkit-box-shadow:
|
||||
0 0 0 1px #fff,
|
||||
0 0 2px 3px #5b9dd9;
|
||||
box-shadow:
|
||||
0 0 0 1px #fff,
|
||||
0 0 2px 3px #5b9dd9;
|
||||
}
|
||||
|
||||
.wp-core-ui .media-selection .selected.attachment {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.wp-core-ui .media-selection .attachment.details {
|
||||
-webkit-box-shadow:
|
||||
0 0 0 1px #fff,
|
||||
0 0 0 3px #1e8cbe;
|
||||
@@ -1483,12 +1521,19 @@
|
||||
background: url(../images/spinner.gif) no-repeat;
|
||||
-webkit-background-size: 20px 20px;
|
||||
background-size: 20px 20px;
|
||||
display: none;
|
||||
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 .spinner.is-active {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.media-toolbar .spinner {
|
||||
@@ -1510,7 +1555,7 @@
|
||||
}
|
||||
|
||||
.attachment-details .settings-save-status .spinner {
|
||||
margin: 0 5px 0;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.attachment-details .settings-save-status .saved {
|
||||
@@ -1518,7 +1563,10 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.attachment-details.save-waiting .settings-save-status .spinner,
|
||||
.attachment-details.save-waiting .settings-save-status .spinner {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.attachment-details.save-complete .settings-save-status .saved {
|
||||
display: block;
|
||||
}
|
||||
@@ -1761,7 +1809,7 @@
|
||||
}
|
||||
|
||||
.media-frame .embed-loading .embed-url .spinner {
|
||||
display: block;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.embed-link-settings,
|
||||
@@ -1775,11 +1823,18 @@
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.embed-preview img, .embed-preview iframe, .embed-preview embed {
|
||||
.embed-preview img,
|
||||
.embed-preview iframe,
|
||||
.embed-preview embed {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.embed-preview a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.embed-preview img {
|
||||
display: block;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
@@ -2142,13 +2197,6 @@
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 940px) {
|
||||
.media-frame-content .media-toolbar-primary .search,
|
||||
.media-frame-content .media-toolbar-secondary .attachment-filters {
|
||||
max-width: 134px;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Responsive layout
|
||||
*/
|
||||
@@ -2342,11 +2390,6 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.media-modal .attachments-browser .media-toolbar-primary,
|
||||
.media-modal .attachments-browser .media-toolbar-secondary {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.media-modal .attachments-browser .media-toolbar .search {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
@@ -2354,15 +2397,11 @@
|
||||
}
|
||||
|
||||
.media-modal .attachments-browser .media-toolbar .attachment-filters {
|
||||
margin: 11px 0 0;
|
||||
height: auto;
|
||||
max-width: 65%;
|
||||
max-width: -webkit-calc(100% - 38px);
|
||||
max-width: calc(100% - 38px);
|
||||
}
|
||||
|
||||
.media-modal .attachments-browser .media-toolbar .spinner {
|
||||
margin: 14px 8px 0;
|
||||
margin: 14px 2px 0;
|
||||
}
|
||||
|
||||
/* Text inputs need to be 16px, or they force zooming on iOS */
|
||||
@@ -2462,11 +2501,6 @@
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 480px) {
|
||||
.media-frame-content .media-toolbar .search,
|
||||
.media-frame-content .media-toolbar .attachment-filters {
|
||||
max-width: 90px;
|
||||
}
|
||||
|
||||
.media-modal-close {
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
@@ -2504,7 +2538,6 @@
|
||||
* HiDPI Displays
|
||||
*/
|
||||
@media print,
|
||||
(-o-min-device-pixel-ratio: 5/4),
|
||||
(-webkit-min-device-pixel-ratio: 1.25),
|
||||
(min-resolution: 120dpi) {
|
||||
|
||||
|
||||
Vendored
+8
-1
@@ -1 +1,8 @@
|
||||
.media-modal *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.media-frame input,.media-frame select,.media-frame textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.media-frame,.media-modal{font-family:"Open Sans",sans-serif;font-size:12px}.media-frame input,.media-frame textarea{padding:6px 8px}.media-frame select,.wp-admin .media-frame select{line-height:28px;margin-top:3px}.media-frame a{border-bottom:none;color:#21759b}.media-frame a:hover{color:#d54e21}.media-frame a.button{color:#333}.media-frame a.button:hover{color:#222}.media-frame a.button-primary,.media-frame a.button-primary:hover{color:#fff}.media-frame input[type=email],.media-frame input[type=number],.media-frame input[type=password],.media-frame input[type=search],.media-frame input[type=text],.media-frame input[type=url],.media-frame select,.media-frame textarea{font-family:"Open Sans",sans-serif;font-size:12px;border-width:1px;border-style:solid;border-color:#dfdfdf}.media-frame input[type=email]:focus,.media-frame input[type=number]:focus,.media-frame input[type=password]:focus,.media-frame input[type=search]:focus,.media-frame input[type=text]:focus,.media-frame input[type=url]:focus,.media-frame select:focus,.media-frame textarea:focus{border-color:#5b9dd9}.media-frame select{height:24px;padding:2px}.media-frame input:disabled,.media-frame input[readonly],.media-frame textarea:disabled,.media-frame textarea[readonly]{background-color:#eee}.media-frame input[type=search]{-webkit-appearance:textfield}.media-frame :-moz-placeholder{color:#a9a9a9}.media-frame .hidden{display:none}.ui-draggable,.ui-sortable{-ms-touch-action:none;touch-action:none}.meta-box-sortables.ui-sortable{-ms-touch-action:auto;touch-action:auto}.meta-box-sortables.ui-sortable .hndle{-ms-touch-action:none;touch-action:none}.media-modal{position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:160000}.wp-customizer .media-modal{z-index:560000}.media-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:159900}.wp-customizer .media-modal-backdrop{z-index:559900}.media-modal-close{position:absolute;text-decoration:none;top:10px;right:10px;width:30px;height:30px;z-index:1000;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.media-modal-close:active{-webkit-box-shadow:none;box-shadow:none}.media-modal-close span.media-modal-icon{display:block;margin-top:5px;width:30px;height:15px;background-image:none;text-align:center}.media-modal-close .media-modal-icon:before{content:'\f158';font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#666}.media-modal-close:hover .media-modal-icon:before{color:#2ea2cc}.media-modal-close:active{outline:0}.media-modal-content{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;min-height:300px;-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);background:#fcfcfc;-webkit-font-smoothing:subpixel-antialiased}.media-modal-icon{background-image:url(../images/uploader-icons.png);background-repeat:no-repeat}.media-toolbar{position:absolute;top:0;left:0;right:0;z-index:100;height:60px;padding:0 16px;border:0 solid #dfdfdf;overflow:hidden}.media-toolbar-primary{float:right;height:100%}.media-toolbar-secondary{float:left;height:100%}.media-toolbar-primary>.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}.media-sidebar{position:absolute;top:0;right:0;bottom:0;width:267px;padding:0 16px 24px;z-index:75;background:#f3f3f3;border-left:1px solid #ddd;overflow:auto;-webkit-overflow-scrolling:touch}.hide-toolbar .media-sidebar{bottom:0}.media-sidebar .sidebar-title{font-size:20px;margin:0;padding:12px 10px 10px;line-height:28px}.media-sidebar .sidebar-content{padding:0 10px;margin-bottom:130px}.media-sidebar .search{display:block;width:100%}.image-details h3,.media-sidebar h3{position:relative;font-weight:700;text-transform:uppercase;font-size:12px;color:#666;margin:24px 0 8px}.attachment-details .setting,.media-sidebar .setting{display:block;float:left;width:100%;margin:1px 0}.attachment-details .setting label,.media-sidebar .setting label{display:block}.attachment-details .setting .link-to-custom,.media-sidebar .setting .link-to-custom{margin:3px 2px 0}.attachment-details .setting span,.media-sidebar .setting span{min-width:30%;margin-right:4%;font-size:12px;text-align:right}.attachment-details .setting select,.media-sidebar .setting select{max-width:65%}.attachment-details .field input[type=checkbox],.attachment-details .field input[type=radio],.attachment-details .setting input[type=checkbox],.attachment-details .setting input[type=radio],.media-sidebar .fieldLine truncated
|
||||
.media-modal *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.media-frame input,.media-frame select,.media-frame textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.media-frame,.media-modal{font-family:"Open Sans",sans-serif;font-size:12px;-webkit-overflow-scrolling:touch}.media-frame input,.media-frame textarea{padding:6px 8px}.media-frame select,.wp-admin .media-frame select{line-height:28px;margin-top:3px}.media-frame a{border-bottom:none;color:#21759b}.media-frame a:hover{color:#d54e21}.media-frame a.button{color:#32373c}.media-frame a.button:hover{color:#23282d}.media-frame a.button-primary,.media-frame a.button-primary:hover{color:#fff}.media-frame input[type=email],.media-frame input[type=number],.media-frame input[type=password],.media-frame input[type=search],.media-frame input[type=text],.media-frame input[type=url],.media-frame select,.media-frame textarea{font-family:"Open Sans",sans-serif;font-size:12px;border-width:1px;border-style:solid;border-color:#dfdfdf}.media-frame input[type=email]:focus,.media-frame input[type=number]:focus,.media-frame input[type=password]:focus,.media-frame input[type=search]:focus,.media-frame input[type=text]:focus,.media-frame input[type=url]:focus,.media-frame select:focus,.media-frame textarea:focus{border-color:#5b9dd9}.media-frame select{height:24px;padding:2px}.media-frame input:disabled,.media-frame input[readonly],.media-frame textarea:disabled,.media-frame textarea[readonly]{background-color:#eee}.media-frame input[type=search]{-webkit-appearance:textfield}.media-frame :-moz-placeholder{color:#a9a9a9}.media-frame .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{-ms-touch-action:none;touch-action:none}.media-modal{position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:160000}.wp-customizer .media-modal{z-index:560000}.media-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:159900}.wp-customizer .media-modal-backdrop{z-index:559900}.media-modal-close{position:absolute;text-decoration:none;top:10px;right:10px;width:30px;height:30px;z-index:1000;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.media-modal-close:active{-webkit-box-shadow:none;box-shadow:none}.media-modal-close span.media-modal-icon{display:block;margin-top:5px;width:30px;height:15px;background-image:none;text-align:center}.media-modal-close .media-modal-icon:before{content:'\f158';font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#666}.media-modal-close:hover .media-modal-icon:before{color:#00a0d2}.media-modal-close:active{outline:0}.media-modal-content{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;min-height:300px;-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);background:#fcfcfc;-webkit-font-smoothing:subpixel-antialiased}.media-modal-icon{background-image:url(../images/uploader-icons.png);background-repeat:no-repeat}.media-toolbar{position:absolute;top:0;left:0;right:0;z-index:100;height:60px;padding:0 16px;border:0 solid #dfdfdf;overflow:hidden}.media-toolbar-primary{float:right;height:100%}.media-toolbar-secondary{float:left;height:100%}.media-toolbar-primary>.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}.media-sidebar{position:absolute;top:0;right:0;bottom:0;width:267px;padding:0 16px 24px;z-index:75;background:#f3f3f3;border-left:1px solid #ddd;overflow:auto;-webkit-overflow-scrolling:touch}.hide-toolbar .media-sidebar{bottom:0}.media-sidebar .sidebar-title{font-size:20px;margin:0;padding:12px 10px 10px;line-height:28px}.media-sidebar .sidebar-content{padding:0 10px;margin-bottom:130px}.media-sidebar .search{display:block;width:100%}.image-details h3,.media-sidebar h3{position:relative;font-weight:700;text-transform:uppercase;font-size:12px;color:#666;margin:24px 0 8px}.attachment-details .setting,.media-sidebar .setting{display:block;float:left;width:100%;margin:1px 0}.attachment-details .setting label,.media-sidebar .setting label{display:block}.attachment-details .setting .link-to-custom,.media-sidebar .setting .link-to-custom{margin:3px 2px 0}.attachment-details .setting span,.media-sidebar .setting span{min-width:30%;margin-right:4%;font-size:12px;text-align:right;word-wrap:break-word}.media-sidebar .setting .name{max-width:80px}.attachment-details .setting select,.media-sidebar .setting select{max-width:65%}.attachment-details .field input[type=checkbox],.attachment-details .field input[type=radio],.attachment-details .setting input[type=checkbox],.attachment-details .setting input[type=radio],.media-sidebar .field input[type=checkbox],.media-sidebar .field input[type=radio],.media-sidebar .setting input[type=checkbox],.media-sidebar .setting input[type=radio]{float:none;margin:8px 3px 0;padding:0}.attachment-details .setting span,.compat-item label span,.media-sidebar .setting span{float:left;min-height:22px;padding-top:8px;line-height:16px;font-weight:400;color:#666}.compat-item label span{text-align:right}.attachment-details .setting .value,.attachment-details .setting input[type=email],.attachment-details .setting input[type=number],.attachment-details .setting input[type=password],.attachment-details .setting input[type=search],.attachment-details .setting input[type=tel],.attachment-details .setting input[type=text],.attachment-details .setting input[type=url],.attachment-details .setting textarea,.media-sidebar .setting .value,.media-sidebar .setting input[type=email],.media-sidebar .setting input[type=number],.media-sidebar .setting input[type=password],.media-sidebar .setting input[type=search],.media-sidebar .setting input[type=tel],.media-sidebar .setting input[type=text],.media-sidebar .setting input[type=url],.media-sidebar .setting textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px;width:65%;float:right}.attachment-details .setting .value,.media-sidebar .setting .value{margin:0 1px;text-align:left}.attachment-details .setting textarea,.compat-item .field textarea,.media-sidebar .setting textarea{height:62px;resize:vertical}.attachment-details select,.media-sidebar select{margin-top:3px}.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:2Line truncated
|
||||
@@ -28,28 +28,37 @@
|
||||
width: 380px;
|
||||
margin: 0 -190px 0 0;
|
||||
padding: 30px 0 0;
|
||||
background-color: #eee;
|
||||
background-color: #f1f1f1;
|
||||
z-index: 1000011; /* needs to appear above #wp-auth-check-bg */
|
||||
-webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
||||
box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 380px ) {
|
||||
#wp-auth-check-wrap #wp-auth-check {
|
||||
right: 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 {
|
||||
background: url(../images/wpspin-2x.gif) no-repeat center center;
|
||||
background: url(../images/spinner-2x.gif) no-repeat center center;
|
||||
-webkit-background-size: 16px 16px;
|
||||
background-size: 16px 16px;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
#wp-auth-check-wrap #wp-auth-check-form iframe {
|
||||
height: 100%;
|
||||
height: 98%; /* Scrollbar fix */
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#wp-auth-check-wrap .wp-auth-check-close {
|
||||
@@ -76,11 +85,11 @@
|
||||
}
|
||||
|
||||
#wp-auth-check-wrap .wp-auth-check-close:hover:before {
|
||||
color: #0074a2;
|
||||
color: #0073aa;
|
||||
}
|
||||
|
||||
#wp-auth-check-wrap .wp-auth-check-close:focus {
|
||||
outline: 1px dotted #888;
|
||||
outline: 1px dotted #82878c;
|
||||
}
|
||||
|
||||
#wp-auth-check-wrap .wp-auth-fallback-expired {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
#wp-auth-check-wrap.hidden{display:none}#wp-auth-check-wrap #wp-auth-check-bg{position:fixed;top:0;bottom:0;right:0;left:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000010}#wp-auth-check-wrap #wp-auth-check{position:fixed;right:50%;overflow:hidden;top:40px;bottom:20px;max-height:415px;width:380px;margin:0 -190px 0 0;padding:30px 0 0;background-color:#eee;z-index:1000011;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3)}#wp-auth-check-wrap.fallback #wp-auth-check{max-height:180px;overflow:auto}#wp-auth-check-wrap #wp-auth-check-form{background:url(../images/wpspin-2x.gif) no-repeat center center;-webkit-background-size:16px 16px;background-size:16px 16px;height:100%}#wp-auth-check-wrap #wp-auth-check-form iframe{height:100%;width:100%;overflow:auto}#wp-auth-check-wrap .wp-auth-check-close{position:absolute;top:8px;left:8px;height:22px;width:22px;cursor:pointer}#wp-auth-check-wrap .wp-auth-check-close:before{content:'\f158';display:block!important;font:400 20px/1 dashicons;speak:none;height:22px;margin:2px 0;text-align:center;width:22px;color:#777;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale}#wp-auth-check-wrap .wp-auth-check-close:hover:before{color:#0074a2}#wp-auth-check-wrap .wp-auth-check-close:focus{outline:#888 dotted 1px}#wp-auth-check-wrap .wp-auth-fallback-expired{outline:0}#wp-auth-check-wrap .wp-auth-fallback{font-size:14px;line-height:21px;padding:0 25px;display:none}#wp-auth-check-wrap.fallback .wp-auth-check-close,#wp-auth-check-wrap.fallback .wp-auth-fallback{display:block}
|
||||
#wp-auth-check-wrap.hidden{display:none}#wp-auth-check-wrap #wp-auth-check-bg{position:fixed;top:0;bottom:0;right:0;left:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000010}#wp-auth-check-wrap #wp-auth-check{position:fixed;right:50%;overflow:hidden;top:40px;bottom:20px;max-height:415px;width:380px;margin:0 -190px 0 0;padding:30px 0 0;background-color:#f1f1f1;z-index:1000011;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3)}@media screen and (max-width:380px){#wp-auth-check-wrap #wp-auth-check{right: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{background:url(../images/spinner-2x.gif) center center/16px 16px no-repeat;-webkit-background-size:16px 16px;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}#wp-auth-check-wrap #wp-auth-check-form iframe{height:98%;width:100%}#wp-auth-check-wrap .wp-auth-check-close{position:absolute;top:8px;left:8px;height:22px;width:22px;cursor:pointer}#wp-auth-check-wrap .wp-auth-check-close:before{content:'\f158';display:block!important;font:400 20px/1 dashicons;speak:none;height:22px;margin:2px 0;text-align:center;width:22px;color:#777;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale}#wp-auth-check-wrap .wp-auth-check-close:hover:before{color:#0073aa}#wp-auth-check-wrap .wp-auth-check-close:focus{outline:#82878c dotted 1px}#wp-auth-check-wrap .wp-auth-fallback-expired{outline:0}#wp-auth-check-wrap .wp-auth-fallback{font-size:14px;line-height:21px;padding:0 25px;display:none}#wp-auth-check-wrap.fallback .wp-auth-check-close,#wp-auth-check-wrap.fallback .wp-auth-fallback{display:block}
|
||||
@@ -28,28 +28,37 @@
|
||||
width: 380px;
|
||||
margin: 0 0 0 -190px;
|
||||
padding: 30px 0 0;
|
||||
background-color: #eee;
|
||||
background-color: #f1f1f1;
|
||||
z-index: 1000011; /* needs to appear above #wp-auth-check-bg */
|
||||
-webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
||||
box-shadow: 0 3px 6px rgba( 0, 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 {
|
||||
background: url(../images/wpspin-2x.gif) no-repeat center center;
|
||||
background: url(../images/spinner-2x.gif) no-repeat center center;
|
||||
-webkit-background-size: 16px 16px;
|
||||
background-size: 16px 16px;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
#wp-auth-check-wrap #wp-auth-check-form iframe {
|
||||
height: 100%;
|
||||
height: 98%; /* Scrollbar fix */
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#wp-auth-check-wrap .wp-auth-check-close {
|
||||
@@ -76,11 +85,11 @@
|
||||
}
|
||||
|
||||
#wp-auth-check-wrap .wp-auth-check-close:hover:before {
|
||||
color: #0074a2;
|
||||
color: #0073aa;
|
||||
}
|
||||
|
||||
#wp-auth-check-wrap .wp-auth-check-close:focus {
|
||||
outline: 1px dotted #888;
|
||||
outline: 1px dotted #82878c;
|
||||
}
|
||||
|
||||
#wp-auth-check-wrap .wp-auth-fallback-expired {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
#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;filter:alpha(opacity=70);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:#eee;z-index:1000011;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3)}#wp-auth-check-wrap.fallback #wp-auth-check{max-height:180px;overflow:auto}#wp-auth-check-wrap #wp-auth-check-form{background:url(../images/wpspin-2x.gif) no-repeat center center;-webkit-background-size:16px 16px;background-size:16px 16px;height:100%}#wp-auth-check-wrap #wp-auth-check-form iframe{height:100%;width:100%;overflow:auto}#wp-auth-check-wrap .wp-auth-check-close{position:absolute;top:8px;right:8px;height:22px;width:22px;cursor:pointer}#wp-auth-check-wrap .wp-auth-check-close:before{content:'\f158';display:block!important;font:400 20px/1 dashicons;speak:none;height:22px;margin:2px 0;text-align:center;width:22px;color:#777;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale}#wp-auth-check-wrap .wp-auth-check-close:hover:before{color:#0074a2}#wp-auth-check-wrap .wp-auth-check-close:focus{outline:#888 dotted 1px}#wp-auth-check-wrap .wp-auth-fallback-expired{outline:0}#wp-auth-check-wrap .wp-auth-fallback{font-size:14px;line-height:21px;padding:0 25px;display:none}#wp-auth-check-wrap.fallback .wp-auth-check-close,#wp-auth-check-wrap.fallback .wp-auth-fallback{display:block}
|
||||
#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;filter:alpha(opacity=70);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:#f1f1f1;z-index:1000011;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);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{background:url(../images/spinner-2x.gif) center center/16px 16px no-repeat;-webkit-background-size:16px 16px;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}#wp-auth-check-wrap #wp-auth-check-form iframe{height:98%;width:100%}#wp-auth-check-wrap .wp-auth-check-close{position:absolute;top:8px;right:8px;height:22px;width:22px;cursor:pointer}#wp-auth-check-wrap .wp-auth-check-close:before{content:'\f158';display:block!important;font:400 20px/1 dashicons;speak:none;height:22px;margin:2px 0;text-align:center;width:22px;color:#777;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale}#wp-auth-check-wrap .wp-auth-check-close:hover:before{color:#0073aa}#wp-auth-check-wrap .wp-auth-check-close:focus{outline:#82878c dotted 1px}#wp-auth-check-wrap .wp-auth-fallback-expired{outline:0}#wp-auth-check-wrap .wp-auth-fallback{font-size:14px;line-height:21px;padding:0 25px;display:none}#wp-auth-check-wrap.fallback .wp-auth-check-close,#wp-auth-check-wrap.fallback .wp-auth-fallback{display:block}
|
||||
@@ -17,14 +17,14 @@
|
||||
line-height: 1.4em;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
background: #2ea2cc;
|
||||
background: #00a0d2;
|
||||
}
|
||||
|
||||
.wp-pointer-content h3:before {
|
||||
background: #fff;
|
||||
-webkit-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
color: #2ea2cc;
|
||||
color: #00a0d2;
|
||||
content: '\f227';
|
||||
font: normal 20px/1.6 'dashicons';
|
||||
position: absolute;
|
||||
@@ -61,10 +61,10 @@
|
||||
|
||||
.wp-pointer-buttons a.close:before {
|
||||
background: none;
|
||||
color: #bbb;
|
||||
color: #b4b9be;
|
||||
content: '\f153';
|
||||
display: block !important;
|
||||
font: normal 13px/1 'dashicons';
|
||||
font: normal 16px/1 'dashicons';
|
||||
speak: none;
|
||||
margin: 1px 0;
|
||||
text-align: center;
|
||||
@@ -72,7 +72,7 @@
|
||||
width: 10px;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
right: -12px;
|
||||
right: -15px;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
@@ -110,11 +110,11 @@
|
||||
padding-bottom: 13px;
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.wp-pointer-left {
|
||||
padding-left: 13px;
|
||||
}
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.wp-pointer-right {
|
||||
margin-left: -13px;
|
||||
padding-right: 13px;
|
||||
@@ -147,7 +147,7 @@
|
||||
margin-right: -13px;
|
||||
margin-top: -13px;
|
||||
border: 13px solid transparent;
|
||||
border-bottom-color: #2ea2cc;
|
||||
border-bottom-color: #00a0d2;
|
||||
display: block;
|
||||
content: ' ';
|
||||
}
|
||||
@@ -168,14 +168,14 @@
|
||||
content: ' ';
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.wp-pointer-left .wp-pointer-arrow {
|
||||
left: 0;
|
||||
border-width: 13px 13px 13px 0;
|
||||
border-right-color: #ccc;
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.wp-pointer-left .wp-pointer-arrow-inner {
|
||||
left: 1px;
|
||||
margin-left: -13px;
|
||||
@@ -186,14 +186,14 @@
|
||||
content: ' ';
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.wp-pointer-right .wp-pointer-arrow {
|
||||
right: 0;
|
||||
border-width: 13px 0 13px 13px;
|
||||
border-left-color: #ccc;
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.wp-pointer-right .wp-pointer-arrow-inner {
|
||||
right: 1px;
|
||||
margin-right: -13px;
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.wp-pointer-content{padding:0 0 10px;position:relative;font-size:13px;background:#fff;border:1px solid #dfdfdf;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.075);box-shadow:0 3px 6px rgba(0,0,0,.075)}.wp-pointer-content h3{position:relative;margin:-1px -1px 5px;padding:15px 60px 14px 18px;border:1px solid #3592b6;border-bottom:none;line-height:1.4em;font-size:14px;color:#fff;background:#2ea2cc}.wp-pointer-content h3:before{background:#fff;-webkit-border-radius:50%;border-radius:50%;color:#2ea2cc;content:'\f227';font:400 20px/1.6 dashicons;position:absolute;top:8px;right:15px;speak:none;text-align:center;width:32px;height:32px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-pointer-content p{padding:0 15px}.wp-pointer-buttons{margin:0;padding:5px 15px;overflow:auto}.wp-pointer-buttons a{float:left;display:inline-block;text-decoration:none}.wp-pointer-buttons a.close{padding-right:3px;position:relative}.wp-pointer-buttons a.close:before{background:0 0;color:#bbb;content:'\f153';display:block!important;font:400 13px/1 dashicons;speak:none;margin:1px 0;text-align:center;-webkit-font-smoothing:antialiased!important;width:10px;height:100%;position:absolute;right:-12px;top:1px}.wp-pointer-buttons a.close:hover:before{color:#c00}.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{right: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:#3592b6}.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer-undefined .wp-pointer-arrow-inner{top:1px;margin-right:-13px;margin-top:-13px;border:13px solid transparent;border-bottom-color:#2ea2cc;display:block;content:' '}.wp-pointer-bottom .wp-pointer-arrow{bottom:0;border-width:13px 13px 0;border-top-color:#ccc}.wp-pointer-bottom .wp-pointer-arrow-inner{bottom:1px;margin-right:-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:#ccc}.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:#ccc}.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:' '}@media screen and (max-width:782px){.wp-pointer{display:none}}
|
||||
.wp-pointer-content{padding:0 0 10px;position:relative;font-size:13px;background:#fff;border:1px solid #dfdfdf;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.075);box-shadow:0 3px 6px rgba(0,0,0,.075)}.wp-pointer-content h3{position:relative;margin:-1px -1px 5px;padding:15px 60px 14px 18px;border:1px solid #3592b6;border-bottom:none;line-height:1.4em;font-size:14px;color:#fff;background:#00a0d2}.wp-pointer-content h3:before{background:#fff;-webkit-border-radius:50%;border-radius:50%;color:#00a0d2;content:'\f227';font:400 20px/1.6 dashicons;position:absolute;top:8px;right:15px;speak:none;text-align:center;width:32px;height:32px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-pointer-content p{padding:0 15px}.wp-pointer-buttons{margin:0;padding:5px 15px;overflow:auto}.wp-pointer-buttons a{float:left;display:inline-block;text-decoration:none}.wp-pointer-buttons a.close{padding-right:3px;position:relative}.wp-pointer-buttons a.close:before{background:0 0;color:#b4b9be;content:'\f153';display:block!important;font:400 16px/1 dashicons;speak:none;margin:1px 0;text-align:center;-webkit-font-smoothing:antialiased!important;width:10px;height:100%;position:absolute;right:-15px;top:1px}.wp-pointer-buttons a.close:hover:before{color:#c00}.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{right: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:#3592b6}.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer-undefined .wp-pointer-arrow-inner{top:1px;margin-right:-13px;margin-top:-13px;border:13px solid transparent;border-bottom-color:#00a0d2;display:block;content:' '}.wp-pointer-bottom .wp-pointer-arrow{bottom:0;border-width:13px 13px 0;border-top-color:#ccc}.wp-pointer-bottom .wp-pointer-arrow-inner{bottom:1px;margin-right:-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:#ccc}.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:#ccc}.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:' '}@media screen and (max-width:782px){.wp-pointer{display:none}}
|
||||
@@ -17,14 +17,14 @@
|
||||
line-height: 1.4em;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
background: #2ea2cc;
|
||||
background: #00a0d2;
|
||||
}
|
||||
|
||||
.wp-pointer-content h3:before {
|
||||
background: #fff;
|
||||
-webkit-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
color: #2ea2cc;
|
||||
color: #00a0d2;
|
||||
content: '\f227';
|
||||
font: normal 20px/1.6 'dashicons';
|
||||
position: absolute;
|
||||
@@ -61,10 +61,10 @@
|
||||
|
||||
.wp-pointer-buttons a.close:before {
|
||||
background: none;
|
||||
color: #bbb;
|
||||
color: #b4b9be;
|
||||
content: '\f153';
|
||||
display: block !important;
|
||||
font: normal 13px/1 'dashicons';
|
||||
font: normal 16px/1 'dashicons';
|
||||
speak: none;
|
||||
margin: 1px 0;
|
||||
text-align: center;
|
||||
@@ -72,7 +72,7 @@
|
||||
width: 10px;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: -12px;
|
||||
left: -15px;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
@@ -110,11 +110,11 @@
|
||||
padding-bottom: 13px;
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.wp-pointer-left {
|
||||
padding-left: 13px;
|
||||
}
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.wp-pointer-right {
|
||||
margin-left: -13px;
|
||||
padding-right: 13px;
|
||||
@@ -147,7 +147,7 @@
|
||||
margin-left: -13px;
|
||||
margin-top: -13px;
|
||||
border: 13px solid transparent;
|
||||
border-bottom-color: #2ea2cc;
|
||||
border-bottom-color: #00a0d2;
|
||||
display: block;
|
||||
content: ' ';
|
||||
}
|
||||
@@ -168,14 +168,14 @@
|
||||
content: ' ';
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.wp-pointer-left .wp-pointer-arrow {
|
||||
left: 0;
|
||||
border-width: 13px 13px 13px 0;
|
||||
border-right-color: #ccc;
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.wp-pointer-left .wp-pointer-arrow-inner {
|
||||
left: 1px;
|
||||
margin-left: -13px;
|
||||
@@ -186,14 +186,14 @@
|
||||
content: ' ';
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.wp-pointer-right .wp-pointer-arrow {
|
||||
right: 0;
|
||||
border-width: 13px 0 13px 13px;
|
||||
border-left-color: #ccc;
|
||||
}
|
||||
|
||||
/* @noflip */
|
||||
/* rtl:ignore */
|
||||
.wp-pointer-right .wp-pointer-arrow-inner {
|
||||
right: 1px;
|
||||
margin-right: -13px;
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
.wp-pointer-content{padding:0 0 10px;position:relative;font-size:13px;background:#fff;border:1px solid #dfdfdf;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.075);box-shadow:0 3px 6px rgba(0,0,0,.075)}.wp-pointer-content h3{position:relative;margin:-1px -1px 5px;padding:15px 18px 14px 60px;border:1px solid #3592b6;border-bottom:none;line-height:1.4em;font-size:14px;color:#fff;background:#2ea2cc}.wp-pointer-content h3:before{background:#fff;-webkit-border-radius:50%;border-radius:50%;color:#2ea2cc;content:'\f227';font:400 20px/1.6 dashicons;position:absolute;top:8px;left:15px;speak:none;text-align:center;width:32px;height:32px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-pointer-content p{padding:0 15px}.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:#bbb;content:'\f153';display:block!important;font:400 13px/1 dashicons;speak:none;margin:1px 0;text-align:center;-webkit-font-smoothing:antialiased!important;width:10px;height:100%;position:absolute;left:-12px;top:1px}.wp-pointer-buttons a.close:hover:before{color:#c00}.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:#3592b6}.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:#2ea2cc;display:block;content:' '}.wp-pointer-bottom .wp-pointer-arrow{bottom:0;border-width:13px 13px 0;border-top-color:#ccc}.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:#ccc}.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:#ccc}.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:' '}@media screen and (max-width:782px){.wp-pointer{display:none}}
|
||||
.wp-pointer-content{padding:0 0 10px;position:relative;font-size:13px;background:#fff;border:1px solid #dfdfdf;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.075);box-shadow:0 3px 6px rgba(0,0,0,.075)}.wp-pointer-content h3{position:relative;margin:-1px -1px 5px;padding:15px 18px 14px 60px;border:1px solid #3592b6;border-bottom:none;line-height:1.4em;font-size:14px;color:#fff;background:#00a0d2}.wp-pointer-content h3:before{background:#fff;-webkit-border-radius:50%;border-radius:50%;color:#00a0d2;content:'\f227';font:400 20px/1.6 dashicons;position:absolute;top:8px;left:15px;speak:none;text-align:center;width:32px;height:32px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-pointer-content p{padding:0 15px}.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:#b4b9be;content:'\f153';display:block!important;font:400 16px/1 dashicons;speak:none;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:#c00}.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:#3592b6}.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:#00a0d2;display:block;content:' '}.wp-pointer-bottom .wp-pointer-arrow{bottom:0;border-width:13px 13px 0;border-top-color:#ccc}.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:#ccc}.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:#ccc}.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:' '}@media screen and (max-width:782px){.wp-pointer{display:none}}
|
||||
+672
-111
@@ -1,16 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* WP_Date_Query will generate a MySQL WHERE clause for the specified date-based parameters.
|
||||
* Class for generating SQL clauses that filter a primary query according to date.
|
||||
*
|
||||
* Initialize the class by passing an array of arrays of parameters.
|
||||
* `WP_Date_Query` is a helper that allows primary query classes, such as {@see WP_Query},
|
||||
* to filter their results by date columns, by generating `WHERE` subclauses to be attached
|
||||
* to the primary SQL query string.
|
||||
*
|
||||
* @link http://codex.wordpress.org/Function_Reference/WP_Query Codex page.
|
||||
* Attempting to filter by an invalid date value (eg month=13) will generate SQL that will
|
||||
* return no results. In these cases, a _doing_it_wrong() error notice is also thrown.
|
||||
* See {@link WP_Date_Query::validate_date_values()}.
|
||||
*
|
||||
* @link https://codex.wordpress.org/Function_Reference/WP_Query Codex page.
|
||||
*
|
||||
* @since 3.7.0
|
||||
*/
|
||||
class WP_Date_Query {
|
||||
/**
|
||||
* List of date queries.
|
||||
* Array of date queries.
|
||||
*
|
||||
* See {@see WP_Date_Query::__construct()} for information on date query arguments.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* @access public
|
||||
@@ -19,7 +27,7 @@ class WP_Date_Query {
|
||||
public $queries = array();
|
||||
|
||||
/**
|
||||
* The relation between the queries. Can be either 'AND' or 'OR' and can be changed via the query arguments.
|
||||
* The default relation between top-level queries. Can be either 'AND' or 'OR'.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* @access public
|
||||
@@ -45,28 +53,46 @@ class WP_Date_Query {
|
||||
*/
|
||||
public $compare = '=';
|
||||
|
||||
/**
|
||||
* Supported time-related parameter keys.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
* @var array
|
||||
*/
|
||||
public $time_keys = array( 'after', 'before', 'year', 'month', 'monthnum', 'week', 'w', 'dayofyear', 'day', 'dayofweek', 'dayofweek_iso', 'hour', 'minute', 'second' );
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* Time-related parameters that normally require integer values ('year', 'month', 'week', 'dayofyear', 'day',
|
||||
* 'dayofweek', 'dayofweek_iso', 'hour', 'minute', 'second') accept arrays of integers for some values of
|
||||
* 'compare'. When 'compare' is 'IN' or 'NOT IN', arrays are accepted; when 'compare' is 'BETWEEN' or 'NOT
|
||||
* BETWEEN', arrays of two valid values are required. See individual argument descriptions for accepted values.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* @since 4.0.0 The $inclusive logic was updated to include all times within the date range.
|
||||
* @since 4.1.0 Introduced 'dayofweek_iso' time type parameter.
|
||||
* @access public
|
||||
*
|
||||
* @param array $date_query {
|
||||
* One or more associative arrays of date query parameters.
|
||||
* Array of date query clauses.
|
||||
*
|
||||
* @type array {
|
||||
* @type string $column Optional. The column to query against. If undefined, inherits the value of
|
||||
* the $default_column parameter. Default 'post_date'. Accepts 'post_date',
|
||||
* 'post_date_gmt', 'post_modified','post_modified_gmt', 'comment_date',
|
||||
* 'comment_date_gmt'.
|
||||
* @type string $compare Optional. The comparison operator.
|
||||
* Default '='. Accepts '=', '!=', '>', '>=', '<', '<=', 'IN', 'NOT IN',
|
||||
* 'BETWEEN', 'NOT BETWEEN'.
|
||||
* @type string $relation Optional. The boolean relationship between the date queryies.
|
||||
* Default 'OR'. Accepts 'OR', 'AND'.
|
||||
* the `$default_column` parameter. Accepts 'post_date', 'post_date_gmt',
|
||||
* 'post_modified','post_modified_gmt', 'comment_date', 'comment_date_gmt'.
|
||||
* Default 'post_date'.
|
||||
* @type string $compare Optional. The comparison operator. Accepts '=', '!=', '>', '>=', '<', '<=',
|
||||
* 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'. Default '='.
|
||||
* @type string $relation Optional. The boolean relationship between the date queries. Accepts 'OR' or 'AND'.
|
||||
* Default 'OR'.
|
||||
* @type array {
|
||||
* @type string|array $before Optional. Date to retrieve posts before. Accepts strtotime()-compatible
|
||||
* string, or array of 'year', 'month', 'day' values. {
|
||||
* Optional. An array of first-order clause parameters, or another fully-formed date query.
|
||||
*
|
||||
* @type string|array $before {
|
||||
* Optional. Date to retrieve posts before. Accepts `strtotime()`-compatible string,
|
||||
* or array of 'year', 'month', 'day' values.
|
||||
*
|
||||
* @type string $year The four-digit year. Default empty. Accepts any four-digit year.
|
||||
* @type string $month Optional when passing array.The month of the year.
|
||||
@@ -74,33 +100,49 @@ class WP_Date_Query {
|
||||
* @type string $day Optional when passing array.The day of the month.
|
||||
* Default (string:empty)|(array:1). Accepts numbers 1-31.
|
||||
* }
|
||||
* @type string|array $after Optional. Date to retrieve posts after. Accepts strtotime()-compatible
|
||||
* string, or array of 'year', 'month', 'day' values. {
|
||||
* @type string|array $after {
|
||||
* Optional. Date to retrieve posts after. Accepts `strtotime()`-compatible string,
|
||||
* or array of 'year', 'month', 'day' values.
|
||||
*
|
||||
* @type string $year The four-digit year. Default empty. Accepts any four-digit year.
|
||||
* @type string $month Optional when passing array.The month of the year.
|
||||
* Default (string:empty)|(array:12). Accepts numbers 1-12.
|
||||
* @type string $day Optional when passing array.The day of the month.
|
||||
* Default (string:empty)|(array:last day of month). Accepts numbers 1-31.
|
||||
* @type string $year The four-digit year. Accepts any four-digit year. Default empty.
|
||||
* @type string $month Optional when passing array. The month of the year. Accepts numbers 1-12.
|
||||
* Default (string:empty)|(array:12).
|
||||
* @type string $day Optional when passing array.The day of the month. Accepts numbers 1-31.
|
||||
* Default (string:empty)|(array:last day of month).
|
||||
* }
|
||||
* @type string $column Optional. Used to add a clause comparing a column other than the column
|
||||
* specified in the top-level $column parameter. Default is the value
|
||||
* of top-level $column. Accepts 'post_date', 'post_date_gmt',
|
||||
* 'post_modified', 'post_modified_gmt', 'comment_date', 'comment_date_gmt'.
|
||||
* @type string $compare Optional. The comparison operator. Default '='. Accepts '=', '!=',
|
||||
* '>', '>=', '<', '<=', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'.
|
||||
* @type bool $inclusive Optional. Include results from dates specified in 'before' or 'after'.
|
||||
* Default. Accepts.
|
||||
* @type int $year Optional. The four-digit year number. Default empty. Accepts any
|
||||
* four-digit year.
|
||||
* @type int $month Optional. The two-digit month number. Default empty. Accepts numbers 1-12.
|
||||
* @type int $week Optional. The week number of the year. Default empty. Accepts numbers 0-53.
|
||||
* @type int $dayofyear Optional. The day number of the year. Default empty. Accepts numbers 1-366.
|
||||
* @type int $day Optional. The day of the month. Default empty. Accepts numbers 1-31.
|
||||
* @type int $dayofweek Optional. The day number of the week. Default empty. Accepts numbers 1-7.
|
||||
* @type int $hour Optional. The hour of the day. Default empty. Accepts numbers 0-23.
|
||||
* @type int $minute Optional. The minute of the hour. Default empty. Accepts numbers 0-60.
|
||||
* @type int $second Optional. The second of the minute. Default empty. Accepts numbers 0-60.
|
||||
* @type string $column Optional. Used to add a clause comparing a column other than the
|
||||
* column specified in the top-level `$column` parameter. Accepts
|
||||
* 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt',
|
||||
* 'comment_date', 'comment_date_gmt'. Default is the value of
|
||||
* top-level `$column`.
|
||||
* @type string $compare Optional. The comparison operator. Accepts '=', '!=', '>', '>=',
|
||||
* '<', '<=', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'. 'IN',
|
||||
* 'NOT IN', 'BETWEEN', and 'NOT BETWEEN'. Comparisons support
|
||||
* arrays in some time-related parameters. Default '='.
|
||||
* @type bool $inclusive Optional. Include results from dates specified in 'before' or
|
||||
* 'after'. Default false.
|
||||
* @type int|array $year Optional. The four-digit year number. Accepts any four-digit year
|
||||
* or an array of years if `$compare` supports it. Default empty.
|
||||
* @type int|array $month Optional. The two-digit month number. Accepts numbers 1-12 or an
|
||||
* array of valid numbers if `$compare` supports it. Default empty.
|
||||
* @type int|array $week Optional. The week number of the year. Accepts numbers 0-53 or an
|
||||
* array of valid numbers if `$compare` supports it. Default empty.
|
||||
* @type int|array $dayofyear Optional. The day number of the year. Accepts numbers 1-366 or an
|
||||
* array of valid numbers if `$compare` supports it.
|
||||
* @type int|array $day Optional. The day of the month. Accepts numbers 1-31 or an array
|
||||
* of valid numbers if `$compare` supports it. Default empty.
|
||||
* @type int|array $dayofweek Optional. The day number of the week. Accepts numbers 1-7 (1 is
|
||||
* Sunday) or an array of valid numbers if `$compare` supports it.
|
||||
* Default empty.
|
||||
* @type int|array $dayofweek_iso Optional. The day number of the week (ISO). Accepts numbers 1-7
|
||||
* (1 is Monday) or an array of valid numbers if `$compare` supports it.
|
||||
* Default empty.
|
||||
* @type int|array $hour Optional. The hour of the day. Accepts numbers 0-23 or an array
|
||||
* of valid numbers if `$compare` supports it. Default empty.
|
||||
* @type int|array $minute Optional. The minute of the hour. Accepts numbers 0-60 or an array
|
||||
* of valid numbers if `$compare` supports it. Default empty.
|
||||
* @type int|array $second Optional. The second of the minute. Accepts numbers 0-60 or an
|
||||
* array of valid numbers if `$compare` supports it. Default empty.
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
@@ -109,34 +151,113 @@ class WP_Date_Query {
|
||||
* 'comment_date', 'comment_date_gmt'.
|
||||
*/
|
||||
public function __construct( $date_query, $default_column = 'post_date' ) {
|
||||
if ( empty( $date_query ) || ! is_array( $date_query ) )
|
||||
return;
|
||||
|
||||
if ( isset( $date_query['relation'] ) && strtoupper( $date_query['relation'] ) == 'OR' )
|
||||
if ( isset( $date_query['relation'] ) && 'OR' === strtoupper( $date_query['relation'] ) ) {
|
||||
$this->relation = 'OR';
|
||||
else
|
||||
} else {
|
||||
$this->relation = 'AND';
|
||||
}
|
||||
|
||||
if ( ! empty( $date_query['column'] ) )
|
||||
$this->column = esc_sql( $date_query['column'] );
|
||||
else
|
||||
$this->column = esc_sql( $default_column );
|
||||
if ( ! is_array( $date_query ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Support for passing time-based keys in the top level of the $date_query array.
|
||||
if ( ! isset( $date_query[0] ) && ! empty( $date_query ) ) {
|
||||
$date_query = array( $date_query );
|
||||
}
|
||||
|
||||
if ( empty( $date_query ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! empty( $date_query['column'] ) ) {
|
||||
$date_query['column'] = esc_sql( $date_query['column'] );
|
||||
} else {
|
||||
$date_query['column'] = esc_sql( $default_column );
|
||||
}
|
||||
|
||||
$this->column = $this->validate_column( $this->column );
|
||||
|
||||
$this->compare = $this->get_compare( $date_query );
|
||||
|
||||
// If an array of arrays wasn't passed, fix it
|
||||
if ( ! isset( $date_query[0] ) )
|
||||
$date_query = array( $date_query );
|
||||
$this->queries = $this->sanitize_query( $date_query );
|
||||
}
|
||||
|
||||
$this->queries = array();
|
||||
foreach ( $date_query as $key => $query ) {
|
||||
if ( ! is_array( $query ) )
|
||||
continue;
|
||||
/**
|
||||
* Recursive-friendly query sanitizer.
|
||||
*
|
||||
* 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
|
||||
* @access public
|
||||
*
|
||||
* @param array $queries
|
||||
* @param array $parent_query
|
||||
*
|
||||
* @return array Sanitized queries.
|
||||
*/
|
||||
public function sanitize_query( $queries, $parent_query = null ) {
|
||||
$cleaned_query = array();
|
||||
|
||||
$this->queries[$key] = $query;
|
||||
$defaults = array(
|
||||
'column' => 'post_date',
|
||||
'compare' => '=',
|
||||
'relation' => 'AND',
|
||||
);
|
||||
|
||||
// Numeric keys should always have array values.
|
||||
foreach ( $queries as $qkey => $qvalue ) {
|
||||
if ( is_numeric( $qkey ) && ! is_array( $qvalue ) ) {
|
||||
unset( $queries[ $qkey ] );
|
||||
}
|
||||
}
|
||||
|
||||
// Each query should have a value for each default key. Inherit from the parent when possible.
|
||||
foreach ( $defaults as $dkey => $dvalue ) {
|
||||
if ( isset( $queries[ $dkey ] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( isset( $parent_query[ $dkey ] ) ) {
|
||||
$queries[ $dkey ] = $parent_query[ $dkey ];
|
||||
} else {
|
||||
$queries[ $dkey ] = $dvalue;
|
||||
}
|
||||
}
|
||||
|
||||
// Validate the dates passed in the query.
|
||||
if ( $this->is_first_order_clause( $queries ) ) {
|
||||
$this->validate_date_values( $queries );
|
||||
}
|
||||
|
||||
foreach ( $queries as $key => $q ) {
|
||||
if ( ! is_array( $q ) || in_array( $key, $this->time_keys, true ) ) {
|
||||
// This is a first-order query. Trust the values and sanitize when building SQL.
|
||||
$cleaned_query[ $key ] = $q;
|
||||
} else {
|
||||
// Any array without a time key is another query, so we recurse.
|
||||
$cleaned_query[] = $this->sanitize_query( $q, $queries );
|
||||
}
|
||||
}
|
||||
|
||||
return $cleaned_query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether this is a first-order clause.
|
||||
*
|
||||
* Checks to see if the current clause has any time-related keys.
|
||||
* If so, it's first-order.
|
||||
*
|
||||
* @param array $query Query clause.
|
||||
* @return bool True if this is a first-order clause.
|
||||
*/
|
||||
protected function is_first_order_clause( $query ) {
|
||||
$time_keys = array_intersect( $this->time_keys, array_keys( $query ) );
|
||||
return ! empty( $time_keys );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -145,8 +266,8 @@ class WP_Date_Query {
|
||||
* @since 3.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param array $query A date query or a date subquery
|
||||
* @return string The comparison operator
|
||||
* @param array $query A date query or a date subquery.
|
||||
* @return string The comparison operator.
|
||||
*/
|
||||
public function get_compare( $query ) {
|
||||
if ( ! empty( $query['compare'] ) && in_array( $query['compare'], array( '=', '!=', '>', '>=', '<', '<=', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN' ) ) )
|
||||
@@ -155,9 +276,208 @@ class WP_Date_Query {
|
||||
return $this->compare;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the given date_query values and triggers errors if something is not valid.
|
||||
*
|
||||
* Note that date queries with invalid date ranges are allowed to
|
||||
* continue (though of course no items will be found for impossible dates).
|
||||
* This method only generates debug notices for these cases.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access public
|
||||
*
|
||||
* @param array $date_query The date_query array.
|
||||
* @return bool True if all values in the query are valid, false if one or more fail.
|
||||
*/
|
||||
public function validate_date_values( $date_query = array() ) {
|
||||
if ( empty( $date_query ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$valid = true;
|
||||
|
||||
/*
|
||||
* Validate 'before' and 'after' up front, then let the
|
||||
* validation routine continue to be sure that all invalid
|
||||
* values generate errors too.
|
||||
*/
|
||||
if ( array_key_exists( 'before', $date_query ) && is_array( $date_query['before'] ) ){
|
||||
$valid = $this->validate_date_values( $date_query['before'] );
|
||||
}
|
||||
|
||||
if ( array_key_exists( 'after', $date_query ) && is_array( $date_query['after'] ) ){
|
||||
$valid = $this->validate_date_values( $date_query['after'] );
|
||||
}
|
||||
|
||||
// Array containing all min-max checks.
|
||||
$min_max_checks = array();
|
||||
|
||||
// Days per year.
|
||||
if ( array_key_exists( 'year', $date_query ) ) {
|
||||
/*
|
||||
* If a year exists in the date query, we can use it to get the days.
|
||||
* If multiple years are provided (as in a BETWEEN), use the first one.
|
||||
*/
|
||||
if ( is_array( $date_query['year'] ) ) {
|
||||
$_year = reset( $date_query['year'] );
|
||||
} else {
|
||||
$_year = $date_query['year'];
|
||||
}
|
||||
|
||||
$max_days_of_year = date( 'z', mktime( 0, 0, 0, 12, 31, $_year ) ) + 1;
|
||||
} else {
|
||||
// otherwise we use the max of 366 (leap-year)
|
||||
$max_days_of_year = 366;
|
||||
}
|
||||
|
||||
$min_max_checks['dayofyear'] = array(
|
||||
'min' => 1,
|
||||
'max' => $max_days_of_year
|
||||
);
|
||||
|
||||
// Days per week.
|
||||
$min_max_checks['dayofweek'] = array(
|
||||
'min' => 1,
|
||||
'max' => 7
|
||||
);
|
||||
|
||||
// Days per week.
|
||||
$min_max_checks['dayofweek_iso'] = array(
|
||||
'min' => 1,
|
||||
'max' => 7
|
||||
);
|
||||
|
||||
// Months per year.
|
||||
$min_max_checks['month'] = array(
|
||||
'min' => 1,
|
||||
'max' => 12
|
||||
);
|
||||
|
||||
// Weeks per year.
|
||||
if ( isset( $_year ) ) {
|
||||
// If we have a specific year, use it to calculate number of weeks.
|
||||
$date = new DateTime();
|
||||
$date->setISODate( $_year, 53 );
|
||||
$week_count = $date->format( "W" ) === "53" ? 53 : 52;
|
||||
|
||||
} else {
|
||||
// Otherwise set the week-count to a maximum of 53.
|
||||
$week_count = 53;
|
||||
}
|
||||
|
||||
$min_max_checks['week'] = array(
|
||||
'min' => 1,
|
||||
'max' => $week_count
|
||||
);
|
||||
|
||||
// Days per month.
|
||||
$min_max_checks['day'] = array(
|
||||
'min' => 1,
|
||||
'max' => 31
|
||||
);
|
||||
|
||||
// Hours per day.
|
||||
$min_max_checks['hour'] = array(
|
||||
'min' => 0,
|
||||
'max' => 23
|
||||
);
|
||||
|
||||
// Minutes per hour.
|
||||
$min_max_checks['minute'] = array(
|
||||
'min' => 0,
|
||||
'max' => 59
|
||||
);
|
||||
|
||||
// Seconds per minute.
|
||||
$min_max_checks['second'] = array(
|
||||
'min' => 0,
|
||||
'max' => 59
|
||||
);
|
||||
|
||||
// Concatenate and throw a notice for each invalid value.
|
||||
foreach ( $min_max_checks as $key => $check ) {
|
||||
if ( ! array_key_exists( $key, $date_query ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Throw a notice for each failing value.
|
||||
foreach ( (array) $date_query[ $key ] as $_value ) {
|
||||
$is_between = $_value >= $check['min'] && $_value <= $check['max'];
|
||||
|
||||
if ( ! is_numeric( $_value ) || ! $is_between ) {
|
||||
$error = sprintf(
|
||||
/* translators: Date query invalid date message: 1: invalid value, 2: type of value, 3: minimum valid value, 4: maximum valid value */
|
||||
__( 'Invalid value %1$s for %2$s. Expected value should be between %3$s and %4$s.' ),
|
||||
'<code>' . esc_html( $_value ) . '</code>',
|
||||
'<code>' . esc_html( $key ) . '</code>',
|
||||
'<code>' . esc_html( $check['min'] ) . '</code>',
|
||||
'<code>' . esc_html( $check['max'] ) . '</code>'
|
||||
);
|
||||
|
||||
_doing_it_wrong( __CLASS__, $error, '4.1.0' );
|
||||
|
||||
$valid = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we already have invalid date messages, don't bother running through checkdate().
|
||||
if ( ! $valid ) {
|
||||
return $valid;
|
||||
}
|
||||
|
||||
$day_month_year_error_msg = '';
|
||||
|
||||
$day_exists = array_key_exists( 'day', $date_query ) && is_numeric( $date_query['day'] );
|
||||
$month_exists = array_key_exists( 'month', $date_query ) && is_numeric( $date_query['month'] );
|
||||
$year_exists = array_key_exists( 'year', $date_query ) && is_numeric( $date_query['year'] );
|
||||
|
||||
if ( $day_exists && $month_exists && $year_exists ) {
|
||||
// 1. Checking day, month, year combination.
|
||||
if ( ! wp_checkdate( $date_query['month'], $date_query['day'], $date_query['year'], sprintf( '%s-%s-%s', $date_query['year'], $date_query['month'], $date_query['day'] ) ) ) {
|
||||
/* translators: 1: year, 2: month, 3: day of month */
|
||||
$day_month_year_error_msg = sprintf(
|
||||
__( 'The following values do not describe a valid date: year %1$s, month %2$s, day %3$s.' ),
|
||||
'<code>' . esc_html( $date_query['year'] ) . '</code>',
|
||||
'<code>' . esc_html( $date_query['month'] ) . '</code>',
|
||||
'<code>' . esc_html( $date_query['day'] ) . '</code>'
|
||||
);
|
||||
|
||||
$valid = false;
|
||||
}
|
||||
|
||||
} elseif ( $day_exists && $month_exists ) {
|
||||
/*
|
||||
* 2. checking day, month combination
|
||||
* We use 2012 because, as a leap year, it's the most permissive.
|
||||
*/
|
||||
if ( ! wp_checkdate( $date_query['month'], $date_query['day'], 2012, sprintf( '2012-%s-%s', $date_query['month'], $date_query['day'] ) ) ) {
|
||||
/* translators: 1: month, 2: day of month */
|
||||
$day_month_year_error_msg = sprintf(
|
||||
__( 'The following values do not describe a valid date: month %1$s, day %2$s.' ),
|
||||
'<code>' . esc_html( $date_query['month'] ) . '</code>',
|
||||
'<code>' . esc_html( $date_query['day'] ) . '</code>'
|
||||
);
|
||||
|
||||
$valid = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $day_month_year_error_msg ) ) {
|
||||
_doing_it_wrong( __CLASS__, $day_month_year_error_msg, '4.1.0' );
|
||||
}
|
||||
|
||||
return $valid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates a column name parameter.
|
||||
*
|
||||
* Column names without a table prefix (like 'post_date') are checked against a whitelist of
|
||||
* known tables, and then, if found, have a table prefix (such as 'wp_posts.') prepended.
|
||||
* Prefixed column names (such as 'wp_posts.post_date') bypass this whitelist check,
|
||||
* and are only sanitized to remove illegal characters.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* @access public
|
||||
*
|
||||
@@ -165,49 +485,73 @@ class WP_Date_Query {
|
||||
* @return string A validated column name value.
|
||||
*/
|
||||
public function validate_column( $column ) {
|
||||
global $wpdb;
|
||||
|
||||
$valid_columns = array(
|
||||
'post_date', 'post_date_gmt', 'post_modified',
|
||||
'post_modified_gmt', 'comment_date', 'comment_date_gmt'
|
||||
'post_modified_gmt', 'comment_date', 'comment_date_gmt',
|
||||
'user_registered',
|
||||
);
|
||||
/**
|
||||
* Filter the list of valid date query columns.
|
||||
*
|
||||
* @since 3.7.0
|
||||
*
|
||||
* @param array $valid_columns An array of valid date query columns. Defaults are 'post_date', 'post_date_gmt',
|
||||
* 'post_modified', 'post_modified_gmt', 'comment_date', 'comment_date_gmt'
|
||||
*/
|
||||
if ( ! in_array( $column, apply_filters( 'date_query_valid_columns', $valid_columns ) ) )
|
||||
$column = 'post_date';
|
||||
|
||||
return $column;
|
||||
// Attempt to detect a table prefix.
|
||||
if ( false === strpos( $column, '.' ) ) {
|
||||
/**
|
||||
* Filter the list of valid date query columns.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* @since 4.1.0 Added 'user_registered' to the default recognized columns.
|
||||
*
|
||||
* @param array $valid_columns An array of valid date query columns. Defaults
|
||||
* are 'post_date', 'post_date_gmt', 'post_modified',
|
||||
* 'post_modified_gmt', 'comment_date', 'comment_date_gmt',
|
||||
* 'user_registered'
|
||||
*/
|
||||
if ( ! in_array( $column, apply_filters( 'date_query_valid_columns', $valid_columns ) ) ) {
|
||||
$column = 'post_date';
|
||||
}
|
||||
|
||||
$known_columns = array(
|
||||
$wpdb->posts => array(
|
||||
'post_date',
|
||||
'post_date_gmt',
|
||||
'post_modified',
|
||||
'post_modified_gmt',
|
||||
),
|
||||
$wpdb->comments => array(
|
||||
'comment_date',
|
||||
'comment_date_gmt',
|
||||
),
|
||||
$wpdb->users => array(
|
||||
'user_registered',
|
||||
),
|
||||
);
|
||||
|
||||
// If it's a known column name, add the appropriate table prefix.
|
||||
foreach ( $known_columns as $table_name => $table_columns ) {
|
||||
if ( in_array( $column, $table_columns ) ) {
|
||||
$column = $table_name . '.' . $column;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Remove unsafe characters.
|
||||
return preg_replace( '/[^a-zA-Z0-9_$\.]/', '', $column );
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns an array of date query parameters into a MySQL string.
|
||||
* Generate WHERE clause to be appended to a main query.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* @access public
|
||||
*
|
||||
* @return string MySQL WHERE parameters
|
||||
* @return string MySQL WHERE clause.
|
||||
*/
|
||||
public function get_sql() {
|
||||
// The parts of the final query
|
||||
$where = array();
|
||||
$sql = $this->get_sql_clauses();
|
||||
|
||||
foreach ( $this->queries as $key => $query ) {
|
||||
$where_parts = $this->get_sql_for_subquery( $query );
|
||||
if ( $where_parts ) {
|
||||
// Combine the parts of this subquery into a single string
|
||||
$where[ $key ] = '( ' . implode( ' AND ', $where_parts ) . ' )';
|
||||
}
|
||||
}
|
||||
|
||||
// Combine the subquery strings into a single string
|
||||
if ( $where )
|
||||
$where = ' AND ( ' . implode( " {$this->relation} ", $where ) . ' )';
|
||||
else
|
||||
$where = '';
|
||||
$where = $sql['where'];
|
||||
|
||||
/**
|
||||
* Filter the date query WHERE clause.
|
||||
@@ -221,15 +565,156 @@ class WP_Date_Query {
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns a single date subquery into pieces for a WHERE clause.
|
||||
* Generate SQL clauses to be appended to a main query.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* return array
|
||||
* Called by the public {@see WP_Date_Query::get_sql()}, this method
|
||||
* is abstracted out to maintain parity with the other Query classes.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access protected
|
||||
*
|
||||
* @return array {
|
||||
* 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() {
|
||||
$sql = $this->get_sql_for_query( $this->queries );
|
||||
|
||||
if ( ! empty( $sql['where'] ) ) {
|
||||
$sql['where'] = ' AND ' . $sql['where'];
|
||||
}
|
||||
|
||||
return $sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate 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
|
||||
* @access protected
|
||||
*
|
||||
* @param array $query Query to parse.
|
||||
* @param int $depth Optional. Number of tree levels deep we currently are.
|
||||
* Used to calculate indentation. Default 0.
|
||||
* @return array {
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns a single date clause into pieces for a WHERE clause.
|
||||
*
|
||||
* A wrapper for get_sql_for_clause(), included here for backward
|
||||
* compatibility while retaining the naming convention across Query classes.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* @access protected
|
||||
*
|
||||
* @param array $query Date query arguments.
|
||||
* @return array {
|
||||
* 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_for_subquery( $query ) {
|
||||
return $this->get_sql_for_clause( $query, '' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns a first-order date query into SQL for a WHERE clause.
|
||||
*
|
||||
* @since 4.1.0
|
||||
* @access protected
|
||||
*
|
||||
* @param array $query Date query clause.
|
||||
* @param array $parent_query Parent query of the current date query.
|
||||
* @return array {
|
||||
* 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_for_clause( $query, $parent_query ) {
|
||||
global $wpdb;
|
||||
|
||||
// The sub-parts of a $where part
|
||||
// The sub-parts of a $where part.
|
||||
$where_parts = array();
|
||||
|
||||
$column = ( ! empty( $query['column'] ) ) ? esc_sql( $query['column'] ) : $this->column;
|
||||
@@ -249,28 +734,28 @@ class WP_Date_Query {
|
||||
$gt .= '=';
|
||||
}
|
||||
|
||||
// Range queries
|
||||
// Range queries.
|
||||
if ( ! empty( $query['after'] ) )
|
||||
$where_parts[] = $wpdb->prepare( "$column $gt %s", $this->build_mysql_datetime( $query['after'], ! $inclusive ) );
|
||||
|
||||
if ( ! empty( $query['before'] ) )
|
||||
$where_parts[] = $wpdb->prepare( "$column $lt %s", $this->build_mysql_datetime( $query['before'], $inclusive ) );
|
||||
|
||||
// Specific value queries
|
||||
// Specific value queries.
|
||||
|
||||
if ( isset( $query['year'] ) && $value = $this->build_value( $compare, $query['year'] ) )
|
||||
$where_parts[] = "YEAR( $column ) $compare $value";
|
||||
|
||||
if ( isset( $query['month'] ) && $value = $this->build_value( $compare, $query['month'] ) )
|
||||
if ( isset( $query['month'] ) && $value = $this->build_value( $compare, $query['month'] ) ) {
|
||||
$where_parts[] = "MONTH( $column ) $compare $value";
|
||||
else if ( isset( $query['monthnum'] ) && $value = $this->build_value( $compare, $query['monthnum'] ) )
|
||||
} elseif ( isset( $query['monthnum'] ) && $value = $this->build_value( $compare, $query['monthnum'] ) ) {
|
||||
$where_parts[] = "MONTH( $column ) $compare $value";
|
||||
|
||||
if ( isset( $query['week'] ) && false !== ( $value = $this->build_value( $compare, $query['week'] ) ) )
|
||||
}
|
||||
if ( isset( $query['week'] ) && false !== ( $value = $this->build_value( $compare, $query['week'] ) ) ) {
|
||||
$where_parts[] = _wp_mysql_week( $column ) . " $compare $value";
|
||||
else if ( isset( $query['w'] ) && false !== ( $value = $this->build_value( $compare, $query['w'] ) ) )
|
||||
} elseif ( isset( $query['w'] ) && false !== ( $value = $this->build_value( $compare, $query['w'] ) ) ) {
|
||||
$where_parts[] = _wp_mysql_week( $column ) . " $compare $value";
|
||||
|
||||
}
|
||||
if ( isset( $query['dayofyear'] ) && $value = $this->build_value( $compare, $query['dayofyear'] ) )
|
||||
$where_parts[] = "DAYOFYEAR( $column ) $compare $value";
|
||||
|
||||
@@ -280,11 +765,14 @@ class WP_Date_Query {
|
||||
if ( isset( $query['dayofweek'] ) && $value = $this->build_value( $compare, $query['dayofweek'] ) )
|
||||
$where_parts[] = "DAYOFWEEK( $column ) $compare $value";
|
||||
|
||||
if ( isset( $query['dayofweek_iso'] ) && $value = $this->build_value( $compare, $query['dayofweek_iso'] ) )
|
||||
$where_parts[] = "WEEKDAY( $column ) + 1 $compare $value";
|
||||
|
||||
if ( isset( $query['hour'] ) || isset( $query['minute'] ) || isset( $query['second'] ) ) {
|
||||
// Avoid notices
|
||||
// Avoid notices.
|
||||
foreach ( array( 'hour', 'minute', 'second' ) as $unit ) {
|
||||
if ( ! isset( $query[$unit] ) ) {
|
||||
$query[$unit] = null;
|
||||
if ( ! isset( $query[ $unit ] ) ) {
|
||||
$query[ $unit ] = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,7 +781,14 @@ class WP_Date_Query {
|
||||
}
|
||||
}
|
||||
|
||||
return $where_parts;
|
||||
/*
|
||||
* Return an array of 'join' and 'where' for compatibility
|
||||
* with other query classes.
|
||||
*/
|
||||
return array(
|
||||
'where' => $where_parts,
|
||||
'join' => array(),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -304,7 +799,7 @@ class WP_Date_Query {
|
||||
*
|
||||
* @param string $compare The compare operator to use
|
||||
* @param string|array $value The value
|
||||
* @return string|int|false The value to be used in SQL or false on error.
|
||||
* @return string|false|int The value to be used in SQL or false on error.
|
||||
*/
|
||||
public function build_value( $compare, $value ) {
|
||||
if ( ! isset( $value ) )
|
||||
@@ -313,18 +808,41 @@ class WP_Date_Query {
|
||||
switch ( $compare ) {
|
||||
case 'IN':
|
||||
case 'NOT IN':
|
||||
return '(' . implode( ',', array_map( 'intval', (array) $value ) ) . ')';
|
||||
$value = (array) $value;
|
||||
|
||||
// Remove non-numeric values.
|
||||
$value = array_filter( $value, 'is_numeric' );
|
||||
|
||||
if ( empty( $value ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return '(' . implode( ',', array_map( 'intval', $value ) ) . ')';
|
||||
|
||||
case 'BETWEEN':
|
||||
case 'NOT BETWEEN':
|
||||
if ( ! is_array( $value ) || 2 != count( $value ) || ! isset( $value[0] ) || ! isset( $value[1] ) )
|
||||
if ( ! is_array( $value ) || 2 != count( $value ) ) {
|
||||
$value = array( $value, $value );
|
||||
} else {
|
||||
$value = array_values( $value );
|
||||
}
|
||||
|
||||
// If either value is non-numeric, bail.
|
||||
foreach ( $value as $v ) {
|
||||
if ( ! is_numeric( $v ) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$value = array_map( 'intval', $value );
|
||||
|
||||
return $value[0] . ' AND ' . $value[1];
|
||||
|
||||
default;
|
||||
if ( ! is_numeric( $value ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (int) $value;
|
||||
}
|
||||
}
|
||||
@@ -339,16 +857,59 @@ class WP_Date_Query {
|
||||
* @since 3.7.0
|
||||
* @access public
|
||||
*
|
||||
* @param string|array $datetime An array of parameters or a strotime() string
|
||||
* @param string $default_to Controls what values default to if they are missing from $datetime. Pass "min" or "max".
|
||||
* @param string|array $datetime An array of parameters or a strotime() string
|
||||
* @param bool $default_to_max Whether to round up incomplete dates. Supported by values
|
||||
* of $datetime that are arrays, or string values that are a
|
||||
* subset of MySQL date format ('Y', 'Y-m', 'Y-m-d', 'Y-m-d H:i').
|
||||
* Default: false.
|
||||
* @return string|false A MySQL format date/time or false on failure
|
||||
*/
|
||||
public function build_mysql_datetime( $datetime, $default_to_max = false ) {
|
||||
$now = current_time( 'timestamp' );
|
||||
|
||||
if ( ! is_array( $datetime ) ) {
|
||||
// @todo Timezone issues here possibly
|
||||
return gmdate( 'Y-m-d H:i:s', strtotime( $datetime, $now ) );
|
||||
|
||||
/*
|
||||
* Try to parse some common date formats, so we can detect
|
||||
* the level of precision and support the 'inclusive' parameter.
|
||||
*/
|
||||
if ( preg_match( '/^(\d{4})$/', $datetime, $matches ) ) {
|
||||
// Y
|
||||
$datetime = array(
|
||||
'year' => intval( $matches[1] ),
|
||||
);
|
||||
|
||||
} elseif ( preg_match( '/^(\d{4})\-(\d{2})$/', $datetime, $matches ) ) {
|
||||
// Y-m
|
||||
$datetime = array(
|
||||
'year' => intval( $matches[1] ),
|
||||
'month' => intval( $matches[2] ),
|
||||
);
|
||||
|
||||
} elseif ( preg_match( '/^(\d{4})\-(\d{2})\-(\d{2})$/', $datetime, $matches ) ) {
|
||||
// Y-m-d
|
||||
$datetime = array(
|
||||
'year' => intval( $matches[1] ),
|
||||
'month' => intval( $matches[2] ),
|
||||
'day' => intval( $matches[3] ),
|
||||
);
|
||||
|
||||
} elseif ( preg_match( '/^(\d{4})\-(\d{2})\-(\d{2}) (\d{2}):(\d{2})$/', $datetime, $matches ) ) {
|
||||
// Y-m-d H:i
|
||||
$datetime = array(
|
||||
'year' => intval( $matches[1] ),
|
||||
'month' => intval( $matches[2] ),
|
||||
'day' => intval( $matches[3] ),
|
||||
'hour' => intval( $matches[4] ),
|
||||
'minute' => intval( $matches[5] ),
|
||||
);
|
||||
}
|
||||
|
||||
// If no match is found, we don't support default_to_max.
|
||||
if ( ! is_array( $datetime ) ) {
|
||||
// @todo Timezone issues here possibly
|
||||
return gmdate( 'Y-m-d H:i:s', strtotime( $datetime, $now ) );
|
||||
}
|
||||
}
|
||||
|
||||
$datetime = array_map( 'absint', $datetime );
|
||||
|
||||
@@ -154,7 +154,7 @@ function wp_plugin_directory_constants() {
|
||||
/**
|
||||
* Defines cookie related WordPress constants
|
||||
*
|
||||
* Defines constants after multisite is loaded. Cookie-related constants may be overridden in ms_network_cookies().
|
||||
* Defines constants after multisite is loaded.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
function wp_cookie_constants() {
|
||||
@@ -318,6 +318,6 @@ function wp_templating_constants() {
|
||||
* @since 3.0.0
|
||||
*/
|
||||
if ( !defined('WP_DEFAULT_THEME') )
|
||||
define( 'WP_DEFAULT_THEME', 'twentyfourteen' );
|
||||
define( 'WP_DEFAULT_THEME', 'twentyfifteen' );
|
||||
|
||||
}
|
||||
@@ -156,17 +156,23 @@ add_filter( 'list_cats', 'wptexturize' );
|
||||
add_filter( 'wp_sprintf', 'wp_sprintf_l', 10, 2 );
|
||||
|
||||
// RSS filters
|
||||
add_filter( 'the_title_rss', 'strip_tags' );
|
||||
add_filter( 'the_title_rss', 'ent2ncr', 8 );
|
||||
add_filter( 'the_title_rss', 'esc_html' );
|
||||
add_filter( 'the_content_rss', 'ent2ncr', 8 );
|
||||
add_filter( 'the_excerpt_rss', 'convert_chars' );
|
||||
add_filter( 'the_excerpt_rss', 'ent2ncr', 8 );
|
||||
add_filter( 'comment_author_rss', 'ent2ncr', 8 );
|
||||
add_filter( 'comment_text_rss', 'ent2ncr', 8 );
|
||||
add_filter( 'comment_text_rss', 'esc_html' );
|
||||
add_filter( 'bloginfo_rss', 'ent2ncr', 8 );
|
||||
add_filter( 'the_author', 'ent2ncr', 8 );
|
||||
add_filter( 'the_title_rss', 'strip_tags' );
|
||||
add_filter( 'the_title_rss', 'ent2ncr', 8 );
|
||||
add_filter( 'the_title_rss', 'esc_html' );
|
||||
add_filter( 'the_content_rss', 'ent2ncr', 8 );
|
||||
add_filter( 'the_content_feed', 'wp_staticize_emoji' );
|
||||
add_filter( 'the_excerpt_rss', 'convert_chars' );
|
||||
add_filter( 'the_excerpt_rss', 'ent2ncr', 8 );
|
||||
add_filter( 'comment_author_rss', 'ent2ncr', 8 );
|
||||
add_filter( 'comment_text_rss', 'ent2ncr', 8 );
|
||||
add_filter( 'comment_text_rss', 'esc_html' );
|
||||
add_filter( 'comment_text_rss', 'wp_staticize_emoji' );
|
||||
add_filter( 'bloginfo_rss', 'ent2ncr', 8 );
|
||||
add_filter( 'the_author', 'ent2ncr', 8 );
|
||||
add_filter( 'the_guid', 'esc_url' );
|
||||
|
||||
// Email filters
|
||||
add_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
|
||||
|
||||
// Misc filters
|
||||
add_filter( 'option_ping_sites', 'privacy_ping_filter' );
|
||||
@@ -175,6 +181,7 @@ add_filter( 'option_blog_charset', '_canonical_charset' );
|
||||
add_filter( 'option_home', '_config_wp_home' );
|
||||
add_filter( 'option_siteurl', '_config_wp_siteurl' );
|
||||
add_filter( 'tiny_mce_before_init', '_mce_set_direction' );
|
||||
add_filter( 'teeny_mce_before_init', '_mce_set_direction' );
|
||||
add_filter( 'pre_kses', 'wp_pre_kses_less_than' );
|
||||
add_filter( 'sanitize_title', 'sanitize_title_with_dashes', 10, 3 );
|
||||
add_action( 'check_comment_flood', 'check_comment_flood_db', 10, 3 );
|
||||
@@ -191,10 +198,12 @@ add_filter( 'editable_slug', 'esc_textarea' );
|
||||
add_filter( 'nav_menu_meta_box_object', '_wp_nav_menu_meta_box_object' );
|
||||
add_filter( 'pingback_ping_source_uri', 'pingback_ping_source_uri' );
|
||||
add_filter( 'xmlrpc_pingback_error', 'xmlrpc_pingback_error' );
|
||||
add_filter( 'title_save_pre', 'trim' );
|
||||
|
||||
add_filter( 'http_request_host_is_external', 'allowed_http_request_hosts', 10, 2 );
|
||||
|
||||
// Actions
|
||||
add_action( 'wp_head', '_wp_render_title_tag', 1 );
|
||||
add_action( 'wp_head', 'wp_enqueue_scripts', 1 );
|
||||
add_action( 'wp_head', 'feed_links', 2 );
|
||||
add_action( 'wp_head', 'feed_links_extra', 3 );
|
||||
@@ -204,6 +213,7 @@ add_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
|
||||
add_action( 'wp_head', 'locale_stylesheet' );
|
||||
add_action( 'publish_future_post', 'check_and_publish_future_post', 10, 1 );
|
||||
add_action( 'wp_head', 'noindex', 1 );
|
||||
add_action( 'wp_head', 'print_emoji_detection_script', 7 );
|
||||
add_action( 'wp_head', 'wp_print_styles', 8 );
|
||||
add_action( 'wp_head', 'wp_print_head_scripts', 9 );
|
||||
add_action( 'wp_head', 'wp_generator' );
|
||||
@@ -214,6 +224,7 @@ add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 );
|
||||
add_action( 'wp_print_footer_scripts', '_wp_footer_scripts' );
|
||||
add_action( 'init', 'check_theme_switched', 99 );
|
||||
add_action( 'after_switch_theme', '_wp_sidebars_changed' );
|
||||
add_action( 'wp_print_styles', 'print_emoji_styles' );
|
||||
|
||||
if ( isset( $_GET['replytocom'] ) )
|
||||
add_action( 'wp_head', 'wp_no_robots' );
|
||||
@@ -241,13 +252,16 @@ add_action( 'do_pings', 'do_all_pings',
|
||||
add_action( 'do_robots', 'do_robots' );
|
||||
add_action( 'set_comment_cookies', 'wp_set_comment_cookies', 10, 2 );
|
||||
add_action( 'sanitize_comment_cookies', 'sanitize_comment_cookies' );
|
||||
add_action( 'admin_print_scripts', 'print_emoji_detection_script' );
|
||||
add_action( 'admin_print_scripts', 'print_head_scripts', 20 );
|
||||
add_action( 'admin_print_footer_scripts', '_wp_footer_scripts' );
|
||||
add_action( 'admin_print_styles', 'print_emoji_styles' );
|
||||
add_action( 'admin_print_styles', 'print_admin_styles', 20 );
|
||||
add_action( 'init', 'smilies_init', 5 );
|
||||
add_action( 'plugins_loaded', 'wp_maybe_load_widgets', 0 );
|
||||
add_action( 'plugins_loaded', 'wp_maybe_load_embeds', 0 );
|
||||
add_action( 'shutdown', 'wp_ob_end_flush_all', 1 );
|
||||
// Create a revision whenever a post is updated.
|
||||
add_action( 'post_updated', 'wp_save_post_revision', 10, 1 );
|
||||
add_action( 'publish_post', '_publish_post_hook', 5, 1 );
|
||||
add_action( 'transition_post_status', '_transition_post_status', 5, 3 );
|
||||
@@ -303,4 +317,76 @@ add_filter( 'authenticate', 'wp_authenticate_spam_check', 99 );
|
||||
add_filter( 'determine_current_user', 'wp_validate_auth_cookie' );
|
||||
add_filter( 'determine_current_user', 'wp_validate_logged_in_cookie', 20 );
|
||||
|
||||
unset($filter, $action);
|
||||
// Split term updates.
|
||||
add_action( 'split_shared_term', '_wp_check_split_default_terms', 10, 4 );
|
||||
add_action( 'split_shared_term', '_wp_check_split_terms_in_menus', 10, 4 );
|
||||
|
||||
/**
|
||||
* Filters formerly mixed into wp-includes
|
||||
*/
|
||||
// Theme
|
||||
add_action( 'setup_theme', 'preview_theme' );
|
||||
add_action( 'wp_loaded', '_custom_header_background_just_in_time' );
|
||||
add_action( 'plugins_loaded', '_wp_customize_include' );
|
||||
add_action( 'admin_enqueue_scripts', '_wp_customize_loader_settings' );
|
||||
add_action( 'delete_attachment', '_delete_attachment_theme_mod' );
|
||||
|
||||
// Calendar widget cache
|
||||
add_action( 'save_post', 'delete_get_calendar_cache' );
|
||||
add_action( 'delete_post', 'delete_get_calendar_cache' );
|
||||
add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' );
|
||||
add_action( 'update_option_gmt_offset', 'delete_get_calendar_cache' );
|
||||
|
||||
// Author
|
||||
add_action( 'transition_post_status', '__clear_multi_author_cache' );
|
||||
|
||||
// Post
|
||||
add_action( 'init', 'create_initial_post_types', 0 ); // highest priority
|
||||
add_action( 'admin_menu', '_add_post_type_submenus' );
|
||||
add_action( 'before_delete_post', '_reset_front_page_settings_for_post' );
|
||||
add_action( 'wp_trash_post', '_reset_front_page_settings_for_post' );
|
||||
|
||||
// Post Formats
|
||||
add_filter( 'request', '_post_format_request' );
|
||||
add_filter( 'term_link', '_post_format_link', 10, 3 );
|
||||
add_filter( 'get_post_format', '_post_format_get_term' );
|
||||
add_filter( 'get_terms', '_post_format_get_terms', 10, 3 );
|
||||
add_filter( 'wp_get_object_terms', '_post_format_wp_get_object_terms' );
|
||||
|
||||
// KSES
|
||||
add_action( 'init', 'kses_init' );
|
||||
add_action( 'set_current_user', 'kses_init' );
|
||||
|
||||
// Script Loader
|
||||
add_action( 'wp_default_scripts', 'wp_default_scripts' );
|
||||
add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
|
||||
add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );
|
||||
|
||||
add_action( 'wp_default_styles', 'wp_default_styles' );
|
||||
add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 );
|
||||
|
||||
// Taxonomy
|
||||
add_action( 'init', 'create_initial_taxonomies', 0 ); // highest priority
|
||||
|
||||
// Canonical
|
||||
add_action( 'template_redirect', 'redirect_canonical' );
|
||||
add_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 );
|
||||
|
||||
// Shortcodes
|
||||
add_filter( 'the_content', 'do_shortcode', 11 ); // AFTER wpautop()
|
||||
|
||||
// Media
|
||||
add_action( 'wp_playlist_scripts', 'wp_playlist_scripts' );
|
||||
add_action( 'customize_controls_enqueue_scripts', 'wp_plupload_default_settings' );
|
||||
|
||||
// Nav menu
|
||||
add_filter( 'nav_menu_item_id', '_nav_menu_item_id_use_once', 10, 2 );
|
||||
|
||||
// Admin Bar
|
||||
// Don't remove. Wrong way to disable.
|
||||
add_action( 'template_redirect', '_wp_admin_bar_init', 0 );
|
||||
add_action( 'admin_init', '_wp_admin_bar_init' );
|
||||
add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
|
||||
add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );
|
||||
|
||||
unset( $filter, $action );
|
||||
@@ -285,10 +285,10 @@ class WP_Widget_Archives extends WP_Widget {
|
||||
}
|
||||
|
||||
if ( $d ) {
|
||||
$dropdown_id = "{$this->id_base}-dropdown-{$this->number}";
|
||||
?>
|
||||
<select name="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'>
|
||||
<option value=""><?php echo esc_attr( __( 'Select Month' ) ); ?></option>
|
||||
|
||||
<label class="screen-reader-text" for="<?php echo esc_attr( $dropdown_id ); ?>"><?php echo $title; ?></label>
|
||||
<select id="<?php echo esc_attr( $dropdown_id ); ?>" name="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'>
|
||||
<?php
|
||||
/**
|
||||
* Filter the arguments for the Archives widget drop-down.
|
||||
@@ -299,12 +299,34 @@ class WP_Widget_Archives extends WP_Widget {
|
||||
*
|
||||
* @param array $args An array of Archives widget drop-down arguments.
|
||||
*/
|
||||
wp_get_archives( apply_filters( 'widget_archives_dropdown_args', array(
|
||||
$dropdown_args = apply_filters( 'widget_archives_dropdown_args', array(
|
||||
'type' => 'monthly',
|
||||
'format' => 'option',
|
||||
'show_post_count' => $c
|
||||
) ) );
|
||||
?>
|
||||
) );
|
||||
|
||||
switch ( $dropdown_args['type'] ) {
|
||||
case 'yearly':
|
||||
$label = __( 'Select Year' );
|
||||
break;
|
||||
case 'monthly':
|
||||
$label = __( 'Select Month' );
|
||||
break;
|
||||
case 'daily':
|
||||
$label = __( 'Select Day' );
|
||||
break;
|
||||
case 'weekly':
|
||||
$label = __( 'Select Week' );
|
||||
break;
|
||||
default:
|
||||
$label = __( 'Select Post' );
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
||||
<option value=""><?php echo esc_attr( $label ); ?></option>
|
||||
<?php wp_get_archives( $dropdown_args ); ?>
|
||||
|
||||
</select>
|
||||
<?php
|
||||
} else {
|
||||
@@ -511,7 +533,7 @@ class WP_Widget_Text extends WP_Widget {
|
||||
$instance['text'] = $new_instance['text'];
|
||||
else
|
||||
$instance['text'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text']) ) ); // wp_filter_post_kses() expects slashed
|
||||
$instance['filter'] = isset($new_instance['filter']);
|
||||
$instance['filter'] = ! empty( $new_instance['filter'] );
|
||||
return $instance;
|
||||
}
|
||||
|
||||
@@ -556,10 +578,22 @@ class WP_Widget_Categories extends WP_Widget {
|
||||
echo $args['before_title'] . $title . $args['after_title'];
|
||||
}
|
||||
|
||||
$cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h);
|
||||
$cat_args = array(
|
||||
'orderby' => 'name',
|
||||
'show_count' => $c,
|
||||
'hierarchical' => $h
|
||||
);
|
||||
|
||||
if ( $d ) {
|
||||
$cat_args['show_option_none'] = __('Select Category');
|
||||
static $first_dropdown = true;
|
||||
|
||||
$dropdown_id = ( $first_dropdown ) ? 'cat' : "{$this->id_base}-dropdown-{$this->number}";
|
||||
$first_dropdown = false;
|
||||
|
||||
echo '<label class="screen-reader-text" for="' . esc_attr( $dropdown_id ) . '">' . $title . '</label>';
|
||||
|
||||
$cat_args['show_option_none'] = __( 'Select Category' );
|
||||
$cat_args['id'] = $dropdown_id;
|
||||
|
||||
/**
|
||||
* Filter the arguments for the Categories widget drop-down.
|
||||
@@ -575,13 +609,15 @@ class WP_Widget_Categories extends WP_Widget {
|
||||
|
||||
<script type='text/javascript'>
|
||||
/* <![CDATA[ */
|
||||
var dropdown = document.getElementById("cat");
|
||||
(function() {
|
||||
var dropdown = document.getElementById( "<?php echo esc_js( $dropdown_id ); ?>" );
|
||||
function onCatChange() {
|
||||
if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
|
||||
location.href = "<?php echo home_url(); ?>/?cat="+dropdown.options[dropdown.selectedIndex].value;
|
||||
if ( dropdown.options[ dropdown.selectedIndex ].value > 0 ) {
|
||||
location.href = "<?php echo home_url(); ?>/?cat=" + dropdown.options[ dropdown.selectedIndex ].value;
|
||||
}
|
||||
}
|
||||
dropdown.onchange = onCatChange;
|
||||
})();
|
||||
/* ]]> */
|
||||
</script>
|
||||
|
||||
@@ -849,7 +885,7 @@ class WP_Widget_Recent_Comments extends WP_Widget {
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @see get_comments()
|
||||
* @see WP_Comment_Query::query() for information on accepted arguments.
|
||||
*
|
||||
* @param array $comment_args An array of arguments used to retrieve the recent comments.
|
||||
*/
|
||||
@@ -1266,6 +1302,7 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
|
||||
}
|
||||
|
||||
public function update( $new_instance, $old_instance ) {
|
||||
$instance = array();
|
||||
$instance['title'] = strip_tags(stripslashes($new_instance['title']));
|
||||
$instance['taxonomy'] = stripslashes($new_instance['taxonomy']);
|
||||
return $instance;
|
||||
@@ -1323,7 +1360,26 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
|
||||
if ( !empty($instance['title']) )
|
||||
echo $args['before_title'] . $instance['title'] . $args['after_title'];
|
||||
|
||||
wp_nav_menu( array( 'fallback_cb' => '', 'menu' => $nav_menu ) );
|
||||
$nav_menu_args = array(
|
||||
'fallback_cb' => '',
|
||||
'menu' => $nav_menu
|
||||
);
|
||||
|
||||
/**
|
||||
* Filter the arguments for the Custom Menu widget.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param array $nav_menu_args {
|
||||
* An array of arguments passed to wp_nav_menu() to retrieve a custom menu.
|
||||
*
|
||||
* @type callback|bool $fallback_cb Callback to fire if the menu doesn't exist. Default empty.
|
||||
* @type mixed $menu Menu ID, slug, or name.
|
||||
* }
|
||||
* @param stdClass $nav_menu Nav menu object for the current menu.
|
||||
* @param array $args Display arguments for the current widget.
|
||||
*/
|
||||
wp_nav_menu( apply_filters( 'widget_nav_menu_args', $nav_menu_args, $nav_menu, $args ) );
|
||||
|
||||
echo $args['after_widget'];
|
||||
}
|
||||
@@ -1344,7 +1400,7 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
|
||||
$nav_menu = isset( $instance['nav_menu'] ) ? $instance['nav_menu'] : '';
|
||||
|
||||
// Get menus
|
||||
$menus = wp_get_nav_menus( array( 'orderby' => 'name' ) );
|
||||
$menus = wp_get_nav_menus();
|
||||
|
||||
// If no menus exists, direct the user to go and create some.
|
||||
if ( !$menus ) {
|
||||
|
||||
+58
-66
@@ -54,7 +54,7 @@ function get_postdata($postid) {
|
||||
*
|
||||
* @since 1.0.1
|
||||
* @deprecated 1.5.0
|
||||
* @deprecated Use The Loop - {@link http://codex.wordpress.org/The_Loop Use new WordPress Loop}
|
||||
* @deprecated Use The Loop - {@link https://codex.wordpress.org/The_Loop Use new WordPress Loop}
|
||||
*/
|
||||
function start_wp() {
|
||||
global $wp_query;
|
||||
@@ -427,7 +427,7 @@ function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />',
|
||||
*
|
||||
* @param string $category The category to use.
|
||||
* @param string $args
|
||||
* @return bool|null
|
||||
* @return string|null
|
||||
*/
|
||||
function wp_get_linksbyname($category, $args = '') {
|
||||
_deprecated_function(__FUNCTION__, '2.1', 'wp_list_bookmarks()');
|
||||
@@ -451,12 +451,10 @@ function wp_get_linksbyname($category, $args = '') {
|
||||
/**
|
||||
* Gets an array of link objects associated with category $cat_name.
|
||||
*
|
||||
* <code>
|
||||
* $links = get_linkobjectsbyname('fred');
|
||||
* foreach ($links as $link) {
|
||||
* echo '<li>'.$link->link_name.'</li>';
|
||||
* }
|
||||
* </code>
|
||||
* $links = get_linkobjectsbyname( 'fred' );
|
||||
* foreach ( $links as $link ) {
|
||||
* echo '<li>' . $link->link_name . '</li>';
|
||||
* }
|
||||
*
|
||||
* @since 1.0.1
|
||||
* @deprecated 2.1.0
|
||||
@@ -468,7 +466,7 @@ function wp_get_linksbyname($category, $args = '') {
|
||||
* Or maybe owner. If you start the name with an underscore the order will be reversed. You can also
|
||||
* specify 'rand' as the order which will return links in a random order.
|
||||
* @param int $limit Limit to X entries. If not specified, all entries are shown.
|
||||
* @return unknown
|
||||
* @return array
|
||||
*/
|
||||
function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit = -1) {
|
||||
_deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
|
||||
@@ -485,31 +483,29 @@ function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit
|
||||
* Gets an array of link objects associated with category n.
|
||||
*
|
||||
* Usage:
|
||||
* <code>
|
||||
* $links = get_linkobjects(1);
|
||||
* if ($links) {
|
||||
* foreach ($links as $link) {
|
||||
* echo '<li>'.$link->link_name.'<br />'.$link->link_description.'</li>';
|
||||
* }
|
||||
* }
|
||||
* </code>
|
||||
*
|
||||
* $links = get_linkobjects(1);
|
||||
* if ($links) {
|
||||
* foreach ($links as $link) {
|
||||
* echo '<li>'.$link->link_name.'<br />'.$link->link_description.'</li>';
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* Fields are:
|
||||
* <ol>
|
||||
* <li>link_id</li>
|
||||
* <li>link_url</li>
|
||||
* <li>link_name</li>
|
||||
* <li>link_image</li>
|
||||
* <li>link_target</li>
|
||||
* <li>link_category</li>
|
||||
* <li>link_description</li>
|
||||
* <li>link_visible</li>
|
||||
* <li>link_owner</li>
|
||||
* <li>link_rating</li>
|
||||
* <li>link_updated</li>
|
||||
* <li>link_rel</li>
|
||||
* <li>link_notes</li>
|
||||
* </ol>
|
||||
*
|
||||
* - 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
|
||||
*
|
||||
* @since 1.0.1
|
||||
* @deprecated 2.1.0
|
||||
@@ -522,7 +518,7 @@ function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit
|
||||
* underscore the order will be reversed. You can also specify 'rand' as the
|
||||
* order which will return links in a random order.
|
||||
* @param int $limit Limit to X entries. If not specified, all entries are shown.
|
||||
* @return unknown
|
||||
* @return array
|
||||
*/
|
||||
function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) {
|
||||
_deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
|
||||
@@ -582,7 +578,7 @@ function get_linksbyname_withrating($cat_name = "noname", $before = '', $after =
|
||||
* underscore the order will be reversed. You can also specify 'rand' as the
|
||||
* order which will return links in a random order.
|
||||
* @param bool $show_description Whether to show the description if show_images=false/not defined.
|
||||
* @param string $limit Limit to X entries. If not specified, all entries are shown.
|
||||
* @param int $limit Limit to X entries. If not specified, all entries are shown.
|
||||
* @param int $show_updated Whether to show last updated timestamp
|
||||
*/
|
||||
function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true,
|
||||
@@ -631,7 +627,7 @@ function get_autotoggle($id = 0) {
|
||||
* @param string $feed_image
|
||||
* @param string $exclude
|
||||
* @param bool $hierarchical
|
||||
* @return unknown
|
||||
* @return false|null
|
||||
*/
|
||||
function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0,
|
||||
$optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0,
|
||||
@@ -650,7 +646,7 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
|
||||
* @see wp_list_categories()
|
||||
*
|
||||
* @param string|array $args
|
||||
* @return unknown
|
||||
* @return false|null|string
|
||||
*/
|
||||
function wp_list_cats($args = '') {
|
||||
_deprecated_function( __FUNCTION__, '2.1', 'wp_list_categories()' );
|
||||
@@ -691,7 +687,7 @@ function wp_list_cats($args = '') {
|
||||
* @param bool $optionnone
|
||||
* @param int $selected
|
||||
* @param int $exclude
|
||||
* @return unknown
|
||||
* @return string
|
||||
*/
|
||||
function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',
|
||||
$show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false,
|
||||
@@ -726,7 +722,7 @@ function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = '
|
||||
* @param bool $hide_empty
|
||||
* @param string $feed
|
||||
* @param string $feed_image
|
||||
* @return unknown
|
||||
* @return null|string
|
||||
*/
|
||||
function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') {
|
||||
_deprecated_function( __FUNCTION__, '2.1', 'wp_list_authors()' );
|
||||
@@ -743,7 +739,7 @@ function list_authors($optioncount = false, $exclude_admin = true, $show_fullnam
|
||||
*
|
||||
* @param int $blogid Not Used
|
||||
* @param int $post_ID
|
||||
* @return unknown
|
||||
* @return array
|
||||
*/
|
||||
function wp_get_post_cats($blogid = '1', $post_ID = 0) {
|
||||
_deprecated_function( __FUNCTION__, '2.1', 'wp_get_post_categories()' );
|
||||
@@ -761,7 +757,7 @@ function wp_get_post_cats($blogid = '1', $post_ID = 0) {
|
||||
* @param int $blogid Not used
|
||||
* @param int $post_ID
|
||||
* @param array $post_categories
|
||||
* @return unknown
|
||||
* @return bool|mixed
|
||||
*/
|
||||
function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) {
|
||||
_deprecated_function( __FUNCTION__, '2.1', 'wp_set_post_categories()' );
|
||||
@@ -780,7 +776,7 @@ function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array(
|
||||
* @param string $before
|
||||
* @param string $after
|
||||
* @param bool $show_post_count
|
||||
* @return unknown
|
||||
* @return string|null
|
||||
*/
|
||||
function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
|
||||
_deprecated_function( __FUNCTION__, '2.1', 'wp_get_archives()' );
|
||||
@@ -1098,7 +1094,7 @@ function links_popup_script($text = 'Links', $width=400, $height=400, $file='lin
|
||||
* @see sanitize_bookmark_field()
|
||||
*
|
||||
* @param object $link
|
||||
* @return unknown
|
||||
* @return mixed
|
||||
*/
|
||||
function get_linkrating($link) {
|
||||
_deprecated_function( __FUNCTION__, '2.1', 'sanitize_bookmark_field()' );
|
||||
@@ -1160,7 +1156,7 @@ function comments_rss_link($link_text = 'Comments RSS') {
|
||||
*
|
||||
* @param bool $echo
|
||||
* @param int $cat_ID
|
||||
* @return string|null
|
||||
* @return string
|
||||
*/
|
||||
function get_category_rss_link($echo = false, $cat_ID = 1) {
|
||||
_deprecated_function( __FUNCTION__, '2.5', 'get_category_feed_link()' );
|
||||
@@ -1182,7 +1178,7 @@ function get_category_rss_link($echo = false, $cat_ID = 1) {
|
||||
*
|
||||
* @param bool $echo
|
||||
* @param int $author_id
|
||||
* @return string|null
|
||||
* @return string
|
||||
*/
|
||||
function get_author_rss_link($echo = false, $author_id = 1) {
|
||||
_deprecated_function( __FUNCTION__, '2.5', 'get_author_feed_link()' );
|
||||
@@ -1218,7 +1214,7 @@ function comments_rss() {
|
||||
*
|
||||
* @param string $username The user's username.
|
||||
* @param string $password The user's password.
|
||||
* @param string $email The user's email (optional).
|
||||
* @param string $email The user's email.
|
||||
* @return int The new user's ID.
|
||||
*/
|
||||
function create_user($username, $password, $email) {
|
||||
@@ -1314,7 +1310,7 @@ function get_category_children( $id, $before = '/', $after = '', $visited = arra
|
||||
* @since 2.0.0
|
||||
* @deprecated 4.0.0 Use get_terms() instead.
|
||||
* @see get_terms()
|
||||
* @link http://codex.wordpress.org/Function_Reference/get_all_category_ids
|
||||
* @link https://codex.wordpress.org/Function_Reference/get_all_category_ids
|
||||
*
|
||||
* @return object List of all of the category IDs.
|
||||
*/
|
||||
@@ -1661,7 +1657,7 @@ function the_author_url() {
|
||||
* @deprecated Use get_the_author_meta('ID')
|
||||
* @see get_the_author_meta()
|
||||
*
|
||||
* @return int The author's ID.
|
||||
* @return string|int The author's ID.
|
||||
*/
|
||||
function get_the_author_ID() {
|
||||
_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'ID\')' );
|
||||
@@ -1699,14 +1695,13 @@ function the_author_ID() {
|
||||
* and the rest of the content will be removed.
|
||||
*
|
||||
* @since 0.71
|
||||
* @uses apply_filters() Calls 'the_content_rss' on the content before processing.
|
||||
*
|
||||
* @deprecated 2.9.0
|
||||
* @deprecated Use the_content_feed()
|
||||
* @see the_content_feed()
|
||||
*
|
||||
* @param string $more_link_text Optional. Text to display when more content is available but not displayed.
|
||||
* @param int|bool $stripteaser Optional. Default is 0.
|
||||
* @param int $stripteaser Optional. Default is 0.
|
||||
* @param string $more_file Optional.
|
||||
* @param int $cut Optional. Amount of words to keep for the content.
|
||||
* @param int $encode_html Optional. How to encode the content.
|
||||
@@ -1761,7 +1756,7 @@ function make_url_footnote( $content ) {
|
||||
_deprecated_function( __FUNCTION__, '2.9', '' );
|
||||
preg_match_all( '/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches );
|
||||
$links_summary = "\n";
|
||||
for ( $i=0; $i<count($matches[0]); $i++ ) {
|
||||
for ( $i = 0, $c = count( $matches[0] ); $i < $c; $i++ ) {
|
||||
$link_match = $matches[0][$i];
|
||||
$link_number = '['.($i+1).']';
|
||||
$link_url = $matches[2][$i];
|
||||
@@ -1807,7 +1802,6 @@ function _c( $text, $domain = 'default' ) {
|
||||
* contains a context after its last vertical bar.
|
||||
*
|
||||
* @since 2.5.0
|
||||
* @uses translate()
|
||||
* @deprecated 3.0.0
|
||||
* @deprecated Use _x()
|
||||
* @see _x()
|
||||
@@ -1966,7 +1960,7 @@ function get_attachment_icon_src( $id = 0, $fullsize = false ) {
|
||||
* @param int $id Optional. Post ID.
|
||||
* @param bool $fullsize Optional, default to false. Whether to have full size image.
|
||||
* @param array $max_dims Optional. Dimensions of image.
|
||||
* @return string HTML content.
|
||||
* @return false|string HTML content.
|
||||
*/
|
||||
function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) {
|
||||
_deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image()' );
|
||||
@@ -2023,7 +2017,7 @@ function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) {
|
||||
* @param int $id Optional. Post ID.
|
||||
* @param bool $fullsize Optional, default to false. Whether to have full size image.
|
||||
* @param array $max_dims Optional. Dimensions of image.
|
||||
* @return string
|
||||
* @return false|string
|
||||
*/
|
||||
function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) {
|
||||
_deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image()' );
|
||||
@@ -2167,7 +2161,7 @@ function attribute_escape( $text ) {
|
||||
* @param string|int $name Widget ID.
|
||||
* @param callback $output_callback Run when widget is called.
|
||||
* @param string $classname Classname widget option.
|
||||
* @param mixed $params,... Widget parameters.
|
||||
* @param mixed $params ,... Widget parameters.
|
||||
*/
|
||||
function register_sidebar_widget($name, $output_callback, $classname = '') {
|
||||
_deprecated_function( __FUNCTION__, '2.8', 'wp_register_sidebar_widget()' );
|
||||
@@ -2402,7 +2396,7 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) {
|
||||
|
||||
if ( !$cur )
|
||||
$wpdb->insert($wpdb->usermeta, compact('user_id', 'meta_key', 'meta_value') );
|
||||
else if ( $cur->meta_value != $meta_value )
|
||||
elseif ( $cur->meta_value != $meta_value )
|
||||
$wpdb->update($wpdb->usermeta, compact('meta_value'), compact('user_id', 'meta_key') );
|
||||
else
|
||||
return false;
|
||||
@@ -2426,7 +2420,8 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) {
|
||||
*
|
||||
* @since 2.2.0
|
||||
* @deprecated 3.1.0
|
||||
* @uses $wpdb WordPress database object for queries
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
* @uses $blog_id The Blog id of the blog for those that use more than one blog
|
||||
*
|
||||
* @param int $id Blog ID.
|
||||
@@ -2506,7 +2501,7 @@ function funky_javascript_callback($matches) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fixes javascript bugs in browsers.
|
||||
* Fixes JavaScript bugs in browsers.
|
||||
*
|
||||
* Converts unicode characters to HTML numbered entities.
|
||||
*
|
||||
@@ -2520,7 +2515,7 @@ function funky_javascript_callback($matches) {
|
||||
*/
|
||||
function funky_javascript_fix($text) {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
// Fixes for browsers' javascript bugs
|
||||
// Fixes for browsers' JavaScript bugs.
|
||||
global $is_macIE, $is_winIE;
|
||||
|
||||
if ( $is_winIE || $is_macIE )
|
||||
@@ -2637,7 +2632,6 @@ function the_editor($content, $id = 'content', $prev_id = 'title', $media_button
|
||||
_deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
|
||||
|
||||
wp_editor( $content, $id, array( 'media_buttons' => $media_buttons ) );
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2689,7 +2683,7 @@ function sanitize_user_object($user, $context = 'display') {
|
||||
if ( is_object($user) ) {
|
||||
if ( !isset($user->ID) )
|
||||
$user->ID = 0;
|
||||
if ( !is_a( $user, 'WP_User' ) ) {
|
||||
if ( ! ( $user instanceof WP_User ) ) {
|
||||
$vars = get_object_vars($user);
|
||||
foreach ( array_keys($vars) as $field ) {
|
||||
if ( is_string($user->$field) || is_numeric($user->$field) )
|
||||
@@ -2990,7 +2984,7 @@ function get_current_theme() {
|
||||
/**
|
||||
* Accepts matches array from preg_replace_callback in wpautop() or a string.
|
||||
*
|
||||
* Ensures that the contents of a <<pre>>...<</pre>> HTML block are not
|
||||
* Ensures that the contents of a `<pre>...</pre>` HTML block are not
|
||||
* converted into paragraphs or line-breaks.
|
||||
*
|
||||
* @since 1.2.0
|
||||
@@ -3046,7 +3040,7 @@ function add_custom_image_header( $wp_head_callback, $admin_head_callback, $admi
|
||||
* @deprecated Use remove_theme_support('custom-header')
|
||||
* @see remove_theme_support()
|
||||
*
|
||||
* @return bool Whether support was removed.
|
||||
* @return null|bool Whether support was removed.
|
||||
*/
|
||||
function remove_custom_image_header() {
|
||||
_deprecated_function( __FUNCTION__, '3.4', 'remove_theme_support( \'custom-header\' )' );
|
||||
@@ -3083,7 +3077,7 @@ function add_custom_background( $wp_head_callback = '', $admin_head_callback = '
|
||||
* @since 3.1.0
|
||||
* @see add_custom_background()
|
||||
*
|
||||
* @return bool Whether support was removed.
|
||||
* @return null|bool Whether support was removed.
|
||||
*/
|
||||
function remove_custom_background() {
|
||||
_deprecated_function( __FUNCTION__, '3.4', 'remove_theme_support( \'custom-background\' )' );
|
||||
@@ -3152,8 +3146,6 @@ function update_page_cache( &$pages ) {
|
||||
* @since 2.0.0
|
||||
* @deprecated 3.4.0
|
||||
*
|
||||
* @uses do_action() Will call the 'clean_page_cache' hook action.
|
||||
*
|
||||
* @param int $id Page ID to clean
|
||||
*/
|
||||
function clean_page_cache( $id ) {
|
||||
@@ -3299,7 +3291,7 @@ function image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $de
|
||||
*
|
||||
* @param int $postid Post ID.
|
||||
* @param string $mode How to return result, either OBJECT, ARRAY_N, or ARRAY_A.
|
||||
* @return object|array Post object or array holding post contents and information
|
||||
* @return WP_Post|null Post object or array holding post contents and information
|
||||
*/
|
||||
function wp_get_single_post( $postid = 0, $mode = OBJECT ) {
|
||||
_deprecated_function( __FUNCTION__, '3.5', 'get_post()' );
|
||||
|
||||
@@ -34,10 +34,14 @@ do_action( 'rss_tag_pre', 'rdf' );
|
||||
<link><?php bloginfo_rss('url') ?></link>
|
||||
<description><?php bloginfo_rss('description') ?></description>
|
||||
<dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></dc:date>
|
||||
<?php /** This filter is documented in wp-includes/feed-rss2.php */ ?>
|
||||
<sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
|
||||
<?php /** This filter is documented in wp-includes/feed-rss2.php */ ?>
|
||||
<sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
|
||||
<sy:updatePeriod><?php
|
||||
/** This filter is documented in wp-includes/feed-rss2.php */
|
||||
echo apply_filters( 'rss_update_period', 'hourly' );
|
||||
?></sy:updatePeriod>
|
||||
<sy:updateFrequency><?php
|
||||
/** This filter is documented in wp-includes/feed-rss2.php */
|
||||
echo apply_filters( 'rss_update_frequency', '1' );
|
||||
?></sy:updateFrequency>
|
||||
<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
|
||||
<?php
|
||||
/**
|
||||
|
||||
@@ -44,10 +44,14 @@ do_action( 'rss_tag_pre', 'rss2-comments' );
|
||||
<link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link>
|
||||
<description><?php bloginfo_rss("description") ?></description>
|
||||
<lastBuildDate><?php echo mysql2date('r', get_lastcommentmodified('GMT')); ?></lastBuildDate>
|
||||
<?php /** This filter is documented in wp-includes/feed-rss2.php */ ?>
|
||||
<sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
|
||||
<?php /** This filter is documented in wp-includes/feed-rss2.php */ ?>
|
||||
<sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
|
||||
<sy:updatePeriod><?php
|
||||
/** This filter is documented in wp-includes/feed-rss2.php */
|
||||
echo apply_filters( 'rss_update_period', 'hourly' );
|
||||
?></sy:updatePeriod>
|
||||
<sy:updateFrequency><?php
|
||||
/** This filter is documented in wp-includes/feed-rss2.php */
|
||||
echo apply_filters( 'rss_update_frequency', '1' );
|
||||
?></sy:updateFrequency>
|
||||
<?php
|
||||
/**
|
||||
* Fires at the end of the RSS2 comment feed header.
|
||||
|
||||
+27
-25
@@ -11,7 +11,7 @@ $more = 1;
|
||||
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
|
||||
|
||||
/**
|
||||
* Fires between the <xml> and <rss> tags in a feed.
|
||||
* Fires between the xml and rss tags in a feed.
|
||||
*
|
||||
* @since 4.0.0
|
||||
*
|
||||
@@ -44,30 +44,32 @@ do_action( 'rss_tag_pre', 'rss2' );
|
||||
<description><?php bloginfo_rss("description") ?></description>
|
||||
<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
|
||||
<language><?php bloginfo_rss( 'language' ); ?></language>
|
||||
<?php
|
||||
$duration = 'hourly';
|
||||
/**
|
||||
* Filter how often to update the RSS feed.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param string $duration The update period.
|
||||
* Default 'hourly'. Accepts 'hourly', 'daily', 'weekly', 'monthly', 'yearly'.
|
||||
*/
|
||||
?>
|
||||
<sy:updatePeriod><?php echo apply_filters( 'rss_update_period', $duration ); ?></sy:updatePeriod>
|
||||
<?php
|
||||
$frequency = '1';
|
||||
/**
|
||||
* Filter the RSS update frequency.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param string $frequency An integer passed as a string representing the frequency
|
||||
* of RSS updates within the update period. Default '1'.
|
||||
*/
|
||||
?>
|
||||
<sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', $frequency ); ?></sy:updateFrequency>
|
||||
<sy:updatePeriod><?php
|
||||
$duration = 'hourly';
|
||||
|
||||
/**
|
||||
* Filter how often to update the RSS feed.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param string $duration The update period. Accepts 'hourly', 'daily', 'weekly', 'monthly',
|
||||
* 'yearly'. Default 'hourly'.
|
||||
*/
|
||||
echo apply_filters( 'rss_update_period', $duration );
|
||||
?></sy:updatePeriod>
|
||||
<sy:updateFrequency><?php
|
||||
$frequency = '1';
|
||||
|
||||
/**
|
||||
* Filter the RSS update frequency.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param string $frequency An integer passed as a string representing the frequency
|
||||
* of RSS updates within the update period. Default '1'.
|
||||
*/
|
||||
echo apply_filters( 'rss_update_frequency', $frequency );
|
||||
?></sy:updateFrequency>
|
||||
<?php
|
||||
/**
|
||||
* Fires at the end of the RSS2 Feed Header.
|
||||
|
||||
@@ -71,7 +71,6 @@ function bloginfo_rss($show = '') {
|
||||
* 'default_feed' filter.
|
||||
*
|
||||
* @since 2.5.0
|
||||
* @uses apply_filters() Calls 'default_feed' hook on the default feed string.
|
||||
*
|
||||
* @return string Default feed, or for example 'rss2', 'atom', etc.
|
||||
*/
|
||||
@@ -165,7 +164,6 @@ function get_the_title_rss() {
|
||||
* Display the post title in the feed.
|
||||
*
|
||||
* @since 0.71
|
||||
* @uses get_the_title_rss() Used to retrieve current post title.
|
||||
*/
|
||||
function the_title_rss() {
|
||||
echo get_the_title_rss();
|
||||
@@ -203,8 +201,6 @@ function get_the_content_feed($feed_type = null) {
|
||||
* Display the post content for feeds.
|
||||
*
|
||||
* @since 2.9.0
|
||||
* @uses apply_filters() Calls 'the_content_feed' on the content before processing.
|
||||
* @see get_the_content()
|
||||
*
|
||||
* @param string $feed_type The type of feed. rss2 | atom | rss | rdf
|
||||
*/
|
||||
@@ -280,7 +276,7 @@ function comment_guid($comment_id = null) {
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param int|object $comment_id Optional comment object or id. Defaults to global comment object.
|
||||
* @return bool|string false on failure or guid for comment on success.
|
||||
* @return false|string false on failure or guid for comment on success.
|
||||
*/
|
||||
function get_comment_guid($comment_id = null) {
|
||||
$comment = get_comment($comment_id);
|
||||
@@ -313,7 +309,6 @@ function comment_link() {
|
||||
* Retrieve the current comment author for use in the feeds.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @uses get_comment_author()
|
||||
*
|
||||
* @return string Comment Author
|
||||
*/
|
||||
@@ -343,7 +338,6 @@ function comment_author_rss() {
|
||||
* Display the current comment content for use in the feeds.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @uses get_comment_text()
|
||||
*/
|
||||
function comment_text_rss() {
|
||||
$comment_text = get_comment_text();
|
||||
@@ -454,7 +448,6 @@ function html_type_rss() {
|
||||
* attributes.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @uses get_post_custom() To get the current post enclosure metadata.
|
||||
*/
|
||||
function rss_enclosure() {
|
||||
if ( post_password_required() )
|
||||
@@ -494,7 +487,6 @@ function rss_enclosure() {
|
||||
* enclosure(s) consist of link HTML tag(s) with a URI and other attributes.
|
||||
*
|
||||
* @since 2.2.0
|
||||
* @uses get_post_custom() To get the current post enclosure metadata.
|
||||
*/
|
||||
function atom_enclosure() {
|
||||
if ( post_password_required() )
|
||||
|
||||
Binary file not shown.
@@ -6,19 +6,6 @@
|
||||
<font id="dashiconsregular" horiz-adv-x="2000" >
|
||||
<font-face units-per-em="2000" ascent="2000" descent="0" />
|
||||
<missing-glyph horiz-adv-x="500" />
|
||||
<glyph unicode=" " horiz-adv-x="1000" />
|
||||
<glyph unicode=" " />
|
||||
<glyph unicode=" " horiz-adv-x="1000" />
|
||||
<glyph unicode=" " />
|
||||
<glyph unicode=" " horiz-adv-x="666" />
|
||||
<glyph unicode=" " horiz-adv-x="500" />
|
||||
<glyph unicode=" " horiz-adv-x="333" />
|
||||
<glyph unicode=" " horiz-adv-x="333" />
|
||||
<glyph unicode=" " horiz-adv-x="250" />
|
||||
<glyph unicode=" " horiz-adv-x="400" />
|
||||
<glyph unicode=" " horiz-adv-x="111" />
|
||||
<glyph unicode=" " horiz-adv-x="400" />
|
||||
<glyph unicode=" " horiz-adv-x="500" />
|
||||
<glyph unicode="◼" horiz-adv-x="500" d="M0 0z" />
|
||||
<glyph unicode="" d="M1448 894l-707 707l150 150q25 28 85 34.5t134 -11t132 -55.5q45 -30 126.5 -97t164.5 -113q43 -24 73 -38t76.5 -30.5t87.5 -23t95.5 -6t112.5 12.5zM1377 823l-707 707l-177 -177q-29 -29 -29 -70.5t29 -70.5l106 -106q29 -29 29 -71t-29 -71q-27 -27 -61.5 -54 t-86 -63t-73.5 -52q-66 -49 -101 -84q-52 -52 -92 -108.5t-64 -113t-20.5 -108.5t39.5 -88t88 -39.5t108.5 20.5t113 63.5t108.5 91.5q34 34 85 102q13 17 51 72t64 88.5t54 60.5q29 29 70.5 29t70.5 -29l106 -106q29 -29 70.5 -29t70.5 29z" />
|
||||
<glyph unicode="" d="M500 1800h900q82 0 141 -59t59 -141v-700q0 -82 -59 -141t-141 -59h-200l-500 -500v500h-200q-82 0 -141 59t-59 141v700q0 82 59 141t141 59z" />
|
||||
@@ -51,10 +38,10 @@
|
||||
<glyph unicode="" d="M1000 1900q205 0 362 -33.5t257.5 -91t164.5 -142t90 -177.5t26 -206t-26 -206t-90 -177.5t-164.5 -142t-257.5 -91t-362 -33.5t-362 33.5t-257.5 91t-164.5 142t-90 177.5t-26 206t26 206t90 177.5t164.5 142t257.5 91t362 33.5zM550 1100q62 0 106 44t44 106t-44 106 t-106 44t-106 -44t-44 -106t44 -106t106 -44zM1000 1100q62 0 106 44t44 106t-44 106t-106 44t-106 -44t-44 -106t44 -106t106 -44zM1450 1100q62 0 106 44t44 106t-44 106t-106 44t-106 -44t-44 -106t44 -106t106 -44zM600 550q62 0 106 -44t44 -106t-44 -106t-106 -44 t-106 44t-44 106t44 106t106 44zM300 350q41 0 70.5 -29.5t29.5 -70.5t-29.5 -70.5t-70.5 -29.5t-70.5 29.5t-29.5 70.5t29.5 70.5t70.5 29.5z" />
|
||||
<glyph unicode="" d="M1700 1300v-300h-500v-500h-300v500h-500v300h500v500h300v-500h500z" />
|
||||
<glyph unicode="" d="M1700 1300v300h-200v200h-300v-100h-900v-1500h1100v900h100v200h200zM1600 1500v-100h-200v-200h-100v200h-200v100h200v200h100v-200h200z" />
|
||||
<glyph unicode="" d="M0 1700h2000v-1400h-2000v1400zM1900 1300v200h-1800v-200h1800zM1500 800v400h-1000v-400h1000zM400 900v200h-300v-200h300zM1900 900v200h-300v-200h300zM1900 500v200h-1800v-200h1800z" />
|
||||
<glyph unicode="" d="M0 1680h2000v-1400h-2000v1400zM1900 1280v200h-1800v-200h1800zM1100 780v400h-1000v-400h1000zM1900 880v200h-700v-200h700zM1900 480v200h-1800v-200h1800z" />
|
||||
<glyph unicode="" d="M0 1680h2000v-1400h-2000v1400zM1900 1280v200h-1800v-200h1800zM1900 780v400h-1000v-400h1000zM800 880v200h-700v-200h700zM1900 480v200h-1800v-200h1800z" />
|
||||
<glyph unicode="" d="M0 1680h2000v-1400h-2000v1400zM1500 780v400h-1000v-400h1000z" />
|
||||
<glyph unicode="" d="M300 1500h1400v200h-1400v-200zM1500 700v600h-1000v-600h1000zM300 300h1400v200h-1400v-200z" />
|
||||
<glyph unicode="" d="M300 1500h1400v200h-1400v-200zM1200 700v600h-900v-600h900zM1400 1100h300v200h-300v-200zM1400 700h300v200h-300v-200zM300 300h1400v200h-1400v-200z" />
|
||||
<glyph unicode="" d="M300 1500h1400v200h-1400v-200zM300 1100h300v200h-300v-200zM1700 700v600h-900v-600h900zM300 700h300v200h-300v-200zM300 300h1400v200h-1400v-200z" />
|
||||
<glyph unicode="" d="M300 1500h1400v200h-1400v-200zM1300 700v600h-1000v-600h1000zM300 300h1400v200h-1400v-200z" />
|
||||
<glyph unicode="" d="M800 1400l600 -403l-600 -397v800z" />
|
||||
<glyph unicode="" d="M1500 1200l-403 -600l-397 600h800z" />
|
||||
<glyph unicode="" d="M1300 600l-600 403l600 397v-800z" />
|
||||
@@ -245,6 +232,22 @@
|
||||
<glyph unicode="" d="M200 1900h1600q41 0 70.5 -29.5t29.5 -70.5v-1600q0 -41 -29.5 -70.5t-70.5 -29.5h-1600q-41 0 -70.5 29.5t-29.5 70.5v1600q0 41 29.5 70.5t70.5 29.5zM901 1101v600h-601v-600h601zM1701 1101v600h-600v-600h600zM901 300v600h-601v-600h601zM1701 300v600h-600v-600 h600z" />
|
||||
<glyph unicode="" d="M100 1683v-1483h1800v1400h-1100v83q0 48 -35 83q-34 34 -83 34h-464q-49 0 -83 -34q-35 -34 -35 -83zM1000 1400v-200h-700v200h700zM1700 1400v-1000h-500v1000h500zM1000 1000v-200h-700v200h700zM1000 600v-200h-700v200h700z" />
|
||||
<glyph unicode="" d="M200 157q28 -27 94 -18.5t154 38t194.5 81.5t215 113t215 131.5t194.5 136.5t154 129.5t93 109.5q36 60 23.5 137.5t-58 155t-117.5 151.5q32 21 66.5 21t64.5 -17.5t62.5 -41.5t61 -50.5t59.5 -46t58 -26.5t57 8q46 24 68.5 85.5t1.5 106.5q-12 26 -36.5 45.5 t-47.5 30.5t-64 20t-63 12t-70 7.5t-61 5.5q36 9 80 27.5t92 47t80.5 68.5t33.5 82q3 69 -66.5 131.5t-138.5 54.5q-25 -3 -47 -14t-40 -32.5t-31.5 -41t-27.5 -53t-22 -52.5t-20.5 -56.5t-17.5 -50.5q-16 223 -98 295q-55 43 -106 38t-88 -46.5t-38 -96.5q-1 -31 19 -62.5 t49 -56t60.5 -54.5t53 -57t27 -63.5t-16.5 -73.5q-78 60 -157.5 96.5t-155.5 44t-133 -26.5q-70 -45 -163 -169q168 -178 309 -272q15 -11 18.5 -29t-7.5 -33q-10 -16 -28.5 -19.5t-33.5 7.5q-138 94 -310 271q-71 -105 -134 -223q157 -158 279 -241q15 -11 18 -29t-7 -33 q-10 -16 -28.5 -19.5t-34.5 7.5q-117 80 -271 232q-143 -282 -212 -524t-5 -299z" />
|
||||
<glyph unicode="" d="M300 0h1400v2000h-1400v-2000zM700 1700h-200v200h200v-200zM1100 1700h-200v200h200v-200zM1500 1700h-200v200h200v-200zM700 1400h-200v200h200v-200zM1100 1400h-200v200h200v-200zM1500 1400h-200v200h200v-200zM700 1100h-200v200h200v-200zM1100 1100h-200v200 h200v-200zM1500 1100h-200v200h200v-200zM700 800h-200v200h200v-200zM1100 800h-200v200h200v-200zM1500 800h-200v200h200v-200zM1100 100h-600v600h600v-600zM1500 500h-200v200h200v-200zM1500 200h-200v200h200v-200z" />
|
||||
<glyph unicode="" d="M100 1000q61 -43 150 -43t150 43q100 74 100 200q0 -127 100 -200q61 -43 150 -43t150 43q100 74 100 200q0 -127 100 -200q61 -43 151 -43q88 0 149 43q100 74 100 200q0 -127 100 -200q61 -43 150 -43t150 43q100 73 100 200v100l-300 700h-1300l-400 -700v-100 q0 -127 100 -200zM300 101h500v500h400v-500h500v700q-52 7 -100 43q-38 27 -55.5 43t-31 44.5t-13.5 68.5q0 -30 -6 -52t-22 -41t-29.5 -30.5t-42.5 -32.5q-58 -42 -149 -44q-91 0 -151 44q-38 27 -55.5 43t-31 44.5t-13.5 68.5q0 -30 -6 -52t-22 -41t-29.5 -30.5 t-42.5 -32.5q-58 -42 -150 -44q-90 0 -150 44q-38 27 -55.5 43t-31 45t-13.5 69q0 -31 -6 -53t-22 -41t-29.5 -30.5t-42.5 -32.5q-49 -36 -100 -44v-699z" />
|
||||
<glyph unicode="" d="M0 200h1000v26q241 -63 476 24q122 45 222.5 125t167.5 183t102.5 221t31.5 246.5t-49 250.5q-42 115 -116 211t-167.5 161.5t-204.5 106t-227 44t-236 -24.5v26h-1000v-1600zM900 1700v-1400h-800v1400h800zM1445 878q-51 -101 -158.5 -137t-208.5 14q-46 22 -78 59v373 q61 65 149.5 82t172.5 -24q101 -51 137 -158.5t-14 -208.5zM1170 960q16 -12 36.5 -9t33.5 19q12 16 9 36.5t-19 33.5q-17 13 -37 10t-33 -20q-12 -16 -9 -36.5t19 -33.5zM1471 593q-86 -57 -187.5 -75t-195.5 6q-20 5 -31 23t-6 38t23 30.5t39 5.5l17 -4q155 -27 286 59 q72 49 114 118q11 17 31 21.5t38 -5.5q17 -11 22 -31.5t-6 -37.5q-57 -90 -144 -148zM1576 436q-109 -73 -234 -99.5t-250 -6.5q-21 4 -33 21.5t-8 38.5q4 20 21.5 31.5t39.5 7.5l22 -4q211 -24 387 94q101 67 170 174q10 18 30.5 22.5t37.5 -6.5q18 -10 22.5 -30.5 t-6.5 -38.5q-76 -122 -199 -204z" />
|
||||
<glyph unicode="" d="M500 1300v-300l-200 -150v650h1100v200l400 -301l-400 -299v200h-900zM1500 700v300l200 150v-650h-1100v-200l-400 301l400 299v-200h900z" />
|
||||
<glyph unicode="" d="M1198 1237l600 360v-1200l-600 360v-360l-800 480v-480h-200v1200h200v-480l800 480v-360z" />
|
||||
<glyph unicode="" d="M800 760l-600 -360v1200l600 -360v360l800 -480v480h200v-1200h-200v480l-800 -480v360z" />
|
||||
<glyph unicode="" d="M200 1000l1000 600v-360l600 360v-1200l-600 360v-360z" />
|
||||
<glyph unicode="" d="M1800 1000l-1000 -600v360l-600 -360v1200l600 -360v360z" />
|
||||
<glyph unicode="" d="M200 1300h400l500 400v-1400l-500 400h-400v600z" />
|
||||
<glyph unicode="" d="M200 1300h400l500 400v-1400l-500 400h-400v600zM1469 1546q8 -3 22.5 -10t48 -29t65.5 -49.5t68.5 -73t63.5 -98.5t45 -128t18 -158t-18 -158t-45 -128t-63.5 -98.5t-68.5 -73t-65.5 -49.5t-48 -29t-22.5 -10q-8 -4 -19 -4q-35 0 -46 31q-8 19 0 38t27 27q10 5 19 9 t38.5 23.5t53.5 41.5t55 60.5t52 82t36 106t15 131.5q0 96 -28.5 178t-65 129.5t-80 84t-65.5 48t-30 14.5q-19 8 -27 27t0 38t27 27t38 0zM1600 1000q0 -70 -23.5 -131.5t-50 -96t-68.5 -65.5t-55 -37.5t-34 -15.5l-1 -1q-9 -3 -18 -3q-34 0 -47 32q-7 19 1.5 38t27.5 27 q6 2 20.5 9t41.5 27.5t49.5 47.5t39.5 72t17 97t-17 97t-39.5 72t-49.5 47.5t-41.5 27.5t-20.5 9q-19 8 -27.5 27t-1.5 38q8 19 27 27.5t38 1.5q145 -64 202 -195q30 -70 30 -152z" />
|
||||
<glyph unicode="" d="M500 1600l1000 -600l-1000 -600v1200z" />
|
||||
<glyph unicode="" d="M500 400v1200h300v-1200h-300zM1200 1600h300v-1200h-300v1200z" />
|
||||
<glyph unicode="" d="M2000 1362l-101 -282v1q-77 28 -153 -8t-104 -114q-28 -77 7 -153q36 -75 115 -103v-1l-101 -282l-1506 538l99 279q77 -28 153 8q74 34 103 113q28 77 -8 153q-34 73 -113 102l102 287zM1503 793l137 376q18 47 -4 95q-22 46 -70 65l-752 273q-48 17 -95.5 -5t-64.5 -69 l-137 -376q-18 -49 4 -96t70 -64l752 -274q22 -8 43 -8q39 0 71.5 23t45.5 60zM797 1555l751 -273q29 -11 43 -39q13 -28 2 -57l-137 -376q-10 -28 -38.5 -42t-57.5 -3l-751 274q-29 10 -42.5 38.5t-2.5 57.5l137 376q7 22 27 35.5t43 13.5q11 0 26 -5zM1479 341 q53 -41 120 -41h1v-300h-1600v296q84 0 141 59q59 57 59 141q0 82 -59 141t-141 59v304h105l-28 -80l287 -102q-39 -12 -64 -44.5t-25 -73.5v-400q0 -52 36.5 -88.5t88.5 -36.5h800q52 0 88.5 36.5t36.5 88.5v175l83 -30q18 -65 71 -104zM325 300v400q0 31 22 53t53 22h83 l792 -283v-192q0 -31 -22 -53t-53 -22h-800q-31 0 -53 22t-22 53z" />
|
||||
<glyph unicode="" d="M1206 1400l-21 20q-26 27 -32 47t3.5 38t36.5 45l272 275q11 11 27.5 28.5t23.5 24.5t19 17.5t18.5 12t17 3.5t19.5 -3t21 -13t27 -22l21 -20zM1259 1355l440 440q21 -28 41.5 -59.5t47 -78t45 -95t31 -100t10 -104t-21.5 -97.5q-33 -76 -59 -117.5t-69.5 -93 t-71.5 -89.5q-226 -257 -600 -607q-41 -29 -90 -72.5t-91.5 -70.5t-118.5 -57q-43 -17 -95 -18t-103.5 12.5t-100.5 31.5t-97 44.5t-80 45.5t-62 40l440 440l118 -162q16 -23 48.5 -16.5t66 28.5t65.5 54q23 23 92.5 93t118 118.5t104.5 106.5t85 89q32 32 53.5 65t29 65.5 t-16.5 49.5zM157 350l-21 21q-15 16 -23.5 28t-9.5 24.5t-1 19.5t11 21t17 20.5t27 26.5t31 30l274 272q41 39 63.5 42.5t63.5 -31.5l20 -21z" />
|
||||
<glyph unicode="" d="M0 1700h2000v-1200h-75q0 134 -95.5 229.5t-229.5 95.5q-96 0 -175 -52.5t-119 -138.5q-40 16 -81 16q-72 0 -129.5 -42t-81.5 -108h-1014v1200zM837 1389q-10 -24 -11 -47q-2 -27 1 -50l2 -8q3 -16 5 -23q2 -8 10 -31q3 -11 15 -33q9 -15 23 -31q13 -15 31 -23 q18 -9 40 -9q21 0 39 9q16 8 30 22q12 12 22 32q9 15 16 33q6 15 9 31q2 7 3 15l2 7q1 4 1 9q7 41 -4 82q-10 38 -41 66q-32 27 -79 27q-29 0 -52 -10q-24 -11 -38 -28q-12 -15 -24 -40zM1285 785v114q0 49 -29 98t-77 79q-47 31 -102 31l-124 -84l-128 82q-56 0 -104 -30 q-47 -30 -74 -77q-27 -48 -27 -99v-114l18 -5q1 0 51 -14q40 -9 74 -15q31 -6 91 -13q57 -5 99 -5q40 0 98 5q58 7 89 13q22 3 76 16l50 12q11 3 19 6zM1600 775q114 0 194.5 -80.5t80.5 -194.5t-80.5 -194.5t-194.5 -80.5q-107 0 -187 77q37 56 37 123q0 57 -26.5 106.5 t-72.5 79.5q33 74 100 119t149 45zM1050 425q0 72 51.5 123.5t123.5 51.5t123.5 -51.5t51.5 -123.5t-51.5 -123.5t-123.5 -51.5t-123.5 51.5t-51.5 123.5z" />
|
||||
<glyph unicode="" d="M858 1761q47 0 81 -14q88 -39 128.5 -146.5t41.5 -250.5q56 77 156 153t185 76q41 0 80 -9.5t81.5 -34.5t78 -64t66 -102.5t47.5 -144.5q-163 94 -365 94q-198 0 -329 -89q58 16 133 16q111 0 207.5 -34.5t132.5 -96.5q34 -58 38.5 -140.5t-25.5 -160t-89 -113.5 q-7 104 -55.5 199t-127 154t-164.5 59q-67 0 -133 -38q-109 -66 -184 -214.5t-108.5 -339.5t-33.5 -420h-500q0 160 46.5 313t124 273.5t177.5 222t207 168.5t213 102q-93 15 -182 15q-321 0 -586 -194q28 107 78 188t114 128.5t133.5 70.5t143.5 23q93 0 178 -34.5 t142 -94.5q-24 80 -68.5 138.5t-101.5 89t-115.5 44.5t-122.5 14q-113 0 -205 -35q66 93 215 161t267 68zM1300 850q0 62 -44 106t-106 44t-106 -44t-44 -106t44 -106t106 -44t106 44t44 106z" />
|
||||
<glyph horiz-adv-x="600" />
|
||||
</font>
|
||||
</defs></svg>
|
||||
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 89 KiB |
Loaded 100 of 1086 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user