mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Code is Poetry.
WordPress' code just... wasn't. This is now dealt with. Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS. Fixes #41057. git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -47,8 +47,9 @@ final class WP_Internal_Pointers {
|
||||
);
|
||||
|
||||
// Check if screen related pointer is registered
|
||||
if ( empty( $registered_pointers[ $hook_suffix ] ) )
|
||||
if ( empty( $registered_pointers[ $hook_suffix ] ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$pointers = (array) $registered_pointers[ $hook_suffix ];
|
||||
|
||||
@@ -76,8 +77,9 @@ final class WP_Internal_Pointers {
|
||||
foreach ( array_diff( $pointers, $dismissed ) as $pointer ) {
|
||||
if ( isset( $caps_required[ $pointer ] ) ) {
|
||||
foreach ( $caps_required[ $pointer ] as $cap ) {
|
||||
if ( ! current_user_can( $cap ) )
|
||||
if ( ! current_user_can( $cap ) ) {
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,8 +88,9 @@ final class WP_Internal_Pointers {
|
||||
$got_pointers = true;
|
||||
}
|
||||
|
||||
if ( ! $got_pointers )
|
||||
if ( ! $got_pointers ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Add pointers script and style to queue
|
||||
wp_enqueue_style( 'wp-pointer' );
|
||||
@@ -106,8 +109,9 @@ final class WP_Internal_Pointers {
|
||||
* @param array $args Arguments to be passed to the pointer JS (see wp-pointer.js).
|
||||
*/
|
||||
private static function print_js( $pointer_id, $selector, $args ) {
|
||||
if ( empty( $pointer_id ) || empty( $selector ) || empty( $args ) || empty( $args['content'] ) )
|
||||
if ( empty( $pointer_id ) || empty( $selector ) || empty( $args ) || empty( $args['content'] ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
||||
Reference in New Issue
Block a user