You appear to be a bot. Output may be restricted
Description
Load the latest parsed source – if it is the latestWe only return the parsed source if the source has been parsed more than once AND the stored timestamp is the same as or later than the current timestamp for the file. If the stored timestamp is 1 then we've only parsed the file once. We won't be too sure whether or not the called APIs have been found. If the stored timestamp is earlier than the current this means the file has been updated so we should re-parse it.
Usage
$post = bw_get_latest_parsed_source_by_sourceref( $file, $component_type, $post_id, $component_slug );
Parameters
- $file
- ( string ) required – file name
- $component_type
- ( string ) required –
plugin theme - $post_id
- ( mixed ) required –
- $component_slug
- ( mixed ) required –
Returns
post the parsed source post object or nullSource
File name: oik-shortcodes/classes/class-oiksc-parsed-source.php
Lines:1 to 16 of 16function bw_get_latest_parsed_source_by_sourceref( $file, $component_type, $post_id, $component_slug) { // bw_trace2(); $parsed_source = bw_get_parsed_source_by_sourceref( $post_id ); if ( $parsed_source ) { $parse_count = bw_get_parse_count( $parsed_source ); if ( $parse_count <= 1 ) { $parsed_source = null; } else { $file_time = bw_get_file_time( $file, $component_type, $component_slug ); if ( $parse_count < $file_time ) { $parsed_source = null; } } } return( $parsed_source ); }
View on GitHub