watchman-site7.php

Description: Designed for site administrators and used to ensure site security and control site visits. The plugin developer prohibits the installation of this plugin on government websites of any country. The plugin is allowed to install and use only on private and personal sites or blogs.

PHP version 8.0.1

Constants

WMS7_PLUGIN_NAME

WMS7_PLUGIN_NAME = trim(dirname(plugin_basename(__FILE__)), "/")

Formed from the name of the plugin directory.

WMS7_PLUGIN_DIR

WMS7_PLUGIN_DIR = WP_PLUGIN_DIR . "/" . WMS7_PLUGIN_NAME

Contains the path to the main plugin file.

Serves for receiving plugin data by function get_plugin_data().

WMS7_PLUGIN_URL

WMS7_PLUGIN_URL = WP_PLUGIN_URL . "/" . WMS7_PLUGIN_NAME

Contains the url to the main plugin file.

Serves to work on the client side in module wms7-backend.js

Functions

wms7_languages()

wms7_languages() 

Localization of plugin.

wms7_enqueue_scripts_frontend()

wms7_enqueue_scripts_frontend() 

Includes script and style files for the frontend.

wms7_enqueue_scripts_backend()

wms7_enqueue_scripts_backend() 

Includes script and style files for the backend.

wms7_black_list_tbl()

wms7_black_list_tbl() 

Creates a table of blacklisted users.

wms7_activation()

wms7_activation() 

Performed when the plugin is activation.

During activation, creates two tables in the database:

{$wpdb->prefix}watchman_site

{$wpdb->prefix}watchman_site_countries

wms7_deactivation()

wms7_deactivation() 

Performed when the plugin is deactivation.

Delete cron events: wms7_truncate, wms7_htaccess

wms7_load_widget()

wms7_load_widget() 

Register widget - counter site visits.