<?php /** * @package AtMention In Comments * @author Doyin Faith Kasumu * * Plugin Name: AtMention in Comments * Plugin URI: https://wordpress.org/plugins/atmention-in-comments * Description: Mention both registered and non registered @comment__author in comments * Version: 1.0.0 * Author: Doyin Faith Kasumu * Author URI: http://t2techblog.com */ defined('ABSPATH') or die('No script kiddies please!'); require_once plugin_dir_path(__FILE__) . 'classes/class.main.php'; require_once plugin_dir_path(__FILE__) . 'classes/class.settings.php'; require_once plugin_dir_path(__FILE__) . 'classes/class.basic.php'; if (get_option('atmention_options') === false) { register_activation_hook(__FILE__, array('Atmention_basic', 'on_activation')); } // initialize the class and get all works done Atmention_in_comments::initialize(); Atmention_settings::initialize();
/** Initialize WordPress hooks */ public static function initialize() { self::$atmention_options = get_option('atmention_options'); add_action('admin_menu', array('Atmention_settings', 'atmention_setting')); add_action('admin_init', array('Atmention_settings', 'atmention_admin_init')); }