';
210 | }
211 |
212 | /**
213 | * Enqueue CSS.
214 | * @since 1.0.0
215 | * @return void
216 | */
217 | public function sps_styles() {
218 | global $storefront_version;
219 |
220 | if ( version_compare( $storefront_version, '2.5.6', '<=') ) {
221 | wp_enqueue_style( 'font-awesome-5-brands', '//use.fontawesome.com/releases/v5.0.13/css/brands.css' );
222 | }
223 |
224 | wp_enqueue_style( 'sps-styles', plugins_url( '/assets/css/style.css', __FILE__ ) );
225 | }
226 |
227 | /**
228 | * Product sharing links
229 | */
230 | public function sps_product_sharing() {
231 | $product_title = get_the_title();
232 | $product_url = get_permalink();
233 | $product_img = wp_get_attachment_url( get_post_thumbnail_id() );
234 |
235 | $facebook_url = 'https://www.facebook.com/sharer/sharer.php?u=' . $product_url;
236 | $twitter_url = 'https://twitter.com/intent/tweet?text=' . rawurlencode( $product_title ) . '&url=' . $product_url;
237 | $pinterest_url = 'https://pinterest.com/pin/create/bookmarklet/?media=' . $product_img . '&url=' . $product_url . '&is_video=false&description=' . rawurlencode( $product_title );
238 | $email_url = 'mailto:?subject=' . rawurlencode( $product_title ) . '&body=' . $product_url;
239 | ?>
240 |