~nick-moffitt/wordpress/wordpress-upstream

« back to all changes in this revision

Viewing changes to wp-admin/widgets.php

  • Committer: Nick Moffitt
  • Date: 2015-01-15 11:04:26 UTC
  • Revision ID: nick.moffitt@canonical.com-20150115110426-5stm1p14cfnxrtme
New Upstream Version 4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
require_once(ABSPATH . 'wp-admin/includes/widgets.php');
14
14
 
15
15
if ( ! current_user_can('edit_theme_options') )
16
 
        wp_die( __( 'Cheatin’ uh?' ));
 
16
        wp_die( __( 'Cheatin’ uh?' ), 403 );
17
17
 
18
18
$widgets_access = get_user_setting( 'widgets_access' );
19
19
if ( isset($_GET['widgets-access']) ) {
310
310
require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
311
311
 
312
312
<div class="wrap">
313
 
<h2><?php echo esc_html( $title ); ?></h2>
 
313
<h2>
 
314
<?php
 
315
        echo esc_html( $title );
 
316
        if ( current_user_can( 'customize' ) ) {
 
317
                printf(
 
318
                        ' <a class="add-new-h2 hide-if-no-customize" href="%1$s">%2$s</a>',
 
319
                        admin_url( 'customize.php?autofocus[panel]=widgets' ),
 
320
                        __( 'Manage in Customizer' )
 
321
                );
 
322
        }
 
323
?>
 
324
</h2>
314
325
 
315
326
<?php if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) { ?>
316
327
<div id="message" class="updated"><p><?php echo $messages[$_GET['message']]; ?></p></div>