| 262 | | <?php |
| 263 | | $url = clean_url($_SERVER['REQUEST_URI']); |
| 264 | | if ( ! empty($term) ) |
| 265 | | $url = add_query_arg('s', $term, $url); |
| 266 | | if ( ! empty($type) ) |
| 267 | | $url = add_query_arg('type', $type, $url); |
| | 265 | <?php |
| | 266 | $url = clean_url($_SERVER['REQUEST_URI']); |
| | 267 | if ( ! empty($term) ) |
| | 268 | $url = add_query_arg('s', $term, $url); |
| | 269 | if ( ! empty($type) ) |
| | 270 | $url = add_query_arg('type', $type, $url); |
| 269 | | $page_links = paginate_links( array( |
| 270 | | 'base' => add_query_arg('paged', '%#%', $url), |
| 271 | | 'format' => '', |
| 272 | | 'prev_text' => __('«'), |
| 273 | | 'next_text' => __('»'), |
| 274 | | 'total' => $totalpages, |
| 275 | | 'current' => $page |
| 276 | | )); |
| | 272 | $page_links = paginate_links( array( |
| | 273 | 'base' => add_query_arg('paged', '%#%', $url), |
| | 274 | 'format' => '', |
| | 275 | 'prev_text' => __('«'), |
| | 276 | 'next_text' => __('»'), |
| | 277 | 'total' => $totalpages, |
| | 278 | 'current' => $page |
| | 279 | )); |
| | 286 | <div class="theme-listing"> |
| | 287 | <?php |
| | 288 | $in_column = 0; |
| | 289 | foreach ( $themes as $theme ) { |
| | 290 | //var_dump($theme); |
| | 291 | |
| | 292 | $name = wp_kses($theme->name, $themes_allowedtags); |
| | 293 | $desc = wp_kses($theme->description, $themes_allowedtags); |
| | 294 | if ( strlen($desc) > 30 ) |
| | 295 | $desc = substr($desc, 0, 30) . '<span class="dots">...</span><span>' . substr($desc, 30) . '</span>'; |
| | 296 | |
| | 297 | $action_links = array(); |
| | 298 | $action_links[] = '<a href="' . admin_url('theme-install.php?tab=theme-information&theme=' . $theme->slug . |
| | 299 | '&TB_iframe=true&width=600&height=800') . '" class="thickbox onclick" title="' . |
| | 300 | attribute_escape($name) . '">' . __('Install') . '</a>'; |
| | 301 | $action_links[] = '<a href="' . $theme->preview_url . '&TB_iframe" class="thickbox onclick" title="' . |
| | 302 | attribute_escape( sprintf(__('Preview %s'), $name) ) . '">' . __('Preview') . '</a>'; |
| | 303 | |
| | 304 | $action_links = apply_filters('theme_install_action_links', $action_links, $theme); |
| | 305 | $actions = implode ( ' | ', $action_links ); |
| | 306 | echo " |
| | 307 | <div class='theme-item'> |
| | 308 | <h3>{$theme->name}</h3> |
| | 309 | <img src='{$theme->screenshot_url}' width='150' /><br /> |
| | 310 | <div class='theme-item-info'> |
| | 311 | {$desc} |
| | 312 | <br class='line' /> |
| | 313 | <span class='action-links'>$actions</span> |
| | 314 | </div> |
| | 315 | </div>"; |
| | 316 | /* |
| | 317 | object(stdClass)[59] |
| | 318 | public 'name' => string 'Magazine Basic' (length=14) |
| | 319 | public 'slug' => string 'magazine-basic' (length=14) |
| | 320 | public 'version' => string '1.1' (length=3) |
| | 321 | public 'author' => string 'tinkerpriest' (length=12) |
| | 322 | public 'preview_url' => string 'http://wp-themes.com/?magazine-basic' (length=36) |
| | 323 | public 'screenshot_url' => string 'http://wp-themes.com/wp-content/themes/magazine-basic/screenshot.png' (length=68) |
| | 324 | public 'rating' => float 80 |
| | 325 | public 'num_ratings' => int 1 |
| | 326 | public 'homepage' => string 'http://wordpress.org/extend/themes/magazine-basic' (length=49) |
| | 327 | 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) |
| | 328 | public 'download_link' => string 'http://wordpress.org/extend/themes/download/magazine-basic.1.1.zip' (length=66) |
| | 329 | */ |
| | 330 | } |
| | 331 | |
| | 332 | ?> |
| | 333 | </div> |