robotstxt-og/robotstxt-og.php
2026-08-24 12:20:42 +00:00

42 lines
1.3 KiB
PHP

<?php
/**
* Plugin Name: OpenGraph (by ROBOTSTXT)
* Plugin URI: https://www.robotstxt.software/plugins/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.2.2
* Requires at least: 4.9.8
* Requires PHP: 8.0
* Author: ROBOTSTXT
* Author URI: https://www.robotstxt.software/
* License: GPL v3 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Text Domain: robotstxt-og
* Domain Path: /languages
* Network: true
* Update URI: https://www.robotstxt.software/plugins/robotstxt-og/
* Contributors: robotstxt, javiercasares
*
* @package ROBOTSTXT_OG
* @version 1.2.2
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// Define plugin constants.
define( 'ROBOTSTXT_OG_VERSION', '1.2.2' );
define( 'ROBOTSTXT_OG_PATH', plugin_dir_path( __FILE__ ) );
define( 'ROBOTSTXT_OG_URL', plugin_dir_url( __FILE__ ) );
define( 'ROBOTSTXT_OG_BASENAME', plugin_basename( __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();
}
);