Plugin Directory

Changeset 3338978


Ignore:
Timestamp:
08/04/2025 12:48:40 PM (8 months ago)
Author:
CloudSponge
Message:

releasing v2.6.12

Location:
better-sharing/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • better-sharing/trunk/BetterSharingWP.php

    r3315364 r3338978  
    11<?php
     2
    23/**
    34 * Better Sharing
     
    67 * Plugin Name:       Better Sharing
    78 * Description:       Add essential viral sharing functionality to any WordPress site.
    8  * Version:           2.6.11
     9 * Version:           2.6.12
    910 * Author:            CloudSponge
    1011 * Author URI:        https://www.cloudsponge.com
     
    1920namespace BetterSharingWP;
    2021
    21 if ( ! function_exists( 'bswp_fs' ) ) {
    22     // Create a helper function for easy SDK access.
    23     function bswp_fs() {
    24         global $bswp_fs;
    25 
    26         if ( ! isset( $bswp_fs ) ) {
    27             // Include Freemius SDK.
    28                         require_once dirname(__FILE__) . '/vendor/freemius/wordpress-sdk/start.php';
    29 
    30             $bswp_fs = fs_dynamic_init( array(
    31                 'id'                  => '8560',
    32                 'slug'                => 'better-sharing',
    33                 'type'                => 'plugin',
    34                 'public_key'          => 'pk_85ede31f24cba7904c1bc528b5b5e',
    35                 'is_premium'          => false,
    36                 'has_addons'          => false,
    37                 'has_paid_plans'      => false,
    38                 'menu'                => array(
    39                     'slug'           => 'edit.php?post_type=bswp_ui_template',
    40                     'contact'        => false,
    41                     'support'        => false,
    42                 ),
    43             ) );
    44         }
    45 
    46         return $bswp_fs;
    47     }
    48 
    49     // Init Freemius.
    50     bswp_fs();
    51     // Signal that SDK was initiated.
    52     do_action( 'bswp_fs_loaded' );
     22if (! function_exists('bswp_fs')) {
     23    // Create a helper function for easy SDK access.
     24    function bswp_fs()
     25    {
     26        global $bswp_fs;
     27
     28        if (! isset($bswp_fs)) {
     29            // Include Freemius SDK.
     30            require_once dirname(__FILE__) . '/vendor/freemius/wordpress-sdk/start.php';
     31
     32            $bswp_fs = fs_dynamic_init(array(
     33                'id'                  => '8560',
     34                'slug'                => 'better-sharing',
     35                'type'                => 'plugin',
     36                'public_key'          => 'pk_85ede31f24cba7904c1bc528b5b5e',
     37                'is_premium'          => false,
     38                'has_addons'          => false,
     39                'has_paid_plans'      => false,
     40                'menu'                => array(
     41                    'slug'           => 'edit.php?post_type=bswp_ui_template',
     42                    'contact'        => false,
     43                    'support'        => false,
     44                ),
     45            ));
     46        }
     47
     48        return $bswp_fs;
     49    }
     50
     51    // Init Freemius.
     52    bswp_fs();
     53    // Signal that SDK was initiated.
     54    do_action('bswp_fs_loaded');
    5355}
    5456
    55 define( 'BETTER_SHARING_PATH', plugin_dir_path( __FILE__ ) );
    56 define( 'BETTER_SHARING_URI', plugin_dir_url( __FILE__ ) );
    57 define( 'BETTER_SHARING_VERSION', '2.6.11' );
    58 
    59 define( 'BETTER_SHARING_ADMIN_TEMPLATE_PATH', BETTER_SHARING_PATH . 'includes/AdminScreens/admin-templates/' );
     57define('BETTER_SHARING_PATH', plugin_dir_path(__FILE__));
     58define('BETTER_SHARING_URI', plugin_dir_url(__FILE__));
     59define('BETTER_SHARING_VERSION', '2.6.12');
     60
     61define('BETTER_SHARING_ADMIN_TEMPLATE_PATH', BETTER_SHARING_PATH . 'includes/AdminScreens/admin-templates/');
    6062
    6163require_once 'vendor/autoload.php';
    6264
    63 load_plugin_textdomain( 'better-sharing-wp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
     65load_plugin_textdomain('better-sharing-wp', false, dirname(plugin_basename(__FILE__)) . '/languages/');
    6466
    6567// API
     
    8284 * BetterSharingWP - Main Plugin Class
    8385 */
    84 class BetterSharingWP {
     86class BetterSharingWP
     87{
    8588
    8689    /**
     
    101104     * Construct
    102105     */
    103     public function __construct() {
     106    public function __construct()
     107    {
    104108        $this->admin_screen = new Admin();
    105109        $this->errors       = array();
     
    107111        // Email API.
    108112        $api = new Email();
    109         add_action( 'rest_api_init', array( $api, 'rest_init' ) );
     113        add_action('rest_api_init', array($api, 'rest_init'));
    110114
    111115        // Core Blocks.
    112116        $core_blocks = new CoreBlocks();
    113         add_action( 'init', array( $core_blocks, 'register_block' ) );
    114         add_action( 'wp_enqueue_scripts', array( $core_blocks, 'core_block_public_scripts' ) );
    115 
    116         register_activation_hook( __FILE__, array( $this, 'activate' ) );
    117         register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
    118          
     117        add_action('init', array($core_blocks, 'register_block'));
     118        add_action('wp_enqueue_scripts', array($core_blocks, 'core_block_public_scripts'));
     119
     120        register_activation_hook(__FILE__, array($this, 'activate'));
     121        register_deactivation_hook(__FILE__, array($this, 'deactivate'));
    119122    }
    120123
     
    125128     * @return void
    126129     */
    127     public function init_add_on( BetterSharingAddOn $add_on ) {
    128         do_action( 'bswp_before_init_addon', $add_on );
     130    public function init_add_on(BetterSharingAddOn $add_on)
     131    {
     132        do_action('bswp_before_init_addon', $add_on);
    129133        $new_add_on = $add_on->init();
    130         if ( is_wp_error( $new_add_on ) ) {
     134        if (is_wp_error($new_add_on)) {
    131135            $this->errors[] = $new_add_on;
    132136        }
    133         do_action( 'bswp_after_init_addon', $add_on, $new_add_on );
     137        do_action('bswp_after_init_addon', $add_on, $new_add_on);
    134138    }
    135139
     
    139143     * @return array errors.
    140144     */
    141     public function get_errors() {
     145    public function get_errors()
     146    {
    142147        return $this->errors;
    143148    }
     
    147152     * @return void
    148153     */
    149     public function activate() {
     154    public function activate()
     155    {
    150156        $bswp_demo_page = new BSWP_DemoPage();
    151157        $bswp_demo_page->init();
     
    156162     * @return void
    157163     */
    158     public function deactivate() {
     164    public function deactivate()
     165    {
    159166        $option_data = new OptionData();
    160         $delete      = $option_data->deleteAll( true );
     167        $delete      = $option_data->deleteAll(true);
    161168    }
    162169}
     
    171178add_action(
    172179    'init',
    173     function() {
     180    function () {
    174181        global $better_sharing_wp;
    175        
     182
    176183        $ignition_deck_addon = new IgnitionDeck();
    177         $better_sharing_wp->init_add_on( $ignition_deck_addon );
     184        $better_sharing_wp->init_add_on($ignition_deck_addon);
    178185
    179186        $automate_woo_addon = new AutomateWoo();
    180         $better_sharing_wp->init_add_on( $automate_woo_addon );
     187        $better_sharing_wp->init_add_on($automate_woo_addon);
    181188
    182189        $coupon_referral_addon = new CouponReferralProgram();
    183         $better_sharing_wp->init_add_on( $coupon_referral_addon );
     190        $better_sharing_wp->init_add_on($coupon_referral_addon);
    184191
    185192        $woo_wishlist_addon = new WooWishlists();
    186         $better_sharing_wp->init_add_on( $woo_wishlist_addon );
     193        $better_sharing_wp->init_add_on($woo_wishlist_addon);
    187194
    188195        $errors = $better_sharing_wp->get_errors();
    189         if ( ( defined( 'WP_DEBUG' ) && WP_DEBUG ) && ! empty( $errors ) ) {
    190             foreach ( $errors as $error ) {
     196        if ((defined('WP_DEBUG') && WP_DEBUG) && ! empty($errors)) {
     197            foreach ($errors as $error) {
    191198                error_log(
    192199                    print_r(
     
    202209    }
    203210);
    204 
  • better-sharing/trunk/languages/better-sharing-wp-bg_BG.po

    r3315364 r3338978  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Better Sharing 2.6.11\n"
     5"Project-Id-Version: Better Sharing 2.6.12\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/better-sharing-"
    77"wp\n"
  • better-sharing/trunk/languages/better-sharing-wp-en_US.po

    r3315364 r3338978  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: Better Sharing 2.6.11\n"
     3"Project-Id-Version: Better Sharing 2.6.12\n"
    44"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/better-sharing-"
    55"wp\n"
  • better-sharing/trunk/languages/better-sharing-wp.pot

    r3315364 r3338978  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Better Sharing 2.6.11\n"
     5"Project-Id-Version: Better Sharing 2.6.12\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/better-sharing-wp\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  • better-sharing/trunk/readme.txt

    r3315364 r3338978  
    33Tags: cloudsponge, woocommerce, contact picker, sharing
    44Requires at least: 5.0.0
    5 Tested up to: 6.7
     5Tested up to: 6.8.2
    66Requires PHP: 7.0
    7 Stable tag: 2.6.11
     7Stable tag: 2.6.12
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    7575== Changelog ==
    7676
     77= 2.6.12 =
     78* Bumping supported WordPress version to 6.8.2
     79
    7780= 2.6.11 =
    7881* Bumping supported WordPress version to 6.8.
  • better-sharing/trunk/vendor/composer/installed.php

    r3315364 r3338978  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '35ea85cdca32e4e01bd06c4db44e51be034ae73f',
     6        'reference' => 'ca5f0bf7fc153987e47b38319a19ffd586b4971f',
    77        'type' => 'project',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '35ea85cdca32e4e01bd06c4db44e51be034ae73f',
     16            'reference' => 'ca5f0bf7fc153987e47b38319a19ffd586b4971f',
    1717            'type' => 'project',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.