PATH:
home
/
lab2454c
/
igpma.com
/
wp-content
/
plugins
/
insert-headers-and-footers
/
includes
<?php /** * Manage custom capabilities for WPCode. * * @package WPCode */ /** * The WPCode_Capabilities class. */ class WPCode_Capabilities { /** * Function to call on plugin activation. * * @return void */ public static function add_capabilities() { foreach ( self::get_roles() as $role ) { if ( $role->has_cap( 'manage_options' ) ) { $role->add_cap( 'wpcode_edit_snippets' ); $role->add_cap( 'wpcode_activate_snippets' ); } } } /** * Get roles as WP_Role objects. * * @return WP_Role[] */ public static function get_roles() { $roles = wp_roles()->roles; $role_array = array(); foreach ( array_keys( $roles ) as $role_key ) { $role_array[] = get_role( $role_key ); } return $role_array; } /** * Remove custom capabilities. * * @return void */ public static function uninstall() { foreach ( self::get_roles() as $role ) { if ( $role->has_cap( 'wpcode_edit_snippets' ) ) { $role->remove_cap( 'wpcode_edit_snippets' ); } if ( $role->has_cap( 'wpcode_activate_snippets' ) ) { $role->remove_cap( 'wpcode_activate_snippets' ); } } } }
[-] class-wpcode-smart-tags.php
[edit]
[-] class-wpcode-error.php
[edit]
[+]
admin
[+]
..
[-] legacy.php
[edit]
[+]
conditional-logic
[-] icons.php
[edit]
[+]
execute
[-] class-wpcode-file-cache.php
[edit]
[+]
generator
[-] capabilities.php
[edit]
[-] pluggable.php
[edit]
[-] class-wpcode-library-auth.php
[edit]
[-] class-wpcode-generator.php
[edit]
[-] class-wpcode-file-logger.php
[edit]
[-] class-wpcode-library.php
[edit]
[-] compat.php
[edit]
[-] global-output.php
[edit]
[-] class-wpcode-admin-bar-info.php
[edit]
[-] shortcode.php
[edit]
[-] ihaf.php
[edit]
[-] safe-mode.php
[edit]
[-] helpers.php
[edit]
[-] class-wpcode-capabilities.php
[edit]
[-] class-wpcode-conditional-logic.php
[edit]
[+]
auto-insert
[-] class-wpcode-snippet-cache.php
[edit]
[-] class-wpcode-snippet-execute.php
[edit]
[-] class-wpcode-install.php
[edit]
[-] class-wpcode-settings.php
[edit]
[-] class-wpcode-snippet.php
[edit]
[-] post-type.php
[edit]
[+]
lite
[-] class-wpcode-auto-insert.php
[edit]