v1.0.0
This commit is contained in:
parent
ac2c7a8014
commit
f7702f2872
25 changed files with 6453 additions and 0 deletions
45
robotstxt-og.php
Normal file
45
robotstxt-og.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
/**
|
||||
* Plugin Name: OpenGraph (by ROBOTSTXT)
|
||||
* Plugin URI: https://git.robotstxt.es/ROBOTSTXT/robotstxt-og
|
||||
* Description: Intelligent Open Graph image fallback for social media crawlers. Automatically detects and serves compatible image formats (JPEG/PNG) when modern formats (AVIF/WebP) are used as featured images.
|
||||
* Version: 1.0.0
|
||||
* Requires at least: 6.7
|
||||
* Requires PHP: 8.2
|
||||
* Author: ROBOTSTXT
|
||||
* Author URI: https://www.robotstxt.es/
|
||||
* License: GPL v3 or later
|
||||
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* Text Domain: robotstxt-og
|
||||
* Domain Path: /languages
|
||||
* Gitea Plugin URI: ROBOTSTXT/robotstxt-og
|
||||
* Contributors: javiercasares, robotstxt
|
||||
*
|
||||
* @package ROBOTSTXT_OG
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
// Define plugin constants.
|
||||
define( 'ROBOTSTXT_OG_VERSION', '1.0.0' );
|
||||
define( 'ROBOTSTXT_OG_PATH', plugin_dir_path( __FILE__ ) );
|
||||
define( 'ROBOTSTXT_OG_URL', plugin_dir_url( __FILE__ ) );
|
||||
define( 'ROBOTSTXT_OG_BASENAME', plugin_basename( __FILE__ ) );
|
||||
|
||||
// Initialize the updater system.
|
||||
require_once ROBOTSTXT_OG_PATH . 'robotstxt-updater.php';
|
||||
Robotstxt_Updater::init( __FILE__ );
|
||||
|
||||
// Load the main plugin class.
|
||||
require_once ROBOTSTXT_OG_PATH . 'includes/class-robotstxt-og-image-fallback.php';
|
||||
|
||||
// Initialize the plugin.
|
||||
add_action(
|
||||
'plugins_loaded',
|
||||
function () {
|
||||
Robotstxt_OG_Image_Fallback::get_instance()->init();
|
||||
}
|
||||
);
|
||||
Loading…
Reference in a new issue