Changeset 44260 for trunk/src/wp-admin/includes/post.php
- Timestamp:
- 12/17/2018 03:51:08 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43861,43863
- Property svn:mergeinfo changed
-
trunk/src/wp-admin/includes/post.php
r44243 r44260 2113 2113 'slug' => 'common', 2114 2114 'title' => __( 'Common Blocks' ), 2115 'icon' => 'screenoptions',2115 'icon' => null, 2116 2116 ), 2117 2117 array( … … 2215 2215 <?php the_block_editor_meta_box_post_form_hidden_fields( $post ); ?> 2216 2216 </form> 2217 <form id="toggle-custom-fields-form" method="post" action="<?php echo esc_attr( admin_url( 'post.php' ) ); ?>"> 2218 <?php wp_nonce_field( 'toggle-custom-fields' ); ?> 2219 <input type="hidden" name="action" value="toggle-custom-fields" /> 2220 </form> 2217 2221 <?php foreach ( $locations as $location ) : ?> 2218 2222 <form class="metabox-location-<?php echo esc_attr( $location ); ?>" onsubmit="return false;"> … … 2290 2294 } 2291 2295 2296 /** 2297 * If the 'postcustom' meta box is enabled, then we need to perform some 2298 * extra initialization on it. 2299 */ 2300 $enable_custom_fields = (bool) get_user_meta( get_current_user_id(), 'enable_custom_fields', true ); 2301 if ( $enable_custom_fields ) { 2302 $script = "( function( $ ) { 2303 if ( $('#postcustom').length ) { 2304 $( '#the-list' ).wpList( { 2305 addBefore: function( s ) { 2306 s.data += '&post_id=$post->ID'; 2307 return s; 2308 }, 2309 addAfter: function() { 2310 $('table#list-table').show(); 2311 } 2312 }); 2313 } 2314 } )( jQuery );"; 2315 wp_enqueue_script( 'wp-lists' ); 2316 wp_add_inline_script( 'wp-lists', $script ); 2317 } 2318 2292 2319 // Reset meta box data. 2293 2320 $wp_meta_boxes = $_original_meta_boxes;
Note: See TracChangeset
for help on using the changeset viewer.