~ubuntu-branches/debian/jessie/wordpress/jessie

« back to all changes in this revision

Viewing changes to wp-admin/network/sites.php

  • Committer: Package Import Robot
  • Author(s): Craig Small
  • Date: 2014-04-17 20:56:19 UTC
  • mfrom: (1.2.35)
  • Revision ID: package-import@ubuntu.com-20140417205619-nurbet6eho4yvwfv
Tags: 3.9+dfsg-1
* New upstream release
* 3.9 seems to handle different locations for plugins so the
  plugin directory handling patches have been cut back.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
get_current_screen()->set_help_sidebar(
44
44
        '<p><strong>' . __('For more information:') . '</strong></p>' .
45
45
        '<p>' . __('<a href="http://codex.wordpress.org/Network_Admin_Sites_Screen" target="_blank">Documentation on Site Management</a>') . '</p>' .
46
 
        '<p>' . __('<a href="http://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
 
46
        '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
47
47
);
48
48
 
49
49
$id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
59
59
                        nocache_headers();
60
60
                        header( 'Content-Type: text/html; charset=utf-8' );
61
61
                }
62
 
                if ( $current_site->blog_id == $id )
 
62
 
 
63
                if ( $current_site->blog_id == $id ) {
63
64
                        wp_die( __( 'You are not allowed to change the current site.' ) );
 
65
                }
 
66
 
 
67
                require_once( ABSPATH . 'wp-admin/admin-header.php' );
64
68
                ?>
65
 
                <!DOCTYPE html>
66
 
                <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
67
 
                        <head>
68
 
                                <meta name="viewport" content="width=device-width" />
69
 
                                <title><?php _e( 'WordPress &rsaquo; Confirm your action' ); ?></title>
70
 
 
71
 
                                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
72
 
                                <?php
73
 
                                wp_admin_css( 'install', true );
74
 
                                wp_admin_css( 'ie', true );
75
 
                                ?>
76
 
                        </head>
77
 
                        <body class="wp-core-ui">
78
 
                                <h1 id="logo"><a href="<?php echo esc_url( __( 'http://wordpress.org/' ) ); ?>"><?php _e( 'WordPress' ); ?></a></h1>
 
69
                        <div class="wrap">
 
70
                                <h2><?php _e( 'Confirm your action' ); ?></h2>
79
71
                                <form action="sites.php?action=<?php echo esc_attr( $_GET['action2'] ) ?>" method="post">
80
72
                                        <input type="hidden" name="action" value="<?php echo esc_attr( $_GET['action2'] ) ?>" />
81
73
                                        <input type="hidden" name="id" value="<?php echo esc_attr( $id ); ?>" />
82
74
                                        <input type="hidden" name="_wp_http_referer" value="<?php echo esc_attr( wp_get_referer() ); ?>" />
83
75
                                        <?php wp_nonce_field( $_GET['action2'], '_wpnonce', false ); ?>
84
76
                                        <p><?php echo esc_html( wp_unslash( $_GET['msg'] ) ); ?></p>
85
 
                                        <?php submit_button( __('Confirm'), 'button' ); ?>
 
77
                                        <?php submit_button( __( 'Confirm' ), 'button' ); ?>
86
78
                                </form>
87
 
                        </body>
88
 
                </html>
 
79
                        </div>
89
80
                <?php
 
81
                require_once( ABSPATH . 'wp-admin/admin-footer.php' );
90
82
                exit();
91
83
        }
92
84
 
152
144
 
153
145
                case 'activateblog':
154
146
                        update_blog_status( $id, 'deleted', '0' );
 
147
 
 
148
                        /**
 
149
                         * Fires after a network site is activated.
 
150
                         *
 
151
                         * @since MU
 
152
                         *
 
153
                         * @param string $id The ID of the activated site.
 
154
                         */
155
155
                        do_action( 'activate_blog', $id );
156
156
                break;
157
157
 
158
158
                case 'deactivateblog':
 
159
                        /**
 
160
                         * Fires before a network site is deactivated.
 
161
                         *
 
162
                         * @since MU
 
163
                         *
 
164
                         * @param string $id The ID of the site being deactivated.
 
165
                         */
159
166
                        do_action( 'deactivate_blog', $id );
160
167
                        update_blog_status( $id, 'deleted', '1' );
161
168
                break;
217
224
                        $msg = __( 'Site marked as spam.' );
218
225
                break;
219
226
                default:
 
227
                        /**
 
228
                         * Filter a specific, non-default site-updated message in the Network admin.
 
229
                         *
 
230
                         * The dynamic portion of the hook name, $_GET['updated'], refers to the non-default
 
231
                         * site update action.
 
232
                         *
 
233
                         * @since 3.1.0
 
234
                         *
 
235
                         * @param string $msg The update message. Default 'Settings saved'.
 
236
                         */
220
237
                        $msg = apply_filters( 'network_sites_updated_message_' . $_GET['updated'], __( 'Settings saved.' ) );
221
238
                break;
222
239
        }