| @@ -21,8 +21,16 @@ | ||
| 21 | 21 | } |
| 22 | 22 | } |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | + public function can_access_settings() { | |
| 26 | + return apply_filters( 'mgl_allow_setup', current_user_can( 'manage_options' ) ); | |
| 27 | + } | |
| 28 | + | |
| 29 | + public function can_access_features() { | |
| 30 | + return apply_filters( 'mgl_allow_usage', current_user_can( 'upload_files' ) ); | |
| 31 | + } | |
| 32 | + | |
| 25 | 33 | // Use by the Gutenberg block |
| 26 | 34 | |
| 27 | 35 | // Rewrite the sizes attributes of the src-set for each image |
| 28 | 36 | function wp_get_attachment_image_attributes( $attr, $attachment, $size ) { |