/**
* @output wp-admin/js/comment.js
*/
/* global postboxes */
/**
* Binds to the document ready event.
*
* @since 2.5.0
*
* @param {jQuery} $ The jQuery object.
*/
jQuery( function($) {
postboxes.add_postbox_toggles('comment');
var $timestampdiv = $('#timestampdiv'),
$timestamp = $( '#timestamp' ),
stamp = $timestamp.html(),
$timestampwrap = $timestampdiv.find( '.timestamp-wrap' ),
$edittimestamp = $timestampdiv.siblings( 'a.edit-timestamp' );
/**
* Adds event that opens the time stamp form if the form is hidden.
*
* @listens $edittimestamp:click
*
* @param {Event} event The event object.
* @return {void}
*/
$edittimestamp.on( 'click', function( event ) {
if ( $timestampdiv.is( ':hidden' ) ) {
// Slide down the form and set focus on the first field.
$timestampdiv.slideDown( 'fast', function() {
$( 'input, select', $timestampwrap ).first().trigger( 'focus' );
} );
$(this).hide();
}
event.preventDefault();
});
/**
* Resets the time stamp values when the cancel button is clicked.
*
* @listens .cancel-timestamp:click
*
* @param {Event} event The event object.
* @return {void}
*/
$timestampdiv.find('.cancel-timestamp').on( 'click', function( event ) {
// Move focus back to the Edit link.
$edittimestamp.show().trigger( 'focus' );
$timestampdiv.slideUp( 'fast' );
$('#mm').val($('#hidden_mm').val());
$('#jj').val($('#hidden_jj').val());
$('#aa').val($('#hidden_aa').val());
$('#hh').val($('#hidden_hh').val());
$('#mn').val($('#hidden_mn').val());
$timestamp.html( stamp );
event.preventDefault();
});
/**
* Sets the time stamp values when the ok button is clicked.
*
* @listens .save-timestamp:click
*
* @param {Event} event The event object.
* @return {void}
*/
$timestampdiv.find('.save-timestamp').on( 'click', function( event ) { // Crazyhorse branch - multiple OK cancels.
var aa = $('#aa').val(), mm = $('#mm').val(), jj = $('#jj').val(), hh = $('#hh').val(), mn = $('#mn').val(),
newD = new Date( aa, mm - 1, jj, hh, mn );
event.preventDefault();
if ( newD.getFullYear() != aa || (1 + newD.getMonth()) != mm || newD.getDate() != jj || newD.getMinutes() != mn ) {
$timestampwrap.addClass( 'form-invalid' );
return;
} else {
$timestampwrap.removeClass( 'form-invalid' );
}
$timestamp.html(
wp.i18n.__( 'Submitted on:' ) + ' <b>' +
/* translators: 1: Month, 2: Day, 3: Year, 4: Hour, 5: Minute. */
wp.i18n.__( '%1$s %2$s, %3$s at %4$s:%5$s' )
.replace( '%1$s', $( 'option[value="' + mm + '"]', '#mm' ).attr( 'data-text' ) )
.replace( '%2$s', parseInt( jj, 10 ) )
.replace( '%3$s', aa )
.replace( '%4$s', ( '00' + hh ).slice( -2 ) )
.replace( '%5$s', ( '00' + mn ).slice( -2 ) ) +
'</b> '
);
// Move focus back to the Edit link.
$edittimestamp.show().trigger( 'focus' );
$timestampdiv.slideUp( 'fast' );
});
var $commentparentdiv = $( '#comment-parent-div' ),
$commentparentdisplay = $( '#comment-parent-display' ),
originalcommentparentdisplay = $commentparentdisplay.html(),
$editcommentparent = $commentparentdiv.siblings( 'a.edit-comment-parent' );
/**
* Adds event that opens the parent comment form if the form is hidden.
*
* @since 7.1.0
*
* @listens $editcommentparent:click
*
* @param {Event} event The event object.
* @return {void}
*/
$editcommentparent.on( 'click', function( event ) {
if ( $commentparentdiv.is( ':hidden' ) ) {
// Slide down the form and set focus on the parent field.
$commentparentdiv.slideDown( 'fast', function() {
$( '#comment_parent' ).trigger( 'focus' );
} );
$(this).hide();
}
event.preventDefault();
});
/**
* Resets the parent comment value when the cancel button is clicked.
*
* @since 7.1.0
*
* @listens .cancel-comment-parent:click
*
* @param {Event} event The event object.
* @return {void}
*/
$commentparentdiv.find( '.cancel-comment-parent' ).on( 'click', function( event ) {
// Move focus back to the Edit link.
$editcommentparent.show().trigger( 'focus' );
$commentparentdiv.slideUp( 'fast' );
$( '#comment_parent' ).val( $( '#hidden_comment_parent' ).val() );
$commentparentdisplay.html( originalcommentparentdisplay );
event.preventDefault();
});
/**
* Updates the parent comment display when the ok button is clicked.
*
* @since 7.1.0
*
* @listens .save-comment-parent:click
*
* @param {Event} event The event object.
* @return {void}
*/
$commentparentdiv.find( '.save-comment-parent' ).on( 'click', function( event ) {
var $selected = $( '#comment_parent option:selected' ),
parentLabel = '0' === $selected.val() ?
/* translators: Displayed when a comment has no parent. */
wp.i18n.__( 'None' ) :
$selected.data( 'author' ) || $selected.text();
event.preventDefault();
$commentparentdisplay.html(
wp.i18n.sprintf(
/* translators: %s: Parent comment link, or 'None'. */
wp.i18n.__( 'In reply to: %s' ),
$( '<b />' ).text( parentLabel ).prop( 'outerHTML' )
)
);
// Move focus back to the Edit link.
$editcommentparent.show().trigger( 'focus' );
$commentparentdiv.slideUp( 'fast' );
});
});
| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| widgets/ | 2026-02-23 19:41 | 136.14 KB | 76129f60960:kunden | dxwrx-rx-r | |
| accordion.js | 2026-02-23 19:41 | 2.86 KB | 76129f60960:kunden | -xw-x----- | |
| accordion.min.js | 2026-02-23 19:41 | 758 B | 76129f60960:kunden | -xw-x----- | |
| application-passwords.js | 2026-02-23 19:41 | 6.24 KB | 76129f60960:kunden | -xw-x----- | |
| application-passwords.min.js | 2026-02-23 19:41 | 2.95 KB | 76129f60960:kunden | -xw-x----- | |
| auth-app.js | 2026-02-23 19:41 | 5.66 KB | 76129f60960:kunden | -xw-x----- | |
| auth-app.min.js | 2026-02-23 19:41 | 2.04 KB | 76129f60960:kunden | -xw-x----- | |
| code-editor.js | 2026-05-21 09:11 | 17.54 KB | 76129f60960:kunden | -xw-x--x-- | |
| code-editor.min.js | 2026-05-21 09:11 | 3.46 KB | 76129f60960:kunden | -xw-x--x-- | |
| color-picker.js | 2026-02-23 19:41 | 9.54 KB | 76129f60960:kunden | -xw-x----- | |
| color-picker.min.js | 2026-02-23 19:41 | 3.4 KB | 76129f60960:kunden | -xw-x----- | |
| comment.js | 2026-08-20 11:46 | 5.08 KB | 76129f60960:kunden | -xw-x----- | |
| comment.min.js | 2026-08-20 11:46 | 2.03 KB | 76129f60960:kunden | -xw-x----- | |
| common.js | 2026-10-07 00:30 | 68.79 KB | 76129f60960:kunden | -xw-x--x-- | |
| common.min.js | 2026-10-07 00:30 | 25.61 KB | 76129f60960:kunden | -xw-x--x-- | |
| custom-background.js | 2026-02-23 19:41 | 3.35 KB | 76129f60960:kunden | -xw-x----- | |
| custom-background.min.js | 2026-02-23 19:41 | 1.18 KB | 76129f60960:kunden | -xw-x----- | |
| custom-header.js | 2026-02-23 19:41 | 1.98 KB | 76129f60960:kunden | -xw-x----- | |
| customize-controls.js | 2026-08-20 11:46 | 288.97 KB | 76129f60960:kunden | -xw-x----- | |
| customize-controls.min.js | 2026-08-20 11:46 | 109.9 KB | 76129f60960:kunden | -xw-x----- | |
| customize-nav-menus.js | 2026-08-20 11:46 | 111.46 KB | 76129f60960:kunden | -xw-x----- | |
| customize-nav-menus.min.js | 2026-02-23 19:41 | 47.14 KB | 76129f60960:kunden | -xw-x----- | |
| customize-widgets.js | 2026-02-23 19:41 | 70.05 KB | 76129f60960:kunden | -xw-x----- | |
| customize-widgets.min.js | 2026-02-23 19:41 | 27.41 KB | 76129f60960:kunden | -xw-x----- | |
| dashboard.js | 2026-08-20 11:46 | 26.92 KB | 76129f60960:kunden | -xw-x----- | |
| dashboard.min.js | 2026-08-20 11:46 | 8.51 KB | 76129f60960:kunden | -xw-x----- | |
| edit-comments.js | 2026-05-21 09:11 | 37.25 KB | 76129f60960:kunden | -xw-x--x-- | |
| edit-comments.min.js | 2026-05-21 09:11 | 15.15 KB | 76129f60960:kunden | -xw-x--x-- | |
| editor-expand.js | 2026-02-23 19:41 | 41.61 KB | 76129f60960:kunden | -xw-x----- | |
| editor-expand.min.js | 2026-02-23 19:41 | 13.14 KB | 76129f60960:kunden | -xw-x----- | |
| editor.js | 2026-02-23 19:41 | 44 KB | 76129f60960:kunden | -xw-x----- | |
| editor.min.js | 2026-02-23 19:41 | 12.78 KB | 76129f60960:kunden | -xw-x----- | |
| farbtastic.js | 2026-02-23 19:41 | 7.67 KB | 76129f60960:kunden | -xw-x----- | |
| gallery.js | 2026-02-23 19:41 | 5.41 KB | 76129f60960:kunden | -xw-x----- | |
| gallery.min.js | 2026-02-23 19:41 | 3.65 KB | 76129f60960:kunden | -xw-x----- | |
| image-edit.js | 2026-02-23 19:41 | 39.98 KB | 76129f60960:kunden | -xw-x----- | |
| image-edit.min.js | 2026-02-23 19:41 | 15.15 KB | 76129f60960:kunden | -xw-x----- | |
| inline-edit-post.js | 2026-08-20 11:46 | 20.19 KB | 76129f60960:kunden | -xw-x--x-- | |
| inline-edit-post.min.js | 2026-08-20 11:46 | 9.36 KB | 76129f60960:kunden | -xw-x--x-- | |
| inline-edit-tax.js | 2026-02-23 19:41 | 7.61 KB | 76129f60960:kunden | -xw-x----- | |
| inline-edit-tax.min.js | 2026-02-23 19:41 | 2.93 KB | 76129f60960:kunden | -xw-x----- | |
| iris.min.js | 2026-02-23 19:41 | 23.09 KB | 76129f60960:kunden | -xw-x----- | |
| language-chooser.js | 2026-02-23 19:41 | 890 B | 76129f60960:kunden | -xw-x----- | |
| language-chooser.min.js | 2026-02-23 19:41 | 423 B | 76129f60960:kunden | -xw-x----- | |
| link.js | 2026-05-21 09:11 | 4.76 KB | 76129f60960:kunden | -xw-x--x-- | |
| link.min.js | 2026-05-21 09:11 | 2.26 KB | 76129f60960:kunden | -xw-x--x-- | |
| media-gallery.js | 2026-02-23 19:41 | 1.27 KB | 76129f60960:kunden | -xw-x----- | |
| media-gallery.min.js | 2026-02-23 19:41 | 611 B | 76129f60960:kunden | -xw-x----- | |
| media-upload.js | 2026-02-23 19:41 | 3.38 KB | 76129f60960:kunden | -xw-x----- | |
| media-upload.min.js | 2026-02-23 19:41 | 1.13 KB | 76129f60960:kunden | -xw-x----- | |
| media.js | 2026-02-23 19:41 | 6.61 KB | 76129f60960:kunden | -xw-x----- | |
| media.min.js | 2026-02-23 19:41 | 2.38 KB | 76129f60960:kunden | -xw-x----- | |
| nav-menu.js | 2026-02-23 19:41 | 61.15 KB | 76129f60960:kunden | -xw-x----- | |
| nav-menu.min.js | 2026-02-23 19:41 | 30.06 KB | 76129f60960:kunden | -xw-x----- | |
| password-strength-meter.js | 2026-02-23 19:41 | 4.14 KB | 76129f60960:kunden | -xw-x----- | |
| password-strength-meter.min.js | 2026-02-23 19:41 | 1.1 KB | 76129f60960:kunden | -xw-x----- | |
| password-toggle.js | 2026-02-23 19:41 | 1.31 KB | 76129f60960:kunden | -xw-x----- | |
| password-toggle.min.js | 2026-02-23 19:41 | 847 B | 76129f60960:kunden | -xw-x----- | |
| plugin-install.js | 2026-08-20 11:46 | 6.92 KB | 76129f60960:kunden | -xw-x----- | |
| plugin-install.min.js | 2026-08-20 11:46 | 2.35 KB | 76129f60960:kunden | -xw-x----- | |
| post.js | 2026-08-20 11:46 | 39.54 KB | 76129f60960:kunden | -xw-x--x-- | |
| post.min.js | 2026-08-20 11:46 | 18.96 KB | 76129f60960:kunden | -xw-x--x-- | |
| postbox.js | 2026-02-23 19:41 | 18.49 KB | 76129f60960:kunden | -xw-x----- | |
| postbox.min.js | 2026-02-23 19:41 | 6.6 KB | 76129f60960:kunden | -xw-x----- | |
| privacy-tools.js | 2026-08-20 11:46 | 10.88 KB | 76129f60960:kunden | -xw-x----- | |
| privacy-tools.min.js | 2026-08-20 11:46 | 5.07 KB | 76129f60960:kunden | -xw-x----- | |
| revisions.js | 2026-02-23 19:41 | 33.92 KB | 76129f60960:kunden | -xw-x----- | |
| revisions.min.js | 2026-02-23 19:41 | 17.97 KB | 76129f60960:kunden | -xw-x----- | |
| set-post-thumbnail.js | 2026-02-23 19:41 | 876 B | 76129f60960:kunden | -xw-x----- | |
| set-post-thumbnail.min.js | 2026-02-23 19:41 | 620 B | 76129f60960:kunden | -xw-x----- | |
| site-health.js | 2026-05-21 09:11 | 13.55 KB | 76129f60960:kunden | -xw-x--x-- | |
| site-health.min.js | 2026-05-21 09:11 | 6.32 KB | 76129f60960:kunden | -xw-x--x-- | |
| site-icon.js | 2026-08-20 11:46 | 6.69 KB | 76129f60960:kunden | -xw-x----- | |
| site-icon.min.js | 2026-08-20 11:46 | 2.47 KB | 76129f60960:kunden | -xw-x----- | |
| svg-painter.js | 2026-02-23 19:41 | 3.2 KB | 76129f60960:kunden | -xw-x----- | |
| svg-painter.min.js | 2026-02-23 19:41 | 1.53 KB | 76129f60960:kunden | -xw-x----- | |
| tags-box.js | 2026-02-23 19:41 | 10.88 KB | 76129f60960:kunden | -xw-x----- | |
| tags-box.min.js | 2026-02-23 19:41 | 3 KB | 76129f60960:kunden | -xw-x----- | |
| tags-suggest.js | 2026-02-23 19:41 | 5.64 KB | 76129f60960:kunden | -xw-x----- | |
| tags-suggest.min.js | 2026-02-23 19:41 | 2.22 KB | 76129f60960:kunden | -xw-x----- | |
| tags.js | 2026-08-20 11:46 | 7.66 KB | 76129f60960:kunden | -xw-x----- | |
| tags.min.js | 2026-08-20 11:46 | 3.04 KB | 76129f60960:kunden | -xw-x----- | |
| theme-plugin-editor.js | 2026-05-21 09:11 | 25.56 KB | 76129f60960:kunden | -xw-x--x-- | |
| theme-plugin-editor.min.js | 2026-05-21 09:11 | 11.82 KB | 76129f60960:kunden | -xw-x--x-- | |
| theme.js | 2026-09-18 04:01 | 56.07 KB | 76129f60960:kunden | -xw-x--x-- | |
| theme.min.js | 2026-09-18 04:01 | 26.91 KB | 76129f60960:kunden | -xw-x--x-- | |
| updates.js | 2026-02-23 19:41 | 109.37 KB | 76129f60960:kunden | -xw-x----- | |
| updates.min.js | 2026-02-23 19:41 | 47.31 KB | 76129f60960:kunden | -xw-x----- | |
| user-profile.js | 2026-08-20 11:46 | 17.74 KB | 76129f60960:kunden | -xw-x----- | |
| user-profile.min.js | 2026-08-20 11:46 | 7.73 KB | 76129f60960:kunden | -xw-x----- | |
| user-suggest.js | 2026-02-23 19:41 | 2.25 KB | 76129f60960:kunden | -xw-x----- | |
| user-suggest.min.js | 2026-02-23 19:41 | 676 B | 76129f60960:kunden | -xw-x----- | |
| widgets.js | 2026-02-23 19:41 | 22.56 KB | 76129f60960:kunden | -xw-x----- | |
| widgets.min.js | 2026-02-23 19:41 | 12.31 KB | 76129f60960:kunden | -xw-x----- | |
| word-count.js | 2026-02-23 19:41 | 7.52 KB | 76129f60960:kunden | -xw-x----- | |
| word-count.min.js | 2026-02-23 19:41 | 1.49 KB | 76129f60960:kunden | -xw-x----- | |
| xfn.js | 2026-02-23 19:41 | 740 B | 76129f60960:kunden | -xw-x----- | |
| xfn.min.js | 2026-02-23 19:41 | 458 B | 76129f60960:kunden | -xw-x----- | |