Ticket #2902: wp_die.2.diff
| File wp_die.2.diff, 7.1 kB (added by Sewar, 2 years ago) |
|---|
-
Sewar/PHP/WordPress/SVN/wp-admin/bookmarklet.php
old new 3 3 require_once('admin.php'); 4 4 5 5 if ( ! current_user_can('edit_posts') ) 6 die ("Cheatin' uh?");6 wp_die(__('Cheatin’ uh?')); 7 7 8 8 if ('b' == $a): 9 9 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -
Sewar/PHP/WordPress/SVN/wp-admin/categories.php
old new 13 13 check_admin_referer('add-category'); 14 14 15 15 if ( !current_user_can('manage_categories') ) 16 die(__('Cheatin’ uh?'));16 wp_die(__('Cheatin’ uh?')); 17 17 18 18 wp_insert_category($_POST); 19 19 … … 25 25 check_admin_referer('delete-category_' . $cat_ID); 26 26 27 27 if ( !current_user_can('manage_categories') ) 28 die(__('Cheatin’ uh?'));28 wp_die(__('Cheatin’ uh?')); 29 29 30 30 $cat_name = get_catname($cat_ID); 31 31 … … 56 56 check_admin_referer('update-category_' . $cat_ID); 57 57 58 58 if ( !current_user_can('manage_categories') ) 59 die(__('Cheatin’ uh?'));59 wp_die(__('Cheatin’ uh?')); 60 60 61 61 wp_update_category($_POST); 62 62 -
Sewar/PHP/WordPress/SVN/wp-admin/link-import.php
old new 16 16 { 17 17 include_once('admin-header.php'); 18 18 if ( !current_user_can('manage_links') ) 19 die (__("Cheatin’ uh?"));19 wp_die(__('Cheatin’ uh?')); 20 20 21 21 $opmltype = 'blogrolling'; // default. 22 22 ?> … … 68 68 69 69 include_once('admin-header.php'); 70 70 if ( !current_user_can('manage_links') ) 71 die (__("Cheatin' uh ?"));71 wp_die(__('Cheatin’ uh?')); 72 72 ?> 73 73 <div class="wrap"> 74 74 -
Sewar/PHP/WordPress/SVN/wp-admin/link.php
old new 18 18 19 19 // check the current user's level first. 20 20 if (!current_user_can('manage_links')) 21 wp_die(__( "Cheatin' uh ?"));21 wp_die(__('Cheatin’ uh?')); 22 22 23 23 //for each link id (in $linkcheck[]) change category to selected value 24 24 if (count($linkcheck) == 0) { … … 42 42 43 43 // check the current user's level first. 44 44 if (!current_user_can('manage_links')) 45 wp_die(__( "Cheatin' uh ?"));45 wp_die(__('Cheatin’ uh?')); 46 46 47 47 //for each link id (in $linkcheck[]) change category to selected value 48 48 if (count($linkcheck) == 0) { … … 79 79 check_admin_referer('delete-bookmark_' . $link_id); 80 80 81 81 if (!current_user_can('manage_links')) 82 wp_die(__( "Cheatin' uh ?"));82 wp_die(__('Cheatin’ uh?')); 83 83 84 84 wp_delete_link($link_id); 85 85 -
Sewar/PHP/WordPress/SVN/wp-admin/options.php
old new 8 8 wp_reset_vars(array('action')); 9 9 10 10 if ( !current_user_can('manage_options') ) 11 die ( __('Cheatin’ uh?'));11 wp_die(__('Cheatin’ uh?')); 12 12 13 13 switch($action) { 14 14 -
Sewar/PHP/WordPress/SVN/wp-admin/sidebar.php
old new 4 4 require_once('admin.php'); 5 5 6 6 if ( ! current_user_can('edit_posts') ) 7 die ("Cheatin' uh ?");7 wp_die(__('Cheatin’ uh?')); 8 8 9 9 if ('b' == $_GET['a']) { 10 10 -
Sewar/PHP/WordPress/SVN/wp-admin/update-links.php
old new 8 8 $link_uris = $wpdb->get_col("SELECT link_url FROM $wpdb->links"); 9 9 10 10 if ( !$link_uris ) 11 wp_die( 'No links');11 wp_die(__('No links')); 12 12 13 13 $link_uris = urlencode( join( $link_uris, "\n" ) ); 14 14 -
Sewar/PHP/WordPress/SVN/wp-includes/functions.php
old new 1117 1117 } 1118 1118 1119 1119 function wp_die($message) { 1120 global $wpdb;1121 1122 if ( !$wpdb->show_errors )1123 return false;1124 1120 header('Content-Type: text/html; charset=utf-8'); 1125 1121 1126 $output = <<<HEAD 1127 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">1128 <html xmlns="http://www.w3.org/1999/xhtml">1129 <head>1130 <title>WordPress › Error</title>1131 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />1132 <style media="screen" type="text/css">1133 <!--1134 html {1135 background: #eee;1136 }1137 body {1138 background: #fff;1139 color: #000;1140 font-family: Georgia, "Times New Roman", Times, serif;1141 margin-left: 25%;1142 margin-right: 25%;1143 padding: .2em 2em;1144 }1122 ?> 1123 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 1124 <html xmlns="http://www.w3.org/1999/xhtml"> 1125 <head> 1126 <title>WordPress › <?php _e('Error'); ?></title> 1127 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 1128 <style media="screen" type="text/css"> 1129 <!-- 1130 html { 1131 background: #eee; 1132 } 1133 body { 1134 background: #fff; 1135 color: #000; 1136 font-family: Georgia, "Times New Roman", Times, serif; 1137 margin-left: 25%; 1138 margin-right: 25%; 1139 padding: .2em 2em; 1140 } 1145 1141 1146 h1 {1147 color: #006;1148 font-size: 18px;1149 font-weight: lighter;1150 }1142 h1 { 1143 color: #006; 1144 font-size: 18px; 1145 font-weight: lighter; 1146 } 1151 1147 1152 h2 {1153 font-size: 16px;1154 }1148 h2 { 1149 font-size: 16px; 1150 } 1155 1151 1156 p, li, dt {1157 line-height: 140%;1158 padding-bottom: 2px;1159 }1152 p, li, dt { 1153 line-height: 140%; 1154 padding-bottom: 2px; 1155 } 1160 1156 1161 ul, ol {1162 padding: 5px 5px 5px 20px;1163 }1164 #logo {1165 margin-bottom: 2em;1166 }1167 -->1168 </style>1169 </head>1170 <body>1171 <h1 id="logo"><img alt="WordPress" src=" ../wp-admin/images/wordpress-logo.png" /></h1>1172 <p> $message</p>1173 </body>1174 </html>1175 HEAD; 1157 ul, ol { 1158 padding: 5px 5px 5px 20px; 1159 } 1160 #logo { 1161 margin-bottom: 2em; 1162 } 1163 --> 1164 </style> 1165 </head> 1166 <body> 1167 <h1 id="logo"><img alt="WordPress" src="<?php echo ABSPATH; ?>/wp-admin/images/wordpress-logo.png" /></h1> 1168 <p><?php echo $message; ?></p> 1169 </body> 1170 </html> 1171 <?php 1176 1172 1177 $output = apply_filters('wp_die', $output, $message);1178 echo $output;1179 1180 1173 die(); 1181 1174 } 1182 1175
