PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.0
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.0
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 -52 6.36.0 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
@@ -201,20 +198,15 @@
201 198 public function get_field_id( $field_name ) {
202 199 return $field_name . '_' . $this->number;
203 200 }
204 201
205 - /**
206 - * @param int|string $number
207 - * @return void
208 - */
202 + // Private Function. Don't worry about this.
203 +
209 204 public function _set( $number ) {
210 205 $this->number = $number;
211 206 $this->id = $this->id_base . '-' . $number;
212 207 }
213 208
214 - /**
215 - * @return object
216 - */
217 209 public function prepare_new( $form_id = false ) {
218 210 if ( $form_id ) {
219 211 $this->form_id = $form_id;
220 212 }
@@ -251,11 +243,8 @@
251 243
252 244 return $this->save_settings( $action );
253 245 }
254 246
255 - /**
256 - * @return void
257 - */
258 247 public function duplicate_form_actions( $form_id, $old_id ) {
259 248 if ( $form_id == $old_id ) {
260 249 // don't duplicate the actions if this is a template getting updated
261 250 return;
@@ -291,11 +280,8 @@
291 280
292 281 return $post_id;
293 282 }
294 283
295 - /**
296 - * @param object $action
297 - */
298 284 public function duplicate_one( $action, $form_id ) {
299 285 global $frm_duplicate_ids;
300 286
301 287 $action->menu_order = $form_id;
@@ -522,13 +508,10 @@
522 508 }
523 509
524 510 /**
525 511 * @since 3.04
526 - *
527 512 * @param array $args
528 513 * @param string $default_status
529 - *
530 - * @return void
531 514 */
532 515 protected static function prepare_get_action( &$args, $default_status = 'publish' ) {
533 516 if ( is_numeric( $args ) ) {
534 517 // for reverse compatibility. $limit was changed to $args
@@ -566,14 +549,9 @@
566 549 return ! empty( $payment_actions );
567 550 }
568 551
569 552 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 553 self::prepare_get_action( $atts, 'any' );
575 -
576 554 $limit = $atts['limit'];
577 555
578 556 if ( $form_id ) {
579 557 $this->form_id = $form_id;
@@ -615,11 +593,8 @@
615 593
616 594 return $settings;
617 595 }
618 596
619 - /**
620 - * @return array
621 - */
622 597 public static function action_args( $form_id = 0, $limit = 99 ) {
623 598 $args = array(
624 599 'post_type' => FrmFormActionsController::$action_post_type,
625 600 'post_status' => 'publish',
@@ -634,11 +609,8 @@
634 609
635 610 return $args;
636 611 }
637 612
638 - /**
639 - * @param WP_Post|array $action
640 - */
641 613 public function prepare_action( $action ) {
642 614 $action->post_content = (array) FrmAppHelper::maybe_json_decode( $action->post_content );
643 615 $action->post_excerpt = sanitize_title( $action->post_excerpt );
644 616
@@ -662,11 +634,8 @@
662 634
663 635 return $action;
664 636 }
665 637
666 - /**
667 - * @return void
668 - */
669 638 public function destroy( $form_id = false, $type = 'default' ) {
670 639 global $wpdb;
671 640
672 641 $this->form_id = $form_id;
@@ -690,10 +659,8 @@
690 659 /**
691 660 * Delete the action cache when a form action is created, deleted, or updated
692 661 *
693 662 * @since 2.0.5
694 - *
695 - * @return void
696 663 */
697 664 public static function clear_cache() {
698 665 FrmDb::cache_delete_group( 'frm_actions' );
699 666 }
@@ -701,11 +668,8 @@
701 668 public function get_settings() {
702 669 return self::get_action_for_form( $this->form_id, $this->id_base );
703 670 }
704 671
705 - /**
706 - * @return array
707 - */
708 672 public function get_global_defaults() {
709 673 $defaults = $this->get_defaults();
710 674
711 675 if ( ! isset( $defaults['event'] ) ) {
@@ -823,14 +787,11 @@
823 787 /**
824 788 * Prepare the logic value for comparison against the entered value
825 789 *
826 790 * @since 2.01.02
827 - *
828 791 * @deprecated 4.06.02
829 792 *
830 793 * @param array|string $logic_value
831 - *
832 - * @return void
833 794 */
834 795 private static function prepare_logic_value( &$logic_value, $action, $entry ) {
835 796 if ( is_array( $logic_value ) ) {
836 797 $logic_value = reset( $logic_value );
@@ -878,13 +839,8 @@
878 839
879 840 return $observed_value;
880 841 }
881 842
882 - /**
883 - * @param string $class
884 - *
885 - * @return array
886 - */
887 843 public static function default_action_opts( $class = '' ) {
888 844 return array(
889 845 'classes' => 'frm_icon_font ' . $class,
890 846 'active' => false,
@@ -903,11 +859,8 @@
903 859
904 860 return apply_filters( 'frm_action_triggers', $triggers );
905 861 }
906 862
907 - /**
908 - * @return void
909 - */
910 863 public function render_conditional_logic_call_to_action() {
911 864 ?>
912 865 <h3>
913 866 <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 +869,8 @@
916 869 </h3>
917 870 <?php
918 871 }
919 872
920 - /**
921 - * @return string
922 - */
923 873 protected function get_upgrade_text() {
924 874 return __( 'Conditional form actions', 'formidable' );
925 875 }
926 876 }