WordPress.org

Plugin Directory

Changeset 471310


Ignore:
Timestamp:
12/05/11 20:44:39 (2 years ago)
Author:
hd-J
Message:

Fix for Custom fields that were saved for each post instead of my CPT only

Location:
wp-facebook-applications
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-facebook-applications/tags/0.4.4/readme.txt

    r470326 r471310  
    55Requires at least: 3.0 
    66Tested up to: 3.3 
    7 Stable tag: 0.4.3 
     7Stable tag: 0.4.4 
    88 
    99Create custom tabs for your Facebook pages, hosted on your WordPress blog. 
     
    6363== Changelog == 
    6464 
     65= 0.4.4 = 
     66* Save Facebook App settings only for the plugin tabs, not for other custom post types  
     67 
    6568= 0.4.3 = 
    6669* Fix styling issue on admin page with WordPress 3.3 
  • wp-facebook-applications/tags/0.4.4/wp-fb-applications.php

    r470326 r471310  
    22/* 
    33Plugin Name: WP-Facebook applications 
    4 Version: 0.4.3 
     4Version: 0.4.4 
    55Plugin URI: http://www.werewp.com/my-plugins/wp-facebook-applications/ 
    66Description: Create custom tabs for your Facebook pages, hosted on your WordPress blog. 
     
    130130function werewp_save_details(){ 
    131131    global $post; 
    132   
    133     update_post_meta($post->ID, 'appid', $_POST['appid']); 
    134     update_post_meta($post->ID, 'appsecret', $_POST['appsecret']); 
    135     update_post_meta($post->ID, 'fbcomments', $_POST['fbcomments']); 
     132 
     133    if ( $post->post_type == 'werewp_fbapp' ) { 
     134        update_post_meta($post->ID, 'appid', $_POST['appid']); 
     135        update_post_meta($post->ID, 'appsecret', $_POST['appsecret']); 
     136        update_post_meta($post->ID, 'fbcomments', $_POST['fbcomments']); 
     137    } 
    136138} 
    137139add_action( 'save_post', 'werewp_save_details' ); 
  • wp-facebook-applications/trunk/readme.txt

    r470326 r471310  
    55Requires at least: 3.0 
    66Tested up to: 3.3 
    7 Stable tag: 0.4.3 
     7Stable tag: 0.4.4 
    88 
    99Create custom tabs for your Facebook pages, hosted on your WordPress blog. 
     
    6363== Changelog == 
    6464 
     65= 0.4.4 = 
     66* Save Facebook App settings only for the plugin tabs, not for other custom post types  
     67 
    6568= 0.4.3 = 
    6669* Fix styling issue on admin page with WordPress 3.3 
  • wp-facebook-applications/trunk/wp-fb-applications.php

    r470326 r471310  
    22/* 
    33Plugin Name: WP-Facebook applications 
    4 Version: 0.4.3 
     4Version: 0.4.4 
    55Plugin URI: http://www.werewp.com/my-plugins/wp-facebook-applications/ 
    66Description: Create custom tabs for your Facebook pages, hosted on your WordPress blog. 
     
    130130function werewp_save_details(){ 
    131131    global $post; 
    132   
    133     update_post_meta($post->ID, 'appid', $_POST['appid']); 
    134     update_post_meta($post->ID, 'appsecret', $_POST['appsecret']); 
    135     update_post_meta($post->ID, 'fbcomments', $_POST['fbcomments']); 
     132 
     133    if ( $post->post_type == 'werewp_fbapp' ) { 
     134        update_post_meta($post->ID, 'appid', $_POST['appid']); 
     135        update_post_meta($post->ID, 'appsecret', $_POST['appsecret']); 
     136        update_post_meta($post->ID, 'fbcomments', $_POST['fbcomments']); 
     137    } 
    136138} 
    137139add_action( 'save_post', 'werewp_save_details' ); 
Note: See TracChangeset for help on using the changeset viewer.