HEX
Server: Apache/2.4.57 (Debian)
System: Linux web-server-k8s-e92jnr3j-6f99bff6b6-rp2wg 6.1.0-22-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.94-1 (2024-06-21) x86_64
User: apache (48)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/sites/1250.info/wp-content/themes/savoy/woocommerce/single-product/share.php
<?php
/**
 * Single Product Share
 *
 * Sharing plugins can hook into here or you can add your own code directly.
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/single-product/share.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you
 * (the theme developer) will need to copy the new files to your theme to
 * maintain compatibility. We try to do this as little as possible, but it does
 * happen. When this occurs the version of the template file will be bumped and
 * the readme will list any important changes.
 *
 * @see     https://docs.woocommerce.com/document/template-structure/
 * @package WooCommerce/Templates
 * @version 3.5.0
 NM: Modified */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

global $nm_theme_options, $nm_globals, $post;

if ( $nm_theme_options['product_share_buttons'] ) {
    $wrapper_class = ' has-share-buttons';
    
    $permalink_escaped = esc_url( get_permalink() );
    $product_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), false, '' );

    $share_links_escaped = apply_filters( 'nm_product_share_links', array(
        '<a href="//www.facebook.com/sharer.php?u=' . $permalink_escaped . '" target="_blank" title="' . esc_attr__( 'Share on Facebook', 'nm-framework' ) . '"><i class="nm-font nm-font-facebook"></i></a>',
        '<a href="//twitter.com/share?url=' . $permalink_escaped . '" target="_blank" title="' . esc_attr__( 'Share on Twitter', 'nm-framework' ) . '"><i class="nm-font nm-font-twitter"></i></a>',
        '<a href="//pinterest.com/pin/create/button/?url=' . $permalink_escaped . '&amp;media=' . esc_url( $product_image[0] ) . '&amp;description=' . urlencode( get_the_title() ) . '" target="_blank" title="' . esc_attr__( 'Pin on Pinterest', 'nm-framework' ) . '"><i class="nm-font nm-font-pinterest"></i></a>'
    ) );
} else {
    $wrapper_class = '';
}
?>

<div class="nm-product-share-wrap<?php echo esc_attr( $wrapper_class ); ?>">
	<?php if ( $nm_globals['wishlist_enabled'] ) : ?>
    <div class="nm-product-wishlist-button-wrap">
		<?php nm_wishlist_button(); ?>
    </div>
    <?php endif; ?>
    
    <?php if ( $nm_theme_options['product_share_buttons'] ) : ?>
    <div class="nm-product-share">
        <?php
            foreach ( $share_links_escaped as $link_escaped ) {
                echo $link_escaped;
            }
        ?>
    </div>
    <?php endif; ?>
</div>

<?php do_action( 'woocommerce_share' ); // Sharing plugins can hook into here

/* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */