Skip to content

Commit

Permalink
Merge branch 'notices' into v2.7.8-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
alimuzzaman committed Nov 20, 2023
2 parents be721de + 1e53e3c commit 4c5fd0a
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 19 deletions.
6 changes: 3 additions & 3 deletions assets/admin/css/wpdeveloper-review-notice.css
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,16 @@ span.coupon-code {
width: 50px;
}

#wpnotice-notificationx-black_friday_notice {
.notice-notificationx-black_friday_notice {
padding: 16px 0;
display: flex !important;
}
#wpnotice-notificationx-black_friday_notice.notice-info {
border-left-color: #5614d5;
}
#wpnotice-notificationx-black_friday_notice .wpnotice-thumbnail-wrapper {
padding-left: 35px !important;
padding-right: 50px !important;
padding-left: 30px !important;
padding-right: 28px !important;
}
#wpnotice-notificationx-black_friday_notice .wpnotice-content-wrapper a {
text-transform: capitalize;
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"source": {
"type": "git",
"url": "[email protected]:priyomukul/wp-notice.git",
"reference": "900b707c690b44b5f799fcc11b93099851da0afa"
"reference": "f3d02f6e772cb459e9b89d77605e02646f9c5d65"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/priyomukul/wp-notice/zipball/900b707c690b44b5f799fcc11b93099851da0afa",
"reference": "900b707c690b44b5f799fcc11b93099851da0afa",
"url": "https://api.github.com/repos/priyomukul/wp-notice/zipball/f3d02f6e772cb459e9b89d77605e02646f9c5d65",
"reference": "f3d02f6e772cb459e9b89d77605e02646f9c5d65",
"shasum": ""
},
"time": "2023-11-19T17:55:44+00:00",
"time": "2023-11-20T08:03:13+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down
6 changes: 3 additions & 3 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => 'wpdeveloper/notificationx',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'c19d45224771d0c1b6ee310d784c6f4eefbc875d',
'reference' => '2ebf627947c5bd8f91926d6ea97add0aa517acb5',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'priyomukul/wp-notice' => array(
'pretty_version' => 'v2.x-dev',
'version' => '2.9999999.9999999.9999999-dev',
'reference' => '900b707c690b44b5f799fcc11b93099851da0afa',
'reference' => 'f3d02f6e772cb459e9b89d77605e02646f9c5d65',
'type' => 'library',
'install_path' => __DIR__ . '/../priyomukul/wp-notice',
'aliases' => array(),
Expand Down Expand Up @@ -42,7 +42,7 @@
'wpdeveloper/notificationx' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'c19d45224771d0c1b6ee310d784c6f4eefbc875d',
'reference' => '2ebf627947c5bd8f91926d6ea97add0aa517acb5',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down
1 change: 1 addition & 0 deletions vendor/priyomukul/wp-notice/src/Dismiss.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use PriyoMukul\WPNotice\Utils\Base;
use PriyoMukul\WPNotice\Utils\Helper;

#[\AllowDynamicProperties]
class Dismiss extends Base {
use Helper;

Expand Down
15 changes: 10 additions & 5 deletions vendor/priyomukul/wp-notice/src/Notice.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use WP_Screen;
use function property_exists;

#[\AllowDynamicProperties]
class Notice extends Base {
use Helper;

Expand Down Expand Up @@ -247,11 +248,6 @@ public function show() {
* @since 1.0
*/
private function is_screen() {
// If screen is empty we want this shown on all screens.
if ( empty( $this->options['screens'] ) ) {
return true;
}

// Make sure the get_current_screen function exists.
if ( ! function_exists( 'get_current_screen' ) ) {
require_once ABSPATH . 'wp-admin/includes/screen.php';
Expand All @@ -260,6 +256,15 @@ private function is_screen() {
/** @var WP_Screen $current_screen */
$current_screen = get_current_screen();

if ( $current_screen->id === 'update' ) {
return false;
}

// If screen is empty we want this shown on all screens.
if ( empty( $this->options['screens'] ) ) {
return true;
}

return ( in_array( $current_screen->id, $this->options['screens'], true ) );
}

Expand Down
1 change: 1 addition & 0 deletions vendor/priyomukul/wp-notice/src/Notices.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* @property $id string
* @property $stylesheet_url string
*/
#[\AllowDynamicProperties]
final class Notices extends Base {
use Helper;

Expand Down
9 changes: 5 additions & 4 deletions vendor/priyomukul/wp-notice/src/Utils/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace PriyoMukul\WPNotice\Utils;

#[\AllowDynamicProperties]
abstract class Base {
/**
* Holds the plugin instance.
Expand All @@ -17,17 +18,17 @@ abstract class Base {
/**
* Sets up a single instance of the plugin.
*
* @return static An instance of the class.
* @since 1.0.0
* @access public
* @static
*
* @return static An instance of the class.
*/
public static function get_instance( ...$args ) {
$module = get_called_class();
$module = get_called_class();
$module_id = $module;

if( $module === 'PriyoMukul\WPNotice\Notice' || $module === 'PriyoMukul\WPNotice\Dismiss' ) {
if ( $module === 'PriyoMukul\WPNotice\Notice' || $module === 'PriyoMukul\WPNotice\Dismiss' ) {
$module_id = $module . '::' . $args[0];
}

Expand All @@ -38,7 +39,7 @@ public static function get_instance( ...$args ) {
return self::$instances[ $module_id ];
}

protected function database( $args = null ){
protected function database( $args = null ) {
return new Storage( $args );
}
}
1 change: 1 addition & 0 deletions vendor/priyomukul/wp-notice/src/Utils/CacheBank.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use PriyoMukul\WPNotice\Notices;

#[\AllowDynamicProperties]
class CacheBank {
private static $instance;

Expand Down
1 change: 1 addition & 0 deletions vendor/priyomukul/wp-notice/src/Utils/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use function property_exists;

#[\AllowDynamicProperties]
class Storage extends Base {
private $id = 'wpnotice';
private $type = 'options';
Expand Down

0 comments on commit 4c5fd0a

Please sign in to comment.