@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | return $a; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - $actions[ $a->id_base ] = $a; |
|
| 72 | + $actions[$a->id_base] = $a; |
|
| 73 | 73 | } |
| 74 | 74 | unset( $temp_actions, $a ); |
| 75 | 75 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | arsort( $temp_actions ); |
| 84 | 84 | foreach ( $temp_actions as $type => $a ) { |
| 85 | 85 | if ( ! isset( $a->action_options['active'] ) || empty( $a->action_options['active'] ) ) { |
| 86 | - unset( $actions[ $type ] ); |
|
| 86 | + unset( $actions[$type] ); |
|
| 87 | 87 | if ( count( $actions ) <= $action_limit ) { |
| 88 | 88 | break; |
| 89 | 89 | } |
@@ -115,16 +115,16 @@ discard block |
||
| 115 | 115 | $action_map = array(); |
| 116 | 116 | |
| 117 | 117 | foreach ( $action_controls as $key => $control ) { |
| 118 | - $action_map[ $control->id_base ] = $key; |
|
| 118 | + $action_map[$control->id_base] = $key; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | foreach ( $form_actions as $action ) { |
| 122 | - if ( ! isset( $action_map[ $action->post_excerpt ] ) ) { |
|
| 122 | + if ( ! isset( $action_map[$action->post_excerpt] ) ) { |
|
| 123 | 123 | // don't try and show settings if action no longer exists |
| 124 | 124 | continue; |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | - self::action_control( $action, $form, $action->ID, $action_controls[ $action_map[ $action->post_excerpt ] ], $values ); |
|
| 127 | + self::action_control( $action, $form, $action->ID, $action_controls[$action_map[$action->post_excerpt]], $values ); |
|
| 128 | 128 | } |
| 129 | 129 | } |
| 130 | 130 | |
@@ -304,8 +304,8 @@ discard block |
||
| 304 | 304 | } |
| 305 | 305 | |
| 306 | 306 | // store actions so they can be triggered with the correct priority |
| 307 | - $stored_actions[ $action->ID ] = $action; |
|
| 308 | - $action_priority[ $action->ID ] = $link_settings[ $action->post_excerpt ]->action_options['priority']; |
|
| 307 | + $stored_actions[$action->ID] = $action; |
|
| 308 | + $action_priority[$action->ID] = $link_settings[$action->post_excerpt]->action_options['priority']; |
|
| 309 | 309 | |
| 310 | 310 | unset( $action ); |
| 311 | 311 | } |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | new FrmNotification(); |
| 318 | 318 | |
| 319 | 319 | foreach ( $action_priority as $action_id => $priority ) { |
| 320 | - $action = $stored_actions[ $action_id ]; |
|
| 320 | + $action = $stored_actions[$action_id]; |
|
| 321 | 321 | do_action( 'frm_trigger_' . $action->post_excerpt . '_action', $action, $entry, $form, $event ); |
| 322 | 322 | do_action( 'frm_trigger_' . $action->post_excerpt . '_' . $event . '_action', $action, $entry, $form ); |
| 323 | 323 | |
@@ -364,12 +364,12 @@ discard block |
||
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | public function register( $action_class ) { |
| 367 | - $this->actions[ $action_class ] = new $action_class(); |
|
| 367 | + $this->actions[$action_class] = new $action_class(); |
|
| 368 | 368 | } |
| 369 | 369 | |
| 370 | 370 | public function unregister( $action_class ) { |
| 371 | - if ( isset( $this->actions[ $action_class ] ) ) { |
|
| 372 | - unset( $this->actions[ $action_class ] ); |
|
| 371 | + if ( isset( $this->actions[$action_class] ) ) { |
|
| 372 | + unset( $this->actions[$action_class] ); |
|
| 373 | 373 | } |
| 374 | 374 | } |
| 375 | 375 | |
@@ -378,8 +378,8 @@ discard block |
||
| 378 | 378 | |
| 379 | 379 | foreach ( $keys as $key ) { |
| 380 | 380 | // don't register new action if old action with the same id is already registered |
| 381 | - if ( ! isset( $this->actions[ $key ] ) ) { |
|
| 382 | - $this->actions[ $key ]->_register(); |
|
| 381 | + if ( ! isset( $this->actions[$key] ) ) { |
|
| 382 | + $this->actions[$key]->_register(); |
|
| 383 | 383 | } |
| 384 | 384 | } |
| 385 | 385 | } |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | |
| 137 | 137 | foreach ( $pass_settings as $setting ) { |
| 138 | 138 | if ( isset( $settings_list->$setting ) ) { |
| 139 | - $settings[ $setting ] = $settings_list->$setting; |
|
| 139 | + $settings[$setting] = $settings_list->$setting; |
|
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | $message_settings = array(); |
| 165 | 165 | foreach ( $messages as $message ) { |
| 166 | - $message_settings[ $message ] = $settings_list->$message; |
|
| 166 | + $message_settings[$message] = $settings_list->$message; |
|
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | return $message_settings; |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | |
| 182 | 182 | foreach ( $frm_roles as $frm_role => $frm_role_description ) { |
| 183 | 183 | if ( isset( $settings_list->$frm_role ) ) { |
| 184 | - $permissions[ $frm_role ] = $settings_list->$frm_role; |
|
| 184 | + $permissions[$frm_role] = $settings_list->$frm_role; |
|
| 185 | 185 | } |
| 186 | 186 | } |
| 187 | 187 | |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | ); |
| 237 | 237 | |
| 238 | 238 | foreach ( $saved_forms as $form ) { |
| 239 | - $forms[ $form->id ] = array( |
|
| 239 | + $forms[$form->id] = array( |
|
| 240 | 240 | 'id' => $form->id, |
| 241 | 241 | 'description' => $form->description, |
| 242 | 242 | 'logged_in' => $form->logged_in, |
@@ -248,8 +248,8 @@ discard block |
||
| 248 | 248 | ); |
| 249 | 249 | |
| 250 | 250 | foreach ( $settings as $setting ) { |
| 251 | - if ( isset( $form->options[ $setting ] ) ) { |
|
| 252 | - $forms[ $form->id ][ $setting ] = $form->options[ $setting ]; |
|
| 251 | + if ( isset( $form->options[$setting] ) ) { |
|
| 252 | + $forms[$form->id][$setting] = $form->options[$setting]; |
|
| 253 | 253 | } |
| 254 | 254 | } |
| 255 | 255 | } |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | * @return array |
| 298 | 298 | */ |
| 299 | 299 | private function fields() { |
| 300 | - $args = array( |
|
| 300 | + $args = array( |
|
| 301 | 301 | 'limit' => 100, |
| 302 | 302 | 'order_by' => 'id DESC', |
| 303 | 303 | ); |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | |
| 320 | 320 | $saved_actions = FrmDb::check_cache( serialize( $args ), 'frm_actions', $args, 'get_posts' ); |
| 321 | 321 | foreach ( $saved_actions as $action ) { |
| 322 | - $actions[ $action->ID ] = array( |
|
| 322 | + $actions[$action->ID] = array( |
|
| 323 | 323 | 'form_id' => $action->menu_order, |
| 324 | 324 | 'type' => $action->post_excerpt, |
| 325 | 325 | 'status' => $action->post_status, |