PluginProbe
PublishPress Permissions: Access Control, Content Permissions, User Access / trunk
PublishPress Permissions: Access Control, Content Permissions, User Access vtrunk
4.8.4 4.8.3 4.8.2 3.3.6 3.3.7 3.3.8 3.3.9 3.4 3.4.1 3.4.2 3.4.3 3.5 3.5.1 3.5.2 3.5.4 3.5.6 3.5.7 3.6 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 All 202 releases
press-permit-core / activation.php

activation.php in PublishPress Permissions: Access Control, Content Permissions, User Access trunk, at activation.php

24 lines 809 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 require(__DIR__ . '/db-config.php');
3
4 // get last database version
5 if ( ! $ver = get_option('presspermitpro_version') ) {
6 if ( ! $ver = get_option('presspermit_version') ) {
7 $ver = get_option('pp_c_version');
8 }
9 }
10
11 $db_ver = (is_array($ver) && isset( $ver['db_version'] ) ) ? $ver['db_version'] : '';
12 require_once(__DIR__ . '/classes/PublishPress/Permissions/DB/DatabaseSetup.php');
13 new \PublishPress\Permissions\DB\DatabaseSetup($db_ver);
14
15 if (!class_exists('PublishPress\Permissions\PluginUpdated')) {
16 require_once(__DIR__ . '/classes/PublishPress/Permissions/PluginUpdated.php');
17 }
18
19 \PublishPress\Permissions\PluginUpdated::syncWordPressRoles();
20
21 update_option('presspermit_activation', true);
22 update_option('presspermit_refresh_role_usage', true);
23
24 do_action('presspermit_activate');