PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.4
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.4
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 | deprecated/FrmDeprecated.php +301 -16 6.35.4 View file →
@@ -264,8 +264,41 @@
264 264 return $filename;
265 265 }
266 266
267 267 /**
268 + * Filter shortcodes in text widgets
269 + *
270 + * @deprecated 2.5.4
271 + */
272 + public static function widget_text_filter( $content ) {
273 + _deprecated_function( __FUNCTION__, '2.5.4' );
274 + $regex = '/\[\s*(formidable|display-frm-data|frm-stats|frm-graph|frm-entry-links|formresults|frm-search)\s+.*\]/';
275 + return preg_replace_callback( $regex, 'FrmAppHelper::widget_text_filter_callback', $content );
276 + }
277 +
278 + /**
279 + * Used to filter shortcode in text widgets
280 + *
281 + * @deprecated 2.5.4
282 + */
283 + public static function widget_text_filter_callback( $matches ) {
284 + _deprecated_function( __FUNCTION__, '2.5.4' );
285 + return do_shortcode( $matches[0] );
286 + }
287 +
288 + /**
289 + * Deprecated in favor of wpmu_upgrade_site
290 + *
291 + * @deprecated 2.3
292 + */
293 + public static function front_head() {
294 + _deprecated_function( __FUNCTION__, '2.3' );
295 + if ( is_multisite() && FrmAppController::needs_update() ) {
296 + FrmAppController::install();
297 + }
298 + }
299 +
300 + /**
268 301 * @deprecated 3.0.04
269 302 */
270 303 public static function activation_install() {
271 304 _deprecated_function( __FUNCTION__, '3.0.04', 'FrmAppController::install' );
@@ -290,8 +323,32 @@
290 323 return $content;
291 324 }
292 325
293 326 /**
327 + * @deprecated 1.07.05
328 + */
329 + public static function get_form_shortcode( $atts ) {
330 + _deprecated_function( __FUNCTION__, '1.07.05', 'FrmFormsController::get_form_shortcode()' );
331 + return FrmFormsController::get_form_shortcode( $atts );
332 + }
333 +
334 + /**
335 + * @deprecated 1.07.05
336 + */
337 + public static function show_form( $id = '', $key = '', $title = false, $description = false ) {
338 + _deprecated_function( __FUNCTION__, '1.07.05', 'FrmFormsController::show_form()' );
339 + return FrmFormsController::show_form( $id, $key, $title, $description );
340 + }
341 +
342 + /**
343 + * @deprecated 1.07.05
344 + */
345 + public static function get_form( $filename, $form, $title, $description ) {
346 + _deprecated_function( __FUNCTION__, '1.07.05', 'FrmFormsController::get_form()' );
347 + return FrmFormsController::get_form( $form, $title, $description );
348 + }
349 +
350 + /**
294 351 * @deprecated 3.0
295 352 */
296 353 public static function edit_name( $field = 'name', $id = '' ) {
297 354 _deprecated_function( __FUNCTION__, '3.0' );
@@ -357,8 +414,18 @@
357 414 return __( 'Form template was Successfully Created', 'formidable' );
358 415 }
359 416
360 417 /**
418 + * @deprecated 2.03
419 + */
420 + public static function register_pro_scripts() {
421 + _deprecated_function( __FUNCTION__, '2.03', 'FrmProEntriesController::register_scripts' );
422 + if ( FrmAppHelper::pro_is_installed() ) {
423 + FrmProEntriesController::register_scripts();
424 + }
425 + }
426 +
427 + /**
361 428 * @deprecated 3.0
362 429 */
363 430 public static function edit_key() {
364 431 _deprecated_function( __FUNCTION__, '3.0' );
@@ -395,8 +462,50 @@
395 462 return $values;
396 463 }
397 464
398 465 /**
466 + * @deprecated 1.07.05
467 + */
468 + public static function add_default_templates( $path, $default = true, $template = true ) {
469 + _deprecated_function( __FUNCTION__, '1.07.05', 'FrmXMLController::add_default_templates()' );
470 +
471 + $path = untrailingslashit( trim( $path ) );
472 + $templates = glob( $path . '/*.php' );
473 +
474 + for ( $i = count( $templates ) - 1; $i >= 0; $i-- ) {
475 + $filename = str_replace( '.php', '', str_replace( $path . '/', '', $templates[ $i ] ) );
476 + $template_query = array( 'form_key' => $filename );
477 + if ( $template ) {
478 + $template_query['is_template'] = 1;
479 + }
480 + if ( $default ) {
481 + $template_query['default_template'] = 1;
482 + }
483 + $form = FrmForm::getAll( $template_query, '', 1 );
484 +
485 + $values = FrmFormsHelper::setup_new_vars();
486 + $values['form_key'] = $filename;
487 + $values['is_template'] = $template;
488 + $values['status'] = 'published';
489 +
490 + include( $templates[ $i ] );
491 +
492 + //get updated form
493 + if ( isset( $form ) && ! empty( $form ) ) {
494 + $old_id = $form->id;
495 + $form = FrmForm::getOne( $form->id );
496 + } else {
497 + $old_id = false;
498 + $form = FrmForm::getAll( $template_query, '', 1 );
499 + }
500 +
501 + if ( $form ) {
502 + do_action( 'frm_after_duplicate_form', $form->id, (array) $form, array( 'old_id' => $old_id ) );
503 + }
504 + }
505 + }
506 +
507 + /**
399 508 * @deprecated 3.01
400 509 */
401 510 public static function sanitize_array( &$values ) {
402 511 _deprecated_function( __FUNCTION__, '3.01', 'FrmAppHelper::sanitize_value' );
@@ -403,8 +512,184 @@
403 512 FrmAppHelper::sanitize_value( 'wp_kses_post', $values );
404 513 }
405 514
406 515 /**
516 + * Prepare and save settings in styles and actions
517 + *
518 + * @param array $settings
519 + * @param string $group
520 + *
521 + * @since 2.0.6
522 + * @deprecated 2.05.06
523 + */
524 + public static function save_settings( $settings, $group ) {
525 + _deprecated_function( __FUNCTION__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
526 + return FrmDb::save_settings( $settings, $group );
527 + }
528 +
529 + /**
530 + * Since actions are JSON encoded, we don't want any filters messing with it.
531 + * Remove the filters and then add them back in case any posts or views are
532 + * also being imported.
533 + *
534 + * Used when saving form actions and styles
535 + *
536 + * @since 2.0.4
537 + * @deprecated 2.05.06
538 + */
539 + public static function save_json_post( $settings ) {
540 + _deprecated_function( __FUNCTION__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
541 + return FrmDb::save_json_post( $settings );
542 + }
543 +
544 + /**
545 + * Check cache before fetching values and saving to cache
546 + *
547 + * @since 2.0
548 + * @deprecated 2.05.06
549 + *
550 + * @param string $cache_key The unique name for this cache
551 + * @param string $group The name of the cache group
552 + * @param string $query If blank, don't run a db call
553 + * @param string $type The wpdb function to use with this query
554 + * @return mixed $results The cache or query results
555 + */
556 + public static function check_cache( $cache_key, $group = '', $query = '', $type = 'get_var', $time = 300 ) {
557 + _deprecated_function( __FUNCTION__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
558 + return FrmDb::check_cache( $cache_key, $group, $query, $type, $time );
559 + }
560 +
561 + /**
562 + * @deprecated 2.05.06
563 + */
564 + public static function set_cache( $cache_key, $results, $group = '', $time = 300 ) {
565 + _deprecated_function( __FUNCTION__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
566 + FrmDb::set_cache( $cache_key, $results, $group, $time );
567 + }
568 +
569 + /**
570 + * Keep track of the keys cached in each group so they can be deleted
571 + * in Redis and Memcache
572 + * @deprecated 2.05.06
573 + */
574 + public static function add_key_to_group_cache( $key, $group ) {
575 + _deprecated_function( __FUNCTION__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
576 + FrmDb::add_key_to_group_cache( $key, $group );
577 + }
578 +
579 + /**
580 + * @deprecated 2.05.06
581 + */
582 + public static function get_group_cached_keys( $group ) {
583 + _deprecated_function( __FUNCTION__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
584 + return FrmDb::get_group_cached_keys( $group );
585 + }
586 +
587 + /**
588 + * @since 2.0
589 + * @deprecated 2.05.06
590 + * @param string $cache_key
591 + */
592 + public static function delete_cache_and_transient( $cache_key, $group = 'default' ) {
593 + _deprecated_function( __FUNCTION__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
594 + FrmDb::delete_cache_and_transient( $cache_key, $group );
595 + }
596 +
597 + /**
598 + * @since 2.0
599 + * @deprecated 2.05.06
600 + *
601 + * @param string $group The name of the cache group
602 + */
603 + public static function cache_delete_group( $group ) {
604 + _deprecated_function( __FUNCTION__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
605 + FrmDb::cache_delete_group( $group );
606 + }
607 +
608 + /**
609 + * Added for < WP 4.0 compatability
610 + *
611 + * @since 1.07.10
612 + * @deprecated 2.05.06
613 + *
614 + * @param string $term The value to escape
615 + * @return string The escaped value
616 + */
617 + public static function esc_like( $term ) {
618 + _deprecated_function( __FUNCTION__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
619 + return FrmDb::esc_like( $term );
620 + }
621 +
622 + /**
623 + * @param string $order_query
624 + * @deprecated 2.05.06
625 + */
626 + public static function esc_order( $order_query ) {
627 + _deprecated_function( __FUNCTION__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
628 + return FrmDb::esc_order( $order_query );
629 + }
630 +
631 + /**
632 + * Make sure this is ordering by either ASC or DESC
633 + * @deprecated 2.05.06
634 + */
635 + public static function esc_order_by( &$order_by ) {
636 + _deprecated_function( __FUNCTION__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
637 + FrmDb::esc_order_by( $order_by );
638 + }
639 +
640 + /**
641 + * @param string $limit
642 + * @deprecated 2.05.06
643 + */
644 + public static function esc_limit( $limit ) {
645 + _deprecated_function( __FUNCTION__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
646 + return FrmDb::esc_limit( $limit );
647 + }
648 +
649 + /**
650 + * Get an array of values ready to go through $wpdb->prepare
651 + * @since 2.0
652 + * @deprecated 2.05.06
653 + */
654 + public static function prepare_array_values( $array, $type = '%s' ) {
655 + _deprecated_function( __FUNCTION__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
656 + return FrmDb::prepare_array_values( $array, $type );
657 + }
658 +
659 + /**
660 + * @deprecated 2.05.06
661 + */
662 + public static function prepend_and_or_where( $starts_with = ' WHERE ', $where = '' ) {
663 + _deprecated_function( __FUNCTION__, '2.05.06', 'FrmDb::' . __FUNCTION__ );
664 + return FrmDb::prepend_and_or_where( $starts_with, $where );
665 + }
666 +
667 + /**
668 + * @deprecated 2.05.06
669 + */
670 + public static function upgrade() {
671 + $db = new FrmDbDeprecated();
672 + $db->upgrade();
673 + }
674 +
675 + /**
676 + * @deprecated 2.05.06
677 + */
678 + public static function collation() {
679 + $db = new FrmDbDeprecated();
680 + return $db->collation();
681 + }
682 +
683 + /**
684 + * @deprecated 2.05.06
685 + */
686 + public static function uninstall() {
687 + $db = new FrmDbDeprecated();
688 + $db->uninstall();
689 + }
690 +
691 + /**
407 692 * @deprecated 3.0
408 693 *
409 694 * @param string $html
410 695 * @param array $field
@@ -435,8 +720,24 @@
435 720 return $field_options;
436 721 }
437 722
438 723 /**
724 + * @deprecated 2.02.07
725 + */
726 + public static function dropdown_categories( $args ) {
727 + _deprecated_function( __FUNCTION__, '2.02.07', 'FrmProPost::get_category_dropdown' );
728 +
729 + if ( FrmAppHelper::pro_is_installed() ) {
730 + $args['location'] = 'front';
731 + $dropdown = FrmProPost::get_category_dropdown( $args['field'], $args );
732 + } else {
733 + $dropdown = '';
734 + }
735 +
736 + return $dropdown;
737 + }
738 +
739 + /**
439 740 * @deprecated 3.0
440 741 */
441 742 public static function remove_inline_conditions( $no_vars, $code, $replace_with, &$html ) {
442 743 _deprecated_function( __FUNCTION__, '3.0', 'FrmShortcodeHelper::remove_inline_conditions' );
@@ -591,22 +892,6 @@
591 892 return;
592 893 }
593 894
594 895 FrmEntryValidate::validate_field_types( $errors, $field, '', $args );
595 - }
596 -
597 - /**
598 - * @deprecated 2.02.07
599 - */
600 - public static function dropdown_categories( $args ) {
601 - _deprecated_function( __FUNCTION__, '2.02.07', 'FrmProPost::get_category_dropdown' );
602 -
603 - if ( FrmAppHelper::pro_is_installed() ) {
604 - $args['location'] = 'front';
605 - $dropdown = FrmProPost::get_category_dropdown( $args['field'], $args );
606 - } else {
607 - $dropdown = '';
608 - }
609 -
610 - return $dropdown;
611 896 }
612 897 }