Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu...
File: class-wp-object-cache.php
[500] Fix | Delete
if ( $this->cache[ $group ][ $key ] < 0 ) {
[501] Fix | Delete
$this->cache[ $group ][ $key ] = 0;
[502] Fix | Delete
}
[503] Fix | Delete
[504] Fix | Delete
return $this->cache[ $group ][ $key ];
[505] Fix | Delete
}
[506] Fix | Delete
[507] Fix | Delete
/**
[508] Fix | Delete
* Decrements numeric cache item's value.
[509] Fix | Delete
*
[510] Fix | Delete
* @since 3.3.0
[511] Fix | Delete
*
[512] Fix | Delete
* @param int|string $key The cache key to decrement.
[513] Fix | Delete
* @param int $offset Optional. The amount by which to decrement the item's value.
[514] Fix | Delete
* Default 1.
[515] Fix | Delete
* @param string $group Optional. The group the key is in. Default 'default'.
[516] Fix | Delete
* @return int|false The item's new value on success, false on failure.
[517] Fix | Delete
*/
[518] Fix | Delete
public function decr( $key, $offset = 1, $group = 'default' ) {
[519] Fix | Delete
if ( ! $this->is_valid_key( $key ) ) {
[520] Fix | Delete
return false;
[521] Fix | Delete
}
[522] Fix | Delete
[523] Fix | Delete
if ( empty( $group ) ) {
[524] Fix | Delete
$group = 'default';
[525] Fix | Delete
}
[526] Fix | Delete
[527] Fix | Delete
if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) ) {
[528] Fix | Delete
$key = $this->blog_prefix . $key;
[529] Fix | Delete
}
[530] Fix | Delete
[531] Fix | Delete
if ( ! $this->_exists( $key, $group ) ) {
[532] Fix | Delete
return false;
[533] Fix | Delete
}
[534] Fix | Delete
[535] Fix | Delete
if ( ! is_numeric( $this->cache[ $group ][ $key ] ) ) {
[536] Fix | Delete
$this->cache[ $group ][ $key ] = 0;
[537] Fix | Delete
}
[538] Fix | Delete
[539] Fix | Delete
$offset = (int) $offset;
[540] Fix | Delete
[541] Fix | Delete
$this->cache[ $group ][ $key ] -= $offset;
[542] Fix | Delete
[543] Fix | Delete
if ( $this->cache[ $group ][ $key ] < 0 ) {
[544] Fix | Delete
$this->cache[ $group ][ $key ] = 0;
[545] Fix | Delete
}
[546] Fix | Delete
[547] Fix | Delete
return $this->cache[ $group ][ $key ];
[548] Fix | Delete
}
[549] Fix | Delete
[550] Fix | Delete
/**
[551] Fix | Delete
* Clears the object cache of all data.
[552] Fix | Delete
*
[553] Fix | Delete
* @since 2.0.0
[554] Fix | Delete
*
[555] Fix | Delete
* @return true Always returns true.
[556] Fix | Delete
*/
[557] Fix | Delete
public function flush() {
[558] Fix | Delete
$this->cache = array();
[559] Fix | Delete
[560] Fix | Delete
return true;
[561] Fix | Delete
}
[562] Fix | Delete
[563] Fix | Delete
/**
[564] Fix | Delete
* Removes all cache items in a group.
[565] Fix | Delete
*
[566] Fix | Delete
* @since 6.1.0
[567] Fix | Delete
*
[568] Fix | Delete
* @param string $group Name of group to remove from cache.
[569] Fix | Delete
* @return true Always returns true.
[570] Fix | Delete
*/
[571] Fix | Delete
public function flush_group( $group ) {
[572] Fix | Delete
unset( $this->cache[ $group ] );
[573] Fix | Delete
[574] Fix | Delete
return true;
[575] Fix | Delete
}
[576] Fix | Delete
[577] Fix | Delete
/**
[578] Fix | Delete
* Sets the list of global cache groups.
[579] Fix | Delete
*
[580] Fix | Delete
* @since 3.0.0
[581] Fix | Delete
*
[582] Fix | Delete
* @param string|string[] $groups List of groups that are global.
[583] Fix | Delete
*/
[584] Fix | Delete
public function add_global_groups( $groups ) {
[585] Fix | Delete
$groups = (array) $groups;
[586] Fix | Delete
[587] Fix | Delete
$groups = array_fill_keys( $groups, true );
[588] Fix | Delete
$this->global_groups = array_merge( $this->global_groups, $groups );
[589] Fix | Delete
}
[590] Fix | Delete
[591] Fix | Delete
/**
[592] Fix | Delete
* Switches the internal blog ID.
[593] Fix | Delete
*
[594] Fix | Delete
* This changes the blog ID used to create keys in blog specific groups.
[595] Fix | Delete
*
[596] Fix | Delete
* @since 3.5.0
[597] Fix | Delete
*
[598] Fix | Delete
* @param int $blog_id Blog ID.
[599] Fix | Delete
*/
[600] Fix | Delete
public function switch_to_blog( $blog_id ) {
[601] Fix | Delete
$blog_id = (int) $blog_id;
[602] Fix | Delete
$this->blog_prefix = $this->multisite ? $blog_id . ':' : '';
[603] Fix | Delete
}
[604] Fix | Delete
[605] Fix | Delete
/**
[606] Fix | Delete
* Resets cache keys.
[607] Fix | Delete
*
[608] Fix | Delete
* @since 3.0.0
[609] Fix | Delete
*
[610] Fix | Delete
* @deprecated 3.5.0 Use WP_Object_Cache::switch_to_blog()
[611] Fix | Delete
* @see switch_to_blog()
[612] Fix | Delete
*/
[613] Fix | Delete
public function reset() {
[614] Fix | Delete
_deprecated_function( __FUNCTION__, '3.5.0', 'WP_Object_Cache::switch_to_blog()' );
[615] Fix | Delete
[616] Fix | Delete
// Clear out non-global caches since the blog ID has changed.
[617] Fix | Delete
foreach ( array_keys( $this->cache ) as $group ) {
[618] Fix | Delete
if ( ! isset( $this->global_groups[ $group ] ) ) {
[619] Fix | Delete
unset( $this->cache[ $group ] );
[620] Fix | Delete
}
[621] Fix | Delete
}
[622] Fix | Delete
}
[623] Fix | Delete
[624] Fix | Delete
/**
[625] Fix | Delete
* Echoes the stats of the caching.
[626] Fix | Delete
*
[627] Fix | Delete
* Gives the cache hits, and cache misses. Also prints every cached group,
[628] Fix | Delete
* key and the data.
[629] Fix | Delete
*
[630] Fix | Delete
* @since 2.0.0
[631] Fix | Delete
*/
[632] Fix | Delete
public function stats() {
[633] Fix | Delete
echo '<p>';
[634] Fix | Delete
echo "<strong>Cache Hits:</strong> {$this->cache_hits}<br />";
[635] Fix | Delete
echo "<strong>Cache Misses:</strong> {$this->cache_misses}<br />";
[636] Fix | Delete
echo '</p>';
[637] Fix | Delete
echo '<ul>';
[638] Fix | Delete
foreach ( $this->cache as $group => $cache ) {
[639] Fix | Delete
echo '<li><strong>Group:</strong> ' . esc_html( $group ) . ' - ( ' . number_format( strlen( serialize( $cache ) ) / KB_IN_BYTES, 2 ) . 'k )</li>';
[640] Fix | Delete
}
[641] Fix | Delete
echo '</ul>';
[642] Fix | Delete
}
[643] Fix | Delete
}
[644] Fix | Delete
[645] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function