array_intersect_assoc example

protected function isRouteActive($current_route_name$route_name$route_parameters) {
    // Flag the list element as active if this tab's route and parameters match     // the current request's route and route variables.     $active = $current_route_name == $route_name;
    if ($active) {
      // The request is injected, so we need to verify that we have the expected       // _raw_variables attribute.       $raw_variables_bag = $this->routeMatch->getRawParameters();
      // If we don't have _raw_variables, we assume the attributes are still the       // original values.       $raw_variables = $raw_variables_bag ? $raw_variables_bag->all() : $this->routeMatch->getParameters()->all();
      $active = array_intersect_assoc($route_parameters$raw_variables) == $route_parameters;
    }
    return $active;
  }

}

    $languages = (array) apply_filters( 'signup_get_available_languages', get_available_languages() );

    /* * Strip any non-installed languages and return. * * Re-call get_available_languages() here in case a language pack was installed * in a callback hooked to the 'signup_get_available_languages' filter before this point. */
    return array_intersect_assoc( $languagesget_available_languages() );
}

// Main. $active_signup = get_site_option( 'registration', 'none' );

/** * Filters the type of site sign-up. * * @since 3.0.0 * * @param string $active_signup String that returns registration type. The value can be * 'all', 'none', 'blog', or 'user'. */
if (!$cache_dir) {
                    return false;
                }
                $cache_dir .= '/.php_cache_api/';
                return $this->_clean($cache_dir$mode);
                break;
            case Zend_Cache::CLEANING_MODE_MATCHING_TAG:
                $idlist = null;
                foreach ($tags as $tag) {
                    $next_idlist = output_cache_get(self::TAGS_PREFIX.$tag$this->_directives['lifetime']);
                    if ($idlist) {
                        $idlist = array_intersect_assoc($idlist$next_idlist);
                    } else {
                        $idlist = $next_idlist;
                    }
                    if (count($idlist) == 0) {
                        // if ID list is already empty - we may skip checking other IDs                         $idlist = null;
                        break;
                    }
                }
                if ($idlist) {
                    foreach ($idlist as $id) {
                        
Home | Imprint | This part of the site doesn't use cookies.