Changeset 11571
- Timestamp:
- 02/17/2022 08:05:05 AM (3 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php
r11529 r11571 41 41 42 42 wp_enqueue_script( 'wporg-support-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20181209', true ); 43 wp_enqueue_script( 'wporg-support-forums', get_template_directory_uri() . '/js/forums.js', array( 'jquery' ), '202 10407', true );43 wp_enqueue_script( 'wporg-support-forums', get_template_directory_uri() . '/js/forums.js', array( 'jquery' ), '20220217', true ); 44 44 45 45 wp_localize_script( -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/js/forums.js
r10876 r11571 55 55 56 56 $this.val( 57 val.substr( 0, $this.prop('selectionStart') ) + // Text before cu sor/selection57 val.substr( 0, $this.prop('selectionStart') ) + // Text before cursor/selection 58 58 "`" + paste + "`" + // The pasted text, wrapping with ` 59 59 val.substr( $this.prop('selectionEnd'), val.length ) // Text after cursor position/selection … … 64 64 65 65 if ( $( 'body' ).is( '.bbp-view' ) ) { 66 $( '.bbp- body .bbp-admin-links a' ).click( function( e ) {66 $( '.bbp-admin-links a' ).click( function( e ) { 67 67 var $this = $( this ), 68 $element = $this.closest( '.bbp-body' ), 69 $content = $element.find( '.bbp-topic-content' ), 68 $element = $this.parents('.reply,.topic'), 70 69 type; 71 70 72 71 // Don't affect open-in-new-tab. 73 if ( e.metaKey || e.ctrlKey || e. which === 2) {72 if ( e.metaKey || e.ctrlKey || e.shiftKey ) { 74 73 return; 75 74 } … … 90 89 91 90 $.get( $this.prop( 'href' ) ).done( function() { 92 $ content.append(91 $this.parent().before( 93 92 '<div class="bbp-template-notice">' + wporgSupport.strings[ type ] + '</div>' 94 93 ); 95 94 96 // Remove actions.97 $this.parent().find('a:not(.bbp-topic-edit-link)').remove();98 99 95 $element.fadeTo( 250, 1 ); 100 } ). error( function() {101 $ content.append(96 } ).fail( function() { 97 $this.parent().before( 102 98 '<div class="bbp-template-notice">' + wporgSupport.strings.action_failed + '</div>' 103 99 );
Note: See TracChangeset
for help on using the changeset viewer.