~ubuntu-branches/debian/sid/wordpress/sid

« back to all changes in this revision

Viewing changes to wp-admin/includes/class-wp-theme-install-list-table.php

  • Committer: Package Import Robot
  • Author(s): Raphaël Hertzog
  • Date: 2013-09-04 23:18:58 UTC
  • mfrom: (1.2.28)
  • Revision ID: package-import@ubuntu.com-20130904231858-nljmn1buzswh63jk
Tags: 3.6+dfsg-1
* New upstream release.
* Improve wp-settings to verify that $_SERVER['HTTP_X_FORWARDED_PROTO']
  exists before accessing it (avoids a PHP notice).
  Thanks to Paul Dreik <slask@pauldreik.se> for the report and the patch.
* Document in README.Debian the need to login to /wp-admin/ to complete
  an upgrade.
* Drop useless debian/README.source
* Drop 008CVE2008-2392.patch since upstream now disables unfiltered
  uploads by default. See http://core.trac.wordpress.org/ticket/10692
* Drop 009CVE2008-6767.patch since the backto parameter is validated
  against a whitelist, and externally triggered upgrades are not a
  security problem as long as they work.
* Update debian/missing-sources with latest versions.
* Update upstream l10n.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
                $search_terms = array();
25
25
                $search_string = '';
26
26
                if ( ! empty( $_REQUEST['s'] ) ){
27
 
                        $search_string = strtolower( stripslashes( $_REQUEST['s'] ) );
 
27
                        $search_string = strtolower( wp_unslash( $_REQUEST['s'] ) );
28
28
                        $search_terms = array_unique( array_filter( array_map( 'trim', explode( ',', $search_string ) ) ) );
29
29
                }
30
30
 
51
51
                $tabs = apply_filters( 'install_themes_tabs', $tabs );
52
52
                $nonmenu_tabs = apply_filters( 'install_themes_nonmenu_tabs', $nonmenu_tabs );
53
53
 
54
 
                // If a non-valid menu tab has been selected, And its not a non-menu action.
 
54
                // If a non-valid menu tab has been selected, And it's not a non-menu action.
55
55
                if ( empty( $tab ) || ( ! isset( $tabs[ $tab ] ) && ! in_array( $tab, (array) $nonmenu_tabs ) ) )
56
56
                        $tab = key( $tabs );
57
57
 
59
59
 
60
60
                switch ( $tab ) {
61
61
                        case 'search':
62
 
                                $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : 'term';
 
62
                                $type = isset( $_REQUEST['type'] ) ? wp_unslash( $_REQUEST['type'] ) : 'term';
63
63
                                switch ( $type ) {
64
64
                                        case 'tag':
65
65
                                                $args['tag'] = array_map( 'sanitize_key', $search_terms );
164
164
         *
165
165
         * Example theme data:
166
166
         *   object(stdClass)[59]
167
 
         *     public 'name' => string 'Magazine Basic' (length=14)
168
 
         *     public 'slug' => string 'magazine-basic' (length=14)
169
 
         *     public 'version' => string '1.1' (length=3)
170
 
         *     public 'author' => string 'tinkerpriest' (length=12)
171
 
         *     public 'preview_url' => string 'http://wp-themes.com/?magazine-basic' (length=36)
172
 
         *     public 'screenshot_url' => string 'http://wp-themes.com/wp-content/themes/magazine-basic/screenshot.png' (length=68)
 
167
         *     public 'name' => string 'Magazine Basic'
 
168
         *     public 'slug' => string 'magazine-basic'
 
169
         *     public 'version' => string '1.1'
 
170
         *     public 'author' => string 'tinkerpriest'
 
171
         *     public 'preview_url' => string 'http://wp-themes.com/?magazine-basic'
 
172
         *     public 'screenshot_url' => string 'http://wp-themes.com/wp-content/themes/magazine-basic/screenshot.png'
173
173
         *     public 'rating' => float 80
174
174
         *     public 'num_ratings' => int 1
175
 
         *     public 'homepage' => string 'http://wordpress.org/extend/themes/magazine-basic' (length=49)
176
 
         *     public 'description' => string 'A basic magazine style layout with a fully customizable layout through a backend interface. Designed by <a href="http://bavotasan.com">c.bavota</a> of <a href="http://tinkerpriestmedia.com">Tinker Priest Media</a>.' (length=214)
177
 
         *     public 'download_link' => string 'http://wordpress.org/extend/themes/download/magazine-basic.1.1.zip' (length=66)
 
175
         *     public 'homepage' => string 'http://wordpress.org/themes/magazine-basic'
 
176
         *     public 'description' => string 'A basic magazine style layout with a fully customizable layout through a backend interface. Designed by <a href="http://bavotasan.com">c.bavota</a> of <a href="http://tinkerpriestmedia.com">Tinker Priest Media</a>.'
 
177
         *     public 'download_link' => string 'http://wordpress.org/themes/download/magazine-basic.1.1.zip'
178
178
         */
179
179
        function single_row( $theme ) {
180
180
                global $themes_allowedtags;
362
362
         * @uses $tab Global; current tab within Themes->Install screen
363
363
         * @uses $type Global; type of search.
364
364
         */
365
 
        function _js_vars() {
 
365
        function _js_vars( $extra_args = array() ) {
366
366
                global $tab, $type;
367
367
                parent::_js_vars( compact( 'tab', 'type' ) );
368
368
        }