| @@ -2,13 +2,14 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: Charitable |
| 4 | 4 | * Plugin URI: https://www.wpcharitable.com |
| 5 | 5 | * Description: The best WordPress donation plugin. Fundraising with recurring donations, and powerful features to help you raise more money online. |
| 6 | - * Version: 1.8.11.3 | |
| 6 | + * Version: 1.8.13 | |
| 7 | 7 | * Author: Charitable Donations & Fundraising Team |
| 8 | 8 | * Author URI: https://wpcharitable.com |
| 9 | - * Requires at least: 5.0 | |
| 10 | - * Stable tag: 1.8.11.3 | |
| 9 | + * Requires at least: 5.9 | |
| 10 | + * Requires PHP: 7.4 | |
| 11 | + * Stable tag: 1.8.13 | |
| 11 | 12 | * License: GPLv2 or later |
| 12 | 13 | * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
| 13 | 14 | * |
| 14 | 15 | * Text Domain: charitable |
| @@ -38,9 +39,9 @@ | ||
| 38 | 39 | /** The plugin author name. */ |
| 39 | 40 | const AUTHOR = 'WP Charitable'; |
| 40 | 41 | |
| 41 | 42 | /* Plugin version. */ |
| 42 | - const VERSION = '1.8.11.3'; | |
| 43 | + const VERSION = '1.8.13'; | |
| 43 | 44 | |
| 44 | 45 | /* Version of database schema. */ |
| 45 | 46 | const DB_VERSION = '20180522'; |
| 46 | 47 | |
| @@ -126,8 +127,20 @@ | ||
| 126 | 127 | |
| 127 | 128 | define( 'CHARITABLE_DIRECTORY_PATH', plugin_dir_path( __FILE__ ) ); |
| 128 | 129 | define( 'CHARITABLE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); |
| 129 | 130 | define( 'CHARITABLE_MARKETING_URL', 'https://wpcharitable.com/' ); |
| 131 | + if ( ! defined( 'CHARITABLE_ANALYSIS_API_URL' ) ) { | |
| 132 | + define( 'CHARITABLE_ANALYSIS_API_URL', apply_filters( 'charitable_analysis_api_url', 'https://nonprofitscore.org/api/v1/charitable/recommendations' ) ); | |
| 133 | + } | |
| 134 | + // No credential is shipped. Each site earns a runtime-minted, quota-limited per-site token from | |
| 135 | + // the register endpoint (see Charitable_Site_Analysis::register()); the token is not in plugin source. | |
| 136 | + if ( ! defined( 'CHARITABLE_ANALYSIS_REGISTER_URL' ) ) { | |
| 137 | + define( 'CHARITABLE_ANALYSIS_REGISTER_URL', apply_filters( 'charitable_analysis_register_url', 'https://nonprofitscore.org/api/v1/charitable/register' ) ); | |
| 138 | + } | |
| 139 | + // Note: CHARITABLE_ANALYSIS_SALT is intentionally NOT defined here. It would need wp_salt(), | |
| 140 | + // which lives in pluggable.php and is not loaded yet at plugin-construct time. The salt is | |
| 141 | + // resolved lazily in Charitable_Site_Analysis::gather_config() (admin-ajax time), and a host | |
| 142 | + // may still pre-define the CHARITABLE_ANALYSIS_SALT constant (e.g. in wp-config.php). | |
| 130 | 143 | |
| 131 | 144 | define( 'CHARITABLE_BUILDER_SHOW_LEGACY_EDIT_LINKS', true ); // 1.8.0 specific. |
| 132 | 145 | |
| 133 | 146 | spl_autoload_register( array( $this, 'autoloader' ) ); |
| @@ -229,8 +242,10 @@ | ||
| 229 | 242 | require_once $includes_path . 'endpoints/charitable-endpoints-functions.php'; |
| 230 | 243 | require_once $includes_path . 'privacy/charitable-privacy-functions.php'; |
| 231 | 244 | require_once $includes_path . 'public/charitable-template-helpers.php'; |
| 232 | 245 | require_once $includes_path . 'shortcodes/charitable-shortcodes-hooks.php'; |
| 246 | + require_once $includes_path . 'tracking/charitable-tracking-hooks.php'; // 1.8.12 - MUST be outside the admin gate; see the file header. | |
| 247 | + require_once $includes_path . 'abilities/charitable-abilities-hooks.php'; // 1.8.13 - MUST be outside the admin gate: abilities register on REST and WP-CLI requests, neither of which is is_admin(). | |
| 233 | 248 | require_once $includes_path . 'upgrades/charitable-upgrade-hooks.php'; |
| 234 | 249 | require_once $includes_path . 'users/charitable-user-functions.php'; |
| 235 | 250 | require_once $includes_path . 'user-management/charitable-user-management-hooks.php'; |
| 236 | 251 | require_once $includes_path . 'utilities/charitable-utility-functions.php'; |
| @@ -498,8 +513,12 @@ | ||
| 498 | 513 | // misc. |
| 499 | 514 | require_once $this->get_path( 'admin' ) . 'class-charitable-admin-pointers.php'; |
| 500 | 515 | require_once $this->get_path( 'admin' ) . 'plugins/charitable-admin-plugin-hooks.php'; |
| 501 | 516 | require_once $this->get_path( 'admin' ) . 'class-charitable-admin-getting-started.php'; |
| 517 | + | |
| 518 | + // Site Analysis / Recommendations tab. | |
| 519 | + require_once $this->get_path( 'admin' ) . 'site-analysis/class-charitable-site-analysis.php'; | |
| 520 | + Charitable_Site_Analysis::get_instance(); | |
| 502 | 521 | |
| 503 | 522 | $admin = Charitable_Admin::get_instance(); |
| 504 | 523 | $this->registry->register_object( $admin ); |
| 505 | 524 | |