Changeset 998806
- Timestamp:
- 09/29/2014 10:07:07 PM (12 years ago)
- Location:
- wpsol/trunk
- Files:
-
- 6 edited
-
common.php (modified) (9 diffs)
-
languages/wpsol-nl_NL.mo (modified) (previous)
-
languages/wpsol-nl_NL.po (modified) (3 diffs)
-
languages/wpsol.pot (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
-
wpsol.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpsol/trunk/common.php
r854934 r998806 24 24 ); 25 25 $args = wp_parse_args( $args, $defaults ); 26 26 27 27 if( !$args['sidebar'] ) 28 28 $echo = '<hr id="openid_split" style="clear: both; margin-bottom: 1.0em; border: 0; border-top: 1px solid #999; height: 1px;" />'; … … 33 33 background-image: url(\'' . plugins_url( 'scnllogo.png', __FILE__ ) . '\'); 34 34 background-position: 3px 50%; 35 background-repeat: no-repeat; 36 padding-left: 21px !important; 35 background-repeat: no-repeat; 36 padding-left: 21px !important; 37 37 } 38 38 </style> … … 95 95 header('Location: ' . $openid->authUrl()); 96 96 } 97 } 97 } 98 98 } 99 99 catch( ErrorException $e ) … … 144 144 { // uhm. 145 145 // ToDo - notificatie naar site-admin o.i.d. 146 // mogelijke fouten: 146 // mogelijke fouten: 147 147 // - user_id != email_id ( wat te doen ) 148 148 // - ??? … … 177 177 update_user_meta( $user->ID, 'first_name', substr($gegevens['namePerson'], 0, strpos($gegevens['namePerson'], " ") ) ); 178 178 update_user_meta( $user->ID, 'last_name', substr($gegevens['namePerson'], strpos($gegevens['namePerson'], " ")+1 ) ); 179 } 179 } 180 181 // add login filter to redirect 182 add_filter( 'login_redirect', 'wpsol_login_redirect' ); 180 183 181 184 return $user; … … 193 196 update_option('wpsol_username_prefix', 'sn_'); 194 197 update_option('wpsol_autocreate', true); 198 update_option('wpsol_login_redirect', 'default'); 199 update_option('wpsol_logout_redirect', 'default'); 200 } 201 202 // Redirect after login 203 function wpsol_login_redirect() 204 { 205 if( get_option('wpsol_login_redirect') == "frontpage" ) 206 { 207 return "/"; 208 } 209 elseif( get_option('wpsol_login_redirect') == "dashboard" ) 210 { 211 return "/wp-admin/"; 212 } 213 } 214 215 // Redirect after logout 216 function wpsol_logout_redirect() 217 { 218 if( get_option('wpsol_logout_redirect') == "frontpage" ) 219 { 220 wp_redirect( home_url() ); 221 exit; 222 } 195 223 } 196 224 … … 203 231 } 204 232 205 // variables for the field and option names 233 // variables for the field and option names 206 234 $options = array( 207 235 'wpsol_display_name' => array( … … 209 237 'type' => 'select', 210 238 'options' => array( 211 'fullname' => __('Full name', 'wpsol'), 212 'firstname' => __('First name', 'wpsol'), 213 'lastname' => __('Last name', 'wpsol'), 239 'fullname' => __('Full name', 'wpsol'), 240 'firstname' => __('First name', 'wpsol'), 241 'lastname' => __('Last name', 'wpsol'), 214 242 'username' => __('Username', 'wpsol'), 215 243 ), … … 232 260 'help' => __('By giving a prefix like sn_ you can easily identify which accounts are from Scouting Nederland', 'wpsol'), 233 261 ), 262 'wpsol_login_redirect' => array( 263 'name' => __('After a successful login redirect user to: ', 'wpsol'), 264 'type' => 'select', 265 'options' => array( 266 'default' => __('Default (no action)', 'wpsol'), 267 'frontpage' => __('Frontpage', 'wpsol'), 268 'dashboard' => __('Dashboard', 'wpsol'), 269 ), 270 ), 271 'wpsol_logout_redirect' => array( 272 'name' => __('After logout redirect user to: ', 'wpsol'), 273 'type' => 'select', 274 'options' => array( 275 'default' => __('Default (no action)', 'wpsol'), 276 'frontpage' => __('Frontpage', 'wpsol'), 277 ), 278 ), 234 279 ); 235 280 236 // See if the user has posted us some information237 $hidden_field_name = 'wpsol_hidden';238 if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' )281 // See if the user has posted us some information 282 $hidden_field_name = 'wpsol_hidden'; 283 if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' ) 239 284 { 240 285 foreach($options as $key => $opt) -
wpsol/trunk/languages/wpsol-nl_NL.po
r926300 r998806 4 4 msgid "" 5 5 msgstr "" 6 "Project-Id-Version: wpSOL 0.5\n"6 "Project-Id-Version: wpSOL 1.0.3\n" 7 7 "Report-Msgid-Bugs-To: http://wordpress.org/tag/wpsol\n" 8 8 "POT-Creation-Date: 2014-01-07 15:09:59+00:00\n" … … 21 21 msgstr "Log in met je SOL account" 22 22 23 #: common.php:2 0223 #: common.php:230 24 24 msgid "You do not have sufficient permissions to access this page." 25 25 msgstr "Je hebt onvoldoende rechten voor het bekijken van deze pagina." 26 26 27 #: common.php:2 0827 #: common.php:236 28 28 msgid "Set display_name to: " 29 29 msgstr "Stel display_name in op: " 30 30 31 #: common.php:2 1131 #: common.php:239 32 32 msgid "Full name" 33 33 msgstr "Volledige naam" 34 34 35 #: common.php:2 1235 #: common.php:240 36 36 msgid "First name" 37 37 msgstr "Voornaam" 38 38 39 #: common.php:2 1339 #: common.php:241 40 40 msgid "Last name" 41 41 msgstr "Achternaam" 42 42 43 #: common.php:2 1443 #: common.php:242 44 44 msgid "Username" 45 45 msgstr "Gebruikersnaam" 46 46 47 #: common.php:2 1847 #: common.php:246 48 48 msgid "Force display_name on each login: " 49 49 msgstr "Forceer display_name bij elke login: " 50 50 51 #: common.php:2 2251 #: common.php:250 52 52 msgid "Force first and last name on each login: " 53 53 msgstr "Forceer voornaam en achternaam bij elke login: " 54 54 55 #: common.php:2 2655 #: common.php:254 56 56 msgid "Automatically create new users: " 57 57 msgstr "Automatisch nieuwe gebruikers aanmaken: " 58 58 59 #: common.php:2 3059 #: common.php:258 60 60 msgid "Prefix for all Scouting Nederland users: " 61 61 msgstr "Voorvoegsel voor alle Scouting Nederland users: " 62 62 63 #: common.php:2 3263 #: common.php:260 64 64 msgid "" 65 65 "By giving a prefix like sn_ you can easily identify which accounts are from " … … 69 69 "Nederland makkelijk terugvinden" 70 70 71 #: common.php:246 71 #: common.php:263 72 msgid "After a successful login redirect user to: " 73 msgstr "Na een succesvolle login redirect naar: " 74 75 #: common.php:266 common.php:275 76 msgid "Default (no action)" 77 msgstr "Standaard (geen actie)" 78 79 #: common.php:267 common.php:276 80 msgid "Frontpage" 81 msgstr "Frontpage" 82 83 #: common.php:268 84 msgid "Dashboard" 85 msgstr "Dashboard" 86 87 #: common.php:272 88 msgid "After logout redirect user to: " 89 msgstr "Na uitloggen redirect naar: " 90 91 #: common.php:291 72 92 msgid "Settings Saved" 73 93 msgstr "Instellingen Opgeslagen" 74 94 75 #: common.php:2 5395 #: common.php:298 76 96 msgid "wpSOL [ScoutsOnLine] Settings" 77 97 msgstr "wpSOL [ScoutsOnLine] Instellingen" 78 98 79 #: common.php:3 0099 #: common.php:345 80 100 msgid "Save Changes" 81 101 msgstr "Wijzigingen Opslaan" -
wpsol/trunk/languages/wpsol.pot
r997971 r998806 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: wpSOL 1.0. 2\n"5 "Project-Id-Version: wpSOL 1.0.3\n" 6 6 "Report-Msgid-Bugs-To: http://wordpress.org/tag/wpsol\n" 7 "POT-Creation-Date: 2014-09-2 800:00:00+00:00\n"7 "POT-Creation-Date: 2014-09-29 00:00:00+00:00\n" 8 8 "MIME-Version: 1.0\n" 9 9 "Content-Type: text/plain; charset=UTF-8\n" … … 17 17 msgstr "" 18 18 19 #: common.php:2 0219 #: common.php:230 20 20 msgid "You do not have sufficient permissions to access this page." 21 21 msgstr "" 22 22 23 #: common.php:2 0823 #: common.php:236 24 24 msgid "Set display_name to: " 25 25 msgstr "" 26 26 27 #: common.php:2 1127 #: common.php:239 28 28 msgid "Full name" 29 29 msgstr "" 30 30 31 #: common.php:2 1231 #: common.php:240 32 32 msgid "First name" 33 33 msgstr "" 34 34 35 #: common.php:2 1335 #: common.php:241 36 36 msgid "Last name" 37 37 msgstr "" 38 38 39 #: common.php:2 1439 #: common.php:242 40 40 msgid "Username" 41 41 msgstr "" 42 42 43 #: common.php:2 1843 #: common.php:246 44 44 msgid "Force display_name on each login: " 45 45 msgstr "" 46 46 47 #: common.php:2 2247 #: common.php:250 48 48 msgid "Force first and last name on each login: " 49 49 msgstr "" 50 50 51 #: common.php:2 2651 #: common.php:254 52 52 msgid "Automatically create new users: " 53 53 msgstr "" 54 54 55 #: common.php:2 3055 #: common.php:258 56 56 msgid "Prefix for all Scouting Nederland users: " 57 57 msgstr "" 58 58 59 #: common.php:2 3259 #: common.php:260 60 60 msgid "" 61 61 "By giving a prefix like sn_ you can easily identify which accounts are from " … … 63 63 msgstr "" 64 64 65 #: common.php:246 65 #: common.php:263 66 msgid "After a successful login redirect user to: " 67 msgstr "" 68 69 #: common.php:266 common.php:275 70 msgid "Default (no action)" 71 msgstr "" 72 73 #: common.php:267 common.php:276 74 msgid "Frontpage" 75 msgstr "" 76 77 #: common.php:268 78 msgid "Dashboard" 79 msgstr "" 80 81 #: common.php:272 82 msgid "After logout redirect user to: " 83 msgstr "" 84 85 #: common.php:291 66 86 msgid "Settings Saved" 67 87 msgstr "" 68 88 69 #: common.php:2 5389 #: common.php:298 70 90 msgid "wpSOL [ScoutsOnLine] Settings" 71 91 msgstr "" 72 92 73 #: common.php:3 0093 #: common.php:345 74 94 msgid "Save Changes" 75 95 msgstr "" -
wpsol/trunk/readme.txt
r997971 r998806 42 42 == Changelog == 43 43 44 = v1.0.3 = 45 * added a redirect option for login and logout to go to the frontpage 46 44 47 = v1.0.2 = 45 48 * moved code from bitbucket to github -
wpsol/trunk/wpsol.php
r926412 r998806 6 6 Author: Gerrit Jan and Dennis 7 7 Author URI: http://wordpress.org/plugins/wpsol/ 8 Version: 1.0. 28 Version: 1.0.3 9 9 License: 10 10 Text Domain: wpSOL … … 21 21 22 22 // Gebruikersnaam veld toevoegen aan de login pagina 23 add_action( 'login_form', 'wpsol_wp_login_form' ); 24 add_filter( 'login_form_middle', 'wpsol_wp_login_form_middle' ); 23 add_action( 'login_form', 'wpsol_wp_login_form' ); 24 add_filter( 'login_form_middle', 'wpsol_wp_login_form_middle' ); 25 25 26 26 // Inhaken op het authenticatie process … … 39 39 add_action( 'admin_menu', 'wpsol_admin_menu' ); 40 40 41 // add logout redirect 42 add_action( 'wp_logout', 'wpsol_logout_redirect'); 43 41 44 // Setup defaults during installation 42 45 register_activation_hook( __FILE__, 'wpsol_install' );
Note: See TracChangeset
for help on using the changeset viewer.