PageRenderTime 43ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/plugins/kiwi-social-share/includes/backend/parts/kiwi-tab-article-bar.php

https://bitbucket.org/Netbog/mormirkam
PHP | 259 lines | 236 code | 23 blank | 0 comment | 1 complexity | 673bbcc2105ade54575385d51663ec54 MD5 | raw file
Possible License(s): GPL-2.0, MIT
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. exit;
  4. }
  5. ?>
  6. <div class="sl-kiwi-tab-article-bar <?php echo ( $hash === 'sl-kiwi-tab-article-bar' ) ? 'epsilon-tab-active' : ''; ?>">
  7. <h2>
  8. <span><?php echo esc_html__( 'Article bar', 'kiwi-social-share' ) ?></span>
  9. </h2>
  10. <div class="sl-kiwi-opt-group clearfix">
  11. <?php
  12. $share_buttons = Kiwi_Social_Share_Helper::get_setting_value( 'share_buttons', '' );
  13. ?>
  14. <div class="sl-kiwi-opt-toggle">
  15. <div class="epsilon-ui-toggle">
  16. <label>
  17. <input type="checkbox" id="kiwi_share_buttons"
  18. name="kiwi_general_settings[share_buttons]" <?php echo ! empty( $share_buttons ) ? 'checked' : ''; ?>
  19. value="on"/>
  20. <span></span>
  21. </label>
  22. </div>
  23. </div>
  24. <div class="sl-kiwi-opt-description kiwi-title-has-tooltip">
  25. <h4><?php echo esc_html__( 'Social bar', 'kiwi-social-share' ) ?></h4>
  26. <div class="kiwi-tooltip-container">
  27. <span data-attribute="shortcode-tooltip" class="tooltip-opener dashicons dashicons-info"></span>
  28. <div id="shortcode-tooltip" class="kiwi-notice-container">
  29. <p><?php echo esc_html__( 'To insert the share bar anywhere in the article, you can use the [kiwi-social-bar] shortcode. For a more advanced usage of shortcodes, you can activate the Shortcode manager from the Advanced tab.', 'kiwi-social-share' ); ?></p>
  30. </div>
  31. </div>
  32. <p><?php echo esc_html__( 'The social buttons can be shown before or after content (post, page, custom post).', 'kiwi-social-share' ) ?></p>
  33. </div>
  34. <div class="epsilon-ui-option right">
  35. <?php
  36. $share_buttons_location = Kiwi_Social_Share_Helper::get_setting_value( 'share_buttons_location', 'bottom' );
  37. ?>
  38. <ul>
  39. <li>
  40. <label>
  41. <input type="radio" id="kiwi_share_buttons_location_a"
  42. name="kiwi_general_settings[share_buttons_location]" <?php echo ( $share_buttons_location === 'top' ) ? 'checked' : ''; ?>
  43. value="top"/>
  44. <span>
  45. <i class="icon kiwi-ic-postop"><strong><em></em><em></em><em></em></strong></i>
  46. <span><?php echo esc_html__( 'Top', 'kiwi-social-share' ); ?></span>
  47. </span>
  48. </label>
  49. </li>
  50. <li>
  51. <?php
  52. ?>
  53. <label>
  54. <input type="radio" id="kiwi_share_buttons_location_b"
  55. name="kiwi_general_settings[share_buttons_location]"
  56. value="bottom" <?php echo ( $share_buttons_location === 'bottom' ) ? 'checked' : ''; ?>/>
  57. <span>
  58. <i class="icon kiwi-ic-posbottom"><strong><em></em><em></em><em></em></strong></i>
  59. <span><?php echo esc_html__( 'Bottom', 'kiwi-social-share' ); ?></span>
  60. </span>
  61. </label>
  62. </li>
  63. <li>
  64. <label>
  65. <input type="radio" id="kiwi_share_buttons_location_c"
  66. name="kiwi_general_settings[share_buttons_location]"
  67. value="both" <?php echo ( $share_buttons_location === 'both' ) ? 'checked' : ''; ?>/>
  68. <span>
  69. <i class="icon kiwi-ic-posboth"><strong><em class="top"></em><em class="top"></em><em
  70. class="top"></em><em class="bottom"></em><em class="bottom"></em><em
  71. class="bottom"></em></strong></i>
  72. <span><?php echo esc_html__( 'Both', 'kiwi-social-share' ); ?></span>
  73. </span>
  74. </label>
  75. </li>
  76. </ul>
  77. <div class="epsilon-ui-overlay <?php echo ! empty( $share_buttons ) ? '' : 'active'; ?>"></div>
  78. </div>
  79. <div class="clearfix"></div>
  80. <?php
  81. $share_buttons_posttypes = Kiwi_Social_Share_Helper::get_setting_value( 'share_buttons_posttypes', 'all' );
  82. ?>
  83. <div class="sl-kiwi-opt-description sl-kiwi-radio-post-types sl-kiwi-inner-opt clearfix">
  84. <h5><?php echo esc_html__( 'Activate this feature on', 'kiwi-social-share' ) ?></h5>
  85. <label class="epsilon-ui-radio ui-radio-inline">
  86. <input type="radio" id="kiwi_share_buttons_posttypes_a"
  87. name="kiwi_general_settings[share_buttons_posttypes]"
  88. value="all" <?php echo ( $share_buttons_posttypes === 'all' ) ? 'checked' : ''; ?> />
  89. <strong></strong>
  90. <?php echo esc_html__( 'All Pages', 'kiwi-social-share' ); ?>
  91. </label>
  92. <label class="epsilon-ui-radio ui-radio-inline ui-locked">
  93. <input type="radio" id="kiwi_share_buttons_posttypes_b"
  94. name="kiwi_general_settings[share_buttons_posttypes]" disabled
  95. value="custom" <?php echo ( $share_buttons_posttypes === 'custom' ) ? 'checked' : ''; ?>
  96. />
  97. <strong></strong>
  98. <?php echo esc_html__( 'Select post types', 'kiwi-social-share' ); ?>
  99. </label>
  100. <div class="epsilon-ui-checklist" <?php echo ( $share_buttons_posttypes === 'all' ) ? 'style="display:none"' : ''; ?>>
  101. <ul>
  102. <?php
  103. $post_types_list = Kiwi_Social_Share_Helper::get_setting_value( 'share_buttons_posttypes_list', array(
  104. 'post',
  105. 'page'
  106. ) );
  107. ?>
  108. <?php foreach ( $post_types as $name => $label ) { ?>
  109. <li>
  110. <span><?php echo esc_html( $label ) ?></span>
  111. <label class="epsilon-ui-checkbox">
  112. <input name="kiwi_general_settings[share_buttons_posttypes_list][]"
  113. value="<?php echo esc_attr( $name ); ?>"
  114. <?php echo ( in_array( $name, $post_types_list ) ) ? 'checked' : ''; ?>
  115. type="checkbox"/>
  116. <strong></strong>
  117. </label>
  118. </li>
  119. <?php } ?>
  120. </ul>
  121. </div>
  122. <div class="epsilon-ui-overlay <?php echo ! empty( $share_buttons ) ? '' : 'active'; ?>"></div>
  123. </div>
  124. </div>
  125. <div class="sl-kiwi-opt-group clearfix">
  126. <div class="sl-kiwi-opt-description">
  127. <h4><?php echo esc_html__( 'Buttons shape', 'kiwi-social-share' ) ?></h4>
  128. <p><?php echo esc_html__( 'Change the shape of the social buttons.', 'kiwi-social-share' ) ?></p>
  129. </div>
  130. <?php
  131. $button_shape = Kiwi_Social_Share_Helper::get_setting_value( 'button_shape', 'rect' );
  132. ?>
  133. <div class="epsilon-ui-option right">
  134. <ul>
  135. <li>
  136. <label>
  137. <input type="radio" id="kiwi_button_shape_a"
  138. name="kiwi_general_settings[button_shape]" <?php echo ( $button_shape === 'shift' ) ? 'checked' : ''; ?>
  139. value="shift"/>
  140. <span>
  141. <i class="icon kiwi-ic-shift"><strong><em></em><em></em><em></em></strong></i>
  142. <span><?php echo esc_html__( 'Shift', 'kiwi-social-share' ); ?></span>
  143. </span>
  144. </label>
  145. </li>
  146. <li>
  147. <label>
  148. <input type="radio" id="kiwi_button_shape_b"
  149. name="kiwi_general_settings[button_shape]" <?php echo ( $button_shape === 'rect' ) ? 'checked' : ''; ?>
  150. value="rect"/>
  151. <span>
  152. <i class="icon kiwi-ic-rect"><strong><em></em><em></em><em></em></strong></i>
  153. <span><?php echo esc_html__( 'Rect', 'kiwi-social-share' ); ?></span>
  154. </span>
  155. </label>
  156. </li>
  157. <li>
  158. <label>
  159. <input type="radio" id="kiwi_button_shape_c"
  160. name="kiwi_general_settings[button_shape]" <?php echo ( $button_shape === 'leaf' ) ? 'checked' : ''; ?>
  161. value="leaf"/>
  162. <span>
  163. <i class="icon kiwi-ic-leaf"><strong><em></em><em></em><em></em></strong></i>
  164. <span><?php echo esc_html__( 'Leaf', 'kiwi-social-share' ); ?></span>
  165. </span>
  166. </label>
  167. </li>
  168. <li>
  169. <label>
  170. <input type="radio" id="kiwi_button_shape_d"
  171. name="kiwi_general_settings[button_shape]" <?php echo ( $button_shape === 'pill' ) ? 'checked' : ''; ?>
  172. value="pill"/>
  173. <span>
  174. <i class="icon kiwi-ic-pill"><strong><em></em><em></em><em></em></strong></i>
  175. <span><?php echo esc_html__( 'Pill', 'kiwi-social-share' ); ?></span>
  176. </span>
  177. </label>
  178. </li>
  179. </ul>
  180. </div>
  181. </div>
  182. <div class="sl-kiwi-opt-group clearfix">
  183. <div class="sl-kiwi-opt-description">
  184. <h4><?php echo esc_html__( 'Button group style', 'kiwi-social-share' ) ?></h4>
  185. <p><?php echo esc_html__( 'Change the style of the article bar group.', 'kiwi-social-share' ) ?></p>
  186. </div>
  187. <?php
  188. $article_bar_style = Kiwi_Social_Share_Helper::get_setting_value( 'article_bar_style', 'center' );
  189. ?>
  190. <div class="epsilon-ui-option right">
  191. <ul>
  192. <li>
  193. <label>
  194. <input type="radio" id="kiwi_article_bar_style_a"
  195. name="kiwi_general_settings[article_bar_style]" <?php echo ( $article_bar_style === 'center' ) ? 'checked' : ''; ?>
  196. value="center"/>
  197. <span>
  198. <i class="icon kiwi-ic-centered"><strong><em></em><em></em><em></em></strong></i>
  199. <span><?php echo esc_html__( 'Center', 'kiwi-social-share' ); ?></span>
  200. </span>
  201. </label>
  202. </li>
  203. <li>
  204. <label>
  205. <input type="radio" id="kiwi_article_bar_style_b"
  206. name="kiwi_general_settings[article_bar_style]" <?php echo ( $article_bar_style === 'fit' ) ? 'checked' : ''; ?>
  207. value="fit"/>
  208. <span>
  209. <i class="icon kiwi-ic-filled"><strong><em></em><em></em><em></em></strong></i>
  210. <span><?php echo esc_html__( 'Fit', 'kiwi-social-share' ); ?></span>
  211. </span>
  212. </label>
  213. </li>
  214. </ul>
  215. </div>
  216. </div>
  217. <?php
  218. $share_counts = Kiwi_Social_Share_Helper::get_setting_value( 'share_counts', '' );
  219. ?>
  220. <div class="sl-kiwi-opt-group">
  221. <div class="sl-kiwi-opt-toggle">
  222. <div class="epsilon-ui-toggle">
  223. <label>
  224. <input type="checkbox" id="kiwi_share_counts"
  225. name="kiwi_general_settings[share_counts]" <?php echo ! empty( $share_counts ) ? 'checked' : ''; ?>
  226. value="on"/>
  227. <span></span>
  228. </label>
  229. </div>
  230. </div>
  231. <div class="sl-kiwi-opt-description fixed">
  232. <h4><?php echo esc_html__( 'Show share counts', 'kiwi-social-share' ) ?></h4>
  233. <p><?php echo esc_html__( 'Display the number of counts next to the social network icon.', 'kiwi-social-share' ) ?></p>
  234. </div>
  235. </div>
  236. </div>