本文整理汇总了PHP中gallery_bank_settings函数的典型用法代码示例。如果您正苦于以下问题:PHP gallery_bank_settings函数的具体用法?PHP gallery_bank_settings怎么用?PHP gallery_bank_settings使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了gallery_bank_settings函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
$user_role_permission = "edit_posts";
break;
case "subscriber":
$user_role_permission = "read";
break;
}
if (!current_user_can($user_role_permission)) {
return;
} else {
global $foobox;
if (class_exists("fooboxV2")) {
$foobox = "yes";
} elseif (class_exists("Foobox_Free")) {
$foobox = "Foobox Free Edition";
}
$album_css = $wpdb->get_results("SELECT * FROM " . gallery_bank_settings());
if (count($album_css) != 0) {
$setting_keys = array();
for ($flag = 0; $flag < count($album_css); $flag++) {
array_push($setting_keys, $album_css[$flag]->setting_key);
}
$index = array_search("thumbnails_custom_enable", $setting_keys);
$thumbnails_custom_enable = intval($album_css[$index]->setting_value);
$index = array_search("thumbnails_width", $setting_keys);
$thumbnails_width = intval($album_css[$index]->setting_value);
$index = array_search("thumbnails_height", $setting_keys);
$thumbnails_height = intval($album_css[$index]->setting_value);
$index = array_search("thumbnails_opacity", $setting_keys);
$thumbnails_opacity = doubleval($album_css[$index]->setting_value);
$index = array_search("thumbnails_border_size", $setting_keys);
$thumbnails_border_size = intval($album_css[$index]->setting_value);
示例2: frontend_plugin_css_scripts_gallery_bank
function frontend_plugin_css_scripts_gallery_bank()
{
global $wpdb;
$album_css = $wpdb->get_results("SELECT * FROM " . gallery_bank_settings());
if (count($album_css) != 0) {
$setting_keys = array();
for ($flag = 0; $flag < count($album_css); $flag++) {
array_push($setting_keys, $album_css[$flag]->setting_key);
}
$index = array_search("lightbox_type", $setting_keys);
$lightbox_type = $album_css[$index]->setting_value;
}
wp_enqueue_style("gallery-bank.css", plugins_url("/assets/css/gallery-bank.css", dirname(__FILE__)));
wp_enqueue_style("jPages.css", plugins_url("/assets/css/jPages.css", dirname(__FILE__)));
wp_enqueue_style("animate.css", plugins_url("/assets/css/animate.css", dirname(__FILE__)));
wp_enqueue_style("hover_effects.css", plugins_url("/assets/css/hover_effects.css", dirname(__FILE__)));
switch ($lightbox_type) {
case "pretty_photo":
wp_enqueue_style("prettyPhoto.css", plugins_url("/assets/css/prettyPhoto.css", dirname(__FILE__)));
break;
case "color_box":
wp_enqueue_style("colorbox.css", plugins_url("/assets/css/colorbox.css", dirname(__FILE__)));
break;
case "photo_swipe":
wp_enqueue_style("photoswipe.css", plugins_url("/assets/css/photoswipe.css", dirname(__FILE__)));
break;
case "fancy_box":
wp_enqueue_style("jquery.fancybox.css", plugins_url("/assets/css/jquery.fancybox.css", dirname(__FILE__)));
wp_enqueue_style("jquery.fancybox-buttons.css", plugins_url("/assets/css/jquery.fancybox-buttons.css", dirname(__FILE__)));
break;
case "lightbox2":
wp_enqueue_style("lightbox.css", plugins_url("/assets/css/lightbox.css", dirname(__FILE__)));
break;
}
}
示例3: gallery_bank_pics
$album_pics = $wpdb->get_results("SELECT * FROM " . gallery_bank_pics() . " order by sorting_order asc");
$album_covers = $wpdb->get_results("SELECT * FROM " . gallery_bank_pics() . " where album_cover = 1 order by sorting_order asc");
for ($flag = 0; $flag < count($album_pics); $flag++) {
if ($album_pics[$flag]->video != 1) {
process_image_upload($album_pics[$flag]->thumbnail_url, $thumb_width, $thumb_height);
}
}
for ($flag1 = 0; $flag1 < count($album_covers); $flag1++) {
if ($album_covers[$flag1]->thumbnail_url != "") {
process_album_upload($album_covers[$flag1]->thumbnail_url, $cover_width, $cover_height);
}
}
die;
} else {
if ($_REQUEST["param"] == "restore_settings") {
$sql = "TRUNCATE TABLE " . gallery_bank_settings();
$wpdb->query($sql);
include GALLERY_BK_PLUGIN_DIR . "/lib/include_settings.php";
die;
} else {
if ($_REQUEST["param"] == "update_licensing_settings") {
$api_key = esc_attr($_REQUEST["ux_api_key"]);
$order_id = esc_attr($_REQUEST["ux_order_id"]);
$wpdb->query($wpdb->prepare("UPDATE " . gallery_bank_licensing() . " SET api_key = %s, order_id = %s ", $api_key, $order_id));
update_option("gallery-bank-activation", $api_key);
die;
}
}
}
}
}
示例4: create_table_album_settings
function create_table_album_settings()
{
global $wpdb;
$sql = "CREATE TABLE " . gallery_bank_settings() . "(\r\n setting_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,\r\n setting_key VARCHAR(100) NOT NULL,\r\n setting_value TEXT NOT NULL,\r\n PRIMARY KEY (setting_id)\r\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
dbDelta($sql);
include GALLERY_BK_PLUGIN_DIR . "/lib/include_settings.php";
}
示例5: foreach
$settings["album_text_color"] = "#C0C0C0";
$settings["button_color"] = "#000000";
$settings["button_text_color"] = "#CCCCCC";
$settings["filters_color"] = "#2a83ed";
$settings["filters_text_color"] = "#ffffff";
$settings["album_seperator"] = "1";
$settings["back_button_font_family"] = "Verdana";
$settings["back_button_font_size"] = "12";
$settings["admin_full_control"] = "1";
$settings["admin_read_control"] = "1";
$settings["admin_write_control"] = "1";
$settings["editor_full_control"] = "0";
$settings["editor_read_control"] = "1";
$settings["editor_write_control"] = "0";
$settings["author_full_control"] = "0";
$settings["author_read_control"] = "1";
$settings["author_write_control"] = "0";
$settings["contributor_full_control"] = "0";
$settings["contributor_read_control"] = "1";
$settings["contributor_write_control"] = "0";
$settings["subscriber_full_control"] = "0";
$settings["subscriber_read_control"] = "1";
$settings["subscriber_write_control"] = "0";
$settings["language_direction"] = "inherit";
$settings["image_uploader"] = "1";
$settings["change_image_name"] = "1";
$settings["responsive_albums"] = "1";
$settings["url_to_redirect"] = "1";
foreach ($settings as $val => $innerKey) {
$wpdb->query($wpdb->prepare("INSERT INTO " . gallery_bank_settings() . " (setting_key, setting_value) VALUES(%s, %s)", $val, $innerKey));
}
示例6: gallery_bank_albums
<?php
global $wpdb, $current_user;
if (!is_user_logged_in()) {
return;
}
$sql = "DROP TABLE " . gallery_bank_albums();
$wpdb->query($sql);
$sql = "DROP TABLE " . gallery_bank_pics();
$wpdb->query($sql);
$sql = "DROP TABLE " . gallery_bank_settings();
$wpdb->query($sql);
$sql = "DROP TABLE " . gallery_bank_licensing();
$wpdb->query($sql);
delete_option("gallery-bank-pro-edition");
delete_option("gallery-bank-updation-check-url");
delete_option("gallery-bank-activation");
delete_option("allow_tracking_gb");