57 lines
1.7 KiB
PHP
57 lines
1.7 KiB
PHP
<?php
|
||
/**
|
||
* Plugin Name: S1 SEO Meta
|
||
* Plugin URI: https://1studi.ru
|
||
* Description: Добавляет мета-теги Title и Description для страниц, публикаций, рубрик, категорий и других типов записей. С визуальным редактором для описания категорий.
|
||
* Version: 1.1.0
|
||
* Requires at least: 5.8
|
||
* Requires PHP: 7.3
|
||
* Author: S1
|
||
* License: GPL v2 or later
|
||
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||
* Text Domain: s1-seo-meta
|
||
* Domain Path: /languages
|
||
*/
|
||
|
||
if ( ! defined( 'ABSPATH' ) ) {
|
||
exit;
|
||
}
|
||
|
||
define( 'S1_SEO_META_VERSION', '1.1.0' );
|
||
define( 'S1_SEO_META_FILE', __FILE__ );
|
||
define( 'S1_SEO_META_DIR', plugin_dir_path( __FILE__ ) );
|
||
define( 'S1_SEO_META_URL', plugin_dir_url( __FILE__ ) );
|
||
|
||
/**
|
||
* Load plugin text domain for translations.
|
||
*/
|
||
function s1_seo_meta_load_textdomain() {
|
||
load_plugin_textdomain( 's1-seo-meta', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
||
}
|
||
add_action( 'plugins_loaded', 's1_seo_meta_load_textdomain' );
|
||
|
||
/**
|
||
* Load required files.
|
||
*/
|
||
require_once S1_SEO_META_DIR . 'includes/class-s1-seo-meta-post.php';
|
||
require_once S1_SEO_META_DIR . 'includes/class-s1-seo-meta-term.php';
|
||
require_once S1_SEO_META_DIR . 'includes/class-s1-seo-meta-output.php';
|
||
|
||
if ( is_admin() ) {
|
||
require_once S1_SEO_META_DIR . 'admin/class-s1-seo-meta-admin.php';
|
||
}
|
||
|
||
/**
|
||
* Initialise all plugin components.
|
||
*/
|
||
function s1_seo_meta_init() {
|
||
new S1_SEO_Meta_Post();
|
||
new S1_SEO_Meta_Term();
|
||
new S1_SEO_Meta_Output();
|
||
|
||
if ( is_admin() ) {
|
||
new S1_SEO_Meta_Admin();
|
||
}
|
||
}
|
||
add_action( 'init', 's1_seo_meta_init' );
|