Repository navigation
Expand file tree
/
Copy pathffcertificate.php
More file actions
72 lines (64 loc) · 2.45 KB
/
Copy pathffcertificate.php
File metadata and controls
72 lines (64 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
/**
* Plugin Name: Free Form Certificate
* Plugin URI: https://github.com/rpgmem/ffcertificate
* Update URI: https://github.com/rpgmem/ffcertificate
* Description: Allows creation of dynamic forms, saves submissions, generates a PDF certificate, and enables CSV export.
* Version: 6.39.0
* Requires at least: 6.8
* Requires PHP: 8.3
* Author: Alex Meusburger
* Author URI: https://github.com/rpgmem
* License: AGPLv3 or later
* License URI: https://www.gnu.org/licenses/agpl-3.0.html
* Text Domain: ffcertificate
* Domain Path: /languages
*
* @package FreeFormCertificate
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Centralized version management
*/
define( 'FFC_VERSION', '6.39.0' ); // Plugin version (WordPress Plugin Check compliance)
// External libraries versions.
define( 'FFC_HTML2CANVAS_VERSION', '1.4.1' ); // html2canvas - https://html2canvas.hertzen.com/.
define( 'FFC_JSPDF_VERSION', '4.2.1' ); // jsPDF - https://github.com/parallax/jsPDF.
define( 'FFC_THUMBMARK_VERSION', '1.12.0' ); // thumbmarkjs - https://github.com/thumbmarkjs/thumbmarkjs (MIT, vendored at libs/js/).
define( 'FFC_ALTCHA_VERSION', '3.3.0' ); // ALTCHA widget - https://github.com/altcha-org/altcha (MIT, vendored at libs/js/).
define( 'FFC_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'FFC_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
/**
* PSR-4 Autoloader — namespace migration complete.
*
* Load the PSR-4 autoloader to enable namespace support.
* All classes use FreeFormCertificate\* namespace.
*
* ⚠️ BREAKING CHANGE (v4.0.0): Old class names (FFC_*) removed.
* Use namespaced classes: FreeFormCertificate\Core\Utils, etc.
*
* @since 3.2.0
* @since 4.0.0 BC aliases removed
*/
require_once FFC_PLUGIN_DIR . 'includes/class-ffc-autoloader.php';
// Register the autoloader.
$ffc_autoloader = new FFC_Autoloader( FFC_PLUGIN_DIR . 'includes' );
$ffc_autoloader->register();
/**
* Register activation hook
*
* ✅ All classes loaded via PSR-4 autoloader (registered above)
* No manual require_once needed - autoloader handles everything
*/
register_activation_hook( __FILE__, array( '\FreeFormCertificate\Activator', 'activate' ) );
/**
* Bootstrap the plugin by instantiating the main Loader class.
*
* @return void
*/
function ffcertificate_run(): void {
new \FreeFormCertificate\Loader();
}
ffcertificate_run();