説明なし

defaults.php 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /**
  3. * Default Settings, Popup Settings, Theme Settings.
  4. */
  5. // Exit if accessed directly
  6. if ( ! defined( 'ABSPATH' ) ) {
  7. exit;
  8. }
  9. add_filter( 'popmake_popup_display_defaults', 'popmake_popup_display_defaults', 0 );
  10. add_filter( 'pum_popup_display_defaults', 'popmake_popup_display_defaults', 0 );
  11. /**
  12. * Returns default display settings for popups.
  13. *
  14. * @param array $defaults
  15. *
  16. * @return array
  17. */
  18. function popmake_popup_display_defaults( $defaults = array() ) {
  19. return array_merge( $defaults, array(
  20. 'stackable' => false,
  21. 'overlay_disabled' => false,
  22. 'scrollable_content' => false,
  23. 'disable_reposition' => false,
  24. 'size' => 'medium',
  25. 'responsive_min_width' => '',
  26. 'responsive_min_width_unit' => 'px',
  27. 'responsive_max_width' => '',
  28. 'responsive_max_width_unit' => 'px',
  29. 'custom_width' => 640,
  30. 'custom_width_unit' => 'px',
  31. 'custom_height' => 380,
  32. 'custom_height_unit' => 'px',
  33. 'custom_height_auto' => false,
  34. 'location' => 'center top',
  35. 'position_from_trigger' => false,
  36. 'position_top' => 100,
  37. 'position_left' => 0,
  38. 'position_bottom' => 0,
  39. 'position_right' => 0,
  40. 'position_fixed' => false,
  41. 'animation_type' => 'fade',
  42. 'animation_speed' => 350,
  43. 'animation_origin' => 'center top',
  44. 'overlay_zindex' => 1999999998,
  45. 'zindex' => 1999999999,
  46. ) );
  47. }
  48. add_filter( 'popmake_popup_close_defaults', 'popmake_popup_close_defaults', 0 );
  49. add_filter( 'pum_popup_close_defaults', 'popmake_popup_close_defaults', 0 );
  50. function popmake_popup_close_defaults( $defaults = array() ) {
  51. return array_merge( $defaults, array(
  52. 'text' => '',
  53. 'button_delay' => '0',
  54. 'overlay_click' => false,
  55. 'esc_press' => false,
  56. 'f4_press' => false,
  57. ) );
  58. }