Opened 17 years ago
Closed 17 years ago
#7111 closed defect (bug) (fixed)
widgets.php in "/wp-admin/includes/" has no final PHP end tag
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.6 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | General | Keywords: | coding convention, end tags |
| Focuses: | Cc: |
Description
The "wp-admin/includes/widget.php" file (changeset 7979) does not have a final PHP end tag ("?>"). Is this on purpose? Or, if not, are there any functions that are missing?
http://trac.wordpress.org/browser/trunk/wp-admin/includes/widgets.php
The last 15 or so lines:
273 <?php
274 if ( empty($sidebar_args['_display']) || 'template' != $sidebar_args['_display'] )
275 echo $sidebar_args['after_widget'];
276 return $sidebar_args;
277 }
278
279 function wp_widget_control_ob_filter( $string ) {
280 if ( false === $beg = strpos( $string, '%BEG_OF_TITLE%' ) )
281 return '';
282 if ( false === $end = strpos( $string, '%END_OF_TITLE%' ) )
283 return '';
284 $string = substr( $string, $beg + 14 , $end - $beg - 14);
285 $string = str_replace( ' ', ' ', $string );
286 return trim( wp_specialchars( strip_tags( $string ) ) );
287 }
288
That's it.
Compare:
http://trac.wordpress.org/browser/trunk/wp-admin/includes/widgets.php?rev=7978 (from changeset 7964)
Change History (4)
Note: See
TracTickets for help on using
tickets.
It is ok in PHP to leave off the final closing ?>, however, it does make it difficult for some people to tell the entire file is there..