~canonical-sysadmins/wordpress/4.2.4

« back to all changes in this revision

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

  • Committer: Nick Moffitt
  • Date: 2015-01-15 11:05:37 UTC
  • mfrom: (1.1.1 wp4-upstream)
  • Revision ID: nick.moffitt@canonical.com-20150115110537-8bp1y42eyg0jsa7c
Tags: 4.1
MergeĀ upstreamĀ versionĀ 4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
                printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_site_option( 'site_name' ) );
96
96
        }
97
97
 
 
98
        /**
 
99
         * @param string $which
 
100
         * @return null
 
101
         */
98
102
        public function tablenav( $which = 'top' ) {
99
103
                if ( $this->get_pagination_arg( 'total_pages' ) <= 1 )
100
104
                        return;
205
209
                        </div>
206
210
 
207
211
                        <div class="themedetaildiv hide-if-js">
208
 
                                <p><strong><?php _e('Version: '); ?></strong><?php echo $version; ?></p>
 
212
                                <p><strong><?php _e('Version:'); ?></strong> <?php echo $version; ?></p>
209
213
                                <p><?php echo $theme->display('Description'); ?></p>
210
214
                                <?php if ( $theme->parent() ) {
211
215
                                        printf( ' <p class="howto">' . __( 'This <a href="%1$s">child theme</a> requires its parent theme, %2$s.' ) . '</p>',
219
223
                endforeach;
220
224
        }
221
225
 
 
226
        /**
 
227
         * @param WP_Theme $theme
 
228
         * @return bool
 
229
         */
222
230
        public function search_theme( $theme ) {
223
231
                // Search the features
224
232
                foreach ( $this->features as $word ) {
256
264
         * @since 3.4.0
257
265
         * @access public
258
266
         *
259
 
         * @uses $this->features Array of all feature search terms.
260
 
         * @uses get_pagenum()
261
 
         * @uses _pagination_args['total_pages']
 
267
         * @param array $extra_args
262
268
         */
263
269
        public function _js_vars( $extra_args = array() ) {
264
270
                $search_string = isset( $_REQUEST['s'] ) ? esc_attr( wp_unslash( $_REQUEST['s'] ) ) : '';
273
279
                if ( is_array( $extra_args ) )
274
280
                        $args = array_merge( $args, $extra_args );
275
281
 
276
 
                printf( "<script type='text/javascript'>var theme_list_args = %s;</script>\n", json_encode( $args ) );
 
282
                printf( "<script type='text/javascript'>var theme_list_args = %s;</script>\n", wp_json_encode( $args ) );
277
283
                parent::_js_vars();
278
284
        }
279
285
}