[wp-trac] [WordPress Trac] #23170: PHP Notice On _remove_theme_support() function

WordPress Trac noreply at wordpress.org
Mon Jan 14 03:54:51 UTC 2013


#23170: PHP Notice On _remove_theme_support() function
------------------------------+------------------
 Reporter:  alex-ye           |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  3.6
Component:  Warnings/Notices  |     Version:  3.5
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |
------------------------------+------------------

Comment (by SergeyBiryukov):

 Replying to [comment:4 alex-ye]:
 > why we check '''$support[0]['wp-head-callback']''' in line 1495 it is
 not a boolean var and we should use empty() or isset() ... right ?!

 Yes, we just skip `!empty()` for brevity, since a non-empty string is
 considered `true`: [[BR]]
 http://php.net/manual/en/language.types.boolean.php

 > And what about the line 1505 we don't check '''$support[0]['wp-head-
 callback']''' at all , so what is the difference ?!

 I guess the difference is that unlike custom header, custom background has
 a default callback: [[BR]]
 http://core.trac.wordpress.org/browser/tags/3.5/wp-
 includes/theme.php#L1353

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23170#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list