WordPress.org

Plugin Directory

Changeset 624937


Ignore:
Timestamp:
11/14/12 00:19:01 (18 months ago)
Author:
niallkennedy
Message:

version 1.1.2. improve PHP 5.2 callbacks support, fix recommendations bar minimum seconds, other misc bugs

Location:
facebook/trunk
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • facebook/trunk/admin/login.php

    r624328 r624937  
    3232 
    3333        if ( ! class_exists( 'Facebook_User' ) ) 
    34             require_once( dirname(__FILE__) . 'facebook-user.php' ); 
     34            require_once( dirname(__FILE__) . '/facebook-user.php' ); 
    3535 
    3636        $facebook_user_data_exists = false; 
     
    7171 
    7272        // priority before js sdk registration needed to add JS inside FbAsyncInit 
    73         add_action( 'admin_enqueue_scripts', 'Facebook_Admin_Login::add_async_load_javascript_filter', -1, 0 ); 
     73        add_action( 'admin_enqueue_scripts', array( 'Facebook_Admin_Login', 'add_async_load_javascript_filter' ), -1, 0 ); 
    7474        // add all others at P11 after scripts registered 
    75         add_action( 'admin_enqueue_scripts', 'Facebook_Admin_Login::enqueue_scripts', 11 ); 
     75        add_action( 'admin_enqueue_scripts', array( 'Facebook_Admin_Login', 'enqueue_scripts' ), 11 ); 
    7676 
    7777        if ( $profile_prompt ) 
    78             add_action( 'admin_notices', 'Facebook_Admin_Login::admin_notice', 1, 0 ); // up top 
     78            add_action( 'admin_notices', array( 'Facebook_Admin_Login', 'admin_notice' ), 1, 0 ); // up top 
    7979    } 
    8080 
     
    9393    public static function add_async_load_javascript_filter() { 
    9494        // async load our script after we async load Facebook JavaScript SDK 
    95         add_filter( 'facebook_jssdk_init_extras', 'Facebook_Admin_Login::async_load_javascript', 10, 2 ); 
     95        add_filter( 'facebook_jssdk_init_extras', array( 'Facebook_Admin_Login', 'async_load_javascript' ), 10, 2 ); 
    9696    } 
    9797 
  • facebook/trunk/admin/settings-app.php

    r624328 r624937  
    5454        if ( $hook_suffix ) { 
    5555            $app_settings->hook_suffix = $hook_suffix; 
    56             register_setting( $hook_suffix, self::OPTION_NAME, 'Facebook_Application_Settings::sanitize_options' ); 
     56            register_setting( $hook_suffix, self::OPTION_NAME, array( 'Facebook_Application_Settings', 'sanitize_options' ) ); 
    5757            add_action( 'load-' . $hook_suffix, array( &$app_settings, 'onload' ) ); 
    5858        } 
     
    7474        $this->settings_api_init(); 
    7575 
    76         add_action( 'admin_enqueue_scripts', 'Facebook_Application_Settings::enqueue_scripts' ); 
     76        add_action( 'admin_enqueue_scripts', array( 'Facebook_Application_Settings', 'enqueue_scripts' ) ); 
    7777    } 
    7878 
     
    8888        // notify of conflicts on the main settings page 
    8989        // tie to an action to allow easy removal on sites/networks that rather not run checks 
    90         add_action( 'facebook_notify_plugin_conflicts', 'Facebook_Settings::plugin_conflicts' ); 
    91  
    92         add_action( 'facebook_settings_before_header_' . $this->hook_suffix, 'Facebook_Application_Settings::before_header' ); 
    93         add_action( 'facebook_settings_after_header_' . $this->hook_suffix, 'Facebook_Application_Settings::after_header' ); 
     90        add_action( 'facebook_notify_plugin_conflicts', array( 'Facebook_Settings', 'plugin_conflicts' ) ); 
     91 
     92        add_action( 'facebook_settings_before_header_' . $this->hook_suffix, array( 'Facebook_Application_Settings', 'before_header' ) ); 
     93        add_action( 'facebook_settings_after_header_' . $this->hook_suffix, array( 'Facebook_Application_Settings', 'after_header' ) ); 
    9494 
    9595        Facebook_Settings::settings_page_template( $this->hook_suffix, __( 'Facebook for WordPress', 'facebook' ) ); 
  • facebook/trunk/admin/settings-comments.php

    r624328 r624937  
    7373        if ( $hook_suffix ) { 
    7474            $comments_settings->hook_suffix = $hook_suffix; 
    75             register_setting( $hook_suffix, self::OPTION_NAME, 'Facebook_Comments_Settings::sanitize_options' ); 
     75            register_setting( $hook_suffix, self::OPTION_NAME, array( 'Facebook_Comments_Settings', 'sanitize_options' ) ); 
    7676            add_action( 'load-' . $hook_suffix, array( &$comments_settings, 'onload' ) ); 
    7777        } 
  • facebook/trunk/admin/settings-like-button.php

    r624328 r624937  
    8282        if ( $hook_suffix ) { 
    8383            $like_button_settings->hook_suffix = $hook_suffix; 
    84             register_setting( $hook_suffix, self::OPTION_NAME, 'Facebook_Like_Button_Settings::sanitize_options' ); 
     84            register_setting( $hook_suffix, self::OPTION_NAME, array( 'Facebook_Like_Button_Settings', 'sanitize_options' ) ); 
    8585            add_action( 'load-' . $hook_suffix, array( &$like_button_settings, 'onload' ) ); 
    8686        } 
  • facebook/trunk/admin/settings-recommendations-bar.php

    r624328 r624937  
    7777        if ( $hook_suffix ) { 
    7878            $recommendations_bar_settings->hook_suffix = $hook_suffix; 
    79             register_setting( $hook_suffix, self::OPTION_NAME, 'Facebook_Recommendations_Bar_Settings::sanitize_options' ); 
     79            register_setting( $hook_suffix, self::OPTION_NAME, array( 'Facebook_Recommendations_Bar_Settings', 'sanitize_options' ) ); 
    8080            add_action( 'load-' . $hook_suffix, array( &$recommendations_bar_settings, 'onload' ) ); 
    8181        } 
  • facebook/trunk/admin/settings-send-button.php

    r624328 r624937  
    7272        if ( $hook_suffix ) { 
    7373            $send_button_settings->hook_suffix = $hook_suffix; 
    74             register_setting( $hook_suffix, self::OPTION_NAME, 'Facebook_Send_Button_Settings::sanitize_options' ); 
     74            register_setting( $hook_suffix, self::OPTION_NAME, array( 'Facebook_Send_Button_Settings', 'sanitize_options' ) ); 
    7575            add_action( 'load-' . $hook_suffix, array( &$send_button_settings, 'onload' ) ); 
    7676        } 
  • facebook/trunk/admin/settings-social-publisher.php

    r624328 r624937  
    7070        if ( $hook_suffix ) { 
    7171            $social_publisher_settings->hook_suffix = $hook_suffix; 
    72             register_setting( $hook_suffix, self::PUBLISH_OPTION_NAME, 'Facebook_Social_Publisher_Settings::sanitize_publish_options' ); 
    73             register_setting( $hook_suffix, self::MENTIONS_OPTION_NAME, 'Facebook_Social_Publisher_Settings::sanitize_mentions_options' ); 
     72            register_setting( $hook_suffix, self::PUBLISH_OPTION_NAME, array( 'Facebook_Social_Publisher_Settings', 'sanitize_publish_options' ) ); 
     73            register_setting( $hook_suffix, self::MENTIONS_OPTION_NAME, array( 'Facebook_Social_Publisher_Settings', 'sanitize_mentions_options' ) ); 
    7474            add_action( 'load-' . $hook_suffix, array( &$social_publisher_settings, 'onload' ) ); 
    7575        } 
     
    476476        if ( isset( $options['show_on'] ) || isset( $options['position'] ) ) { 
    477477            if ( ! class_exists( 'Facebook_Social_Plugin_Button_Settings' ) ) 
    478                 require_once( dirname(__FILE__) . '/settings-social-plugin-button' ); 
     478                require_once( dirname(__FILE__) . '/settings-social-plugin-button.php' ); 
    479479 
    480480            $options = Facebook_Social_Plugin_Button_Settings::sanitize_options( $options ); 
  • facebook/trunk/admin/settings-subscribe-button.php

    r624328 r624937  
    8383        if ( $hook_suffix ) { 
    8484            $subscribe_button_settings->hook_suffix = $hook_suffix; 
    85             register_setting( $hook_suffix, self::OPTION_NAME, 'Facebook_Subscribe_Button_Settings::sanitize_options' ); 
     85            register_setting( $hook_suffix, self::OPTION_NAME, array( 'Facebook_Subscribe_Button_Settings', 'sanitize_options' ) ); 
    8686            add_action( 'load-' . $hook_suffix, array( &$subscribe_button_settings, 'onload' ) ); 
    8787        } 
  • facebook/trunk/admin/settings.php

    r624390 r624937  
    2222    public static function init() { 
    2323        self::migrate_options_10(); 
    24         add_action( 'admin_menu', 'Facebook_Settings::settings_menu_items' ); 
    25         add_filter( 'plugin_action_links', 'Facebook_Settings::plugin_action_links', 10, 2 ); 
     24        add_action( 'admin_menu', array( 'Facebook_Settings', 'settings_menu_items' ) ); 
     25        add_filter( 'plugin_action_links', array( 'Facebook_Settings', 'plugin_action_links' ), 10, 2 ); 
    2626 
    2727        if ( self::app_credentials_exist() ) { 
     
    3232                    $current_user = wp_get_current_user(); 
    3333                    if ( user_can( $current_user, 'edit_posts' ) ) 
    34                         add_action( 'admin_init', 'Facebook_Settings::prompt_user_login' ); 
     34                        add_action( 'admin_init', array( 'Facebook_Settings', 'prompt_user_login' ) ); 
    3535                } 
    3636            } 
     
    150150        // show admin dialog on post creation, post edit, or user profile screen 
    151151        foreach( array( 'post-new.php','post.php','profile.php' ) as $pagenow ) { 
    152             add_action( 'load-' . $pagenow, 'Facebook_Admin_Login::connect_facebook_account' ); 
     152            add_action( 'load-' . $pagenow, array( 'Facebook_Admin_Login', 'connect_facebook_account' ) ); 
    153153        }  
    154154    } 
     
    273273            foreach( $sidebar_widgets as $widget_id ) { 
    274274                if ( strlen( $widget_id ) > 9 && substr_compare( $widget_id, 'facebook-', 0, 9 ) === 0 ) { 
    275                     $feature = substr( $key, 9, strrpos( $key, '-' ) - 9 ); 
     275                    $feature = substr( $widget_id, 9, strrpos( $widget_id, '-' ) - 9 ); 
    276276                    if ( ! isset( $widgets[$feature] ) ) 
    277277                        $widgets[$feature] = true; 
  • facebook/trunk/admin/social-publisher/mentions/mentions-box-friends.php

    r624328 r624937  
    5757            'facebook-friend-mention-box-id', 
    5858            __( 'Mention Facebook Friends', 'facebook' ), 
    59             'Facebook_Mentions_Box_Friends::content', 
     59            array( 'Facebook_Mentions_Box_Friends', 'content' ), 
    6060            $post_type, 
    6161            'side' 
  • facebook/trunk/admin/social-publisher/mentions/mentions-box-pages.php

    r624328 r624937  
    5757            'facebook-page-mention-box-id', 
    5858            __( 'Mention Facebook Pages', 'facebook' ), 
    59             'Facebook_Mentions_Box_Pages::content', 
     59            array( 'Facebook_Mentions_Box_Pages', 'content' ), 
    6060            $post_type, 
    6161            'side' 
  • facebook/trunk/admin/social-publisher/mentions/mentions-box.php

    r624328 r624937  
    2323            return; 
    2424 
    25         add_action( 'admin_enqueue_scripts', 'Facebook_Mentions_Box::enqueue_scripts' ); 
     25        add_action( 'admin_enqueue_scripts', array( 'Facebook_Mentions_Box', 'enqueue_scripts' ) ); 
    2626 
    2727        if ( ! class_exists( 'Facebook_Mentions_Box_Friends' ) ) 
     
    4242        if ( ! class_exists( 'Facebook_Mentions_Box_Friends' ) ) 
    4343            require_once( dirname(__FILE__) . '/mentions-box-friends.php' ); 
    44         add_action( 'save_post', 'Facebook_Mentions_Box_Friends::save' ); 
     44        add_action( 'save_post', array( 'Facebook_Mentions_Box_Friends', 'save' ) ); 
    4545 
    4646        if ( ! class_exists( 'Facebook_Mentions_Box_Pages' ) ) 
    4747            require_once( dirname(__FILE__) . '/mentions-box-pages.php' ); 
    48         add_action( 'save_post', 'Facebook_Mentions_Box_Pages::save' ); 
     48        add_action( 'save_post', array( 'Facebook_Mentions_Box_Pages', 'save' ) ); 
    4949    } 
    5050 
  • facebook/trunk/admin/social-publisher/mentions/mentions-search.php

    r624328 r624937  
    1515     */ 
    1616    public static function wp_ajax_handlers() { 
    17         add_action( 'wp_ajax_facebook_mentions_friends_autocomplete', 'Facebook_Mentions_Search::search_endpoint_friends' ); 
    18         add_action( 'wp_ajax_facebook_mentions_pages_autocomplete', 'Facebook_Mentions_Search::search_endpoint_pages' ); 
     17        add_action( 'wp_ajax_facebook_mentions_friends_autocomplete', array( 'Facebook_Mentions_Search', 'search_endpoint_friends' ) ); 
     18        add_action( 'wp_ajax_facebook_mentions_pages_autocomplete', array( 'Facebook_Mentions_Search', 'search_endpoint_pages' ) ); 
    1919    } 
    2020 
  • facebook/trunk/admin/social-publisher/publish-box-page.php

    r624328 r624937  
    11<?php 
    22 
     3/** 
     4 * Add a custom message to your article posted to a Facebook page 
     5 * 
     6 * @since 1.1 
     7 */ 
    38class Facebook_Social_Publisher_Meta_Box_Page { 
    49    /** 
     
    3742            'facebook-fan-page-message-box-id', 
    3843            sprintf( __( 'Facebook Status on %s Timeline', 'facebook' ), $page['name'] ), 
    39             'Facebook_Social_Publisher_Meta_Box_Page::content', 
     44            array( 'Facebook_Social_Publisher_Meta_Box_Page', 'content' ), 
    4045            $post_type 
    4146        ); 
  • facebook/trunk/admin/social-publisher/publish-box-profile.php

    r624328 r624937  
    11<?php 
    22 
     3/** 
     4 * Add a custom message to your article posted to a Facebook profile 
     5 * 
     6 * @since 1.1 
     7 */ 
    38class Facebook_Social_Publisher_Meta_Box_Profile { 
    49 
     
    3843            'facebook-author-message-box-id', 
    3944            __( 'Facebook Status on Your Timeline', 'facebook' ), 
    40             'Facebook_Social_Publisher_Meta_Box_Profile::content', 
     45            array( 'Facebook_Social_Publisher_Meta_Box_Profile', 'content' ), 
    4146            $post_type 
    4247        ); 
  • facebook/trunk/admin/social-publisher/social-publisher.php

    r624328 r624937  
    3838        // always load publish and delete hooks 
    3939        // post can be published or deleted many different ways 
    40         add_action( 'transition_post_status', 'Facebook_Social_Publisher::publish', 10, 3 ); 
    41         add_action( 'before_delete_post', 'Facebook_Social_Publisher::delete_facebook_post' ); 
     40        add_action( 'transition_post_status', array( 'Facebook_Social_Publisher', 'publish' ), 10, 3 ); 
     41        add_action( 'before_delete_post', array( 'Facebook_Social_Publisher', 'delete_facebook_post' ) ); 
    4242        self::add_save_post_hooks(); 
    4343 
     
    6161        if ( ! class_exists( 'Facebook_Social_Publisher_Meta_Box_Profile' ) ) 
    6262            require_once( dirname(__FILE__) . '/publish-box-profile.php' ); 
    63         add_action( 'save_post', 'Facebook_Social_Publisher_Meta_Box_Profile::save' ); 
     63        add_action( 'save_post', array( 'Facebook_Social_Publisher_Meta_Box_Profile', 'save' ) ); 
    6464 
    6565        if ( ! class_exists( 'Facebook_Social_Publisher_Meta_Box_Page' ) ) 
    6666            require_once(  dirname(__FILE__) . '/publish-box-page.php' ); 
    67         add_action( 'save_post', 'Facebook_Social_Publisher_Meta_Box_Page::save' ); 
     67        add_action( 'save_post', array( 'Facebook_Social_Publisher_Meta_Box_Page', 'save' ) ); 
    6868 
    6969        if ( ! class_exists( 'Facebook_Mentions_Box' ) ) 
     
    8686 
    8787        // on post pages 
    88         add_action( 'admin_notices', 'Facebook_Social_Publisher::output_post_admin_notices' ); 
     88        add_action( 'admin_notices', array( 'Facebook_Social_Publisher', 'output_post_admin_notices' ) ); 
    8989 
    9090        // wait until after post data loaded, then evaluate post 
     
    376376 
    377377            update_post_meta( $post_id, 'facebook_status_messages', $status_messages ); 
    378             add_filter( 'redirect_post_location', 'Facebook_Social_Publisher::add_new_post_location' ); 
     378            add_filter( 'redirect_post_location', array( 'Facebook_Social_Publisher', 'add_new_post_location' ) ); 
    379379        } 
    380380    } 
     
    439439 
    440440            update_post_meta( $post_id, 'facebook_status_messages', $status_messages ); 
    441             add_filter( 'redirect_post_location', 'Facebook_Social_Publisher::add_new_post_location' ); 
     441            add_filter( 'redirect_post_location', array( 'Facebook_Social_Publisher', 'add_new_post_location' ) ); 
    442442        } 
    443443    } 
  • facebook/trunk/facebook.php

    r624390 r624937  
    22/** 
    33 * @package Facebook 
    4  * @version 1.1 
     4 * @version 1.1.2 
    55 */ 
    66/* 
     
    1010Author: Facebook 
    1111Author URI: https://developers.facebook.com/wordpress/ 
    12 Version: 1.1.1 
     12Version: 1.1.2 
    1313License: GPL2 
    1414License URI: license.txt 
     
    2929     * @var string 
    3030     */ 
    31     const VERSION = '1.1.1'; 
     31    const VERSION = '1.1.2'; 
    3232 
    3333    /** 
     
    211211        if ( ! class_exists( 'Facebook_Open_Graph_Protocol' ) ) 
    212212            require_once( $this->plugin_directory . 'open-graph-protocol.php' ); 
    213         add_action( 'wp_head', 'Facebook_Open_Graph_Protocol::add_og_protocol' ); 
    214  
    215         add_action( 'wp_enqueue_scripts', 'Facebook_Loader::enqueue_jssdk' ); 
     213        add_action( 'wp_head', array( 'Facebook_Open_Graph_Protocol', 'add_og_protocol' ) ); 
     214 
     215        add_action( 'wp_enqueue_scripts', array( 'Facebook_Loader', 'enqueue_jssdk' ) ); 
    216216 
    217217        $enabled_features = array(); 
     
    243243            add_filter( 'the_content', 'facebook_the_content_subscribe_button', $priority ); 
    244244        if ( isset( $enabled_features['mentions'] ) ) { 
    245             if ( ! function_exists( 'fb_social_publisher_mentioning_output' ) ) 
     245            if ( ! function_exists( 'facebook_social_publisher_mentioning_output' ) ) 
    246246                require_once( dirname(__FILE__) . '/social-publisher/mentions.php' ); 
    247             add_filter( 'the_content', 'fb_social_publisher_mentioning_output', $priority ); 
     247            add_filter( 'the_content', 'facebook_social_publisher_mentioning_output', $priority ); 
    248248        } 
    249249 
     
    258258                    require_once( $this->plugin_directory . 'social-plugins/class-facebook-comments.php' ); 
    259259 
    260                 add_filter( 'the_content', 'Facebook_Comments::the_content_comments_box', $priority ); 
    261                 add_action( 'wp_enqueue_scripts', 'Facebook_Comments::css_hide_comments', 0 ); 
     260                add_filter( 'the_content', array( 'Facebook_Comments', 'the_content_comments_box' ), $priority ); 
     261                add_action( 'wp_enqueue_scripts', array( 'Facebook_Comments', 'css_hide_comments' ), 0 ); 
    262262                add_filter( 'comments_array', '__return_null' ); 
    263263                add_filter( 'comments_open', '__return_true' ); // comments are always open 
    264264 
    265265                // display comments number if used in template 
    266                 add_filter( 'comments_number', 'Facebook_Comments::comments_count_xfbml' ); 
     266                add_filter( 'comments_number', array( 'Facebook_Comments', 'comments_count_xfbml' ) ); 
    267267 
    268268                // short-circuit special template behavior for comment count = 0 
     
    272272        } 
    273273 
    274         add_action( 'wp_enqueue_scripts', 'Facebook_Loader::enqueue_styles' ); 
     274        add_action( 'wp_enqueue_scripts', array( 'Facebook_Loader', 'enqueue_styles' ) ); 
    275275    } 
    276276 
  • facebook/trunk/readme.txt

    r624609 r624937  
    66License: GPLv2 
    77License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    8 Stable tag: 1.1.1 
     8Stable tag: 1.1.2 
    99 
    1010Make your WordPress site social in a couple of clicks, powered by Facebook. 
     
    106106== Upgrade Notice == 
    107107 
     108= 1.1.2 = 
     109Improved compatibility with PHP 5.2 installations. Recommendations Bar fix. 
     110 
    108111= 1.1 = 
    109112Custom post types and status support. Rewritten settings pages. Longer-lived Facebook access tokens. Async JavaScript loading. Threaded comment support. 
     
    116119 
    117120== Changelog == 
     121 
     122= 1.1.2 = 
     123 
     124* Improve PHP 5.2 compatibility 
     125* Fix minimum number of seconds before recommendations bar shown 
     126* properly reference widget ids for stats 
    118127 
    119128= 1.1 = 
  • facebook/trunk/social-plugins/class-facebook-activity-feed.php

    r624328 r624937  
    1818     * @var string 
    1919     */ 
    20     const id = 'activity'; 
     20    const ID = 'activity'; 
    2121 
    2222    /** 
     
    169169     */ 
    170170    public function asHTML( $div_attributes=array() ) { 
    171         $div_attributes = self::add_required_class( 'fb-' . self::id, $div_attributes ); 
     171        $div_attributes = self::add_required_class( 'fb-' . self::ID, $div_attributes ); 
    172172        $div_attributes['data'] = $this->toHTMLDataArray(); 
    173173 
     
    182182     */ 
    183183    public function asXFBML() { 
    184         return self::xfbml_builder( self::id, $this->toHTMLDataArray() ); 
     184        return self::xfbml_builder( self::ID, $this->toHTMLDataArray() ); 
    185185    } 
    186186} 
  • facebook/trunk/social-plugins/class-facebook-comments-box.php

    r624328 r624937  
    1515     * @var string 
    1616     */ 
    17     const id = 'comments'; 
     17    const ID = 'comments'; 
    1818 
    1919    /** 
     
    208208            require_once( dirname(__FILE__) . '/class-facebook-social-plugin.php' ); 
    209209 
    210         $div_attributes = Facebook_Social_Plugin::add_required_class( 'fb-' . self::id, $div_attributes ); 
     210        $div_attributes = Facebook_Social_Plugin::add_required_class( 'fb-' . self::ID, $div_attributes ); 
    211211        $div_attributes['data'] = $this->toHTMLDataArray(); 
    212212 
     
    224224            require_once( dirname(__FILE__) . '/class-facebook-social-plugin.php' ); 
    225225 
    226         return Facebook_Social_Plugin::xfbml_builder( self::id, $this->toHTMLDataArray() ); 
     226        return Facebook_Social_Plugin::xfbml_builder( self::ID, $this->toHTMLDataArray() ); 
    227227    } 
    228228} 
  • facebook/trunk/social-plugins/class-facebook-comments.php

    r624328 r624937  
    4747        // swap only. don't add a menu item if none existed 
    4848        if ( remove_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 ) ) { 
    49             add_action( 'admin_bar_menu', 'Facebook_Comments::admin_bar_add_comments_menu', 60 ); 
     49            add_action( 'admin_bar_menu', array( 'Facebook_Comments', 'admin_bar_add_comments_menu' ), 60 ); 
    5050        } 
    5151    } 
  • facebook/trunk/social-plugins/class-facebook-like-button.php

    r624328 r624937  
    1818     * @var string 
    1919     */ 
    20     const id = 'like'; 
     20    const ID = 'like'; 
    2121 
    2222    /** 
     
    320320     */ 
    321321    public function asHTML( $div_attributes=array() ) { 
    322         $div_attributes = self::add_required_class( 'fb-' . self::id, $div_attributes ); 
     322        $div_attributes = self::add_required_class( 'fb-' . self::ID, $div_attributes ); 
    323323        $div_attributes['data'] = $this->toHTMLDataArray(); 
    324324 
     
    333333     */ 
    334334    public function asXFBML() { 
    335         return self::xfbml_builder( self::id, $this->toHTMLDataArray() ); 
     335        return self::xfbml_builder( self::ID, $this->toHTMLDataArray() ); 
    336336    } 
    337337} 
  • facebook/trunk/social-plugins/class-facebook-recommendations-bar.php

    r624328 r624937  
    1818     * @var string 
    1919     */ 
    20     const id = 'recommendations-bar'; 
     20    const ID = 'recommendations-bar'; 
    2121 
    2222    /** 
     
    167167     */ 
    168168    public function setReadTime( $seconds ) { 
    169         if ( is_int( $seconds ) && $seconds > 10 ) 
     169        if ( is_int( $seconds ) && $seconds >= 10 ) 
    170170            $this->read_time = $seconds; 
    171171        return $this; 
     
    297297 
    298298        if ( isset( $this->num_recommendations ) && $this->num_recommendations !== 2 ) // default: 2 
    299             $data['num-recommendations'] = strval( $this->num_resommendations ); 
     299            $data['num-recommendations'] = strval( $this->num_recommendations ); 
    300300 
    301301        if ( isset( $this->max_age ) && $this->max_age !== 0 ) // default: 0 (no limit) 
     
    369369            require_once( dirname(__FILE__) . '/class-facebook-social-plugin.php' ); 
    370370 
    371         $div_attributes = Facebook_Social_Plugin::add_required_class( 'fb-' . self::id, $div_attributes ); 
     371        $div_attributes = Facebook_Social_Plugin::add_required_class( 'fb-' . self::ID, $div_attributes ); 
    372372        $div_attributes['data'] = $this->toHTMLDataArray(); 
    373373 
     
    385385            require_once( dirname(__FILE__) . '/class-facebook-social-plugin.php' ); 
    386386 
    387         return Facebook_Social_Plugin::xfbml_builder( self::id, $this->toHTMLDataArray() ); 
     387        return Facebook_Social_Plugin::xfbml_builder( self::ID, $this->toHTMLDataArray() ); 
    388388    } 
    389389} 
  • facebook/trunk/social-plugins/class-facebook-recommendations-box.php

    r624328 r624937  
    1818     * @var string 
    1919     */ 
    20     const id = 'recommendations'; 
     20    const ID = 'recommendations'; 
    2121 
    2222    /** 
     
    354354     */ 
    355355    public function asHTML( $div_attributes=array() ) { 
    356         $div_attributes = self::add_required_class( 'fb-' . self::id, $div_attributes ); 
     356        $div_attributes = self::add_required_class( 'fb-' . self::ID, $div_attributes ); 
    357357        $div_attributes['data'] = $this->toHTMLDataArray(); 
    358358 
     
    367367     */ 
    368368    public function asXFBML() { 
    369         return self::xfbml_builder( self::id, $this->toHTMLDataArray() ); 
     369        return self::xfbml_builder( self::ID, $this->toHTMLDataArray() ); 
    370370    } 
    371371} 
  • facebook/trunk/social-plugins/class-facebook-send-button.php

    r624328 r624937  
    1818     * @var string 
    1919     */ 
    20     const id = 'send'; 
     20    const ID = 'send'; 
    2121 
    2222    /** 
     
    104104     */ 
    105105    public function asHTML( $div_attributes=array() ) { 
    106         $div_attributes = self::add_required_class( 'fb-' . self::id, $div_attributes ); 
     106        $div_attributes = self::add_required_class( 'fb-' . self::ID, $div_attributes ); 
    107107        $div_attributes['data'] = $this->toHTMLDataArray(); 
    108108 
     
    117117     */ 
    118118    public function asXFBML() { 
    119         return self::xfbml_builder( self::id, $this->toHTMLDataArray() ); 
     119        return self::xfbml_builder( self::ID, $this->toHTMLDataArray() ); 
    120120    } 
    121121} 
  • facebook/trunk/social-plugins/class-facebook-subscribe-button.php

    r624328 r624937  
    1818     * @var string 
    1919     */ 
    20     const id = 'subscribe'; 
     20    const ID = 'subscribe'; 
    2121 
    2222    /** 
     
    263263            return ''; 
    264264 
    265         $div_attributes = self::add_required_class( 'fb-' . self::id, $div_attributes ); 
     265        $div_attributes = self::add_required_class( 'fb-' . self::ID, $div_attributes ); 
    266266        $div_attributes['data'] = $data; 
    267267 
     
    280280            return ''; 
    281281 
    282         return self::xfbml_builder( self::id, $data ); 
     282        return self::xfbml_builder( self::ID, $data ); 
    283283    } 
    284284} 
  • facebook/trunk/social-plugins/widgets/like-button.php

    r624328 r624937  
    33/** 
    44 * Adds the Like Button Social Plugin as a WordPress Widget 
     5 * 
     6 * @since 1.0 
    57 */ 
    68class Facebook_Like_Button_Widget extends WP_Widget { 
  • facebook/trunk/social-plugins/widgets/send-button.php

    r624328 r624937  
    3232            $instance['ref'] = 'widget'; 
    3333 
     34        if ( ! function_exists( 'facebook_get_send_button' ) ) 
     35            require_once( dirname( dirname(__FILE__) ) . '/social-plugins.php' ); 
    3436        $send_button_html = facebook_get_send_button( $instance ); 
    3537 
  • facebook/trunk/social-plugins/widgets/subscribe-button.php

    r624328 r624937  
    3535        if ( ! isset( $instance['ref'] ) ) 
    3636            $instance['ref'] = 'widget'; 
     37 
     38        if ( ! function_exists( 'facebook_get_subscribe_button' ) ) 
     39            require_once( dirname( dirname(__FILE__) ) . '/social-plugins.php' ); 
    3740 
    3841        $subscribe_button_html = facebook_get_subscribe_button( $instance ); 
  • facebook/trunk/social-publisher/mentions.php

    r624328 r624937  
    55 * @since 1.0 
    66 */ 
    7 function fb_social_publisher_mentioning_output( $content ) { 
     7function facebook_social_publisher_mentioning_output( $content ) { 
    88    global $post; 
    99 
Note: See TracChangeset for help on using the changeset viewer.