Нет описания

input-options.php 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <?php
  2. /**
  3. * Selectbox options,and other array based data sets used for options.
  4. */
  5. // Exit if accessed directly
  6. if ( ! defined( 'ABSPATH' ) ) {
  7. exit;
  8. }
  9. // TODO LEFT OFF HERE!! MOVE THESE INTO <-- Themes <--
  10. add_filter( 'popmake_size_unit_options', 'popmake_core_size_unit_options', 10 );
  11. function popmake_core_size_unit_options( $options ) {
  12. return array_merge( $options, array(
  13. // option => value
  14. 'px' => 'px',
  15. '%' => '%',
  16. 'em' => 'em',
  17. 'rem' => 'rem',
  18. ) );
  19. }
  20. add_filter( 'popmake_font_style_options', 'popmake_core_font_style_options', 10 );
  21. function popmake_core_font_style_options( $options ) {
  22. return array_merge( $options, array(
  23. __( 'Normal', 'popup-maker' ) => '',
  24. __( 'Italic', 'popup-maker' ) => 'italic',
  25. ) );
  26. }
  27. add_filter( 'popmake_text_align_options', 'popmake_core_text_align_options', 10 );
  28. function popmake_core_text_align_options( $options ) {
  29. return array_merge( $options, array(
  30. // option => value
  31. __( 'Left', 'popup-maker' ) => 'left',
  32. __( 'Center', 'popup-maker' ) => 'center',
  33. __( 'Right', 'popup-maker' ) => 'right',
  34. ) );
  35. }
  36. add_filter( 'popmake_popup_display_size_options', 'popmake_popup_display_size_options_responsive', 10 );
  37. function popmake_popup_display_size_options_responsive( $options ) {
  38. return array_merge( $options, array(
  39. // option => value
  40. __( 'Responsive Sizes&#10549;', 'popup-maker' ) => '',
  41. __( 'Nano - 10%', 'popup-maker' ) => 'nano',
  42. __( 'Micro - 20%', 'popup-maker' ) => 'micro',
  43. __( 'Tiny - 30%', 'popup-maker' ) => 'tiny',
  44. __( 'Small - 40%', 'popup-maker' ) => 'small',
  45. __( 'Medium - 60%', 'popup-maker' ) => 'medium',
  46. __( 'Normal - 70%', 'popup-maker' ) => 'normal',
  47. __( 'Large - 80%', 'popup-maker' ) => 'large',
  48. __( 'X Large - 95%', 'popup-maker' ) => 'xlarge',
  49. __( 'Non Responsive Sizes&#10549;', 'popup-maker' ) => '',
  50. __( 'Auto', 'popup-maker' ) => 'auto',
  51. __( 'Custom', 'popup-maker' ) => 'custom',
  52. ) );
  53. }
  54. add_filter( 'popmake_popup_display_animation_type_options', 'popmake_core_popup_display_animation_type_options', 10 );
  55. function popmake_core_popup_display_animation_type_options( $options ) {
  56. return array_merge( $options, array(
  57. // option => value
  58. __( 'None', 'popup-maker' ) => 'none',
  59. __( 'Slide', 'popup-maker' ) => 'slide',
  60. __( 'Fade', 'popup-maker' ) => 'fade',
  61. __( 'Fade and Slide', 'popup-maker' ) => 'fadeAndSlide',
  62. __( 'Grow', 'popup-maker' ) => 'grow',
  63. __( 'Grow and Slide', 'popup-maker' ) => 'growAndSlide',
  64. ) );
  65. }
  66. add_filter( 'popmake_popup_display_animation_origin_options', 'popmake_core_popup_display_animation_origins_options', 10 );
  67. function popmake_core_popup_display_animation_origins_options( $options ) {
  68. return array_merge( $options, array(
  69. // option => value
  70. __( 'Top', 'popup-maker' ) => 'top',
  71. __( 'Left', 'popup-maker' ) => 'left',
  72. __( 'Bottom', 'popup-maker' ) => 'bottom',
  73. __( 'Right', 'popup-maker' ) => 'right',
  74. __( 'Top Left', 'popup-maker' ) => 'left top',
  75. __( 'Top Center', 'popup-maker' ) => 'center top',
  76. __( 'Top Right', 'popup-maker' ) => 'right top',
  77. __( 'Middle Left', 'popup-maker' ) => 'left center',
  78. __( 'Middle Center', 'popup-maker' ) => 'center center',
  79. __( 'Middle Right', 'popup-maker' ) => 'right center',
  80. __( 'Bottom Left', 'popup-maker' ) => 'left bottom',
  81. __( 'Bottom Center', 'popup-maker' ) => 'center bottom',
  82. __( 'Bottom Right', 'popup-maker' ) => 'right bottom',
  83. //__( 'Mouse', 'popup-maker' ) => 'mouse',
  84. ) );
  85. }
  86. add_filter( 'popmake_popup_display_location_options', 'popmake_core_popup_display_location_options', 10 );
  87. function popmake_core_popup_display_location_options( $options ) {
  88. return array_merge( $options, array(
  89. // option => value
  90. __( 'Top Left', 'popup-maker' ) => 'left top',
  91. __( 'Top Center', 'popup-maker' ) => 'center top',
  92. __( 'Top Right', 'popup-maker' ) => 'right top',
  93. __( 'Middle Left', 'popup-maker' ) => 'left center',
  94. __( 'Middle Center', 'popup-maker' ) => 'center',
  95. __( 'Middle Right', 'popup-maker' ) => 'right center',
  96. __( 'Bottom Left', 'popup-maker' ) => 'left bottom',
  97. __( 'Bottom Center', 'popup-maker' ) => 'center bottom',
  98. __( 'Bottom Right', 'popup-maker' ) => 'right bottom',
  99. ) );
  100. }
  101. add_filter( 'popmake_theme_close_location_options', 'popmake_core_theme_close_location_options', 10 );
  102. function popmake_core_theme_close_location_options( $options ) {
  103. return array_merge( $options, array(
  104. // option => value
  105. __( 'Top Left', 'popup-maker' ) => 'topleft',
  106. __( 'Top Right', 'popup-maker' ) => 'topright',
  107. __( 'Bottom Left', 'popup-maker' ) => 'bottomleft',
  108. __( 'Bottom Right', 'popup-maker' ) => 'bottomright',
  109. ) );
  110. }
  111. add_filter( 'popmake_cookie_trigger_options', 'popmake_cookie_trigger_options', 10 );
  112. function popmake_cookie_trigger_options( $options ) {
  113. return array_merge( $options, array(
  114. // option => value
  115. __( 'Disabled', 'popup-maker' ) => 'disabled',
  116. __( 'On Open', 'popup-maker' ) => 'open',
  117. __( 'On Close', 'popup-maker' ) => 'close',
  118. __( 'Manual', 'popup-maker' ) => 'manual',
  119. ) );
  120. }