Changes from trunk/wp-admin/includes/post.php at r10150 to branches/2.7/wp-admin/includes/post.php at r10257
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.7/wp-admin/includes/post.php
r10150 r10257 229 229 $post_data = &$_POST; 230 230 231 if ( 'page' == $post_data['post_type'] ) {231 if ( isset($post_data['post_type']) && 'page' == $post_data['post_type'] ) { 232 232 if ( ! current_user_can( 'edit_pages' ) ) 233 233 wp_die( __('You are not allowed to edit pages.') ); … … 237 237 } 238 238 239 $post_IDs = array_map( intval, (array) $post_data['post'] );239 $post_IDs = array_map( 'intval', (array) $post_data['post'] ); 240 240 241 241 $reset = array( 'post_author', 'post_status', 'post_password', 'post_parent', 'page_template', 'comment_status', 'ping_status', 'keep_private', 'tags_input', 'post_category', 'sticky' ); … … 910 910 } 911 911 912 $post->filter = 'sample'; 913 912 914 $permalink = get_permalink($post, true); 913 915 … … 927 929 $post->post_date = $original_date; 928 930 $post->post_name = $original_name; 931 unset($post->filter); 932 929 933 return $permalink; 930 934 } … … 1162 1166 if ( ! empty($mce_external_languages) ) { 1163 1167 foreach ( $mce_external_languages as $name => $path ) { 1164 if ( is_file($path) &&is_readable($path) ) {1168 if ( @is_file($path) && @is_readable($path) ) { 1165 1169 include_once($path); 1166 $ext_plugins .= $strings ;1170 $ext_plugins .= $strings . "\n"; 1167 1171 $loaded_langs[] = $name; 1168 1172 } … … 1185 1189 $path = trailingslashit( realpath($path) ); 1186 1190 1187 if ( is_file($path . $mce_locale . '.js') )1188 $strings .= @file_get_contents($path . $mce_locale . '.js') ;1189 1190 if ( is_file($path . $mce_locale . '_dlg.js') )1191 $strings .= @file_get_contents($path . $mce_locale . '_dlg.js') ;1191 if ( @is_file($path . $mce_locale . '.js') ) 1192 $strings .= @file_get_contents($path . $mce_locale . '.js') . "\n"; 1193 1194 if ( @is_file($path . $mce_locale . '_dlg.js') ) 1195 $strings .= @file_get_contents($path . $mce_locale . '_dlg.js') . "\n"; 1192 1196 1193 1197 if ( 'en' != $mce_locale && empty($strings) ) { 1194 if ( is_file($path . 'en.js') ) {1198 if ( @is_file($path . 'en.js') ) { 1195 1199 $str1 = @file_get_contents($path . 'en.js'); 1196 $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 ) ;1200 $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 ) . "\n"; 1197 1201 } 1198 1202 1199 if ( is_file($path . 'en_dlg.js') ) {1203 if ( @is_file($path . 'en_dlg.js') ) { 1200 1204 $str2 = @file_get_contents($path . 'en_dlg.js'); 1201 $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str2, 1 ) ;1205 $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str2, 1 ) . "\n"; 1202 1206 } 1203 1207 }
Note: See TracChangeset
for help on using the changeset viewer.