Ensure inline code is markdown-escaped as such, HTML tags are removed from summaries, and that code snippets in descriptions are properly indented.
Affects DocBlocks for the following core elements: * Markdown-indent a code snippet in the file header for wp-admin/install-helper.php * Add markdown formatting and two inline `@see` tags to the description for `translate()` * Markdown-indent a code snippet in the description for `_n_noop()` * Remove HTML tags from the summary for `get_media_embedded_in_content()` * Remove an HTML tag from the summary for `wpview_media_sandbox_styles()` Props rarst. See #30473. Built from https://develop.svn.wordpress.org/trunk@30542 git-svn-id: http://core.svn.wordpress.org/trunk@30531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
07c58f5cca
commit
b8c612ca1c
|
@ -10,26 +10,25 @@
|
|||
* needing to use these functions a lot, you might experience time outs. If you
|
||||
* do, then it is advised to just write the SQL code yourself.
|
||||
*
|
||||
* <code>
|
||||
* check_column('wp_links', 'link_description', 'mediumtext');
|
||||
* if (check_column($wpdb->comments, 'comment_author', 'tinytext'))
|
||||
* echo "ok\n";
|
||||
* check_column( 'wp_links', 'link_description', 'mediumtext' );
|
||||
* if ( check_column( $wpdb->comments, 'comment_author', 'tinytext' ) ) {
|
||||
* echo "ok\n";
|
||||
* }
|
||||
*
|
||||
* $error_count = 0;
|
||||
* $tablename = $wpdb->links;
|
||||
* // check the column
|
||||
* if (!check_column($wpdb->links, 'link_description', 'varchar(255)')) {
|
||||
* $ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' ";
|
||||
* $q = $wpdb->query($ddl);
|
||||
* }
|
||||
* $error_count = 0;
|
||||
* $tablename = $wpdb->links;
|
||||
* // Check the column.
|
||||
* if ( ! check_column($wpdb->links, 'link_description', 'varchar( 255 )' ) ) {
|
||||
* $ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' ";
|
||||
* $q = $wpdb->query( $ddl );
|
||||
* }
|
||||
*
|
||||
* if (check_column($wpdb->links, 'link_description', 'varchar(255)')) {
|
||||
* $res .= $tablename . ' - ok <br />';
|
||||
* } else {
|
||||
* $res .= 'There was a problem with ' . $tablename . '<br />';
|
||||
* ++$error_count;
|
||||
* }
|
||||
* </code>
|
||||
* if ( check_column( $wpdb->links, 'link_description', 'varchar( 255 )' ) ) {
|
||||
* $res .= $tablename . ' - ok <br />';
|
||||
* } else {
|
||||
* $res .= 'There was a problem with ' . $tablename . '<br />';
|
||||
* ++$error_count;
|
||||
* }
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Plugin
|
||||
|
|
|
@ -76,7 +76,7 @@ function get_locale() {
|
|||
*
|
||||
* If there is no translation, or the text domain isn't loaded, the original text is returned.
|
||||
*
|
||||
* <strong>Note:</strong> Don't use translate() directly, use __() or related functions.
|
||||
* *Note:* Don't use {@see translate()} directly, use `{@see __()} or related functions.
|
||||
*
|
||||
* @since 2.2.0
|
||||
*
|
||||
|
@ -87,6 +87,7 @@ function get_locale() {
|
|||
function translate( $text, $domain = 'default' ) {
|
||||
$translations = get_translations_for_domain( $domain );
|
||||
$translations = $translations->translate( $text );
|
||||
|
||||
/**
|
||||
* Filter text with its translation.
|
||||
*
|
||||
|
@ -364,15 +365,14 @@ function _nx($single, $plural, $number, $context, $domain = 'default') {
|
|||
* strings and use them later.
|
||||
*
|
||||
* Example:
|
||||
* <code>
|
||||
* $messages = array(
|
||||
* 'post' => _n_noop('%s post', '%s posts'),
|
||||
* 'page' => _n_noop('%s pages', '%s pages')
|
||||
* );
|
||||
* ...
|
||||
* $message = $messages[$type];
|
||||
* $usable_text = sprintf( translate_nooped_plural( $message, $count ), $count );
|
||||
* </code>
|
||||
*
|
||||
* $messages = array(
|
||||
* 'post' => _n_noop( '%s post', '%s posts' ),
|
||||
* 'page' => _n_noop( '%s pages', '%s pages' ),
|
||||
* );
|
||||
* ...
|
||||
* $message = $messages[ $type ];
|
||||
* $usable_text = sprintf( translate_nooped_plural( $message, $count ), $count );
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
|
|
|
@ -3100,7 +3100,7 @@ function get_attached_media( $type, $post = 0 ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check the content blob for an <audio>, <video> <object>, <embed>, or <iframe>
|
||||
* Check the content blob for an audio, video, object, embed, or iframe tags.
|
||||
*
|
||||
* @since 3.6.0
|
||||
*
|
||||
|
@ -3286,7 +3286,7 @@ function attachment_url_to_postid( $url ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Return the URls for CSS files used in an <iframe>-sandbox'd TinyMCE media view
|
||||
* Return the URLs for CSS files used in an iframe-sandbox'd TinyMCE media view.
|
||||
*
|
||||
* @since 4.0.0
|
||||
*
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.1-beta2-30541';
|
||||
$wp_version = '4.1-beta2-30542';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue