Menu Image - Version 2.2

Version Description

  • Added grunt-wp-readme-to-markdown npm package for converting readme to markdown for github users.
Download this release

Release Info

Developer zviryatko
Plugin Icon 128x128 Menu Image
Version 2.2
Comparing to
See all releases

Code changes from version 2.1 to 2.2

Files changed (6) hide show
  1. .gitignore +1 -0
  2. Gruntfile.js +18 -0
  3. README.md +34 -10
  4. menu-image.php +1 -1
  5. package.json +8 -0
  6. readme.txt +25 -5
.gitignore ADDED
@@ -0,0 +1 @@
 
1
+ node_modules/
Gruntfile.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+ module.exports = function(grunt){
3
+
4
+ grunt.initConfig({
5
+ wp_readme_to_markdown: {
6
+ your_target: {
7
+ files: {
8
+ 'README.md': 'readme.txt'
9
+ },
10
+ },
11
+ },
12
+ });
13
+
14
+ grunt.loadNpmTasks('grunt-wp-readme-to-markdown');
15
+
16
+ grunt.registerTask('default', ['wp_readme_to_markdown']);
17
+
18
+ }
README.md CHANGED
@@ -1,10 +1,10 @@
1
  # Menu Image #
2
- **Contributors:** @zviryatko
3
  **Tags:** menu, image, field, hover
4
- **Donate link:** (http://makeyoulivebetter.org.ua/buy-beer)
5
  **Requires at least:** 3.5.1
6
- **Tested up to:** 3.9.1
7
- **Stable tag:** 2.0
8
  **License:** GPLv2 or later
9
  **License URI:** http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -32,21 +32,45 @@ And... load images via media uploader!
32
  Where you show your menu with function `<?php wp_nav_menu(); ?>` as param you can add `array('link_before' => '<span>', 'link_after' => '</span>')`.
33
  It makes css markup easier.
34
 
35
- ### How to add another size for image? ###
36
 
37
- Just register another image size in your theme with function `add_image_size()`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
  ## Screenshots ##
40
 
41
- ###1. Admin screen###
42
- ![Admin screen](http://s-plugins.wordpress.org/menu-image/assets/screenshot-1.png)
43
 
44
- ###2. Menu preview in standard twenty-twelve theme###
45
- ![Menu preview in standard twenty-twelve theme](http://s-plugins.wordpress.org/menu-image/assets/screenshot-2.png)
46
 
47
 
48
  ## Changelog ##
49
 
 
 
 
 
 
 
 
50
  ### 2.0 ###
51
  * Added support of media uploader.
52
  * Fixed php strict warnings.
1
  # Menu Image #
2
+ **Contributors:** zviryatko
3
  **Tags:** menu, image, field, hover
4
+ **Donate link:** http://makeyoulivebetter.org.ua/buy-beer
5
  **Requires at least:** 3.5.1
6
+ **Tested up to:** 3.9.1
7
+ **Stable tag:** 2.2
8
  **License:** GPLv2 or later
9
  **License URI:** http://www.gnu.org/licenses/gpl-2.0.html
10
 
32
  Where you show your menu with function `<?php wp_nav_menu(); ?>` as param you can add `array('link_before' => '<span>', 'link_after' => '</span>')`.
33
  It makes css markup easier.
34
 
35
+ ### How to add another size for the image? ###
36
 
37
+ To add a new size (or remove an old one) add a function to the `menu_image_default_sizes` filter. For example
38
+
39
+ ```
40
+ <?php
41
+ add_filter( 'menu_image_default_sizes', function($sizes){
42
+
43
+ // remove the default 36x36 size
44
+ unset($sizes['menu-36x36'];
45
+
46
+ // add a new size
47
+ $sizes['menu-50x50'] = array(50,50);
48
+
49
+ // return $sizes (required)
50
+ return $sizes;
51
+
52
+ });
53
+ ?>
54
+ ```
55
 
56
  ## Screenshots ##
57
 
58
+ ### 1. Admin screen ###
59
+ ![Admin screen](http://ps.w.org/menu-image/assets/screenshot-1.png)
60
 
61
+ ### 2. Menu preview in standard twenty-thirteen theme ###
62
+ ![Menu preview in standard twenty-thirteen theme](http://ps.w.org/menu-image/assets/screenshot-2.png)
63
 
64
 
65
  ## Changelog ##
66
 
67
+ ### 2.2 ###
68
+ * Added grunt-wp-readme-to-markdown npm package for converting readme to markdown for github users.
69
+
70
+ ### 2.1 ###
71
+ * Fix [set-image-button-not-working](http://wordpress.org/support/topic/set-image-button-not-working)
72
+ * Fix [vertical-align-when-using-mouseover-image](ttp://wordpress.org/support/topic/vertical-align-when-using-mouseover-image)
73
+
74
  ### 2.0 ###
75
  * Added support of media uploader.
76
  * Fixed php strict warnings.
menu-image.php CHANGED
@@ -10,7 +10,7 @@ Plugin Name: Menu Image
10
  Plugin URI: http://html-and-cms.com/plugins/menu-image/
11
  Description: Provide uploading images to menu item
12
  Author: Alex Davyskiba aka Zviryatko
13
- Version: 2.1
14
  Author URI: http://makeyoulivebetter.org.ua/
15
  */
16
 
10
  Plugin URI: http://html-and-cms.com/plugins/menu-image/
11
  Description: Provide uploading images to menu item
12
  Author: Alex Davyskiba aka Zviryatko
13
+ Version: 2.2
14
  Author URI: http://makeyoulivebetter.org.ua/
15
  */
16
 
package.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "menu-image",
3
+ "version": "2.2.0",
4
+ "devDependencies": {
5
+ "grunt": "^0.4.5",
6
+ "grunt-wp-readme-to-markdown": "^0.8.0"
7
+ }
8
+ }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: menu, image, field, hover
4
  Donate link: http://makeyoulivebetter.org.ua/buy-beer
5
  Requires at least: 3.5.1
6
  Tested up to: 3.9.1
7
- Stable tag: 2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -32,9 +32,26 @@ And... load images via media uploader!
32
  Where you show your menu with function `<?php wp_nav_menu(); ?>` as param you can add `array('link_before' => '<span>', 'link_after' => '</span>')`.
33
  It makes css markup easier.
34
 
35
- = How to add another size for image? =
36
 
37
- Just register another image size in your theme with function `add_image_size()`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
  == Screenshots ==
40
 
@@ -43,9 +60,12 @@ Just register another image size in your theme with function `add_image_size()`.
43
 
44
  == Changelog ==
45
 
 
 
 
46
  = 2.1 =
47
- * Fix http://wordpress.org/support/topic/set-image-button-not-working
48
- * Fix http://wordpress.org/support/topic/vertical-align-when-using-mouseover-image
49
 
50
  = 2.0 =
51
  * Added support of media uploader.
4
  Donate link: http://makeyoulivebetter.org.ua/buy-beer
5
  Requires at least: 3.5.1
6
  Tested up to: 3.9.1
7
+ Stable tag: 2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
32
  Where you show your menu with function `<?php wp_nav_menu(); ?>` as param you can add `array('link_before' => '<span>', 'link_after' => '</span>')`.
33
  It makes css markup easier.
34
 
35
+ = How to add another size for the image? =
36
 
37
+ To add a new size (or remove an old one) add a function to the `menu_image_default_sizes` filter. For example
38
+
39
+ ```
40
+ <?php
41
+ add_filter( 'menu_image_default_sizes', function($sizes){
42
+
43
+ // remove the default 36x36 size
44
+ unset($sizes['menu-36x36'];
45
+
46
+ // add a new size
47
+ $sizes['menu-50x50'] = array(50,50);
48
+
49
+ // return $sizes (required)
50
+ return $sizes;
51
+
52
+ });
53
+ ?>
54
+ ```
55
 
56
  == Screenshots ==
57
 
60
 
61
  == Changelog ==
62
 
63
+ = 2.2 =
64
+ * Added grunt-wp-readme-to-markdown npm package for converting readme to markdown for github users.
65
+
66
  = 2.1 =
67
+ * Fix [set-image-button-not-working](http://wordpress.org/support/topic/set-image-button-not-working)
68
+ * Fix [vertical-align-when-using-mouseover-image](ttp://wordpress.org/support/topic/vertical-align-when-using-mouseover-image)
69
 
70
  = 2.0 =
71
  * Added support of media uploader.