Skip to content

Commit

Permalink
add composer
Browse files Browse the repository at this point in the history
  • Loading branch information
Niloys7 committed Apr 18, 2023
1 parent 11e80dd commit 30bd37b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 16 deletions.
9 changes: 5 additions & 4 deletions class-remote-notification-client.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*
* This class refactor by Niloy
* @link https://github.com/Niloys7/remote-admin-notification-client
* @since 2022
*/

// If this file is called directly, abort.
Expand All @@ -41,18 +42,18 @@ final class WPI_Remote_Dashboard_Notifications_Client {
* @since 1.3.0
* @var string
*/
public $wordpress_version_required = '4.1';
public $wordpress_version_required = '5.0';

/**
* Required version of PHP.
*
* Follow WordPress latest requirements and require
* PHP version 5.6 at least.
* PHP version 7.4 at least.
*
* @since 1.3.0
* @var string
*/
public $php_version_required = '5.6';
public $php_version_required = '7.4';

/**
* Holds all the registered notifications
Expand Down Expand Up @@ -501,7 +502,7 @@ public function dismiss_notice() {
wp_die( 'oops!' );
}

if ( isset( $_POST['dismiss'] ) && $_POST['dismiss'] == 1 ) {
if ( isset( $_POST['dismiss'] ) && 1 == $_POST['dismiss'] ) {

global $current_user;

Expand Down
16 changes: 16 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "niloys7/remote-admin-notification-client",
"description": "Admin Notification client fo WordPress Plugins & Theme",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Niloy",
"email": "[email protected]"
}
],
"require": {
"php": "^7.4"
}

}
12 changes: 12 additions & 0 deletions ran-client-demo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/**
* Skeleton Mode
*/
// if ( !defined( 'ABSPATH' ) ) {
// exit;
// }
// require_once 'class-remote-notification-client.php';

// if ( function_exists( 'wpi_rdnc_add_notification' ) ) {
// wpi_rdnc_add_notification( 72, 'a9873a6e608e946e', 'https://www.codeixer.com' );
// }
12 changes: 0 additions & 12 deletions ran-client.php

This file was deleted.

0 comments on commit 30bd37b

Please sign in to comment.