Plugin Directory

Changeset 1133370


Ignore:
Timestamp:
04/12/2015 07:54:15 PM (10 years ago)
Author:
gdurtan
Message:

up to 1.2.0

Location:
forms-actions/trunk
Files:
6 added
4 edited

Legend:

Unmodified
Added
Removed
  • forms-actions/trunk/Forms_actions.php

    r1122878 r1133370  
    66Author: gdurtan
    77Author URI: grzegorz.durtan.pl
    8 Version: 1.1.1
     8Version: 1.2.1
    99License: GPL2
    1010*/
    11 define('Forms_actions','Forms_actions.1.1.1');
     11define('Forms_actions','Forms_actions.1.2.1');
    1212
    1313function fa_alpaca_lib_init() {
     
    479479            foreach ($param as $key) {
    480480                $key = explode(':',$key);
     481                if($key[1] == '{user_id}'){
     482                    $current_user_id = get_current_user_id();
     483                    $key[1] = $current_user_id;
     484                }
    481485                $param_array[$key[0]] = $key[1];
     486               
    482487            }
    483488
    484489        }
     490
    485491
    486492        if($returnObj["redirect_to_url"] != null){
     
    510516}
    511517
    512 function process_actions($args){
     518function 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
    513529    if($args != NULL){
    514530
     
    524540                        @call_user_func_array($key,array($value));
    525541                        //echo $key.'('.array($value).')<br/>';
     542                        //var_dump($key,$value);
    526543                    }
    527544                }
     
    543560}
    544561
     562add_action('admin_menu', 'FA_menu');
     563function 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
     575function 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  
    268268            $userdata['role'] = $value;
    269269        }
    270         $userdata['role'] = 'pending';
     270        $userdata['role'] = 'subscriber';
    271271
    272272    }
     
    319319            $activation_link = add_query_arg( array( 'key' => $code, 'user' => $user_id, 'redirect_id' => $id_to_redirect ), get_permalink( /* YOUR ACTIVATION PAGE ID HERE */ ));
    320320
     321            echo $activation_link;
     322           
    321323            global $post;
    322324            $display_args = json_decode( urldecode ( get_post_meta($post->ID,'_meta_afd_form_render_box_alpaca', true )), true );
     
    389391function fa_login_user($args){
    390392
    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
    393400    $creds = array();
    394401    foreach ($this_form_array as $key => $value) {
     
    405412
    406413    if ( is_wp_error($user) ){
    407         echo $user->get_error_message();
     414        $return_msg = $user->get_error_message();
    408415
    409416    }else{
     
    417424    }
    418425
     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
    419440
    420441}
  • forms-actions/trunk/readme.txt

    r1122880 r1133370  
    44Requires at least: 3.1
    55Tested up to: 4.0
    6 Stable tag: 1.1.1
     6Stable tag: 1.2.0
    77License: GPLv2 or later
    88
     
    2828
    2929== 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 =
    3137* Better display
    3238* New action - Create post
Note: See TracChangeset for help on using the changeset viewer.