Description
Process a fileWe process .php and .inc files Note: WordPress doesn't have any .inc files
Usage
_ca_dofile( $file, $plugin, $component_type, $start );Parameters
- $file
- ( string ) required – the file name
- $plugin
- ( mixed ) required –
- $component_type
- ( mixed ) required –
- $start
- ( mixed ) optional default: 1 –
Returns
voidTO DO
Expand to cover ALL files.Source
File name: oik-batch/createapi2.phpLines:
1 to 18 of 18
function _ca_dofile( $file, $plugin, $component_type, $start=1 ) { if ( $plugin ) { $inignorelist = _ca_checkignorelist( $file ); } else { $inignorelist = false; } if ( !$inignorelist ) { echo "Processing: $file". PHP_EOL; $ext = pathinfo( $file, PATHINFO_EXTENSION ); $ext = strtolower( $ext ); $exts = bw_assoc( array( "php", "inc" )); $validext = bw_array_get( $exts, $ext, false ); if ( $validext ) { _lf_dofile_ajax( $file ); _ca_doapis( $file, $plugin, $component_type, $start ); } } }View on GitHub
Called by
Invoked by
Calls
1 to 5 of 5
- bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
- bw_assoc() – Convert a simple array into an associative array keyed on the value
- _ca_checkignorelist() – createapi ignore list – copy of listapis ignore list
- _ca_doapis() – Create the apis for a particular file in a plugin
- _lf_dofile_ajax() – Create the apis for a particular file in a plugin
