Changeset 528714
- Timestamp:
- 04/07/2012 10:17:28 PM (14 years ago)
- Location:
- showlinks
- Files:
-
- 3 edited
- 2 copied
-
tags/1.01 (copied) (copied from showlinks/trunk)
-
tags/1.01/ShowLinks.php (copied) (copied from showlinks/trunk/ShowLinks.php) (2 diffs)
-
tags/1.01/readme.txt (modified) (1 diff)
-
trunk/ShowLinks.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
showlinks/tags/1.01/ShowLinks.php
r528488 r528714 2 2 /** 3 3 * @package Show_Links 4 * @version 1.0 4 * @version 1.01 5 5 */ 6 6 /* … … 9 9 Description: Show links added with the dashboard using a shortcode [showlinks] in posts. 10 10 Author: Niklas Rydén 11 Version: 1.0 11 Version: 1.01 12 12 Author URI: http://kafit.se/ 13 13 */ 14 14 15 15 function showlinksfunc($slparams) { 16 // The line below is only for debugging while coding...you can delete it if it bothers you. 17 // printf('<pre>');print_r($slparams);printf('</pre>'); 18 19 // The base parameters we want to use... 16 20 $parameters = 'title_li=&categorize=0'; 17 if (isset($slparams['category_name'])) { 18 $parameters = $parameters.'&category_name='.$slparams['category_name']; 19 } 21 22 // Comma-separated ID-list 23 if (isset($slparams['category'])) { $parameters = $parameters.'&category='.$slparams['category']; } 24 25 // The actual category name...yes...it's kind of...stupid...need to change this to permalink somehow to avoid melt down. 26 if (isset($slparams['category_name'])) { $parameters = $parameters.'&category_name='.$slparams['category_name']; } 27 28 // 1 = true (default), 0 = false 29 if (isset($slparams['show_images'])) { $parameters = $parameters.'&show_images='.$slparams['show_images']; } 30 31 // 1 = true, 0 = false (default) Only needed when using images. 32 if (isset($slparams['show_name'])) { $parameters = $parameters.'&show_name='.$slparams['show_name']; } 33 34 // 1 = true, 0 = false (default) 35 if (isset($slparams['show_description'])) { $parameters = $parameters.'&show_description='.$slparams['show_description']; } 36 20 37 wp_list_bookmarks($parameters); 21 38 } -
showlinks/tags/1.01/readme.txt
r528458 r528714 7 7 Requires at least: 2.1 8 8 Tested up to: 3.3.1 9 Stable tag: 1.0 9 Stable tag: 1.01 10 10 11 A small plugin whose only purpose is to show links added with the Dashboard, using a short code.11 A small plugin whose only purpose is to show links added with the Dashboard, using a shortcode. 12 12 13 13 == Description == 14 A small plugin whose only purpose is to show links added with the Dashboard, using a short code.14 A small plugin whose only purpose is to show links added with the Dashboard, using a shortcode. 15 15 16 16 == Installation == 17 17 Place showlinks.php the plugin directory, activate it in the Dashboard, add the short code [showlinks] to any page or post. 18 18 19 Available parameters: 20 category=<comma-separated ID-list> // Cannot be used along with category name 21 category_name="<category title>" // Cannot be used along with category 22 show_images=1 or 0 (1=true (default), 0=false) 23 show_name=1 or 0 (1=true, 0=false (default)) // Only active when picture is set for link 24 show_description=1 or 0 (1=true, 0=false (default) 25 26 Examples: 27 To show category ID's 2 and 5 along with the description 28 [showlinks category=2,5 show_description=1] 29 30 To show link category "Räksmörgås" (Yes, this is some what stupid when using characters like this... use ID's instead if possible.) 31 [showlink category_name="Räksmörgås"] 32 19 33 Done! 20 34 35 == Changelog == 21 36 37 = 1.0 = 38 * We removed all the code written when I was overthinking and left one line... 39 40 = 1.01 = 41 * Added the options category, category_name, show_images, show_name and show_description. 42 43 == Upgrade Notice == 44 45 = 1.01 = 46 Added a few of the parameters available with wp_list_bookmarks, if you want to limit or enhance the output in some way you want this upgrade. -
showlinks/trunk/ShowLinks.php
r528488 r528714 2 2 /** 3 3 * @package Show_Links 4 * @version 1.0 4 * @version 1.01 5 5 */ 6 6 /* … … 9 9 Description: Show links added with the dashboard using a shortcode [showlinks] in posts. 10 10 Author: Niklas Rydén 11 Version: 1.0 11 Version: 1.01 12 12 Author URI: http://kafit.se/ 13 13 */ 14 14 15 15 function showlinksfunc($slparams) { 16 // The line below is only for debugging while coding...you can delete it if it bothers you. 17 // printf('<pre>');print_r($slparams);printf('</pre>'); 18 19 // The base parameters we want to use... 16 20 $parameters = 'title_li=&categorize=0'; 17 if (isset($slparams['category_name'])) { 18 $parameters = $parameters.'&category_name='.$slparams['category_name']; 19 } 21 22 // Comma-separated ID-list 23 if (isset($slparams['category'])) { $parameters = $parameters.'&category='.$slparams['category']; } 24 25 // The actual category name...yes...it's kind of...stupid...need to change this to permalink somehow to avoid melt down. 26 if (isset($slparams['category_name'])) { $parameters = $parameters.'&category_name='.$slparams['category_name']; } 27 28 // 1 = true (default), 0 = false 29 if (isset($slparams['show_images'])) { $parameters = $parameters.'&show_images='.$slparams['show_images']; } 30 31 // 1 = true, 0 = false (default) Only needed when using images. 32 if (isset($slparams['show_name'])) { $parameters = $parameters.'&show_name='.$slparams['show_name']; } 33 34 // 1 = true, 0 = false (default) 35 if (isset($slparams['show_description'])) { $parameters = $parameters.'&show_description='.$slparams['show_description']; } 36 20 37 wp_list_bookmarks($parameters); 21 38 } -
showlinks/trunk/readme.txt
r528458 r528714 7 7 Requires at least: 2.1 8 8 Tested up to: 3.3.1 9 Stable tag: 1.0 9 Stable tag: 1.01 10 10 11 A small plugin whose only purpose is to show links added with the Dashboard, using a short code.11 A small plugin whose only purpose is to show links added with the Dashboard, using a shortcode. 12 12 13 13 == Description == 14 A small plugin whose only purpose is to show links added with the Dashboard, using a short code.14 A small plugin whose only purpose is to show links added with the Dashboard, using a shortcode. 15 15 16 16 == Installation == 17 17 Place showlinks.php the plugin directory, activate it in the Dashboard, add the short code [showlinks] to any page or post. 18 18 19 Available parameters: 20 category=<comma-separated ID-list> // Cannot be used along with category name 21 category_name="<category title>" // Cannot be used along with category 22 show_images=1 or 0 (1=true (default), 0=false) 23 show_name=1 or 0 (1=true, 0=false (default)) // Only active when picture is set for link 24 show_description=1 or 0 (1=true, 0=false (default) 25 26 Examples: 27 To show category ID's 2 and 5 along with the description 28 [showlinks category=2,5 show_description=1] 29 30 To show link category "Räksmörgås" (Yes, this is some what stupid when using characters like this... use ID's instead if possible.) 31 [showlink category_name="Räksmörgås"] 32 19 33 Done! 20 34 35 == Changelog == 21 36 37 = 1.0 = 38 * We removed all the code written when I was overthinking and left one line... 39 40 = 1.01 = 41 * Added the options category, category_name, show_images, show_name and show_description. 42 43 == Upgrade Notice == 44 45 = 1.01 = 46 Added a few of the parameters available with wp_list_bookmarks, if you want to limit or enhance the output in some way you want this upgrade.
Note: See TracChangeset
for help on using the changeset viewer.