Dodano wsparcie dla pamięci podręcznej oraz przywrócono uprawnienia administratora w motywie Elishop. Utworzono nowy plik bazy danych SQL.
This commit is contained in:
2032115
host828780_elitexsklep.sql
Normal file
2032115
host828780_elitexsklep.sql
Normal file
File diff suppressed because one or more lines are too long
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
define( 'WP_CACHE', true );
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@@ -40,7 +42,7 @@ define('DB_CHARSET', 'utf8');
|
||||
/** The Database Collate type. Don't change this if in doubt. */
|
||||
define('DB_COLLATE', '');
|
||||
|
||||
define('DISALLOW_FILE_EDIT', true);
|
||||
define('DISALLOW_FILE_EDIT', false);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -106,4 +106,38 @@ function wg_view_all_products($query){
|
||||
if( isset($_GET['view']) && $_GET['view'] === 'all' ){
|
||||
$query->set( 'posts_per_page', -1 );
|
||||
}
|
||||
}
|
||||
|
||||
add_action('init', 'elishop_restore_administrator_user_caps');
|
||||
|
||||
function elishop_restore_administrator_user_caps() {
|
||||
if (get_option('elishop_admin_user_caps_restored')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$role = get_role('administrator');
|
||||
if (!$role) {
|
||||
return;
|
||||
}
|
||||
|
||||
$caps = array(
|
||||
'list_users',
|
||||
'create_users',
|
||||
'edit_users',
|
||||
'delete_users',
|
||||
'promote_users',
|
||||
'remove_users',
|
||||
);
|
||||
|
||||
$changed = false;
|
||||
foreach ($caps as $cap) {
|
||||
if (!$role->has_cap($cap)) {
|
||||
$role->add_cap($cap);
|
||||
$changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($changed) {
|
||||
update_option('elishop_admin_user_caps_restored', time());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user