[wp-trac] [WordPress Trac] #17657: Shortcode regex doesn't allow for hyphens in shortcode name
WordPress Trac
wp-trac at lists.automattic.com
Fri Jul 20 07:36:42 UTC 2012
#17657: Shortcode regex doesn't allow for hyphens in shortcode name
------------------------------------------------------+--------------------
Reporter: sivel | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.5
Component: Shortcodes | Version: 2.9.2
Severity: normal | Resolution:
Keywords: has-patch needs-testing needs-unit-tests |
------------------------------------------------------+--------------------
Comment (by kovshenin):
Replying to [comment:10 nacin]:
> Any noticeable performance difference?
Nope.
{{{
$shortcodes = '[my] [my-shortcode] [my-shortcode-tag] [my-shortcode-tag-
tag]';
$duration = array();
for ( $i = 0; $i < 10; $i++ ) {
$start = microtime( true );
for ( $j = 0; $j < 10000; $j++ ) {
do_shortcode( $shortcodes );
strip_shortcodes( $shortcodes );
}
$end = microtime( true );
$duration[] = $end - $start;
}
printf( "Duration: %f with %f on average.", array_sum( $duration ),
array_sum( $duration ) / count( $duration ) );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17657#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list