@@ -644,14 +644,14 @@ discard block |
||
| 644 | 644 | |
| 645 | 645 | if ( $child instanceof WordPoints_Entity_Attr ) { |
| 646 | 646 | |
| 647 | - $child_data[ $child_slug ]['_type'] = 'attr'; |
|
| 648 | - $child_data[ $child_slug ]['data_type'] = $child->get_data_type(); |
|
| 647 | + $child_data[ $child_slug ][ '_type' ] = 'attr'; |
|
| 648 | + $child_data[ $child_slug ][ 'data_type' ] = $child->get_data_type(); |
|
| 649 | 649 | |
| 650 | 650 | } elseif ( $child instanceof WordPoints_Entity_Relationship ) { |
| 651 | 651 | |
| 652 | - $child_data[ $child_slug ]['_type'] = 'relationship'; |
|
| 653 | - $child_data[ $child_slug ]['primary'] = $child->get_primary_entity_slug(); |
|
| 654 | - $child_data[ $child_slug ]['secondary'] = $child->get_related_entity_slug(); |
|
| 652 | + $child_data[ $child_slug ][ '_type' ] = 'relationship'; |
|
| 653 | + $child_data[ $child_slug ][ 'primary' ] = $child->get_primary_entity_slug(); |
|
| 654 | + $child_data[ $child_slug ][ 'secondary' ] = $child->get_related_entity_slug(); |
|
| 655 | 655 | } |
| 656 | 656 | |
| 657 | 657 | /** |
@@ -683,14 +683,14 @@ discard block |
||
| 683 | 683 | |
| 684 | 684 | foreach ( $entity->get_enumerated_values() as $value ) { |
| 685 | 685 | if ( $entity->set_the_value( $value ) ) { |
| 686 | - $values[] = array( |
|
| 686 | + $values[ ] = array( |
|
| 687 | 687 | 'value' => $entity->get_the_id(), |
| 688 | 688 | 'label' => $entity->get_the_human_id(), |
| 689 | 689 | ); |
| 690 | 690 | } |
| 691 | 691 | } |
| 692 | 692 | |
| 693 | - $entities_data[ $slug ]['values'] = $values; |
|
| 693 | + $entities_data[ $slug ][ 'values' ] = $values; |
|
| 694 | 694 | } |
| 695 | 695 | |
| 696 | 696 | /** |
@@ -822,9 +822,9 @@ discard block |
||
| 822 | 822 | |
| 823 | 823 | $args = array_merge( $defaults, $args ); |
| 824 | 824 | |
| 825 | - if ( isset( $args['dismissable'] ) ) { |
|
| 825 | + if ( isset( $args[ 'dismissable' ] ) ) { |
|
| 826 | 826 | |
| 827 | - $args['dismissible'] = $args['dismissable']; |
|
| 827 | + $args[ 'dismissible' ] = $args[ 'dismissable' ]; |
|
| 828 | 828 | |
| 829 | 829 | _deprecated_argument( |
| 830 | 830 | __FUNCTION__ |
@@ -844,26 +844,26 @@ discard block |
||
| 844 | 844 | ); |
| 845 | 845 | } |
| 846 | 846 | |
| 847 | - if ( $args['dismissible'] && $args['option'] ) { |
|
| 847 | + if ( $args[ 'dismissible' ] && $args[ 'option' ] ) { |
|
| 848 | 848 | wp_enqueue_script( 'wordpoints-admin-dismiss-notice' ); |
| 849 | 849 | } |
| 850 | 850 | |
| 851 | 851 | ?> |
| 852 | 852 | |
| 853 | 853 | <div |
| 854 | - class="notice notice-<?php echo sanitize_html_class( $type, 'success' ); ?><?php echo ( $args['dismissible'] ) ? ' is-dismissible' : ''; ?>" |
|
| 855 | - <?php if ( $args['dismissible'] && $args['option'] ) : ?> |
|
| 856 | - data-nonce="<?php echo esc_attr( wp_create_nonce( "wordpoints_dismiss_notice-{$args['option']}" ) ); ?>" |
|
| 857 | - data-option="<?php echo esc_attr( $args['option'] ); ?>" |
|
| 854 | + class="notice notice-<?php echo sanitize_html_class( $type, 'success' ); ?><?php echo ( $args[ 'dismissible' ] ) ? ' is-dismissible' : ''; ?>" |
|
| 855 | + <?php if ( $args[ 'dismissible' ] && $args[ 'option' ] ) : ?> |
|
| 856 | + data-nonce="<?php echo esc_attr( wp_create_nonce( "wordpoints_dismiss_notice-{$args[ 'option' ]}" ) ); ?>" |
|
| 857 | + data-option="<?php echo esc_attr( $args[ 'option' ] ); ?>" |
|
| 858 | 858 | <?php endif; ?> |
| 859 | 859 | > |
| 860 | 860 | <p> |
| 861 | 861 | <?php echo wp_kses( $message, 'wordpoints_admin_message' ); ?> |
| 862 | 862 | </p> |
| 863 | - <?php if ( $args['dismissible'] && $args['option'] ) : ?> |
|
| 863 | + <?php if ( $args[ 'dismissible' ] && $args[ 'option' ] ) : ?> |
|
| 864 | 864 | <form method="post" class="wordpoints-notice-dismiss-form" style="padding-bottom: 5px;"> |
| 865 | - <input type="hidden" name="wordpoints_notice" value="<?php echo esc_html( $args['option'] ); ?>" /> |
|
| 866 | - <?php wp_nonce_field( "wordpoints_dismiss_notice-{$args['option']}" ); ?> |
|
| 865 | + <input type="hidden" name="wordpoints_notice" value="<?php echo esc_html( $args[ 'option' ] ); ?>" /> |
|
| 866 | + <?php wp_nonce_field( "wordpoints_dismiss_notice-{$args[ 'option' ]}" ); ?> |
|
| 867 | 867 | <?php submit_button( __( 'Hide This Notice', 'wordpoints' ), 'secondary', 'wordpoints_dismiss_notice', false ); ?> |
| 868 | 868 | </form> |
| 869 | 869 | <?php endif; ?> |
@@ -886,9 +886,9 @@ discard block |
||
| 886 | 886 | |
| 887 | 887 | $tab = ''; |
| 888 | 888 | |
| 889 | - if ( isset( $_GET['tab'] ) ) { // WPCS: CSRF OK. |
|
| 889 | + if ( isset( $_GET[ 'tab' ] ) ) { // WPCS: CSRF OK. |
|
| 890 | 890 | |
| 891 | - $tab = sanitize_key( $_GET['tab'] ); // WPCS: CSRF OK. |
|
| 891 | + $tab = sanitize_key( $_GET[ 'tab' ] ); // WPCS: CSRF OK. |
|
| 892 | 892 | } |
| 893 | 893 | |
| 894 | 894 | if ( isset( $tabs ) && ! isset( $tabs[ $tab ] ) ) { |
@@ -925,8 +925,8 @@ discard block |
||
| 925 | 925 | |
| 926 | 926 | $page = ''; |
| 927 | 927 | |
| 928 | - if ( isset( $_GET['page'] ) ) { // WPCS: CSRF OK. |
|
| 929 | - $page = sanitize_key( $_GET['page'] ); // WPCS: CSRF OK. |
|
| 928 | + if ( isset( $_GET[ 'page' ] ) ) { // WPCS: CSRF OK. |
|
| 929 | + $page = sanitize_key( $_GET[ 'page' ] ); // WPCS: CSRF OK. |
|
| 930 | 930 | } |
| 931 | 931 | |
| 932 | 932 | foreach ( $tabs as $tab => $name ) { |
@@ -1067,7 +1067,7 @@ discard block |
||
| 1067 | 1067 | |
| 1068 | 1068 | $info = wordpoints_get_module_data( $file, false, false ); |
| 1069 | 1069 | |
| 1070 | - if ( ! empty( $info['name'] ) ) { |
|
| 1070 | + if ( ! empty( $info[ 'name' ] ) ) { |
|
| 1071 | 1071 | $source = new WP_Error( |
| 1072 | 1072 | 'wordpoints_module_archive_not_plugin' |
| 1073 | 1073 | , $source->get_error_message() |
@@ -1207,9 +1207,9 @@ discard block |
||
| 1207 | 1207 | , 'post' |
| 1208 | 1208 | ); |
| 1209 | 1209 | |
| 1210 | - if ( $is_notice_dismissed && isset( $_POST['wordpoints_notice'] ) ) { |
|
| 1210 | + if ( $is_notice_dismissed && isset( $_POST[ 'wordpoints_notice' ] ) ) { |
|
| 1211 | 1211 | |
| 1212 | - $option = sanitize_key( $_POST['wordpoints_notice'] ); |
|
| 1212 | + $option = sanitize_key( $_POST[ 'wordpoints_notice' ] ); |
|
| 1213 | 1213 | |
| 1214 | 1214 | if ( ! is_network_admin() && 'wordpoints_incompatible_modules' === $option ) { |
| 1215 | 1215 | delete_option( $option ); |
@@ -1264,7 +1264,7 @@ discard block |
||
| 1264 | 1264 | */ |
| 1265 | 1265 | function wordpoints_admin_ajax_breaking_module_check() { |
| 1266 | 1266 | |
| 1267 | - if ( ! isset( $_GET['wordpoints_module_check'] ) ) { // WPCS: CSRF OK. |
|
| 1267 | + if ( ! isset( $_GET[ 'wordpoints_module_check' ] ) ) { // WPCS: CSRF OK. |
|
| 1268 | 1268 | wp_die( '', 400 ); |
| 1269 | 1269 | } |
| 1270 | 1270 | |
@@ -1274,12 +1274,12 @@ discard block |
||
| 1274 | 1274 | $nonce = get_option( 'wordpoints_module_check_nonce' ); |
| 1275 | 1275 | } |
| 1276 | 1276 | |
| 1277 | - if ( ! $nonce || ! hash_equals( $nonce, sanitize_key( $_GET['wordpoints_module_check'] ) ) ) { // WPCS: CSRF OK. |
|
| 1277 | + if ( ! $nonce || ! hash_equals( $nonce, sanitize_key( $_GET[ 'wordpoints_module_check' ] ) ) ) { // WPCS: CSRF OK. |
|
| 1278 | 1278 | wp_die( '', 403 ); |
| 1279 | 1279 | } |
| 1280 | 1280 | |
| 1281 | 1281 | // The list table constructor calls WP_Screen::get(), which expects this. |
| 1282 | - $GLOBALS['hook_suffix'] = null; |
|
| 1282 | + $GLOBALS[ 'hook_suffix' ] = null; |
|
| 1283 | 1283 | |
| 1284 | 1284 | wordpoints_admin_screen_modules(); |
| 1285 | 1285 | |
@@ -1346,14 +1346,14 @@ discard block |
||
| 1346 | 1346 | |
| 1347 | 1347 | preg_match( |
| 1348 | 1348 | '/requires php (\d+\.\d+(?:\.\d)?)/i' |
| 1349 | - , $info->sections['description'] |
|
| 1349 | + , $info->sections[ 'description' ] |
|
| 1350 | 1350 | , $matches |
| 1351 | 1351 | ); |
| 1352 | 1352 | |
| 1353 | 1353 | $version = false; |
| 1354 | 1354 | |
| 1355 | - if ( ! empty( $matches[1] ) ) { |
|
| 1356 | - $version = $matches[1]; |
|
| 1355 | + if ( ! empty( $matches[ 1 ] ) ) { |
|
| 1356 | + $version = $matches[ 1 ]; |
|
| 1357 | 1357 | } |
| 1358 | 1358 | |
| 1359 | 1359 | $updates->response[ $plugin_basename ]->wordpoints_required_php = $version; |
@@ -1494,7 +1494,7 @@ discard block |
||
| 1494 | 1494 | |
| 1495 | 1495 | // JavaScript to disable the bulk upgrade checkbox. |
| 1496 | 1496 | // See WP_Plugins_List_Table::single_row(). |
| 1497 | - $checkbox_id = 'checkbox_' . md5( $plugin_data['Name'] ); |
|
| 1497 | + $checkbox_id = 'checkbox_' . md5( $plugin_data[ 'Name' ] ); |
|
| 1498 | 1498 | |
| 1499 | 1499 | ?> |
| 1500 | 1500 | |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | return false; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - return $value < $settings['value']; |
|
| 48 | + return $value < $settings[ 'value' ]; |
|
| 49 | 49 | } |
| 50 | 50 | } |
| 51 | 51 | |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | return false; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - return $value > $settings['value']; |
|
| 49 | + return $value > $settings[ 'value' ]; |
|
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - return $settings['value'] === $value; |
|
| 65 | + return $settings[ 'value' ] === $value; |
|
| 66 | 66 | } |
| 67 | 67 | } |
| 68 | 68 | |