| 1 |
<?php |
| 2 |
/** |
| 3 |
* Head & Footer Code plugin for WordPress |
| 4 |
* |
| 5 |
* @link https://urosevic.net/ |
| 6 |
* @link https://www.techwebux.com/ |
| 7 |
* @since 1.0.0 |
| 8 |
* @package Head_Footer_Code |
| 9 |
* |
| 10 |
* Plugin Name: Head & Footer Code |
| 11 |
* Plugin URI: https://urosevic.net/wordpress/plugins/head-footer-code/ |
| 12 |
* Description: Easy add site-wide, category or article specific custom code before the closing <strong></head></strong> and <strong></body></strong> or after opening <strong><body></strong> HTML tag. |
| 13 |
* Version: 1.4.0 |
| 14 |
* Author: Aleksandar Urošević |
| 15 |
* Author URI: https://urosevic.net/ |
| 16 |
* License: GPLv3 |
| 17 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt |
| 18 |
* Text Domain: head-footer-code |
| 19 |
* Domain Path: /languages |
| 20 |
* Requires at least: 4.9 |
| 21 |
* Tested up to: 6.8 |
| 22 |
* Requires PHP: 5.5 |
| 23 |
*/ |
| 24 |
|
| 25 |
namespace Techwebux\Hfc; |
| 26 |
|
| 27 |
// If this file is called directly, abort. |
| 28 |
if ( ! defined( 'WPINC' ) ) { |
| 29 |
die; |
| 30 |
} |
| 31 |
|
| 32 |
define( 'HFC_VER', '1.4.0' ); |
| 33 |
define( 'HFC_VER_DB', '9' ); |
| 34 |
define( 'HFC_FILE', __FILE__ ); |
| 35 |
define( 'HFC_DIR', __DIR__ ); |
| 36 |
define( 'HFC_URL', plugin_dir_url( __FILE__ ) ); |
| 37 |
define( 'HFC_PLUGIN_NAME', 'Head & Footer Code' ); |
| 38 |
define( 'HFC_PLUGIN_SLUG', 'head-footer-code' ); |
| 39 |
|
| 40 |
// Load files. |
| 41 |
require_once HFC_DIR . '/classes/autoload.php'; |
| 42 |
new Main(); |
| 43 |
|
| 44 |
/** |
| 45 |
* Add `wp_body_open` backward compatibility for WordPress installations prior 5.2 |
| 46 |
*/ |
| 47 |
if ( ! function_exists( 'wp_body_open' ) ) { |
| 48 |
/** |
| 49 |
* Fire the wp_body_open action. |
| 50 |
*/ |
| 51 |
function wp_body_open() { |
| 52 |
do_action( 'wp_body_open' ); |
| 53 |
} |
| 54 |
} |
| 55 |
|