| @@ 65-73 (lines=9) @@ | ||
| 62 | ||
| 63 | $like_args = $this->normalize_facebook_args( $instance['like_args'] ); |
|
| 64 | ||
| 65 | if ( empty( $like_args['href'] ) || ! $this->is_valid_facebook_url( $like_args['href'] ) ) { |
|
| 66 | if ( current_user_can( 'edit_theme_options' ) ) { |
|
| 67 | echo $before_widget; |
|
| 68 | echo '<p>' . sprintf( __( 'It looks like your Facebook URL is incorrectly configured. Please check it in your <a href="%s">widget settings</a>.', 'jetpack' ), admin_url( 'widgets.php' ) ) . '</p>'; |
|
| 69 | echo $after_widget; |
|
| 70 | } |
|
| 71 | echo '<!-- Invalid Facebook Page URL -->'; |
|
| 72 | return; |
|
| 73 | } |
|
| 74 | ||
| 75 | /** This filter is documented in core/src/wp-includes/default-widgets.php */ |
|
| 76 | $title = apply_filters( 'widget_title', $instance['title'] ); |
|
| @@ 56-67 (lines=12) @@ | ||
| 53 | /** This filter is documented in core/src/wp-includes/default-widgets.php */ |
|
| 54 | $title = apply_filters( 'widget_title', isset( $instance['title'] ) ? $instance['title'] : '' ); |
|
| 55 | ||
| 56 | if ( empty( $instance['user_id'] ) || 'invalid' === $instance['user_id'] ) { |
|
| 57 | if ( current_user_can( 'edit_theme_options' ) ) { |
|
| 58 | echo $args['before_widget']; |
|
| 59 | echo '<p>' . sprintf( |
|
| 60 | __( 'You need to enter your numeric user ID for the <a href="%1$s">Goodreads Widget</a> to work correctly. <a href="%2$s" target="_blank">Full instructions</a>.', 'jetpack' ), |
|
| 61 | esc_url( admin_url( 'widgets.php' ) ), |
|
| 62 | 'https://support.wordpress.com/widgets/goodreads-widget/#goodreads-user-id' |
|
| 63 | ) . '</p>'; |
|
| 64 | echo $args['after_widget']; |
|
| 65 | } |
|
| 66 | return; |
|
| 67 | } |
|
| 68 | ||
| 69 | if ( ! array_key_exists( $instance['shelf'], $this->shelves ) ) { |
|
| 70 | return; |
|
| @@ 89-100 (lines=12) @@ | ||
| 86 | /** This action is documented in modules/widgets/gravatar-profile.php */ |
|
| 87 | do_action( 'jetpack_stats_extra', 'widget_view', 'googleplus-badge' ); |
|
| 88 | ||
| 89 | if ( empty( $instance['href'] ) || ! $this->is_valid_googleplus_url( $instance['href'] ) ) { |
|
| 90 | if ( current_user_can( 'edit_theme_options' ) ) { |
|
| 91 | echo $args['before_widget']; |
|
| 92 | echo '<p>' . sprintf( |
|
| 93 | __( 'It looks like your Google+ URL is incorrectly configured. Please check it in your <a href="%s">widget settings</a>.', 'jetpack' ), |
|
| 94 | admin_url( 'widgets.php' ) |
|
| 95 | ) . '</p>'; |
|
| 96 | echo $args['after_widget']; |
|
| 97 | } |
|
| 98 | echo '<!-- Invalid Google+ URL -->'; |
|
| 99 | return; |
|
| 100 | } |
|
| 101 | ||
| 102 | /** This filter is documented in core/src/wp-includes/default-widgets.php */ |
|
| 103 | $title = apply_filters( 'widget_title', $instance['title'] ); |
|