Easy Image Gallery - Version 1.0.6

Version Description

Fixes settings link on plugins page

=

Download this release

Release Info

Developer sumobi
Plugin Icon 128x128 Easy Image Gallery
Version 1.0.6
Comparing to
See all releases

Code changes from version 1.0.5 to 1.0.6

Files changed (3) hide show
  1. easy-image-gallery.php +3 -3
  2. includes/admin-page.php +11 -12
  3. readme.txt +8 -3
easy-image-gallery.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Easy Image Gallery
4
  Plugin URI: http://sumobi.com/shop/easy-image-gallery/
5
  Description: An easy to use image gallery with drag & drop re-ordering
6
- Version: 1.0.5
7
  Author: Andrew Munro, Sumobi
8
  Author URI: http://sumobi.com
9
  License: GPL-2.0+
@@ -13,7 +13,7 @@ License URI: http://www.opensource.org/licenses/gpl-license.php
13
  // Exit if accessed directly
14
  if ( ! defined( 'ABSPATH' ) ) exit;
15
 
16
- if ( !class_exists( 'Easy_Image_Gallery' ) ) {
17
 
18
  /**
19
  * PHP5 constructor method.
@@ -54,7 +54,7 @@ if ( !class_exists( 'Easy_Image_Gallery' ) ) {
54
  define( 'EASY_IMAGE_GALLERY_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
55
 
56
  if ( ! defined( 'EASY_IMAGE_GALLERY_VERSION' ) )
57
- define( 'EASY_IMAGE_GALLERY_VERSION', '1.0.5' );
58
 
59
  if ( ! defined( 'EASY_IMAGE_GALLERY_INCLUDES' ) )
60
  define( 'EASY_IMAGE_GALLERY_INCLUDES', EASY_IMAGE_GALLERY_DIR . trailingslashit( 'includes' ) );
3
  Plugin Name: Easy Image Gallery
4
  Plugin URI: http://sumobi.com/shop/easy-image-gallery/
5
  Description: An easy to use image gallery with drag & drop re-ordering
6
+ Version: 1.0.6
7
  Author: Andrew Munro, Sumobi
8
  Author URI: http://sumobi.com
9
  License: GPL-2.0+
13
  // Exit if accessed directly
14
  if ( ! defined( 'ABSPATH' ) ) exit;
15
 
16
+ if ( ! class_exists( 'Easy_Image_Gallery' ) ) {
17
 
18
  /**
19
  * PHP5 constructor method.
54
  define( 'EASY_IMAGE_GALLERY_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
55
 
56
  if ( ! defined( 'EASY_IMAGE_GALLERY_VERSION' ) )
57
+ define( 'EASY_IMAGE_GALLERY_VERSION', '1.0.6' );
58
 
59
  if ( ! defined( 'EASY_IMAGE_GALLERY_INCLUDES' ) )
60
  define( 'EASY_IMAGE_GALLERY_INCLUDES', EASY_IMAGE_GALLERY_DIR . trailingslashit( 'includes' ) );
includes/admin-page.php CHANGED
@@ -5,28 +5,27 @@
5
  * @since 1.0
6
  */
7
  function easy_image_gallery_admin_init() {
8
-
9
-
10
  register_setting( 'media', 'easy-image-gallery', 'easy_image_gallery_settings_sanitize' );
11
 
12
- // sections
13
- add_settings_section( 'general', __( 'General', 'easy-image-gallery' ), '', 'easy-image-gallery-settings' );
14
-
15
  // settings
16
- add_settings_field( 'header', '<h3 class="title">' . __( 'Easy Image Gallery', 'easy-image-gallery' ) . '</h3>', '', 'media', 'default' );
17
- add_settings_field( 'lightbox', __( 'Lightbox', 'easy-image-gallery' ), 'lightbox_callback', 'media', 'default' );
18
- add_settings_field( 'post-types', __( 'Post Types', 'easy-image-gallery' ), 'post_types_callback', 'media', 'default' );
19
-
20
  }
21
  add_action( 'admin_init', 'easy_image_gallery_admin_init' );
22
 
 
 
 
 
 
23
 
24
  /**
25
  * Lightbox callback
26
  *
27
  * @since 1.0
28
  */
29
- function lightbox_callback() {
30
 
31
  // default option when settings have not been saved
32
  $defaults['lightbox'] = 'prettyphoto';
@@ -55,7 +54,7 @@ function lightbox_callback() {
55
  * @since 1.0
56
  */
57
 
58
- function post_types_callback() {
59
 
60
  // post and page defaults
61
  $defaults['post_types']['post'] = 'on';
@@ -115,7 +114,7 @@ function easy_image_gallery_settings_sanitize( $input ) {
115
  */
116
  function easy_image_gallery_plugin_action_links( $links ) {
117
 
118
- $settings_link = '<a href="' . get_bloginfo( 'wpurl' ) . '/wp-admin/plugins.php?page=easy-image-gallery">'. __( 'Settings', 'easy-image-gallery' ) .'</a>';
119
  array_unshift( $links, $settings_link );
120
 
121
  return $links;
5
  * @since 1.0
6
  */
7
  function easy_image_gallery_admin_init() {
 
 
8
  register_setting( 'media', 'easy-image-gallery', 'easy_image_gallery_settings_sanitize' );
9
 
 
 
 
10
  // settings
11
+ add_settings_field( 'header', '<h3 class="title">' . __( 'Easy Image Gallery', 'easy-image-gallery' ) . '</h3>', 'easy_image_gallery_header_callback', 'media', 'default' );
12
+ add_settings_field( 'lightbox', __( 'Lightbox', 'easy-image-gallery' ), 'easy_image_gallery_lightbox_callback', 'media', 'default' );
13
+ add_settings_field( 'post-types', __( 'Post Types', 'easy-image-gallery' ), 'easy_image_gallery_post_types_callback', 'media', 'default' );
 
14
  }
15
  add_action( 'admin_init', 'easy_image_gallery_admin_init' );
16
 
17
+ /**
18
+ * Blank header callback
19
+ * @since 1.0.6
20
+ */
21
+ function easy_image_gallery_header_callback() {}
22
 
23
  /**
24
  * Lightbox callback
25
  *
26
  * @since 1.0
27
  */
28
+ function easy_image_gallery_lightbox_callback() {
29
 
30
  // default option when settings have not been saved
31
  $defaults['lightbox'] = 'prettyphoto';
54
  * @since 1.0
55
  */
56
 
57
+ function easy_image_gallery_post_types_callback() {
58
 
59
  // post and page defaults
60
  $defaults['post_types']['post'] = 'on';
114
  */
115
  function easy_image_gallery_plugin_action_links( $links ) {
116
 
117
+ $settings_link = '<a href="' . admin_url( 'options-media.php' ) . '">'. __( 'Settings', 'easy-image-gallery' ) .'</a>';
118
  array_unshift( $links, $settings_link );
119
 
120
  return $links;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: image gallery, image, galleries, simple, easy, sumobi
5
  Requires at least: 3.5
6
  Tested up to: 3.9 alpha
7
- Stable tag: 1.0.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -106,11 +106,16 @@ In your WordPress admin under Settings -> Media
106
 
107
  == Upgrade Notice ==
108
 
109
- = 1.1.5 =
110
- Plugin settings now located under Settings -> Media, plus some minor tweaks to filter names
111
 
112
  == Changelog ==
113
 
 
 
 
 
 
114
  = 1.0.5 =
115
 
116
  * Tweak: The plugin's options page has been moved to settings -> media
4
  Tags: image gallery, image, galleries, simple, easy, sumobi
5
  Requires at least: 3.5
6
  Tested up to: 3.9 alpha
7
+ Stable tag: 1.0.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
106
 
107
  == Upgrade Notice ==
108
 
109
+ = 1.0.6 =
110
+ Fixes settings link on plugins page
111
 
112
  == Changelog ==
113
 
114
+ = 1.0.6 =
115
+ * Fix: Settings link on plugins page
116
+ * Fix PHP notice on Settings -> Media page
117
+ * Tweak: removed unneeded function
118
+
119
  = 1.0.5 =
120
 
121
  * Tweak: The plugin's options page has been moved to settings -> media