Description
Return the package URL for this theme
Usage
oikth_get_package( $post, $version, $new_version, $apikey, $action );Parameters
- $post
- ( post ) required – the theme being downloaded
- $version
- ( post ) required – the post of the theme version
- $new_version
- ( string ) required – the new version number
- $apikey
- ( string ) optional – the (validated) apikey passed on the request Even when it's a FREE theme version type we use the /themes/download URL form rather than a direct download of the file from the original upload directory that way we can keep track of the number of downloads and the number of updates (from previous versions) Note: The "theme" name is the "post_name" not the slug. This is checked during oikth_validate_themeversion()
- $action
- ( string ) optional default: update – the action being performed
Returns
voidSource
File name: oik-themes/feed/oik-themes-feed.phpLines:
1 to 18 of 18
function oikth_get_package( $post, $version, $new_version, $apikey=null, $action="update") { $file = oikth_get_attachment( $version ); if ( $file ) { $package = home_url( "/themes/download" ); $package = add_query_arg( array( "theme" => $post->post_name , "version" => $new_version , "id" => $version->ID , "action" => $action , "apikey" => $apikey ), $package ); } else { $package = null; } bw_trace2( $package, "package" ); return( $package ); }View on GitHub
Called by
1 to 3 of 3
Invoked by
Calls
1 to 2 of 2
Call hooks
API Letters:
