Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-admin/js
File: edit-comments.js
} else if ( action == 'add' ) {
[1000] Fix | Delete
$('#addhead, #addbtn', editRow).show();
[1001] Fix | Delete
$( '#replyhead, #replybtn, #edithead, #editlegend, #savebtn', editRow ) .hide();
[1002] Fix | Delete
$('#the-comment-list').prepend(editRow);
[1003] Fix | Delete
$('#replyrow').fadeIn(300);
[1004] Fix | Delete
} else {
[1005] Fix | Delete
replyButton = $('#replybtn', editRow);
[1006] Fix | Delete
$( '#edithead, #editlegend, #savebtn, #addhead, #addbtn', editRow ).hide();
[1007] Fix | Delete
$('#replyhead, #replybtn', editRow).show();
[1008] Fix | Delete
c.after(editRow);
[1009] Fix | Delete
[1010] Fix | Delete
if ( c.hasClass('unapproved') ) {
[1011] Fix | Delete
replyButton.text( __( 'Approve and Reply' ) );
[1012] Fix | Delete
} else {
[1013] Fix | Delete
replyButton.text( __( 'Reply' ) );
[1014] Fix | Delete
}
[1015] Fix | Delete
[1016] Fix | Delete
$('#replyrow').fadeIn(300, function(){ $(this).show(); });
[1017] Fix | Delete
}
[1018] Fix | Delete
[1019] Fix | Delete
setTimeout(function() {
[1020] Fix | Delete
var rtop, rbottom, scrollTop, vp, scrollBottom,
[1021] Fix | Delete
isComposing = false;
[1022] Fix | Delete
[1023] Fix | Delete
rtop = $('#replyrow').offset().top;
[1024] Fix | Delete
rbottom = rtop + $('#replyrow').height();
[1025] Fix | Delete
scrollTop = window.pageYOffset || document.documentElement.scrollTop;
[1026] Fix | Delete
vp = document.documentElement.clientHeight || window.innerHeight || 0;
[1027] Fix | Delete
scrollBottom = scrollTop + vp;
[1028] Fix | Delete
[1029] Fix | Delete
if ( scrollBottom - 20 < rbottom )
[1030] Fix | Delete
window.scroll(0, rbottom - vp + 35);
[1031] Fix | Delete
else if ( rtop - 20 < scrollTop )
[1032] Fix | Delete
window.scroll(0, rtop - 35);
[1033] Fix | Delete
[1034] Fix | Delete
$( '#replycontent' )
[1035] Fix | Delete
.trigger( 'focus' )
[1036] Fix | Delete
.on( 'keyup', function( e ) {
[1037] Fix | Delete
// Close on Escape except when Input Method Editors (IMEs) are in use.
[1038] Fix | Delete
if ( e.which === 27 && ! isComposing ) {
[1039] Fix | Delete
commentReply.revert();
[1040] Fix | Delete
}
[1041] Fix | Delete
} )
[1042] Fix | Delete
.on( 'compositionstart', function() {
[1043] Fix | Delete
isComposing = true;
[1044] Fix | Delete
} );
[1045] Fix | Delete
}, 600);
[1046] Fix | Delete
[1047] Fix | Delete
return false;
[1048] Fix | Delete
},
[1049] Fix | Delete
[1050] Fix | Delete
/**
[1051] Fix | Delete
* Submits the comment quick edit or reply form.
[1052] Fix | Delete
*
[1053] Fix | Delete
* @since 2.7.0
[1054] Fix | Delete
*
[1055] Fix | Delete
* @memberof commentReply
[1056] Fix | Delete
*
[1057] Fix | Delete
* @return {void}
[1058] Fix | Delete
*/
[1059] Fix | Delete
send : function() {
[1060] Fix | Delete
var post = {},
[1061] Fix | Delete
$errorNotice = $( '#replysubmit .error-notice' );
[1062] Fix | Delete
[1063] Fix | Delete
$errorNotice.addClass( 'hidden' );
[1064] Fix | Delete
$( '#replysubmit .spinner' ).addClass( 'is-active' );
[1065] Fix | Delete
[1066] Fix | Delete
$('#replyrow input').not(':button').each(function() {
[1067] Fix | Delete
var t = $(this);
[1068] Fix | Delete
post[ t.attr('name') ] = t.val();
[1069] Fix | Delete
});
[1070] Fix | Delete
[1071] Fix | Delete
post.content = $('#replycontent').val();
[1072] Fix | Delete
post.id = post.comment_post_ID;
[1073] Fix | Delete
post.comments_listing = this.comments_listing;
[1074] Fix | Delete
post.p = $('[name="p"]').val();
[1075] Fix | Delete
[1076] Fix | Delete
if ( $('#comment-' + $('#comment_ID').val()).hasClass('unapproved') )
[1077] Fix | Delete
post.approve_parent = 1;
[1078] Fix | Delete
[1079] Fix | Delete
$.ajax({
[1080] Fix | Delete
type : 'POST',
[1081] Fix | Delete
url : ajaxurl,
[1082] Fix | Delete
data : post,
[1083] Fix | Delete
success : function(x) { commentReply.show(x); },
[1084] Fix | Delete
error : function(r) { commentReply.error(r); }
[1085] Fix | Delete
});
[1086] Fix | Delete
},
[1087] Fix | Delete
[1088] Fix | Delete
/**
[1089] Fix | Delete
* Shows the new or updated comment or reply.
[1090] Fix | Delete
*
[1091] Fix | Delete
* This function needs to be passed the ajax result as received from the server.
[1092] Fix | Delete
* It will handle the response and show the comment that has just been saved to
[1093] Fix | Delete
* the server.
[1094] Fix | Delete
*
[1095] Fix | Delete
* @since 2.7.0
[1096] Fix | Delete
*
[1097] Fix | Delete
* @memberof commentReply
[1098] Fix | Delete
*
[1099] Fix | Delete
* @param {Object} xml Ajax response object.
[1100] Fix | Delete
*
[1101] Fix | Delete
* @return {void}
[1102] Fix | Delete
*/
[1103] Fix | Delete
show : function(xml) {
[1104] Fix | Delete
var t = this, r, c, id, bg, pid;
[1105] Fix | Delete
[1106] Fix | Delete
if ( typeof(xml) == 'string' ) {
[1107] Fix | Delete
t.error({'responseText': xml});
[1108] Fix | Delete
return false;
[1109] Fix | Delete
}
[1110] Fix | Delete
[1111] Fix | Delete
r = wpAjax.parseAjaxResponse(xml);
[1112] Fix | Delete
if ( r.errors ) {
[1113] Fix | Delete
t.error({'responseText': wpAjax.broken});
[1114] Fix | Delete
return false;
[1115] Fix | Delete
}
[1116] Fix | Delete
[1117] Fix | Delete
t.revert();
[1118] Fix | Delete
[1119] Fix | Delete
r = r.responses[0];
[1120] Fix | Delete
id = '#comment-' + r.id;
[1121] Fix | Delete
[1122] Fix | Delete
if ( 'edit-comment' == t.act )
[1123] Fix | Delete
$(id).remove();
[1124] Fix | Delete
[1125] Fix | Delete
if ( r.supplemental.parent_approved ) {
[1126] Fix | Delete
pid = $('#comment-' + r.supplemental.parent_approved);
[1127] Fix | Delete
updatePending( -1, r.supplemental.parent_post_id );
[1128] Fix | Delete
[1129] Fix | Delete
if ( this.comments_listing == 'moderated' ) {
[1130] Fix | Delete
pid.animate( { 'backgroundColor':'#CCEEBB' }, 400, function(){
[1131] Fix | Delete
pid.fadeOut();
[1132] Fix | Delete
});
[1133] Fix | Delete
return;
[1134] Fix | Delete
}
[1135] Fix | Delete
}
[1136] Fix | Delete
[1137] Fix | Delete
if ( r.supplemental.i18n_comments_text ) {
[1138] Fix | Delete
updateDashboardText( r.supplemental );
[1139] Fix | Delete
updateInModerationText( r.supplemental );
[1140] Fix | Delete
updateApproved( 1, r.supplemental.parent_post_id );
[1141] Fix | Delete
updateCountText( 'span.all-count', 1 );
[1142] Fix | Delete
}
[1143] Fix | Delete
[1144] Fix | Delete
r.data = r.data || '';
[1145] Fix | Delete
c = r.data.toString().trim(); // Trim leading whitespaces.
[1146] Fix | Delete
$(c).hide();
[1147] Fix | Delete
$('#replyrow').after(c);
[1148] Fix | Delete
[1149] Fix | Delete
id = $(id);
[1150] Fix | Delete
t.addEvents(id);
[1151] Fix | Delete
bg = id.hasClass('unapproved') ? '#FFFFE0' : id.closest('.widefat, .postbox').css('backgroundColor');
[1152] Fix | Delete
[1153] Fix | Delete
id.animate( { 'backgroundColor':'#CCEEBB' }, 300 )
[1154] Fix | Delete
.animate( { 'backgroundColor': bg }, 300, function() {
[1155] Fix | Delete
if ( pid && pid.length ) {
[1156] Fix | Delete
pid.animate( { 'backgroundColor':'#CCEEBB' }, 300 )
[1157] Fix | Delete
.animate( { 'backgroundColor': bg }, 300 )
[1158] Fix | Delete
.removeClass('unapproved').addClass('approved')
[1159] Fix | Delete
.find('div.comment_status').html('1');
[1160] Fix | Delete
}
[1161] Fix | Delete
});
[1162] Fix | Delete
[1163] Fix | Delete
},
[1164] Fix | Delete
[1165] Fix | Delete
/**
[1166] Fix | Delete
* Shows an error for the failed comment update or reply.
[1167] Fix | Delete
*
[1168] Fix | Delete
* @since 2.7.0
[1169] Fix | Delete
*
[1170] Fix | Delete
* @memberof commentReply
[1171] Fix | Delete
*
[1172] Fix | Delete
* @param {string} r The Ajax response.
[1173] Fix | Delete
*
[1174] Fix | Delete
* @return {void}
[1175] Fix | Delete
*/
[1176] Fix | Delete
error : function(r) {
[1177] Fix | Delete
var er = r.statusText,
[1178] Fix | Delete
$errorNotice = $( '#replysubmit .notice-error' ),
[1179] Fix | Delete
$error = $errorNotice.find( '.error' );
[1180] Fix | Delete
[1181] Fix | Delete
$( '#replysubmit .spinner' ).removeClass( 'is-active' );
[1182] Fix | Delete
[1183] Fix | Delete
if ( r.responseText )
[1184] Fix | Delete
er = r.responseText.replace( /<.[^<>]*?>/g, '' );
[1185] Fix | Delete
[1186] Fix | Delete
if ( er ) {
[1187] Fix | Delete
$errorNotice.removeClass( 'hidden' );
[1188] Fix | Delete
$error.html( er );
[1189] Fix | Delete
}
[1190] Fix | Delete
},
[1191] Fix | Delete
[1192] Fix | Delete
/**
[1193] Fix | Delete
* Opens the add comments form in the comments metabox on the post edit page.
[1194] Fix | Delete
*
[1195] Fix | Delete
* @since 3.4.0
[1196] Fix | Delete
*
[1197] Fix | Delete
* @memberof commentReply
[1198] Fix | Delete
*
[1199] Fix | Delete
* @param {number} post_id The post ID.
[1200] Fix | Delete
*
[1201] Fix | Delete
* @return {void}
[1202] Fix | Delete
*/
[1203] Fix | Delete
addcomment: function(post_id) {
[1204] Fix | Delete
var t = this;
[1205] Fix | Delete
[1206] Fix | Delete
$('#add-new-comment').fadeOut(200, function(){
[1207] Fix | Delete
t.open(0, post_id, 'add');
[1208] Fix | Delete
$('table.comments-box').css('display', '');
[1209] Fix | Delete
$('#no-comments').remove();
[1210] Fix | Delete
});
[1211] Fix | Delete
},
[1212] Fix | Delete
[1213] Fix | Delete
/**
[1214] Fix | Delete
* Alert the user if they have unsaved changes on a comment that will be lost if
[1215] Fix | Delete
* they proceed with the intended action.
[1216] Fix | Delete
*
[1217] Fix | Delete
* @since 4.6.0
[1218] Fix | Delete
*
[1219] Fix | Delete
* @memberof commentReply
[1220] Fix | Delete
*
[1221] Fix | Delete
* @return {boolean} Whether it is safe the continue with the intended action.
[1222] Fix | Delete
*/
[1223] Fix | Delete
discardCommentChanges: function() {
[1224] Fix | Delete
var editRow = $( '#replyrow' );
[1225] Fix | Delete
[1226] Fix | Delete
if ( '' === $( '#replycontent', editRow ).val() || this.originalContent === $( '#replycontent', editRow ).val() ) {
[1227] Fix | Delete
return true;
[1228] Fix | Delete
}
[1229] Fix | Delete
[1230] Fix | Delete
return window.confirm( __( 'Are you sure you want to do this?\nThe comment changes you made will be lost.' ) );
[1231] Fix | Delete
}
[1232] Fix | Delete
};
[1233] Fix | Delete
[1234] Fix | Delete
$( function(){
[1235] Fix | Delete
var make_hotkeys_redirect, edit_comment, toggle_all, make_bulk;
[1236] Fix | Delete
[1237] Fix | Delete
setCommentsList();
[1238] Fix | Delete
commentReply.init();
[1239] Fix | Delete
[1240] Fix | Delete
$(document).on( 'click', 'span.delete a.delete', function( e ) {
[1241] Fix | Delete
e.preventDefault();
[1242] Fix | Delete
});
[1243] Fix | Delete
[1244] Fix | Delete
if ( typeof $.table_hotkeys != 'undefined' ) {
[1245] Fix | Delete
/**
[1246] Fix | Delete
* Creates a function that navigates to a previous or next page.
[1247] Fix | Delete
*
[1248] Fix | Delete
* @since 2.7.0
[1249] Fix | Delete
* @access private
[1250] Fix | Delete
*
[1251] Fix | Delete
* @param {string} which What page to navigate to: either next or prev.
[1252] Fix | Delete
*
[1253] Fix | Delete
* @return {Function} The function that executes the navigation.
[1254] Fix | Delete
*/
[1255] Fix | Delete
make_hotkeys_redirect = function(which) {
[1256] Fix | Delete
return function() {
[1257] Fix | Delete
var first_last, l;
[1258] Fix | Delete
[1259] Fix | Delete
first_last = 'next' == which? 'first' : 'last';
[1260] Fix | Delete
l = $('.tablenav-pages .'+which+'-page:not(.disabled)');
[1261] Fix | Delete
if (l.length)
[1262] Fix | Delete
window.location = l[0].href.replace(/\&hotkeys_highlight_(first|last)=1/g, '')+'&hotkeys_highlight_'+first_last+'=1';
[1263] Fix | Delete
};
[1264] Fix | Delete
};
[1265] Fix | Delete
[1266] Fix | Delete
/**
[1267] Fix | Delete
* Navigates to the edit page for the selected comment.
[1268] Fix | Delete
*
[1269] Fix | Delete
* @since 2.7.0
[1270] Fix | Delete
* @access private
[1271] Fix | Delete
*
[1272] Fix | Delete
* @param {Object} event The event that triggered this action.
[1273] Fix | Delete
* @param {Object} current_row A jQuery object of the selected row.
[1274] Fix | Delete
*
[1275] Fix | Delete
* @return {void}
[1276] Fix | Delete
*/
[1277] Fix | Delete
edit_comment = function(event, current_row) {
[1278] Fix | Delete
window.location = $('span.edit a', current_row).attr('href');
[1279] Fix | Delete
};
[1280] Fix | Delete
[1281] Fix | Delete
/**
[1282] Fix | Delete
* Toggles all comments on the screen, for bulk actions.
[1283] Fix | Delete
*
[1284] Fix | Delete
* @since 2.7.0
[1285] Fix | Delete
* @access private
[1286] Fix | Delete
*
[1287] Fix | Delete
* @return {void}
[1288] Fix | Delete
*/
[1289] Fix | Delete
toggle_all = function() {
[1290] Fix | Delete
$('#cb-select-all-1').data( 'wp-toggle', 1 ).trigger( 'click' ).removeData( 'wp-toggle' );
[1291] Fix | Delete
};
[1292] Fix | Delete
[1293] Fix | Delete
/**
[1294] Fix | Delete
* Creates a bulk action function that is executed on all selected comments.
[1295] Fix | Delete
*
[1296] Fix | Delete
* @since 2.7.0
[1297] Fix | Delete
* @access private
[1298] Fix | Delete
*
[1299] Fix | Delete
* @param {string} value The name of the action to execute.
[1300] Fix | Delete
*
[1301] Fix | Delete
* @return {Function} The function that executes the bulk action.
[1302] Fix | Delete
*/
[1303] Fix | Delete
make_bulk = function(value) {
[1304] Fix | Delete
return function() {
[1305] Fix | Delete
var scope = $('select[name="action"]');
[1306] Fix | Delete
$('option[value="' + value + '"]', scope).prop('selected', true);
[1307] Fix | Delete
$('#doaction').trigger( 'click' );
[1308] Fix | Delete
};
[1309] Fix | Delete
};
[1310] Fix | Delete
[1311] Fix | Delete
$.table_hotkeys(
[1312] Fix | Delete
$('table.widefat'),
[1313] Fix | Delete
[
[1314] Fix | Delete
'a', 'u', 's', 'd', 'r', 'q', 'z',
[1315] Fix | Delete
['e', edit_comment],
[1316] Fix | Delete
['shift+x', toggle_all],
[1317] Fix | Delete
['shift+a', make_bulk('approve')],
[1318] Fix | Delete
['shift+s', make_bulk('spam')],
[1319] Fix | Delete
['shift+d', make_bulk('delete')],
[1320] Fix | Delete
['shift+t', make_bulk('trash')],
[1321] Fix | Delete
['shift+z', make_bulk('untrash')],
[1322] Fix | Delete
['shift+u', make_bulk('unapprove')]
[1323] Fix | Delete
],
[1324] Fix | Delete
{
[1325] Fix | Delete
highlight_first: adminCommentsSettings.hotkeys_highlight_first,
[1326] Fix | Delete
highlight_last: adminCommentsSettings.hotkeys_highlight_last,
[1327] Fix | Delete
prev_page_link_cb: make_hotkeys_redirect('prev'),
[1328] Fix | Delete
next_page_link_cb: make_hotkeys_redirect('next'),
[1329] Fix | Delete
hotkeys_opts: {
[1330] Fix | Delete
disableInInput: true,
[1331] Fix | Delete
type: 'keypress',
[1332] Fix | Delete
noDisable: '.check-column input[type="checkbox"]'
[1333] Fix | Delete
},
[1334] Fix | Delete
cycle_expr: '#the-comment-list tr',
[1335] Fix | Delete
start_row_index: 0
[1336] Fix | Delete
}
[1337] Fix | Delete
);
[1338] Fix | Delete
}
[1339] Fix | Delete
[1340] Fix | Delete
// Quick Edit and Reply have an inline comment editor.
[1341] Fix | Delete
$( '#the-comment-list' ).on( 'click', '.comment-inline', function() {
[1342] Fix | Delete
var $el = $( this ),
[1343] Fix | Delete
action = 'replyto';
[1344] Fix | Delete
[1345] Fix | Delete
if ( 'undefined' !== typeof $el.data( 'action' ) ) {
[1346] Fix | Delete
action = $el.data( 'action' );
[1347] Fix | Delete
}
[1348] Fix | Delete
[1349] Fix | Delete
$( this ).attr( 'aria-expanded', 'true' );
[1350] Fix | Delete
commentReply.open( $el.data( 'commentId' ), $el.data( 'postId' ), action );
[1351] Fix | Delete
} );
[1352] Fix | Delete
});
[1353] Fix | Delete
[1354] Fix | Delete
})(jQuery);
[1355] Fix | Delete
[1356] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function