Server IP : 192.64.118.117 / Your IP : 18.117.232.234 Web Server : LiteSpeed System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : thecgapy ( 1160) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/thecgapy/www/wp-content/plugins/wp-smushit/lib/ |
Upload File : |
<?php /** * @package WP Smush * * @version 2.4 * * @author Umesh Kumar <umesh@incsub.com> * * @copyright (c) 2016, Incsub (http://incsub.com) */ if ( ! class_exists( 'WpSmushShare' ) ) { class WpSmushShare { function __construct() {} function share_widget() { global $wpsmushit_admin, $wpsmush_stats; $savings = $wpsmushit_admin->global_stats_from_ids(); $image_count = $wpsmush_stats->smushed_count(); //If there is any saving, greater than 1Mb, show stats if ( empty( $savings ) || empty( $savings['bytes'] ) || $savings['bytes'] <= 1048576 || $image_count <= 1 || ! is_super_admin() ) { return false; } $message = sprintf( esc_html__( "%s, you've smushed %d images and saved %s in total. Help your friends save bandwidth easily, and help me in my quest to Smush the internet!", "wp-smushit" ), $wpsmushit_admin->get_user_name(), $image_count, $savings['human'] ); $share_msg = sprintf( esc_html__( 'I saved %s on my site with WP Smush ( %s ) - wanna make your website smaller and faster?', "wp-smushit" ) , $savings['human'], urlencode( "https://wordpress.org/plugins/wp-smushit/" ) ); $url = urlencode( "http://wordpress.org/plugins/wp-smushit/" ); ?> <section class="dev-box" id="wp-smush-share-widget"> <div class="box-content roboto-medium"> <p class="wp-smush-share-message"><?php echo $message; ?></p> <div class="wp-smush-share-buttons-wrapper"> <!-- Twitter Button --> <a href="https://twitter.com/intent/tweet?text=<?php echo esc_attr( $share_msg ); ?>" class="button wp-smush-share-button" id="wp-smush-twitter-share"> <i class="dev-icon dev-icon-twitter"></i><?php esc_html_e( "TWEET", "wp-smushit" ); ?></a> <!-- Facebook Button --> <a href="http://www.facebook.com/sharer.php?s=100&p[title]=WP Smush&p[url]=http://wordpress.org/plugins/wp-smushit/" class="button wp-smush-share-button" id="wp-smush-facebook-share"> <i class="dev-icon dev-icon-facebook"></i><?php esc_html_e( "SHARE", "wp-smushit" ); ?></a> <a href="whatsapp://send?text='<?php echo esc_attr( $share_msg ); ?>'" class="button wp-smush-share-button" id="wp-smush-whatsapp-share"> <?php esc_html_e( "WhatsApp", "wp-smushit" ); ?></a> </div> </div> </section><?php } } global $wpsmush_share; $wpsmush_share = new WpSmushShare(); }