Changeset 5661 for sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
- Timestamp:
- 07/12/2017 04:35:31 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
r5657 r5661 12 12 add_filter( 'pre_option__bbp_edit_lock', array( $this, 'increase_edit_lock_time' ) ); 13 13 add_filter( 'redirect_canonical', array( $this, 'disable_redirect_guess_404_permalink' ) ); 14 add_action( 'wp_print_footer_scripts', array( $this, 'replace_quicktags_blockquote_button' ) ); 14 15 15 16 // Gravatar suppression on lists of topics and revision logs. … … 118 119 119 120 return $redirect_url; 121 } 122 123 /** 124 * Replace Quicktags' blockquote button to remove extra line breaks 125 * before and after the tag. 126 */ 127 public function replace_quicktags_blockquote_button() { ?> 128 <script type="text/javascript"> 129 if ( 'undefined' !== typeof edButtons && 'undefined' !== QTags ) { 130 // Replace Quicktags' blockquote button. 131 edButtons[40] = new QTags.TagButton( 132 'block', // Button HTML ID. 133 'b-quote', // Button's value="...". 134 '<blockquote>', // Starting tag. 135 '</blockquote>', // Ending tag. 136 '', // Deprecated, not used. 137 '', // Button's title="...". 138 '', // Quicktags instance. 139 { // Additional attributes. 140 ariaLabel: quicktagsL10n.blockquote, 141 ariaLabelClose: quicktagsL10n.blockquoteClose 142 } 143 ); 144 } 145 </script> 146 <?php 120 147 } 121 148
Note: See TracChangeset
for help on using the changeset viewer.