arc-hive-wordpress-plugin/arcHIVE-wp-plugin.php

78 lines
2.4 KiB
PHP

<?php
/**
* The plugin bootstrap file
*
* This file is read by WordPress to generate the plugin information in the plugin
* admin area. This file also includes all of the dependencies used by the plugin,
* registers the activation and deactivation functions, and defines a function
* that starts the plugin.
*
* @link https://arc-hive.zone
* @since 1.0.0
* @package arcHIVE_WPPlugin
*
* @wordpress-plugin
* arcHIVE WP Plugin: arcHIVE WP Plugin for theme support
* Plugin URI: https://arc-hive.zone/archive-wpplugin-uri/
* Description: All the <strong>options</strong> for <strong>arcHIVE website</strong> which do not come by default with Wordpress.
* Version: 1.1.0
* Date: 2022 03 14
* Author: Jorge - vitrubio.net
* Author URI: https://vitrubio.net/
* License: GPL-3.0+
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
* Text Domain: archive-wpplugin
* Domain Path: /languages
*/
/**
* howto write a pluggin by Wordpress.org
* https://codex.wordpress.org/Writing_a_Plugin
* https://developer.wordpress.org/plugins/plugin-basics/best-practices/
* https://themefoundation.com/wordpress-meta-boxes-guide/
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
//defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
/**
* Currently plugin version.
* Start at version 1.0.0 and use SemVer - https://semver.org
* Rename this for your plugin and update it as you release new versions.
*/
define( 'ARCHIVE_WPPLUGIN_VERSION', '1.1.0' );
/* *
* Load translation, if it exists
* * * * * * * * * * * * * * * * * * */
function arcHIVE_init_textdomain() {
$plugin_dir = basename(dirname(__FILE__));
load_plugin_textdomain( 'archive-wpplugin', null, $plugin_dir.'/assets/languages/' );
}
add_action('plugins_loaded', 'arcHIVE_init_textdomain');
/* *
* Add mimetypes support: svg
* * * * * * * * * * * * * * * * * * */
function arcHIVE_enable_mime_types( $mimes ) {
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter('upload_mimes', 'arcHIVE_enable_mime_types');
/**
* Registers stylesheet for a custom plugin.
*/
function arcHIVE_wp_plugin_styles_admin() {
add_editor_style( 'assets/css/arcHIVE-wp-plugin.css' );
}
add_action( 'admin_init', 'arcHIVE_wp_plugin_styles_admin' );