mirror of
git://develop.git.wordpress.org/
synced 2025-03-23 13:29:56 +01:00
Grouped backports to the 5.8 branch.
- Posts, Post Types: Escape output within `the_meta()`. - General: Ensure bookmark query limits are numeric. - Plugins: Escape output in error messages. - Build/Test Tools: Allow the PHPCS plugin in Composer configuration. Merges [52412,53958-53960] to the 5.8 branch. Props tykoted, martinkrcho, xknown, dd32, peterwilsoncc, paulkevan, timothyblynjacobs. git-svn-id: https://develop.svn.wordpress.org/branches/5.8@53965 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ae3d9432ad
commit
769521ceae
@ -33,6 +33,11 @@
|
||||
"vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": true
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"compat": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=phpcompat.xml.dist --report=summary,source",
|
||||
"format": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --report=summary,source",
|
||||
|
@ -610,7 +610,7 @@ if ( ! empty( $invalid ) ) {
|
||||
/* translators: 1: Plugin file, 2: Error message. */
|
||||
__( 'The plugin %1$s has been deactivated due to an error: %2$s' ),
|
||||
'<code>' . esc_html( $plugin_file ) . '</code>',
|
||||
$error->get_error_message()
|
||||
esc_html( $error->get_error_message() )
|
||||
);
|
||||
echo '</p></div>';
|
||||
}
|
||||
@ -674,7 +674,7 @@ elseif ( isset( $_GET['deleted'] ) ) :
|
||||
printf(
|
||||
/* translators: %s: Error message. */
|
||||
__( 'Plugin could not be deleted due to an error: %s' ),
|
||||
$delete_result->get_error_message()
|
||||
esc_html( $delete_result->get_error_message() )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
@ -307,7 +307,7 @@ function get_bookmarks( $args = '' ) {
|
||||
$query .= " $exclusions $inclusions $search";
|
||||
$query .= " ORDER BY $orderby $order";
|
||||
if ( -1 != $parsed_args['limit'] ) {
|
||||
$query .= ' LIMIT ' . $parsed_args['limit'];
|
||||
$query .= ' LIMIT ' . absint( $parsed_args['limit'] );
|
||||
}
|
||||
|
||||
$results = $wpdb->get_results( $query );
|
||||
|
@ -1088,9 +1088,10 @@ function post_custom( $key = '' ) {
|
||||
*
|
||||
* @since 1.2.0
|
||||
*
|
||||
* @internal This will probably change at some point...
|
||||
* @deprecated 6.0.2 Use get_post_meta() to retrieve post meta and render manually.
|
||||
*/
|
||||
function the_meta() {
|
||||
_deprecated_function( __FUNCTION__, '6.0.2', 'get_post_meta()' );
|
||||
$keys = get_post_custom_keys();
|
||||
if ( $keys ) {
|
||||
$li_html = '';
|
||||
@ -1106,8 +1107,8 @@ function the_meta() {
|
||||
$html = sprintf(
|
||||
"<li><span class='post-meta-key'>%s</span> %s</li>\n",
|
||||
/* translators: %s: Post custom field name. */
|
||||
sprintf( _x( '%s:', 'Post custom field name' ), $key ),
|
||||
$value
|
||||
esc_html( sprintf( _x( '%s:', 'Post custom field name' ), $key ) ),
|
||||
esc_html( $value )
|
||||
);
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user