WordPress.org

Plugin Directory

Changeset 585383


Ignore:
Timestamp:
08/14/12 14:01:13 (21 months ago)
Author:
M66B
Message:

1.163 dev fix for defaults when not using the post editor #3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • add-link-to-facebook/trunk/add-link-to-facebook-class.php

    r583877 r585383  
    12251225                add_post_meta($post_id, c_al2fb_meta_log, date('c') . ' Save post'); 
    12261226 
    1227             // Apply defaults if no form 
    1228             if (!isset($_POST['al2fb_form'])) { 
    1229                 update_post_meta($post_id, c_al2fb_meta_exclude, get_user_meta($user_ID, c_al2fb_meta_exclude_default, true)); 
    1230                 update_post_meta($post_id, c_al2fb_meta_exclude_video, get_user_meta($user_ID, c_al2fb_meta_exclude_default_video, true)); 
    1231             } 
    1232  
    12331227            // Security checks 
    12341228            $nonce = (isset($_POST[c_al2fb_nonce_form]) ? $_POST[c_al2fb_nonce_form] : null); 
     
    13931387            if (self::user_can($user_ID, get_option(c_al2fb_option_min_cap)) && 
    13941388                (self::Is_authorized($user_ID) || self::Is_login_authorized($user_ID, true))) { 
     1389                // Apply defaults if no form 
     1390                if (!isset($_POST['al2fb_form'])) { 
     1391                    update_post_meta($post->ID, c_al2fb_meta_exclude, get_user_meta($user_ID, c_al2fb_meta_exclude_default, true)); 
     1392                    update_post_meta($post->ID, c_al2fb_meta_exclude_video, get_user_meta($user_ID, c_al2fb_meta_exclude_default_video, true)); 
     1393                } 
     1394 
    13951395                // Check if not added/excluded 
    13961396                if (!get_post_meta($post->ID, c_al2fb_meta_link_id, true) && 
Note: See TracChangeset for help on using the changeset viewer.