[wp-trac] [WordPress Trac] #35896: login_enqueue_scripts document bug

WordPress Trac noreply at wordpress.org
Sun Feb 21 17:58:10 UTC 2016


#35896: login_enqueue_scripts document bug
---------------------------------+-----------------------------
 Reporter:  suifengtec           |      Owner:
     Type:  enhancement          |     Status:  new
 Priority:  normal               |  Milestone:  Awaiting Review
Component:  Administration       |    Version:  4.4.2
 Severity:  normal               |   Keywords:
  Focuses:  accessibility, docs  |
---------------------------------+-----------------------------
 the example on this document page is error:
 [https://codex.wordpress.org/Plugin_API/Action_Reference/login_enqueue_scripts#Example]
 the scripts/styles enqueued by this hook is only output before
 {{{
 </body>
 }}}

 the correct method using it may be:
 {{{#!php
 <?php
 add_action('login_enqueue_scripts', array('login_enqueue_scripts'));

 function login_enqueue_scripts(){
         printf("<link rel='stylesheet' id='%s' href='%s' type='text/css'
 media='all' >\n",
             'css-id',
             esc_url(plugins_url(__FILE__).'assets/css/style.css')
             );
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35896>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list