function x_soliloquy_remove_license_functionality()
 {
     if (is_admin()) {
         //
         // 1. Remove the settings menu.
         // 2. Remove license notices.
         //
         remove_action('admin_menu', array(Soliloquy_Settings::get_instance(), 'admin_menu'));
         // 1
         remove_action('admin_notices', array(Soliloquy_License::get_instance(), 'notices'));
         // 2
     }
 }
예제 #2
0
     * Add Settings page to plugin action links in the Plugins table.
     *
     * @since 1.0.0
     *
     * @param array $links  Default plugin action links.
     * @return array $links Amended plugin action links.
     */
    public function settings_link($links)
    {
        $settings_link = sprintf('<a href="%s">%s</a>', esc_url(add_query_arg(array('post_type' => 'soliloquy', 'page' => 'soliloquy-settings'), admin_url('edit.php'))), __('Settings', 'soliloquy'));
        array_unshift($links, $settings_link);
        return $links;
    }
    /**
     * Returns the singleton instance of the class.
     *
     * @since 1.0.0
     *
     * @return object The Soliloquy_Settings object.
     */
    public static function get_instance()
    {
        if (!isset(self::$instance) && !self::$instance instanceof Soliloquy_Settings) {
            self::$instance = new Soliloquy_Settings();
        }
        return self::$instance;
    }
}
// Load the settings class.
$soliloquy_settings = Soliloquy_Settings::get_instance();