Changeset 3338978
- Timestamp:
- 08/04/2025 12:48:40 PM (8 months ago)
- Location:
- better-sharing/trunk
- Files:
-
- 6 edited
-
BetterSharingWP.php (modified) (12 diffs)
-
languages/better-sharing-wp-bg_BG.po (modified) (1 diff)
-
languages/better-sharing-wp-en_US.po (modified) (1 diff)
-
languages/better-sharing-wp.pot (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
better-sharing/trunk/BetterSharingWP.php
r3315364 r3338978 1 1 <?php 2 2 3 /** 3 4 * Better Sharing … … 6 7 * Plugin Name: Better Sharing 7 8 * Description: Add essential viral sharing functionality to any WordPress site. 8 * Version: 2.6.1 19 * Version: 2.6.12 9 10 * Author: CloudSponge 10 11 * Author URI: https://www.cloudsponge.com … … 19 20 namespace BetterSharingWP; 20 21 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' ); 22 if (! 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'); 53 55 } 54 56 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/');57 define('BETTER_SHARING_PATH', plugin_dir_path(__FILE__)); 58 define('BETTER_SHARING_URI', plugin_dir_url(__FILE__)); 59 define('BETTER_SHARING_VERSION', '2.6.12'); 60 61 define('BETTER_SHARING_ADMIN_TEMPLATE_PATH', BETTER_SHARING_PATH . 'includes/AdminScreens/admin-templates/'); 60 62 61 63 require_once 'vendor/autoload.php'; 62 64 63 load_plugin_textdomain( 'better-sharing-wp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');65 load_plugin_textdomain('better-sharing-wp', false, dirname(plugin_basename(__FILE__)) . '/languages/'); 64 66 65 67 // API … … 82 84 * BetterSharingWP - Main Plugin Class 83 85 */ 84 class BetterSharingWP { 86 class BetterSharingWP 87 { 85 88 86 89 /** … … 101 104 * Construct 102 105 */ 103 public function __construct() { 106 public function __construct() 107 { 104 108 $this->admin_screen = new Admin(); 105 109 $this->errors = array(); … … 107 111 // Email API. 108 112 $api = new Email(); 109 add_action( 'rest_api_init', array( $api, 'rest_init' ));113 add_action('rest_api_init', array($api, 'rest_init')); 110 114 111 115 // Core Blocks. 112 116 $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')); 119 122 } 120 123 … … 125 128 * @return void 126 129 */ 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); 129 133 $new_add_on = $add_on->init(); 130 if ( is_wp_error( $new_add_on )) {134 if (is_wp_error($new_add_on)) { 131 135 $this->errors[] = $new_add_on; 132 136 } 133 do_action( 'bswp_after_init_addon', $add_on, $new_add_on);137 do_action('bswp_after_init_addon', $add_on, $new_add_on); 134 138 } 135 139 … … 139 143 * @return array errors. 140 144 */ 141 public function get_errors() { 145 public function get_errors() 146 { 142 147 return $this->errors; 143 148 } … … 147 152 * @return void 148 153 */ 149 public function activate() { 154 public function activate() 155 { 150 156 $bswp_demo_page = new BSWP_DemoPage(); 151 157 $bswp_demo_page->init(); … … 156 162 * @return void 157 163 */ 158 public function deactivate() { 164 public function deactivate() 165 { 159 166 $option_data = new OptionData(); 160 $delete = $option_data->deleteAll( true);167 $delete = $option_data->deleteAll(true); 161 168 } 162 169 } … … 171 178 add_action( 172 179 'init', 173 function () {180 function () { 174 181 global $better_sharing_wp; 175 182 176 183 $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); 178 185 179 186 $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); 181 188 182 189 $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); 184 191 185 192 $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); 187 194 188 195 $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) { 191 198 error_log( 192 199 print_r( … … 202 209 } 203 210 ); 204 -
better-sharing/trunk/languages/better-sharing-wp-bg_BG.po
r3315364 r3338978 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Better Sharing 2.6.1 1\n"5 "Project-Id-Version: Better Sharing 2.6.12\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/better-sharing-" 7 7 "wp\n" -
better-sharing/trunk/languages/better-sharing-wp-en_US.po
r3315364 r3338978 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: Better Sharing 2.6.1 1\n"3 "Project-Id-Version: Better Sharing 2.6.12\n" 4 4 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/better-sharing-" 5 5 "wp\n" -
better-sharing/trunk/languages/better-sharing-wp.pot
r3315364 r3338978 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Better Sharing 2.6.1 1\n"5 "Project-Id-Version: Better Sharing 2.6.12\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/better-sharing-wp\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -
better-sharing/trunk/readme.txt
r3315364 r3338978 3 3 Tags: cloudsponge, woocommerce, contact picker, sharing 4 4 Requires at least: 5.0.0 5 Tested up to: 6. 75 Tested up to: 6.8.2 6 6 Requires PHP: 7.0 7 Stable tag: 2.6.1 17 Stable tag: 2.6.12 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 75 75 == Changelog == 76 76 77 = 2.6.12 = 78 * Bumping supported WordPress version to 6.8.2 79 77 80 = 2.6.11 = 78 81 * Bumping supported WordPress version to 6.8. -
better-sharing/trunk/vendor/composer/installed.php
r3315364 r3338978 4 4 'pretty_version' => 'dev-main', 5 5 'version' => 'dev-main', 6 'reference' => ' 35ea85cdca32e4e01bd06c4db44e51be034ae73f',6 'reference' => 'ca5f0bf7fc153987e47b38319a19ffd586b4971f', 7 7 'type' => 'project', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-main', 15 15 'version' => 'dev-main', 16 'reference' => ' 35ea85cdca32e4e01bd06c4db44e51be034ae73f',16 'reference' => 'ca5f0bf7fc153987e47b38319a19ffd586b4971f', 17 17 'type' => 'project', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.