@@ -70,12 +70,12 @@ |
||
| 70 | 70 | <?php |
| 71 | 71 | // Translators: strong tag to make text bold, link to website to learn more |
| 72 | 72 | echo sprintf( |
| 73 | - esc_html__('%1$sPlus%2$s, upgrading to pro will unlock %3$sall%4$s of advanced reports, tracking, and integrations. %5$sLearn more about Pro%6$s', 'monsterinsights'), |
|
| 73 | + esc_html__( '%1$sPlus%2$s, upgrading to pro will unlock %3$sall%4$s of advanced reports, tracking, and integrations. %5$sLearn more about Pro%6$s', 'monsterinsights' ), |
|
| 74 | 74 | '<strong>', |
| 75 | 75 | '</strong>', |
| 76 | 76 | '<strong>', |
| 77 | 77 | '</strong>', |
| 78 | - '<a target="_blank" href="' . esc_url($learn_more) . '" title="'. esc_attr__('Upgrade', 'monsterinsights') .'">', |
|
| 78 | + '<a target="_blank" href="' . esc_url( $learn_more ) . '" title="' . esc_attr__( 'Upgrade', 'monsterinsights' ) . '">', |
|
| 79 | 79 | '</a>' |
| 80 | 80 | ); ?> |
| 81 | 81 | </p> |
@@ -44,7 +44,8 @@ |
||
| 44 | 44 | return false; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - if ( 'rcp-payments' !== $_GET['page'] && 'edit-payment' !== $_GET['view'] ) { // phpcs:ignore |
|
| 47 | + if ( 'rcp-payments' !== $_GET['page'] && 'edit-payment' !== $_GET['view'] ) { |
|
| 48 | +// phpcs:ignore |
|
| 48 | 49 | return false; |
| 49 | 50 | } |
| 50 | 51 | |
@@ -44,7 +44,8 @@ |
||
| 44 | 44 | return false; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - if ( 'edd-payment-history' !== $_GET['page'] && 'view-order-details' !== $_GET['view'] ) { // phpcs:ignore |
|
| 47 | + if ( 'edd-payment-history' !== $_GET['page'] && 'view-order-details' !== $_GET['view'] ) { |
|
| 48 | +// phpcs:ignore |
|
| 48 | 49 | return false; |
| 49 | 50 | } |
| 50 | 51 | |
@@ -44,7 +44,8 @@ |
||
| 44 | 44 | return false; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - if ( 'memberpress-trans' !== $_GET['page'] && 'edit' !== $_GET['action'] ) { // phpcs:ignore |
|
| 47 | + if ( 'memberpress-trans' !== $_GET['page'] && 'edit' !== $_GET['action'] ) { |
|
| 48 | +// phpcs:ignore |
|
| 48 | 49 | return false; |
| 49 | 50 | } |
| 50 | 51 | |
@@ -290,7 +290,7 @@ |
||
| 290 | 290 | $this->options = self::wp_parse_args_recursive( get_user_meta( get_current_user_id(), 'monsterinsights_user_preferences', true ), self::$default_options ); |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | - // Set interval fixed to last30days on lite plugin. |
|
| 293 | + // Set interval fixed to last30days on lite plugin. |
|
| 294 | 294 | $this->options['interval'] = 'last30days'; |
| 295 | 295 | |
| 296 | 296 | return apply_filters( 'monsterinsights_dashboard_widget_options', $this->options ); |
@@ -102,8 +102,8 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | // Attept to place the widget at the top. |
| 104 | 104 | $normal_dashboard = $wp_meta_boxes['dashboard']['normal']['core']; |
| 105 | - $widget_instance = array( self::WIDGET_KEY => $normal_dashboard[ self::WIDGET_KEY ] ); |
|
| 106 | - unset( $normal_dashboard[ self::WIDGET_KEY ] ); |
|
| 105 | + $widget_instance = array( self::WIDGET_KEY => $normal_dashboard[self::WIDGET_KEY] ); |
|
| 106 | + unset( $normal_dashboard[self::WIDGET_KEY] ); |
|
| 107 | 107 | $sorted_dashboard = array_merge( $widget_instance, $normal_dashboard ); |
| 108 | 108 | $wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard; |
| 109 | 109 | } |
@@ -185,8 +185,8 @@ discard block |
||
| 185 | 185 | $wp_forms_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=wpforms-lite' ), 'install-plugin_wpforms-lite' ); |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | - $userfeedback_keys = array ( 'userfeedback-lite/userfeedback.php' => 1, 'userfeedback/userfeedback.php' => 2 ); |
|
| 189 | - $userfeedback_versions = array_intersect_key($userfeedback_keys, $plugins); |
|
| 188 | + $userfeedback_keys = array( 'userfeedback-lite/userfeedback.php' => 1, 'userfeedback/userfeedback.php' => 2 ); |
|
| 189 | + $userfeedback_versions = array_intersect_key( $userfeedback_keys, $plugins ); |
|
| 190 | 190 | |
| 191 | 191 | if ( ! empty( $userfeedback_versions ) ) { |
| 192 | 192 | $uf_plugin_key = array_keys( $userfeedback_versions )[0]; |
@@ -310,10 +310,10 @@ discard block |
||
| 310 | 310 | $b = (array) $b; |
| 311 | 311 | $result = $b; |
| 312 | 312 | foreach ( $a as $k => &$v ) { |
| 313 | - if ( is_array( $v ) && isset( $result[ $k ] ) ) { |
|
| 314 | - $result[ $k ] = self::wp_parse_args_recursive( $v, $result[ $k ] ); |
|
| 313 | + if ( is_array( $v ) && isset( $result[$k] ) ) { |
|
| 314 | + $result[$k] = self::wp_parse_args_recursive( $v, $result[$k] ); |
|
| 315 | 315 | } else { |
| 316 | - $result[ $k ] = $v; |
|
| 316 | + $result[$k] = $v; |
|
| 317 | 317 | } |
| 318 | 318 | } |
| 319 | 319 | |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | public function load_notice() { |
| 327 | 327 | |
| 328 | 328 | $screen = get_current_screen(); |
| 329 | - $tracking_id = monsterinsights_get_v4_id(); |
|
| 329 | + $tracking_id = monsterinsights_get_v4_id(); |
|
| 330 | 330 | if ( isset( $screen->id ) && 'dashboard' === $screen->id && ! empty( $tracking_id ) ) { |
| 331 | 331 | ?> |
| 332 | 332 | <div id="monsterinsights-reminder-notice"></div> |
@@ -114,8 +114,8 @@ |
||
| 114 | 114 | ); |
| 115 | 115 | |
| 116 | 116 | // verify params present (oth & download link). |
| 117 | - $post_oth = ! empty( $_REQUEST['oth'] ) ? sanitize_text_field($_REQUEST['oth']) : ''; |
|
| 118 | - $post_url = ! empty( $_REQUEST['file'] ) ? sanitize_url($_REQUEST['file']) : ''; |
|
| 117 | + $post_oth = ! empty( $_REQUEST['oth'] ) ? sanitize_text_field( $_REQUEST['oth'] ) : ''; |
|
| 118 | + $post_url = ! empty( $_REQUEST['file'] ) ? sanitize_url( $_REQUEST['file'] ) : ''; |
|
| 119 | 119 | $license = get_option( 'monsterinsights_connect', false ); |
| 120 | 120 | $network = ! empty( $license['network'] ) ? (bool) $license['network'] : false; |
| 121 | 121 | if ( empty( $post_oth ) || empty( $post_url ) ) { |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | public function is_tracking() { |
| 100 | 100 | |
| 101 | 101 | if ( ! isset( $this->is_tracking ) ) { |
| 102 | - $tracking_id = monsterinsights_get_v4_id(); |
|
| 102 | + $tracking_id = monsterinsights_get_v4_id(); |
|
| 103 | 103 | $this->is_tracking = ! empty( $tracking_id ); |
| 104 | 104 | } |
| 105 | 105 | |
@@ -35,17 +35,17 @@ discard block |
||
| 35 | 35 | if ( ! empty( $data['data']['countries'] ) ) { |
| 36 | 36 | $country_names = monsterinsights_get_country_list( true ); |
| 37 | 37 | foreach ( $data['data']['countries'] as $key => $country ) { |
| 38 | - $data['data']['countries'][ $key ]['name'] = isset( $country_names[ $country['iso'] ] ) ? $country_names[ $country['iso'] ] : $country['iso']; |
|
| 38 | + $data['data']['countries'][$key]['name'] = isset( $country_names[$country['iso']] ) ? $country_names[$country['iso']] : $country['iso']; |
|
| 39 | 39 | } |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | // Escape urls for the top pages report. |
| 43 | 43 | if ( ! empty( $data['data']['toppages'] ) ) { |
| 44 | 44 | foreach ( $data['data']['toppages'] as $key => $page ) { |
| 45 | - $title = $data['data']['toppages'][ $key ]['title']; |
|
| 46 | - $url = '(not set)' === $title ? '' : esc_url( $data['data']['toppages'][ $key ]['hostname'] ); |
|
| 45 | + $title = $data['data']['toppages'][$key]['title']; |
|
| 46 | + $url = '(not set)' === $title ? '' : esc_url( $data['data']['toppages'][$key]['hostname'] ); |
|
| 47 | 47 | |
| 48 | - $data['data']['toppages'][ $key ]['hostname'] = $url; |
|
| 48 | + $data['data']['toppages'][$key]['hostname'] = $url; |
|
| 49 | 49 | } |
| 50 | 50 | } |
| 51 | 51 | |
@@ -78,10 +78,10 @@ discard block |
||
| 78 | 78 | * @return string |
| 79 | 79 | */ |
| 80 | 80 | public function default_end_date() { |
| 81 | - $current_year = date('Y'); |
|
| 81 | + $current_year = date( 'Y' ); |
|
| 82 | 82 | |
| 83 | 83 | // If we are still in 2023 we should get data from yesterday |
| 84 | - if ($current_year === '2023') { |
|
| 84 | + if ( $current_year === '2023' ) { |
|
| 85 | 85 | return date( 'Y-m-d', strtotime( '-1' ) ); |
| 86 | 86 | } |
| 87 | 87 | |
@@ -47,10 +47,10 @@ |
||
| 47 | 47 | // Escape urls for the top pages report. |
| 48 | 48 | if ( ! empty( $data['data']['toppages'] ) ) { |
| 49 | 49 | foreach ( $data['data']['toppages'] as $key => $page ) { |
| 50 | - $title = $data['data']['toppages'][ $key ]['title']; |
|
| 51 | - $url = '(not set)' === $title ? '' : esc_url( $data['data']['toppages'][ $key ]['hostname'] ); |
|
| 50 | + $title = $data['data']['toppages'][$key]['title']; |
|
| 51 | + $url = '(not set)' === $title ? '' : esc_url( $data['data']['toppages'][$key]['hostname'] ); |
|
| 52 | 52 | |
| 53 | - $data['data']['toppages'][ $key ]['hostname'] = $url; |
|
| 53 | + $data['data']['toppages'][$key]['hostname'] = $url; |
|
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | |