Collections functions
General functions
Node functions
Render functions
Theme permission functions
User 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 1922 to 1934

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 19th March 2024 07:35 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.