Description
validate the theme and version against the given post ID
Usage
$mixed = oikth_validate_themeversion( $theme_version, $theme, $version, $apikey );Parameters
- $theme_version
- ( post ) required –
- $theme
- ( string ) required – theme name – the "post_name"
- $version
- ( string ) required – theme version string e.g. 1.16.0821
- $apikey
- ( mixed ) required –
Returns
mixed $response – null if OK or WP_errorSource
File name: oik-themes/feed/oik-themes-feed.phpLines:
1 to 15 of 15
function oikth_validate_themeversion( $theme_version, $theme, $version, $apikey ) { $actual_version = oikth_get_latestversion( $theme_version ); if ( $actual_version == $version ) { $actual_theme = oikth_get_theme( $theme_version ); bw_trace2( $actual_theme, "actual_theme" ); if ( $actual_theme && $actual_theme->post_name == $theme ) { $response = oikth_validate_apikey( $theme_version, $actual_theme, $apikey ); } else { $response = bw_wp_error( "not-found", "Invalid theme name", $theme ); } } else { $response = bw_wp_error( "not-found", "Invalid version" ); } return( $response ); }View on GitHub
Invoked by
Calls
1 to 5 of 5
- bw_trace2() – Trace $value to the trace log file if tracing is active
- bw_wp_error() –
- oikth_get_latestversion() – Return the version metadata
- oikth_get_theme() – Load the theme for the given theme version or premium version node
- oikth_validate_apikey() – validate the apikey for this selected theme version
Call hooks
API Letters:
