Make WordPress Core


Ignore:
Timestamp:
10/21/2010 05:06:52 PM (14 years ago)
Author:
nacin
Message:

Network admin theme install. props PeteMall, fixes #15184.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/theme-install.php

    r15727 r15898  
    7878?>
    7979<h4><?php _e('Feature Filter') ?></h4>
    80 <form method="post" action="<?php echo admin_url( 'theme-install.php?tab=search' ); ?>">
     80<form method="post" action="<?php echo self_admin_url( 'theme-install.php?tab=search' ); ?>">
    8181<p class="install-help"><?php _e('Find a theme based on specific features') ?></p>
    8282    <?php
     
    117117<h4><?php _e('Install a theme in .zip format') ?></h4>
    118118<p class="install-help"><?php _e('If you have a theme in a .zip format, you may install it by uploading it here.') ?></p>
    119 <form method="post" enctype="multipart/form-data" action="<?php echo admin_url('update.php?action=upload-theme') ?>">
     119<form method="post" enctype="multipart/form-data" action="<?php echo self_admin_url('update.php?action=upload-theme') ?>">
    120120    <?php wp_nonce_field( 'theme-upload') ?>
    121121    <input type="file" name="themezip" />
     
    141141    if ( !is_array($actions) ) {
    142142        $actions = array();
    143         $actions[] = '<a href="' . admin_url('theme-install.php?tab=theme-information&amp;theme=' . $theme->slug .
     143        $actions[] = '<a href="' . self_admin_url('theme-install.php?tab=theme-information&amp;theme=' . $theme->slug .
    144144                                        '&amp;TB_iframe=true&amp;tbWidth=500&amp;tbHeight=385') . '" class="thickbox thickbox-preview onclick" title="' . esc_attr(sprintf(__('Install &#8220;%s&#8221;'), $name)) . '">' . __('Install') . '</a>';
    145         $actions[] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview onclick previewlink" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $name)) . '">' . __('Preview') . '</a>';
     145        if ( !is_network_admin() )
     146            $actions[] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview onclick previewlink" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $name)) . '">' . __('Preview') . '</a>';
    146147        $actions = apply_filters('theme_install_action_links', $actions, $theme);
    147148    }
     
    289290case 'install':
    290291    if ( current_user_can('install_themes') ) :
    291     $buttons .= '<a class="button-primary" id="install" href="' . wp_nonce_url(admin_url('update.php?action=install-theme&theme=' . $api->slug), 'install-theme_' . $api->slug) . '" target="_parent">' . __('Install Now') . '</a>';
     292    $buttons .= '<a class="button-primary" id="install" href="' . wp_nonce_url(self_admin_url('update.php?action=install-theme&theme=' . $api->slug), 'install-theme_' . $api->slug) . '" target="_parent">' . __('Install Now') . '</a>';
    292293    endif;
    293294    break;
    294295case 'update_available':
    295296    if ( current_user_can('update_themes') ) :
    296     $buttons .= '<a class="button-primary" id="install" href="' . wp_nonce_url(admin_url('update.php?action=upgrade-theme&theme=' . $update_file), 'upgrade-theme_' . $update_file) . '" target="_parent">' . __('Install Update Now') . '</a>';
     297    $buttons .= '<a class="button-primary" id="install" href="' . wp_nonce_url(self_admin_url('update.php?action=upgrade-theme&theme=' . $update_file), 'upgrade-theme_' . $update_file) . '" target="_parent">' . __('Install Update Now') . '</a>';
    297298    endif;
    298299    break;
Note: See TracChangeset for help on using the changeset viewer.