Make WordPress Core

Changeset 33080


Ignore:
Timestamp:
07/04/2015 04:00:48 AM (9 years ago)
Author:
jeremyfelt
Message:

Only output Save Changes in My Sites when a user is a member of more than one site.

The conditional also checks for the existence of filters that may otherwise alter the HTML in My Sites to include extra form inputs for these users. If a filter is in use, the Save Changes button will display.

Props @Oxymoron, @obenland.
Fixes #32645.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/my-sites.php

    r33072 r33080  
    114114    }?>
    115115    </ul>
    116     <input type="hidden" name="action" value="updateblogsettings" />
    117     <?php wp_nonce_field( 'update-my-sites' ); ?>
    118     <?php submit_button(); ?>
     116    <?php
     117    if ( count( $blogs ) > 1 || has_action( 'myblogs_allblogs_options' ) || has_filter( 'myblogs_options' ) ) {
     118        ?><input type="hidden" name="action" value="updateblogsettings" /><?php
     119        wp_nonce_field( 'update-my-sites' );
     120        submit_button();
     121    }
     122    ?>
    119123    </form>
    120124<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.