PluginProbe
Depicter — Popup & Slider Builder / 1.9.2
Depicter — Popup & Slider Builder v1.9.2
4.8.1 trunk 1.0.0 1.1.0 1.1.2 1.1.4 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.5 1.3.8 1.5.0 1.5.1 1.5.2 1.5.5 1.6.0 1.6.1 1.6.2 1.7.0 All 76 releases
← All changes | app/src/Services/AuthorizationService.php +11 -0 1.3.01.9.2 View file →
@@ -4,8 +4,10 @@
4 4
5 5 class AuthorizationService {
6 6
7 7 /**
8 + * Whether the current user has specified capabilities or not.
9 + *
8 10 * @param string|array $capabilities
9 11 *
10 12 * @return bool
11 13 */
@@ -21,6 +23,15 @@
21 23 }
22 24 }
23 25
24 26 return false;
27 + }
28 +
29 + /**
30 + * Whether current user is allowed to publish document or not
31 + *
32 + * @return bool
33 + */
34 + public function currentUserCanPublishDocument(){
35 + return $this->currentUserCan( [ 'manage_options', 'publish_depicter' ] );
25 36 }
26 37 }