@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | |
518 | 518 | if ( |
519 | 519 | ! array_intersect_key( |
520 | - $event_action_types[ $slug ] |
|
520 | + $event_action_types[$slug] |
|
521 | 521 | , $reactor_action_types |
522 | 522 | ) |
523 | 523 | ) { |
@@ -570,18 +570,18 @@ discard block |
||
570 | 570 | |
571 | 571 | foreach ( $this->event_args->get_children( $event_slug ) as $slug => $arg ) { |
572 | 572 | |
573 | - $event_data['args'][ $slug ] = array( |
|
573 | + $event_data['args'][$slug] = array( |
|
574 | 574 | 'slug' => $slug, |
575 | 575 | ); |
576 | 576 | |
577 | 577 | if ( $arg instanceof WordPoints_Hook_ArgI ) { |
578 | - $event_data['args'][ $slug ]['title'] = $arg->get_title(); |
|
579 | - $event_data['args'][ $slug ]['is_stateful'] = $arg->is_stateful(); |
|
578 | + $event_data['args'][$slug]['title'] = $arg->get_title(); |
|
579 | + $event_data['args'][$slug]['is_stateful'] = $arg->is_stateful(); |
|
580 | 580 | } |
581 | 581 | } |
582 | 582 | |
583 | - $this->events_data[ $event_slug ] = $event_data; |
|
584 | - $this->reactions_data[ $event_slug ] = $data; |
|
583 | + $this->events_data[$event_slug] = $event_data; |
|
584 | + $this->reactions_data[$event_slug] = $data; |
|
585 | 585 | |
586 | 586 | ?> |
587 | 587 | |
@@ -629,7 +629,7 @@ discard block |
||
629 | 629 | $tabs = array(); |
630 | 630 | |
631 | 631 | foreach ( $points_types as $slug => $settings ) { |
632 | - $tabs[ $slug ] = $settings['name']; |
|
632 | + $tabs[$slug] = $settings['name']; |
|
633 | 633 | } |
634 | 634 | |
635 | 635 | $tabs['add-new'] = __( 'Add New', 'wordpoints' ); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | 'wordpoints_modules' => true, |
174 | 174 | ); |
175 | 175 | |
176 | - if ( $plugin_page && isset( $hidden_submenus[ $plugin_page ] ) ) { |
|
176 | + if ( $plugin_page && isset( $hidden_submenus[$plugin_page] ) ) { |
|
177 | 177 | $submenu_file = 'wordpoints_extensions'; |
178 | 178 | } |
179 | 179 | |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | foreach ( $objects as $slug => $object ) { |
681 | 681 | |
682 | 682 | if ( $object instanceof WordPoints_Hook_UI_Script_Data_ProviderI ) { |
683 | - $data[ $slug ] = $object->get_ui_script_data(); |
|
683 | + $data[$slug] = $object->get_ui_script_data(); |
|
684 | 684 | } |
685 | 685 | |
686 | 686 | if ( wp_script_is( "wordpoints-hooks-{$type}-{$slug}", 'registered' ) ) { |
@@ -715,21 +715,21 @@ discard block |
||
715 | 715 | /** @var WordPoints_EntityishI $child */ |
716 | 716 | foreach ( $entity_children->get_children( $slug ) as $child_slug => $child ) { |
717 | 717 | |
718 | - $child_data[ $child_slug ] = array( |
|
718 | + $child_data[$child_slug] = array( |
|
719 | 719 | 'slug' => $child_slug, |
720 | 720 | 'title' => $child->get_title(), |
721 | 721 | ); |
722 | 722 | |
723 | 723 | if ( $child instanceof WordPoints_Entity_Attr ) { |
724 | 724 | |
725 | - $child_data[ $child_slug ]['_type'] = 'attr'; |
|
726 | - $child_data[ $child_slug ]['data_type'] = $child->get_data_type(); |
|
725 | + $child_data[$child_slug]['_type'] = 'attr'; |
|
726 | + $child_data[$child_slug]['data_type'] = $child->get_data_type(); |
|
727 | 727 | |
728 | 728 | } elseif ( $child instanceof WordPoints_Entity_Relationship ) { |
729 | 729 | |
730 | - $child_data[ $child_slug ]['_type'] = 'relationship'; |
|
731 | - $child_data[ $child_slug ]['primary'] = $child->get_primary_entity_slug(); |
|
732 | - $child_data[ $child_slug ]['secondary'] = $child->get_related_entity_slug(); |
|
730 | + $child_data[$child_slug]['_type'] = 'relationship'; |
|
731 | + $child_data[$child_slug]['primary'] = $child->get_primary_entity_slug(); |
|
732 | + $child_data[$child_slug]['secondary'] = $child->get_related_entity_slug(); |
|
733 | 733 | } |
734 | 734 | |
735 | 735 | /** |
@@ -740,14 +740,14 @@ discard block |
||
740 | 740 | * @param array $data The data for the entity child. |
741 | 741 | * @param WordPoints_Entityish $child The child's object. |
742 | 742 | */ |
743 | - $child_data[ $child_slug ] = apply_filters( |
|
743 | + $child_data[$child_slug] = apply_filters( |
|
744 | 744 | 'wordpoints_hooks_ui_data_entity_child' |
745 | - , $child_data[ $child_slug ] |
|
745 | + , $child_data[$child_slug] |
|
746 | 746 | , $child |
747 | 747 | ); |
748 | 748 | } |
749 | 749 | |
750 | - $entities_data[ $slug ] = array( |
|
750 | + $entities_data[$slug] = array( |
|
751 | 751 | 'slug' => $slug, |
752 | 752 | 'title' => $entity->get_title(), |
753 | 753 | 'children' => $child_data, |
@@ -768,7 +768,7 @@ discard block |
||
768 | 768 | } |
769 | 769 | } |
770 | 770 | |
771 | - $entities_data[ $slug ]['values'] = $values; |
|
771 | + $entities_data[$slug]['values'] = $values; |
|
772 | 772 | } |
773 | 773 | |
774 | 774 | /** |
@@ -777,9 +777,9 @@ discard block |
||
777 | 777 | * @param array $data The data for the entity. |
778 | 778 | * @param WordPoints_Entity $entity The entity object. |
779 | 779 | */ |
780 | - $entities_data[ $slug ] = apply_filters( |
|
780 | + $entities_data[$slug] = apply_filters( |
|
781 | 781 | 'wordpoints_hooks_ui_data_entity' |
782 | - , $entities_data[ $slug ] |
|
782 | + , $entities_data[$slug] |
|
783 | 783 | , $entity |
784 | 784 | ); |
785 | 785 | |
@@ -812,7 +812,7 @@ discard block |
||
812 | 812 | // this, so that we have the action types indexed by event slug. |
813 | 813 | foreach ( $event_index as $action_type => $events ) { |
814 | 814 | foreach ( $events as $event => $unused ) { |
815 | - $event_action_types[ $event ][ $action_type ] = true; |
|
815 | + $event_action_types[$event][$action_type] = true; |
|
816 | 816 | } |
817 | 817 | } |
818 | 818 | |
@@ -969,7 +969,7 @@ discard block |
||
969 | 969 | $tab = sanitize_key( $_GET['tab'] ); // WPCS: CSRF OK. |
970 | 970 | } |
971 | 971 | |
972 | - if ( isset( $tabs ) && ! isset( $tabs[ $tab ] ) ) { |
|
972 | + if ( isset( $tabs ) && ! isset( $tabs[$tab] ) ) { |
|
973 | 973 | |
974 | 974 | reset( $tabs ); |
975 | 975 | $tab = key( $tabs ); |
@@ -996,7 +996,7 @@ discard block |
||
996 | 996 | if ( $show_heading ) { |
997 | 997 | |
998 | 998 | // translators: Current tab name. |
999 | - echo '<h1>', esc_html( sprintf( __( 'WordPoints — %s', 'wordpoints' ), $tabs[ $current ] ) ), '</h1>'; |
|
999 | + echo '<h1>', esc_html( sprintf( __( 'WordPoints — %s', 'wordpoints' ), $tabs[$current] ) ), '</h1>'; |
|
1000 | 1000 | } |
1001 | 1001 | |
1002 | 1002 | echo '<h2 class="nav-tab-wrapper">'; |
@@ -1470,20 +1470,20 @@ discard block |
||
1470 | 1470 | |
1471 | 1471 | $url = sanitize_title_with_dashes( $server->get_slug() ); |
1472 | 1472 | |
1473 | - if ( ! isset( $_POST[ "license_key-{$url}-{$extension['ID']}" ] ) ) { |
|
1473 | + if ( ! isset( $_POST["license_key-{$url}-{$extension['ID']}"] ) ) { |
|
1474 | 1474 | continue; |
1475 | 1475 | } |
1476 | 1476 | |
1477 | 1477 | $license_key = sanitize_key( |
1478 | - $_POST[ "license_key-{$url}-{$extension['ID']}" ] |
|
1478 | + $_POST["license_key-{$url}-{$extension['ID']}"] |
|
1479 | 1479 | ); |
1480 | 1480 | |
1481 | 1481 | $license = $api->get_extension_license_object( $extension_data, $license_key ); |
1482 | 1482 | |
1483 | 1483 | if ( |
1484 | 1484 | isset( |
1485 | - $_POST[ "activate-license-{$extension['ID']}" ] |
|
1486 | - , $_POST[ "wordpoints_activate_license_key-{$extension['ID']}" ] |
|
1485 | + $_POST["activate-license-{$extension['ID']}"] |
|
1486 | + , $_POST["wordpoints_activate_license_key-{$extension['ID']}"] |
|
1487 | 1487 | ) |
1488 | 1488 | && wordpoints_verify_nonce( |
1489 | 1489 | "wordpoints_activate_license_key-{$extension['ID']}" |
@@ -1529,8 +1529,8 @@ discard block |
||
1529 | 1529 | |
1530 | 1530 | } elseif ( |
1531 | 1531 | isset( |
1532 | - $_POST[ "deactivate-license-{$extension['ID']}" ] |
|
1533 | - , $_POST[ "wordpoints_deactivate_license_key-{$extension['ID']}" ] |
|
1532 | + $_POST["deactivate-license-{$extension['ID']}"] |
|
1533 | + , $_POST["wordpoints_deactivate_license_key-{$extension['ID']}"] |
|
1534 | 1534 | ) |
1535 | 1535 | && wordpoints_verify_nonce( |
1536 | 1536 | "wordpoints_deactivate_license_key-{$extension['ID']}" |
@@ -1786,11 +1786,11 @@ discard block |
||
1786 | 1786 | |
1787 | 1787 | $extensions = wordpoints_get_modules(); |
1788 | 1788 | |
1789 | - if ( ! isset( $extensions[ $extension_file ] ) ) { |
|
1789 | + if ( ! isset( $extensions[$extension_file] ) ) { |
|
1790 | 1790 | wp_die( esc_html__( 'That extension does not exist.', 'wordpoints' ), 200 ); |
1791 | 1791 | } |
1792 | 1792 | |
1793 | - $server = wordpoints_get_server_for_extension( $extensions[ $extension_file ] ); |
|
1793 | + $server = wordpoints_get_server_for_extension( $extensions[$extension_file] ); |
|
1794 | 1794 | |
1795 | 1795 | if ( ! $server ) { |
1796 | 1796 | wp_die( esc_html__( 'There is no server specified for this extension.', 'wordpoints' ), 200 ); |
@@ -1803,7 +1803,7 @@ discard block |
||
1803 | 1803 | } |
1804 | 1804 | |
1805 | 1805 | $extension_data = new WordPoints_Extension_Server_API_Extension_Data( |
1806 | - $extensions[ $extension_file ]['ID'] |
|
1806 | + $extensions[$extension_file]['ID'] |
|
1807 | 1807 | , $server |
1808 | 1808 | ); |
1809 | 1809 | |
@@ -2180,7 +2180,7 @@ discard block |
||
2180 | 2180 | |
2181 | 2181 | foreach ( $merged_extensions as $i => $extension ) { |
2182 | 2182 | if ( true !== wordpoints_validate_module( $extension ) ) { |
2183 | - unset( $merged_extensions[ $i ] ); |
|
2183 | + unset( $merged_extensions[$i] ); |
|
2184 | 2184 | } |
2185 | 2185 | } |
2186 | 2186 | |
@@ -2358,11 +2358,11 @@ discard block |
||
2358 | 2358 | // this transient. |
2359 | 2359 | $updates = get_site_transient( 'update_plugins' ); |
2360 | 2360 | |
2361 | - if ( ! isset( $updates->response[ $plugin_basename ] ) ) { |
|
2361 | + if ( ! isset( $updates->response[$plugin_basename] ) ) { |
|
2362 | 2362 | return false; |
2363 | 2363 | } |
2364 | 2364 | |
2365 | - if ( ! isset( $updates->response[ $plugin_basename ]->wordpoints_required_php ) ) { |
|
2365 | + if ( ! isset( $updates->response[$plugin_basename]->wordpoints_required_php ) ) { |
|
2366 | 2366 | |
2367 | 2367 | /** |
2368 | 2368 | * The plugin install functions. |
@@ -2397,13 +2397,13 @@ discard block |
||
2397 | 2397 | $version = $matches[1]; |
2398 | 2398 | } |
2399 | 2399 | |
2400 | - $updates->response[ $plugin_basename ]->wordpoints_required_php = $version; |
|
2400 | + $updates->response[$plugin_basename]->wordpoints_required_php = $version; |
|
2401 | 2401 | |
2402 | 2402 | set_site_transient( 'update_plugins', $updates ); |
2403 | 2403 | |
2404 | 2404 | } // End if ( PHP requirements not in cache ). |
2405 | 2405 | |
2406 | - return $updates->response[ $plugin_basename ]->wordpoints_required_php; |
|
2406 | + return $updates->response[$plugin_basename]->wordpoints_required_php; |
|
2407 | 2407 | } |
2408 | 2408 | |
2409 | 2409 | /** |
@@ -2485,11 +2485,11 @@ discard block |
||
2485 | 2485 | // First check that there is actually an update available. |
2486 | 2486 | $updates = get_site_transient( 'update_plugins' ); |
2487 | 2487 | |
2488 | - if ( ! isset( $updates->response[ $file ] ) ) { |
|
2488 | + if ( ! isset( $updates->response[$file] ) ) { |
|
2489 | 2489 | return; |
2490 | 2490 | } |
2491 | 2491 | |
2492 | - $response = $updates->response[ $file ]; |
|
2492 | + $response = $updates->response[$file]; |
|
2493 | 2493 | |
2494 | 2494 | $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' ); |
2495 | 2495 | |
@@ -2618,8 +2618,8 @@ discard block |
||
2618 | 2618 | |
2619 | 2619 | $plugin_basename = plugin_basename( WORDPOINTS_DIR . '/wordpoints.php' ); |
2620 | 2620 | |
2621 | - if ( isset( $data->response[ $plugin_basename ] ) ) { |
|
2622 | - unset( $data->response[ $plugin_basename ] ); |
|
2621 | + if ( isset( $data->response[$plugin_basename] ) ) { |
|
2622 | + unset( $data->response[$plugin_basename] ); |
|
2623 | 2623 | } |
2624 | 2624 | |
2625 | 2625 | return $data; |