@@ -693,8 +693,7 @@ discard block |
||
693 | 693 | foreach ( $values as $optgroup => $value ) { |
694 | 694 | if ( ! empty( $value['items'] ) ) { |
695 | 695 | $select .= $this->create_optgroup( $optgroup, $value ); |
696 | - } |
|
697 | - else { |
|
696 | + } else { |
|
698 | 697 | $select .= '<option value="' . esc_attr( $value['id'] ) . '">' . esc_attr( stripslashes( $value['name'] ) ) . '</option>'; |
699 | 698 | } |
700 | 699 | } |
@@ -720,8 +719,7 @@ discard block |
||
720 | 719 | if ( ! empty( $option['items'] ) ) { |
721 | 720 | |
722 | 721 | $optgroup .= $this->create_optgroup( esc_attr( $option['name'] ), $option ); |
723 | - } |
|
724 | - else { |
|
722 | + } else { |
|
725 | 723 | $optgroup .= '<option value="' . esc_attr( $option['id'] ) . '">' . esc_attr( stripslashes( $option['name'] ) ) . '</option>'; |
726 | 724 | } |
727 | 725 | } |
@@ -516,7 +516,7 @@ |
||
516 | 516 | delete_option( 'yoast-ga-access_token' ); |
517 | 517 | delete_option( 'yoast-ga-refresh_token' ); |
518 | 518 | delete_option( 'yst_ga_api' ); |
519 | - } else { |
|
519 | + } else { |
|
520 | 520 | // if UA in profile profiles, remove others and use that |
521 | 521 | if ( ! empty( $options['analytics_profile' ] ) && ! empty( $profiles['ga_api_response_accounts'] ) && is_array( $profiles['ga_api_response_accounts'] ) ) { |
522 | 522 | foreach ( $profiles as $account ) { |
@@ -867,7 +867,9 @@ discard block |
||
867 | 867 | function remove_class_filter( $tag, $class_name = '', $method_name = '', $priority = 10 ) { |
868 | 868 | global $wp_filter; |
869 | 869 | // Check that filter actually exists first |
870 | - if ( ! isset( $wp_filter[ $tag ] ) ) return FALSE; |
|
870 | + if ( ! isset( $wp_filter[ $tag ] ) ) { |
|
871 | + return FALSE; |
|
872 | + } |
|
871 | 873 | /** |
872 | 874 | * If filter config is an object, means we're using WordPress 4.7+ and the config is no longer |
873 | 875 | * a simple array, rather it is an object that implements the ArrayAccess interface. |
@@ -882,23 +884,35 @@ discard block |
||
882 | 884 | $callbacks = &$wp_filter[ $tag ]; |
883 | 885 | } |
884 | 886 | // Exit if there aren't any callbacks for specified priority |
885 | - if ( ! isset( $callbacks[ $priority ] ) || empty( $callbacks[ $priority ] ) ) return FALSE; |
|
887 | + if ( ! isset( $callbacks[ $priority ] ) || empty( $callbacks[ $priority ] ) ) { |
|
888 | + return FALSE; |
|
889 | + } |
|
886 | 890 | // Loop through each filter for the specified priority, looking for our class & method |
887 | 891 | foreach( (array) $callbacks[ $priority ] as $filter_id => $filter ) { |
888 | 892 | // Filter should always be an array - array( $this, 'method' ), if not goto next |
889 | - if ( ! isset( $filter[ 'function' ] ) || ! is_array( $filter[ 'function' ] ) ) continue; |
|
893 | + if ( ! isset( $filter[ 'function' ] ) || ! is_array( $filter[ 'function' ] ) ) { |
|
894 | + continue; |
|
895 | + } |
|
890 | 896 | // If first value in array is not an object, it can't be a class |
891 | - if ( ! is_object( $filter[ 'function' ][ 0 ] ) ) continue; |
|
897 | + if ( ! is_object( $filter[ 'function' ][ 0 ] ) ) { |
|
898 | + continue; |
|
899 | + } |
|
892 | 900 | // Method doesn't match the one we're looking for, goto next |
893 | - if ( $filter[ 'function' ][ 1 ] !== $method_name ) continue; |
|
901 | + if ( $filter[ 'function' ][ 1 ] !== $method_name ) { |
|
902 | + continue; |
|
903 | + } |
|
894 | 904 | // Method matched, now let's check the Class |
895 | 905 | if ( get_class( $filter[ 'function' ][ 0 ] ) === $class_name ) { |
896 | 906 | // Now let's remove it from the array |
897 | 907 | unset( $callbacks[ $priority ][ $filter_id ] ); |
898 | 908 | // and if it was the only filter in that priority, unset that priority |
899 | - if ( empty( $callbacks[ $priority ] ) ) unset( $callbacks[ $priority ] ); |
|
909 | + if ( empty( $callbacks[ $priority ] ) ) { |
|
910 | + unset( $callbacks[ $priority ] ); |
|
911 | + } |
|
900 | 912 | // and if the only filter for that tag, set the tag to an empty array |
901 | - if ( empty( $callbacks ) ) $callbacks = array(); |
|
913 | + if ( empty( $callbacks ) ) { |
|
914 | + $callbacks = array(); |
|
915 | + } |
|
902 | 916 | // If using WordPress older than 4.7 |
903 | 917 | if ( ! is_object( $wp_filter[ $tag ] ) ) { |
904 | 918 | // Remove this filter from merged_filters, which specifies if filters have been sorted |
@@ -10,7 +10,9 @@ |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly |
13 | -if ( !defined( 'ABSPATH' ) ) exit; |
|
13 | +if ( !defined( 'ABSPATH' ) ) { |
|
14 | + exit; |
|
15 | +} |
|
14 | 16 | |
15 | 17 | /** |
16 | 18 | * Get the settings for a section |
@@ -10,7 +10,9 @@ |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly |
13 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
13 | +if ( ! defined( 'ABSPATH' ) ) { |
|
14 | + exit; |
|
15 | +} |
|
14 | 16 | |
15 | 17 | /** |
16 | 18 | * Callback for displaying the UI for support tab. |