Version Description
- fixed to WordPress 3.2
Download this release
Release Info
Developer | miyauchi |
Plugin | WP Total Hacks |
Version | 0.4.0 |
Comparing to | |
See all releases |
Code changes from version 0.3.0 to 0.4.0
- includes/wpbiz_admin.php +19 -3
- js/wp-biz.js +8 -2
- readme.txt +5 -2
- wp-total-hacks.php +1 -1
includes/wpbiz_admin.php
CHANGED
@@ -170,6 +170,16 @@ function __construct($url)
|
|
170 |
add_filter('gettext', array(&$this, 'replace_text_in_thickbox'), 1, 3);
|
171 |
}
|
172 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
public function admin_styles() {
|
174 |
$style = $this->plugin_url.'/css/style.css';
|
175 |
printf(
|
@@ -184,6 +194,7 @@ public function admin_styles() {
|
|
184 |
}
|
185 |
|
186 |
public function admin_scripts() {
|
|
|
187 |
wp_enqueue_script('jquery-ui-tabs');
|
188 |
wp_enqueue_script('editor');
|
189 |
add_thickbox();
|
@@ -193,7 +204,9 @@ public function admin_scripts() {
|
|
193 |
array('thickbox')
|
194 |
);
|
195 |
wp_enqueue_script('wfb-upload');
|
196 |
-
|
|
|
|
|
197 |
}
|
198 |
|
199 |
public function admin_menu()
|
@@ -205,7 +218,6 @@ public function admin_menu()
|
|
205 |
'wp-biz',
|
206 |
array(&$this, 'options')
|
207 |
);
|
208 |
-
|
209 |
add_action("admin_head-".$hook, array(&$this, 'admin_head'));
|
210 |
add_action('admin_print_scripts-'.$hook, array(&$this, 'admin_scripts'));
|
211 |
add_action('admin_print_styles-'.$hook, array(&$this, 'admin_styles'));
|
@@ -224,6 +236,7 @@ public function admin_head()
|
|
224 |
wp_admin_css();
|
225 |
do_action("admin_print_styles-post-php");
|
226 |
do_action('admin_print_styles');
|
|
|
227 |
}
|
228 |
|
229 |
public function replace_text_in_thickbox($translated_text, $source_text, $domain) {
|
@@ -344,7 +357,10 @@ public function options()
|
|
344 |
|
345 |
private function form()
|
346 |
{
|
347 |
-
|
|
|
|
|
|
|
348 |
$url = admin_url('options-general.php?page=wp-biz');
|
349 |
echo '<form method="post" action="'.$url.'">';
|
350 |
$nonce = wp_create_nonce(plugin_basename(__FILE__));
|
170 |
add_filter('gettext', array(&$this, 'replace_text_in_thickbox'), 1, 3);
|
171 |
}
|
172 |
|
173 |
+
public function tiny_mce_before_init($init)
|
174 |
+
{
|
175 |
+
$init['plugins'] = str_replace(
|
176 |
+
array('wpfullscreen',',,'),
|
177 |
+
array('', ','),
|
178 |
+
$init['plugins']
|
179 |
+
);
|
180 |
+
return $init;
|
181 |
+
}
|
182 |
+
|
183 |
public function admin_styles() {
|
184 |
$style = $this->plugin_url.'/css/style.css';
|
185 |
printf(
|
194 |
}
|
195 |
|
196 |
public function admin_scripts() {
|
197 |
+
global $wp_version;
|
198 |
wp_enqueue_script('jquery-ui-tabs');
|
199 |
wp_enqueue_script('editor');
|
200 |
add_thickbox();
|
204 |
array('thickbox')
|
205 |
);
|
206 |
wp_enqueue_script('wfb-upload');
|
207 |
+
if (version_compare($wp_version, '3.2', '<')) {
|
208 |
+
add_action('admin_print_footer_scripts', 'wp_tiny_mce_preload_dialogs', 30);
|
209 |
+
}
|
210 |
}
|
211 |
|
212 |
public function admin_menu()
|
218 |
'wp-biz',
|
219 |
array(&$this, 'options')
|
220 |
);
|
|
|
221 |
add_action("admin_head-".$hook, array(&$this, 'admin_head'));
|
222 |
add_action('admin_print_scripts-'.$hook, array(&$this, 'admin_scripts'));
|
223 |
add_action('admin_print_styles-'.$hook, array(&$this, 'admin_styles'));
|
236 |
wp_admin_css();
|
237 |
do_action("admin_print_styles-post-php");
|
238 |
do_action('admin_print_styles');
|
239 |
+
add_filter('tiny_mce_before_init', array(&$this, 'tiny_mce_before_init'), 999);
|
240 |
}
|
241 |
|
242 |
public function replace_text_in_thickbox($translated_text, $source_text, $domain) {
|
357 |
|
358 |
private function form()
|
359 |
{
|
360 |
+
global $wp_version;
|
361 |
+
if (version_compare($wp_version, '3.2', '<')) {
|
362 |
+
wp_tiny_mce(true);
|
363 |
+
}
|
364 |
$url = admin_url('options-general.php?page=wp-biz');
|
365 |
echo '<form method="post" action="'.$url.'">';
|
366 |
$nonce = wp_create_nonce(plugin_basename(__FILE__));
|
js/wp-biz.js
CHANGED
@@ -40,8 +40,14 @@ wpbiz.prototype.getStatus = function(o)
|
|
40 |
{
|
41 |
var flag = false;
|
42 |
jQuery('input[type="checkbox"]', o).each(function(){
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
}
|
46 |
});
|
47 |
jQuery('select', o).each(function(){
|
40 |
{
|
41 |
var flag = false;
|
42 |
jQuery('input[type="checkbox"]', o).each(function(){
|
43 |
+
try {
|
44 |
+
if (jQuery(this).prop('checked') == true) {
|
45 |
+
flag = true;
|
46 |
+
}
|
47 |
+
} catch(e) {
|
48 |
+
if (jQuery(this).attr('checked') == true) {
|
49 |
+
flag = true;
|
50 |
+
}
|
51 |
}
|
52 |
});
|
53 |
jQuery('select', o).each(function(){
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: miyauchi
|
|
3 |
Donate link: http://firegoby.theta.ne.jp/
|
4 |
Tags: head, post, page, functions.php, admin, logo, auto save, revision, meta box, dashboard
|
5 |
Requires at least: 3.1
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 0.
|
8 |
|
9 |
WP Total Hacks can customize more than 20 settings on your WordPress Site.
|
10 |
|
@@ -75,6 +75,9 @@ Please contact to me.
|
|
75 |
|
76 |
== Changelog ==
|
77 |
|
|
|
|
|
|
|
78 |
= 0.3.0 =
|
79 |
* Bug fix for admin UI
|
80 |
|
3 |
Donate link: http://firegoby.theta.ne.jp/
|
4 |
Tags: head, post, page, functions.php, admin, logo, auto save, revision, meta box, dashboard
|
5 |
Requires at least: 3.1
|
6 |
+
Tested up to: 3.2
|
7 |
+
Stable tag: 0.4.0
|
8 |
|
9 |
WP Total Hacks can customize more than 20 settings on your WordPress Site.
|
10 |
|
75 |
|
76 |
== Changelog ==
|
77 |
|
78 |
+
= 0.4.0 =
|
79 |
+
* fixed to WordPress 3.2
|
80 |
+
|
81 |
= 0.3.0 =
|
82 |
* Bug fix for admin UI
|
83 |
|
wp-total-hacks.php
CHANGED
@@ -5,7 +5,7 @@ Author: Takayuki Miyauchi
|
|
5 |
Plugin URI: http://firegoby.theta.ne.jp/wp/wp-total-hacks
|
6 |
Description: WP Total Hacks can customize your WordPress.
|
7 |
Author: Takayuki Miyauchi
|
8 |
-
Version: 0.
|
9 |
Author URI: http://firegoby.theta.ne.jp/
|
10 |
*/
|
11 |
|
5 |
Plugin URI: http://firegoby.theta.ne.jp/wp/wp-total-hacks
|
6 |
Description: WP Total Hacks can customize your WordPress.
|
7 |
Author: Takayuki Miyauchi
|
8 |
+
Version: 0.4.0
|
9 |
Author URI: http://firegoby.theta.ne.jp/
|
10 |
*/
|
11 |
|