PluginProbe
Texty – SMS Notification for WordPress, WooCommerce, Dokan and more / 1.1
Texty – SMS Notification for WordPress, WooCommerce, Dokan and more v1.1
2.0.2 trunk 0.2 1.0 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 2.0.0 2.0.1
← All changes | texty.php +5 -99 trunk1.1 View file →
@@ -3,22 +3,18 @@
3 3 * Plugin Name: Texty
4 4 * Description: SMS Notification for WordPress
5 5 * Plugin URI: https://wordpress.org/plugins/texty/
6 6 * Author: weDevs
7 - * Author URI: https://wptexty.com/
8 - * Version: 2.0.2
7 + * Author URI: https://wedevs.com
8 + * Version: 1.1
9 9 * License: GPL2 or later
10 10 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
11 11 * Text Domain: texty
12 - * Requires at least: 6.8
13 - * Requires PHP: 7.4
14 12 */
15 13 defined( 'ABSPATH' ) || exit;
16 14
17 15 require __DIR__ . '/vendor/autoload.php';
18 16
19 -use Texty\Dependencies\WeDevs\WPKit\DataLayer\DataLayerFactory;
20 -
21 17 /**
22 18 * Texty Class
23 19 */
24 20 final class Texty {
@@ -27,9 +23,9 @@
27 23 * Plugin version
28 24 *
29 25 * @var string
30 26 */
31 - private $version = '2.0.2';
27 + private $version = '1.1';
32 28
33 29 /**
34 30 * Instances array
35 31 *
@@ -72,66 +68,17 @@
72 68 *
73 69 * @return void
74 70 */
75 71 public function init_plugin() {
76 - // Initialize DataLayerFactory for SmsStat model
77 - $this->init_datalayer();
78 -
79 - // Instantiate the notices + migrations bootstraps so their
80 - // rest_api_init hooks are wired before WP fires them. Notices first,
81 - // because Migrations registers its NoticeProvider into Notices.
82 - $this->notices();
83 - $this->migrations();
84 -
85 72 if ( is_admin() ) {
86 73 new Texty\Admin();
87 74 }
88 75
89 - new Texty\Assets();
90 76 new Texty\Api();
91 77 new Texty\Dispatcher();
92 - new Texty\Compliance();
93 -
94 - /**
95 - * Fires after the Texty plugin is fully initialized.
96 - *
97 - * @param Texty $texty The main plugin instance
98 - */
99 - do_action( 'texty_loaded', $this );
100 78 }
101 79
102 80 /**
103 - * Initialize DataLayerFactory for SmsStat model
104 - *
105 - * @return void
106 - */
107 - private function init_datalayer() {
108 -
109 - try {
110 - // Initialize the factory with plugin prefix
111 - DataLayerFactory::init( 'texty' );
112 -
113 - // Register the SmsStat model and store
114 - DataLayerFactory::register_store(
115 - Texty\Models\SmsStat::class,
116 - Texty\Models\SmsStatStore::class
117 - );
118 -
119 - /**
120 - * Fires after the DataLayerFactory is initialized and Texty's own
121 - * stores are registered. Add-ons should register their DataLayer
122 - * models/stores here (via DataLayerFactory::register_store) so the
123 - * factory is guaranteed ready and prefixed. Runs before texty_loaded.
124 - *
125 - * @param Texty $texty The main plugin instance.
126 - */
127 - do_action( 'texty_datalayer_init', $this );
128 - } catch ( \Exception $e ) {
129 - error_log( 'Texty DataLayer Init Error: ' . $e->getMessage() );
130 - }
131 - }
132 -
133 - /**
134 81 * Define constants
135 82 *
136 83 * @return void
137 84 */
@@ -191,55 +138,14 @@
191 138 return $this->instances['notification'];
192 139 }
193 140
194 141 /**
195 - * Access to the migrations bootstrap.
196 - *
197 - * @return Texty\Migrations
198 - */
199 - public function migrations() {
200 - if ( ! isset( $this->instances['migrations'] ) ) {
201 - $this->instances['migrations'] = new \Texty\Migrations();
202 - }
203 -
204 - return $this->instances['migrations'];
205 - }
206 -
207 - /**
208 - * Access to the admin-notice bootstrap.
209 - *
210 - * @return Texty\Notices
211 - */
212 - public function notices() {
213 - if ( ! isset( $this->instances['notices'] ) ) {
214 - $this->instances['notices'] = new \Texty\Notices();
215 - }
216 -
217 - return $this->instances['notices'];
218 - }
219 -
220 - /**
221 - * Access to global notification settings.
222 - *
223 - * @since 2.0.0
224 - *
225 - * @return Texty\NotificationSettings
226 - */
227 - public function notification_settings() {
228 - if ( ! isset( $this->instances['notification_settings'] ) ) {
229 - $this->instances['notification_settings'] = new \Texty\NotificationSettings();
230 - }
231 -
232 - return $this->instances['notification_settings'];
233 - }
234 -
235 - /**
236 142 * Initialize the plugin tracker
237 143 *
238 144 * @return void
239 145 */
240 146 public function appsero_init() {
241 - $client = new Texty\Dependencies\Appsero\Client( 'd4c17b0f-8f01-4b95-a8de-42b0641eec9a', 'Texty', __FILE__ );
147 + $client = new Appsero\Client( 'd4c17b0f-8f01-4b95-a8de-42b0641eec9a', 'Texty', __FILE__ );
242 148
243 149 // Active insights
244 150 $client->insights()->init();
245 151 }
@@ -249,9 +155,9 @@
249 155 * Return the instance
250 156 *
251 157 * @return \Texty
252 158 */
253 -function texty() { // phpcs:ignore
159 +function texty() {
254 160 return Texty::instance();
255 161 }
256 162
257 163 // take off