PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.5
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.5
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/models/FrmFormAction.php +2 -53 6.35.5 View file →
@@ -49,11 +49,8 @@
49 49 public function get_defaults() {
50 50 return array();
51 51 }
52 52
53 - /**
54 - * @return array
55 - */
56 53 public function get_switch_fields() {
57 54 return array();
58 55 }
59 56
@@ -96,9 +93,8 @@
96 93 'plugin' => $this->id_base,
97 94 'tooltip' => $name,
98 95 'group' => $id_base,
99 96 'color' => '',
100 - 'keywords' => '',
101 97 );
102 98
103 99 $action_options = apply_filters( 'frm_' . $id_base . '_action_options', $action_options );
104 100 $group = $this->get_group( $action_options );
@@ -201,20 +197,15 @@
201 197 public function get_field_id( $field_name ) {
202 198 return $field_name . '_' . $this->number;
203 199 }
204 200
205 - /**
206 - * @param int|string $number
207 - * @return void
208 - */
201 + // Private Function. Don't worry about this.
202 +
209 203 public function _set( $number ) {
210 204 $this->number = $number;
211 205 $this->id = $this->id_base . '-' . $number;
212 206 }
213 207
214 - /**
215 - * @return object
216 - */
217 208 public function prepare_new( $form_id = false ) {
218 209 if ( $form_id ) {
219 210 $this->form_id = $form_id;
220 211 }
@@ -251,11 +242,8 @@
251 242
252 243 return $this->save_settings( $action );
253 244 }
254 245
255 - /**
256 - * @return void
257 - */
258 246 public function duplicate_form_actions( $form_id, $old_id ) {
259 247 if ( $form_id == $old_id ) {
260 248 // don't duplicate the actions if this is a template getting updated
261 249 return;
@@ -291,11 +279,8 @@
291 279
292 280 return $post_id;
293 281 }
294 282
295 - /**
296 - * @param object $action
297 - */
298 283 public function duplicate_one( $action, $form_id ) {
299 284 global $frm_duplicate_ids;
300 285
301 286 $action->menu_order = $form_id;
@@ -522,13 +507,10 @@
522 507 }
523 508
524 509 /**
525 510 * @since 3.04
526 - *
527 511 * @param array $args
528 512 * @param string $default_status
529 - *
530 - * @return void
531 513 */
532 514 protected static function prepare_get_action( &$args, $default_status = 'publish' ) {
533 515 if ( is_numeric( $args ) ) {
534 516 // for reverse compatibility. $limit was changed to $args
@@ -566,14 +548,9 @@
566 548 return ! empty( $payment_actions );
567 549 }
568 550
569 551 public function get_all( $form_id = false, $atts = array() ) {
570 - if ( is_array( $atts ) && ! isset( $atts['limit'] ) && $this->action_options['limit'] > 99 ) {
571 - $atts['limit'] = $this->action_options['limit'];
572 - }
573 -
574 552 self::prepare_get_action( $atts, 'any' );
575 -
576 553 $limit = $atts['limit'];
577 554
578 555 if ( $form_id ) {
579 556 $this->form_id = $form_id;
@@ -615,11 +592,8 @@
615 592
616 593 return $settings;
617 594 }
618 595
619 - /**
620 - * @return array
621 - */
622 596 public static function action_args( $form_id = 0, $limit = 99 ) {
623 597 $args = array(
624 598 'post_type' => FrmFormActionsController::$action_post_type,
625 599 'post_status' => 'publish',
@@ -634,11 +608,8 @@
634 608
635 609 return $args;
636 610 }
637 611
638 - /**
639 - * @param WP_Post|array $action
640 - */
641 612 public function prepare_action( $action ) {
642 613 $action->post_content = (array) FrmAppHelper::maybe_json_decode( $action->post_content );
643 614 $action->post_excerpt = sanitize_title( $action->post_excerpt );
644 615
@@ -662,11 +633,8 @@
662 633
663 634 return $action;
664 635 }
665 636
666 - /**
667 - * @return void
668 - */
669 637 public function destroy( $form_id = false, $type = 'default' ) {
670 638 global $wpdb;
671 639
672 640 $this->form_id = $form_id;
@@ -690,10 +658,8 @@
690 658 /**
691 659 * Delete the action cache when a form action is created, deleted, or updated
692 660 *
693 661 * @since 2.0.5
694 - *
695 - * @return void
696 662 */
697 663 public static function clear_cache() {
698 664 FrmDb::cache_delete_group( 'frm_actions' );
699 665 }
@@ -701,11 +667,8 @@
701 667 public function get_settings() {
702 668 return self::get_action_for_form( $this->form_id, $this->id_base );
703 669 }
704 670
705 - /**
706 - * @return array
707 - */
708 671 public function get_global_defaults() {
709 672 $defaults = $this->get_defaults();
710 673
711 674 if ( ! isset( $defaults['event'] ) ) {
@@ -823,14 +786,11 @@
823 786 /**
824 787 * Prepare the logic value for comparison against the entered value
825 788 *
826 789 * @since 2.01.02
827 - *
828 790 * @deprecated 4.06.02
829 791 *
830 792 * @param array|string $logic_value
831 - *
832 - * @return void
833 793 */
834 794 private static function prepare_logic_value( &$logic_value, $action, $entry ) {
835 795 if ( is_array( $logic_value ) ) {
836 796 $logic_value = reset( $logic_value );
@@ -878,13 +838,8 @@
878 838
879 839 return $observed_value;
880 840 }
881 841
882 - /**
883 - * @param string $class
884 - *
885 - * @return array
886 - */
887 842 public static function default_action_opts( $class = '' ) {
888 843 return array(
889 844 'classes' => 'frm_icon_font ' . $class,
890 845 'active' => false,
@@ -903,11 +858,8 @@
903 858
904 859 return apply_filters( 'frm_action_triggers', $triggers );
905 860 }
906 861
907 - /**
908 - * @return void
909 - */
910 862 public function render_conditional_logic_call_to_action() {
911 863 ?>
912 864 <h3>
913 865 <a href="javascript:void(0)" class="frm_show_upgrade frm_noallow" data-upgrade="<?php echo esc_attr( $this->get_upgrade_text() ); ?>" data-medium="conditional-<?php echo esc_attr( $this->id_base ); ?>">
@@ -916,11 +868,8 @@
916 868 </h3>
917 869 <?php
918 870 }
919 871
920 - /**
921 - * @return string
922 - */
923 872 protected function get_upgrade_text() {
924 873 return __( 'Conditional form actions', 'formidable' );
925 874 }
926 875 }