Trivial changes on PHP files and readme.txt

* Maintained several links
 * Removed `ATBP_NAME` and `ATBP_SLUG` variables
 * Renamed `ATBP_VER` variable to `AUTO_THICKBOX_PLUS_VER`
 * Changed Settings page title from "Options" to "Settings"
This commit is contained in:
attosoft committed 2012-09-23 17:28:33 +00:00
1 parent ac118febc7
commit 51100b8c25
4 files changed
+26 -32

No files matched your search

+8 -8
View File
@@ -10,7 +10,7 @@ class auto_thickbox_options {
// Auto ThickBox Plus Options
function register_options_page() {
add_options_page($this->texts['options'], ATBP_NAME, 'manage_options', ATBP_SLUG, array(&$this, 'options_page'));
add_options_page('Auto ThickBox Plus ' . $this->util->__('Settings'), 'Auto ThickBox Plus', 'manage_options', 'auto-thickbox-plus', array(&$this, 'options_page'));
add_meta_box( 'general-box', $this->util->__('General'), array(&$this, 'general_metabox'), $this->settings_page_type, 'normal' );
add_meta_box( 'action-box', $this->util->__('Action', 'Actions'), array(&$this, 'action_metabox'), $this->settings_page_type, 'normal' );
add_meta_box( 'view-box', ucfirst($this->util->__('View', 'view')), array(&$this, 'view_metabox'), $this->settings_page_type, 'normal' );
@@ -20,7 +20,7 @@ class auto_thickbox_options {
add_meta_box( 'about-box', $this->util->__('About'), array(&$this, 'about_metabox'), $this->settings_page_type, 'normal' );
if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'post_id=' . $this->options['post_id']) !== false) {
add_filter('gettext', array(&$this, 'replace_insert_button'), 20, 3);
register_post_type(ATBP_SLUG, array('label' => ATBP_NAME));
register_post_type('auto-thickbox-plus', array('label' => 'Auto ThickBox Plus'));
}
}
@@ -32,18 +32,18 @@ class auto_thickbox_options {
$this->has_slider = function_exists('wp_script_is') && wp_script_is('jquery-ui-slider', 'registered');
$deps = array('postbox', 'farbtastic', 'media-upload');
if ($this->has_slider) $deps[] = 'jquery-ui-slider';
wp_enqueue_script('auto-thickbox', $this->util->plugins_url('auto-thickbox.js'), $deps, ATBP_VER, true);
wp_enqueue_script('auto-thickbox', $this->util->plugins_url('auto-thickbox.js'), $deps, AUTO_THICKBOX_PLUS_VER, true);
}
function register_styles() {
wp_enqueue_style('auto-thickbox', $this->util->plugins_url('auto-thickbox.css'), array('farbtastic', 'thickbox'), ATBP_VER);
wp_enqueue_style('auto-thickbox', $this->util->plugins_url('auto-thickbox.css'), array('farbtastic', 'thickbox'), AUTO_THICKBOX_PLUS_VER);
}
function options_page() {
?>
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php echo $this->texts['options']; ?></h2>
<h2>Auto ThickBox Plus <?php $this->util->_e('Settings'); ?></h2>
<form method="post" action="options.php" name="form" novalidate>
<?php settings_fields( $this->option_group ); ?>
<div id="poststuff" class="metabox-holder">
@@ -864,11 +864,11 @@ class auto_thickbox_options {
function about_metabox() {
?>
<ul class="about">
<li class="wp"><a href="http://attosoft.info/en/blog/auto-thickbox-plus/" target="_blank"><?php $this->util->_e('Visit plugin site', 'Visit plugin homepage'); ?></a></li>
<li class="wp"><a href="<?php $this->util->_e('http://attosoft.info/en/'); ?>blog/auto-thickbox-plus/" target="_blank"><?php $this->util->_e('Visit plugin site', 'Visit plugin homepage'); ?></a></li>
<li class="star"><a href="http://wordpress.org/extend/plugins/auto-thickbox-plus/" target="_blank"><?php $this->util->_e('Put rating stars or vote compatibility (works/broken)'); ?></a></li>
<li class="forum"><a href="http://wordpress.org/support/plugin/auto-thickbox-plus" target="_blank"><?php $this->util->_e('View support forum or post a new topic'); ?></a></li>
<li class="l10n"><a href="http://wordpress.org/extend/plugins/auto-thickbox-plus/other_notes/#Localization" target="_blank"><?php $this->util->_e('Translate the plugin into your language'); ?></a></li>
<li class="donate"><a href="<?php $this->util->_e('https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=D2DLJNSUFBU4U'); ?>" target="_blank"><?php $this->util->_e('Donate to support plugin development'); ?></a></li>
<li class="donate"><a href="<?php $this->util->_e('http://attosoft.info/en/'); ?>donate/" target="_blank"><?php $this->util->_e('Donate to support plugin development'); ?></a></li>
<li class="contact"><a href="<?php $this->util->_e('http://attosoft.info/en/'); ?>contact/" target="_blank"><?php $this->util->_e('Contact me if you have any feedback'); ?></a></li>
</ul>
<?php
@@ -898,7 +898,7 @@ class auto_thickbox_options {
}
function register_options() {
register_setting( $this->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',
+1 -1
View File
@@ -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
+11 -17
View File
@@ -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[] = '<a href="options-general.php?page=' . ATBP_SLUG . '">' . $this->util->__('Settings') . '</a>';
$links[] = '<a href="options-general.php?page=auto-thickbox-plus">' . $this->util->__('Settings') . '</a>';
return $links;
}
// Additional links on the Plugins page
function add_auto_thickbox_links($links, $file) {
if ( $file == plugin_basename(__FILE__) ) {
$links[] = '<a href="plugin-install.php?tab=plugin-information&plugin=' . ATBP_SLUG . '&TB_iframe" class="thickbox" title="' . ATBP_NAME . '">' . $this->util->__('Show Details', 'Details') . '</a>';
$links[] = '<a href="plugin-install.php?tab=plugin-information&plugin=auto-thickbox-plus&TB_iframe" class="thickbox" title="Auto ThickBox Plus">' . $this->util->__('Show Details', 'Details') . '</a>';
$links[] = '<a href="http://wordpress.org/support/plugin/auto-thickbox-plus" target="_blank">' . $this->util->__('Support') . '</a>';
$links[] = '<a href="' . $this->util->__('http://attosoft.info/en/') . 'contact/" target="_blank">' . ucfirst($this->util->__('Contact', 'contact')) . '</a>';
$links[] = '<a href="' . $this->util->__('https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=D2DLJNSUFBU4U') . '" target="_blank">' . $this->util->__('Donate') . '</a>';
$links[] = '<a href="' . $this->util->__('http://attosoft.info/en/') . 'donate/" target="_blank">' . $this->util->__('Donate') . '</a>';
}
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('&#xFF1A;', 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'] = '&laquo; ' . $this->texts['first2'];
$this->texts['last2'] = empty($this->options['text_last']) ? 'Last' : ucfirst($this->options['text_last']);
+6 -6
View File
@@ -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 ==