Changeset 1337
- Timestamp:
- 02/26/2015 10:05:12 PM (10 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content-single.php
r1278 r1337 23 23 </div> 24 24 25 <?php if ( ! empty( get_post()->parent ) ) : ?> 25 <?php 26 if ( ! empty( get_post()->post_parent ) ) : 27 $parent = get_post( get_post()->post_parent ); 28 ?> 26 29 <div class="theme-notice notice notice-info"> 27 <p class="parent-theme"><?php printf( __( 'This is a child theme of %s.' ), sprintf( '<a href=" /%1$s">%2$s</a>', $theme->parent->slug, $theme->parent->name ) ); ?></p>30 <p class="parent-theme"><?php printf( __( 'This is a child theme of %s.' ), sprintf( '<a href="%1$s">%2$s</a>', get_permalink( $parent->ID ), $parent->post_title ) ); ?></p> 28 31 </div> 29 32 <?php endif; ?> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
r1335 r1337 142 142 */ 143 143 function wporg_themes_query_themes() { 144 $args = wp_parse_args( wp_unslash( $_REQUEST['request'] ), array( 144 $request = wp_unslash( $_REQUEST['request'] ); 145 $request['fields'] = wp_parse_args( $request['fields'], array( 146 'description' => true, 147 'sections' => false, 148 'tested' => true, 149 'requires' => true, 150 'rating' => true, 151 'ratings' => true, 152 'downloaded' => true, 153 'downloadlink' => true, 154 'last_updated' => true, 155 'homepage' => true, 156 'tags' => true, 157 'num_ratings' => true, 158 'parent' => true, 159 ) ); 160 $args = wp_parse_args( $request, array( 145 161 'per_page' => 20, 146 'fields' => array(147 'description' => true,148 'sections' => false,149 'tested' => true,150 'requires' => true,151 'rating' => true,152 'downloaded' => true,153 'downloadlink' => true,154 'last_updated' => true,155 'homepage' => true,156 'tags' => true,157 'num_ratings' => true,158 ),159 162 ) ); 160 163 … … 177 180 178 181 function wporg_themes_theme_info() { 179 $args = wp_unslash( $_REQUEST ); 182 $request = wp_unslash( $_REQUEST['request'] ); 183 $request['fields'] = wp_parse_args( $request['fields'], array( 184 'description' => true, 185 'sections' => false, 186 'tested' => true, 187 'requires' => true, 188 'rating' => true, 189 'ratings' => true, 190 'downloaded' => true, 191 'downloadlink' => true, 192 'last_updated' => true, 193 'homepage' => true, 194 'tags' => true, 195 'num_ratings' => true, 196 'parent' => true, 197 ) ); 180 198 181 199 include_once API_WPORGPATH . 'themes/info/1.0/class-themes-api.php'; 182 $api = new Themes_API( ' query_themes', array( 'slug' => $args['slug'] ));200 $api = new Themes_API( 'theme_information', $request ); 183 201 $api = $api->response; 184 202 185 if ( is_wp_error( $api ) ) {203 if ( empty( $api ) ) { 186 204 wp_send_json_error(); 187 205 }
Note: See TracChangeset
for help on using the changeset viewer.