Changeset 6456 for trunk/src/includes/admin/admin.php
- Timestamp:
- 06/01/2017 09:54:54 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/admin.php
r6438 r6456 101 101 */ 102 102 private function setup_globals() { 103 $bbp = bbpress();103 $bbp = bbpress(); 104 104 $this->admin_dir = trailingslashit( $bbp->includes_dir . 'admin' ); // Admin path 105 105 $this->admin_url = trailingslashit( $bbp->includes_url . 'admin' ); // Admin url … … 122 122 require $this->admin_dir . 'tools.php'; 123 123 require $this->admin_dir . 'tools/common.php'; 124 require $this->admin_dir . 'tools/converter.php'; 124 125 require $this->admin_dir . 'tools/repair.php'; 125 126 require $this->admin_dir . 'tools/upgrades.php'; … … 128 129 129 130 // Components 130 require $this->admin_dir . 'converter.php';131 131 require $this->admin_dir . 'settings.php'; 132 132 require $this->admin_dir . 'common.php'; … … 136 136 require $this->admin_dir . 'replies.php'; 137 137 require $this->admin_dir . 'users.php'; 138 139 // Converter 140 require $this->admin_dir . 'classes/class-bbp-converter-base.php'; 141 require $this->admin_dir . 'classes/class-bbp-converter.php'; 138 142 } 139 143 … … 236 240 // Forums Tools Root 237 241 add_management_page( 238 __( 'Forums', 'bbpress' ),239 __( 'Forums', 'bbpress' ),242 esc_html__( 'Forums', 'bbpress' ), 243 esc_html__( 'Forums', 'bbpress' ), 240 244 'bbp_tools_page', 241 245 'bbp-repair', … … 246 250 if ( 'basic' === bbp_settings_integration() ) { 247 251 add_options_page( 248 __( 'Forums', 'bbpress' ),249 __( 'Forums', 'bbpress' ),252 esc_html__( 'Forums', 'bbpress' ), 253 esc_html__( 'Forums', 'bbpress' ), 250 254 'bbp_settings_page', 251 255 'bbpress', … … 259 263 // About 260 264 add_dashboard_page( 261 __( 'Welcome to bbPress', 'bbpress' ),262 __( 'Welcome to bbPress', 'bbpress' ),265 esc_html__( 'Welcome to bbPress', 'bbpress' ), 266 esc_html__( 'Welcome to bbPress', 'bbpress' ), 263 267 'bbp_about_page', 264 268 'bbp-about', … … 268 272 // Credits 269 273 add_dashboard_page( 270 __( 'Welcome to bbPress', 'bbpress' ),271 __( 'Welcome to bbPress', 'bbpress' ),274 esc_html__( 'Welcome to bbPress', 'bbpress' ), 275 esc_html__( 'Welcome to bbPress', 'bbpress' ), 272 276 'bbp_about_page', 273 277 'bbp-credits', … … 283 287 add_submenu_page( 284 288 'index.php', 285 __( 'Update Forums', 'bbpress' ),286 __( 'Update Forums', 'bbpress' ),289 esc_html__( 'Update Forums', 'bbpress' ), 290 esc_html__( 'Update Forums', 'bbpress' ), 287 291 'manage_network', 288 292 'bbp-update', … … 307 311 add_submenu_page( 308 312 'upgrade.php', 309 __( 'Update Forums', 'bbpress' ),310 __( 'Update Forums', 'bbpress' ),313 esc_html__( 'Update Forums', 'bbpress' ), 314 esc_html__( 'Update Forums', 'bbpress' ), 311 315 'manage_network', 312 316 'bbpress-update', … … 1070 1074 <?php foreach ( (array) $blogs as $details ) : 1071 1075 1072 $siteurl = get_blog_option( $details['blog_id'], 'siteurl' ); ?> 1073 1074 <li><?php echo $siteurl; ?></li> 1076 // Get site URLs 1077 $site_url = get_site_url( $details['blog_id'] ); 1078 $admin_url = get_site_url( $details['blog_id'], 'wp-admin.php', 'admin' ); 1079 $remote_url = add_query_arg( array( 1080 'page' => 'bbp-update', 1081 'action' => 'bbp-update' 1082 ), $admin_url ); ?> 1083 1084 <li><?php echo esc_html( $site_url ); ?></li> 1075 1085 1076 1086 <?php … … 1078 1088 // Get the response of the bbPress update on this site 1079 1089 $response = wp_remote_get( 1080 trailingslashit( $siteurl ) . 'wp-admin/index.php?page=bbp-update&action=bbp-update', 1081 array( 'timeout' => 30, 'httpversion' => '1.1' ) 1090 $remote_url, 1091 array( 1092 'timeout' => 30, 1093 'httpversion' => '1.1' 1094 ) 1082 1095 ); 1083 1096 1084 1097 // Site errored out, no response? 1085 1098 if ( is_wp_error( $response ) ) { 1086 wp_die( sprintf( __( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: %2$s', 'bbpress' ), $siteurl, '<em>' . $response->get_error_message() . '</em>' ) );1099 wp_die( sprintf( esc_html__( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: %2$s', 'bbpress' ), $site_url, '<em>' . $response->get_error_message() . '</em>' ) ); 1087 1100 } 1088 1101
Note: See TracChangeset
for help on using the changeset viewer.