Changeset 1823697
- Timestamp:
- 02/17/2018 07:37:08 AM (8 years ago)
- Location:
- muun-members-directory/trunk
- Files:
-
- 1 added
- 2 edited
-
muun-javascript.js (added)
-
muun-members-directory.php (modified) (8 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
muun-members-directory/trunk/muun-members-directory.php
r1759070 r1823697 2 2 /** 3 3 Plugin Name: Muun members directory 4 Plugin URI: http://www.gomuun.com/wordpress 5 Description: Get an always up to date overview of your coworking space and community members. A monthly subscription for Muun is needed.6 Tags: co working, coworkingspace, community, remotework, members, member directory, members overview7 Version: 1. 04 Plugin URI: http://www.gomuun.com/wordpress-plugin 5 Description: Get an always up to date member directory for your community. A monthly subscription for Muun is needed. 6 Tags: community, coworkingspace, remotework, members, member directory, members overview 7 Version: 1.2 8 8 Author: Muun 9 9 Author URI: http://www.gomuun.com … … 19 19 add_action( 'admin_menu', [ $this, 'admin_menu' ] ); 20 20 add_action( 'wp_enqueue_scripts', [ $this, 'enqueue' ] ); 21 add_action( 'wp_enqueue_scripts', [ $this, 'add_js' ] ); 21 22 add_shortcode( 'muun-members-directory', [ $this, 'shortcode' ] ); 22 23 … … 32 33 if( !empty( $this->options[ 'enable_style' ] ) ) 33 34 wp_enqueue_style( 'muunmembers', 'https://www.gomuun.com/v1/css.css' ); 35 } 36 37 public function add_js() { 38 if( empty( $this->options[ 'enable_popup' ] ) ) 39 wp_enqueue_script('muun-javascript', plugin_dir_url(__FILE__) . 'muun-javascript.js', array('jquery')); 34 40 } 35 41 … … 63 69 if( $this->options[ 'inline_images' ] ) { 64 70 return sprintf( ' 65 <div class="muunmembers__member" style="background-image: url(%s)">71 <div class="muunmembers__member" data-muun-name="%s" style="background-image: url(%s)" data-muun-headline="%s" data-muun-bio="%s" data-muun-email="%s" data-muun-website="%s" data-muun-twitter="%s" data-muun-facebook="%s" data-muun-instagram="%s" data-muun-linkedin="%s" data-muun-expertises="%s"> 66 72 <p class="muunmembers__name">%s</p> 67 <p class="muunmembers__headline">%s</p> 68 </div>', $v->user->avatar, $v->user->name, $v->user->headline ); 73 </div>', 74 $v->user->name, 75 $v->user->avatar, 76 $v->user->headline, 77 $v->user->bio, 78 $v->user->email, 79 $v->user->website, 80 $v->user->twitter, 81 $v->user->facebook, 82 $v->user->instagram, 83 $v->user->linkedin, 84 implode(', ', $v->user->expertises), 85 str_replace('%20', ' ', $v->user->name) 86 ); 69 87 } else { 70 88 return sprintf( ' … … 72 90 <img src="%s" class="muunmembers__avatar"> 73 91 <p class="muunmembers__name">%s</p> 74 <p class="muunmembers__headline">%s</p> 75 </div>', $v->user->avatar, $v->user->name, $v->user->headline ); 92 </div>', $v->user->avatar, $v->user->name ); 76 93 } 77 94 }, $this->members ); 78 95 79 return sprintf( '<div id="muun-members" class="muunmembers">%s</div>', implode( '', $html ) );96 return sprintf( '<div id="muun-members" data-muun-brand-color="%s" class="muunmembers">%s</div>', $data, implode( '', $html ) ); 80 97 } 81 98 return; … … 100 117 'space_id' => htmlentities( $_POST[ 'space_id' ] ), 101 118 'enable_style' => !empty( $_POST[ 'enable_style' ] ), 102 'inline_images' => empty( $_POST[ 'inline_images' ] ) 119 'inline_images' => empty( $_POST[ 'inline_images' ] ), 120 'enable_popup' => empty( $_POST[ 'enable_popup' ] ) 103 121 ]; 104 122 update_option( 'muunmembers_options', $save ); … … 120 138 <table class="form-table"> 121 139 <tr> 122 <th scope="row"><label for="space_id">Your space 'sID</label></th>140 <th scope="row"><label for="space_id">Your space ID</label></th> 123 141 <td><input name="space_id" type="text" id="space_id" value="<?=$option[ 'space_id' ]?>" class="regular-text" required="1" /></td> 124 142 </tr> … … 130 148 <th scope="row"><label for="inline-images">Inline avatar images</label></th> 131 149 <td><input name="inline_images" type="checkbox" id="inline_images" <?=( $option[ 'inline_images' ] ? '' : 'checked' )?> /></td> 150 </tr> 151 <tr> 152 <th scope="row"><label for="enable_popup">Enable popup</label></th> 153 <td><input name="enable_popup" type="checkbox" id="enable_popup" <?=( $option[ 'enable_popup' ] ? '' : 'checked' )?> /></td> 132 154 </tr> 133 155 </table> -
muun-members-directory/trunk/readme.txt
r1799484 r1823697 26 26 27 27 == Changelog == 28 1.2 The member directory now supports overlays. Get more information about each community member by clicking its image 29 1.1 Some minor description changes to reflect the new Muun better 28 30 1. The initial version. 🚀
Note: See TracChangeset
for help on using the changeset viewer.