mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 07:07:38 +02:00
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
|
* 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.
|
* do, then it is advised to just write the SQL code yourself.
|
||||||
*
|
*
|
||||||
* <code>
|
* check_column( 'wp_links', 'link_description', 'mediumtext' );
|
||||||
* check_column('wp_links', 'link_description', 'mediumtext');
|
* if ( check_column( $wpdb->comments, 'comment_author', 'tinytext' ) ) {
|
||||||
* if (check_column($wpdb->comments, 'comment_author', 'tinytext'))
|
* echo "ok\n";
|
||||||
* echo "ok\n";
|
* }
|
||||||
*
|
*
|
||||||
* $error_count = 0;
|
* $error_count = 0;
|
||||||
* $tablename = $wpdb->links;
|
* $tablename = $wpdb->links;
|
||||||
* // check the column
|
* // Check the column.
|
||||||
* if (!check_column($wpdb->links, 'link_description', 'varchar(255)')) {
|
* if ( ! check_column($wpdb->links, 'link_description', 'varchar( 255 )' ) ) {
|
||||||
* $ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' ";
|
* $ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' ";
|
||||||
* $q = $wpdb->query($ddl);
|
* $q = $wpdb->query( $ddl );
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* if (check_column($wpdb->links, 'link_description', 'varchar(255)')) {
|
* if ( check_column( $wpdb->links, 'link_description', 'varchar( 255 )' ) ) {
|
||||||
* $res .= $tablename . ' - ok <br />';
|
* $res .= $tablename . ' - ok <br />';
|
||||||
* } else {
|
* } else {
|
||||||
* $res .= 'There was a problem with ' . $tablename . '<br />';
|
* $res .= 'There was a problem with ' . $tablename . '<br />';
|
||||||
* ++$error_count;
|
* ++$error_count;
|
||||||
* }
|
* }
|
||||||
* </code>
|
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @subpackage Plugin
|
* @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.
|
* 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
|
* @since 2.2.0
|
||||||
*
|
*
|
||||||
@ -87,6 +87,7 @@ function get_locale() {
|
|||||||
function translate( $text, $domain = 'default' ) {
|
function translate( $text, $domain = 'default' ) {
|
||||||
$translations = get_translations_for_domain( $domain );
|
$translations = get_translations_for_domain( $domain );
|
||||||
$translations = $translations->translate( $text );
|
$translations = $translations->translate( $text );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter text with its translation.
|
* Filter text with its translation.
|
||||||
*
|
*
|
||||||
@ -364,15 +365,14 @@ function _nx($single, $plural, $number, $context, $domain = 'default') {
|
|||||||
* strings and use them later.
|
* strings and use them later.
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* <code>
|
*
|
||||||
* $messages = array(
|
* $messages = array(
|
||||||
* 'post' => _n_noop('%s post', '%s posts'),
|
* 'post' => _n_noop( '%s post', '%s posts' ),
|
||||||
* 'page' => _n_noop('%s pages', '%s pages')
|
* 'page' => _n_noop( '%s pages', '%s pages' ),
|
||||||
* );
|
* );
|
||||||
* ...
|
* ...
|
||||||
* $message = $messages[$type];
|
* $message = $messages[ $type ];
|
||||||
* $usable_text = sprintf( translate_nooped_plural( $message, $count ), $count );
|
* $usable_text = sprintf( translate_nooped_plural( $message, $count ), $count );
|
||||||
* </code>
|
|
||||||
*
|
*
|
||||||
* @since 2.5.0
|
* @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
|
* @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
|
* @since 4.0.0
|
||||||
*
|
*
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user