WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #12738, comment 10


Ignore:
Timestamp:
04/12/11 08:41:30 (4 years ago)
Author:
john316media
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12738, comment 10

    initial v1  
    11As is each message I need to show requires 4 lines of code 
    22 
     3{{{ 
    34add_action('admin_notices', 'some_function_name'); 
    45function some_function_name() { 
    56    echo '<div id="message" class="updated"><p>Hello World!</p></div>'; 
    67} 
     8}}} 
    79 
    810At its simplest, this way to make the same message all it would take is 
    911 
     12{{{ 
    1013add_admin_notice('updated', 'Hello World!'); 
     14}}} 
    1115 
    1216What looks simpler to you?  4 lines becomes 1 line, multiply this by the number fo messages a given plugin needs to display and thats alot of extra typing saved for the plugin authoer, makes things easier and does this really overbloat core?  I personally don't think so.