[wp-trac] [WordPress Trac] #21368: Welcome screen design - v2

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 31 18:08:52 UTC 2012


#21368: Welcome screen design - v2
-------------------------+------------------------------
 Reporter:  lessbloat    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by beaucollins):

 Replying to [comment:5 lessbloat]:
 > As you mentioned, the only thing that I can see needed is the ability to
 add additional keywords.  I'm not sure stuffing them all into the title
 will be feasible.

 I uploaded a new zip with this feature. After the initial indexing of the
 navigation it makes an ajax request for additional terms for each page. I
 provided a filter that then allows us to add terms for a given page. For
 demo purposes I added a few for different options page like this:

 {{{
 add_filter( 'hopscotch_navigation_terms', function( $terms ){

         $terms[] = array(
                 'page' => 'options-general.php',
                 'terms' => array( 'Site Title', 'Tagline', 'WordPress
 Address (URL)', 'New User Default Role' )
         );

         $terms[] = array(
                 'page' => 'options-discussion.php',
                 'terms' => array( 'Comments', 'Comment Moderation',
 'Comment Blacklist' )
         );

         $terms[] = array(
                 'page' => 'options-reading.php',
                 'terms' => array( 'Front page displays', 'Encoding for
 pages and feeds' )
         );

         return $terms;

 } );
 }}}

 The filter will automatically pass these terms through the i18n functions
 so if a translation already exists for the given term it will use it. I
 pulled these terms from the corresponding options pages. So, as an
 example, the JSON for an 'es_ES' configured blog will output:

 {{{
 {
     "options-discussion.php": [
         "Comentarios",
         "Moderaci\u00f3n de comentarios",
         "Lista negra de comentarios"
     ],
     "options-general.php": [
         "T\u00edtulo del sitio",
         "Descripci\u00f3n corta",
         "Direcci\u00f3n de WordPress (URL)",
         "Perfil predeterminado para nuevos usuarios"
     ],
     "options-reading.php": [
         "La p\u00e1gina inicial mostrar\u00e1",
         "Codificaci\u00f3n para p\u00e1ginas y feeds"
     ]
 }

 }}}

 And they additional terms work for the given page:

 [[Image(http://cl.ly/image/2n3D0Z1O2Z3C/Screen%20Shot%202012-07-31%20at%2011.07.34%20AM.png)]]

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


More information about the wp-trac mailing list