Skip to content

Commit db6e5cf

Browse files
committed
Tag version 0.9.6
1 parent aff582b commit db6e5cf

File tree

97 files changed

+115
-91
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+115
-91
lines changed

ajax-dropdowns.php

+36-35
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
22
/**
33
* @package Ajax_Dropdowns
4-
* @version 0.9.5
4+
* @version 0.9.6
55
*/
66
/*
77
Plugin Name: Ajax Dropdowns
88
Plugin URI: http://wordpress.org/plugins/ajax-dropdowns/
99
Description: Display a group of posts that can be switched using dropdowns.
1010
Author: ThemeBoy
11-
Version: 0.9.5
11+
Version: 0.9.6
1212
Author URI: http://themeboy.com/
1313
*/
1414

@@ -36,7 +36,7 @@ public function __construct() {
3636
add_action( 'init', array( $this, 'register_post_type' ) );
3737
add_action( 'init', array( $this, 'register_shortcode' ) );
3838
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'action_links' ) );
39-
add_action( 'wp_enqueue_scripts', array( $this, 'styles' ) );
39+
add_action( 'wp_enqueue_scripts', array( $this, 'scripts' ) );
4040
add_action( 'admin_head', array( $this, 'menu_highlight' ) );
4141
add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
4242
add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ), 10 );
@@ -51,7 +51,7 @@ public function __construct() {
5151
*/
5252
private function define_constants() {
5353
if ( !defined( 'AJAX_DROPDOWNS_VERSION' ) )
54-
define( 'AJAX_DROPDOWNS_VERSION', '0.9.5' );
54+
define( 'AJAX_DROPDOWNS_VERSION', '0.9.6' );
5555

5656
if ( !defined( 'AJAX_DROPDOWNS_URL' ) )
5757
define( 'AJAX_DROPDOWNS_URL', plugin_dir_url( __FILE__ ) );
@@ -74,10 +74,10 @@ public function init() {
7474
* Note: the first-loaded translation file overrides any following ones if the same translation is present
7575
*/
7676
public static function load_plugin_textdomain() {
77-
$locale = apply_filters( 'plugin_locale', get_locale(), 'ajaxd' );
77+
$locale = apply_filters( 'plugin_locale', get_locale(), ajax-dropdowns;
7878

7979
// Global + Frontend Locale
80-
load_plugin_textdomain( 'ajaxd', false, plugin_basename( dirname( __FILE__ ) . "/languages" ) );
80+
load_plugin_textdomain( 'ajax-dropdowns', false, plugin_basename( dirname( __FILE__ ) . "/languages" ) );
8181
}
8282

8383
/**
@@ -88,7 +88,7 @@ public static function load_plugin_textdomain() {
8888
*/
8989
public function action_links( $links ) {
9090
return array_merge( array(
91-
'<a href="' . admin_url( 'edit.php?post_type=ajax_dropdown' ) . '">' . __( 'Manage', 'ajaxd' ) . '</a>',
91+
'<a href="' . admin_url( 'edit.php?post_type=ajax_dropdown' ) . '">' . __( 'Manage', ajax-dropdowns . '</a>',
9292
), $links );
9393
}
9494

@@ -99,15 +99,15 @@ public static function register_post_type() {
9999
register_post_type( 'ajax_dropdown',
100100
array(
101101
'labels' => array(
102-
'name' => __( 'Dropdowns', 'ajaxd' ),
103-
'singular_name' => __( 'Dropdown', 'ajaxd' ),
104-
'add_new_item' => __( 'Add New Dropdown', 'ajaxd' ),
105-
'edit_item' => __( 'Edit Dropdown', 'ajaxd' ),
106-
'new_item' => __( 'New Dropdown', 'ajaxd' ),
107-
'view_item' => __( 'View Dropdown', 'ajaxd' ),
108-
'search_items' => __( 'Search Dropdowns', 'ajaxd' ),
109-
'not_found' => __( 'No dropdowns found.', 'ajaxd' ),
110-
'not_found_in_trash' => __( 'No dropdowns found in trash.', 'ajaxd' ),
102+
'name' => __( 'Dropdowns', ajax-dropdowns,
103+
'singular_name' => __( 'Dropdown', ajax-dropdowns,
104+
'add_new_item' => __( 'Add New Dropdown', ajax-dropdowns,
105+
'edit_item' => __( 'Edit Dropdown', ajax-dropdowns,
106+
'new_item' => __( 'New Dropdown', ajax-dropdowns,
107+
'view_item' => __( 'View Dropdown', ajax-dropdowns,
108+
'search_items' => __( 'Search Dropdowns', ajax-dropdowns,
109+
'not_found' => __( 'No dropdowns found.', ajax-dropdowns,
110+
'not_found_in_trash' => __( 'No dropdowns found in trash.', ajax-dropdowns,
111111
),
112112
'public' => false,
113113
'show_ui' => true,
@@ -134,9 +134,10 @@ public function register_shortcode() {
134134
}
135135

136136
/**
137-
* Enqueue styles
137+
* Enqueue scripts
138138
*/
139-
public static function styles() {
139+
public static function scripts() {
140+
wp_enqueue_script( 'jquery' );
140141
wp_enqueue_style( 'ajaxd-styles', AJAX_DROPDOWNS_URL . '/assets/css/ajaxd.css', array(), AJAX_DROPDOWNS_VERSION );
141142
}
142143

@@ -155,7 +156,7 @@ public static function menu_highlight() {
155156
}
156157

157158
/**
158-
* Enqueue admin styles
159+
* Enqueue admin scripts
159160
*/
160161
public static function admin_scripts() {
161162
$screen = get_current_screen();
@@ -173,9 +174,9 @@ public static function admin_scripts() {
173174
* Add meta boxes
174175
*/
175176
public function add_meta_boxes() {
176-
add_meta_box( 'ajaxd_postsdiv', __( 'Posts', 'ajaxd' ), array( $this, 'posts_meta_box' ), 'ajax_dropdown', 'advanced', 'high' );
177-
add_meta_box( 'ajaxd_methoddiv', __( 'Method', 'ajaxd' ), array( $this, 'method_meta_box' ), 'ajax_dropdown', 'side', 'default' );
178-
add_meta_box( 'ajaxd_shortcodediv', __( 'Shortcode', 'ajaxd' ), array( $this, 'shortcode_meta_box' ), 'ajax_dropdown', 'side', 'default' );
177+
add_meta_box( 'ajaxd_postsdiv', __( 'Posts', ajax-dropdowns, array( $this, 'posts_meta_box' ), 'ajax_dropdown', 'advanced', 'high' );
178+
add_meta_box( 'ajaxd_methoddiv', __( 'Method', ajax-dropdowns, array( $this, 'method_meta_box' ), 'ajax_dropdown', 'side', 'default' );
179+
add_meta_box( 'ajaxd_shortcodediv', __( 'Shortcode', ajax-dropdowns, array( $this, 'shortcode_meta_box' ), 'ajax_dropdown', 'side', 'default' );
179180
}
180181

181182
/**
@@ -186,7 +187,7 @@ public static function posts_meta_box( $post, $args ) {
186187
$ajax_posts = get_post_meta( $post->ID, 'ajax_post' );
187188
?>
188189
<p>
189-
<select name="add_ajax_post" id="add_ajax_post" class="postform ajaxd-posts chosen-select<?php if ( is_rtl() ): ?> chosen-rtl<?php endif; ?>" data-placeholder="<?php _e( 'Add a post to this dropdown', 'ajaxd' ); ?>">
190+
<select name="add_ajax_post" id="add_ajax_post" class="postform ajaxd-posts chosen-select<?php if ( is_rtl() ): ?> chosen-rtl<?php endif; ?>" data-placeholder="<?php _e( 'Add a post to this dropdown', ajax-dropdowns; ?>">
190191
<option value=""></option>
191192
<?php
192193
foreach ( $post_types as $post_type ):
@@ -197,7 +198,7 @@ public static function posts_meta_box( $post, $args ) {
197198
?>
198199
<optgroup label="<?php echo $object->labels->name; ?>">
199200
<?php
200-
printf( '<option value="%s" data-post-type="%s">%s</option>', 0, $object->labels->singular_name, sprintf( __( '&mdash; Add All %1$s (%2$s) &mdash;', 'ajaxd' ), $object->labels->name, sizeof( $posts ) ) );
201+
printf( '<option value="%s" data-post-type="%s">%s</option>', 0, $object->labels->singular_name, sprintf( __( '&mdash; Add All %1$s (%2$s) &mdash;', ajax-dropdowns, $object->labels->name, sizeof( $posts ) ) );
201202
foreach ( $posts as $post ):
202203
printf( '<option value="%s" data-post-type="%s">%s</option>', $post->ID, $object->labels->singular_name, $post->post_title );
203204
endforeach;
@@ -213,16 +214,16 @@ public static function posts_meta_box( $post, $args ) {
213214
<thead>
214215
<tr>
215216
<th style="width:1px;">&nbsp;</th>
216-
<th><?php _e( 'Title', 'ajaxd' ); ?></th>
217-
<th style="width:20%;"><?php _e( 'Post Type', 'ajaxd' ); ?></th>
217+
<th><?php _e( 'Title', ajax-dropdowns; ?></th>
218+
<th style="width:20%;"><?php _e( 'Post Type', ajax-dropdowns; ?></th>
218219
<th style="width:1px;">&nbsp;</th>
219220
</tr>
220221
</thead>
221222
<tbody>
222223
<tr class="ajaxd-placeholder"<?php if ( sizeof( $ajax_posts ) ): ?> style="display:none;"<?php endif; ?>>
223224
<td colspan="4">
224-
<?php _e( 'No posts found.', 'ajaxd' ); ?>
225-
<?php _e( 'Use the menu above to add a post to this dropdown.', 'ajaxd' ); ?>
225+
<?php _e( 'No posts found.', ajax-dropdowns; ?>
226+
<?php _e( 'Use the menu above to add a post to this dropdown.', ajax-dropdowns; ?>
226227
</td>
227228
</tr>
228229
<?php if ( sizeof( $ajax_posts ) ): foreach ( $ajax_posts as $post_id ): ?>
@@ -236,11 +237,11 @@ public static function posts_meta_box( $post, $args ) {
236237
</tbody>
237238
</table>
238239
<p class="howto">
239-
<?php _e( 'Drag and drop to reorder posts.', 'ajaxd' ); ?>
240+
<?php _e( 'Drag and drop to reorder posts.', ajax-dropdowns; ?>
240241
</p>
241242
<p>
242243
<a href="http://wordpress.org/support/view/plugin-reviews/ajax-dropdowns?rate=5#postform">
243-
<?php _e( 'Love Ajax Dropdowns? Help spread the word by rating us 5★ on WordPress.org', 'ajaxd' ); ?>
244+
<?php _e( 'Love Ajax Dropdowns? Help spread the word by rating us 5★ on WordPress.org', ajax-dropdowns; ?>
244245
</a>
245246
</p>
246247
<?php
@@ -252,7 +253,7 @@ public static function posts_meta_box( $post, $args ) {
252253
public static function shortcode_meta_box( $post ) {
253254
?>
254255
<p class="howto">
255-
<?php _e( 'Copy this code and paste it into your post, page or text widget content.', 'ajaxd' ); ?>
256+
<?php _e( 'Copy this code and paste it into your post, page or text widget content.', ajax-dropdowns; ?>
256257
</p>
257258
<p><input type="text" value="[ajax_dropdown <?php echo $post->ID; ?>]" readonly="readonly" class="code"></p>
258259
<?php
@@ -265,10 +266,10 @@ public static function method_meta_box( $post, $args ) {
265266
wp_nonce_field( 'ajaxd_save_data', 'ajaxd_meta_nonce' );
266267
$method = get_post_meta( $post->ID, 'ajaxd_method', true );
267268
$no_content = get_post_meta( $post->ID, 'ajaxd_no_content', true ) == 'yes' ? true : false;
268-
$method_options = array( 'ajax' => __( 'Ajax', 'ajaxd' ), 'inline' => __( 'Inline', 'ajaxd' ), 'parameter' => __( 'URL Parameter', 'ajaxd' ), 'redirect' => __( 'Redirect', 'ajaxd' ) );
269+
$method_options = array( 'ajax' => __( 'Ajax', ajax-dropdowns, 'inline' => __( 'Inline', ajax-dropdowns, 'parameter' => __( 'URL Parameter', ajax-dropdowns, 'redirect' => __( 'Redirect', ajax-dropdowns );
269270
?>
270271
<p class="howto">
271-
<?php _e( 'Select the method to query posts.', 'ajaxd' ); ?>
272+
<?php _e( 'Select the method to query posts.', ajax-dropdowns; ?>
272273
</p>
273274
<p>
274275
<select name="ajaxd_method" id="ajaxd_method" class="postform ajaxd-method widefat">
@@ -283,7 +284,7 @@ public static function method_meta_box( $post, $args ) {
283284
<label>
284285
<input type="hidden" name="ajaxd_no_content" value="no">
285286
<input type="checkbox" name="ajaxd_no_content" class="ajaxd-no-content" value="yes" <?php checked( $no_content ); ?>>
286-
<?php _e( 'Dropdown only (no content)', 'ajaxd' ); ?>
287+
<?php _e( 'Dropdown only (no content)', ajax-dropdowns; ?>
287288
</label>
288289
</p>
289290
<?php
@@ -328,7 +329,7 @@ public static function post_updated_messages( $messages ) {
328329

329330
if ( 'ajax_dropdown' == $typenow ):
330331
for ( $i = 0; $i <= 10; $i++ ):
331-
$messages['post'][ $i ] = '<strong>' . __( 'Settings saved.', 'ajaxd' ) . '</strong>';
332+
$messages['post'][ $i ] = '<strong>' . __( 'Settings saved.', ajax-dropdowns . '</strong>';
332333
endfor;
333334
endif;
334335

languages/ajax-dropdowns-ach.mo

746 Bytes
Binary file not shown.

languages/ajax-dropdowns-af.mo

895 Bytes
Binary file not shown.

languages/ajax-dropdowns-ar.mo

1.1 KB
Binary file not shown.

languages/ajax-dropdowns-az.mo

831 Bytes
Binary file not shown.

languages/ajax-dropdowns-be_BY.mo

952 Bytes
Binary file not shown.

languages/ajax-dropdowns-bg_BG.mo

1.08 KB
Binary file not shown.

languages/ajax-dropdowns-bn_BD.mo

1 KB
Binary file not shown.

languages/ajax-dropdowns-br.mo

745 Bytes
Binary file not shown.

languages/ajax-dropdowns-bs_BA.mo

1.06 KB
Binary file not shown.

languages/ajax-dropdowns-ca.mo

1019 Bytes
Binary file not shown.

languages/ajax-dropdowns-co.mo

790 Bytes
Binary file not shown.

languages/ajax-dropdowns-cs_CZ.mo

1005 Bytes
Binary file not shown.

languages/ajax-dropdowns-cy.mo

980 Bytes
Binary file not shown.

languages/ajax-dropdowns-da_DK.mo

950 Bytes
Binary file not shown.

languages/ajax-dropdowns-de_AT.mo

805 Bytes
Binary file not shown.

languages/ajax-dropdowns-de_DE.mo

2.36 KB
Binary file not shown.

languages/ajax-dropdowns-el.mo

2.93 KB
Binary file not shown.

languages/[email protected]

768 Bytes
Binary file not shown.

languages/ajax-dropdowns-en_GB.mo

920 Bytes
Binary file not shown.

languages/ajax-dropdowns-eo.mo

911 Bytes
Binary file not shown.

languages/ajax-dropdowns-es_AR.mo

767 Bytes
Binary file not shown.

languages/ajax-dropdowns-es_CL.mo

900 Bytes
Binary file not shown.

languages/ajax-dropdowns-es_ES.mo

2.24 KB
Binary file not shown.

languages/ajax-dropdowns-es_MX.mo

934 Bytes
Binary file not shown.

languages/ajax-dropdowns-es_PE.mo

895 Bytes
Binary file not shown.

languages/ajax-dropdowns-es_VE.mo

953 Bytes
Binary file not shown.

languages/ajax-dropdowns-et.mo

927 Bytes
Binary file not shown.

languages/ajax-dropdowns-eu.mo

937 Bytes
Binary file not shown.

languages/ajax-dropdowns-fa.mo

825 Bytes
Binary file not shown.

languages/ajax-dropdowns-fa_IR.mo

1.03 KB
Binary file not shown.

languages/ajax-dropdowns-fi.mo

1.01 KB
Binary file not shown.

languages/ajax-dropdowns-fo.mo

842 Bytes
Binary file not shown.

languages/ajax-dropdowns-fr_FR.mo

2.45 KB
Binary file not shown.

languages/ajax-dropdowns-ga.mo

783 Bytes
Binary file not shown.

languages/ajax-dropdowns-gl_ES.mo

2.36 KB
Binary file not shown.

languages/ajax-dropdowns-gu_IN.mo

831 Bytes
Binary file not shown.

languages/ajax-dropdowns-he_IL.mo

1 KB
Binary file not shown.

languages/ajax-dropdowns-hi_IN.mo

2.13 KB
Binary file not shown.

languages/ajax-dropdowns-hr.mo

1008 Bytes
Binary file not shown.

languages/ajax-dropdowns-hu_HU.mo

954 Bytes
Binary file not shown.

languages/ajax-dropdowns-hy.mo

748 Bytes
Binary file not shown.

languages/ajax-dropdowns-id.mo

743 Bytes
Binary file not shown.

languages/ajax-dropdowns-id_ID.mo

954 Bytes
Binary file not shown.

languages/ajax-dropdowns-is_IS.mo

889 Bytes
Binary file not shown.

languages/ajax-dropdowns-it_IT.mo

2.31 KB
Binary file not shown.

languages/ajax-dropdowns-ja.mo

1.08 KB
Binary file not shown.

languages/ajax-dropdowns-jv.mo

867 Bytes
Binary file not shown.

languages/ajax-dropdowns-ka.mo

1.05 KB
Binary file not shown.

languages/ajax-dropdowns-kk.mo

739 Bytes
Binary file not shown.

languages/ajax-dropdowns-km.mo

2.35 KB
Binary file not shown.

languages/ajax-dropdowns-ko_KR.mo

950 Bytes
Binary file not shown.

languages/ajax-dropdowns-ku.mo

747 Bytes
Binary file not shown.

languages/ajax-dropdowns-ky.mo

895 Bytes
Binary file not shown.

languages/ajax-dropdowns-lt_LT.mo

1.13 KB
Binary file not shown.

languages/ajax-dropdowns-lv.mo

979 Bytes
Binary file not shown.

languages/ajax-dropdowns-mg.mo

887 Bytes
Binary file not shown.

languages/ajax-dropdowns-mk_MK.mo

918 Bytes
Binary file not shown.

languages/ajax-dropdowns-mn.mo

981 Bytes
Binary file not shown.

languages/ajax-dropdowns-my_MM.mo

961 Bytes
Binary file not shown.

languages/ajax-dropdowns-nb_NO.mo

1003 Bytes
Binary file not shown.

languages/ajax-dropdowns-ne_NP.mo

809 Bytes
Binary file not shown.

languages/ajax-dropdowns-nl_NL.mo

2.32 KB
Binary file not shown.

languages/ajax-dropdowns-nn_NO.mo

958 Bytes
Binary file not shown.

languages/ajax-dropdowns-oc.mo

851 Bytes
Binary file not shown.

languages/ajax-dropdowns-pap.mo

752 Bytes
Binary file not shown.

languages/ajax-dropdowns-pl_PL.mo

1.18 KB
Binary file not shown.

languages/ajax-dropdowns-pt_BR.mo

2.37 KB
Binary file not shown.

languages/ajax-dropdowns-pt_PT.mo

962 Bytes
Binary file not shown.

languages/ajax-dropdowns-ro_RO.mo

1.02 KB
Binary file not shown.

languages/ajax-dropdowns-ru_RU.mo

1.39 KB
Binary file not shown.

languages/ajax-dropdowns-sah.mo

868 Bytes
Binary file not shown.

languages/ajax-dropdowns-si_LK.mo

765 Bytes
Binary file not shown.

languages/ajax-dropdowns-sk_SK.mo

1.06 KB
Binary file not shown.

languages/ajax-dropdowns-sl_SI.mo

1018 Bytes
Binary file not shown.

languages/ajax-dropdowns-sq.mo

748 Bytes
Binary file not shown.

languages/ajax-dropdowns-sr_RS.mo

1.04 KB
Binary file not shown.

languages/ajax-dropdowns-su.mo

929 Bytes
Binary file not shown.

languages/ajax-dropdowns-sv_SE.mo

1.01 KB
Binary file not shown.

languages/ajax-dropdowns-sw.mo

906 Bytes
Binary file not shown.

languages/ajax-dropdowns-ta_LK.mo

973 Bytes
Binary file not shown.

languages/ajax-dropdowns-te.mo

904 Bytes
Binary file not shown.

languages/ajax-dropdowns-th.mo

970 Bytes
Binary file not shown.

languages/ajax-dropdowns-tk_TM.mo

768 Bytes
Binary file not shown.

languages/ajax-dropdowns-tr_TR.mo

2.4 KB
Binary file not shown.

languages/ajax-dropdowns-ug.mo

957 Bytes
Binary file not shown.

languages/ajax-dropdowns-uk.mo

1.09 KB
Binary file not shown.

languages/ajax-dropdowns-ur_PK.mo

761 Bytes
Binary file not shown.

languages/ajax-dropdowns-uz.mo

804 Bytes
Binary file not shown.

languages/ajax-dropdowns-vi.mo

978 Bytes
Binary file not shown.
814 Bytes
Binary file not shown.

languages/ajax-dropdowns-zh_CN.mo

2.14 KB
Binary file not shown.

languages/ajax-dropdowns-zh_HK.mo

760 Bytes
Binary file not shown.

languages/ajax-dropdowns-zh_TW.mo

943 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)