WP_MS_Themes_List_Table::ajax_user_can
Checks if the current user has permissions to perform AJAX actions.
Method of the class: WP_MS_Themes_List_Table{}
No Hooks.
Returns
true|false. True if the current user has permissions, false otherwise.
Usage
$WP_MS_Themes_List_Table = new WP_MS_Themes_List_Table(); $WP_MS_Themes_List_Table->ajax_user_can();
WP_MS_Themes_List_Table::ajax_user_can() WP MS Themes List Table::ajax user can code WP 7.0
public function ajax_user_can() {
if ( $this->is_site_themes ) {
return current_user_can( 'manage_sites' );
} else {
return current_user_can( 'manage_network_themes' );
}
}