Array( // [toolbar_title] => Record Structure // [cookie_name] => validata-field-filter-record-structure // [custom_filter_function] => // [cff_args] => // [foreign_dataset_slug] => validata_record_structures // [foreign_match_field_slug] => key // [foreign_title_field_slug] => slug // [this_match_field_slug] => record_structure_key // ) // // ... // // ) // // ------------------------------------------------------------------------- //\greatKiwi_byFernTec_adSwapper_local_v0x1x211_testDebug\pr( $filter_details ) ; //\greatKiwi_byFernTec_adSwapper_local_v0x1x211_testDebug\pr( $_COOKIE ) ; // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // CUSTOM FILTER HANDLER // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: if ( is_string( $filter_details['custom_filter_function'] ) && trim( $filter_details['custom_filter_function'] ) !== '' ) { // *** NOT YET IMPLEMENTED *** $ln = __LINE__ - 6 ; return << "xxx" , // 'records' => array() --OR-- array(...) , // 'key_field_slug' => "xxx" , // 'record_indices_by_key' => array() --OR-- array(...) // ) // // RETURNS // o On SUCCESS // TRUE // // o On FAILURE // $error_message STRING // ------------------------------------------------------------------------- $result = question_add_to_loaded_datasets( $all_application_dataset_definitions , $filter_details['foreign_dataset_slug'] , $loaded_datasets ) ; // ------------------------------------------------------------------------- if ( is_string( $result ) ) { return $result ; } // ========================================================================= // Do the filtering... // ========================================================================= $filtered_dataset_records = array() ; // ------------------------------------------------------------------------- foreach ( $dataset_records as $this_record ) { // --------------------------------------------------------------------- if ( $this_record[ $filter_details['this_match_field_slug'] ] === $cookie_value ) { $filtered_dataset_records[] = $this_record ; } // --------------------------------------------------------------------- } // ========================================================================= // SUCCESS! // ========================================================================= return $filtered_dataset_records ; // ========================================================================= // That's that! // ========================================================================= } // ============================================================================= // That's that! // =============================================================================