@@ -50,7 +50,7 @@ |
||
| 50 | 50 | public function edit_entry_fix_uid_fields( $fields ) { |
| 51 | 51 | |
| 52 | 52 | /** @var GF_Field $field */ |
| 53 | - foreach( $fields as &$field ) { |
|
| 53 | + foreach ( $fields as &$field ) { |
|
| 54 | 54 | if ( 'uid' === $field->type ) { |
| 55 | 55 | |
| 56 | 56 | // Replace GF_Field with GF_Field_Text, copying all the data from $field |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | $hide_coupon_fields = apply_filters( 'gravityview/edit_entry/hide-coupon-fields', $has_transaction_data ); |
| 55 | 55 | |
| 56 | - return (bool) $hide_coupon_fields; |
|
| 56 | + return (bool)$hide_coupon_fields; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | public function edit_entry_field_blacklist( $blacklist = array(), $entry = array() ) { |
| 70 | 70 | |
| 71 | 71 | if ( $this->should_hide_coupon_fields( $entry ) ) { |
| 72 | - $blacklist[] = 'coupon'; |
|
| 72 | + $blacklist[ ] = 'coupon'; |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | return $blacklist; |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | // No coupons match the codes provided |
| 108 | 108 | $discounts = gf_coupons()->get_coupons_by_codes( $coupon_codes, $form ); |
| 109 | 109 | |
| 110 | - if( ! $discounts ) { |
|
| 110 | + if ( ! $discounts ) { |
|
| 111 | 111 | return $value; |
| 112 | 112 | } |
| 113 | 113 | |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | * @see GF_Field_Coupon::get_field_input |
| 117 | 117 | */ |
| 118 | 118 | $_POST = ! isset( $_POST ) ? array() : $_POST; |
| 119 | - $_POST[ 'gf_coupons_' . $form['id'] ] = json_encode( (array) $discounts ); |
|
| 119 | + $_POST[ 'gf_coupons_' . $form[ 'id' ] ] = json_encode( (array)$discounts ); |
|
| 120 | 120 | $_POST[ 'input_' . $field->id ] = implode( ',', $coupon_codes ); |
| 121 | 121 | |
| 122 | 122 | return $value; |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | ?> |
| 14 | 14 | <label for="<?php echo $this->get_field_id(); ?>" class="<?php echo $this->get_label_class(); ?>"><?php |
| 15 | 15 | |
| 16 | - echo '<span class="gv-label">'.$this->get_field_label().'</span>'; |
|
| 16 | + echo '<span class="gv-label">' . $this->get_field_label() . '</span>'; |
|
| 17 | 17 | |
| 18 | 18 | echo $this->get_tooltip() . $this->get_field_desc(); |
| 19 | 19 | |
@@ -26,14 +26,14 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | function render_input( $override_input = null ) { |
| 28 | 28 | |
| 29 | - if( isset( $override_input ) ) { |
|
| 29 | + if ( isset( $override_input ) ) { |
|
| 30 | 30 | echo $override_input; |
| 31 | 31 | return; |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | ?> |
| 35 | 35 | <select name="<?php echo esc_attr( $this->name ); ?>[]" id="<?php echo $this->get_field_id(); ?>" multiple="multiple"> |
| 36 | - <?php foreach( $this->field['options'] as $value => $label ) : ?> |
|
| 36 | + <?php foreach ( $this->field[ 'options' ] as $value => $label ) : ?> |
|
| 37 | 37 | <option value="<?php echo esc_attr( $value ); ?>" <?php selected( in_array( $value, (array)$this->value ), true, true ); ?>><?php echo esc_html( $label ); ?></option> |
| 38 | 38 | <?php endforeach; ?> |
| 39 | 39 | </select> |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | $widget_ops = array( |
| 13 | 13 | 'classname' => 'widget_gravityview_search', |
| 14 | - 'description' => __( 'A search form for a specific GravityView.', 'gravityview') |
|
| 14 | + 'description' => __( 'A search form for a specific GravityView.', 'gravityview' ) |
|
| 15 | 15 | ); |
| 16 | 16 | |
| 17 | 17 | $widget_display = array( |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | private function load_required_files() { |
| 37 | - if( !class_exists( 'GravityView_Widget_Search' ) ) { |
|
| 37 | + if ( ! class_exists( 'GravityView_Widget_Search' ) ) { |
|
| 38 | 38 | gravityview_register_gravityview_widgets(); |
| 39 | 39 | } |
| 40 | 40 | } |
@@ -53,30 +53,30 @@ discard block |
||
| 53 | 53 | public function widget( $args, $instance ) { |
| 54 | 54 | |
| 55 | 55 | // Don't show unless a View ID has been set. |
| 56 | - if( empty( $instance['view_id'] ) ) { |
|
| 56 | + if ( empty( $instance[ 'view_id' ] ) ) { |
|
| 57 | 57 | |
| 58 | - do_action('gravityview_log_debug', sprintf( '%s[widget]: No View ID has been defined. Not showing the widget.', get_class($this)), $instance ); |
|
| 58 | + do_action( 'gravityview_log_debug', sprintf( '%s[widget]: No View ID has been defined. Not showing the widget.', get_class( $this ) ), $instance ); |
|
| 59 | 59 | |
| 60 | 60 | return; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** This filter is documented in wp-includes/default-widgets.php */ |
| 64 | - $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); |
|
| 64 | + $title = apply_filters( 'widget_title', empty( $instance[ 'title' ] ) ? '' : $instance[ 'title' ], $instance, $this->id_base ); |
|
| 65 | 65 | |
| 66 | - echo $args['before_widget']; |
|
| 66 | + echo $args[ 'before_widget' ]; |
|
| 67 | 67 | |
| 68 | 68 | if ( $title ) { |
| 69 | - echo $args['before_title'] . $title . $args['after_title']; |
|
| 69 | + echo $args[ 'before_title' ] . $title . $args[ 'after_title' ]; |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | // @todo Add to the widget configuration form |
| 73 | - $instance['search_layout'] = apply_filters( 'gravityview/widget/search/layout', 'vertical', $instance ); |
|
| 73 | + $instance[ 'search_layout' ] = apply_filters( 'gravityview/widget/search/layout', 'vertical', $instance ); |
|
| 74 | 74 | |
| 75 | - $instance['context'] = 'wp_widget'; |
|
| 75 | + $instance[ 'context' ] = 'wp_widget'; |
|
| 76 | 76 | |
| 77 | 77 | // form |
| 78 | - $instance['form_id'] = GVCommon::get_meta_form_id( $instance['view_id'] ); |
|
| 79 | - $instance['form'] = GVCommon::get_form( $instance['form_id'] ); |
|
| 78 | + $instance[ 'form_id' ] = GVCommon::get_meta_form_id( $instance[ 'view_id' ] ); |
|
| 79 | + $instance[ 'form' ] = GVCommon::get_form( $instance[ 'form_id' ] ); |
|
| 80 | 80 | |
| 81 | 81 | // We don't want to overwrite existing context, etc. |
| 82 | 82 | $previous_view = GravityView_View::getInstance(); |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | new GravityView_View( $previous_view ); |
| 94 | 94 | |
| 95 | - echo $args['after_widget']; |
|
| 95 | + echo $args[ 'after_widget' ]; |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | /** |
@@ -102,27 +102,27 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | $instance = $old_instance; |
| 104 | 104 | |
| 105 | - if( $this->is_preview() ) { |
|
| 105 | + if ( $this->is_preview() ) { |
|
| 106 | 106 | //Oh! Sorry but still not fully compatible with customizer |
| 107 | 107 | return $instance; |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | - $new_instance = wp_parse_args( (array) $new_instance, self::get_defaults() ); |
|
| 110 | + $new_instance = wp_parse_args( (array)$new_instance, self::get_defaults() ); |
|
| 111 | 111 | |
| 112 | - $instance['title'] = strip_tags( $new_instance['title'] ); |
|
| 113 | - $instance['view_id'] = absint( $new_instance['view_id'] ); |
|
| 114 | - $instance['search_fields'] = $new_instance['search_fields']; |
|
| 115 | - $instance['post_id'] = $new_instance['post_id']; |
|
| 116 | - $instance['search_clear'] = $new_instance['search_clear']; |
|
| 117 | - $instance['search_mode'] = $new_instance['search_mode']; |
|
| 112 | + $instance[ 'title' ] = strip_tags( $new_instance[ 'title' ] ); |
|
| 113 | + $instance[ 'view_id' ] = absint( $new_instance[ 'view_id' ] ); |
|
| 114 | + $instance[ 'search_fields' ] = $new_instance[ 'search_fields' ]; |
|
| 115 | + $instance[ 'post_id' ] = $new_instance[ 'post_id' ]; |
|
| 116 | + $instance[ 'search_clear' ] = $new_instance[ 'search_clear' ]; |
|
| 117 | + $instance[ 'search_mode' ] = $new_instance[ 'search_mode' ]; |
|
| 118 | 118 | |
| 119 | - $is_valid_embed_id = GravityView_View_Data::is_valid_embed_id( $new_instance['post_id'], $instance['view_id'] ); |
|
| 119 | + $is_valid_embed_id = GravityView_View_Data::is_valid_embed_id( $new_instance[ 'post_id' ], $instance[ 'view_id' ] ); |
|
| 120 | 120 | |
| 121 | 121 | //check if post_id is a valid post with embedded View |
| 122 | - $instance['error_post_id'] = is_wp_error( $is_valid_embed_id ) ? $is_valid_embed_id->get_error_message() : NULL; |
|
| 122 | + $instance[ 'error_post_id' ] = is_wp_error( $is_valid_embed_id ) ? $is_valid_embed_id->get_error_message() : NULL; |
|
| 123 | 123 | |
| 124 | 124 | // Share that the widget isn't brand new |
| 125 | - $instance['updated'] = 1; |
|
| 125 | + $instance[ 'updated' ] = 1; |
|
| 126 | 126 | |
| 127 | 127 | return $instance; |
| 128 | 128 | } |
@@ -133,28 +133,28 @@ discard block |
||
| 133 | 133 | public function form( $instance ) { |
| 134 | 134 | |
| 135 | 135 | // @todo Make compatible with Customizer |
| 136 | - if( $this->is_preview() ) { |
|
| 136 | + if ( $this->is_preview() ) { |
|
| 137 | 137 | |
| 138 | - $warning = sprintf( esc_html__( 'This widget is not configurable from this screen. Please configure it on the %sWidgets page%s.', 'gravityview' ), '<a href="'.admin_url('widgets.php').'">', '</a>' ); |
|
| 138 | + $warning = sprintf( esc_html__( 'This widget is not configurable from this screen. Please configure it on the %sWidgets page%s.', 'gravityview' ), '<a href="' . admin_url( 'widgets.php' ) . '">', '</a>' ); |
|
| 139 | 139 | |
| 140 | 140 | echo wpautop( GravityView_Admin::get_floaty() . $warning ); |
| 141 | 141 | |
| 142 | 142 | return; |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | - $instance = wp_parse_args( (array) $instance, self::get_defaults() ); |
|
| 145 | + $instance = wp_parse_args( (array)$instance, self::get_defaults() ); |
|
| 146 | 146 | |
| 147 | - $title = $instance['title']; |
|
| 148 | - $view_id = $instance['view_id']; |
|
| 149 | - $post_id = $instance['post_id']; |
|
| 150 | - $search_fields = $instance['search_fields']; |
|
| 151 | - $search_clear = $instance['search_clear']; |
|
| 152 | - $search_mode = $instance['search_mode']; |
|
| 147 | + $title = $instance[ 'title' ]; |
|
| 148 | + $view_id = $instance[ 'view_id' ]; |
|
| 149 | + $post_id = $instance[ 'post_id' ]; |
|
| 150 | + $search_fields = $instance[ 'search_fields' ]; |
|
| 151 | + $search_clear = $instance[ 'search_clear' ]; |
|
| 152 | + $search_mode = $instance[ 'search_mode' ]; |
|
| 153 | 153 | |
| 154 | 154 | $views = GVCommon::get_all_views(); |
| 155 | 155 | |
| 156 | 156 | // If there are no views set up yet, we get outta here. |
| 157 | - if( empty( $views ) ) { ?> |
|
| 157 | + if ( empty( $views ) ) { ?> |
|
| 158 | 158 | <div id="select_gravityview_view"> |
| 159 | 159 | <div class="wrap"><?php echo GravityView_Admin::no_views_text(); ?></div> |
| 160 | 160 | </div> |
@@ -162,17 +162,17 @@ discard block |
||
| 162 | 162 | } |
| 163 | 163 | ?> |
| 164 | 164 | |
| 165 | - <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'gravityview'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></label></p> |
|
| 165 | + <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'gravityview' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></label></p> |
|
| 166 | 166 | |
| 167 | 167 | <?php |
| 168 | 168 | /** |
| 169 | 169 | * Display errors generated for invalid embed IDs |
| 170 | 170 | * @see GravityView_View_Data::is_valid_embed_id |
| 171 | 171 | */ |
| 172 | - if( isset( $instance['updated'] ) && empty( $instance['view_id'] ) ) { |
|
| 172 | + if ( isset( $instance[ 'updated' ] ) && empty( $instance[ 'view_id' ] ) ) { |
|
| 173 | 173 | ?> |
| 174 | 174 | <div class="error inline hide-on-view-change"> |
| 175 | - <p><?php esc_html_e('Please select a View to search.', 'gravityview'); ?></p> |
|
| 175 | + <p><?php esc_html_e( 'Please select a View to search.', 'gravityview' ); ?></p> |
|
| 176 | 176 | </div> |
| 177 | 177 | <?php |
| 178 | 178 | unset ( $error ); |
@@ -181,12 +181,12 @@ discard block |
||
| 181 | 181 | |
| 182 | 182 | <p> |
| 183 | 183 | <label for="gravityview_view_id"><?php _e( 'View:', 'gravityview' ); ?></label> |
| 184 | - <select id="gravityview_view_id" name="<?php echo $this->get_field_name('view_id'); ?>" class="widefat"> |
|
| 184 | + <select id="gravityview_view_id" name="<?php echo $this->get_field_name( 'view_id' ); ?>" class="widefat"> |
|
| 185 | 185 | <option value=""><?php esc_html_e( '— Select a View —', 'gravityview' ); ?></option> |
| 186 | 186 | <?php |
| 187 | - foreach( $views as $view_option ) { |
|
| 188 | - $title = empty( $view_option->post_title ) ? __('(no title)', 'gravityview') : $view_option->post_title; |
|
| 189 | - echo '<option value="'. $view_option->ID .'" ' . selected( esc_attr( $view_id ), $view_option->ID, false ) . '>'. esc_html( sprintf('%s #%d', $title, $view_option->ID ) ) .'</option>'; |
|
| 187 | + foreach ( $views as $view_option ) { |
|
| 188 | + $title = empty( $view_option->post_title ) ? __( '(no title)', 'gravityview' ) : $view_option->post_title; |
|
| 189 | + echo '<option value="' . $view_option->ID . '" ' . selected( esc_attr( $view_id ), $view_option->ID, false ) . '>' . esc_html( sprintf( '%s #%d', $title, $view_option->ID ) ) . '</option>'; |
|
| 190 | 190 | } |
| 191 | 191 | ?> |
| 192 | 192 | </select> |
@@ -198,10 +198,10 @@ discard block |
||
| 198 | 198 | * Display errors generated for invalid embed IDs |
| 199 | 199 | * @see GravityView_View_Data::is_valid_embed_id |
| 200 | 200 | */ |
| 201 | - if( !empty( $instance['error_post_id'] ) ) { |
|
| 201 | + if ( ! empty( $instance[ 'error_post_id' ] ) ) { |
|
| 202 | 202 | ?> |
| 203 | 203 | <div class="error inline"> |
| 204 | - <p><?php echo $instance['error_post_id']; ?></p> |
|
| 204 | + <p><?php echo $instance[ 'error_post_id' ]; ?></p> |
|
| 205 | 205 | </div> |
| 206 | 206 | <?php |
| 207 | 207 | unset ( $error ); |
@@ -209,40 +209,40 @@ discard block |
||
| 209 | 209 | ?> |
| 210 | 210 | |
| 211 | 211 | <p> |
| 212 | - <label for="<?php echo $this->get_field_id('post_id'); ?>"><?php esc_html_e( 'If Embedded, Page ID:', 'gravityview' ); ?></label> |
|
| 213 | - <input class="code" size="3" id="<?php echo $this->get_field_id('post_id'); ?>" name="<?php echo $this->get_field_name('post_id'); ?>" type="text" value="<?php echo esc_attr( $post_id ); ?>" /> |
|
| 212 | + <label for="<?php echo $this->get_field_id( 'post_id' ); ?>"><?php esc_html_e( 'If Embedded, Page ID:', 'gravityview' ); ?></label> |
|
| 213 | + <input class="code" size="3" id="<?php echo $this->get_field_id( 'post_id' ); ?>" name="<?php echo $this->get_field_name( 'post_id' ); ?>" type="text" value="<?php echo esc_attr( $post_id ); ?>" /> |
|
| 214 | 214 | <span class="howto"><?php |
| 215 | - esc_html_e('To have a search performed on an embedded View, enter the ID of the post or page where the View is embedded.', 'gravityview' ); |
|
| 216 | - echo ' '.gravityview_get_link('http://docs.gravityview.co/article/222-the-search-widget', __('Learn more…', 'gravityview' ), 'target=_blank' ); |
|
| 215 | + esc_html_e( 'To have a search performed on an embedded View, enter the ID of the post or page where the View is embedded.', 'gravityview' ); |
|
| 216 | + echo ' ' . gravityview_get_link( 'http://docs.gravityview.co/article/222-the-search-widget', __( 'Learn more…', 'gravityview' ), 'target=_blank' ); |
|
| 217 | 217 | ?></span> |
| 218 | 218 | </p> |
| 219 | 219 | |
| 220 | 220 | <p> |
| 221 | - <label for="<?php echo $this->get_field_id('search_clear'); ?>"><?php esc_html_e( 'Show Clear button', 'gravityview' ); ?>:</label> |
|
| 222 | - <input name="<?php echo $this->get_field_name('search_clear'); ?>" type="hidden" value="0"> |
|
| 223 | - <input id="<?php echo $this->get_field_id('search_clear'); ?>" name="<?php echo $this->get_field_name('search_clear'); ?>" type="checkbox" class="checkbox" value="1" <?php checked( $search_clear, 1, true ); ?>> |
|
| 221 | + <label for="<?php echo $this->get_field_id( 'search_clear' ); ?>"><?php esc_html_e( 'Show Clear button', 'gravityview' ); ?>:</label> |
|
| 222 | + <input name="<?php echo $this->get_field_name( 'search_clear' ); ?>" type="hidden" value="0"> |
|
| 223 | + <input id="<?php echo $this->get_field_id( 'search_clear' ); ?>" name="<?php echo $this->get_field_name( 'search_clear' ); ?>" type="checkbox" class="checkbox" value="1" <?php checked( $search_clear, 1, true ); ?>> |
|
| 224 | 224 | </p> |
| 225 | 225 | |
| 226 | 226 | <p> |
| 227 | 227 | <label><?php esc_html_e( 'Search Mode', 'gravityview' ); ?>:</label> |
| 228 | - <label for="<?php echo $this->get_field_id('search_mode'); ?>_any"> |
|
| 229 | - <input id="<?php echo $this->get_field_id('search_mode'); ?>_any" name="<?php echo $this->get_field_name('search_mode'); ?>" type="radio" class="radio" value="any" <?php checked( $search_mode, 'any', true ); ?>> |
|
| 228 | + <label for="<?php echo $this->get_field_id( 'search_mode' ); ?>_any"> |
|
| 229 | + <input id="<?php echo $this->get_field_id( 'search_mode' ); ?>_any" name="<?php echo $this->get_field_name( 'search_mode' ); ?>" type="radio" class="radio" value="any" <?php checked( $search_mode, 'any', true ); ?>> |
|
| 230 | 230 | <?php esc_html_e( 'Match Any Fields', 'gravityview' ); ?> |
| 231 | 231 | </label> |
| 232 | - <label for="<?php echo $this->get_field_id('search_mode'); ?>_all"> |
|
| 233 | - <input id="<?php echo $this->get_field_id('search_mode'); ?>_all" name="<?php echo $this->get_field_name('search_mode'); ?>" type="radio" class="radio" value="all" <?php checked( $search_mode, 'all', true ); ?>> |
|
| 232 | + <label for="<?php echo $this->get_field_id( 'search_mode' ); ?>_all"> |
|
| 233 | + <input id="<?php echo $this->get_field_id( 'search_mode' ); ?>_all" name="<?php echo $this->get_field_name( 'search_mode' ); ?>" type="radio" class="radio" value="all" <?php checked( $search_mode, 'all', true ); ?>> |
|
| 234 | 234 | <?php esc_html_e( 'Match All Fields', 'gravityview' ); ?> |
| 235 | 235 | </label> |
| 236 | - <span class="howto"><?php esc_html_e('Should search results match all search fields, or any?', 'gravityview' ); ?></span |
|
| 236 | + <span class="howto"><?php esc_html_e( 'Should search results match all search fields, or any?', 'gravityview' ); ?></span |
|
| 237 | 237 | </p> |
| 238 | 238 | |
| 239 | 239 | <hr /> |
| 240 | 240 | |
| 241 | 241 | <?php // @todo: move style to CSS ?> |
| 242 | 242 | <div style="margin-bottom: 1em;"> |
| 243 | - <label class="screen-reader-text" for="<?php echo $this->get_field_id('search_fields'); ?>"><?php _e( 'Searchable fields:', 'gravityview' ); ?></label> |
|
| 244 | - <div class="gv-widget-search-fields" title="<?php esc_html_e('Search Fields', 'gravityview'); ?>"> |
|
| 245 | - <input id="<?php echo $this->get_field_id('search_fields'); ?>" name="<?php echo $this->get_field_name('search_fields'); ?>" type="hidden" value="<?php echo esc_attr( $search_fields ); ?>" class="gv-search-fields-value"> |
|
| 243 | + <label class="screen-reader-text" for="<?php echo $this->get_field_id( 'search_fields' ); ?>"><?php _e( 'Searchable fields:', 'gravityview' ); ?></label> |
|
| 244 | + <div class="gv-widget-search-fields" title="<?php esc_html_e( 'Search Fields', 'gravityview' ); ?>"> |
|
| 245 | + <input id="<?php echo $this->get_field_id( 'search_fields' ); ?>" name="<?php echo $this->get_field_name( 'search_fields' ); ?>" type="hidden" value="<?php echo esc_attr( $search_fields ); ?>" class="gv-search-fields-value"> |
|
| 246 | 246 | </div> |
| 247 | 247 | |
| 248 | 248 | </div> |
@@ -4,10 +4,10 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | function __construct() { |
| 6 | 6 | |
| 7 | - if( ! is_admin() ) { return; } |
|
| 7 | + if ( ! is_admin() ) { return; } |
|
| 8 | 8 | |
| 9 | 9 | // If Gravity Forms isn't active or compatibile, stop loading |
| 10 | - if( false === GravityView_Compatibility::is_valid() ) { |
|
| 10 | + if ( false === GravityView_Compatibility::is_valid() ) { |
|
| 11 | 11 | return; |
| 12 | 12 | } |
| 13 | 13 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | require_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-migrate.php' ); |
| 26 | 26 | |
| 27 | 27 | // Don't load tooltips if on Gravity Forms, otherwise it overrides translations |
| 28 | - if( class_exists( 'GFCommon' ) && class_exists( 'GFForms' ) && !GFForms::is_gravity_page() ) { |
|
| 28 | + if ( class_exists( 'GFCommon' ) && class_exists( 'GFForms' ) && ! GFForms::is_gravity_page() ) { |
|
| 29 | 29 | require_once( GFCommon::get_base_path() . '/tooltips.php' ); |
| 30 | 30 | } |
| 31 | 31 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | add_filter( 'post_updated_messages', array( $this, 'post_updated_messages' ) ); |
| 54 | 54 | add_filter( 'bulk_post_updated_messages', array( $this, 'post_updated_messages' ) ); |
| 55 | 55 | |
| 56 | - add_filter( 'plugin_action_links_'. plugin_basename( GRAVITYVIEW_FILE ) , array( $this, 'plugin_action_links' ) ); |
|
| 56 | + add_filter( 'plugin_action_links_' . plugin_basename( GRAVITYVIEW_FILE ), array( $this, 'plugin_action_links' ) ); |
|
| 57 | 57 | |
| 58 | 58 | add_action( 'plugins_loaded', array( $this, 'backend_actions' ), 100 ); |
| 59 | 59 | |
@@ -68,9 +68,9 @@ discard block |
||
| 68 | 68 | */ |
| 69 | 69 | public static function no_views_text() { |
| 70 | 70 | |
| 71 | - if ( isset( $_REQUEST['post_status'] ) && 'trash' === $_REQUEST['post_status'] ) { |
|
| 71 | + if ( isset( $_REQUEST[ 'post_status' ] ) && 'trash' === $_REQUEST[ 'post_status' ] ) { |
|
| 72 | 72 | return __( 'No Views found in Trash', 'gravityview' ); |
| 73 | - } elseif( ! empty( $_GET['s'] ) ) { |
|
| 73 | + } elseif ( ! empty( $_GET[ 's' ] ) ) { |
|
| 74 | 74 | return __( 'No Views found.', 'gravityview' ); |
| 75 | 75 | } |
| 76 | 76 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | $error .= ' ' . esc_html__( 'or select another form.', 'gravityview' ); |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | - if( $error ) { |
|
| 117 | + if ( $error ) { |
|
| 118 | 118 | ?> |
| 119 | 119 | <div class="wp-dialog notice-warning inline error wp-clearfix"> |
| 120 | 120 | <?php echo gravityview_get_floaty(); ?> |
@@ -133,22 +133,22 @@ discard block |
||
| 133 | 133 | public function backend_actions() { |
| 134 | 134 | |
| 135 | 135 | /** @define "GRAVITYVIEW_DIR" "../" */ |
| 136 | - include_once( GRAVITYVIEW_DIR .'includes/admin/class.field.type.php' ); |
|
| 137 | - include_once( GRAVITYVIEW_DIR .'includes/admin/class.render.settings.php' ); |
|
| 138 | - include_once( GRAVITYVIEW_DIR .'includes/admin/class-gravityview-admin-view-item.php' ); |
|
| 139 | - include_once( GRAVITYVIEW_DIR .'includes/admin/class-gravityview-admin-view-field.php' ); |
|
| 140 | - include_once( GRAVITYVIEW_DIR .'includes/admin/class-gravityview-admin-view-widget.php' ); |
|
| 141 | - include_once( GRAVITYVIEW_DIR .'includes/class-admin-views.php' ); |
|
| 142 | - include_once( GRAVITYVIEW_DIR .'includes/class-admin-welcome.php' ); |
|
| 143 | - include_once( GRAVITYVIEW_DIR .'includes/class-admin-add-shortcode.php' ); |
|
| 144 | - include_once( GRAVITYVIEW_DIR .'includes/class-admin-approve-entries.php' ); |
|
| 136 | + include_once( GRAVITYVIEW_DIR . 'includes/admin/class.field.type.php' ); |
|
| 137 | + include_once( GRAVITYVIEW_DIR . 'includes/admin/class.render.settings.php' ); |
|
| 138 | + include_once( GRAVITYVIEW_DIR . 'includes/admin/class-gravityview-admin-view-item.php' ); |
|
| 139 | + include_once( GRAVITYVIEW_DIR . 'includes/admin/class-gravityview-admin-view-field.php' ); |
|
| 140 | + include_once( GRAVITYVIEW_DIR . 'includes/admin/class-gravityview-admin-view-widget.php' ); |
|
| 141 | + include_once( GRAVITYVIEW_DIR . 'includes/class-admin-views.php' ); |
|
| 142 | + include_once( GRAVITYVIEW_DIR . 'includes/class-admin-welcome.php' ); |
|
| 143 | + include_once( GRAVITYVIEW_DIR . 'includes/class-admin-add-shortcode.php' ); |
|
| 144 | + include_once( GRAVITYVIEW_DIR . 'includes/class-admin-approve-entries.php' ); |
|
| 145 | 145 | |
| 146 | 146 | /** |
| 147 | 147 | * @action `gravityview_include_backend_actions` Triggered after all GravityView admin files are loaded |
| 148 | 148 | * |
| 149 | 149 | * Nice place to insert extensions' backend stuff |
| 150 | 150 | */ |
| 151 | - do_action('gravityview_include_backend_actions'); |
|
| 151 | + do_action( 'gravityview_include_backend_actions' ); |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | /** |
@@ -164,12 +164,12 @@ discard block |
||
| 164 | 164 | |
| 165 | 165 | $actions = array(); |
| 166 | 166 | |
| 167 | - if( GVCommon::has_cap( 'gravityview_view_settings' ) ) { |
|
| 168 | - $actions[] = sprintf( '<a href="%s">%s</a>', admin_url( 'edit.php?post_type=gravityview&page=gravityview_settings' ), esc_html__( 'Settings', 'gravityview' ) ); |
|
| 167 | + if ( GVCommon::has_cap( 'gravityview_view_settings' ) ) { |
|
| 168 | + $actions[ ] = sprintf( '<a href="%s">%s</a>', admin_url( 'edit.php?post_type=gravityview&page=gravityview_settings' ), esc_html__( 'Settings', 'gravityview' ) ); |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | - if( GVCommon::has_cap( 'gravityview_support_port' ) ) { |
|
| 172 | - $actions[] = '<a href="http://docs.gravityview.co">' . esc_html__( 'Support', 'gravityview' ) . '</a>'; |
|
| 171 | + if ( GVCommon::has_cap( 'gravityview_support_port' ) ) { |
|
| 172 | + $actions[ ] = '<a href="http://docs.gravityview.co">' . esc_html__( 'Support', 'gravityview' ) . '</a>'; |
|
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | return array_merge( $actions, $links ); |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | // By default, there will only be one item being modified. |
| 198 | 198 | // When in the `bulk_post_updated_messages` filter, there will be passed a number |
| 199 | 199 | // of modified items that will override this array. |
| 200 | - $bulk_counts = is_null( $bulk_counts ) ? array( 'updated' => 1 , 'locked' => 1 , 'deleted' => 1 , 'trashed' => 1, 'untrashed' => 1 ) : $bulk_counts; |
|
| 200 | + $bulk_counts = is_null( $bulk_counts ) ? array( 'updated' => 1, 'locked' => 1, 'deleted' => 1, 'trashed' => 1, 'untrashed' => 1 ) : $bulk_counts; |
|
| 201 | 201 | |
| 202 | 202 | // If we're starting fresh, a new form was created. |
| 203 | 203 | // We should let the user know this is the case. |
@@ -205,60 +205,60 @@ discard block |
||
| 205 | 205 | |
| 206 | 206 | $new_form_text = ''; |
| 207 | 207 | |
| 208 | - if( !empty( $start_fresh ) ) { |
|
| 208 | + if ( ! empty( $start_fresh ) ) { |
|
| 209 | 209 | |
| 210 | 210 | // Get the form that was created |
| 211 | 211 | $connected_form = gravityview_get_form_id( $post_id ); |
| 212 | 212 | |
| 213 | - if( !empty( $connected_form ) ) { |
|
| 213 | + if ( ! empty( $connected_form ) ) { |
|
| 214 | 214 | $form = gravityview_get_form( $connected_form ); |
| 215 | - $form_name = esc_attr( $form['title'] ); |
|
| 215 | + $form_name = esc_attr( $form[ 'title' ] ); |
|
| 216 | 216 | $image = self::get_floaty(); |
| 217 | - $new_form_text .= '<h3>'.$image.sprintf( __( 'A new form was created for this View: "%s"', 'gravityview' ), $form_name ).'</h3>'; |
|
| 218 | - $new_form_text .= sprintf( __( '%sThere are no entries for the new form, so the View will also be empty.%s To start collecting entries, you can add submissions through %sthe preview form%s and also embed the form on a post or page using this code: %s |
|
| 217 | + $new_form_text .= '<h3>' . $image . sprintf( __( 'A new form was created for this View: "%s"', 'gravityview' ), $form_name ) . '</h3>'; |
|
| 218 | + $new_form_text .= sprintf( __( '%sThere are no entries for the new form, so the View will also be empty.%s To start collecting entries, you can add submissions through %sthe preview form%s and also embed the form on a post or page using this code: %s |
|
| 219 | 219 | |
| 220 | 220 | You can %sedit the form%s in Gravity Forms and the updated fields will be available here. Don’t forget to %scustomize the form settings%s. |
| 221 | - ', 'gravityview' ), '<strong>', '</strong>', '<a href="'.site_url( '?gf_page=preview&id='.$connected_form ).'">', '</a>', '<code>[gravityform id="'.$connected_form.'" name="'.$form_name.'"]</code>', '<a href="'.admin_url( 'admin.php?page=gf_edit_forms&id='.$connected_form ).'">', '</a>', '<a href="'.admin_url( 'admin.php?page=gf_edit_forms&view=settings&id='.$connected_form ).'">', '</a>'); |
|
| 221 | + ', 'gravityview' ), '<strong>', '</strong>', '<a href="' . site_url( '?gf_page=preview&id=' . $connected_form ) . '">', '</a>', '<code>[gravityform id="' . $connected_form . '" name="' . $form_name . '"]</code>', '<a href="' . admin_url( 'admin.php?page=gf_edit_forms&id=' . $connected_form ) . '">', '</a>', '<a href="' . admin_url( 'admin.php?page=gf_edit_forms&view=settings&id=' . $connected_form ) . '">', '</a>' ); |
|
| 222 | 222 | $new_form_text = wpautop( $new_form_text ); |
| 223 | 223 | |
| 224 | 224 | delete_post_meta( $post_id, '_gravityview_start_fresh' ); |
| 225 | 225 | } |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | - $messages['gravityview'] = array( |
|
| 228 | + $messages[ 'gravityview' ] = array( |
|
| 229 | 229 | 0 => '', // Unused. Messages start at index 1. |
| 230 | 230 | /* translators: %s and %s are HTML tags linking to the View on the website */ |
| 231 | - 1 => sprintf(__( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>'), |
|
| 231 | + 1 => sprintf( __( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ), |
|
| 232 | 232 | /* translators: %s and %s are HTML tags linking to the View on the website */ |
| 233 | - 2 => sprintf(__( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>'), |
|
| 233 | + 2 => sprintf( __( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ), |
|
| 234 | 234 | 3 => __( 'View deleted.', 'gravityview' ), |
| 235 | 235 | /* translators: %s and %s are HTML tags linking to the View on the website */ |
| 236 | - 4 => sprintf(__( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>'), |
|
| 236 | + 4 => sprintf( __( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ), |
|
| 237 | 237 | /* translators: %s: date and time of the revision */ |
| 238 | - 5 => isset( $_GET['revision'] ) ? sprintf( __( 'View restored to revision from %s', 'gravityview' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, |
|
| 238 | + 5 => isset( $_GET[ 'revision' ] ) ? sprintf( __( 'View restored to revision from %s', 'gravityview' ), wp_post_revision_title( (int)$_GET[ 'revision' ], false ) ) : false, |
|
| 239 | 239 | /* translators: %s and %s are HTML tags linking to the View on the website */ |
| 240 | - 6 => sprintf(__( 'View published. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>') . $new_form_text, |
|
| 240 | + 6 => sprintf( __( 'View published. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ) . $new_form_text, |
|
| 241 | 241 | /* translators: %s and %s are HTML tags linking to the View on the website */ |
| 242 | - 7 => sprintf(__( 'View saved. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>') . $new_form_text, |
|
| 242 | + 7 => sprintf( __( 'View saved. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ) . $new_form_text, |
|
| 243 | 243 | 8 => __( 'View submitted.', 'gravityview' ), |
| 244 | 244 | 9 => sprintf( |
| 245 | 245 | /* translators: Date and time the View is scheduled to be published */ |
| 246 | 246 | __( 'View scheduled for: %1$s.', 'gravityview' ), |
| 247 | 247 | // translators: Publish box date format, see http://php.net/date |
| 248 | - date_i18n( __( 'M j, Y @ G:i', 'gravityview' ), strtotime( ( isset( $post->post_date ) ? $post->post_date : NULL ) ) ) |
|
| 248 | + date_i18n( __( 'M j, Y @ G:i', 'gravityview' ), strtotime( ( isset( $post->post_date ) ? $post->post_date : NULL ) ) ) |
|
| 249 | 249 | ) . $new_form_text, |
| 250 | 250 | /* translators: %s and %s are HTML tags linking to the View on the website */ |
| 251 | - 10 => sprintf(__( 'View draft updated. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>') . $new_form_text, |
|
| 251 | + 10 => sprintf( __( 'View draft updated. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ) . $new_form_text, |
|
| 252 | 252 | |
| 253 | 253 | /** |
| 254 | 254 | * These apply to `bulk_post_updated_messages` |
| 255 | 255 | * @file wp-admin/edit.php |
| 256 | 256 | */ |
| 257 | - 'updated' => _n( '%s View updated.', '%s Views updated.', $bulk_counts['updated'], 'gravityview' ), |
|
| 258 | - 'locked' => _n( '%s View not updated, somebody is editing it.', '%s Views not updated, somebody is editing them.', $bulk_counts['locked'], 'gravityview' ), |
|
| 259 | - 'deleted' => _n( '%s View permanently deleted.', '%s Views permanently deleted.', $bulk_counts['deleted'], 'gravityview' ), |
|
| 260 | - 'trashed' => _n( '%s View moved to the Trash.', '%s Views moved to the Trash.', $bulk_counts['trashed'], 'gravityview' ), |
|
| 261 | - 'untrashed' => _n( '%s View restored from the Trash.', '%s Views restored from the Trash.', $bulk_counts['untrashed'], 'gravityview' ), |
|
| 257 | + 'updated' => _n( '%s View updated.', '%s Views updated.', $bulk_counts[ 'updated' ], 'gravityview' ), |
|
| 258 | + 'locked' => _n( '%s View not updated, somebody is editing it.', '%s Views not updated, somebody is editing them.', $bulk_counts[ 'locked' ], 'gravityview' ), |
|
| 259 | + 'deleted' => _n( '%s View permanently deleted.', '%s Views permanently deleted.', $bulk_counts[ 'deleted' ], 'gravityview' ), |
|
| 260 | + 'trashed' => _n( '%s View moved to the Trash.', '%s Views moved to the Trash.', $bulk_counts[ 'trashed' ], 'gravityview' ), |
|
| 261 | + 'untrashed' => _n( '%s View restored from the Trash.', '%s Views restored from the Trash.', $bulk_counts[ 'untrashed' ], 'gravityview' ), |
|
| 262 | 262 | ); |
| 263 | 263 | |
| 264 | 264 | return $messages; |
@@ -318,29 +318,29 @@ discard block |
||
| 318 | 318 | static function is_admin_page( $hook = '', $page = NULL ) { |
| 319 | 319 | global $current_screen, $plugin_page, $pagenow, $post; |
| 320 | 320 | |
| 321 | - if( ! is_admin() ) { return false; } |
|
| 321 | + if ( ! is_admin() ) { return false; } |
|
| 322 | 322 | |
| 323 | 323 | $is_page = false; |
| 324 | 324 | |
| 325 | - $is_gv_screen = (!empty($current_screen) && isset($current_screen->post_type) && $current_screen->post_type === 'gravityview'); |
|
| 325 | + $is_gv_screen = ( ! empty( $current_screen ) && isset( $current_screen->post_type ) && $current_screen->post_type === 'gravityview' ); |
|
| 326 | 326 | |
| 327 | - $is_gv_post_type_get = (isset($_GET['post_type']) && $_GET['post_type'] === 'gravityview'); |
|
| 327 | + $is_gv_post_type_get = ( isset( $_GET[ 'post_type' ] ) && $_GET[ 'post_type' ] === 'gravityview' ); |
|
| 328 | 328 | |
| 329 | - $is_gv_settings_get = isset( $_GET['page'] ) && $_GET['page'] === 'gravityview_settings'; |
|
| 329 | + $is_gv_settings_get = isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] === 'gravityview_settings'; |
|
| 330 | 330 | |
| 331 | - if( empty( $post ) && $pagenow === 'post.php' && !empty( $_GET['post'] ) ) { |
|
| 332 | - $gv_post = get_post( intval( $_GET['post'] ) ); |
|
| 333 | - $is_gv_post_type = (!empty($gv_post) && !empty($gv_post->post_type) && $gv_post->post_type === 'gravityview'); |
|
| 331 | + if ( empty( $post ) && $pagenow === 'post.php' && ! empty( $_GET[ 'post' ] ) ) { |
|
| 332 | + $gv_post = get_post( intval( $_GET[ 'post' ] ) ); |
|
| 333 | + $is_gv_post_type = ( ! empty( $gv_post ) && ! empty( $gv_post->post_type ) && $gv_post->post_type === 'gravityview' ); |
|
| 334 | 334 | } else { |
| 335 | - $is_gv_post_type = (!empty($post) && !empty($post->post_type) && $post->post_type === 'gravityview'); |
|
| 335 | + $is_gv_post_type = ( ! empty( $post ) && ! empty( $post->post_type ) && $post->post_type === 'gravityview' ); |
|
| 336 | 336 | } |
| 337 | 337 | |
| 338 | - if( $is_gv_screen || $is_gv_post_type || $is_gv_post_type || $is_gv_post_type_get || $is_gv_settings_get ) { |
|
| 338 | + if ( $is_gv_screen || $is_gv_post_type || $is_gv_post_type || $is_gv_post_type_get || $is_gv_settings_get ) { |
|
| 339 | 339 | |
| 340 | 340 | // $_GET `post_type` variable |
| 341 | - if(in_array($pagenow, array( 'post.php' , 'post-new.php' )) ) { |
|
| 341 | + if ( in_array( $pagenow, array( 'post.php', 'post-new.php' ) ) ) { |
|
| 342 | 342 | $is_page = 'single'; |
| 343 | - } else if ( in_array( $plugin_page, array( 'gravityview_settings', 'gravityview_page_gravityview_settings' ) ) || ( !empty( $_GET['page'] ) && $_GET['page'] === 'gravityview_settings' ) ) { |
|
| 343 | + } else if ( in_array( $plugin_page, array( 'gravityview_settings', 'gravityview_page_gravityview_settings' ) ) || ( ! empty( $_GET[ 'page' ] ) && $_GET[ 'page' ] === 'gravityview_settings' ) ) { |
|
| 344 | 344 | $is_page = 'settings'; |
| 345 | 345 | } else { |
| 346 | 346 | $is_page = 'views'; |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | $is_page = apply_filters( 'gravityview_is_admin_page', $is_page, $hook ); |
| 356 | 356 | |
| 357 | 357 | // If the current page is the same as the compared page |
| 358 | - if( !empty( $page ) ) { |
|
| 358 | + if ( ! empty( $page ) ) { |
|
| 359 | 359 | return $is_page === $page; |
| 360 | 360 | } |
| 361 | 361 | |
@@ -376,6 +376,6 @@ discard block |
||
| 376 | 376 | * |
| 377 | 377 | * @return bool|string|void If `false`, not a GravityView page. `true` if $page is passed and is the same as current page. Otherwise, the name of the page (`single`, `settings`, or `views`) |
| 378 | 378 | */ |
| 379 | -function gravityview_is_admin_page($hook = '', $page = NULL) { |
|
| 379 | +function gravityview_is_admin_page( $hook = '', $page = NULL ) { |
|
| 380 | 380 | return GravityView_Admin::is_admin_page( $hook, $page ); |
| 381 | 381 | } |
@@ -134,17 +134,17 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | add_filter( 'gravityview/sortable/field_blacklist', array( $this, '_filter_sortable_fields' ), 1 ); |
| 136 | 136 | |
| 137 | - if( $this->entry_meta_key ) { |
|
| 137 | + if ( $this->entry_meta_key ) { |
|
| 138 | 138 | add_filter( 'gform_entry_meta', array( $this, 'add_entry_meta' ) ); |
| 139 | 139 | add_filter( 'gravityview/common/sortable_fields', array( $this, 'add_sortable_field' ), 10, 2 ); |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | - if( $this->_custom_merge_tag ) { |
|
| 142 | + if ( $this->_custom_merge_tag ) { |
|
| 143 | 143 | add_filter( 'gform_custom_merge_tags', array( $this, '_filter_gform_custom_merge_tags' ), 10, 4 ); |
| 144 | 144 | add_filter( 'gform_replace_merge_tags', array( $this, '_filter_gform_replace_merge_tags' ), 10, 7 ); |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | - if( 'meta' === $this->group || '' !== $this->default_search_label ) { |
|
| 147 | + if ( 'meta' === $this->group || '' !== $this->default_search_label ) { |
|
| 148 | 148 | add_filter( 'gravityview_search_field_label', array( $this, 'set_default_search_label' ), 10, 3 ); |
| 149 | 149 | } |
| 150 | 150 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | * Auto-assign label from Gravity Forms label, if exists |
| 153 | 153 | * @since 1.20 |
| 154 | 154 | */ |
| 155 | - if( empty( $this->label ) && ! empty( $this->_gf_field_class_name ) && class_exists( $this->_gf_field_class_name ) ) { |
|
| 155 | + if ( empty( $this->label ) && ! empty( $this->_gf_field_class_name ) && class_exists( $this->_gf_field_class_name ) ) { |
|
| 156 | 156 | $this->label = ucfirst( GF_Fields::get( $this->name )->get_form_editor_field_title() ); |
| 157 | 157 | } |
| 158 | 158 | |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | 'type' => $this->name |
| 176 | 176 | ); |
| 177 | 177 | |
| 178 | - $fields["{$this->entry_meta_key}"] = $added_field; |
|
| 178 | + $fields[ "{$this->entry_meta_key}" ] = $added_field; |
|
| 179 | 179 | |
| 180 | 180 | return $fields; |
| 181 | 181 | } |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | */ |
| 196 | 196 | function set_default_search_label( $label = '', $gf_field = null, $field = array() ) { |
| 197 | 197 | |
| 198 | - if( $this->name === $field['field'] && '' === $label ) { |
|
| 198 | + if ( $this->name === $field[ 'field' ] && '' === $label ) { |
|
| 199 | 199 | $label = esc_html( $this->default_search_label ); |
| 200 | 200 | } |
| 201 | 201 | |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | * |
| 217 | 217 | * @return string Original text if {_custom_merge_tag} isn't found. Otherwise, replaced text. |
| 218 | 218 | */ |
| 219 | - public function _filter_gform_replace_merge_tags( $text, $form = array(), $entry = array(), $url_encode = false, $esc_html = false ) { |
|
| 219 | + public function _filter_gform_replace_merge_tags( $text, $form = array(), $entry = array(), $url_encode = false, $esc_html = false ) { |
|
| 220 | 220 | |
| 221 | 221 | // Is there is field merge tag? Strip whitespace off the ned, too. |
| 222 | 222 | preg_match_all( '/{' . preg_quote( $this->_custom_merge_tag ) . ':?(.*?)(?:\s)?}/ism', $text, $matches, PREG_SET_ORDER ); |
@@ -247,19 +247,19 @@ discard block |
||
| 247 | 247 | */ |
| 248 | 248 | public function replace_merge_tag( $matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false ) { |
| 249 | 249 | |
| 250 | - foreach( $matches as $match ) { |
|
| 250 | + foreach ( $matches as $match ) { |
|
| 251 | 251 | |
| 252 | - $full_tag = $match[0]; |
|
| 252 | + $full_tag = $match[ 0 ]; |
|
| 253 | 253 | |
| 254 | 254 | // Strip the Merge Tags |
| 255 | - $tag = str_replace( array( '{', '}'), '', $full_tag ); |
|
| 255 | + $tag = str_replace( array( '{', '}' ), '', $full_tag ); |
|
| 256 | 256 | |
| 257 | 257 | // Replace the value from the entry, if exists |
| 258 | - if( isset( $entry[ $tag ] ) ) { |
|
| 258 | + if ( isset( $entry[ $tag ] ) ) { |
|
| 259 | 259 | |
| 260 | 260 | $value = $entry[ $tag ]; |
| 261 | 261 | |
| 262 | - if( is_callable( array( $this, 'get_content') ) ) { |
|
| 262 | + if ( is_callable( array( $this, 'get_content' ) ) ) { |
|
| 263 | 263 | $value = $this->get_content( $value ); |
| 264 | 264 | } |
| 265 | 265 | |
@@ -332,8 +332,8 @@ discard block |
||
| 332 | 332 | */ |
| 333 | 333 | public function _filter_sortable_fields( $not_sortable ) { |
| 334 | 334 | |
| 335 | - if( ! $this->is_sortable ) { |
|
| 336 | - $not_sortable[] = $this->name; |
|
| 335 | + if ( ! $this->is_sortable ) { |
|
| 336 | + $not_sortable[ ] = $this->name; |
|
| 337 | 337 | } |
| 338 | 338 | |
| 339 | 339 | return $not_sortable; |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | */ |
| 351 | 351 | function add_entry_meta( $entry_meta ) { |
| 352 | 352 | |
| 353 | - if( ! isset( $entry_meta["{$this->entry_meta_key}"] ) ) { |
|
| 353 | + if ( ! isset( $entry_meta[ "{$this->entry_meta_key}" ] ) ) { |
|
| 354 | 354 | |
| 355 | 355 | $added_meta = array( |
| 356 | 356 | 'label' => $this->label, |
@@ -359,13 +359,13 @@ discard block |
||
| 359 | 359 | ); |
| 360 | 360 | |
| 361 | 361 | if ( $this->entry_meta_update_callback && is_callable( $this->entry_meta_update_callback ) ) { |
| 362 | - $added_meta['update_entry_meta_callback'] = $this->entry_meta_update_callback; |
|
| 362 | + $added_meta[ 'update_entry_meta_callback' ] = $this->entry_meta_update_callback; |
|
| 363 | 363 | } |
| 364 | 364 | |
| 365 | - $entry_meta["{$this->entry_meta_key}"] = $added_meta; |
|
| 365 | + $entry_meta[ "{$this->entry_meta_key}" ] = $added_meta; |
|
| 366 | 366 | |
| 367 | 367 | } else { |
| 368 | - do_action( 'gravityview_log_error', __METHOD__ . ' Entry meta already set: ' . $this->entry_meta_key, $entry_meta["{$this->entry_meta_key}"] ); |
|
| 368 | + do_action( 'gravityview_log_error', __METHOD__ . ' Entry meta already set: ' . $this->entry_meta_key, $entry_meta[ "{$this->entry_meta_key}" ] ); |
|
| 369 | 369 | } |
| 370 | 370 | |
| 371 | 371 | return $entry_meta; |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | 'date_display' => array( |
| 395 | 395 | 'type' => 'text', |
| 396 | 396 | 'label' => __( 'Override Date Format', 'gravityview' ), |
| 397 | - 'desc' => sprintf( __( 'Define how the date is displayed (using %sthe PHP date format%s)', 'gravityview'), '<a href="https://codex.wordpress.org/Formatting_Date_and_Time">', '</a>' ), |
|
| 397 | + 'desc' => sprintf( __( 'Define how the date is displayed (using %sthe PHP date format%s)', 'gravityview' ), '<a href="https://codex.wordpress.org/Formatting_Date_and_Time">', '</a>' ), |
|
| 398 | 398 | /** |
| 399 | 399 | * @filter `gravityview_date_format` Override the date format with a [PHP date format](https://codex.wordpress.org/Formatting_Date_and_Time) |
| 400 | 400 | * @param[in,out] null|string $date_format Date Format (default: null) |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | |
| 420 | 420 | $options = $this->field_support_options(); |
| 421 | 421 | |
| 422 | - if( isset( $options[ $key ] ) ) { |
|
| 422 | + if ( isset( $options[ $key ] ) ) { |
|
| 423 | 423 | $field_options[ $key ] = $options[ $key ]; |
| 424 | 424 | } |
| 425 | 425 | |
@@ -483,11 +483,11 @@ discard block |
||
| 483 | 483 | $connected_form = rgpost( 'form_id' ); |
| 484 | 484 | |
| 485 | 485 | // Otherwise, get the Form ID from the Post page |
| 486 | - if( empty( $connected_form ) ) { |
|
| 486 | + if ( empty( $connected_form ) ) { |
|
| 487 | 487 | $connected_form = gravityview_get_form_id( get_the_ID() ); |
| 488 | 488 | } |
| 489 | 489 | |
| 490 | - if( empty( $connected_form ) ) { |
|
| 490 | + if ( empty( $connected_form ) ) { |
|
| 491 | 491 | do_action( 'gravityview_log_error', sprintf( '%s: Form not found for form ID "%s"', __METHOD__, $connected_form ) ); |
| 492 | 492 | return false; |
| 493 | 493 | } |
@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | * @since 1.11 |
| 53 | 53 | * @param boolean $boolean Whether to trigger update on user registration (default: true) |
| 54 | 54 | */ |
| 55 | - if( apply_filters( 'gravityview/edit_entry/user_registration/trigger_update', true ) ) { |
|
| 55 | + if ( apply_filters( 'gravityview/edit_entry/user_registration/trigger_update', true ) ) { |
|
| 56 | 56 | |
| 57 | - add_action( 'gravityview/edit_entry/after_update' , array( $this, 'update_user' ), 10, 2 ); |
|
| 57 | + add_action( 'gravityview/edit_entry/after_update', array( $this, 'update_user' ), 10, 2 ); |
|
| 58 | 58 | |
| 59 | 59 | // last resort in case the current user display name don't match any of the defaults |
| 60 | 60 | add_action( 'gform_user_updated', array( $this, 'restore_display_name' ), 10, 4 ); |
@@ -72,10 +72,10 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | public function update_user( $form = array(), $entry_id = 0 ) { |
| 74 | 74 | |
| 75 | - if( ! class_exists( 'GFAPI' ) || ! class_exists( 'GF_User_Registration' ) ) { |
|
| 75 | + if ( ! class_exists( 'GFAPI' ) || ! class_exists( 'GF_User_Registration' ) ) { |
|
| 76 | 76 | do_action( 'gravityview_log_error', __METHOD__ . ': GFAPI or User Registration class not found; not updating the user' ); |
| 77 | 77 | return; |
| 78 | - } elseif( empty( $entry_id ) ) { |
|
| 78 | + } elseif ( empty( $entry_id ) ) { |
|
| 79 | 79 | do_action( 'gravityview_log_error', __METHOD__ . ': Entry ID is empty; not updating the user', $entry_id ); |
| 80 | 80 | return; |
| 81 | 81 | } |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | // If an Update feed, make sure the conditions are met. |
| 104 | - if( rgars( $config, 'meta/feedType' ) === 'update' ) { |
|
| 105 | - if( ! $gf_user_registration->is_feed_condition_met( $config, $form, $entry ) ) { |
|
| 104 | + if ( rgars( $config, 'meta/feedType' ) === 'update' ) { |
|
| 105 | + if ( ! $gf_user_registration->is_feed_condition_met( $config, $form, $entry ) ) { |
|
| 106 | 106 | return; |
| 107 | 107 | } |
| 108 | 108 | } |
@@ -149,17 +149,17 @@ discard block |
||
| 149 | 149 | */ |
| 150 | 150 | $preserve_role = apply_filters( 'gravityview/edit_entry/user_registration/preserve_role', true, $config, $form, $entry ); |
| 151 | 151 | |
| 152 | - if( $preserve_role ) { |
|
| 153 | - $config['meta']['role'] = 'gfur_preserve_role'; |
|
| 152 | + if ( $preserve_role ) { |
|
| 153 | + $config[ 'meta' ][ 'role' ] = 'gfur_preserve_role'; |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | - $displayname = $this->match_current_display_name( $entry['created_by'] ); |
|
| 156 | + $displayname = $this->match_current_display_name( $entry[ 'created_by' ] ); |
|
| 157 | 157 | |
| 158 | 158 | /** |
| 159 | 159 | * Make sure the current display name is not changed with the update user method. |
| 160 | 160 | * @since 1.15 |
| 161 | 161 | */ |
| 162 | - $config['meta']['displayname'] = $displayname ? $displayname : $config['meta']['displayname']; |
|
| 162 | + $config[ 'meta' ][ 'displayname' ] = $displayname ? $displayname : $config[ 'meta' ][ 'displayname' ]; |
|
| 163 | 163 | |
| 164 | 164 | /** |
| 165 | 165 | * @filter `gravityview/edit_entry/user_registration/config` Modify the User Registration Addon feed configuration |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | $user = get_userdata( $user_id ); |
| 188 | 188 | |
| 189 | - if( ! $user ) { |
|
| 189 | + if ( ! $user ) { |
|
| 190 | 190 | return false; |
| 191 | 191 | } |
| 192 | 192 | |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | * In case we can't find the current display name format, trigger last resort method at the 'gform_user_updated' hook |
| 199 | 199 | * @see restore_display_name |
| 200 | 200 | */ |
| 201 | - if( false === $format ) { |
|
| 201 | + if ( false === $format ) { |
|
| 202 | 202 | $this->_user_before_update = $user; |
| 203 | 203 | } |
| 204 | 204 | |
@@ -216,20 +216,20 @@ discard block |
||
| 216 | 216 | public function generate_display_names( $profileuser ) { |
| 217 | 217 | |
| 218 | 218 | $public_display = array(); |
| 219 | - $public_display['nickname'] = $profileuser->nickname; |
|
| 220 | - $public_display['username'] = $profileuser->user_login; |
|
| 219 | + $public_display[ 'nickname' ] = $profileuser->nickname; |
|
| 220 | + $public_display[ 'username' ] = $profileuser->user_login; |
|
| 221 | 221 | |
| 222 | - if ( !empty($profileuser->first_name) ) { |
|
| 223 | - $public_display['firstname'] = $profileuser->first_name; |
|
| 222 | + if ( ! empty( $profileuser->first_name ) ) { |
|
| 223 | + $public_display[ 'firstname' ] = $profileuser->first_name; |
|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | - if ( !empty($profileuser->last_name) ) { |
|
| 227 | - $public_display['lastname'] = $profileuser->last_name; |
|
| 226 | + if ( ! empty( $profileuser->last_name ) ) { |
|
| 227 | + $public_display[ 'lastname' ] = $profileuser->last_name; |
|
| 228 | 228 | } |
| 229 | 229 | |
| 230 | - if ( !empty($profileuser->first_name) && !empty($profileuser->last_name) ) { |
|
| 231 | - $public_display['firstlast'] = $profileuser->first_name . ' ' . $profileuser->last_name; |
|
| 232 | - $public_display['lastfirst'] = $profileuser->last_name . ' ' . $profileuser->first_name; |
|
| 230 | + if ( ! empty( $profileuser->first_name ) && ! empty( $profileuser->last_name ) ) { |
|
| 231 | + $public_display[ 'firstlast' ] = $profileuser->first_name . ' ' . $profileuser->last_name; |
|
| 232 | + $public_display[ 'lastfirst' ] = $profileuser->last_name . ' ' . $profileuser->first_name; |
|
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | $public_display = array_map( 'trim', $public_display ); |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | */ |
| 260 | 260 | $restore_display_name = apply_filters( 'gravityview/edit_entry/restore_display_name', true ); |
| 261 | 261 | |
| 262 | - $is_update_feed = ( $config && rgars( $config, 'meta/feed_type') === 'update' ); |
|
| 262 | + $is_update_feed = ( $config && rgars( $config, 'meta/feed_type' ) === 'update' ); |
|
| 263 | 263 | |
| 264 | 264 | /** |
| 265 | 265 | * Don't restore display name: |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | * - or we don't need as we found the correct format before updating user. |
| 269 | 269 | * @since 1.14.4 |
| 270 | 270 | */ |
| 271 | - if( ! $restore_display_name || $is_update_feed || is_null( $this->_user_before_update ) ) { |
|
| 271 | + if ( ! $restore_display_name || $is_update_feed || is_null( $this->_user_before_update ) ) { |
|
| 272 | 272 | return null; |
| 273 | 273 | } |
| 274 | 274 | |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | |
| 277 | 277 | // User not found |
| 278 | 278 | if ( ! $user_after_update ) { |
| 279 | - do_action('gravityview_log_error', __METHOD__ . sprintf( ' - User not found at $user_id #%d', $user_id ) ); |
|
| 279 | + do_action( 'gravityview_log_error', __METHOD__ . sprintf( ' - User not found at $user_id #%d', $user_id ) ); |
|
| 280 | 280 | return false; |
| 281 | 281 | } |
| 282 | 282 | |
@@ -300,10 +300,10 @@ discard block |
||
| 300 | 300 | |
| 301 | 301 | $updated = wp_update_user( $restored_user ); |
| 302 | 302 | |
| 303 | - if( is_wp_error( $updated ) ) { |
|
| 304 | - do_action('gravityview_log_error', __METHOD__ . sprintf( ' - There was an error updating user #%d details', $user_id ), $updated ); |
|
| 303 | + if ( is_wp_error( $updated ) ) { |
|
| 304 | + do_action( 'gravityview_log_error', __METHOD__ . sprintf( ' - There was an error updating user #%d details', $user_id ), $updated ); |
|
| 305 | 305 | } else { |
| 306 | - do_action('gravityview_log_debug', __METHOD__ . sprintf( ' - User #%d details restored', $user_id ) ); |
|
| 306 | + do_action( 'gravityview_log_debug', __METHOD__ . sprintf( ' - User #%d details restored', $user_id ) ); |
|
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | $this->_user_before_update = null; |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | add_filter( 'icl_ls_languages', array( $this, 'wpml_ls_filter' ) ); |
| 64 | 64 | |
| 65 | - add_filter( 'gravityview_directory_link', array( $this, 'filter_gravityview_back_link') ); |
|
| 65 | + add_filter( 'gravityview_directory_link', array( $this, 'filter_gravityview_back_link' ) ); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | function filter_gravityview_back_link( $link ) { |
| 83 | 83 | global $wpml_url_filters; |
| 84 | 84 | |
| 85 | - if( $wpml_url_filters ) { |
|
| 85 | + if ( $wpml_url_filters ) { |
|
| 86 | 86 | $link = $wpml_url_filters->permalink_filter( $link, GravityView_frontend::getInstance()->getPostId() ); |
| 87 | 87 | } |
| 88 | 88 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | private function remove_url_hooks() { |
| 100 | 100 | global $wpml_url_filters; |
| 101 | 101 | |
| 102 | - if( ! $wpml_url_filters ) { |
|
| 102 | + if ( ! $wpml_url_filters ) { |
|
| 103 | 103 | return; |
| 104 | 104 | } |
| 105 | 105 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | private function add_url_hooks() { |
| 123 | 123 | global $wpml_url_filters; |
| 124 | 124 | |
| 125 | - if( ! $wpml_url_filters ) { |
|
| 125 | + if ( ! $wpml_url_filters ) { |
|
| 126 | 126 | return; |
| 127 | 127 | } |
| 128 | 128 | |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | |
| 162 | 162 | $this->remove_url_hooks(); |
| 163 | 163 | |
| 164 | - if( $translations ) { |
|
| 164 | + if ( $translations ) { |
|
| 165 | 165 | foreach ( $languages as $lang_code => $language ) { |
| 166 | 166 | |
| 167 | 167 | $lang_post_id = $translations[ $lang_code ]->element_id; |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | break; |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | - $languages[ $lang_code ]['url'] = $entry_link; |
|
| 197 | + $languages[ $lang_code ][ 'url' ] = $entry_link; |
|
| 198 | 198 | } |
| 199 | 199 | } |
| 200 | 200 | |
@@ -11,13 +11,13 @@ discard block |
||
| 11 | 11 | wp_nonce_field( 'gravityview_select_form', 'gravityview_select_form_nonce' ); |
| 12 | 12 | |
| 13 | 13 | //current value |
| 14 | -$current_form = (int) rgar( (array) $_GET, 'form_id', gravityview_get_form_id( $post->ID ) ); |
|
| 14 | +$current_form = (int)rgar( (array)$_GET, 'form_id', gravityview_get_form_id( $post->ID ) ); |
|
| 15 | 15 | |
| 16 | 16 | // If form is in trash or not existing, show error |
| 17 | 17 | GravityView_Admin::connected_form_warning( $current_form ); |
| 18 | 18 | |
| 19 | 19 | // check for available gravity forms |
| 20 | -$forms = gravityview_get_forms('any'); |
|
| 20 | +$forms = gravityview_get_forms( 'any' ); |
|
| 21 | 21 | ?> |
| 22 | 22 | <label for="gravityview_form_id" ><?php esc_html_e( 'Where would you like the data to come from for this View?', 'gravityview' ); ?></label> |
| 23 | 23 | |
@@ -28,24 +28,24 @@ discard block |
||
| 28 | 28 | ?> |
| 29 | 29 | <a class="button button-primary" href="#gv_start_fresh" title="<?php esc_attr_e( 'Use a Form Preset', 'gravityview' ); ?>"><?php esc_html_e( 'Use a Form Preset', 'gravityview' ); ?></a> |
| 30 | 30 | |
| 31 | - <?php if( !empty( $forms ) ) { ?> |
|
| 31 | + <?php if ( ! empty( $forms ) ) { ?> |
|
| 32 | 32 | <span> <?php esc_html_e( 'or use an existing form', 'gravityview' ); ?> </span> |
| 33 | 33 | <?php } |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | // If there are no forms to select, show no forms. |
| 37 | - if( !empty( $forms ) ) { ?> |
|
| 37 | + if ( ! empty( $forms ) ) { ?> |
|
| 38 | 38 | <select name="gravityview_form_id" id="gravityview_form_id"> |
| 39 | 39 | <option value="" <?php selected( '', $current_form, true ); ?>>— <?php esc_html_e( 'list of forms', 'gravityview' ); ?> —</option> |
| 40 | - <?php foreach( $forms as $form ) { ?> |
|
| 41 | - <option value="<?php echo $form['id']; ?>" <?php selected( $form['id'], $current_form, true ); ?>><?php echo esc_html( $form['title'] ); ?></option> |
|
| 40 | + <?php foreach ( $forms as $form ) { ?> |
|
| 41 | + <option value="<?php echo $form[ 'id' ]; ?>" <?php selected( $form[ 'id' ], $current_form, true ); ?>><?php echo esc_html( $form[ 'title' ] ); ?></option> |
|
| 42 | 42 | <?php } ?> |
| 43 | 43 | </select> |
| 44 | 44 | <?php } else { ?> |
| 45 | 45 | <select name="gravityview_form_id" id="gravityview_form_id" class="hidden"><option selected="selected" value=""></option></select> |
| 46 | 46 | <?php } ?> |
| 47 | 47 | |
| 48 | - <a class="button button-primary" <?php if( empty( $current_form ) ) { echo 'style="display:none;"'; } ?> id="gv_switch_view_button" href="#gv_switch_view" title="<?php esc_attr_e( 'Switch View', 'gravityview' ); ?>"><?php esc_html_e( 'Switch View Type', 'gravityview' ); ?></a> |
|
| 48 | + <a class="button button-primary" <?php if ( empty( $current_form ) ) { echo 'style="display:none;"'; } ?> id="gv_switch_view_button" href="#gv_switch_view" title="<?php esc_attr_e( 'Switch View', 'gravityview' ); ?>"><?php esc_html_e( 'Switch View Type', 'gravityview' ); ?></a> |
|
| 49 | 49 | </p> |
| 50 | 50 | |
| 51 | 51 | <?php // confirm dialog box ?> |