[wp-trac] Re: [WordPress Trac] #8223: Possibility to specify parameters when writing new page or post

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 2 23:04:54 GMT 2009


#8223: Possibility to specify parameters when writing new page or post
----------------------------+-----------------------------------------------
 Reporter:  donpaolo        |        Owner:  anonymous
     Type:  enhancement     |       Status:  reopened 
 Priority:  normal          |    Milestone:  2.8      
Component:  Administration  |      Version:  2.8      
 Severity:  normal          |   Resolution:           
 Keywords:  needs-patch     |  
----------------------------+-----------------------------------------------
Changes (by Denis-de-Bernardy):

  * keywords:  reporter-feedback => needs-patch
  * version:  => 2.8
  * milestone:  => 2.8


Comment:

 In case in helps... I use the following code in one of my plugins:


 {{{
         /**
          * Usage: extract(utils::extract($vars), EXTR_SKIP);
          *
          * @param $vars variables to fetch from $_POST or $_GET
          * @return void
          **/

         function extract($vars) {
                 if ( $_POST ) {
                         $arr = '_POST';
                 } else {
                         $arr = '_GET';
                 }

                 foreach ( $vars as $var ) {
                         $$var = isset($GLOBALS[$arr][$var])
                                 ? stripslashes_deep($GLOBALS[$arr][$var])
                                 : '';
                 }

                 return compact($vars);
         } # extract()
 }}}

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


More information about the wp-trac mailing list