_cache_group[] = self::get_key( $tag, $attrs ); return $override; } /** * Restore previous cache group when current shortcode execution ends. * * @since 4.10.0 * @access public * @param mixed $output Shortcode content. * @return mixed */ public function restore_previous_cache_group( $output ) { // Get rid of current shortcode cache group. array_pop( $this->_cache_group ); return $output; } /** * Check for cached value. * * First check cache if present, if not, determine * from calling the callback. * * @param string $key Name of item. * @param function $cb Callback function to perform logic. * @param string $group Cache group. * * @return bool/mixed Result. */ public function get( $key, $cb, $group = 'default' ) { return parent::get( $key, $cb, end( $this->_cache_group ) ); } }