Changeset 1133370
- Timestamp:
- 04/12/2015 07:54:15 PM (10 years ago)
- Location:
- forms-actions/trunk
- Files:
-
- 6 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
forms-actions/trunk/Forms_actions.php
r1122878 r1133370 6 6 Author: gdurtan 7 7 Author URI: grzegorz.durtan.pl 8 Version: 1. 1.18 Version: 1.2.1 9 9 License: GPL2 10 10 */ 11 define('Forms_actions','Forms_actions.1. 1.1');11 define('Forms_actions','Forms_actions.1.2.1'); 12 12 13 13 function fa_alpaca_lib_init() { … … 479 479 foreach ($param as $key) { 480 480 $key = explode(':',$key); 481 if($key[1] == '{user_id}'){ 482 $current_user_id = get_current_user_id(); 483 $key[1] = $current_user_id; 484 } 481 485 $param_array[$key[0]] = $key[1]; 486 482 487 } 483 488 484 489 } 490 485 491 486 492 if($returnObj["redirect_to_url"] != null){ … … 510 516 } 511 517 512 function process_actions($args){ 518 function process_actions($args, $post_id = '', $ajax = false){ 519 520 global $FA_ajax; 521 $FA_ajax = $ajax; 522 global $post; 523 524 if($post_id != ''){ 525 $post = get_post($post_id); 526 } 527 528 513 529 if($args != NULL){ 514 530 … … 524 540 @call_user_func_array($key,array($value)); 525 541 //echo $key.'('.array($value).')<br/>'; 542 //var_dump($key,$value); 526 543 } 527 544 } … … 543 560 } 544 561 562 add_action('admin_menu', 'FA_menu'); 563 function FA_menu() 564 { 565 // editor + administrator = moderate_comments; 566 add_menu_page('Forms actions', 'Forms actions', 'administrator', 'forms_actions', 'forms_actions_callback'); 567 // submenu with calbac 568 //add_submenu_page('acf', 'UiGEN hierarchy', 'UiGEN hierarchy', 'administrator', 'url_uigen_hierarchy', 'UiGEN_hierarchy_callback'); 569 // submenu from defined posttype 570 //add_submenu_page('url_uigen_core', 'UiGEN hierarchy', 'UiGEN hierarchy', 'manage_options', 'edit.php?post_type=template_hierarchy'); //add_submenu_page('url_uigencore', 'Dodaj', 'Dodaj', 'administrator', 'url_add_mod', 'moderator_ADD'); 571 //add_submenu_page('url_uigen_core', 'UiGEN Content parts', 'UiGEN Content parts', 'manage_options', 'edit.php?post_type=content_parts'); //add_submenu_page('url_uigencore', 'Dodaj', 'Dodaj', 'administrator', 'url_add_mod', 'moderator_ADD'); 572 573 } 574 575 function forms_actions_callback(){ 576 require_once( plugin_dir_path( __FILE__ ) . '/inc/fa_admin_gui.php' ); 577 } -
forms-actions/trunk/css/alpaca-wpadmin.css
r1122863 r1133370 1 .alpaca-fieldset{ 2 margin-top:10px; 3 } 4 .alpaca-fieldset-item-container{ 5 margin-bottom:15px; 6 } 7 .alpaca-fieldset .alpaca-fieldset-legend{ 8 font-weight:bold; 9 margin:5px 0 2px 0; 10 padding:0; 11 } 12 13 .alpaca-fieldset .alpaca-controlfield-label{ 14 margin: 5px 0; 15 } 16 17 .alpaca-fieldset .alpaca-fieldset-helper, 18 .alpaca-fieldset .alpaca-controlfield-helper-text{ 19 font-size:11px; 20 } 21 .alpaca-fieldset input[type=text], .alpaca-fieldset select{ 22 width:100%; 23 font-size:11px; 24 } 25 26 .alpaca-controlfield-radio-item{ 27 width:100%; display:block; margin:5px; 28 } 29 .alpaca-fieldset .alpaca-controlfield-radio-item input, 30 .alpaca-fieldset .alpaca-controlfield-radio-item label{ 31 vertical-align: text-bottom; 32 } 33 .alpaca-controlfield-container .alpaca-controlfield-radio{ 34 border-bottom: 1px solid #ddd; 35 border-top: 1px solid #ddd; 36 } 37 38 39 .alpaca-fieldset-array-item-toolbar{ 40 41 display:block !important; 42 position: absolute; 43 margin-top:-5px; 44 } 45 46 47 .alpaca-item-container{ 48 margin-bottom: 10px; 49 border-bottom: 1px solid #F5F5F5; 50 } 51 .alpaca-fieldset-array-toolbar-icon, 52 .alpaca-fieldset-array-item-toolbar-icon{ 53 54 /* float: right; */ 55 margin-left: 5px; 56 margin-bottom: 5px; 57 58 display: inline-block; 59 text-decoration: none; 60 61 margin: 0; 62 63 cursor: pointer; 64 border-width: 1px; 65 border-style: solid; 66 -webkit-appearance: none; 67 -webkit-border-radius: 3px; 68 border-radius: 3px; 69 white-space: nowrap; 70 -webkit-box-sizing: border-box; 71 -moz-box-sizing: border-box; 72 box-sizing: border-box; 73 74 height: 24px; 75 line-height: 22px; 76 padding: 0 6px 1px; 77 font-size: 11px; 78 79 color: #555; 80 border-color: #ccc; 81 background: #f7f7f7; 82 -webkit-box-shadow: inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08); 83 box-shadow: inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08); 84 vertical-align: top; 85 86 } 87 88 .alpaca-field-optional{ 89 border-bottom:2px solid #ccc; 90 } 91 92 #fa_options fieldset fieldset{ 93 background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAASUlEQVQYV2P8+vXrfwYgYGVlBVFw8Pv3bzCbEaQAlyRYwa9fv8AmwABMJ4yPogBdEmQyXAE2SbgVuCThjkR2A7qDwb6AKcDmGwByYTQ1XQWObwAAAABJRU5ErkJggg==); 94 margin:-5px -10px 0px -10px; 95 padding:5px 10px; 96 } 97 .alpaca_wpbox_msg { 98 background:#FDE485 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAS0lEQVQYV2P8+6T1PwMW8Pn1ZbAor6guAyM2RcgKQAoxFKErwFCETQGKIlwK4IrwKQAr+nA+Auw7kC9wAbAifApAtmANApiJMGcAAAhYNfkrKwSwAAAAAElFTkSuQmCC); 99 text-shadow: 1px 1px #fff; 100 margin:0px -10px -10px -10px; 101 padding:5px 10px; 102 font-size:11px 103 } 1 /* css move to ACF Frontend Display */ -
forms-actions/trunk/inc/fa_controllers.php
r1122863 r1133370 268 268 $userdata['role'] = $value; 269 269 } 270 $userdata['role'] = ' pending';270 $userdata['role'] = 'subscriber'; 271 271 272 272 } … … 319 319 $activation_link = add_query_arg( array( 'key' => $code, 'user' => $user_id, 'redirect_id' => $id_to_redirect ), get_permalink( /* YOUR ACTIVATION PAGE ID HERE */ )); 320 320 321 echo $activation_link; 322 321 323 global $post; 322 324 $display_args = json_decode( urldecode ( get_post_meta($post->ID,'_meta_afd_form_render_box_alpaca', true )), true ); … … 389 391 function fa_login_user($args){ 390 392 391 392 $this_form_array = get_fields($post->ID); 393 global $post; 394 global $FA_ajax; 395 396 397 398 $this_form_array = get_fields($post->ID); 399 393 400 $creds = array(); 394 401 foreach ($this_form_array as $key => $value) { … … 405 412 406 413 if ( is_wp_error($user) ){ 407 echo$user->get_error_message();414 $return_msg = $user->get_error_message(); 408 415 409 416 }else{ … … 417 424 } 418 425 426 if($FA_ajax == true){ 427 if($return_msg != ''){ 428 echo $return_msg; 429 }else{ 430 echo json_encode($user); 431 } 432 }else{ 433 echo $return_msg; 434 } 435 436 437 438 439 419 440 420 441 } -
forms-actions/trunk/readme.txt
r1122880 r1133370 4 4 Requires at least: 3.1 5 5 Tested up to: 4.0 6 Stable tag: 1. 1.16 Stable tag: 1.2.0 7 7 License: GPLv2 or later 8 8 … … 28 28 29 29 == Changelog == 30 = 1.1.1 = 30 = 1.2.1 = 31 * Ajax methods 32 33 = 1.1.2 = 34 * Register DB tables 35 36 = 1.1.0 = 31 37 * Better display 32 38 * New action - Create post
Note: See TracChangeset
for help on using the changeset viewer.