Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

rebuild_specific_field_search_from_node()

Description

Utility function which helps rebuilding a specific field search string
from a node element

Parameters

ColumnTypeDefaultDescription
$node array A node element as returned by get_node() or get_nodes()

Return

string

Location

include/search_functions.php lines 1717 to 1729

Definition

 
function rebuild_specific_field_search_from_node(array $node)
    {
    if(
== count($node))
        {
        return 
'';
        }

    
$field_shortname sql_value("SELECT name AS `value` FROM resource_type_field WHERE ref = '{$node['resource_type_field']}'""field{$node['resource_type_field']}""schema");

    
// Note: at the moment there is no need to return a specific field search by multiple options
    // Example: country:keyword1;keyword2
    
return ((strpos($node['name']," ")===false)?$field_shortname ":" i18n_get_translated($node['name']):"\"" $field_shortname ":" i18n_get_translated($node['name']) . "\"");
    }

This article was last updated 3rd December 2020 13:05 Europe/London time based on the source file dated 26th November 2020 14:30 Europe/London time.