@@ -864,11 +864,11 @@ class auto_thickbox_options {
function about_metabox() {
?>
option_group, ATBP_SLUG, array(&$this, 'options_callback') );
+ register_setting( $this->option_group, 'auto-thickbox-plus', array(&$this, 'options_callback') );
}
var $checkboxes_on = array('wp_gallery', 'thickbox_text', 'auto_resize',
diff --git a/auto-thickbox-utils.php b/auto-thickbox-utils.php
index 957c0fc..c440a28 100644
--- a/auto-thickbox-utils.php
+++ b/auto-thickbox-utils.php
@@ -76,7 +76,7 @@ function checked( $checked, $current = true, $echo = true ) {
// @note '$plugin' is defined since WordPress 2.8
function plugins_url( $path, $plugin = '' ) {
if (!$plugin) $plugin = __FILE__;
- return version_compare('2.8', get_bloginfo('version')) > 0 ? plugins_url( ATBP_SLUG . '/' . $path ) : plugins_url( $path, $plugin );
+ return version_compare('2.8', get_bloginfo('version')) > 0 ? plugins_url( 'auto-thickbox-plus/' . $path ) : plugins_url( $path, $plugin );
}
} # auto_thickbox_options
diff --git a/auto-thickbox.php b/auto-thickbox.php
index fb22ba3..7ea7518 100644
--- a/auto-thickbox.php
+++ b/auto-thickbox.php
@@ -32,9 +32,7 @@ Domain Path: /languages
http://www.semiologic.com/software/auto-thickbox/
*/
-define('ATBP_NAME', 'Auto ThickBox Plus');
-define('ATBP_SLUG', 'auto-thickbox-plus');
-define('ATBP_VER', '1.7');
+define('AUTO_THICKBOX_PLUS_VER', '1.7');
/**
* auto_thickbox
@@ -134,7 +132,7 @@ class auto_thickbox {
if ( $this->options['builtin_res'] == 'off' ) {
wp_deregister_script('thickbox');
$in_footer = $this->options['script_place'] == 'footer';
- wp_register_script('thickbox', $this->util->plugins_url(WP_DEBUG ? 'thickbox.js' :'thickbox.min.js'), array('jquery'), ATBP_VER, $in_footer);
+ wp_register_script('thickbox', $this->util->plugins_url(WP_DEBUG ? 'thickbox.js' :'thickbox.min.js'), array('jquery'), AUTO_THICKBOX_PLUS_VER, $in_footer);
}
wp_enqueue_script('thickbox');
if ( $this->options['builtin_res'] == 'off' ) {
@@ -173,7 +171,7 @@ class auto_thickbox {
function styles() {
if ( $this->options['builtin_res'] == 'off' ) {
wp_deregister_style('thickbox');
- wp_register_style('thickbox', $this->util->plugins_url(WP_DEBUG ? 'thickbox.css' : 'thickbox.min.css'), false, ATBP_VER);
+ wp_register_style('thickbox', $this->util->plugins_url(WP_DEBUG ? 'thickbox.css' : 'thickbox.min.css'), false, AUTO_THICKBOX_PLUS_VER);
}
wp_enqueue_style('thickbox');
} # styles()
@@ -514,17 +512,17 @@ SCRIPT;
function add_auto_thickbox_action_links($links, $file) {
if ( $file == plugin_basename(__FILE__) )
- $links[] = '
' . $this->util->__('Settings') . '';
+ $links[] = '
' . $this->util->__('Settings') . '';
return $links;
}
// Additional links on the Plugins page
function add_auto_thickbox_links($links, $file) {
if ( $file == plugin_basename(__FILE__) ) {
- $links[] = '
' . $this->util->__('Show Details', 'Details') . '';
+ $links[] = '
' . $this->util->__('Show Details', 'Details') . '';
$links[] = '
' . $this->util->__('Support') . '';
$links[] = '
' . ucfirst($this->util->__('Contact', 'contact')) . '';
- $links[] = '
' . $this->util->__('Donate') . '';
+ $links[] = '
' . $this->util->__('Donate') . '';
}
return $links;
}
@@ -538,7 +536,7 @@ SCRIPT;
}
function __construct() {
- load_plugin_textdomain('auto-thickbox', false, ATBP_SLUG . '/languages');
+ load_plugin_textdomain('auto-thickbox', false, 'auto-thickbox-plus/languages');
if (require_once dirname(__FILE__) . '/auto-thickbox-utils.php')
$this->util = new auto_thickbox_utils();
@@ -664,7 +662,7 @@ SCRIPT;
'img_close_btn' => $this->util->plugins_url('images/tb-close.png'),
'img_load' => $this->util->plugins_url('images/loadingAnimation.gif')
);
- $this->options = get_option(ATBP_SLUG);
+ $this->options = get_option('auto-thickbox-plus');
$this->options = $this->options ? wp_parse_args($this->options, $this->options_def) : $this->options_def;
// XXX: transition code for v0.5 or earlier
@@ -743,13 +741,13 @@ SCRIPT;
if ($this->is_default_options('post_id')) {
$args = array(
'post_status' => 'draft',
- 'post_type' => ATBP_SLUG
+ 'post_type' => 'auto-thickbox-plus'
);
$posts = get_posts($args);
if (count($posts))
$this->options['post_id'] = $posts[0]->ID;
else {
- $args['post_title'] = ATBP_NAME;
+ $args['post_title'] = 'Auto ThickBox Plus';
$this->options['post_id'] = wp_insert_post($args);
}
$updateOption = true;
@@ -767,7 +765,7 @@ SCRIPT;
}
if ($updateOption)
- update_option(ATBP_SLUG, $this->options);
+ update_option('auto-thickbox-plus', $this->options);
}
function init_texts() {
@@ -781,10 +779,6 @@ SCRIPT;
$this->texts['of'] = '/';
$this->texts['close'] = ucfirst($this->util->__('Close', 'close'));
- $full_colon = html_entity_decode(':', ENT_NOQUOTES, 'UTF-8');
- $this->texts['options'] = $this->util->__('Options', 'Options:', 'Settings');
- $this->texts['options'] = ATBP_NAME . ' ' . str_replace(array(':', $full_colon), '', $this->texts['options']);
-
$this->texts['first2'] = empty($this->options['text_first']) ? 'First' : ucfirst($this->options['text_first']);
$this->texts['first'] = '« ' . $this->texts['first2'];
$this->texts['last2'] = empty($this->options['text_last']) ? 'Last' : ucfirst($this->options['text_last']);
diff --git a/readme.txt b/readme.txt
index 1ceec7e..64e4fab 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,6 +1,6 @@
=== Auto ThickBox Plus ===
Contributors: attosoft
-Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=D2DLJNSUFBU4U
+Donate link: http://attosoft.info/en/donate/
Tags: lightbox, thickbox, shadowbox, gallery, semiologic, image, images, thumbnail, thumbnails, popup, pop-up, overlay, photo, photos, picture, pictures, javascript, simple, inline, iframe, ajax, jquery, plugin, plugins, link, links, widget, widgets, nextgen, nextgen gallery
Requires at least: 2.7
Tested up to: 3.4.1
@@ -73,9 +73,9 @@ Any comments will be very helpful and appreciated. Thank you for your support!
= Links =
-* [attosoft.info](http://attosoft.info/en/) \[[日本語](http://attosoft.info/)\]
-* [Auto ThickBox Plus Official Site](http://attosoft.info/en/blog/auto-thickbox-plus/) \[[日本語](http://attosoft.info/blog/auto-thickbox-plus/)\]
-* [Auto Thickbox](http://www.semiologic.com/software/auto-thickbox/) (Original)
+* [attosoft.info](http://attosoft.info/en/)
+* [Auto ThickBox Plus](http://attosoft.info/en/blog/auto-thickbox-plus/)
+* [Auto Thickbox](http://www.semiologic.com/software/auto-thickbox/)
* [ThickBox 3.1](http://thickbox.net/) (JavaScript Library)
== Installation ==
@@ -208,7 +208,7 @@ Yes, the improved ThickBox included in this plugins is also available in another
Most plugins supported for ThickBox such as NextGEN Gallery use **built-in ThickBox** in WordPress. Auto ThickBox Plus can replace built-in ThickBox with **the improved version** with some extra features and bug fixes. See also "Extra Features" in [Description](../).
-= How to access Auto ThickBox Plus Options =
+= Where is Auto ThickBox Plus Settings screen? =
1. Access Dashboard screen in WordPress
1. Click [Settings] - [Auto ThickBox Plus] in sidebar
@@ -269,7 +269,7 @@ You can localize the plugin with [Poedit](http://www.poedit.net/). All you do is
1. Pop-up image in "Single Image" style
1. Pop-up image in "Gallery Images" style (with "Prev/Next" links)
-1. Auto ThickBox Plus Options page
+1. Auto ThickBox Plus Settings screen
1. Customization example (pink background, transparent window, rounded corners, no borders, custom images, bold font, etc.)
== Changelog ==