[wp-trac] [WordPress Trac] #18974: Plugin IDs can collide with core IDs

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 17 23:14:04 UTC 2011


#18974: Plugin IDs can collide with core IDs
----------------------------+----------------------------
 Reporter:  Viper007Bond    |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  low             |  Milestone:  Future Release
Component:  Administration  |    Version:  3.3
 Severity:  minor           |   Keywords:
----------------------------+----------------------------
 Go to Plugins > Add New and install my "Local Time" plugin.

 Go to Plugins > Installed Plugins. My plugin's details will show up in
 italics. This is because the table row is given the ID `local-time` (my
 plugin's slug) and core has this CSS:

 {{{
 #utc-time, #local-time {
         padding-left: 25px;
         font-style: italic;
         font-family: sans-serif;
 }
 }}}

 https://core.trac.wordpress.org/browser/tags/3.2.1/wp-admin/css/wp-
 admin.dev.css#L4287

 Targeting this in `options-general.php`:

 {{{
 <span id="local-time"><?php printf(__('Local time is <code>%1$s</code>'),
 date_i18n($timezone_format)); ?></span>
 }}}

 https://core.trac.wordpress.org/browser/tags/3.2.1/wp-admin/options-
 general.php#L167

 I'm not quite sure why core is using an ID instead of a class. I'm also
 not quite sure why the plugins table isn't using a prefix of say `plugin-`
 since the slug can literally be pretty much anything.

 Probably better to change the former than the latter for backwards
 compatibility reasons though.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18974>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list