Changeset 561301
- Timestamp:
- 06/20/2012 07:25:27 PM (14 years ago)
- Location:
- wp-wiki-userprofile/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (4 diffs)
-
wp-wiki-userprofile.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-wiki-userprofile/trunk/readme.txt
r561284 r561301 4 4 Tags: widget, wiki 5 5 Requires at least: 2.8 6 Tested up to: 3. 47 Stable tag: 1. 16 Tested up to: 3.3.2 7 Stable tag: 1.0 8 8 License: GPLv2 9 9 … … 16 16 using CURL request. 17 17 18 = Plugin Features =19 20 * Widget Support21 * Shortcode support22 23 = Shortcode Usage =24 *`[wikiuser]`25 *`[wikiuser param="editcount"]`26 *`[wikiuser username="xxx" param="editcount"]`27 28 29 18 30 19 == Installation == … … 36 25 1. Upload the entire `wp-wiki-userprofile` folder to the `/wp-content/plugins/` directory 37 26 2. Activate the plugin through the 'Plugins' menu in WordPress 38 39 40 27 41 28 … … 57 44 == Changelog == 58 45 59 = 1.1 =60 * Shortcode support added.61 62 46 = 1.0 = 63 47 * Initial release. -
wp-wiki-userprofile/trunk/wp-wiki-userprofile.php
r561284 r561301 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. 16 Version: 1.0 7 7 Author: Gowri Sankar Ramasamy. 8 8 License: GPL2 … … 61 61 62 62 echo ' 63 <form method="post" action="" name="wiki-profile-form"> 63 64 <div class="wrap"> 64 <form method="post" action="" name="wiki-profile-form">65 66 65 <div class="icon32" id="icon-options-general"><br> 67 66 </div> … … 87 86 <input type="submit" value="Save Changes" class="button-primary" name="wiki-profile-submit"> 88 87 </p> 89 88 </div> 90 89 </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>98 </div>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 105 90 106 91 '; … … 174 159 } 175 160 176 function get_wiki_response( $wiki_username = "",$wiki_user_param=""){161 function get_wiki_response(){ 177 162 do_action('get_wiki_response'); 178 163 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 164 $codecocktail_wiki_username = get_option("codecocktail_wiki_username"); 165 $codecocktail_wiki_user_param = get_option("codecocktail_wiki_user_param"); 182 166 183 167 $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.""; … … 267 251 268 252 269 function get_wiki_display( $wiki_username = "",$wiki_user_param=""){270 271 $array = get_wiki_response( $wiki_username,$wiki_user_param);253 function get_wiki_display(){ 254 255 $array = get_wiki_response(); 272 256 273 257 $wiki_reposnse = $array['query']['users']; … … 375 359 add_action( 'widgets_init', create_function( '', 'register_widget( "wiki_profile_widget" );' ) ); 376 360 377 /**378 * short code support added.379 *380 * @version 1.1381 *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.