: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$( 'table.widefat .spinner' ).removeClass( 'is-active' );
if ( -1 !== r.indexOf( '<tr' ) ) {
$(inlineEditPost.what+id).siblings('tr.hidden').addBack().remove();
$('#edit-'+id).before(r).remove();
$( inlineEditPost.what + id ).hide().fadeIn( 400, function() {
// Move focus back to the Quick Edit button. $( this ) is the row being animated.
$( this ).find( '.editinline' )
.attr( 'aria-expanded', 'false' )
wp.a11y.speak( wp.i18n.__( 'Changes saved.' ) );
r = r.replace( /<.[^<>]*?>/g, '' );
$errorNotice.removeClass( 'hidden' );
wp.a11y.speak( $error.text() );
$errorNotice.removeClass( 'hidden' );
$error.text( wp.i18n.__( 'Error while saving the changes.' ) );
wp.a11y.speak( wp.i18n.__( 'Error while saving the changes.' ) );
// Prevent submitting the form when pressing Enter on a focused field.
* Hides and empties the Quick Edit and/or Bulk Edit windows.
* @memberof inlineEditPost
* @return {boolean} Always returns false.
var $tableWideFat = $( '.widefat' ),
id = $( '.inline-editor', $tableWideFat ).attr( 'id' );
$( '.spinner', $tableWideFat ).removeClass( 'is-active' );
if ( 'bulk-edit' === id ) {
$( '#bulk-edit', $tableWideFat ).removeClass( 'inline-editor' ).hide().siblings( '.hidden' ).remove();
$('#bulk-titles').empty();
// Store the empty bulk editor in a hidden element.
$('#inlineedit').append( $('#bulk-edit') );
// Move focus back to the Bulk Action button that was activated.
$( '#' + inlineEditPost.whichBulkButtonId ).trigger( 'focus' );
// Remove both the inline-editor and its hidden tr siblings.
$('#'+id).siblings('tr.hidden').addBack().remove();
id = id.substr( id.lastIndexOf('-') + 1 );
// Show the post row and move focus back to the Quick Edit button.
$( this.what + id ).show().find( '.editinline' )
.attr( 'aria-expanded', 'false' )
* Gets the ID for a the post that you want to quick edit from the row in the quick
* @memberof inlineEditPost
* @param {Object} o DOM row object to get the ID for.
* @return {string} The post ID extracted from the table row in the object.
var id = $(o).closest('tr').attr('id'),
return parts[parts.length - 1];
$( function() { inlineEditPost.init(); } );
// Show/hide locks on posts.
// Set the heartbeat interval to 15 seconds.
if ( typeof wp !== 'undefined' && wp.heartbeat ) {
wp.heartbeat.interval( 15 );
}).on( 'heartbeat-tick.wp-check-locked-posts', function( e, data ) {
var locked = data['wp-check-locked-posts'] || {};
$('#the-list tr').each( function(i, el) {
var key = el.id, row = $(el), lock_data, avatar;
if ( locked.hasOwnProperty( key ) ) {
if ( ! row.hasClass('wp-locked') ) {
row.find('.column-title .locked-text').text( lock_data.text );
row.find('.check-column checkbox').prop('checked', false);
if ( lock_data.avatar_src ) {
'class': 'avatar avatar-18 photo',
src: lock_data.avatar_src,
srcset: lock_data.avatar_src_2x ? lock_data.avatar_src_2x + ' 2x' : undefined
row.find('.column-title .locked-avatar').empty().append( avatar );
row.addClass('wp-locked');
} else if ( row.hasClass('wp-locked') ) {
row.removeClass( 'wp-locked' ).find( '.locked-info span' ).empty();
}).on( 'heartbeat-send.wp-check-locked-posts', function( e, data ) {
$('#the-list tr').each( function(i, el) {
data['wp-check-locked-posts'] = check;