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

71 lines
2.0 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://example.com
* @since 1.0.0
* @package Plugin_Name
*
* @wordpress-plugin
*/
/**
* Plugin Name: arcHIVE - website options
Plugin URI: https://arc-hive.zone/
Description: All the <strong>options</strong> for <strong>arcHIVE website</strong> wich do not come by default with Wordpress.
Version: 0.1
Author URI: https://vitrubio.net/
Author: jorge - vitrubio.net
License: GPL 3.0
Date: 2021 04 14
License URI:https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: arcHIVE_plugin_txtdomain
Domain Path: /languages
*/
/**
* if ever read this never forget to check
* howto write a pluggin by Wordpress.org
* https://codex.wordpress.org/Writing_a_Plugin
* and the best practices
* https://developer.wordpress.org/plugins/plugin-basics/best-practices/
* and some resources
* https://themefoundation.com/wordpress-meta-boxes-guide/
*/
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
/* *
* Load translation, if it exists
* * * * * * * * * * * * * * * * * * */
function arcHIVE_plugin_init() {
$plugin_dir = basename(dirname(__FILE__));
load_plugin_textdomain( 'arcHIVE_plugin_txtdomain', null, $plugin_dir.'/assets/languages/' );
}
add_action('plugins_loaded', 'arcHIVE_plugin_init');
/* *
* 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' );