@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | return false; |
24 | 24 | } |
25 | 25 | |
26 | - if( ! function_exists( '\get_current_screen' ) ) { |
|
26 | + if ( ! function_exists( '\get_current_screen' ) ) { |
|
27 | 27 | return false; |
28 | 28 | } |
29 | 29 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | return true; |
35 | 35 | } |
36 | 36 | |
37 | - $context = $args[1]; |
|
37 | + $context = $args[ 1 ]; |
|
38 | 38 | |
39 | 39 | /** |
40 | 40 | * Assume false by default. |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $is_page = 'single'; |
51 | 51 | } else if ( $is_gv_settings = 'gravityview_page_gravityview_settings' === $current_screen->id ) { |
52 | 52 | $is_page = 'settings'; |
53 | - } else if( $is_extensions = 'gravityview_page_gv-admin-installer' === $current_screen->id ) { |
|
53 | + } else if ( $is_extensions = 'gravityview_page_gv-admin-installer' === $current_screen->id ) { |
|
54 | 54 | $is_page = 'downloads'; |
55 | 55 | } |
56 | 56 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | * @param[in,out] string|bool $is_page If false, no. If string, the name of the page (`single`, `settings`, or `views`) |
61 | 61 | * @param[in] string $hook The name of the page to check against. Is passed to the method. |
62 | 62 | */ |
63 | - $is_page = apply_filters( 'gravityview_is_admin_page', $is_page, $args[0] ); |
|
63 | + $is_page = apply_filters( 'gravityview_is_admin_page', $is_page, $args[ 0 ] ); |
|
64 | 64 | |
65 | 65 | // If the current page is the same as the compared page |
66 | 66 | if ( ! empty( $context ) ) { |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | $format = '(?:\.(?P<format>html|json))?'; |
134 | 134 | |
135 | - register_rest_route( $namespace, sprintf( '/%s/(?P<id>[\d]+)/%s/(?P<s_id>[\w-]+)%s', $base, $sub_type, $format ) , array( |
|
135 | + register_rest_route( $namespace, sprintf( '/%s/(?P<id>[\d]+)/%s/(?P<s_id>[\w-]+)%s', $base, $sub_type, $format ), array( |
|
136 | 136 | array( |
137 | 137 | 'methods' => \WP_REST_Server::READABLE, |
138 | 138 | 'callback' => array( $this, 'get_sub_item' ), |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | * @return \WP_REST_Response |
384 | 384 | */ |
385 | 385 | protected function not_implemented( ) { |
386 | - $error = new \WP_Error( 'not-implemented-yet', __( 'Endpoint Not Yet Implemented.', 'gravityview' ) ); |
|
386 | + $error = new \WP_Error( 'not-implemented-yet', __( 'Endpoint Not Yet Implemented.', 'gravityview' ) ); |
|
387 | 387 | return new \WP_REST_Response( $error, 501 ); |
388 | 388 | } |
389 | 389 |