Changeset 14774
- Timestamp:
- 03/28/2026 08:10:10 PM (12 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/rest-api/class-theme-preview.php
r14771 r14774 55 55 ), 56 56 'permission_callback' => function( $request ) { 57 $theme_data = wporg_themes_theme_information( $request['slug'] ); 57 $theme_data = wporg_themes_theme_information( $request['slug'] ); 58 59 if ( ! empty( $theme_data->error ) ) { 60 return false; 61 } 62 58 63 $theme_package = new WPORG_Themes_Repo_Package( $theme_data->slug ); 59 64 60 if ( ! empty( $theme_data->error ) || !$theme_package->post_author ) {65 if ( ! $theme_package->post_author ) { 61 66 return false; 62 67 } … … 117 122 */ 118 123 function set_blueprint( $request ) { 119 $theme_data = wporg_themes_theme_information( $request['slug'] ); 120 $theme_package = new WPORG_Themes_Repo_Package( $theme_data->slug ); 124 $theme_data = wporg_themes_theme_information( $request['slug'] ); 121 125 122 126 if ( ! empty( $theme_data->error ) ) { 123 127 return new WP_Error( 'error', $theme_data->error ); 124 128 } 129 130 $theme_package = new WPORG_Themes_Repo_Package( $theme_data->slug ); 125 131 126 132 // Validate the blueprint, TODO expand upon this.
Note: See TracChangeset
for help on using the changeset viewer.