Update WP and plugins
This commit is contained in:
parent
10a4713229
commit
1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions
|
@ -24,8 +24,6 @@ final class WP_Internal_Pointers {
|
|||
* Individual pointers (e.g. wp390_widgets) can be disabled using the following:
|
||||
* remove_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_wp390_widgets' ) );
|
||||
*
|
||||
* @static
|
||||
*
|
||||
* @param string $hook_suffix The current admin page.
|
||||
*/
|
||||
public static function enqueue_scripts( $hook_suffix ) {
|
||||
|
@ -47,8 +45,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 ];
|
||||
|
||||
|
@ -80,8 +79,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -90,8 +90,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' );
|
||||
|
@ -103,15 +104,14 @@ final class WP_Internal_Pointers {
|
|||
*
|
||||
* @since 3.3.0
|
||||
*
|
||||
* @static
|
||||
*
|
||||
* @param string $pointer_id The pointer ID.
|
||||
* @param string $selector The HTML elements, on which the pointer should be attached.
|
||||
* @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">
|
||||
|
@ -180,8 +180,8 @@ final class WP_Internal_Pointers {
|
|||
}
|
||||
|
||||
$js_args = array(
|
||||
'content' => $content,
|
||||
'position' => $position,
|
||||
'content' => $content,
|
||||
'position' => $position,
|
||||
'pointerClass' => 'wp-pointer arrow-bottom',
|
||||
'pointerWidth' => 420,
|
||||
);
|
||||
|
@ -193,8 +193,6 @@ final class WP_Internal_Pointers {
|
|||
*
|
||||
* @since 3.3.0
|
||||
*
|
||||
* @static
|
||||
*
|
||||
* @param int $user_id User ID.
|
||||
*/
|
||||
public static function dismiss_pointers_for_new_users( $user_id ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue