本文整理汇总了PHP中wd_bwg_version函数的典型用法代码示例。如果您正苦于以下问题:PHP wd_bwg_version函数的具体用法?PHP wd_bwg_version怎么用?PHP wd_bwg_version使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wd_bwg_version函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public function display()
{
$gallery_rows = $this->model->get_gallery_rows_data();
$album_rows = $this->model->get_album_rows_data();
$option_row = $this->model->get_option_row_data();
$theme_rows = $this->model->get_theme_rows_data();
$from_menu = isset($_GET['page']) && esc_html($_GET['page']) == 'BWGShortcode' ? TRUE : FALSE;
$shortcodes = $this->model->get_shortcode_data();
$shortcode_max_id = $this->model->get_shortcode_max_id();
$effects = array('none' => 'None', 'cubeH' => 'Cube Horizontal', 'cubeV' => 'Cube Vertical', 'fade' => 'Fade', 'sliceH' => 'Slice Horizontal', 'sliceV' => 'Slice Vertical', 'slideH' => 'Slide Horizontal', 'slideV' => 'Slide Vertical', 'scaleOut' => 'Scale Out', 'scaleIn' => 'Scale In', 'blockScale' => 'Block Scale', 'kaleidoscope' => 'Kaleidoscope', 'fan' => 'Fan', 'blindH' => 'Blind Horizontal', 'blindV' => 'Blind Vertical', 'random' => 'Random');
$watermark_fonts = array('arial' => 'Arial', 'Lucida grande' => 'Lucida grande', 'segoe ui' => 'Segoe ui', 'tahoma' => 'Tahoma', 'trebuchet ms' => 'Trebuchet ms', 'verdana' => 'Verdana', 'cursive' => 'Cursive', 'fantasy' => 'Fantasy', 'monospace' => 'Monospace', 'serif' => 'Serif');
if (!$from_menu) {
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Photo Gallery</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script language="javascript" type="text/javascript" src="<?php
echo site_url();
?>
/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
<script language="javascript" type="text/javascript" src="<?php
echo site_url();
?>
/wp-includes/js/tinymce/utils/mctabs.js"></script>
<script language="javascript" type="text/javascript" src="<?php
echo site_url();
?>
/wp-includes/js/tinymce/utils/form_utils.js"></script>
<?php
wp_print_scripts('jquery');
}
wp_print_scripts('jquery-ui-core');
wp_print_scripts('jquery-ui-widget');
wp_print_scripts('jquery-ui-position');
wp_print_scripts('jquery-ui-tooltip');
?>
<link rel="stylesheet" href="<?php
echo WD_BWG_URL . '/css/bwg_shortcode.css?ver=' . wd_bwg_version();
?>
">
<link rel="stylesheet" href="<?php
echo WD_BWG_URL . '/css/jquery-ui-1.10.3.custom.css';
?>
">
<script language="javascript" type="text/javascript" src="<?php
echo WD_BWG_URL . '/js/bwg_shortcode.js?ver=' . wd_bwg_version();
?>
"></script>
<script language="javascript" type="text/javascript" src="<?php
echo WD_BWG_URL . '/js/jscolor/jscolor.js?ver=' . wd_bwg_version();
?>
"></script>
<?php
if (!$from_menu) {
?>
<base target="_self">
</head>
<body id="link" onLoad="tinyMCEPopup.executeOnLoad('init();');document.body.style.display='';" dir="ltr" class="forceColors">
<?php
if (isset($_POST['tagtext'])) {
echo '<script>tinyMCEPopup.close();</script></body></html>';
die;
}
?>
<form method="post" action="#" id="bwg_shortcode_form">
<?php
wp_nonce_field('BWGShortcode', 'bwg_nonce');
?>
<div class="tabs" role="tablist" tabindex="-1">
<ul>
<li id="display_tab" class="current" role="tab" tabindex="0">
<span>
<a href="javascript:mcTabs.displayTab('display_tab','display_panel');" onMouseDown="return false;" tabindex="-1">Display</a>
</span>
</li>
</ul>
</div>
<div class="panel_wrapper">
<div id="display_panel" class="panel current">
<?php
} else {
?>
<form method="post" action="#" id="bwg_shortcode_form">
<?php
wp_nonce_field('BWGShortcode', 'bwg_nonce');
?>
<div id="display_panel" style="width: 99%; margin-top: 30px;">
<?php
}
?>
<div style="text-align:center; height:100px;">
<span class="gallery_type" onClick="bwg_gallery_type('thumbnails')">
<div style="text-align: center;"><input type="radio" id="thumbnails" name="gallery_type" value="thumbnails" /><label for="thumbnails">Thumbnails</label></div>
<label for="thumbnails"><img src="<?php
echo WD_BWG_URL . '/images/thumbnails.jpg';
?>
" /></label>
</span>
<span title="This view is disabled in free version." class="gallery_type">
//.........这里部分代码省略.........
示例2: display
public function display()
{
global $WD_BWG_UPLOAD_DIR;
$popup_width = (int) (isset($_GET['width']) ? esc_html($_GET['width']) : '800') - 30;
$image_width = $popup_width - 40;
$popup_height = (int) (isset($_GET['height']) ? esc_html($_GET['height']) : '500') - 50;
$image_height = $popup_height - 40;
$image_id = isset($_GET['image_id']) ? esc_html($_GET['image_id']) : '0';
?>
<div style="display:table; width:100%; height:<?php
echo $popup_height;
?>
px;">
<div id='bwg_container_for_media_1' style="display:table-cell; text-align:center; vertical-align:middle;">
<img id="image_display" src="" style="max-width:<?php
echo $image_width;
?>
px; max-height:<?php
echo $image_height;
?>
px;"/>
</div>
</div>
<script language="javascript" type="text/javascript" src="<?php
echo WD_BWG_URL . '/js/bwg_embed.js?ver=' . wd_bwg_version();
?>
"></script>
<script>
var file_type = window.parent.document.getElementById("input_filetype_<?php
echo $image_id;
?>
").value;
var is_embed = file_type.indexOf("EMBED_") > -1 ? true : false;
var is_instagram_post = file_type.indexOf("INSTAGRAM_POST") > -1 ? true : false;
if (!is_embed) {
var image_url = "<?php
echo site_url() . '/' . $WD_BWG_UPLOAD_DIR;
?>
" + window.parent.document.getElementById("image_url_<?php
echo $image_id;
?>
").value;
window.document.getElementById("image_display").src = image_url + "?date=<?php
echo date('Y-m-y H:i:s');
?>
";
}
else if(is_embed){
var embed_id = window.parent.document.getElementById("input_filename_<?php
echo $image_id;
?>
").value;
window.document.getElementById("image_display").setAttribute('style', 'display: none;');
if(!is_instagram_post){
window.document.getElementById("bwg_container_for_media_1").innerHTML = spider_display_embed(file_type, embed_id, {class:"embed_display", width:"<?php
echo $image_width;
?>
", height:"<?php
echo $image_height;
?>
", frameborder:"0", allowfullscreen:"allowfullscreen", style:"width:<?php
echo $image_width;
?>
px; height:<?php
echo $image_height;
?>
px; vertical-align:middle; text-align: center; margin: 0 auto;" });
}
else{
window.document.getElementById("bwg_container_for_media_1").innerHTML = spider_display_embed(file_type, embed_id, {class:"embed_display", width:"<?php
echo $image_height - 88;
?>
", height:"<?php
echo $image_height;
?>
", frameborder:"0", allowfullscreen:"allowfullscreen", style:"width:<?php
echo $image_height - 88;
?>
px; height:<?php
echo $image_height;
?>
px; vertical-align:middle; text-align: center; margin: 0 auto;" });
}
}
</script>
<?php
die;
}
示例3: bwg_front_end_scripts
function bwg_front_end_scripts()
{
$version = wd_bwg_version();
global $wp_scripts;
if (isset($wp_scripts->registered['jquery'])) {
$jquery = $wp_scripts->registered['jquery'];
if (!isset($jquery->ver) or version_compare($jquery->ver, '1.8.2', '<')) {
wp_deregister_script('jquery');
wp_register_script('jquery', FALSE, array('jquery-core', 'jquery-migrate'), '1.10.2');
}
}
wp_enqueue_script('jquery');
/*wp_enqueue_style('jquery-ui', WD_BWG_FRONT_URL . '/css/jquery-ui-1.10.3.custom.css', array(), $version);*/
wp_enqueue_script('bwg_frontend', WD_BWG_FRONT_URL . '/js/bwg_frontend.js', array(), $version);
wp_enqueue_style('bwg_frontend', WD_BWG_FRONT_URL . '/css/bwg_frontend.css', array(), $version);
wp_enqueue_script('bwg_sumoselect', WD_BWG_FRONT_URL . '/js/jquery.sumoselect.min.js', array(), $version);
wp_enqueue_style('bwg_sumoselect', WD_BWG_FRONT_URL . '/css/sumoselect.css', array(), $version);
// Styles/Scripts for popup.
wp_enqueue_style('bwg_font-awesome', WD_BWG_FRONT_URL . '/css/font-awesome/font-awesome.css', array(), '4.6.3');
wp_enqueue_script('bwg_jquery_mobile', WD_BWG_FRONT_URL . '/js/jquery.mobile.js', array(), $version);
wp_enqueue_script('bwg_mCustomScrollbar', WD_BWG_FRONT_URL . '/js/jquery.mCustomScrollbar.concat.min.js', array(), $version);
wp_enqueue_style('bwg_mCustomScrollbar', WD_BWG_FRONT_URL . '/css/jquery.mCustomScrollbar.css', array(), $version);
wp_enqueue_script('jquery-fullscreen', WD_BWG_FRONT_URL . '/js/jquery.fullscreen-0.4.1.js', array(), '0.4.1');
wp_enqueue_script('bwg_gallery_box', WD_BWG_FRONT_URL . '/js/bwg_gallery_box.js', array(), $version);
wp_localize_script('bwg_gallery_box', 'bwg_objectL10n', array('bwg_field_required' => __('field is required.', 'bwg'), 'bwg_mail_validation' => __('This is not a valid email address.', 'bwg'), 'bwg_search_result' => __('There are no images matching your search.', 'bwg')));
wp_localize_script('bwg_sumoselect', 'bwg_objectsL10n', array('bwg_select_tag' => __('Select Tag.', 'bwg')));
}
示例4: display
//.........这里部分代码省略.........
</span>
<span class="bwg_popup_image_second_spun">
</span>
<input type="hidden" id="bwg_current_image_key" value="<?php
echo $key;
?>
" />
<?php
break;
}
}
?>
</div>
</div>
</div>
<a id="spider_popup_left" <?php
echo $option_row->enable_loop == 0 && $current_key == 0 ? 'style="display: none;"' : '';
?>
><span id="spider_popup_left-ico"><span><i class="bwg_prev_btn fa <?php
echo $theme_row->lightbox_rl_btn_style;
?>
-left"></i></span></span></a>
<a id="spider_popup_right" <?php
echo $option_row->enable_loop == 0 && $current_key == count($image_rows) - 1 ? 'style="display: none;"' : '';
?>
><span id="spider_popup_right-ico"><span><i class="bwg_next_btn fa <?php
echo $theme_row->lightbox_rl_btn_style;
?>
-right"></i></span></span></a>
</div>
</div>
<a class="spider_popup_close" onclick="spider_destroypopup(1000); return false;" ontouchend="spider_destroypopup(1000); return false;"><span><i class="bwg_close_btn fa fa-times"></i></span></a>
<script language="javascript" type="text/javascript" src="<?php
echo WD_BWG_URL . '/js/bwg_embed.js?ver=' . wd_bwg_version();
?>
"></script>
<script>
var bwg_trans_in_progress = false;
var bwg_transition_duration = <?php
echo $slideshow_interval < 4 && $slideshow_interval != 0 ? $slideshow_interval * 1000 / 4 : $slideshow_effect_duration * 1000;
?>
;
var bwg_playInterval;
if ((jQuery("#spider_popup_wrap").width() >= jQuery(window).width()) || (jQuery("#spider_popup_wrap").height() >= jQuery(window).height())) {
jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
}
/* Stop autoplay.*/
window.clearInterval(bwg_playInterval);
/* Set watermark container size.*/
function bwg_change_watermark_container() {
jQuery(".bwg_slider").children().each(function() {
if (jQuery(this).css("zIndex") == 2) {
/* This may be neither img nor iframe.*/
var bwg_current_image_span = jQuery(this).find("img");
if (!bwg_current_image_span.length) {
bwg_current_image_span = jQuery(this).find("iframe");
}
if (!bwg_current_image_span.length) {
bwg_current_image_span = jQuery(this).find("video");
}
/*set timeout for video to get size according to style, and then put watermark*/
setTimeout(function () {
var width = bwg_current_image_span.width();
var height = bwg_current_image_span.height();
示例5: display
//.........这里部分代码省略.........
";
var dirUrl = "<?php
echo $this->controller->get_uploads_url() . (isset($_REQUEST['dir']) ? esc_html($_REQUEST['dir']) . '/' : '');
?>
";
var callback = "<?php
echo isset($_REQUEST['callback']) ? esc_html($_REQUEST['callback']) : '';
?>
";
var sortBy = "<?php
echo $sort_by;
?>
";
var sortOrder = "<?php
echo $sort_order;
?>
";
jQuery(document).ready(function () {
jQuery("#search_by_name .search_by_name").on("input keyup", function() {
var search_by_name = jQuery(this).val();
jQuery("#explorer_body .explorer_item").each(function() {
jQuery(this).hide();
if (jQuery(this).find(".item_name").html().trim().toLowerCase().indexOf(search_by_name) !== -1) {
jQuery(this).show();
}
});
});
});
</script>
<script src="<?php
echo WD_BWG_URL;
?>
/filemanager/js/default.js?ver=<?php
echo wd_bwg_version();
?>
"></script>
<link href="<?php
echo WD_BWG_URL;
?>
/filemanager/css/default.css?ver=<?php
echo wd_bwg_version();
?>
" type="text/css" rel="stylesheet">
<?php
switch ($items_view) {
case 'list':
?>
<link href="<?php
echo WD_BWG_URL;
?>
/filemanager/css/default_view_list.css?ver=<?php
echo wd_bwg_version();
?>
" type="text/css" rel="stylesheet">
<?php
break;
case 'thumbs':
?>
<link href="<?php
echo WD_BWG_URL;
?>
/filemanager/css/default_view_thumbs.css?ver=<?php
echo wd_bwg_version();
?>
" type="text/css" rel="stylesheet">
<?php
示例6: display
public function display()
{
$rows_data = $this->model->get_rows_data();
$page_nav = $this->model->page_nav();
$search_value = isset($_POST['search_value']) ? esc_html(stripslashes($_POST['search_value'])) : '';
$asc_or_desc = isset($_POST['asc_or_desc']) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc';
$order_by = isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name';
$image_id = isset($_GET['image_id']) ? esc_html($_GET['image_id']) : (isset($_POST['image_id']) ? esc_html($_POST['image_id']) : '0');
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
$per_page = $this->model->per_page();
$pager = 0;
wp_print_scripts('jquery');
wp_print_styles('admin-bar');
wp_print_styles('wp-admin');
wp_print_styles('dashicons');
wp_print_styles('buttons');
wp_print_styles('wp-auth-check');
if (get_bloginfo('version') < '3.9') {
?>
<link media="all" type="text/css" href="<?php
echo get_admin_url();
?>
css/colors<?php
echo get_bloginfo('version') < '3.8' ? '-fresh' : '';
?>
.min.css" id="colors-css" rel="stylesheet">
<?php
}
?>
<link media="all" type="text/css" href="<?php
echo WD_BWG_URL . '/css/bwg_tables.css?ver=' . wd_bwg_version();
?>
" id="bwg_tables-css" rel="stylesheet">
<script src="<?php
echo WD_BWG_URL . '/js/bwg.js?ver=' . wd_bwg_version();
?>
" type="text/javascript"></script>
<form class="wrap wp-core-ui bwg_form" id="tags_form" method="post" action="<?php
echo add_query_arg(array('action' => 'addTags', 'width' => '650', 'height' => '500', 'bwg_items_per_page' => $per_page, 'TB_iframe' => '1'), admin_url('admin-ajax.php'));
?>
" style="width:99%; margin: 0 auto;">
<?php
wp_nonce_field('addTags', 'bwg_nonce');
?>
<h2 style="width:200px; float:left;"><?php
_e("Tags", 'bwg_back');
?>
</h2>
<a href="" class="thickbox thickbox-preview" id="content-add_media" title="Add Tag" onclick="bwg_get_tags('<?php
echo $image_id;
?>
', event);" style="float:right; padding: 9px 0px 4px 0">
<div class="wd-btn wd-btn-primary wd-btn-icon wd-btn-add" style="border:none;padding-top:8px !important;">ADD </div>
</a>
<div class="tablenav top">
<?php
WDWLibrary::search(__('Name', 'bwg_back'), $search_value, 'tags_form', 'position_search');
WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page);
?>
</div>
<table class="wp-list-table widefat fixed pages">
<thead>
<th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;" /></th>
<th class="sortable table_small_col <?php
if ($order_by == 'term_id') {
echo $order_class;
}
?>
" style="padding-left:15px">
<a onclick="spider_set_input_value('order_by', 'term_id');
spider_set_input_value('asc_or_desc', '<?php
echo isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) == 'term_id' && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc' ? 'desc' : 'asc';
?>
');
spider_form_submit(event, 'tags_form')" href="">
<span>ID</span><span class="sorting-indicator"></span></th>
</a>
<th class="sortable <?php
if ($order_by == 'name') {
echo $order_class;
}
?>
">
<a onclick="spider_set_input_value('order_by', 'name');
spider_set_input_value('asc_or_desc', '<?php
echo isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) == 'name' && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc' ? 'desc' : 'asc';
?>
');
spider_form_submit(event, 'tags_form')" href="">
<span><?php
_e("Name", 'bwg_back');
?>
</span><span class="sorting-indicator"></span>
</a>
</th>
<th class="sortable <?php
if ($order_by == 'slug') {
echo $order_class;
}
?>
//.........这里部分代码省略.........
示例7: display
public function display()
{
$album_id = isset($_GET['album_id']) ? esc_html(stripslashes($_GET['album_id'])) : (isset($_POST['album_id']) ? esc_html(stripslashes($_POST['album_id'])) : '');
$rows_data = $this->model->get_rows_data($album_id);
$page_nav = $this->model->page_nav($album_id);
$search_value = isset($_POST['search_value']) ? esc_html(stripslashes($_POST['search_value'])) : '';
$asc_or_desc = isset($_POST['asc_or_desc']) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc';
$order_by = isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name';
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
$per_page = $this->model->per_page();
$pager = 0;
wp_print_scripts('jquery');
wp_print_scripts('wp-pointer');
wp_print_styles('admin-bar');
wp_print_styles('dashicons');
wp_print_styles('wp-admin');
wp_print_styles('buttons');
wp_print_styles('wp-auth-check');
wp_print_styles('wp-pointer');
if (get_bloginfo('version') < '3.9') {
?>
<link media="all" type="text/css" href="<?php
echo get_admin_url();
?>
css/colors<?php
echo get_bloginfo('version') < '3.8' ? '-fresh' : '';
?>
.min.css" id="colors-css" rel="stylesheet">
<?php
}
?>
<link media="all" type="text/css" href="<?php
echo WD_BWG_URL . '/css/bwg_tables.css?ver=' . wd_bwg_version();
?>
" id="spider_audio_player_tables-css" rel="stylesheet">
<script src="<?php
echo WD_BWG_URL . '/js/bwg.js?ver=' . wd_bwg_version();
?>
" type="text/javascript"></script>
<form class="wrap wp-core-ui bwg_form" id="albums_galleries_form" method="post" action="<?php
echo add_query_arg(array('action' => 'addAlbumsGalleries', 'width' => '700', 'height' => '550', 'callback' => 'bwg_add_items', 'bwg_items_per_page' => $per_page, 'TB_iframe' => '1'), admin_url('admin-ajax.php'));
?>
" style="width:95%; margin: 0 auto;">
<?php
wp_nonce_field('addAlbumsGalleries', 'bwg_nonce');
?>
<h2 style="width:200px;float:left"><?php
_e("Albums/Galleries", 'bwg_back');
?>
</h2>
<a href="" class="thickbox thickbox-preview" id="content-add_media" title="Add Album/Gallery" onclick="spider_get_items(event);" style="float:right; padding: 9px 0px 4px 0">
<img id='add_albums' src="<?php
echo WD_BWG_URL . '/images/add_but.png';
?>
" style="border:none;" />
</a>
<div class="tablenav top">
<?php
WDWLibrary::search(__("Name", 'bwg_back'), $search_value, 'albums_galleries_form');
WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'albums_galleries_form', $per_page);
?>
</div>
<table class="wp-list-table widefat fixed pages">
<thead>
<th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;" /></th>
<th class="table_small_col <?php
if ($order_by == 'id') {
echo $order_class;
}
?>
">
<a onclick="spider_set_input_value('order_by', 'id');
spider_set_input_value('asc_or_desc', '<?php
echo isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) == 'id' && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc' ? 'desc' : 'asc';
?>
');
spider_form_submit(event, 'albums_galleries_form')" href="">
<span>ID</span><span class="sorting-indicator"></span>
</a>
</th>
<th class="table_medium_col_uncenter <?php
if ($order_by == 'is_album') {
echo $order_class;
}
?>
">
<a onclick="spider_set_input_value('task', '');
spider_set_input_value('order_by', 'is_album');
spider_set_input_value('asc_or_desc', '<?php
echo isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) == 'is_album' && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc' ? 'desc' : 'asc';
?>
');
spider_form_submit(event, 'albums_galleries_form')" href="">
<span><?php
_e("Type", 'bwg_back');
?>
</span><span class="sorting-indicator"></span>
</a>
</th>
<th class="<?php
//.........这里部分代码省略.........
示例8: form
function form($instance, $id_title, $name_title, $id_type, $name_type, $id_show_name, $name_show_name, $id_open_option, $name_open_option, $id_count, $name_count, $id_width, $name_width, $id_height, $name_height, $id_background_transparent, $name_background_transparent, $id_background_color, $name_background_color, $id_text_color, $name_text_color, $id_theme_id, $name_theme_id)
{
$defaults = array('title' => 'Photo Gallery Tags Cloud', 'type' => 'text', 'show_name' => 0, 'open_option' => 'page', 'count' => 0, 'width' => 250, 'height' => 250, 'background_transparent' => 1, 'background_color' => '000000', 'text_color' => 'ffffff', 'theme_id' => 0);
$instance = wp_parse_args((array) $instance, $defaults);
$theme_rows = $this->model->get_theme_rows_data();
?>
<script>
function bwg_change_type_tag(event, obj) {
var div = jQuery(obj).closest("div");
if(jQuery(jQuery(div).find(".sel_image")[0]).prop("checked")) {
jQuery(jQuery(div).find("#p_show_name")).css("display", "");
jQuery(obj).nextAll(".bwg_hidden").first().attr("value", "image");
}
else {
jQuery(jQuery(div).find("#p_show_name")).css("display", "none");
jQuery(obj).nextAll(".bwg_hidden").first().attr("value", "text");
}
}
function bwg_change_bg_transparency(event, obj) {
var div = jQuery(obj).closest("div");
if(jQuery(jQuery(div).find(".bg_transparent")[0]).prop("checked")) {
jQuery(jQuery(div).find("#p_bg_color")).css("display", "none");
jQuery(obj).nextAll(".bwg_hidden").first().attr("value", "1");
}
else {
jQuery(jQuery(div).find("#p_bg_color")).css("display", "");
jQuery(obj).nextAll(".bwg_hidden").first().attr("value", "0");
}
}
</script>
<script src="<?php
echo WD_BWG_URL . '/js/jscolor/jscolor.js?ver=' . wd_bwg_version();
?>
" type="text/javascript" charset="utf-8"></script>
<p>
<label for="<?php
echo $id_title;
?>
">Title:</label>
<input class="widefat" id="<?php
echo $id_title;
?>
" name="<?php
echo $name_title;
?>
'" type="text" value="<?php
echo $instance['title'];
?>
"/>
</p>
<p>
<input type="radio" name="<?php
echo $name_type;
?>
" id="<?php
echo $id_type . "_1";
?>
" value="text" class="sel_text" <?php
if ($instance['type'] == "text") {
echo 'checked="checked"';
}
?>
onclick="bwg_change_type_tag(event, this)" /><label for="<?php
echo $id_type . "_1";
?>
">Text</label>
<input type="radio" name="<?php
echo $name_type;
?>
" id="<?php
echo $id_type . "_2";
?>
" value="image" class="sel_image" <?php
if ($instance['type'] == "image") {
echo 'checked="checked"';
}
?>
onclick="bwg_change_type_tag(event, this)" /><label for="<?php
echo $id_type . "_2";
?>
">Image</label>
<input type="hidden" name="<?php
echo $name_type;
?>
" id="<?php
echo $id_type;
?>
" value="<?php
echo $instance['type'];
?>
" class="bwg_hidden" />
</p>
<p id="p_show_name" style="display:<?php
echo $instance['type'] == 'image' ? "" : "none";
?>
;">
<label>Show Tag Names:</label>
<input type="radio" name="<?php
echo $name_show_name;
//.........这里部分代码省略.........