Ticket #25608: 25608.diff
File 25608.diff, 4.6 KB (added by , 10 years ago) |
---|
-
src/wp-admin/includes/class-wp-ms-themes-list-table.php
48 48 49 49 wp_reset_vars( array( 'orderby', 'order', 's' ) ); 50 50 51 $all_themes = wp_get_themes(); 52 /** 53 * Filter the array of WP_Theme objects. 54 * 55 * @since 3.1.0 56 * 57 * @param array $all_themes The array of WP_Theme objects. 58 */ 59 $all_themes = apply_filters( 'all_themes', $all_themes ); 51 60 $themes = array( 52 'all' => apply_filters( 'all_themes', wp_get_themes() ),61 'all' => $all_themes, 53 62 'search' => array(), 54 63 'enabled' => array(), 55 64 'disabled' => array(), … … 284 293 if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_option( 'stylesheet' ) && $stylesheet != get_option( 'template' ) ) 285 294 $actions['delete'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=delete-selected&checked[]=' . $theme_key . '&theme_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-themes' ) ) . '" title="' . esc_attr__( 'Delete this theme' ) . '" class="delete">' . __( 'Delete' ) . '</a>'; 286 295 287 $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme, $context ); 296 $actions = array_filter( $actions ); 297 /** 298 * Filter the action links to be displayed under each themes. 299 * 300 * @since 2.8.0 301 * 302 * @param array $actions The links which user can take actions to the themes with. 303 * @param object $theme The WP_Theme object. 304 * @param string $status The status of the theme such as enabled, disabled, search, upgrade and so on. 305 */ 306 $actions = apply_filters( 'theme_action_links', $actions, $theme, $context ); 307 /** 308 * Filter the action links to be displayed under a certain theme themes. 309 * 310 * @since 3.5.0 311 * 312 * @param array $actions The links which user can take actions to the themes with. 313 * @param object $theme The WP_Theme object. 314 * @param string $status The status of the theme such as enabled, disabled, search, upgrade and so on. 315 */ 288 316 $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme, $context ); 289 317 290 318 $class = ! $allowed ? 'inactive' : 'active'; … … 333 361 if ( $theme->get('ThemeURI') ) 334 362 $theme_meta[] = '<a href="' . $theme->display('ThemeURI') . '" title="' . esc_attr__( 'Visit theme homepage' ) . '">' . __( 'Visit Theme Site' ) . '</a>'; 335 363 364 /** 365 * Filter the array of links of the meta data of the theme. 366 * 367 * @since 3.1.0 368 * 369 * @param array $theme_meta The array of theme's meta such as the version, author and link text of the theme site. 370 * @param string $stylesheet The directory name of the theme. 371 * @param object $theme The WP_Theme object. 372 * @param string $status The status of the theme such as enabled, disabled, search, upgrade and so on. 373 */ 336 374 $theme_meta = apply_filters( 'theme_row_meta', $theme_meta, $stylesheet, $theme, $status ); 337 375 echo implode( ' | ', $theme_meta ); 338 376 … … 341 379 342 380 default: 343 381 echo "<td class='$column_name column-$column_name'$style>"; 382 /** 383 * Fires in the custom column in the theme table. 384 * 385 * @since 3.1.0 386 * 387 * @param string $column_name The name of the column. 388 * @param string $stylesheet The directory name of the theme. 389 * @param object $theme The WP_Theme object. 390 */ 344 391 do_action( 'manage_themes_custom_column', $column_name, $stylesheet, $theme ); 345 392 echo "</td>"; 346 393 } … … 350 397 351 398 if ( $this->is_site_themes ) 352 399 remove_action( "after_theme_row_$stylesheet", 'wp_theme_update_row' ); 400 /** 401 * Fires when the row of each theme has been displayed and ended with </tr>. 402 * 403 * @since 3.1.0 404 * 405 * @param string $stylesheet The directory name of the theme. 406 * @param object $theme The WP_Theme object. 407 * @param string $status The status of the theme such as enabled, disabled, search, upgrade and so on. 408 */ 353 409 do_action( 'after_theme_row', $stylesheet, $theme, $status ); 410 /** 411 * Fires when the row of a certain theme has been displayed and ended with </tr>. 412 * 413 * @since 3.5.0 414 * 415 * @param string $stylesheet The directory name of the theme. 416 * @param object $theme The WP_Theme object. 417 * @param string $status The status of the theme such as enabled, disabled, search, upgrade and so on. 418 */ 354 419 do_action( "after_theme_row_$stylesheet", $stylesheet, $theme, $status ); 355 420 } 356 421 }