Changeset 12053 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/parsed-content.php
- Timestamp:
- 09/05/2022 08:21:02 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/parsed-content.php
r7815 r12053 99 99 <div class="wporg_parsed_readonly <?php echo $ticket ? 'hidden' : ''; ?>"><?php echo apply_filters( 'the_content', $content ); ?></div> 100 100 <div class="wporg_parsed_content <?php echo $ticket ? '' : 'hidden'; ?>"> 101 <?php wp_editor( $content, 'content', array( 102 'media_buttons' => false, 103 'tinymce' => false, 104 'quicktags' => true, 105 'textarea_rows' => 10, 106 'textarea_name' => 'content', 107 ) ); ?> 101 <?php wp_editor( 102 $content, 103 'content', 104 array( 105 'media_buttons' => false, 106 'tinymce' => false, 107 'quicktags' => true, 108 'textarea_rows' => 10, 109 'textarea_name' => 'content', 110 ) 111 ); ?> 108 112 </div> 109 113 </td> … … 164 168 // Only enqueue 'wporg-parsed-content' script and styles on Code Reference post type screens. 165 169 if ( in_array( get_current_screen()->id, $this->post_types ) ) { 166 wp_enqueue_script( 'wporg-parsed-content', get_template_directory_uri() . '/js/parsed-content.js', array( 'jquery', 'utils' ), '20150824', true ); 167 168 wp_localize_script( 'wporg-parsed-content', 'wporgParsedContent', array( 169 'ajaxURL' => admin_url( 'admin-ajax.php' ), 170 'searchText' => __( 'Searching ...', 'wporg' ), 171 'retryText' => __( 'Invalid ticket number, please try again.', 'wporg' ) 172 ) ); 170 wp_enqueue_script( 171 'wporg-parsed-content', 172 get_template_directory_uri() . '/js/parsed-content.js', 173 array( 'jquery', 'utils' ), 174 filemtime( dirname( __DIR__ ) . '/js/parsed-content.js' ), 175 true 176 ); 177 178 wp_localize_script( 179 'wporg-parsed-content', 180 'wporgParsedContent', 181 array( 182 'ajaxURL' => admin_url( 'admin-ajax.php' ), 183 'searchText' => __( 'Searching ...', 'wporg' ), 184 'retryText' => __( 'Invalid ticket number, please try again.', 'wporg' ), 185 ) 186 ); 173 187 } 174 188 } … … 200 214 201 215 $nodes = $doc->getElementsByTagName( 'title' ); 202 $title = $nodes->item( 0)->nodeValue;216 $title = $nodes->item( 0 )->nodeValue; 203 217 204 218 // Strip off the site name. … … 213 227 update_post_meta( $post_id, 'wporg_ticket_title', $title ); 214 228 215 $link = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $ticket_url ), apply_filters( 'the_title', $title ) );229 $link = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $ticket_url ), apply_filters( 'the_title', $title ) ); 216 230 217 231 // Can haz success.
Note: See TracChangeset
for help on using the changeset viewer.