Make WordPress Core


Ignore:
Timestamp:
01/12/2010 09:11:52 PM (15 years ago)
Author:
wpmuguru
Message:

merge multisite admin - edit links,tags,cats,options, See #11644

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin

    • Property svn:ignore set to
      .categories.php.swp
  • trunk/wp-admin/options-permalink.php

    r12546 r12712  
    8383        if (! empty($permalink_structure) )
    8484            $permalink_structure = preg_replace('#/+#', '/', '/' . $_POST['permalink_structure']);
     85        if ( is_multisite() && !is_subdomain_install()  && $permalink_structure != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) {
     86            $permalink_structure = '/blog' . $permalink_structure;
     87        }
    8588        $wp_rewrite->set_permalink_structure($permalink_structure);
    8689    }
     
    9093        if (! empty($category_base) )
    9194            $category_base = preg_replace('#/+#', '/', '/' . $_POST['category_base']);
     95        if ( is_miltisite() && !is_subdomain_install() && $category_base != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) {
     96            $category_base = '/blog' . $category_base;
     97        }
    9298        $wp_rewrite->set_category_base($category_base);
    9399    }
     
    97103        if (! empty($tag_base) )
    98104            $tag_base = preg_replace('#/+#', '/', '/' . $_POST['tag_base']);
     105        if ( is_multisite() && !is_subdomain_install() && $tag_base != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) {
     106            $tag_base = '/blog' . $tag_base;
     107        }
    99108        $wp_rewrite->set_tag_base($tag_base);
    100109    }
     
    195204        </th>
    196205        <td>
     206            <?php if ( is_multisite() && !is_subdomain_install() && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $permalink_structure = str_replace( "/blog", "", $permalink_structure ); }?>
    197207            <input name="permalink_structure" id="permalink_structure" type="text" value="<?php echo esc_attr($permalink_structure); ?>" class="regular-text code" />
    198208        </td>
     
    210220    <tr>
    211221        <th><label for="category_base"><?php _e('Category base'); ?></label></th>
    212         <td><input name="category_base" id="category_base" type="text" value="<?php echo esc_attr($category_base); ?>" class="regular-text code" /></td>
     222        <td><?php if ( is_multisite() && !is_subdomain_install() && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $category_base = str_replace( "/blog", "", $category_base ); }?> <input name="category_base" id="category_base" type="text" value="<?php echo esc_attr( $category_base ); ?>" class="regular-text code" /></td>
    213223    </tr>
    214224    <tr>
    215225        <th><label for="tag_base"><?php _e('Tag base'); ?></label></th>
    216         <td><input name="tag_base" id="tag_base" type="text" value="<?php echo esc_attr($tag_base); ?>" class="regular-text code" /></td>
     226        <td><?php if ( is_multisite() && !is_subdomain_install() && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $tag_base = str_replace( "/blog", "", $tag_base ); }?> <input name="tag_base" id="tag_base" type="text" value="<?php echo esc_attr($tag_base); ?>" class="regular-text code" /></td>
    217227    </tr>
    218228    <?php do_settings_fields('permalink', 'optional'); ?>
     
    225235</p>
    226236  </form>
     237<?php if ( !is_multisite || is_super_admin() ) { ?>
    227238<?php if ($iis7_permalinks) :
    228239    if ( isset($_POST['submit']) && $permalink_structure && ! $usingpi && ! $writable ) :
     
    252263    <?php endif; ?>
    253264<?php endif; ?>
     265<?php } // multisite ?>
    254266
    255267</div>
Note: See TracChangeset for help on using the changeset viewer.