Ticket #25608: 25608-2.diff
File 25608-2.diff, 4.8 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 displayed under each theme in the theme list table. 299 * 300 * @since 2.8.0 301 * 302 * @param array $actions Action links array. 303 * @param WP_Theme 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 of a specified theme in the theme list table. 309 * 310 * You can use $stylesheet to specify which theme's action links you want to filter. 311 * 312 * @since 3.5.0 313 * 314 * @param array $actions Action links array. 315 * @param WP_Theme object $theme The WP_Theme object. 316 * @param string $status The status of the theme such as enabled, disabled, search, upgrade and so on. 317 */ 288 318 $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme, $context ); 289 319 290 320 $class = ! $allowed ? 'inactive' : 'active'; … … 333 363 if ( $theme->get('ThemeURI') ) 334 364 $theme_meta[] = '<a href="' . $theme->display('ThemeURI') . '" title="' . esc_attr__( 'Visit theme homepage' ) . '">' . __( 'Visit Theme Site' ) . '</a>'; 335 365 366 /** 367 * Filter the array of links of the meta data of the theme. 368 * 369 * @since 3.1.0 370 * 371 * @param array $theme_meta Array of theme's meta such as the version, author and so on. 372 * @param string $stylesheet Directory name of the theme. 373 * @param WP_Theme $theme WP_Theme object. 374 * @param string $status Status of the theme such as enabled, disabled, search, upgrade and so on. 375 */ 336 376 $theme_meta = apply_filters( 'theme_row_meta', $theme_meta, $stylesheet, $theme, $status ); 337 377 echo implode( ' | ', $theme_meta ); 338 378 … … 341 381 342 382 default: 343 383 echo "<td class='$column_name column-$column_name'$style>"; 384 /** 385 * Fires in the custom column in the theme table. 386 * 387 * @since 3.1.0 388 * 389 * @param string $column_name Name of the column. 390 * @param string $stylesheet Directory name of the theme. 391 * @param WP_Theme $theme WP_Theme object. 392 */ 344 393 do_action( 'manage_themes_custom_column', $column_name, $stylesheet, $theme ); 345 394 echo "</td>"; 346 395 } … … 350 399 351 400 if ( $this->is_site_themes ) 352 401 remove_action( "after_theme_row_$stylesheet", 'wp_theme_update_row' ); 402 /** 403 * Fires when the row of each theme has been displayed and the tr ends. 404 * 405 * @since 3.1.0 406 * 407 * @param string $stylesheet Directory name of the theme. 408 * @param WP_Theme $theme WP_Theme object. 409 * @param string $status Status of the theme such as enabled, disabled, search, upgrade and so on. 410 */ 353 411 do_action( 'after_theme_row', $stylesheet, $theme, $status ); 412 /** 413 * Fires when the row of a certain theme has been displayed and the tr ends. 414 * 415 * You can use $stylesheet to specify in which theme's row you want to take action. 416 * 417 * @since 3.5.0 418 * 419 * @param string $stylesheet Directory name of the theme. 420 * @param WP_Theme $theme WP_Theme object. 421 * @param string $status Status of the theme such as enabled, disabled, search, upgrade and so on. 422 */ 354 423 do_action( "after_theme_row_$stylesheet", $stylesheet, $theme, $status ); 355 424 } 356 425 }