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.


git-svn-id: https://develop.svn.wordpress.org/trunk@33080 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jeremy Felt 2015-07-04 04:00:48 +00:00
parent e03c9a769a
commit 4a785cbeb0
1 changed files with 7 additions and 3 deletions

View File

@ -113,9 +113,13 @@ else :
echo "</li>";
}?>
</ul>
<input type="hidden" name="action" value="updateblogsettings" />
<?php wp_nonce_field( 'update-my-sites' ); ?>
<?php submit_button(); ?>
<?php
if ( count( $blogs ) > 1 || has_action( 'myblogs_allblogs_options' ) || has_filter( 'myblogs_options' ) ) {
?><input type="hidden" name="action" value="updateblogsettings" /><?php
wp_nonce_field( 'update-my-sites' );
submit_button();
}
?>
</form>
<?php endif; ?>
</div>