@@ -59,8 +59,8 @@ |
||
| 59 | 59 | protected function init_saved_value( $entry ) { |
| 60 | 60 | if ( $this->field->type === 'html' ) { |
| 61 | 61 | $this->saved_value = $this->field->description; |
| 62 | - } elseif ( isset( $entry->metas[ $this->field->id ] ) ) { |
|
| 63 | - $this->saved_value = $entry->metas[ $this->field->id ]; |
|
| 62 | + } elseif ( isset( $entry->metas[$this->field->id] ) ) { |
|
| 63 | + $this->saved_value = $entry->metas[$this->field->id]; |
|
| 64 | 64 | } else { |
| 65 | 65 | $this->saved_value = ''; |
| 66 | 66 | } |
@@ -6,6 +6,6 @@ |
||
| 6 | 6 | $type = $field['type']; |
| 7 | 7 | do_action( 'frm_after_checkbox', compact( 'field', 'field_name', 'type' ) ); |
| 8 | 8 | } else { |
| 9 | - $read_only = $field['read_only']; |
|
| 9 | + $read_only = $field['read_only']; |
|
| 10 | 10 | include( dirname( __FILE__ ) . '/' . $field['type'] . '-field.php' ); |
| 11 | 11 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | if ( isset( $values['fields'] ) && ! empty( $values['fields'] ) ) { |
| 23 | 23 | $values['count'] = 0; |
| 24 | 24 | foreach ( $values['fields'] as $field ) { |
| 25 | - $values['count']++; |
|
| 25 | + $values['count'] ++; |
|
| 26 | 26 | FrmFieldsController::load_single_field( $field, $values ); |
| 27 | 27 | unset( $field ); |
| 28 | 28 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $event_labels = FrmFormAction::trigger_labels(); |
| 37 | 37 | foreach ( $action_control->action_options['event'] as $event ) { |
| 38 | 38 | ?> |
| 39 | - <option value="<?php echo esc_attr( $event ); ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo esc_html( isset( $event_labels[ $event ] ) ? $event_labels[ $event ] : $event ); ?></option> |
|
| 39 | + <option value="<?php echo esc_attr( $event ); ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo esc_html( isset( $event_labels[$event] ) ? $event_labels[$event] : $event ); ?></option> |
|
| 40 | 40 | <?php } ?> |
| 41 | 41 | </select> |
| 42 | 42 | </p> |
@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | class FrmDefPostAction extends FrmFormAction { |
| 4 | 4 | public function __construct() { |
| 5 | 5 | $action_ops = FrmFormAction::default_action_opts( 'frm_wordpress_icon frm-inverse frm_show_upgrade' ); |
| 6 | - $action_ops['color'] = 'rgb(0,160,210)'; |
|
| 6 | + $action_ops['color'] = 'rgb(0,160,210)'; |
|
| 7 | 7 | |
| 8 | 8 | parent::__construct( 'wppost', __( 'Create Post', 'formidable' ), $action_ops ); |
| 9 | 9 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | class FrmDefMlcmpAction extends FrmFormAction { |
| 43 | 43 | public function __construct() { |
| 44 | 44 | $action_ops = FrmFormAction::default_action_opts( 'frm_mailchimp_icon frm_show_upgrade frm-inverse' ); |
| 45 | - $action_ops['color'] = 'var(--dark-grey)'; |
|
| 45 | + $action_ops['color'] = 'var(--dark-grey)'; |
|
| 46 | 46 | |
| 47 | 47 | parent::__construct( 'mailchimp', 'MailChimp', $action_ops ); |
| 48 | 48 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | $s_query['it.form_id'] = $form_id; |
| 18 | 18 | $join_form_in_query = false; |
| 19 | 19 | } else { |
| 20 | - $s_query[] = array( |
|
| 20 | + $s_query[] = array( |
|
| 21 | 21 | 'or' => 1, |
| 22 | 22 | 'parent_form_id' => null, |
| 23 | 23 | 'parent_form_id <' => 1, |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | if ( strpos( $orderby, 'meta' ) !== false ) { |
| 50 | 50 | $order_field_type = FrmField::get_type( str_replace( 'meta_', '', $orderby ) ); |
| 51 | - $orderby .= in_array( $order_field_type, array( 'number', 'scale', 'star' ) ) ? '+0' : ''; |
|
| 51 | + $orderby .= in_array( $order_field_type, array( 'number', 'scale', 'star' ) ) ? '+0' : ''; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | $order = self::get_param( |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | |
| 159 | 159 | $r = "<tr id='item-action-{$item->id}'$style>"; |
| 160 | 160 | |
| 161 | - list( $columns, $hidden, , $primary ) = $this->get_column_info(); |
|
| 161 | + list( $columns, $hidden,, $primary ) = $this->get_column_info(); |
|
| 162 | 162 | $action_col = false; |
| 163 | 163 | |
| 164 | 164 | foreach ( $columns as $column_name => $column_display_name ) { |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | } |
| 297 | 297 | |
| 298 | 298 | public static function get_banner_tip() { |
| 299 | - $tips = array( |
|
| 299 | + $tips = array( |
|
| 300 | 300 | array( |
| 301 | 301 | 'link' => array( |
| 302 | 302 | 'medium' => 'banner', |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | ), |
| 324 | 324 | ); |
| 325 | 325 | $random = rand( 0, count( $tips ) - 1 ); |
| 326 | - $tip = $tips[ $random ]; |
|
| 326 | + $tip = $tips[$random]; |
|
| 327 | 327 | $tip['num'] = $random; |
| 328 | 328 | |
| 329 | 329 | return $tip; |
@@ -332,6 +332,6 @@ discard block |
||
| 332 | 332 | public static function get_random_tip( $tips ) { |
| 333 | 333 | $random = rand( 0, count( $tips ) - 1 ); |
| 334 | 334 | |
| 335 | - return $tips[ $random ]; |
|
| 335 | + return $tips[$random]; |
|
| 336 | 336 | } |
| 337 | 337 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | $page = $this->get_pagenum(); |
| 19 | 19 | $per_page = $this->get_items_per_page( 'formidable_page_formidable_per_page' ); |
| 20 | 20 | |
| 21 | - $mode = self::get_param( |
|
| 21 | + $mode = self::get_param( |
|
| 22 | 22 | array( |
| 23 | 23 | 'param' => 'mode', |
| 24 | 24 | 'default' => 'list', |
@@ -30,13 +30,13 @@ discard block |
||
| 30 | 30 | 'default' => 'name', |
| 31 | 31 | ) |
| 32 | 32 | ); |
| 33 | - $order = self::get_param( |
|
| 33 | + $order = self::get_param( |
|
| 34 | 34 | array( |
| 35 | 35 | 'param' => 'order', |
| 36 | 36 | 'default' => 'ASC', |
| 37 | 37 | ) |
| 38 | 38 | ); |
| 39 | - $start = self::get_param( |
|
| 39 | + $start = self::get_param( |
|
| 40 | 40 | array( |
| 41 | 41 | 'param' => 'start', |
| 42 | 42 | 'default' => ( $page - 1 ) * $per_page, |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | |
| 178 | 178 | if ( $counts->{$status} || 'draft' !== $status ) { |
| 179 | 179 | /* translators: %1$s: Status, %2$s: Number of items */ |
| 180 | - $links[ $status ] = '<a href="' . esc_url( '?page=formidable&form_type=' . $status ) . '" ' . $class . '>' . sprintf( __( '%1$s <span class="count">(%2$s)</span>', 'formidable' ), $name, number_format_i18n( $counts->{$status} ) ) . '</a>'; |
|
| 180 | + $links[$status] = '<a href="' . esc_url( '?page=formidable&form_type=' . $status ) . '" ' . $class . '>' . sprintf( __( '%1$s <span class="count">(%2$s)</span>', 'formidable' ), $name, number_format_i18n( $counts->{$status} ) ) . '</a>'; |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | unset( $status, $name ); |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | private function get_actions( &$actions, $item, $edit_link ) { |
| 283 | 283 | $new_actions = FrmFormsHelper::get_action_links( $item->id, $item ); |
| 284 | 284 | foreach ( $new_actions as $link => $action ) { |
| 285 | - $new_actions[ $link ] = FrmFormsHelper::format_link_html( $action, 'short' ); |
|
| 285 | + $new_actions[$link] = FrmFormsHelper::format_link_html( $action, 'short' ); |
|
| 286 | 286 | } |
| 287 | 287 | |
| 288 | 288 | if ( 'trash' == $this->status ) { |
@@ -61,8 +61,8 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | $with_tags = $args['conditional_check'] ? 3 : 2; |
| 64 | - if ( ! empty( $shortcodes[ $with_tags ][ $short_key ] ) ) { |
|
| 65 | - $tag = str_replace( '[' . $prefix, '', $shortcodes[0][ $short_key ] ); |
|
| 64 | + if ( ! empty( $shortcodes[$with_tags][$short_key] ) ) { |
|
| 65 | + $tag = str_replace( '[' . $prefix, '', $shortcodes[0][$short_key] ); |
|
| 66 | 66 | $tag = str_replace( ']', '', $tag ); |
| 67 | 67 | $tag = str_replace( chr( 194 ) . chr( 160 ), ' ', $tag ); |
| 68 | 68 | $tags = preg_split( '/\s+/', $tag, 2 ); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $tag = $tags[0]; |
| 71 | 71 | } |
| 72 | 72 | } else { |
| 73 | - $tag = $shortcodes[ $with_tags - 1 ][ $short_key ]; |
|
| 73 | + $tag = $shortcodes[$with_tags - 1][$short_key]; |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | return $tag; |