Açıklama Yok

Provider.php 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. /*******************************************************************************
  3. * Copyright (c) 2019, Code Atlantic LLC
  4. ******************************************************************************/
  5. if ( ! defined( 'ABSPATH' ) ) {
  6. exit;
  7. }
  8. /**
  9. * Interface PUM_Interface_Provider
  10. *
  11. * @since 1.7.0
  12. */
  13. interface PUM_Interface_Provider {
  14. /**
  15. * Determines whether to load this providers fields in the shortcode editor among other things.
  16. *
  17. * @return bool
  18. */
  19. public function enabled();
  20. /**
  21. * Contains each providers unique global settings.
  22. *
  23. * @return array
  24. */
  25. public function register_settings();
  26. /**
  27. * Contains each providers unique global settings tab sections..
  28. *
  29. * @param array $sections
  30. *
  31. * @return array
  32. */
  33. public function register_settings_tab_section( $sections = array() );
  34. /**
  35. * Creates the inputs for each of the needed extra fields for the email provider
  36. *
  37. * @param $shortcode_atts
  38. */
  39. public function render_fields( $shortcode_atts );
  40. /**
  41. * Allows processing of form value sanitization.
  42. *
  43. * @param array $values
  44. *
  45. * @return array $values
  46. */
  47. public function form_sanitization( $values = array() );
  48. /**
  49. * Allows processing of form value validation.
  50. *
  51. * @param WP_Error $errors
  52. * @param array $values
  53. *
  54. * @return WP_Error
  55. */
  56. public function form_validation( WP_Error $errors, $values = array() );
  57. /**
  58. * Subscribes the user to the list.
  59. *
  60. * @param $values
  61. * @param array $json_response
  62. * @param WP_Error $errors
  63. */
  64. public function form_submission( $values, &$json_response, WP_Error &$errors );
  65. }