Description
Obtain the "Tested up to" information and, if available "Last updated" from the readme.txt filee.g. Tested up to: 3.6 Last updated: some form of date string
Usage
$array = bw_get_readme_data( $plugin_slug );Parameters
- $plugin_slug
- ( string ) required – plugin slug e.g. oik-fields
Returns
array readme_data with "Tested" and "Last_updated" keys setSource
File name: oik-bob-bing-wide/shortcodes/oik-plug.phpLines:
1 to 20 of 20
function bw_get_readme_data( $plugin_slug ) { require_once( ABSPATH . "wp-admin/includes/plugin.php" ); $file = oik_path( "readme.txt" , $plugin_slug ); if ( file_exists( $file ) ) { $headers = array( "Tested" => "Tested up to" , "Last_updated" => "Last updated" ); $readme_data = get_file_data( $file, $headers, 'plugin' ); if ( !$readme_data['Last_updated'] ) { $readme_data['Last_updated'] = bw_format_date( filemtime( $file )); } } else { $readme_data = null; bw_trace2( $file, "file does not exist", true, BW_TRACE_WARNING ); // Perhaps it's README.txt bw_backtrace(); } bw_trace2( $readme_data, "readme_data" ); return( $readme_data ); }View on GitHub
Called by
1 to 2 of 2
Invoked by
Calls
1 to 2 of 2
Call hooks
API Letters:
