Array( // [pointer_field_array_storage_slug] => parent_key // [foreign_dataset] => categories // ) , // [1] => Array( // [pointer_field_array_storage_slug] => parent_key // [foreign_dataset] => projects // ) // ) // // $loaded_datasets is like (eg):- // // $loaded_datasets = array( // // => array( // 'title' => "xxx" , // 'records' => array(...) , // 'key_field_slug' => "xxx" or NULL // 'record_indices_by_key' => array(...) // ) , // // ... // // ) // // RETURNS // o array( // $ok = TRUE , // $foreign_field_value // (any PHP type) // ) on SUCCESS // o array( // $ok = FALSE , // $error_message STRING // ) on FAILURE // ------------------------------------------------------------------------- $success = TRUE ; $failure = FALSE ; // ------------------------------------------------------------------------- $current_record_data = $start_record_data ; // ------------------------------------------------------------------------- //pr( $records_to_traverse ) ; foreach ( $records_to_traverse as $this_record_to_traverse ) { // --------------------------------------------------------------------- // Here we should have (eg):- // // $this_record_to_traverse = array( // [pointer_field_array_storage_slug] => parent_key // [foreign_dataset] => categories // ) // // --------------------------------------------------------------------- $array_storage_pointer_field_slug = $this_record_to_traverse['pointer_field_array_storage_slug'] ; $dataset_slug_to_goto = $this_record_to_traverse['foreign_dataset'] ; // --------------------------------------------------------------------- // Make sure that there's a:- // $array_storage_pointer_field_slug // // field in the current record... // --------------------------------------------------------------------- if ( ! array_key_exists( $array_storage_pointer_field_slug , $current_record_data ) ) { //pr( $array_storage_pointer_field_slug ) ; //pr( $current_record_data ) ; $msg = << => array( // 'title' => "xxx" , // 'records' => array(...) , // 'key_field_slug' => "xxx" or NULL // 'record_indices_by_key' => array(...) // ) , // // ... // // ) // // RETURNS // o TRUE on SUCCESS // o $error_message STRING on FAILURE // ------------------------------------------------------------------------- $dataset_key_field_slug = NULL ; $dataset_title = NULL ; $dataset_records = NULL ; $record_indices_by_key = NULL ; // ----------------------------------------------------------------- $result = load_dataset( $all_application_dataset_definitions , $caller_apps_includes_dir , $loaded_datasets , $dataset_slug_to_goto , $dataset_key_field_slug , $dataset_title , $dataset_records , $record_indices_by_key ) ; // ----------------------------------------------------------------- if ( is_string( $result ) ) { return array( $failure , $result ) ; } // ----------------------------------------------------------------- } // --------------------------------------------------------------------- // Get the target dataset's details... // --------------------------------------------------------------------- $target_dataset_details = $loaded_datasets[ $dataset_slug_to_goto ] ; // --------------------------------------------------------------------- // Here we should have (eg):- // // $target_dataset_details = array( // 'title' => "xxx" , // 'records' => array(...) , // 'key_field_slug' => "xxx" or NULL // 'record_indices_by_key' => array(...) // ) // // --------------------------------------------------------------------- // --------------------------------------------------------------------- // Replace $current_record_data with the pointed to target dataset // record... // --------------------------------------------------------------------- //pr( $loaded_datasets ) ; $target_record_key = $current_record_data[ $array_storage_pointer_field_slug ] ; //pr( $target_record_key ) ; // --------------------------------------------------------------------- if ( ! array_key_exists( $target_record_key , $target_dataset_details['record_indices_by_key'] ) ) { $msg = << 'bold' // ) // // array( // 'method' => 'to-clickable-url' // 'args' => array( // 'text' => "Xxx" // // (Optional; if not specified the field value is used) // 'url' => "xxx" // // (Optional; if not specified the field value is used) // 'attributes' => array( // // Eg; // 'target' => "_blank", etc // 'class' => "xxx" // 'style' => "xxx" // // ...etc... // ) // // Optional // ) // ) // // array( // 'method' => 'micro-datetime-utc-pretty' // 'instance' => NULL | "" // ) // // Converts date/time like:- // // 123456789.1234 // // (seconds.usec as float) // // to (eg):- // // 3 Feb 2014 14:02:15 134,800 us // // array( // 'method' => 'yes-no' // 'args' => array( // 'custom_conversions' => array( // 'TRUE' => 'Yes' , // 'FALSE' => '—' // ) // ) // ) // // Assumes the field contains a boolean (TRUE/FALSE) // // value, which it displays as the strings "yes" or // // "no" // // array( // 'method' => 'password' // ) // // Displays the field value as the same number of "*" // // array( // 'method' => 'image' // 'args' => array() // ) // // The raw_field value is assumed to be an image URL. // // And the image is displayed. // // array( // 'method' => 'htmlentities' // ) // // array( // 'method' => 'wrapper' // 'args' => array( // 'before' => "xxx" , // 'after' => "xxx" // ) // ) // // array( // 'method' => 'max-words' , // 'max_words' => 16 // ) // // ) // // ------------------------------------------------------------------------- $column_number = $this_column_def_index + 1 ; // ------------------------------------------------------------------------- if ( ! is_array( $this_column_def['display_treatments'] ) ) { return << $this_treatment ) { // --------------------------------------------------------------------- $treatment_number = $this_index + 1 ; // --------------------------------------------------------------------- if ( ! is_array( $this_treatment ) ) { return << 64 || ! \greatKiwi_byFernTec_adSwapper_local_v0x1x211_stringUtils\ctype_alphanumeric_underscore_dash( $this_treatment['method'] ) ) { return << 'bold' // ) // ----------------------------------------------------------------- $field_value = <<{$field_value} EOT; // ----------------------------------------------------------------- } elseif ( $this_treatment['method'] === 'to-clickable-url' ) { // ================================================================= // TO-CLICKABLE-URL // ================================================================= // ----------------------------------------------------------------- // array( // 'method' => 'to-clickable-url' // 'args' => array( // 'text' => "Xxx" // // (Optional; if not specified the field value is used) // 'url' => "xxx" // // (Optional; if not specified the field value is used) // 'attributes' => array( // // Eg; // 'target' => "_blank", etc // 'class' => "xxx" // 'style' => "xxx" // // ...etc... // ) // // Optional // ) // ) // ----------------------------------------------------------------- if ( isset( $this_treatment['args'] ) ) { if ( ! is_array( $this_treatment['args'] ) ) { return << $value ) { $attributes .= <<{$text} EOT; // ----------------------------------------------------------------- } elseif ( $this_treatment['method'] === 'micro-datetime-utc-pretty' ) { // ================================================================= // MICRO-DATETIME-UTC-PRETTY // ================================================================= // ----------------------------------------------------------------- // array( // 'method' => 'micro-datetime-utc-pretty' // 'instance' => NULL | "" // ) // // Converts date/time like:- // // 123456789.1234 // // (seconds.usec as float) // // to (eg):- // // 3 Feb 2014 14:02:15 134,800 us // ----------------------------------------------------------------- if ( trim( $field_value ) !== '' ) { // ------------------------------------------------------------- $parts = explode( '.' , $field_value ) ; // ------------------------------------------------------------- if ( count( $parts ) === 2 && ctype_digit( $parts[0] ) && ctype_digit( $parts[1] ) ) { // --------------------------------------------------------- $seconds = $parts[0] ; // --------------------------------------------------------- if ( isset( $this_treatment['instance'] ) && is_string( $this_treatment['instance'] ) && trim( $this_treatment['instance'] ) !== '' ) { $format = $this_treatment['instance'] ; } else { $format = 'j M Y\&\n\b\s\p\; G:i:s' ; } // --------------------------------------------------------- $pretty_seconds = date( $format , $seconds ) ; // --------------------------------------------------------- $micro_seconds = $parts[1] ; // --------------------------------------------------------- if ( strlen( $micro_seconds ) < 6 ) { $micro_seconds = str_pad( $micro_seconds , 6 , '0' , STR_PAD_RIGHT ) ; } elseif ( strlen( $micro_seconds ) > 6 ) { $micro_seconds = substr( $micro_seconds , 0 , 6 ) ; } // --------------------------------------------------------- $pretty_micro_seconds = substr( $micro_seconds , 0 , 3 ) . ',' . substr( $micro_seconds , 3 ) . ' µs' ; // --------------------------------------------------------- $field_value = << 'yes-no' // 'args' => array( // 'custom_conversions' => array( // 'TRUE' => 'Yes' , // 'FALSE' => '—' // ) // ) // ) // ----------------------------------------------------------------- if ( isset( $this_treatment['args'] ) && is_array( $this_treatment['args'] ) && isset( $this_treatment['args']['custom_conversions'] ) ) { if ( $field_value ) { if ( isset( $this_treatment['args']['custom_conversions']['TRUE'] ) && is_scalar( $this_treatment['args']['custom_conversions']['TRUE'] ) ) { $field_value = $this_treatment['args']['custom_conversions']['TRUE'] ; } else { $field_value = 'yes' ; } } else { if ( isset( $this_treatment['args']['custom_conversions']['FALSE'] ) && is_scalar( $this_treatment['args']['custom_conversions']['FALSE'] ) ) { $field_value = $this_treatment['args']['custom_conversions']['FALSE'] ; } else { $field_value = 'no' ; } } } else { if ( $field_value ) { $field_value = 'yes' ; } else { $field_value = 'no' ; } } // ----------------------------------------------------------------- } elseif ( $this_treatment['method'] === 'password' ) { // ================================================================= // PASSWORD // ================================================================= // ----------------------------------------------------------------- // array( // 'method' => 'password' // ) // ----------------------------------------------------------------- $field_value = str_repeat( '*' , strlen( $field_value ) ) ; // ----------------------------------------------------------------- } elseif ( $this_treatment['method'] === 'image' ) { // ================================================================= // IMAGE // ================================================================= // ----------------------------------------------------------------- // array( // 'method' => 'image' // 'args' => array() // ) // ----------------------------------------------------------------- if ( is_string( $field_value ) && trim( $field_value ) !== '' ) { $ext = pathinfo( $field_value , PATHINFO_EXTENSION ) ; $image_extensions = array( 'gif' , 'png' , 'jpeg' , 'jpg' , 'jpe' ) ; if ( in_array( strtolower( $ext ) , $image_extensions , TRUE ) ) { $title = \htmlentities( \greatKiwi_byFernTec_adSwapper_local_v0x1x211_stringUtils\to_title( \strip_tags( \basename( $field_value ) ) ) ) ; $style = '' ; if ( array_key_exists( 'args' , $this_treatment ) && array_key_exists( 'style' , $this_treatment['args'] ) && is_string( $this_treatment['args']['style'] ) && trim( $this_treatment['args']['style'] ) !== '' ) { $style = 'style="' . trim( $this_treatment['args']['style'] ) . '"' ; } $field_value = <<{$title} EOT; //echo '
' , htmlentities( $field_value ) ; } } // ----------------------------------------------------------------- } elseif ( $this_treatment['method'] === 'htmlentities' ) { // ================================================================= // HTMLENTITIES // ================================================================= // ----------------------------------------------------------------- // array( // 'method' => 'htmlentities' // ) // ----------------------------------------------------------------- $field_value = htmlentities( $field_value ) ; // ----------------------------------------------------------------- } elseif ( $this_treatment['method'] === 'wrapper' ) { // ================================================================= // WRAPPER // ================================================================= // ----------------------------------------------------------------- // array( // 'method' => 'wrapper' // 'args' => array( // 'before' => "xxx" , // 'after' => "xxx" // ) // ) // ----------------------------------------------------------------- if ( ! array_key_exists( 'args' , $this_treatment ) || ! is_array( $this_treatment['args'] ) ) { return << 'custom' // 'args' => array( // 'function' => "xxx" , // 'args' => array(...) // ) // ) // ----------------------------------------------------------------- if ( ! array_key_exists( 'args' , $this_treatment ) || ! is_array( $this_treatment['args'] ) || count( $this_treatment['args'] ) < 1 ) { return << 'this_field_name' , // 'label' => 'This Field Name' , // 'question_sortable' => TRUE , // 'raw_value_from' => array( // 'method' => 'array-storage-field-slug' , // 'instance' => 'this_field_name' // ) , // 'display_treatments' => array( // array( // 'method' => 'custom' // 'args' => array( // 'function' => "xxx" , // 'args' => array(...) // ) // ) // ) // ) // ... // // RETURNS // o On SUCCESS! // - - - - - - // TRUE // // o On FAILURE! // - - - - - - // $error_message STRING // ------------------------------------------------------------------------- $result = $fn( $all_application_dataset_definitions , $selected_datasets_dmdd , $dataset_records , $dataset_slug , $dataset_title , $question_front_end , $caller_apps_includes_dir , $this_column_def_index , $this_column_def , $this_dataset_record_index , $this_dataset_record_data , $custom_get_table_data_function_data , $field_value , $extra_args ) ; // ----------------------------------------------------------------- if ( is_string( $result ) ) { return $result ; } // ----------------------------------------------------------------- } elseif ( $this_treatment['method'] === 'max-words' ) { // ================================================================= // MAX-WORDS // ================================================================= // ----------------------------------------------------------------- // array( // 'method' => 'max-words' , // 'max_words' => 16 // ) // ----------------------------------------------------------------- if ( ! array_key_exists( 'max_words' , $this_treatment ) || ! is_numeric( $this_treatment['max_words'] ) ) { return << $this_treatment['max_words'] ) { $words_array = array_slice( $words_array , 0 , $this_treatment['max_words'] ) ; } // ----------------------------------------------------------------- $field_value = implode( chr(32) , $words_array ) . '...' ; // ----------------------------------------------------------------- } else { // ================================================================= // ERROR // ================================================================= $safe_method = htmlentities( $this_treatment['method'] ) ; return << 'standard' , // 'slug' => 'edit' , // 'link_title' => 'edit' // ) , // array( // 'type' => 'standard' , // 'slug' => 'delete' , // 'link_title' => 'delete' // ) , // array( // 'type' => 'custom' , // 'slug' => 'select-dirs-files' , // 'link_title' => 'select files' // ) // ) // // NOTE! // ===== // The presence of the:- // "type" // "slug" // "link_title" // // parameters has already been checked for. As well as some basic // checks as to the validity of their respective values. // ------------------------------------------------------------------------- $column_value = '' ; $action_comma = '' ; // ------------------------------------------------------------------------- foreach ( $selected_datasets_dmdd['dataset_records_table']['record_actions'] as $record_action_index => $record_action_details ) { // --------------------------------------------------------------------- $record_action_number = $record_action_index + 1 ; // --------------------------------------------------------------------- // Here we should have (eg):- // // $record_action_details = array( // 'type' => 'standard' , // 'slug' => 'edit' , // 'link_title' => 'edit' // ) // // --OR-- // // $record_action_details = array( // 'type' => 'standard' , // 'slug' => 'delete' , // 'link_title' => 'delete' // ) // // --OR-- // // $record_action_details = array( // 'type' => 'custom' , // 'slug' => 'select-dirs-files' , // 'link_title' => 'select files' // ) // // --------------------------------------------------------------------- if ( $record_action_details['type'] === 'standard' ) { // ------------------------------------------------------------------------- // process_standard_record_action_for_dataset_record( // $all_application_dataset_definitions , // $caller_apps_includes_dir , // $question_front_end , // $selected_datasets_dmdd , // $dataset_records , // $dataset_slug , // $dataset_title , // $array_storage_key_field_slug , // $dataset_record_index , // $dataset_record_data , // $column_index , // $column_number , // $column_def , // &$custom_get_table_data_function_data , // &$question_delete_record_javascript_required , // &$column_value , // $action_comma , // $record_action_index , // $record_action_number , // $record_action_details // ) // - - - - - - - - - - - - - - - - - - - - - - - - - - - // RETURNS // o On SUCCESS! // - - - - - - // TRUE // // And updates:- // // 1) $column_value, and; // // 2) $question_delete_record_javascript_required // to TRUE, if required. // // o On FAILURE! // - - - - - - // $error_message STRING // ------------------------------------------------------------------------- $result = process_standard_record_action_for_dataset_record( $all_application_dataset_definitions , $caller_apps_includes_dir , $question_front_end , $selected_datasets_dmdd , $dataset_records , $dataset_slug , $dataset_title , $array_storage_key_field_slug , $dataset_record_index , $dataset_record_data , $column_index , $column_number , $column_def , $custom_get_table_data_function_data , $question_delete_record_javascript_required , $column_value , $action_comma , $record_action_index , $record_action_number , $record_action_details ) ; // ----------------------------------------------------------------- } elseif ( $record_action_details['type'] === 'custom' ) { // ----------------------------------------------------------------- $result = process_custom_record_action_for_dataset_record( $all_application_dataset_definitions , $caller_apps_includes_dir , $question_front_end , $selected_datasets_dmdd , $dataset_records , $dataset_slug , $dataset_title , $array_storage_key_field_slug , $dataset_record_index , $dataset_record_data , $column_index , $column_number , $column_def , $custom_get_table_data_function_data , $question_delete_record_javascript_required , $column_value , $action_comma , $record_action_index , $record_action_number , $record_action_details ) ; // ----------------------------------------------------------------- } else { // ----------------------------------------------------------------- $safe_type = htmlentities( $this_record_action_details['type'] ) ; return << 'standard' , // 'slug' => 'edit' , // 'link_title' => 'edit' // ) // // --OR-- // // $record_action_details = array( // 'type' => 'standard' , // 'slug' => 'delete' , // 'link_title' => 'delete' // ) // // NOTE! // ===== // The presence of the:- // "type" // "slug" // "link_title" // // parameters has already been checked for. As well as some basic // checks as to the validity of their respective values. // ------------------------------------------------------------------------- // ========================================================================= // Init. // ========================================================================= $ns = __NAMESPACE__ ; $fn = __FUNCTION__ ; // ------------------------------------------------------------------------- $safe_record_action_slug = htmlentities( $record_action_details['slug'] ) ; // ========================================================================= // CHECK the RECORD ACTION "SLUG"... // ========================================================================= if ( $record_action_details['slug'] !== 'edit' && $record_action_details['slug'] !== 'delete' ) { return << "xxx" , // 'format' => "yyy" , // 'value' => "zzz" , // 'fail_link_creation_silently' => TRUE/FALSE , // 'url_encode_function_name' => "" | "aaa" , // 'url_decode_function_name' => "" | "bbb" // ) // // Where:- // // o $key_field_details['format'] is one of:- // -- OLD VERSION // # "sequential-id" (default) // # "ctype-digit" // # "great-kiwi-password" // -- NEW VERSION // # "mysql-bigint-id" (default) // # "sequential-id" // # "great-kiwi-password" // # "url" // # "custom-function" // // o $key_field_details['value'] is the (validated and ok) // value from the specified dataset record. // // o $key_field_details['fail_link_creation_silently'] means // that the key field contained NO value - but instead of // issuing an error, the caller should just NOT create // the "edit"/"delete" record link. // // o $key_field_details['url_encode_function_name']:- // -- Can be the empty string (if NO key field url encode // function is to be used). // -- If other than the empty string, then the specified // function exists. // // o $key_field_details['url_decode_function_name']:- // -- Can be the empty string (if NO key field url decode // function is to be used). // -- If other than the empty string, then the specified // function exists. // // On FAILURE // $error_message STRING // ------------------------------------------------------------------------- $result = get_check_mysql_array_storage_key_field_overrides( $caller_apps_includes_dir , $selected_datasets_dmdd , $dataset_title , $dataset_record_data ) ; // --------------------------------------------------------------------- if ( is_string( $result ) ) { return $result ; } // --------------------------------------------------------------------- if ( $result === NULL ) { return TRUE ; // Is this correct? Basically, we're ignoring the standard // record action if NO MySQL overrides are specified ??? } // --------------------------------------------------------------------- // Here we should have (eg):- // // $result = array( // 'slug' => "xxx" , // 'format' => "yyy" , // 'value' => "" | "zzz" , // 'fail_link_creation_silently' => TRUE/FALSE , // 'url_encode_function_name' => "" | "aaa" , // 'url_decode_function_name' => "" | "bbb" // ) // // --------------------------------------------------------------------- if ( $result['fail_link_creation_silently'] === TRUE ) { return TRUE ; } // --------------------------------------------------------------------- $target_record_key_slash_id = $result['value'] ; // --------------------------------------------------------------------- /* if ( array_key_exists( 'mysql_overrides' , $selected_datasets_dmdd ) && is_array( $selected_datasets_dmdd['mysql_overrides'] ) && array_key_exists( 'array_storage_key_field_slug' , $selected_datasets_dmdd['mysql_overrides'] ) && is_string( $selected_datasets_dmdd['mysql_overrides']['array_storage_key_field_slug'] ) && trim( $selected_datasets_dmdd['mysql_overrides']['array_storage_key_field_slug'] ) !== '' ) { // ----------------------------------------------------------------- if ( ! array_key_exists( $selected_datasets_dmdd['mysql_overrides']['array_storage_key_field_slug'] , $dataset_record_data ) ) { $safe_key_field_slug = htmlentities( $selected_datasets_dmdd['mysql_overrides']['array_storage_key_field_slug'] ) ; return << 4 , // 'chars_per_group' => 4 , // 'group_separator' => '-' , // 'lowercase_only' => TRUE , // 'question_punctuation' => FALSE // ) // // --- // // NOTE! // ----- // With some combinations, it depends very much on the FONT used (as to // how similar two different characters look). Thus the above rules are // a worst-case set. Stuff is in there if in any common (web) font, // the chance of confusion exists. // // RETURNS // On SUCCESS // TRUE or FALSE // // On FAILURE // $error_message STRING // ----------------------------------------------------------------------- if ( \greatKiwi_byFernTec_adSwapper_local_v0x1x211_passwords\question_grouped_random_password( $key_field_value , $key_field_format_args ) === TRUE ) { $key_field_ok = TRUE ; } // ------------------------------------------------------------- } elseif ( $key_field_format === 'url' ) { // ------------------------------------------------------------- require_once( $caller_apps_includes_dir . '/validata/url-validators.php' ) ; // ------------------------------------------------------------------------- // \greatKiwi_byFernTec_adSwapper_local_v0x1x211_validationFunctions\ // absolute_url_string__minLen_maxLen_questionEmptyOK( // $value , // $minlen = 'default' , // $maxlen = 'default' , // $question_empty_ok = TRUE // ) // - - - - - - - - - - - - - - - - - - - - - // NOTES! // ------ // 1. $question_empty_ok gives you the flexibility to specify (eg):- // o $minlen = 32 // o $maxlen = 64 // o $question_empty_ok = TRUE // // So as to permit either:- // o The empty string, or; // o A 32 to 64 character URL string. // // 2. Default $minlen = 10 = strlen( "http://x.y" ) // (= shortest possible absolute URL). // // 3. Default $maxlen = 2000 // See (eg): // http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers // // RETURNS // On SUCCESS! // TRUE // // On FAILURE // $error_message STRING // ------------------------------------------------------------------------- $minlen = 'default' ; $maxlen = 255 ; // Max. MySQL field length $question_empty_ok = FALSE ; // ------------------------------------------------------------- if ( \greatKiwi_byFernTec_adSwapper_local_v0x1x211_validationFunctions\absolute_url_string__minLen_maxLen_questionEmptyOK( $key_field_value , $minlen , $maxlen , $question_empty_ok ) === TRUE ) { $key_field_ok = TRUE ; } // ------------------------------------------------------------- } else { return <<{$record_action_details['link_title']} EOT; // Because the link we're clicking is in an IFRAME } else { $column_value .= <<{$record_action_details['link_title']} EOT; } // ----------------------------------------------------------------- } elseif ( $record_action_details['slug'] === 'delete' ) { // ================================================================= // DELETE // ================================================================= /* if ( $array_storage_key_field_slug === '' ) { return <<{$record_action_details['link_title']} EOT; // ----------------------------------------------------------------- $question_delete_record_javascript_required = TRUE ; // ----------------------------------------------------------------- } else { // ===================================================================== // ERROR (UNRECOGNISED/UNSUPPORTED RECORD ACTION "SLUG") // ===================================================================== $safe_slug = htmlentities( $record_action_details['slug'] ) ; return << 'custom' , // 'slug' => 'select-dirs-files' , // 'link_title' => 'select files' // ) // // NOTE! // ===== // The presence of the:- // "type" // "slug" // "link_title" // // parameters has already been checked for. As well as some basic // checks as to the validity of their respective values. // ------------------------------------------------------------------------- // ------------------------------------------------------------------------- // NOTE! // ===== // The "custom actions" are defined by the dataset's "custom_actions" // parameter. Ie:- // // $selected_datasets_dmdd['custom_actions'] = array( // // array( // 'slug' => 'select-dirs-files' , // 'args' => array( // 'plugin_stuff_relative_filespec' => 'select-dirs-and-files.php' , // 'namespace_and_function_name' => 'select_dirs_and_files' // ) // ) // // ) // // NOTE! // ===== // The presence of the:- // "slug" and; // "args" // // parameters has already been checked for. As well as some basic // checks of to the validity of their respective values. // ------------------------------------------------------------------------- // ========================================================================= // Get the CUSTOM ACTION pointed to by the record action... // ========================================================================= $custom_action_details = NULL ; // ------------------------------------------------------------------------- foreach ( $selected_datasets_dmdd['custom_actions'] as $this_custom_action_index => $this_custom_action_details ) { if ( $this_custom_action_details['slug'] === $record_action_details['slug'] ) { $custom_action_details = $this_custom_action_details ; } } // ------------------------------------------------------------------------- if ( ! is_array( $custom_action_details ) ) { return << 'select-dirs-files' , // 'args' => array( // 'plugin_stuff_relative_filespec' => 'select-dirs-and-files.php' , // 'namespace_and_function_name' => 'select_dirs_and_files' // ) // ) // // ------------------------------------------------------------------------- if ( $array_storage_key_field_slug === '' ) { return <<{$record_action_details['link_title']} EOT; // Because the link we're clicking is in an IFRAME } else { $column_value .= <<{$record_action_details['link_title']} EOT; } // ========================================================================= // SUCCESS! // ========================================================================= return TRUE ; // ========================================================================= // That's that! // ========================================================================= } // ============================================================================= // That's that! // =============================================================================