class-simple-author-box-previewer.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <?php
  2. /**
  3. *
  4. */
  5. class Simple_Author_Box_Previewer {
  6. // These are fields that we need to listen to see if we need to change the preview.
  7. private $fields = array(
  8. 'sab_email',
  9. 'sab_hide_socials',
  10. 'sab_box_padding_top_bottom',
  11. 'sab_box_padding_left_right',
  12. 'sab_box_border_width',
  13. 'sab_avatar_style',
  14. 'sab_avatar_hover',
  15. 'sab_web',
  16. 'sab_web_position',
  17. 'sab_colored',
  18. 'sab_icons_style',
  19. 'sab_social_hover',
  20. 'sab_box_long_shadow',
  21. 'sab_box_thin_border',
  22. 'sab_box_author_color',
  23. 'sab_box_web_color',
  24. 'sab_box_border',
  25. 'sab_box_icons_back',
  26. 'sab_box_author_back',
  27. 'sab_box_author_p_color',
  28. 'sab_box_author_a_color',
  29. 'sab_box_icons_color',
  30. 'sab_box_name_font',
  31. 'sab_box_web_font',
  32. 'sab_box_desc_font',
  33. 'sab_box_name_size',
  34. 'sab_box_web_size',
  35. 'sab_box_desc_size',
  36. 'sab_box_icon_size',
  37. 'sab_desc_style'
  38. );
  39. private $options;
  40. function __construct() {
  41. // Output Author Box
  42. add_action( 'sab_admin_preview', array( $this, 'output_author_box' ) );
  43. // Enqueue previewer js
  44. add_action( 'admin_enqueue_scripts', array( $this, 'admin_style_and_scripts' ) );
  45. }
  46. public function admin_style_and_scripts( $hook ){
  47. // loaded only on plugin page
  48. if ( 'toplevel_page_simple-author-box-options' == $hook ) {
  49. wp_enqueue_script( 'sabox-webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js', array(), false, true );
  50. wp_enqueue_script( 'sabox-previewer', SIMPLE_AUTHOR_BOX_ASSETS . 'js/sab-preview.js', array( 'jquery', 'backbone', 'sabox-webfont' ), false, true );
  51. }
  52. }
  53. public function output_author_box() {
  54. $this->options = Simple_Author_Box_Helper::get_option( 'saboxplugin_options' );
  55. echo '<style type="text/css">';
  56. echo $this->generate_inline_css();
  57. echo '</style>';
  58. echo '<div class="saboxplugin-wrap" style="max-width:656px;margin:0 auto;width:100%;">'; // start saboxplugin-wrap div
  59. // author box gravatar
  60. $avatar_classes = 'saboxplugin-gravatar';
  61. if ( '1' == $this->options['sab_avatar_hover'] ) {
  62. $avatar_classes .= ' sab-rotate-img';
  63. }
  64. if ( '1' == $this->options['sab_avatar_style'] ) {
  65. $avatar_classes .= ' sab-round-image';
  66. }
  67. echo '<div class="' . $avatar_classes . '">';
  68. echo get_avatar( 1, 100, 'mystery', '', array( 'force_default' => true ) );
  69. echo '</div>';
  70. // author box name
  71. echo '<div class="saboxplugin-authorname">';
  72. echo apply_filters( 'sabox_preview_author_html', '<a href="#" class="vcard author"><span class="fn">John Doe</span></a>' );
  73. echo '</div>';
  74. // author box description
  75. echo '<div class="saboxplugin-desc">';
  76. echo '<div>';
  77. echo wp_kses_post( 'Sed non elit aliquam, tempor nisl vitae, euismod quam. Nulla et lacus lectus. Nunc sed tincidunt arcu. Nam maximus luctus nunc, in ullamcorper turpis luctus ac. Morbi a leo ut metus mollis facilisis. Integer feugiat dictum dolor id egestas. Interdum et malesuada fames ac ante ipsum primis in faucibus.' );
  78. echo '</div>';
  79. echo '</div>';
  80. echo '<div class="saboxplugin-web' . ( '1' == $this->options['sab_web'] ? ' sab-web-position' : '' ) . '" style="' . ( '1' == $this->options['sab_web'] ? '' : 'display:none;' ) . '">';
  81. echo '<a href="#">www.machothemes.com</a>';
  82. echo '</div>';
  83. // author box clearfix
  84. echo '<div class="clearfix"></div>';
  85. $social_links = Simple_Author_Box_Helper::$social_icons;
  86. $social_links['user_email'] = '#';
  87. $extra_class = ' sab-show-simple';
  88. if ( '1' == $this->options['sab_colored'] ) {
  89. if ( '1' == $this->options['sab_icons_style'] ) {
  90. $extra_class = ' sab-show-circle';
  91. }else{
  92. $extra_class = ' sab-show-square';
  93. }
  94. }
  95. if ( '1' != $this->options['sab_box_long_shadow'] ) {
  96. $extra_class .= ' without-long-shadow';
  97. }
  98. if ( '1' == $this->options['sab_social_hover'] ) {
  99. $extra_class .= ' sab-rotate-icons';
  100. }
  101. if ( '1' == $this->options['sab_box_thin_border'] ) {
  102. $extra_class .= ' sab-icons-with-border';
  103. }
  104. echo '<div class="saboxplugin-socials sabox-colored' . $extra_class . '" style="' . ( '1' == $this->options['sab_hide_socials'] ? 'display:none;' : '' ) . '">';
  105. $simple_icons_html = '';
  106. $circle_icons_html = '';
  107. $square_icons_html = '';
  108. $link = '<a href="#" class="%s">%s</a>';
  109. foreach ( $social_links as $social_platform => $social_link ) {
  110. $simple_icons_html .= sprintf( $link, 'saboxplugin-icon-grey', Simple_Author_Box_Social::icon_to_svg( $social_platform, 'simple' ) );
  111. $circle_icons_html .= sprintf( $link, 'saboxplugin-icon-color', Simple_Author_Box_Social::icon_to_svg( $social_platform, 'circle' ) );
  112. $square_icons_html .= sprintf( $link, 'saboxplugin-icon-color', Simple_Author_Box_Social::icon_to_svg( $social_platform, 'square' ) );
  113. }
  114. echo '<div class="sab-simple-icons">' . $simple_icons_html . '</div>';
  115. echo '<div class="sab-circle-icons">' . $circle_icons_html . '</div>';
  116. echo '<div class="sab-square-icons">' . $square_icons_html . '</div>';
  117. echo '</div>';
  118. echo '</div>'; // end of saboxplugin-wrap div
  119. echo '<div class="note"><strong>Note:</strong> By default our Author Box will take the current font family and color from your theme. Basically if you don\'t select a font or a color from the plugin\'s settings the font and color of the Author Box will be different on the front-end than in the previewer.</div>';
  120. }
  121. private function generate_inline_css(){
  122. $padding_top_bottom = Simple_Author_Box_Helper::get_option( 'sab_box_padding_top_bottom' );
  123. $padding_left_right = Simple_Author_Box_Helper::get_option( 'sab_box_padding_left_right' );
  124. $sabox_name_size = Simple_Author_Box_Helper::get_option( 'sab_box_name_size' );
  125. $sabox_desc_size = Simple_Author_Box_Helper::get_option( 'sab_box_desc_size' );
  126. $sabox_icon_size = Simple_Author_Box_Helper::get_option( 'sab_box_icon_size' );
  127. $sabox_options = Simple_Author_Box_Helper::get_option( 'saboxplugin_options' );
  128. $sabox_web_size = Simple_Author_Box_Helper::get_option( 'sab_box_web_size' );
  129. $style = '.saboxplugin-wrap{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #eee;width:100%;clear:both;display:block;overflow:hidden;word-wrap:break-word;position:relative}.saboxplugin-wrap .saboxplugin-gravatar{float:left;padding:20px}.saboxplugin-wrap .saboxplugin-gravatar img{max-width:100px;height:auto}.saboxplugin-wrap .saboxplugin-authorname{font-size:18px;line-height:1;margin:20px 0 0 20px;display:block}.saboxplugin-wrap .saboxplugin-authorname a{text-decoration:none}.saboxplugin-wrap .saboxplugin-authorname a:focus{outline:0}.saboxplugin-wrap .saboxplugin-desc{display:block;margin:5px 20px}.saboxplugin-wrap .saboxplugin-desc a{text-decoration:underline}.saboxplugin-wrap .saboxplugin-desc p{margin:5px 0 12px}.saboxplugin-wrap .saboxplugin-web{margin:0 20px 15px;text-align:left}.saboxplugin-wrap .sab-web-position{text-align:right}.saboxplugin-wrap .saboxplugin-web a{color:#ccc;text-decoration:none}.saboxplugin-wrap .saboxplugin-socials{position:relative;display:block;background:#fcfcfc;padding:5px;border-top:1px solid #eee}.saboxplugin-wrap .saboxplugin-socials a svg{width:20px;height:20px}.saboxplugin-wrap .saboxplugin-socials a svg .st2{fill:#fff}.saboxplugin-wrap .saboxplugin-socials a svg .st1{fill:rgba(0,0,0,.3)}.saboxplugin-wrap .saboxplugin-socials a:hover{opacity:.8;-webkit-transition:opacity .4s;-moz-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s;box-shadow:none!important;-webkit-box-shadow:none!important}.saboxplugin-wrap .saboxplugin-socials .saboxplugin-icon-color{box-shadow:none;padding:0;border:0;-webkit-transition:opacity .4s;-moz-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s;display:inline-block;color:#fff;font-size:0;text-decoration:inherit;margin:5px;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;overflow:hidden}.saboxplugin-wrap .saboxplugin-socials .saboxplugin-icon-grey{text-decoration:inherit;box-shadow:none;position:relative;display:-moz-inline-stack;display:inline-block;vertical-align:middle;zoom:1;margin:10px 5px;color:#444}.clearfix:after,.clearfix:before{content:\' \';display:table;line-height:0;clear:both}.ie7 .clearfix{zoom:1}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-twitch{border-color:#38245c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-addthis{border-color:#e91c00}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-behance{border-color:#003eb0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-delicious{border-color:#06c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-deviantart{border-color:#036824}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-digg{border-color:#00327c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-dribbble{border-color:#ba1655}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-facebook{border-color:#1e2e4f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-flickr{border-color:#003576}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-github{border-color:#264874}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-google{border-color:#0b51c5}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-googleplus{border-color:#96271a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-html5{border-color:#902e13}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-instagram{border-color:#1630aa}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-linkedin{border-color:#00344f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-pinterest{border-color:#5b040e}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-reddit{border-color:#992900}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-rss{border-color:#a43b0a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-sharethis{border-color:#5d8420}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-skype{border-color:#00658a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-soundcloud{border-color:#995200}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-spotify{border-color:#0f612c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-stackoverflow{border-color:#a95009}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-steam{border-color:#006388}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-user_email{border-color:#b84e05}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-stumbleUpon{border-color:#9b280e}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-tumblr{border-color:#10151b}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-twitter{border-color:#0967a0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-vimeo{border-color:#0d7091}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-windows{border-color:#003f71}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-wordpress{border-color:#0f3647}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-yahoo{border-color:#14002d}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-youtube{border-color:#900}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-xing{border-color:#000202}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-mixcloud{border-color:#2475a0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-vk{border-color:#243549}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-medium{border-color:#00452c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-quora{border-color:#420e00}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-meetup{border-color:#9b181c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-goodreads{border-color:#000}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-snapchat{border-color:#999700}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-500px{border-color:#00557f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-mastodont{border-color:#185886}.sabox-plus-item{margin-bottom:20px}@media screen and (max-width:480px){.saboxplugin-wrap{text-align:center}.saboxplugin-wrap .saboxplugin-gravatar{float:none;padding:20px 0;text-align:center;margin:0 auto;display:block}.saboxplugin-wrap .saboxplugin-gravatar img{float:none;display:inline-block;display:-moz-inline-stack;vertical-align:middle;zoom:1}.saboxplugin-wrap .saboxplugin-desc{margin:0 10px 20px;text-align:center}.saboxplugin-wrap .saboxplugin-authorname{text-align:center;margin:10px 0 20px}}body .saboxplugin-authorname a,body .saboxplugin-authorname a:hover{box-shadow:none;-webkit-box-shadow:none}a.sab-profile-edit{font-size:16px!important;line-height:1!important}.sab-edit-settings a,a.sab-profile-edit{color:#0073aa!important;box-shadow:none!important;-webkit-box-shadow:none!important}.sab-edit-settings{margin-right:15px;position:absolute;right:0;z-index:2;bottom:10px;line-height:20px}.sab-edit-settings i{margin-left:5px}.saboxplugin-socials{line-height:1!important}.rtl .saboxplugin-wrap .saboxplugin-gravatar{float:right}.rtl .saboxplugin-wrap .saboxplugin-authorname{display:flex;align-items:center}.rtl .saboxplugin-wrap .saboxplugin-authorname .sab-profile-edit{margin-right:10px}.rtl .sab-edit-settings{right:auto;left:0}';
  130. // Border color of Simple Author Box
  131. if ( '' != $sabox_options['sab_box_border'] ) {
  132. $style .= '.saboxplugin-wrap {border-color:' . esc_html( $sabox_options['sab_box_border'] ) . ';}';
  133. $style .= '.saboxplugin-wrap .saboxplugin-socials {border-color:' . esc_html( $sabox_options['sab_box_border'] ) . ';}';
  134. }
  135. // Border width of Simple Author Box
  136. if ( '1' != $sabox_options['sab_box_border_width'] ) {
  137. $style .= '.saboxplugin-wrap, .saboxplugin-wrap .saboxplugin-socials{ border-width: ' . esc_html( $sabox_options['sab_box_border_width'] ) . 'px; }';
  138. }
  139. // Avatar image style
  140. $style .= '.saboxplugin-wrap .saboxplugin-gravatar.sab-round-image img {-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%;}';
  141. // Avatar hover effect
  142. $style .= '.saboxplugin-wrap .saboxplugin-gravatar.sab-round-image.sab-rotate-img img {-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;transition:all .5s ease;}';
  143. $style .= '.saboxplugin-wrap .saboxplugin-gravatar.sab-round-image.sab-rotate-img img:hover {-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);}';
  144. // Background color of social icons bar
  145. if ( '' != $sabox_options['sab_box_icons_back'] ) {
  146. $style .= '.saboxplugin-wrap .saboxplugin-socials{background-color:' . esc_html( $sabox_options['sab_box_icons_back'] ) . ';}';
  147. }
  148. // Background color of author box
  149. if ( '' != $sabox_options['sab_box_author_back'] ) {
  150. $style .= '.saboxplugin-wrap {background-color:' . esc_html( $sabox_options['sab_box_author_back'] ) . ';}';
  151. }
  152. // Color of author box paragraphs
  153. if ( '' != $sabox_options['sab_box_author_p_color'] ) {
  154. $style .= '.saboxplugin-wrap .saboxplugin-desc p, .saboxplugin-wrap .saboxplugin-desc {color:' . esc_html( $sabox_options['sab_box_author_p_color'] ) . ';}';
  155. }
  156. // Color of author box paragraphs
  157. if ( '' != $sabox_options['sab_box_author_a_color'] ) {
  158. $style .= '.saboxplugin-wrap .saboxplugin-desc a, .saboxplugin-wrap .saboxplugin-desc {color:' . esc_html( $sabox_options['sab_box_author_a_color'] ) . ';}';
  159. }
  160. // Author name color
  161. if ( '' != $sabox_options['sab_box_author_color'] ) {
  162. $style .= '.saboxplugin-wrap .saboxplugin-authorname a {color:' . esc_html( $sabox_options['sab_box_author_color'] ) . ';}';
  163. }
  164. // Author web color
  165. if ( '1' == $sabox_options['sab_web'] && '' != $sabox_options['sab_box_web_color'] ) {
  166. $style .= '.saboxplugin-wrap .saboxplugin-web a {color:' . esc_html( $sabox_options['sab_box_web_color'] ) . ';}';
  167. }
  168. // Author name font family
  169. $sab_box_name_font = Simple_Author_Box_Helper::get_option( 'sab_box_name_font' );
  170. if ( 'None' != $sab_box_name_font ) {
  171. $style .= '.saboxplugin-wrap .saboxplugin-authorname {font-family:"' . esc_html( $sab_box_name_font ) . '";}';
  172. }
  173. // Author description font family
  174. $sab_box_desc_font = Simple_Author_Box_Helper::get_option( 'sab_box_desc_font' );
  175. if ( 'None' != $sab_box_name_font ) {
  176. $style .= '.saboxplugin-wrap .saboxplugin-desc {font-family:' . esc_html( $sab_box_desc_font ) . ';}';
  177. }
  178. // Author web font family
  179. $sab_box_web_font = Simple_Author_Box_Helper::get_option( 'sab_box_web_font' );
  180. if ( '1' == $sabox_options['sab_web'] && 'None' != $sab_box_web_font ) {
  181. $style .= '.saboxplugin-wrap .saboxplugin-web {font-family:"' . esc_html( $sab_box_web_font ) . '";}';
  182. }
  183. // Author description font style
  184. if ( '1' == $sabox_options['sab_desc_style'] ) {
  185. $style .= '.saboxplugin-wrap .saboxplugin-desc {font-style:italic;}';
  186. }
  187. // Margin top & bottom, Padding
  188. $style .= '.saboxplugin-wrap {padding: ' . absint( $padding_top_bottom ) . 'px ' . absint( $padding_left_right ) . 'px }';
  189. // Author name text size
  190. $style .= '.saboxplugin-wrap .saboxplugin-authorname {font-size:' . absint( $sabox_name_size ) . 'px; line-height:' . absint( $sabox_name_size + 7 ) . 'px;}';
  191. // Author description font size
  192. $style .= '.saboxplugin-wrap .saboxplugin-desc p, .saboxplugin-wrap .saboxplugin-desc {font-size:' . absint( $sabox_desc_size ) . 'px; line-height:' . absint( $sabox_desc_size + 7 ) . 'px;}';
  193. // Author website text size
  194. $style .= '.saboxplugin-wrap .saboxplugin-web {font-size:' . absint( $sabox_web_size ) . 'px;}';
  195. /* Icons */
  196. // Color of social icons (for symbols only):
  197. if ( '' != $sabox_options['sab_box_icons_color'] ) {
  198. $style .= '.saboxplugin-wrap .saboxplugin-socials .saboxplugin-icon-grey {color:' . esc_html( $sabox_options['sab_box_icons_color'] ) . ';}';
  199. }
  200. // Rotate
  201. $style .= '.saboxplugin-wrap .saboxplugin-socials.sab-show-circle.sab-rotate-icons .saboxplugin-icon-color {-webkit-transition: all 0.3s ease-in-out;-moz-transition: all 0.3s ease-in-out;-o-transition: all 0.3s ease-in-out;-ms-transition: all 0.3s ease-in-out;transition: all 0.3s ease-in-out;}.saboxplugin-wrap .saboxplugin-socials.sab-show-circle.sab-rotate-icons .saboxplugin-icon-color:hover {-webkit-transform: rotate(360deg);-moz-transform: rotate(360deg);-o-transform: rotate(360deg);-ms-transform: rotate(360deg);transform: rotate(360deg);}';
  202. // Thin border
  203. $style .= '.saboxplugin-wrap .saboxplugin-socials.sab-icons-with-border .saboxplugin-icon-color svg {border-width: 1px;border-style:solid;}';
  204. $style .= '.saboxplugin-wrap .saboxplugin-socials.sab-show-circle.sab-icons-with-border .saboxplugin-icon-color svg {border-radius:50%}';
  205. // Long Shadow
  206. $style .= '.saboxplugin-wrap .saboxplugin-socials.without-long-shadow .saboxplugin-icon-color .st1 {display: none;}';
  207. // Icons size
  208. $icon_size = absint( $sabox_icon_size );
  209. $icon_size_2x = absint( $sabox_icon_size )* 2;
  210. $style .= '.saboxplugin-wrap .saboxplugin-socials a.saboxplugin-icon-grey svg {width:' . absint( $icon_size ) . 'px;height:' . absint( $icon_size ) . 'px;}';
  211. $style .= '.saboxplugin-wrap .saboxplugin-socials a.saboxplugin-icon-color svg {width:' . absint( $icon_size_2x ) . 'px;height:' . absint( $icon_size_2x ) . 'px;}';
  212. $style .= '.sab-simple-icons,.sab-circle-icons,.sab-square-icons{display:none;}.sab-show-simple .sab-simple-icons{ display:block; }.sab-show-circle .sab-circle-icons{ display:block; }.sab-show-square .sab-square-icons{ display:block; }';
  213. $style .= '.saboxplugin-wrap a{cursor:not-allowed;}';
  214. $style = apply_filters( 'sabox-previewer-css', $style, $sabox_options );
  215. return $style;
  216. }
  217. }