Submit
Path:
~
/
home
/
getwphos
/
www
/
radkingpanels
/
wp-content
/
plugins
/
wordpress-seo
/
src
/
ai-generator
/
user-interface
/
File Content:
route-permission-trait.php
<?php namespace Yoast\WP\SEO\AI_Generator\User_Interface; /** * Trait for common permission checks in route classes. */ trait Route_Permission_Trait { /** * Checks: * - if the user is logged * - if the user can edit posts * * @return bool Whether the user is logged in, can edit posts and the feature is active. */ public function check_permissions(): bool { $user = \wp_get_current_user(); if ( $user === null || $user->ID < 1 ) { return false; } return \user_can( $user, 'edit_posts' ); } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
ai-generator-integration.php
5002 bytes
0644
bust-subscription-cache-route.php
2103 bytes
0644
get-suggestions-route.php
4810 bytes
0644
get-usage-route.php
4649 bytes
0644
route-permission-trait.php
525 bytes
0644
N4ST4R_ID | Naxtarrr