Ticket #20027: 20027.patch
| File 20027.patch, 6.9 KB (added by , 14 years ago) |
|---|
-
wp-includes/update.php
248 248 $exclude_fields = array('Template Files', 'Stylesheet Files', 'Status', 'Theme Root', 'Theme Root URI', 'Template Dir', 'Stylesheet Dir', 'Description', 'Tags', 'Screenshot'); 249 249 250 250 // Put slug of current theme into request. 251 $themes['current_theme'] = get_ option( 'stylesheet');251 $themes['current_theme'] = get_stylesheet(); 252 252 253 253 foreach ( (array) $installed_themes as $theme_title => $theme ) { 254 254 $themes[$theme['Stylesheet']] = array(); -
wp-includes/theme.php
522 522 523 523 if ( $themes ) { 524 524 $theme_names = array_keys( $themes ); 525 $current_template = get_ option( 'template');526 $current_stylesheet = get_ option( 'stylesheet');525 $current_template = get_template(); 526 $current_stylesheet = get_stylesheet(); 527 527 528 528 foreach ( (array) $theme_names as $theme_name ) { 529 529 if ( $themes[$theme_name]['Stylesheet'] == $current_stylesheet && … … 713 713 714 714 // If requesting the root for the current theme, consult options to avoid calling get_theme_roots() 715 715 if ( !$no_cache ) { 716 if ( get_ option('stylesheet') == $stylesheet_or_template )716 if ( get_stylesheet() == $stylesheet_or_template ) 717 717 $theme_root = get_option('stylesheet_root'); 718 elseif ( get_ option('template') == $stylesheet_or_template )718 elseif ( get_template() == $stylesheet_or_template ) 719 719 $theme_root = get_option('template_root'); 720 720 } 721 721 … … 1318 1318 * @return array Theme modifications. 1319 1319 */ 1320 1320 function get_theme_mods() { 1321 $theme_slug = get_ option( 'stylesheet');1321 $theme_slug = get_stylesheet(); 1322 1322 if ( false === ( $mods = get_option( "theme_mods_$theme_slug" ) ) ) { 1323 1323 $theme_name = get_current_theme(); 1324 1324 $mods = get_option( "mods_$theme_name" ); // Deprecated location. … … 1370 1370 1371 1371 $mods[ $name ] = $value; 1372 1372 1373 $theme = get_ option( 'stylesheet');1373 $theme = get_stylesheet(); 1374 1374 update_option( "theme_mods_$theme", $mods ); 1375 1375 } 1376 1376 … … 1396 1396 if ( empty( $mods ) ) 1397 1397 return remove_theme_mods(); 1398 1398 1399 $theme = get_ option( 'stylesheet');1399 $theme = get_stylesheet(); 1400 1400 update_option( "theme_mods_$theme", $mods ); 1401 1401 } 1402 1402 … … 1406 1406 * @since 2.1.0 1407 1407 */ 1408 1408 function remove_theme_mods() { 1409 delete_option( 'theme_mods_' . get_ option( 'stylesheet') );1409 delete_option( 'theme_mods_' . get_stylesheet() ); 1410 1410 delete_option( 'mods_' . get_current_theme() ); 1411 1411 } 1412 1412 … … 1565 1565 $header_images = array(); 1566 1566 1567 1567 // @todo caching 1568 $headers = get_posts( array( 'post_type' => 'attachment', 'meta_key' => '_wp_attachment_is_custom_header', 'meta_value' => get_ option('stylesheet'), 'orderby' => 'none', 'nopaging' => true ) );1568 $headers = get_posts( array( 'post_type' => 'attachment', 'meta_key' => '_wp_attachment_is_custom_header', 'meta_value' => get_stylesheet(), 'orderby' => 'none', 'nopaging' => true ) ); 1569 1569 1570 1570 if ( empty( $headers ) ) 1571 1571 return array(); -
wp-admin/includes/class-wp-ms-themes-list-table.php
287 287 if ( current_user_can('edit_themes') ) 288 288 $actions['edit'] = '<a href="' . esc_url('theme-editor.php?theme=' . urlencode( $theme['Name'] )) . '" title="' . esc_attr__('Open this theme in the Theme Editor') . '" class="edit">' . __('Edit') . '</a>'; 289 289 290 if ( empty( $theme['enabled'] ) && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $theme_key != get_ option( 'stylesheet' ) && $theme_key != get_option( 'template') )290 if ( empty( $theme['enabled'] ) && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $theme_key != get_stylesheet() && $theme_key != get_template() ) 291 291 $actions['delete'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=delete-selected&checked[]=' . $theme_key . '&theme_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-themes' ) ) . '" title="' . esc_attr__( 'Delete this theme' ) . '" class="delete">' . __( 'Delete' ) . '</a>'; 292 292 293 293 $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme_key, $theme, $context ); -
wp-admin/includes/schema.php
841 841 return $errors; 842 842 843 843 // set up site tables 844 $template = get_ option( 'template');845 $stylesheet = get_ option( 'stylesheet');844 $template = get_template(); 845 $stylesheet = get_stylesheet(); 846 846 $allowed_themes = array( $stylesheet => true ); 847 847 if ( $template != $stylesheet ) 848 848 $allowed_themes[ $template ] = true; -
wp-admin/includes/template.php
1485 1485 1486 1486 function _media_states( $post ) { 1487 1487 $media_states = array(); 1488 $stylesheet = get_ option('stylesheet');1488 $stylesheet = get_stylesheet(); 1489 1489 1490 1490 if ( current_theme_supports( 'custom-header') ) { 1491 1491 $meta_header = get_post_meta($post->ID, '_wp_attachment_is_custom_header', true ); -
wp-admin/theme-editor.php
241 241 <?php } ?> 242 242 243 243 <div> 244 <?php if ( is_child_theme() && ! $is_child_theme && $themes[$theme]['Template'] == get_ option('template') ) : ?>244 <?php if ( is_child_theme() && ! $is_child_theme && $themes[$theme]['Template'] == get_template() ) : ?> 245 245 <p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?> 246 246 <?php _e( 'This is a file in your current parent theme.' ); ?></p> 247 247 <?php endif; ?> -
wp-admin/network/themes.php
110 110 111 111 $themes = isset( $_REQUEST['checked'] ) ? (array) $_REQUEST['checked'] : array(); 112 112 113 if ( isset( $themes[ get_ option( 'template') ] ) )114 unset( $themes[ get_ option( 'template') ] );115 if ( isset( $themes[ get_ option( 'stylesheet') ] ) )116 unset( $themes[ get_ option( 'stylesheet') ] );113 if ( isset( $themes[ get_template() ] ) ) 114 unset( $themes[ get_template() ] ); 115 if ( isset( $themes[ get_stylesheet() ] ) ) 116 unset( $themes[ get_stylesheet() ] ); 117 117 118 118 if ( empty( $themes ) ) { 119 119 wp_safe_redirect( add_query_arg( 'error', 'none', $referer ) );