WordPress.org

Ready to get started?Download WordPress

Forums

Easy Watermark
Allow only admins to add watermarks (2 posts)

  1. Alexey
    Member
    Posted 1 year ago #

    Hello and many thanks for the plugin!
    On my site I have several authors who publish posts. Author must not have capability to add watermarks to images in my case.
    I think it would be great to add option to the plugin which allows to select minimal role level which opens access to plugins features.

    Right now, I hardcoded this feature for admins only in these functions (EasyWatermarkPlugin.php):

    public function add_media_page() {
        if ($this->isGDEnabled() && current_user_can('administrator'))
          add_media_page('Easy Watermark', 'Easy Watermark', 'upload_files', 'easy-watermark', array($this, 'easy_watermark'));
      }
    public function add_media_row_action($actions, $post, $detached) {
        if ($this->isGDEnabled() && in_array($post->post_mime_type, $this->allowedMime) && current_user_can('administrator')) {
          // Add link if it's supported image type
          $actions['add_watermark'] = '<a href="' . wp_nonce_url(admin_url('upload.php?page=easy-watermark&attachment_id=' . $post->ID . '&r=library')) . '">' . __('Add watermark', 'easy-watermark') . '</a>';
        }
        return $actions;
      }

    http://wordpress.org/extend/plugins/easy-watermark/

  2. szaleq
    Member
    Plugin Author

    Posted 1 year ago #

    Hello,

    Thank you for your suggestion. Such an option to select minimal role could be realy useful, I will think of it in the future release.

    Hope you enjoy using Easy Watermark, if you like it, please rate this plugin :)

    Thanks again
    Regards

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags