Description
https://spreadsheets.google.com/pub?key=0AqP80E74YcUWdEdETXZLcXhjd2w0cHMwX2U1eDlWTHc&authkey=CK7h9toK&hl=en&single=true&gid=0&output=html$response->name = 'my_theme_name'; $response->slug = 'my_theme_slug'; $response->requires = '3.3'; $response->tested = '3.3.1'; $response->rating = 100.0; //just for fun, gives us a 5-star rating 🙂 $response->num_ratings = 1000000000; //just for fun, a lot of people rated it 🙂 $response->downloaded = 1000000000; //just for fun, a lot of people downloaded it 🙂 $response->last_updated = "2012-04-15"; $response->added = "2012-02-01"; $response->homepage = "http://theme.url/"; $response->sections = array( 'description' => 'Add a description of your theme', 'changelog' => 'Add a list of changes to your theme' ); $response->download_link = 'http://theme.url/download/location'; upgrade_notice = up to 300 characters saying why the user should upgrade http://qw/wpit/themes/info?action=theme-information&request=O:8:"stdClass":2:{s:4:"slug";s:7:"bbboing";s:8:"per_page";i:24;} O:8:"stdClass":2:{s:4:"slug";s:7:"bbboing";s:8:"per_page";i:24;} [body] => O:8:"stdClass":18:{s:4:"name";s:8:"BackWPup"; s:4:"slug";s:8:"backwpup"; s:7:"version";s:6:"2.1.13"; s:6:"author";s:56:"<a href="http://danielhuesken.de">Daniel Hüsken</a>"; s:14:"author_profile";s:43:"http://profiles.wordpress.org/danielhuesken"; s:12:"contributors";a:1:{s:13:"danielhuesken";s:43:"http://profiles.wordpress.org/danielhuesken";} s:8:"requires";s:3:"3.1"; s:6:"tested";s:5:"3.4.1"; s:13:"compatibility";a:1:{s:5:"3.4.1";a:4:{s:6:"2.1.11";a:3:{i:0;i:80;i:1;i:5;i:2;i:4;}s:6:"2.1.12";a:3:{i:0;i:87;i:1;i:15;i:2;i:13;}s:6:"2.1.13";a:3:{i:0;i:83;i:1;i:6;i:2;i:5;}s:5:"2.1.9";a:3:{i:0;i:100;i:1;i:1;i:2;i:1;}}} s:6:"rating";d:91; s:11:"num_ratings";i:278; s:10:"downloaded";i:308766; s:12:"last_updated";s:10:"2012-07-30"; s:5:"added";s:10:"2009-07-05"; s:8:"homepage";s:19:"http://backwpup.com"; s:8:"sections";a:5:{s:11:"description";s:739:"<p>Do backups and more for your WordPress Blog.</p> <ul>
Usage
oikth_theme_information( $oik_theme_action );Parameters
- $oik_theme_action
- ( mixed ) optional default: info –
Returns
voidSource
File name: oik-themes/feed/oik-themes-feed.phpLines:
function oikth_theme_information( $oik_theme_action="info" ) { $body = bw_array_get( $_REQUEST, "request", null ); if ( $body ) { bw_trace2( $body, "body", false ); $request = unserialize( stripslashes( $body) ); bw_trace2( $request, "request", false ); $slug = bw_array_get( $request, "slug", null ); if ( $slug ) { $response = new stdClass; $response->slug = $slug; $post = oikth_load_theme( $slug ); if ( $post ) { $version = oikth_load_themeversion( $post ); if ( $version ) { $response->name = $slug; $response->last_updated = $version->post_modified; $response->version = oikth_get_latestversion( $version ); $response->author = oikth_get_author_name( $post ); $response->author_profile = oikth_get_author_profile( $post ); $response->requires = oikth_get_requires( $version ); $response->tested = oikth_get_tested( $version ); $response->homepage = get_permalink( $post->ID ); $response->short_description = get_post_meta( $post->ID, "_oiktv_desc", true ); $response->sections = oikth_get_sections( $post, $version ); $response->download_url = oikth_get_package( $post, $version, $response->version ); $response->downloaded = oikth_get_downloaded( $post, $version ); } else { $response = bw_wp_error( "not-found", "Version not found" ); } } else { $response = bw_wp_error( "not-found", "theme not found" ); } } else { $response = bw_wp_error( "missing_slug", "Slug missing from request" ); } } else { $response = bw_wp_error( "invalid_request", "Request missing" ); } echo serialize( $response ); }View on GitHub
Invoked by
Calls
- bw_trace2() – Trace $value to the trace log file if tracing is active
- bw_wp_error() –
- oikth_get_author_name() – Return a link to the author’s home page Determine the author’s display name from the post author then append it to their website URL
- oikth_get_author_profile() –
- oikth_get_downloaded() – Return the number downloaded – when we’re ready to tell them!
- oikth_get_latestversion() – Return the version metadata
- oikth_get_package() – Return the package URL for this theme
- oikth_get_requires() – Get the value of the "required_version" custom category ( was _oikpv_requires )
- oikth_get_sections() –
- oikth_get_tested() –
- oikth_load_theme() – Load the theme by $slug
- oikth_load_themeversion() –
