Changeset 10590 for trunk/wp-admin/includes/theme-install.php
- Timestamp:
- 02/18/2009 09:55:00 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/theme-install.php
r10567 r10590 6 6 * @subpackage Administration 7 7 */ 8 9 $themes_allowedtags = array('a' => array('href' => array(), 'title' => array(), 'target' => array()), 10 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 11 'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(), 12 'div' => array(), 'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(), 13 'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(), 14 'img' => array('src' => array(), 'class' => array(), 'alt' => array())); 8 15 9 16 /** … … 258 265 */ 259 266 function display_themes($themes, $page = 1, $totalpages = 1) { 267 global $themes_allowedtags; 268 260 269 $type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : ''; 261 270 $term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : ''; … … 299 308 $name = wp_kses($theme->name, $themes_allowedtags); 300 309 $desc = wp_kses($theme->description, $themes_allowedtags); 301 if ( strlen($desc) > 30 ) 302 $desc = substr($desc, 0, 30) . '<span class="dots">...</span><span>' . substr($desc, 30) . '</span>'; 303 310 //if ( strlen($desc) > 30 ) 311 // $desc = substr($desc, 0, 30) . '<span class="dots">...</span><span>' . substr($desc, 30) . '</span>'; 312 313 $preview_link = $theme->preview_url . '?TB_iframe=true&width=600&height=400'; 304 314 $action_links = array(); 305 315 $action_links[] = '<a href="' . admin_url('theme-install.php?tab=theme-information&theme=' . $theme->slug . 306 '&TB_iframe=true&width=600&height=800') . '" class="thickbox onclick" title="' . 307 attribute_escape($name) . '">' . __('Install') . '</a>'; 308 $action_links[] = '<a href="' . $theme->preview_url . '&TB_iframe" class="thickbox onclick" title="' . 309 attribute_escape( sprintf(__('Preview %s'), $name) ) . '">' . __('Preview') . '</a>'; 316 '&TB_iframe=true&width=600&height=800') . '" class="button thickbox onclick">' . __('Install') . '</a>'; 317 $action_links[] = '<a href="' . $preview_link . '" class="button thickbox onclick previewlink">' . __('Preview') . '</a>'; 310 318 311 319 $action_links = apply_filters('theme_install_action_links', $action_links, $theme); 312 $actions = implode ( ' |', $action_links );320 $actions = implode ( ' ', $action_links ); 313 321 echo " 314 <div class='theme-item'> 315 <h3>{$theme->name}</h3> 316 <img src='{$theme->screenshot_url}' width='150' /><br /> 322 <div class='theme-item available-theme'> 323 <a class='thickbox screenshot' href='$preview_link'> 324 <img src='{$theme->screenshot_url}' width='150' /> 325 </a> 326 <h3>{$name}</h3> 327 <span class='action-links'>$actions</span> 317 328 <div class='theme-item-info'> 318 329 {$desc} 319 <br class='line' />320 <span class='action-links'>$actions</span>321 330 </div> 322 331 </div>"; … … 358 367 function install_theme_information() { 359 368 //TODO: This function needs a LOT of UI work :) 360 global $tab ;369 global $tab, $themes_allowedtags;; 361 370 362 371 $api = themes_api('theme_information', array('slug' => stripslashes( $_REQUEST['theme'] ) )); … … 365 374 wp_die($api); 366 375 367 $themes_allowedtags = array('a' => array('href' => array(), 'title' => array(), 'target' => array()),368 'abbr' => array('title' => array()), 'acronym' => array('title' => array()),369 'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(),370 'div' => array(), 'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(),371 'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(),372 'img' => array('src' => array(), 'class' => array(), 'alt' => array()));373 376 //Sanitize HTML 374 377 foreach ( (array)$api->sections as $section_name => $content )
Note: See TracChangeset
for help on using the changeset viewer.