wp-job-manager.php
| 1 | <?php |
| 2 | /** |
| 3 | * Plugin Name: WP Job Manager |
| 4 | * Plugin URI: https://wpjobmanager.com/ |
| 5 | * Description: Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site. |
| 6 | * Version: 1.39.0 |
| 7 | * Author: Automattic |
| 8 | * Author URI: https://wpjobmanager.com/ |
| 9 | * Requires at least: 5.8 |
| 10 | * Tested up to: 6.1 |
| 11 | * Requires PHP: 7.2 |
| 12 | * Text Domain: wp-job-manager |
| 13 | * Domain Path: /languages/ |
| 14 | * License: GPL2+ |
| 15 | * |
| 16 | * @package wp-job-manager |
| 17 | */ |
| 18 | |
| 19 | if ( ! defined( 'ABSPATH' ) ) { |
| 20 | exit; |
| 21 | } |
| 22 | |
| 23 | // Define constants. |
| 24 | define( 'JOB_MANAGER_VERSION', '1.39.0' ); |
| 25 | define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) ); |
| 26 | define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) ); |
| 27 | define( 'JOB_MANAGER_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); |
| 28 | |
| 29 | require_once dirname( __FILE__ ) . '/includes/class-wp-job-manager-dependency-checker.php'; |
| 30 | if ( ! WP_Job_Manager_Dependency_Checker::check_dependencies() ) { |
| 31 | return; |
| 32 | } |
| 33 | |
| 34 | require_once dirname( __FILE__ ) . '/includes/class-wp-job-manager.php'; |
| 35 | |
| 36 | /** |
| 37 | * Main instance of WP Job Manager. |
| 38 | * |
| 39 | * Returns the main instance of WP Job Manager to prevent the need to use globals. |
| 40 | * |
| 41 | * @since 1.26 |
| 42 | * @return WP_Job_Manager |
| 43 | */ |
| 44 | function WPJM() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName |
| 45 | return WP_Job_Manager::instance(); |
| 46 | } |
| 47 | |
| 48 | $GLOBALS['job_manager'] = WPJM(); |
| 49 | |
| 50 | // Activation - works with symlinks. |
| 51 | register_activation_hook( basename( dirname( __FILE__ ) ) . '/' . basename( __FILE__ ), array( WPJM(), 'activate' ) ); |
| 52 | |
| 53 | // Cleanup on deactivation. |
| 54 | register_deactivation_hook( __FILE__, array( WPJM(), 'unschedule_cron_jobs' ) ); |
| 55 | register_deactivation_hook( __FILE__, array( WPJM(), 'usage_tracking_cleanup' ) ); |
| 56 |