Inline documentation for hooks in wp-admin/my-sites.php.

Props megane9988, kpdesign.
Fixes #25586.

Built from https://develop.svn.wordpress.org/trunk@26284


git-svn-id: http://core.svn.wordpress.org/trunk@26189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2013-11-20 03:36:09 +00:00
parent 09cd62d863
commit 2b0a5aedc9
1 changed files with 26 additions and 0 deletions

View File

@ -68,11 +68,28 @@ else :
<form id="myblogs" action="" method="post"> <form id="myblogs" action="" method="post">
<?php <?php
choose_primary_blog(); choose_primary_blog();
/**
* Fires before the sites table on the My Sites screen.
*
* @since 3.0.0
*/
do_action( 'myblogs_allblogs_options' ); do_action( 'myblogs_allblogs_options' );
?> ?>
<br clear="all" /> <br clear="all" />
<table class="widefat fixed"> <table class="widefat fixed">
<?php <?php
/**
* Enable the Global Settings section on the My Sites screen.
*
* By default, the Global Settings section is hidden. Passing a non-empty
* string to this filter will enable the section, and allow new settings
* to be added, either globally or for specific sites.
*
* @since MU
*
* @param string $settings_html The settings HTML markup. Default empty.
* @param object $context Context of the setting (global or site-specific). Default 'global'.
*/
$settings_html = apply_filters( 'myblogs_options', '', 'global' ); $settings_html = apply_filters( 'myblogs_options', '', 'global' );
if ( $settings_html != '' ) { if ( $settings_html != '' ) {
echo '<tr><td valign="top"><h3>' . __( 'Global Settings' ) . '</h3></td><td>'; echo '<tr><td valign="top"><h3>' . __( 'Global Settings' ) . '</h3></td><td>';
@ -102,7 +119,16 @@ else :
$s = $i == 3 ? '' : 'border-right: 1px solid #ccc;'; $s = $i == 3 ? '' : 'border-right: 1px solid #ccc;';
echo "<td valign='top' style='$s'>"; echo "<td valign='top' style='$s'>";
echo "<h3>{$user_blog->blogname}</h3>"; echo "<h3>{$user_blog->blogname}</h3>";
/**
* Filter the row links displayed for each site on the My Sites screen.
*
* @since MU
*
* @param string $string The HTML site link markup.
* @param object $user_blog An object containing the site data.
*/
echo "<p>" . apply_filters( 'myblogs_blog_actions', "<a href='" . esc_url( get_home_url( $user_blog->userblog_id ) ). "'>" . __( 'Visit' ) . "</a> | <a href='" . esc_url( get_admin_url( $user_blog->userblog_id ) ) . "'>" . __( 'Dashboard' ) . "</a>", $user_blog ) . "</p>"; echo "<p>" . apply_filters( 'myblogs_blog_actions', "<a href='" . esc_url( get_home_url( $user_blog->userblog_id ) ). "'>" . __( 'Visit' ) . "</a> | <a href='" . esc_url( get_admin_url( $user_blog->userblog_id ) ) . "'>" . __( 'Dashboard' ) . "</a>", $user_blog ) . "</p>";
/** This filter is documented in wp-admin/my-sites.php */
echo apply_filters( 'myblogs_options', '', $user_blog ); echo apply_filters( 'myblogs_options', '', $user_blog );
echo "</td>"; echo "</td>";
$i++; $i++;