| Server IP : 172.173.179.141 / Your IP : 216.73.216.196 Web Server : Apache System : Linux mail.lomejor.cr 6.8.0-1059-azure #65~22.04.1-Ubuntu SMP Thu May 28 16:59:19 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.2.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/bamagocr/wp-content/plugins/wpl-api/ |
Upload File : |
<?php
/**
* @wordpress-plugin
* Plugin Name: WPL REST API
* Plugin URI: https://realtyna.com/api/
* Description: Working with Realtyna REST API. Realtyna APIs are HTTP-based RESTful APIs. API request and response bodies are formatted in JSON. To get started: activate the WPL REST API plugin and then go to your WPL REST API Settings page to set up your TOKEN
* Version: 3.0.0
* Author: Realtyna
* Author URI: https://realtyna.com
* Text Domain: wpl-api
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
define( 'WPL_API_PLUGIN_NAME', 'WPL REST API');
define( 'WPL_API_VERSION', '3.0.0');
define( 'WPL_API_TEXT_DOMAIN', 'wpl-api');
define( 'WPL_API_DIR', plugin_dir_path( __FILE__ ));
define( 'WPL_API_URL', plugins_url( '' , __FILE__ ));
class WPL_API_Controller {
public function __construct() {
register_activation_hook(__FILE__, array($this, 'activate'));
register_deactivation_hook(__FILE__, array($this, 'deactivate'));
}
/**
* The code that runs during plugin activation.
* @since 1.0.0
*/
public function activate() {
$admin = new WPL_API_Admin();
if(!$admin->wplInstalled()) {
wp_send_json('First you should install WPL PRO.');
}
if(!$admin->validWplVersion()) {
wp_send_json('Please update WPL PRO to ' . $admin->wplVersion);
}
}
/**
* The code that runs during plugin deactivation.
* @since 1.0.0
*/
public function deactivate() {
delete_option( 'wpl_api_token' );
}
public function run() {
require_once __DIR__ . '/admin/Admin.php';
(new WPL_API_Admin())->show();
}
}
(new WPL_API_Controller())->run();