* @license GPL-2.0+ * @copyright 2016 Appreciators Clique * * @wordpress-plugin * Plugin Name: Appreciators WP Plugin * Description: A WordPress plugin that allows viewers to appreciate and tip content creators * Version: 1.1.1 * Author: Appreciators Clique * Author URI: https://appreciators.org * Text Domain: appreciators * License: GPL-2.0+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt * Domain Path: /languages */ // If this file is called directly, abort. if ( ! defined( 'WPINC' ) ) { die; } /** * Include plugin main class. */ require_once plugin_dir_path( __FILE__ ) . 'public/class-appreciators.php'; /** * Perform installation. */ register_activation_hook( __FILE__, array( 'Appreciators', 'activate' ) ); register_deactivation_hook( __FILE__, array( 'Appreciators', 'deactivate' ) ); /** * Initialize the plugin instance. */ add_action( 'plugins_loaded', array( 'Appreciators', 'get_instance' ) ); /** * Plugin admin. */ if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) { require_once plugin_dir_path( __FILE__ ) . 'admin/class-appreciators-admin.php'; add_action( 'plugins_loaded', array( 'Appreciators_Admin', 'get_instance' ) ); } /** * Shows the Appreciators WP Plugin. * * @return string Appreciators WP Plugin HTML. */ function get_Appreciators() { return Appreciators::view( get_option( 'appreciators_settings' ) ); } /** * Shows the Appreciators WP Plugin legacy. * * @return string Appreciators WP Plugin HTML. */ function authorbbio_add_authorbox() { echo get_Appreciators(); } add_action( 'show_user_profile', 'extra_user_profile_fields' ); add_action( 'edit_user_profile', 'extra_user_profile_fields' ); /** * Adds custom user profile fields shown in Appreciators WP Plugin * */ function extra_user_profile_fields( $user ) { $settings = get_option( 'appreciators_settings' ); if ( $settings['user_roles_access'] == "admins" && !current_user_can('administrator') || $settings['user_roles_access'] == "editors" && !current_user_can('administrator') && !current_user_can('editor') || $settings['user_roles_access'] == "authors" && !current_user_can('administrator') && !current_user_can('editor') && !current_user_can('author') || $settings['user_roles_access'] == "contributors" && !current_user_can('administrator') && !current_user_can('editor') && !current_user_can('author') && !current_user_can('contributor') ){ // nothing }else{ ?>
|
|
|
|
ID )) == "yes") echo "checked"; ?> /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ID )) == "yes") echo "checked"; ?> /> |
|
|
|