Skip to content

Commit 7539834

Browse files
Update all the @SInCE, deprecate unused methods, remove tribe coding
1 parent b7725d9 commit 7539834

File tree

16 files changed

+177
-114
lines changed

16 files changed

+177
-114
lines changed

pngx-autoload.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
2-
$common = dirname( __FILE__ ) . '/src';
3-
require_once $common . '/Pngx/Autoloader.php';
2+
$plugin_engine = dirname( __FILE__ ) . '/src';
3+
require_once $plugin_engine . '/Pngx/Autoloader.php';
44
$autoloader = Pngx__Autoloader::instance();
5-
$autoloader->register_prefix( 'Pngx__', $common . '/Pngx' );
5+
$autoloader->register_prefix( 'Pngx__', $plugin_engine . '/Pngx' );
66
$autoloader->register_autoloader();

src/Pngx/Abstract_Plugin_Register.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Register all plugins to Dependency Class
77
*
88
* @package Pngx
9-
* @since 2.6
9+
* @since 3.0
1010
*
1111
*/
1212
abstract class Pngx__Abstract_Plugin_Register {

src/Pngx/Admin/Notice/Plugin_Download.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Based off Modern Tribe's Tribe__Admin__Notice__Plugin_Download
77
*
8-
* @since 2.6
8+
* @since 3.0
99
*/
1010
class Pngx__Admin__Notice__Plugin_Download {
1111

src/Pngx/Admin/Notices.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
defined( 'WPINC' ) or die;
44

55
/**
6-
* @since 2.6
6+
* @since 3.0
77
*/
88
class Pngx__Admin__Notices {
99

1010
/**
1111
* The name of the transient that will store transient notices.
1212
*
13-
* @since 2.6
13+
* @since 3.0
1414
*
1515
* @var string
1616
*/
@@ -19,7 +19,7 @@ class Pngx__Admin__Notices {
1919
/**
2020
* Whether, in this request, transient notices have been pruned already or not.
2121
*
22-
* @since 2.6
22+
* @since 3.0
2323
*
2424
* @var bool
2525
*/
@@ -28,7 +28,7 @@ class Pngx__Admin__Notices {
2828
/**
2929
* Static singleton variable
3030
*
31-
* @since 2.6
31+
* @since 3.0
3232
*
3333
* @var self
3434
*/
@@ -37,7 +37,7 @@ class Pngx__Admin__Notices {
3737
/**
3838
* Static Singleton Factory Method
3939
*
40-
* @since 2.6
40+
* @since 3.0
4141
*
4242
* @return self
4343
*/
@@ -52,7 +52,7 @@ public static function instance() {
5252
/**
5353
* User Meta Key that stores which notices have been dimissed
5454
*
55-
* @since 2.6
55+
* @since 3.0
5656
*
5757
* @var string
5858
*/
@@ -61,7 +61,7 @@ public static function instance() {
6161
/**
6262
* Stores all the Notices and it's configurations
6363
*
64-
* @since 2.6
64+
* @since 3.0
6565
*
6666
* @var array
6767
*/
@@ -70,7 +70,7 @@ public static function instance() {
7070
/**
7171
* Register the Methods in the correct places
7272
*
73-
* @since 2.6
73+
* @since 3.0
7474
*
7575
*/
7676
private function __construct() {
@@ -103,7 +103,7 @@ private function __construct() {
103103
/**
104104
* This will happen on the `current_screen` and will hook to the correct actions and display the notices
105105
*
106-
* @since 2.6
106+
* @since 3.0
107107
*
108108
* @return void
109109
*/
@@ -142,7 +142,7 @@ public function hook() {
142142
* registered (via a call to exists()) for the reason that, during a dismiss
143143
* ajax request, some valid notices may not have been registered yet.
144144
*
145-
* @since 2.6
145+
* @since 3.0
146146
*
147147
* @return void
148148
*/
@@ -160,7 +160,7 @@ public function maybe_dismiss() {
160160
/**
161161
* Allows a Magic to remove the Requirement of creating a callback
162162
*
163-
* @since 2.6
163+
* @since 3.0
164164
*
165165
* @param string $name Name of the Method used to create the Slug of the Notice
166166
* @param array $arguments Which arguments were used, normally empty
@@ -201,7 +201,7 @@ public function __call( $name, $arguments ) {
201201
/**
202202
* This is a helper to actually print the Message
203203
*
204-
* @since 2.6
204+
* @since 3.0
205205
*
206206
* @param string $slug The Name of the Notice
207207
* @param string $content The content of the notice
@@ -256,7 +256,7 @@ public function render( $slug, $content = null, $return = true, $wrap = false )
256256
/**
257257
* This is a helper to print the message surrounded by `p` tags.
258258
*
259-
* @since 2.6
259+
* @since 3.0
260260
*
261261
* @param string $slug The Name of the Notice
262262
* @param string $content The content of the notice
@@ -310,7 +310,7 @@ public function is_rendered_html( $slug, $html ) {
310310
/**
311311
* Checks if a given user has dimissed a given notice.
312312
*
313-
* @since 2.6
313+
* @since 3.0
314314
*
315315
* @param string $slug The Name of the Notice
316316
* @param int|null $user_id The user ID
@@ -339,7 +339,7 @@ public function has_user_dimissed( $slug, $user_id = null ) {
339339
/**
340340
* A Method to actually add the Meta value telling that this notice has been dismissed
341341
*
342-
* @since 2.6
342+
* @since 3.0
343343
*
344344
* @param string $slug The Name of the Notice
345345
* @param int|null $user_id The user ID
@@ -383,7 +383,7 @@ public function undismiss( $slug, $user_id = null ) {
383383
/**
384384
* Undismisses the specified notice for all users.
385385
*
386-
* @since 2.6
386+
* @since 3.0
387387
*
388388
* @param string $slug
389389
*
@@ -409,7 +409,7 @@ public function undismiss_for_all( $slug ) {
409409
/**
410410
* Register a Notice and attach a callback to the required action to display it correctly
411411
*
412-
* @since 2.6
412+
* @since 3.0
413413
*
414414
* @param string $slug Slug to save the notice
415415
* @param callable|string $callback A callable Method/Fuction to actually display the notice
@@ -497,7 +497,7 @@ public function remove_transient( $slug ) {
497497
/**
498498
* Removes a notice based on its slug.
499499
*
500-
* @since 2.6
500+
* @since 3.0
501501
*
502502
* @param string $slug
503503
*
@@ -515,7 +515,7 @@ public function remove( $slug ) {
515515
/**
516516
* Gets the configuration for the Notices
517517
*
518-
* @since 2.6
518+
* @since 3.0
519519
*
520520
* @param string $slug
521521
*
@@ -539,7 +539,7 @@ public function get( $slug = null ) {
539539
/**
540540
* Checks if a given notice exists
541541
*
542-
* @since 2.6
542+
* @since 3.0
543543
*
544544
* @param string $slug
545545
*

src/Pngx/Assets.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Based off Modern Tribee's Tribee__Assets
66
*
7-
* @since 2.6
7+
* @since 3.0
88
*/
99
class Pngx__Assets {
1010
/**
@@ -24,7 +24,7 @@ class Pngx__Assets {
2424
/**
2525
* Static Singleton Factory Method
2626
*
27-
* @since 2.6
27+
* @since 3.0
2828
*
2929
* @return self
3030
*/
@@ -35,7 +35,7 @@ public static function instance() {
3535
/**
3636
* Register the Methods in the correct places
3737
*
38-
* @since 2.6
38+
* @since 3.0
3939
*/
4040
public function __construct() {
4141
// Hook the actual registering of
@@ -45,7 +45,7 @@ public function __construct() {
4545
/**
4646
* Register the Assets on the correct hooks
4747
*
48-
* @since 2.6
48+
* @since 3.0
4949
*
5050
* @return void
5151
*/
@@ -128,7 +128,7 @@ public function enqueue_group( $groups ) {
128128
* useful where an asset is required in a situation not anticipated when it was originally
129129
* registered.
130130
*
131-
* @since 2.6
131+
* @since 3.0
132132
*
133133
* @param string|array $forcibly_enqueue
134134
*/
@@ -188,7 +188,7 @@ public function enqueue( $forcibly_enqueue = null ) {
188188
/**
189189
* Allows developers to hook-in and prevent an asset from been loaded
190190
*
191-
* @since 2.6
191+
* @since 3.0
192192
*
193193
* @param bool $enqueue If we should enqueue or not a given asset
194194
* @param object $asset Which asset we are dealing with
@@ -198,7 +198,7 @@ public function enqueue( $forcibly_enqueue = null ) {
198198
/**
199199
* Allows developers to hook-in and prevent an asset from been loaded
200200
*
201-
* @since 2.6
201+
* @since 3.0
202202
*
203203
* @param bool $enqueue If we should enqueue or not a given asset
204204
* @param object $asset Which asset we are dealing with
@@ -251,7 +251,7 @@ public function enqueue( $forcibly_enqueue = null ) {
251251
* Returns the path to a minified version of a js or css file, if it exists.
252252
* If the file does not exist, returns false.
253253
*
254-
* @since 2.6
254+
* @since 3.0
255255
*
256256
* @param string $url The absolute URL to the un-minified file.
257257
*
@@ -318,7 +318,7 @@ public static function maybe_get_min_file( $url ) {
318318
/**
319319
* Register an Asset and attach a callback to the required action to display it correctly
320320
*
321-
* @since 2.6
321+
* @since 3.0
322322
*
323323
* @param object $origin The main Object for the plugin you are enqueueing the script/style for
324324
* @param string $slug Slug to save the asset
@@ -508,7 +508,7 @@ public function register( $origin, $slug, $file, $deps = array(), $action = null
508508
/**
509509
* Removes an Asset from been registered and enqueue
510510
*
511-
* @since 2.6
511+
* @since 3.0
512512
*
513513
* @param string $slug Slug of the Asset
514514
*
@@ -526,7 +526,7 @@ public function remove( $slug ) {
526526
/**
527527
* Get the Asset Object configuration
528528
*
529-
* @since 2.6
529+
* @since 3.0
530530
*
531531
* @param string $slug Slug of the Asset
532532
*

src/Pngx/Blocks/Abstract.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function assets() {
162162
/**
163163
* Attach any particular hook for the specif block.
164164
*
165-
* @since TBD
165+
* @since 3.0
166166
*/
167167
public function hook() {
168168
}

src/Pngx/Blocks/Interface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function plugin();
7272
/**
7373
* Attach any specific hook to the current block.
7474
*
75-
* @since TBD
75+
* @since 3.0
7676
*
7777
* @return mixed
7878
*/

src/Pngx/Context.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Based off Modern Tribe's Tribe__Context
77
*
8-
* @since 2.6
8+
* @since 3.0
99
*
1010
*/
1111
class Pngx__Context {
@@ -27,7 +27,7 @@ class Pngx__Context {
2727
/**
2828
* Whether we are currently creating a new post, a post of post type(s) or not.
2929
*
30-
* @since 2.6
30+
* @since 3.0
3131
*
3232
* @param null $post_type The optional post type to check.
3333
*
@@ -43,7 +43,7 @@ public function is_new_post( $post_type = null ) {
4343
/**
4444
* Whether we are currently editing a post(s), post type(s) or not.
4545
*
46-
* @since 2.6
46+
* @since 3.0
4747
*
4848
* @param null|array|string|int $post_or_type A post ID, post type, an array of post types or post IDs, `null`
4949
* to just make sure we are currently editing a post.

src/Pngx/Editor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Initialize Gutenberg editor blocks and styles
55
*
6-
* @since TBD
6+
* @since 3.0
77
*/
88
class Pngx__Editor {
99

0 commit comments

Comments
 (0)