Changeset 561284
- Timestamp:
- 06/20/2012 07:02:23 PM (14 years ago)
- Location:
- wp-wiki-userprofile
- Files:
-
- 1 added
- 2 edited
-
tags/1.1 (added)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/wp-wiki-userprofile.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-wiki-userprofile/trunk/readme.txt
r553340 r561284 4 4 Tags: widget, wiki 5 5 Requires at least: 2.8 6 Tested up to: 3. 3.27 Stable tag: 1. 06 Tested up to: 3.4 7 Stable tag: 1.1 8 8 License: GPLv2 9 9 … … 16 16 using CURL request. 17 17 18 = Plugin Features = 19 20 * Widget Support 21 * Shortcode support 22 23 = Shortcode Usage = 24 *`[wikiuser]` 25 *`[wikiuser param="editcount"]` 26 *`[wikiuser username="xxx" param="editcount"]` 27 28 18 29 19 30 == Installation == … … 25 36 1. Upload the entire `wp-wiki-userprofile` folder to the `/wp-content/plugins/` directory 26 37 2. Activate the plugin through the 'Plugins' menu in WordPress 38 39 27 40 28 41 … … 44 57 == Changelog == 45 58 59 = 1.1 = 60 * Shortcode support added. 61 46 62 = 1.0 = 47 63 * Initial release. -
wp-wiki-userprofile/trunk/wp-wiki-userprofile.php
r553340 r561284 4 4 Plugin URI: http://wordpress.org/extend/plugins/wp-wiki-userprofile/ 5 5 Description: This plugin is used to grab Wikipedia user contribution to wordpress blog. 6 Version: 1. 06 Version: 1.1 7 7 Author: Gowri Sankar Ramasamy. 8 8 License: GPL2 … … 61 61 62 62 echo ' 63 <div class="wrap"> 63 64 <form method="post" action="" name="wiki-profile-form"> 64 <div class="wrap"> 65 65 66 <div class="icon32" id="icon-options-general"><br> 66 67 </div> … … 86 87 <input type="submit" value="Save Changes" class="button-primary" name="wiki-profile-submit"> 87 88 </p> 89 90 </form> 91 <div class="shortcode-doc"> 92 <strong>Example Shortcode Usage</strong> 93 <ul> 94 <li>[wikiuser]</li> 95 <li>[wikiuser param="editcount"]</li> 96 <li>[wikiuser username="xxx" param="editcount"]</li> 97 </ul> 88 98 </div> 89 </form> 99 <div class="feedback-doc"> 100 <strong>Feedback</strong> 101 <p>Feel free to contact me <a href="mailto:[email protected]?subject=Wp Wiki Userprofile">[email protected]</a>. I like to hear <a href="mailto:[email protected]?subject=Wp Wiki Userprofile Feedback">Feedback</a>, <a href="mailto:[email protected]?subject=Wp Wiki Userprofile Suggestion">Suggestion</a>, <a href="mailto:[email protected]?subject=Wp Wiki Userprofile Bug Report">Bug Report</a> or <a href="mailto:[email protected]?subject=Wp Wiki Userprofile Future request">Future request</a> from you.</p> 102 </div> 103 </div> 104 90 105 91 106 '; … … 159 174 } 160 175 161 function get_wiki_response( ){176 function get_wiki_response($wiki_username = "",$wiki_user_param=""){ 162 177 do_action('get_wiki_response'); 163 178 164 $codecocktail_wiki_username = get_option("codecocktail_wiki_username"); 165 $codecocktail_wiki_user_param = get_option("codecocktail_wiki_user_param"); 179 $codecocktail_wiki_username = ($wiki_username=="" ? get_option("codecocktail_wiki_username"):$wiki_username); 180 $codecocktail_wiki_user_param = ($wiki_user_param=="" ? get_option("codecocktail_wiki_user_param"):$wiki_user_param); 181 166 182 167 183 $wiki_API_URL ="http://en.wikipedia.org/w/api.php?format=json&action=query&list=users&ususers=".$codecocktail_wiki_username."&usprop=".$codecocktail_wiki_user_param.""; … … 251 267 252 268 253 function get_wiki_display( ){254 255 $array = get_wiki_response( );269 function get_wiki_display($wiki_username = "",$wiki_user_param=""){ 270 271 $array = get_wiki_response($wiki_username,$wiki_user_param); 256 272 257 273 $wiki_reposnse = $array['query']['users']; … … 359 375 add_action( 'widgets_init', create_function( '', 'register_widget( "wiki_profile_widget" );' ) ); 360 376 377 /** 378 * short code support added. 379 * 380 * @version 1.1 381 * 382 * @param username,param. 383 */ 384 385 function wikiuser_shortcode($atts) { 386 387 $codecocktail_wiki_username = get_option("codecocktail_wiki_username"); 388 $codecocktail_wiki_user_param = get_option("codecocktail_wiki_user_param"); 389 390 extract(shortcode_atts(array( 391 'username' => $codecocktail_wiki_username, 392 'param' => $codecocktail_wiki_user_param, 393 ), $atts)); 394 395 return get_wiki_display($username,$param); 396 } 397 add_shortcode('wikiuser', 'wikiuser_shortcode');
Note: See TracChangeset
for help on using the changeset viewer.