Collections functions
General functions
Render functions
Theme permission 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 1792 to 1804

Definition

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

    
$field_shortname ps_value("SELECT name AS `value` FROM resource_type_field WHERE ref = ?", array("i",$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 5th October 2022 02:35 Europe/London time based on the source file dated 3rd October 2022 17:20 Europe/London time.