Ticket #25608: 25608.2.diff
File 25608.2.diff, 5.2 KB (added by , 11 years ago) |
---|
-
src/wp-admin/includes/class-wp-ms-themes-list-table.php
49 49 wp_reset_vars( array( 'orderby', 'order', 's' ) ); 50 50 51 51 $themes = array( 52 /** 53 * Filter the array of WP_Theme objects to list in the Multisite 54 * themes list table. 55 * 56 * @since 3.1.0 57 * 58 * @param array $all Array of WP_Theme objects to display in the list table. 59 */ 52 60 'all' => apply_filters( 'all_themes', wp_get_themes() ), 53 61 'search' => array(), 54 62 'enabled' => array(), … … 284 292 if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_option( 'stylesheet' ) && $stylesheet != get_option( 'template' ) ) 285 293 $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 294 295 /** 296 * Filter the action links displayed under each theme in the Multisite 297 * themes list table. 298 * 299 * @since 2.8.0 300 * 301 * @param array $actions Action links array. 302 * @param WP_Theme object $theme The WP_Theme object. 303 * @param string $status Status of the theme such as 'enabled', 'disabled', 'search', 304 * 'upgrade', etc. 305 */ 287 306 $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme, $context ); 288 $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme, $context ); 307 /** 308 * Filter the action links of a specified theme in the theme list table. 309 * 310 * The dynamic portion of the hook name, $stylesheet, refers to 311 * the directory name of the theme, which in most cases is synonymous 312 * with the template name. 313 * 314 * @since 3.5.0 315 * 316 * @param array $actions Action links array. 317 * @param WP_Theme object $theme The WP_Theme object. 318 * @param string $status Status of the theme such as 'enabled', 'disabled', 'search', 319 * 'upgrade', etc. 320 */ 321 $actions = apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, $context ); 289 322 290 323 $class = ! $allowed ? 'inactive' : 'active'; 291 324 $checkbox_id = "checkbox_" . md5( $theme->get('Name') ); … … 333 366 if ( $theme->get('ThemeURI') ) 334 367 $theme_meta[] = '<a href="' . $theme->display('ThemeURI') . '" title="' . esc_attr__( 'Visit theme homepage' ) . '">' . __( 'Visit Theme Site' ) . '</a>'; 335 368 369 /** 370 * Filter the array of row meta for each theme in the Multisite themes list table. 371 * 372 * @since 3.1.0 373 * 374 * @param array $theme_meta Array of theme's metadata, including the version, 375 * author and so on. 376 * @param string $stylesheet Directory name of the theme. 377 * @param WP_Theme $theme WP_Theme object. 378 * @param string $status Status of the theme such as 'enabled', 'disabled', 379 * 'search', 'upgrade', etc. 380 */ 336 381 $theme_meta = apply_filters( 'theme_row_meta', $theme_meta, $stylesheet, $theme, $status ); 337 382 echo implode( ' | ', $theme_meta ); 338 383 … … 341 386 342 387 default: 343 388 echo "<td class='$column_name column-$column_name'$style>"; 389 /** 390 * Fires inside each custom column of the Multisite themes list table. 391 * 392 * @since 3.1.0 393 * 394 * @param string $column_name Name of the column. 395 * @param string $stylesheet Directory name of the theme. 396 * @param WP_Theme $theme WP_Theme object. 397 */ 344 398 do_action( 'manage_themes_custom_column', $column_name, $stylesheet, $theme ); 345 399 echo "</td>"; 346 400 } … … 350 404 351 405 if ( $this->is_site_themes ) 352 406 remove_action( "after_theme_row_$stylesheet", 'wp_theme_update_row' ); 407 /** 408 * Fires after each row in the Multisite themes list table. 409 * 410 * @since 3.1.0 411 * 412 * @param string $stylesheet Directory name of the theme. 413 * @param WP_Theme $theme WP_Theme object. 414 * @param string $status Status of the theme such as 'enabled', 'disabled', 415 * 'search', 'upgrade', etc. 416 */ 353 417 do_action( 'after_theme_row', $stylesheet, $theme, $status ); 354 do_action( "after_theme_row_$stylesheet", $stylesheet, $theme, $status ); 418 419 /** 420 * Fires after each specific row in the Multisite themes list table. 421 * 422 * The dynamic portion of the hook name, $stylesheet, refers to the 423 * directory name of the theme, most often synonymous with the template 424 * name of the theme. 425 * 426 * @since 3.5.0 427 * 428 * @param string $stylesheet Directory name of the theme. 429 * @param WP_Theme $theme WP_Theme object. 430 * @param string $status Status of the theme such as 'enabled', 'disabled', 431 * 'search', 'upgrade', etc. 432 */ 433 do_action( "after_theme_row_{$stylesheet}", $stylesheet, $theme, $status ); 355 434 } 356 435 }