Ejemplo n.º 1
0
 /**
  * Check if a string is contained within the field group definition.
  *
  * Searches in ID, slug, title and description. Case insensitive.
  *
  * @param string $search_string String to look for.
  * @return bool True if found.
  */
 public function is_match($search_string)
 {
     return WPCF_Utils::is_string_match($search_string, $this->get_id()) || WPCF_Utils::is_string_match($search_string, $this->get_slug()) || WPCF_Utils::is_string_match($search_string, $this->get_name()) || WPCF_Utils::is_string_match($search_string, $this->get_display_name()) || WPCF_Utils::is_string_match($search_string, $this->get_description());
 }
Ejemplo n.º 2
0
 /**
  * Does the field definition match a certain string?
  *
  * Searches it's name and slug.
  *
  * @param string $search_string
  * @return bool
  */
 public function is_match($search_string)
 {
     return WPCF_Utils::is_string_match($search_string, $this->get_name()) || WPCF_Utils::is_string_match($search_string, $this->get_slug());
 }