/**
* @file Contains all dynamic functionality needed on post and term pages.
*
* @output wp-admin/js/post.js
*/
/* global ajaxurl, wpAjax, postboxes, pagenow, tinymce, alert, deleteUserSetting, ClipboardJS */
/* global theList:true, theExtraList:true, getUserSetting, setUserSetting, commentReply, commentsBox */
/* global WPSetThumbnailHTML, wptitlehint */
// Backward compatibility: prevent fatal errors.
window.makeSlugeditClickable = window.editPermalink = function(){};
// Make sure the wp object exists.
window.wp = window.wp || {};
( function( $ ) {
var titleHasFocus = false,
__ = wp.i18n.__;
/**
* Control loading of comments on the post and term edit pages.
*
* @type {{st: number, get: commentsBox.get, load: commentsBox.load}}
*
* @namespace commentsBox
*/
window.commentsBox = {
// Comment offset to use when fetching new comments.
st : 0,
/**
* Fetch comments using Ajax and display them in the box.
*
* @memberof commentsBox
*
* @param {number} total Total number of comments for this post.
* @param {number} num Optional. Number of comments to fetch, defaults to 20.
* @return {boolean} Always returns false.
*/
get : function(total, num) {
var st = this.st, data;
if ( ! num )
num = 20;
this.st += num;
this.total = total;
$( '#commentsdiv .spinner' ).addClass( 'is-active' );
data = {
'action' : 'get-comments',
'mode' : 'single',
'_ajax_nonce' : $('#add_comment_nonce').val(),
'p' : $('#post_ID').val(),
'start' : st,
'number' : num
};
$.post(
ajaxurl,
data,
function(r) {
r = wpAjax.parseAjaxResponse(r);
$('#commentsdiv .widefat').show();
$( '#commentsdiv .spinner' ).removeClass( 'is-active' );
if ( 'object' == typeof r && r.responses[0] ) {
$('#the-comment-list').append( r.responses[0].data );
theList = theExtraList = null;
$( 'a[className*=\':\']' ).off();
// If the offset is over the total number of comments we cannot fetch any more, so hide the button.
if ( commentsBox.st > commentsBox.total )
$('#show-comments').hide();
else
$('#show-comments').show().children('a').text( __( 'Show more comments' ) );
return;
} else if ( 1 == r ) {
$('#show-comments').text( __( 'No more comments found.' ) );
return;
}
$('#the-comment-list').append('
الإعلان ضمن المقال - جديد

الإعلان ضمن المقال – جديد فرصة ذهبية منذ هذه اللحظة ستستطيع معرفة بهارات رنجي اون لاين في ويبسايت مسبور والشرح والمقال يحتوي على كل أكثر البيانات جديدة لسنة 2023م. كذلك التخفيضات والحسومات وعشرات أكواد الخصم الفعّالة ، والشراء من المواقع وتوفير أموالكـ على كل طلبية لما تستخدم عشرات أكواد الخصم الفعّالة . انقر هنا واستعد […]

الإعلان ضمن المقال – جديد لا يفوتكـ من الآن تستطيع الإحاطة علماً بهارات رنجي مكة بمنصة مَسْبور والشرح والدليل يحتوي على جميع وكل أكثرية التفاصيل حديثة لهذه السنة 2023م. أيضاً الخصومات وعشرات كوبونات التخفيض الفعّالة ، وجلب مشترياتكـ من المؤسسات وتوفير مبالغ على كل ما تشتريه بواسطة عشرات كوبونات التخفيض الفعّالة . انقر هنا واستعد […]

الإعلان ضمن المقال – جديد حصري من تلكـ اللحظة ستستطيع الاطلاع على بهارات رنجي الخبر في السايت مسبور والدليل والشرح يحتوي على كل وجميع أكثر المعلومات مُجدّدة لهذا العام الميلادي 2023م. أضف إلى ذلك العروض والتخفيضات والحسومات وعشرات كوبونات الخصم الفعّالة ، وجلب مشترياتكـ من المؤسسات وتوفير مبلغ على كل ما ستشتريه بواسطة عشرات كوبونات […]
اضغط هنا واكتشف أسلوبك الجديد
وانغمس في عالم الموضة في متجر أمازون!
👗👠✨ احصل على إطلالة رائعة وتألق في كل مناسبة. 🛍️🌟
"اضغط هنا واكتشف أحدث صيحات الموضة في متجر نون!
👗👠 احصل على إطلالتك المثالية
وتسوّق أزيائك المفضلة الآن من متجر نون. 💃🛍️"