Нет описания

deprecated.php 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * To be compatible with both WP 4.9 (that can run on PHP 5.2+) and WP 5.3+ (PHP 5.6+)
  4. * we need to rewrite some core WP classes and tweak our own skins to not use PHP 5.6 splat operator (...$args)
  5. * that were introduced in WP 5.3 in \WP_Upgrader_Skin::feedback().
  6. * This alias is a safeguard to those developers who decided to use our internal class WPForms_Install_Silent_Skin,
  7. * which we deleted.
  8. *
  9. * @since 1.5.6.1
  10. */
  11. class_alias( 'WPForms\Helpers\PluginSilentUpgraderSkin', 'WPForms_Install_Silent_Skin' );
  12. /**
  13. * Legacy `WPForms_Addons` class was refactored and moved to the new `WPForms\Pro\Admin\Pages\Addons` class.
  14. * This alias is a safeguard to those developers who use our internal class WPForms_Addons,
  15. * which we deleted.
  16. *
  17. * @since 1.6.7
  18. */
  19. class_alias( wpforms()->pro ? 'WPForms\Pro\Admin\Pages\Addons' : 'WPForms\Lite\Admin\Pages\Addons', 'WPForms_Addons' );
  20. /**
  21. * This alias is a safeguard to those developers who decided to use our internal class WPForms_Smart_Tags,
  22. * which we deleted.
  23. *
  24. * @since 1.6.7
  25. */
  26. class_alias( wpforms()->pro ? 'WPForms\Pro\SmartTags\SmartTags' : 'WPForms\SmartTags\SmartTags', 'WPForms_Smart_Tags' );
  27. /**
  28. * Get notification state, whether it's opened or closed.
  29. *
  30. * @deprecated 1.4.8
  31. *
  32. * @since 1.4.1
  33. *
  34. * @param int $form_id Form ID.
  35. * @param int $notification_id Notification ID.
  36. *
  37. * @return string
  38. */
  39. function wpforms_builder_notification_get_state( $form_id, $notification_id ) {
  40. _deprecated_function( __FUNCTION__, '1.4.8 of the WPForms plugin', 'wpforms_builder_settings_block_get_state()' );
  41. return wpforms_builder_settings_block_get_state( $form_id, $notification_id, 'notification' );
  42. }
  43. /**
  44. * Convert bytes to megabytes (or in some cases KB).
  45. *
  46. * @deprecated 1.6.2
  47. *
  48. * @since 1.0.0
  49. *
  50. * @param int $bytes Bytes to convert to a readable format.
  51. *
  52. * @return string
  53. */
  54. function wpforms_size_to_megabytes( $bytes ) {
  55. _deprecated_function( __FUNCTION__, '1.6.2 of the WPForms plugin', 'size_format()' );
  56. return size_format( $bytes );
  57. }