Changeset 571850
- Timestamp:
- 07/13/2012 05:06:30 PM (14 years ago)
- Location:
- facebook/trunk
- Files:
-
- 2 added
- 20 edited
-
facebook.php (modified) (3 diffs)
-
fb-admin-menu.php (modified) (3 diffs)
-
fb-core.php (modified) (5 diffs)
-
fb-login.php (modified) (2 diffs)
-
fb-open-graph.php (modified) (3 diffs)
-
fb-social-publisher-mentioning.php (modified) (6 diffs)
-
fb-social-publisher.php (modified) (22 diffs)
-
fb-wp-helpers.php (modified) (1 diff)
-
includes/facebook-php-sdk/base_facebook.php (modified) (22 diffs)
-
includes/facebook-php-sdk/class-facebook-wp.php (modified) (8 diffs)
-
includes/facebook-php-sdk/facebook.php (modified) (2 diffs)
-
lang (added)
-
lang/index.php (added)
-
readme.txt (modified) (2 diffs)
-
scripts/fb-admin.dev.js (modified) (1 diff)
-
social-plugins/fb-comments.php (modified) (3 diffs)
-
social-plugins/fb-like.php (modified) (2 diffs)
-
social-plugins/fb-recommendations-bar.php (modified) (2 diffs)
-
social-plugins/fb-send.php (modified) (3 diffs)
-
social-plugins/fb-social-plugins.php (modified) (1 diff)
-
social-plugins/fb-subscribe.php (modified) (4 diffs)
-
style/style.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
facebook/trunk/facebook.php
r561366 r571850 2 2 /** 3 3 * @package Facebook 4 * @version 1.0. 14 * @version 1.0.2 5 5 */ 6 6 /* … … 10 10 Author: Facebook 11 11 Author URI: https://developers.facebook.com/wordpress/ 12 Version: 1.0. 112 Version: 1.0.2 13 13 License: GPL2 14 14 License URI: license.txt … … 17 17 18 18 global $fb_ver; 19 $fb_ver = '1.0 ';19 $fb_ver = '1.0.2'; 20 20 21 21 $facebook_plugin_directory = dirname(__FILE__); -
facebook/trunk/fb-admin-menu.php
r561366 r571850 17 17 add_action( 'admin_print_styles-' . $page, 'fb_admin_style'); 18 18 add_action( 'admin_print_scripts-' . $page, 'fb_admin_scripts' ); 19 } 20 21 22 /** 23 * Function to check if the wordpress user has plugins that may conflict 24 * with the Facebook plugin (due to Open Graph). 25 */ 26 function fb_notify_user_of_plugin_conflicts() 27 { 28 //static array of potentially conflicting plugins 29 //add to this list of conflicting plugins from the big list below 30 $og_conflicting_plugins_static = array( "http://wordpress.org/extend/plugins/facebook/", 31 "http://wordpress.org/extend/plugins/opengraph/", 32 "http://yoast.com/wordpress/seo/#utm_source=wpadmin&utm_medium=plugin&utm_campaign=wpseoplugin", 33 "http://wordbooker.tty.org.uk", 34 "http://ottopress.com/wordpress-plugins/simple-facebook-connect/", 35 "http://www.whiletrue.it", 36 "http://aaroncollegeman.com/sharepress" 37 ); 38 39 $og_conflicting_plugins = array ( 40 "http://wordpress.org/extend/plugins/kevinjohn-gallagher-pure-web-brilliants-social-graph-control/", 41 "http://wordpress.org/extend/plugins/1-click-retweetsharelike", 42 "http://wordpress.org/extend/plugins/2-click-socialmedia-buttons", 43 "http://wordpress.org/extend/plugins/add-facebook-og-meta-tags-paulund", 44 "http://wordpress.org/extend/plugins/add-link-to-facebook", 45 "http://wordpress.org/extend/plugins/add-meta-tags", 46 "http://wordpress.org/extend/plugins/aj-wp-facebook-like-and-send", 47 "http://wordpress.org/extend/plugins/amarinfotech-downlaod-with-fb-connect", 48 "http://wordpress.org/extend/plugins/another-wordpress-classifieds-plugin", 49 "http://wordpress.org/extend/plugins/aprils-facebook-like-button", 50 "http://wordpress.org/extend/plugins/aprils-super-functions-pack", 51 "http://wordpress.org/extend/plugins/author-hreview", 52 "http://wordpress.org/extend/plugins/bye-maridjan-seo", 53 "http://wordpress.org/extend/plugins/cd34-header", 54 "http://wordpress.org/extend/plugins/comment-juice", 55 "http://wordpress.org/extend/plugins/contentshare", 56 "http://wordpress.org/extend/plugins/custom-facebook-and-google-thumbnail", 57 "http://wordpress.org/extend/plugins/dudelols-easy-facebook-share-thumbnails", 58 "http://wordpress.org/extend/plugins/dw-fb-sendlike", 59 "http://wordpress.org/extend/plugins/easy-facebook-share-thumbnails", 60 "http://wordpress.org/extend/plugins/easy-social-media", 61 "http://wordpress.org/extend/plugins/easy-toolbox", 62 "http://wordpress.org/extend/plugins/facebook-awd", 63 "http://wordpress.org/extend/plugins/facebook-comment-for-wordpress", 64 "http://wordpress.org/extend/plugins/facebook-comments-for-wordpress", 65 "http://wordpress.org/extend/plugins/facebook-connect-plugin", 66 "http://wordpress.org/extend/plugins/facebook-ilike", 67 "http://wordpress.org/extend/plugins/facebook-image-fix", 68 "http://wordpress.org/extend/plugins/facebook-like", 69 "http://wordpress.org/extend/plugins/facebook-like-a-lot", 70 "http://wordpress.org/extend/plugins/facebook-like-and-comment", 71 "http://wordpress.org/extend/plugins/facebook-like-and-send-2-in-1", 72 "http://wordpress.org/extend/plugins/facebook-like-button", 73 "http://wordpress.org/extend/plugins/facebook-like-button-for-dummies", 74 "http://wordpress.org/extend/plugins/facebook-like-button-plugin", 75 "http://wordpress.org/extend/plugins/facebook-like-content-locker", 76 "http://wordpress.org/extend/plugins/facebook-like-for-marketers", 77 "http://wordpress.org/extend/plugins/facebook-likes-you", 78 "http://wordpress.org/extend/plugins/facebook-meta-tags", 79 "http://wordpress.org/extend/plugins/facebook-open-graph-meta", 80 "http://wordpress.org/extend/plugins/facebook-open-graph-meta-for-wordpress", 81 "http://wordpress.org/extend/plugins/facebook-open-graph-meta-in-wordpress", 82 "http://wordpress.org/extend/plugins/facebook-open-graph-widget", 83 "http://wordpress.org/extend/plugins/facebook-opengraph", 84 "http://wordpress.org/extend/plugins/facebook-optimize", 85 "http://wordpress.org/extend/plugins/facebook-page-publish", 86 "http://wordpress.org/extend/plugins/facebook-recommend-widget", 87 "http://wordpress.org/extend/plugins/facebook-revised-open-graph-meta-tag", 88 "http://wordpress.org/extend/plugins/facebook-send-button", 89 "http://wordpress.org/extend/plugins/facebook-share-new", 90 "http://wordpress.org/extend/plugins/facebook-social-plugins", 91 "http://wordpress.org/extend/plugins/facebook-tools", 92 "http://wordpress.org/extend/plugins/fanpage-connect", 93 "http://wordpress.org/extend/plugins/fatpanda-facebook-comments", 94 "http://wordpress.org/extend/plugins/fb-open-graph-actions-free", 95 "http://wordpress.org/extend/plugins/fb-thumbnail-config", 96 "http://wordpress.org/extend/plugins/fbpromotions", 97 "http://wordpress.org/extend/plugins/fbvirallike", 98 "http://wordpress.org/extend/plugins/fix-facebook-like", 99 "http://wordpress.org/extend/plugins/flexo-facebook-manager", 100 "http://wordpress.org/extend/plugins/flexo-social-gallery", 101 "http://wordpress.org/extend/plugins/foragr-activity-stream", 102 "http://wordpress.org/extend/plugins/foxyshop", 103 "http://wordpress.org/extend/plugins/fp", 104 "http://wordpress.org/extend/plugins/head-cleaner", 105 "http://wordpress.org/extend/plugins/head-meta-facebook", 106 "http://wordpress.org/extend/plugins/hyves-respect", 107 "http://wordpress.org/extend/plugins/jotlinks-button", 108 "http://wordpress.org/extend/plugins/jw-player-plugin-for-wordpress", 109 "http://wordpress.org/extend/plugins/kblog-metadata", 110 "http://wordpress.org/extend/plugins/kevinjohn-gallagher-pure-web-brilliants-social-graph-control", 111 "http://wordpress.org/extend/plugins/leenkme", 112 "http://wordpress.org/extend/plugins/like", 113 "http://wordpress.org/extend/plugins/like-button-plugin-for-wordpress", 114 "http://wordpress.org/extend/plugins/like-buttons", 115 "http://wordpress.org/extend/plugins/me-likey-a-facebook-open-graph-plugin", 116 "http://wordpress.org/extend/plugins/mediaembedder", 117 "http://wordpress.org/extend/plugins/meta-ographr", 118 "http://wordpress.org/extend/plugins/mouseover-share-buttons-by-newsgrape", 119 "http://wordpress.org/extend/plugins/multilpe-social-media", 120 "http://wordpress.org/extend/plugins/network-publisher", 121 "http://wordpress.org/extend/plugins/og-meta", 122 "http://wordpress.org/extend/plugins/ogp", 123 "http://wordpress.org/extend/plugins/only-tweet-like-share-and-google-1", 124 "http://wordpress.org/extend/plugins/open-graph", 125 "http://wordpress.org/extend/plugins/open-graph-protocol-in-posts-and-pages", 126 "http://wordpress.org/extend/plugins/open-graph-protocol-tools", 127 "http://wordpress.org/extend/plugins/opengraph-and-microdata-generator", 128 "http://wordpress.org/extend/plugins/opengraph-metatags-for-facebook", 129 "http://wordpress.org/extend/plugins/professional-share", 130 "http://wordpress.org/extend/plugins/scrolling-social-sharebar", 131 "http://wordpress.org/extend/plugins/scrolling-twitter-like-google-plusone-linkedin-and-stumbleupon", 132 "http://wordpress.org/extend/plugins/seo-facebook-comments", 133 "http://wordpress.org/extend/plugins/seopress", 134 "http://wordpress.org/extend/plugins/share-buttons", 135 "http://wordpress.org/extend/plugins/share-center-pro", 136 "http://wordpress.org/extend/plugins/shareyourcart", 137 "http://wordpress.org/extend/plugins/sharing-is-caring", 138 "http://wordpress.org/extend/plugins/shopp-facebook-like-button-sflb", 139 "http://wordpress.org/extend/plugins/shopp-open-graph-helper", 140 "http://wordpress.org/extend/plugins/shorten2ping", 141 "http://wordpress.org/extend/plugins/simple-facebook-comments-for-wordpress", 142 "http://wordpress.org/extend/plugins/simple-facebook-connect", 143 "http://wordpress.org/extend/plugins/simple-open-graph", 144 "http://wordpress.org/extend/plugins/slick-social-share-buttons", 145 "http://wordpress.org/extend/plugins/social-discussions", 146 "http://wordpress.org/extend/plugins/social-graph-protocol", 147 "http://wordpress.org/extend/plugins/social-kundi", 148 "http://wordpress.org/extend/plugins/social-maven", 149 "http://wordpress.org/extend/plugins/social-networks-auto-poster-facebook-twitter-g", 150 "http://wordpress.org/extend/plugins/social-sharing-toolkit", 151 "http://wordpress.org/extend/plugins/socialize", 152 "http://wordpress.org/extend/plugins/wonderm00ns-simple-facebook-open-graph-tags", 153 "http://wordpress.org/extend/plugins/woocommerce", 154 "http://wordpress.org/extend/plugins/wordpress-connect", 155 "http://wordpress.org/extend/plugins/wordpress-facebook-integrate", 156 "http://wordpress.org/extend/plugins/wordpress-plugin-seo-and-facebook-opengraph-and-google-schema", 157 "http://wordpress.org/extend/plugins/wordpress-seo", 158 "http://wordpress.org/extend/plugins/wordpress-social-ring", 159 "http://wordpress.org/extend/plugins/wp-facebook-like", 160 "http://wordpress.org/extend/plugins/wp-facebook-like-send-open-graph-meta", 161 "http://wordpress.org/extend/plugins/wp-facebook-like-this", 162 "http://wordpress.org/extend/plugins/wp-facebook-likebutton", 163 "http://wordpress.org/extend/plugins/wp-facebook-open-graph-protocol", 164 "http://wordpress.org/extend/plugins/wp-facebook-plugin", 165 "http://wordpress.org/extend/plugins/wp-facebookconnect", 166 "http://wordpress.org/extend/plugins/wp-fb-commerce", 167 "http://wordpress.org/extend/plugins/wp-grow-button", 168 "http://wordpress.org/extend/plugins/wp-ogp", 169 "http://wordpress.org/extend/plugins/wp-open-graph-meta", 170 "http://wordpress.org/extend/plugins/wpmu-dev-facebook-addon", 171 "http://wordpress.org/extend/plugins/wpstorecart", 172 "http://wordpress.org/extend/plugins/zoltonorg-social-plugin" 173 ); 174 175 //fetch activated plugins 176 $plugins_list = get_option( 'active_plugins', array() ); 177 178 $num_conflicting = 0; 179 $conflicting_plugins = array(); 180 181 //iterate through activated plugins, checking if they are in the list of conflict plugins 182 foreach ( $plugins_list as $val ) { 183 $plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/' . $val); 184 $plugin_uri = $plugin_data['PluginURI']; 185 $plugin_name = $plugin_data['Name']; 186 187 if( $plugin_uri == "http://wordpress.org/extend/plugins/facebook/" ) { 188 continue; 189 } 190 191 if( in_array($plugin_uri, $og_conflicting_plugins_static) ) { 192 $num_conflicting += 1; 193 194 if( $num_conflicting == 1 ) { 195 array_push( $conflicting_plugins, $plugin_name); 196 } 197 else { 198 array_push( $conflicting_plugins, ", " . $plugin_name ); 199 } 200 } 201 } 202 203 //if there are more than 1 plugins relying on Open Graph, warn the user on this plugins page 204 if ( $num_conflicting >= 1 ) { 205 fb_admin_dialog( sprintf( __( 'You have plugins installed that could potentially conflict with the Facebook plugin. Please consider disabling the following plugins on the %sPlugins Settings page%s:', 'facebook' ) . "</br>" . implode($conflicting_plugins), '<a href="plugins.php" aria-label="Plugins 0">', '</a>' ), true); 206 } 19 207 } 20 208 … … 133 321 echo '<p>' . sprintf( esc_html( __( 'If you don\'t already have an app for this website, go to %s and click the "Create New App" button. You\'ll see a dialog like the one below. Fill this in and click "Continue".', 'facebook' ) ), '<a href="https://developers.facebook.com/apps" target="_blank">https://developers.facebook.com/apps</a>' ); 134 322 echo '<p><img src="' . plugins_url( 'images/nux_create_app.png', __FILE__ ) . '"></p>'; 323 echo "</br>Here are for some recommendations for filling this form out. </br>"; 324 325 echo "<b> App Name: </b>" . get_bloginfo('name') . "</br>"; 326 echo "<b> App Namespace: </b>". strtolower(str_replace( " ", "-", get_bloginfo('name') ) ) . '-' . rand( 0, 999 ) . "</br>"; 135 327 136 328 echo '<a name="step-2"></a><h2>' . esc_html__( 'Step 2: Set up the App', 'facebook' ) . '</h2>'; 137 329 echo sprintf( esc_html( __( 'Next, set up your app so that it looks like the settings below. Make sure you set your app\'s icon and image, too. If you already have an app and skipped Step 1, you can view your app settings by going to %s', 'facebook' ) ), '<a href="https://developers.facebook.com/apps">https://developers.facebook.com/apps</a>.</p>' ); 138 echo '<p><img src="' . plugins_url( 'images/nux_app_settings.png', __FILE__ ) . '"></p>'; 330 331 echo "</br>Here are for some recommendations for filling this form out, based on where this plugin is installed.</br>"; 332 echo "<b> App Domains: </b>" . parse_url(home_url('/'), PHP_URL_HOST) . "</br>"; 333 echo "<b> Site URL and Mobile Web URL: </b> " . get_bloginfo( 'wpurl' ) . "</br>"; 334 335 echo '<p><img src="' . plugins_url( 'images/nux_app_settings.png', __FILE__ ) . '" style="border: 1px solid #ccc; margin: 5px; padding: 5px;"></p>'; 139 336 140 337 echo '<h2>' . esc_html__( 'Step 3: WordPress settings', 'facebook' ) . '</h2>'; … … 152 349 echo '<p>' . sprintf( esc_html( __( 'These settings affect Pages and Posts only. Additional Social Plugins are also available in the %sWidgets settings%s.', 'facebook' ) ), '<a href="widgets.php">', '</a>' ); 153 350 351 fb_notify_user_of_plugin_conflicts(); 154 352 fb_get_social_publisher_fields(); 155 353 fb_get_like_fields(); -
facebook/trunk/fb-core.php
r561366 r571850 2 2 add_action( 'init', 'fb_init' ); 3 3 add_action( 'admin_notices', 'fb_install_warning' ); 4 add_action( 'admin_notices', 'fb_ssl_warning' ); 4 5 //add_action( 'admin_notices', 'fb_rate_message' ); 5 6 add_action( 'wp_enqueue_scripts', 'fb_style' ); … … 17 18 if ((empty($options['app_id']) || empty($options['app_secret'])) && $page != 'facebook-settings' && current_user_can( 'manage_options' ) ) { 18 19 fb_admin_dialog( sprintf( __('You must %sconfigure the plugin%s to enable Facebook for WordPress.', 'facebook' ), '<a href="admin.php?page=facebook-settings">', '</a>' ), true); 20 } 21 } 22 23 /** 24 * Display an admin-facing warning if openSSL is not installed properly 25 * 26 * @since 1.0.2 27 */ 28 function fb_ssl_warning() { 29 $options = get_option( 'fb_options' ); 30 31 $page = (isset($_GET['page']) ? $_GET['page'] : null); 32 33 if ( ! wp_http_supports( array( 'ssl' => true ) ) && current_user_can( 'manage_options' ) ) { 34 $msg = 'SSL must be enabled on your server for Facebook Social Publisher to work.'; 35 if ( $options['social_publisher']['enabled'] ) { 36 unset($options['social_publisher']['enabled']); 37 update_option( 'fb_options', $options ); 38 $msg .= ' As a result, Social Publisher has been disabled.'; 39 } 40 fb_admin_dialog( __( $msg, 'facebook' ), true ); 19 41 } 20 42 } … … 59 81 60 82 if ( isset($_GET['fb_rate_message_ignore']) && '1' == $_GET['fb_rate_message_ignore'] ) { 61 add_user_meta($user_id, 'fb_rate_message_ignore_notice', 'true', true);83 fb_update_user_meta($user_id, 'fb_rate_message_ignore_notice', 'true'); 62 84 } 63 85 } … … 84 106 ) ); 85 107 86 // enforce minimum requirements87 if ( empty( $args['appId'] ) )88 return;89 90 108 echo '<script type="text/javascript">window.fbAsyncInit=function(){FB.init(' . json_encode( $args ) . ');'; 91 109 do_action( 'fb_async_init', $args ); … … 125 143 // appId and secret are required by BaseFacebook 126 144 if ( ( ! empty( $options['app_id'] ) && ! empty( $options['app_secret'] ) ) ) { 127 $facebook = new Facebook_WP (array(145 $facebook = new Facebook_WP_Extend(array( 128 146 'appId' => $options['app_id'], 129 147 'secret' => $options['app_secret'], -
facebook/trunk/fb-login.php
r561366 r571850 55 55 56 56 if ( false === ( $test = get_transient( 'fb_extended_access_token_' . $facebook->getUser() ) ) ) { 57 $facebook-> getExtendedAccessToken();57 $facebook->setExtendedAccessToken(); 58 58 59 59 //the extended token should be good for a couple of months, but lets refresh it every couple of weeks just in case … … 78 78 return $user; 79 79 } 80 catch ( FacebookApiException $e) {80 catch (WP_FacebookApiException $e) { 81 81 } 82 82 } -
facebook/trunk/fb-open-graph.php
r561366 r571850 7 7 * @param mixed content attribute value for the given property. use an array for array property values or structured properties 8 8 */ 9 9 10 function fb_output_og_protocol( $property, $content ) { 10 11 if ( empty( $property ) || empty( $content ) ) … … 26 27 } 27 28 } 29 30 function fb_strip_and_format_desc( $post ) { 31 32 $desc_no_html = ""; 33 $desc_no_html = strip_shortcodes( $desc_no_html ); // Strip shortcodes first in case there is HTML inside the shortcode 34 $desc_no_html = wp_strip_all_tags( $desc_no_html ); // Strip all html 35 $desc_no_html = trim( $desc_no_html ); // Trim the final string, we may have stripped everything out of the post so this will make the value empty if that's the case 36 37 // Check if empty, may be that the strip functions above made excerpt empty, doubhtful but we want to be 100% sure. 38 if( empty($desc_no_html) ) { 39 $desc_no_html = $post->post_content; // Start over, this time with the post_content 40 $desc_no_html = strip_shortcodes( $desc_no_html ); // Strip shortcodes first in case there is HTML inside the shortcode 41 $desc_no_html = str_replace(']]>', ']]>', $desc_no_html); // Angelo Recommendation, if for some reason ]]> happens to be in the_content, rare but We've seen it happen 42 $desc_no_html = wp_strip_all_tags($desc_no_html); 43 $excerpt_length = apply_filters('excerpt_length', 55); 44 $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); 45 $desc_no_html = wp_trim_words( $desc_no_html, $excerpt_length, $excerpt_more ); 46 $desc_no_html = trim($desc_no_html); // Trim the final string, we may have stripped everything out of the post so this will make the value empty if that's the case 47 } 48 49 $desc_no_html = str_replace( array( "\r\n", "\r", "\n" ), ' ',$desc_no_html); // I take it Facebook doesn't like new lines? 50 return $desc_no_html; 51 } 52 28 53 29 54 /** … … 55 80 if ( !post_password_required($post) ) { 56 81 // First lets get the post excerpt (shouldn't have any html, but anyone can enter anything...) 57 $desc_no_html = $post->post_excerpt; 58 if ( !empty($excerpt_no_html) ) { 59 $desc_no_html = strip_shortcodes($desc_no_html); // Strip shortcodes first in case there is HTML inside the shortcode 60 $desc_no_html = wp_strip_all_tags($desc_no_html); // Strip all html 61 $desc_no_html = trim($desc_no_html); // Trim the final string, we may have stripped everything out of the post so this will make the value empty if that's the case 62 } 63 64 // Recheck if empty, may be that the strip functions above made excerpt empty, doubhtful but we want to be 100% sure. 65 if( empty($desc_no_html) ) { 66 $desc_no_html = $post->post_content; // Start over, this time with the post_content 67 $desc_no_html = strip_shortcodes( $desc_no_html ); // Strip shortcodes first in case there is HTML inside the shortcode 68 $desc_no_html = str_replace(']]>', ']]>', $desc_no_html); // Angelo Recommendation, if for some reason ]]> happens to be in the_content, rare but We've seen it happen 69 $desc_no_html = wp_strip_all_tags($desc_no_html); 70 $excerpt_length = apply_filters('excerpt_length', 55); 71 $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); 72 $desc_no_html = wp_trim_words( $desc_no_html, $excerpt_length, $excerpt_more ); 73 $desc_no_html = trim($desc_no_html); // Trim the final string, we may have stripped everything out of the post so this will make the value empty if that's the case 74 } 75 76 $desc_no_html = str_replace( array( "\r\n", "\r", "\n" ), ' ',$desc_no_html); // I take it Facebook doesn't like new lines? 77 $meta_tags['http://ogp.me/ns#description'] = $desc_no_html; 82 $meta_tags['http://ogp.me/ns#description'] = fb_strip_and_format_desc ( $post ); 78 83 } 79 84 } -
facebook/trunk/fb-social-publisher-mentioning.php
r561366 r571850 25 25 $friends = $facebook->api('/me/friends', 'GET', array('ref' => 'fbwpp')); 26 26 } 27 catch ( FacebookApiException $e) {27 catch (WP_FacebookApiException $e) { 28 28 } 29 29 … … 73 73 $pages = $facebook->api( '/search', 'GET', array( 'access_token' => '', 'q' => $_GET['q'], 'type' => 'page', 'fields' => 'picture,name,id,likes', 'ref' => 'fbwpp' ) ); 74 74 } 75 catch ( FacebookApiException $e) {75 catch (WP_FacebookApiException $e) { 76 76 } 77 77 set_transient( 'fb_pages_' . $_GET['q'], $pages, 60*60 ); … … 132 132 function fb_add_page_mention_box() { 133 133 global $post; 134 134 global $facebook; 135 $options = get_option('fb_options'); 136 135 137 if ($post->post_status == 'publish') 136 138 return; 137 139 138 add_meta_box( 139 'fb_page_mention_box_id', 140 __( 'Mention Facebook Pages', 'facebook' ), 141 'fb_add_page_mention_box_content', 142 'post', 143 'side' 144 ); 145 add_meta_box( 146 'fb_page_mention_box_id', 147 __( 'Mention Facebook Pages', 'facebook' ), 148 'fb_add_page_mention_box_content', 149 'page', 150 'side' 151 ); 140 if ( isset( $options['social_publisher']['enabled'] ) ) { 141 add_meta_box( 142 'fb_page_mention_box_id', 143 __( 'Mention Facebook Pages', 'facebook' ), 144 'fb_add_page_mention_box_content', 145 'post', 146 'side' 147 ); 148 add_meta_box( 149 'fb_page_mention_box_id', 150 __( 'Mention Facebook Pages', 'facebook' ), 151 'fb_add_page_mention_box_content', 152 'page', 153 'side' 154 ); 155 } 152 156 } 153 157 154 158 function fb_add_page_mention_box_content( $post ) { 155 //wp_enqueue_script('suggest');159 wp_enqueue_script('suggest'); 156 160 157 161 global $facebook; … … 177 181 echo '<input type="text" class="widefat" id="pages-mention-message" name="fb_page_mention_box_message" value="" size="44" placeholder="'.esc_attr__('Write something...').'" />'; 178 182 echo '<p class="howto">'; 179 if ( is_page()) {183 if ( $post->post_type == 'page' ) { 180 184 _e('This will add the page and message to the Timeline of each Facebook Page mentioned. They will also appear in the contents of the page.', 'facebook'); 181 185 } else { … … 249 253 global $post; 250 254 global $facebook; 251 255 $options = get_option('fb_options'); 256 252 257 if ($post->post_status == 'publish') 253 258 return; 254 259 255 add_meta_box( 256 'fb_friend_mention_box_id', 257 __( 'Mention Facebook Friends', 'facebook' ), 258 'fb_add_friend_mention_box_content', 259 'post', 260 'side' 261 ); 262 add_meta_box( 263 'fb_friend_mention_box_id', 264 __( 'Mention Facebook Friends', 'facebook' ), 265 'fb_add_friend_mention_box_content', 266 'page', 267 'side' 268 ); 260 if ( isset( $options['social_publisher']['enabled'] ) ) { 261 add_meta_box( 262 'fb_friend_mention_box_id', 263 __( 'Mention Facebook Friends', 'facebook' ), 264 'fb_add_friend_mention_box_content', 265 'post', 266 'side' 267 ); 268 add_meta_box( 269 'fb_friend_mention_box_id', 270 __( 'Mention Facebook Friends', 'facebook' ), 271 'fb_add_friend_mention_box_content', 272 'page', 273 'side' 274 ); 275 } 269 276 } 270 277 … … 295 302 296 303 echo '<p class="howto">'; 297 if ( is_page()) {304 if ( $post->post_type == 'page' ) { 298 305 _e('This will add the page and message to the Timeline of each friend mentioned. They will also appear in the contents of the page.', 'facebook'); 299 306 } else { -
facebook/trunk/fb-social-publisher.php
r561428 r571850 1 1 <?php 2 2 require_once( $facebook_plugin_directory . '/fb-social-publisher-mentioning.php'); 3 require_once('fb-open-graph.php'); 3 4 4 5 $options = get_option('fb_options'); … … 16 17 /** 17 18 * Add meta boxes for a custom Status that is used when posting to an Author's Timeline 18 * 19 *5 19 20 * @since 1.0 20 21 */ 21 22 function fb_add_author_message_box() { 22 23 global $post; 23 24 $options = get_option('fb_options'); 25 24 26 if ($post->post_status == 'publish') 25 27 return; 26 27 add_meta_box( 28 'fb_author_message_box_id', 29 __( 'Facebook Status on Your Timeline', 'facebook' ), 30 'fb_add_author_message_box_content', 31 'post' 32 ); 33 add_meta_box( 34 'fb_author_message_box_id', 35 __( 'Facebook Status on Your Timeline', 'facebook' ), 36 'fb_add_author_message_box_content', 37 'page' 38 ); 28 29 if ( isset( $options['social_publisher']['enabled'] ) ) { 30 add_meta_box( 31 'fb_author_message_box_id', 32 __( 'Facebook Status on Your Timeline', 'facebook' ), 33 'fb_add_author_message_box_content', 34 'post' 35 ); 36 add_meta_box( 37 'fb_author_message_box_id', 38 __( 'Facebook Status on Your Timeline', 'facebook' ), 39 'fb_add_author_message_box_content', 40 'page' 41 ); 42 } 39 43 } 40 44 … … 123 127 return; 124 128 125 if ( isset( $ fan_page_info ) && isset( $fan_page_info[0] ) && isset( $fan_page_info[0][2] ) ) {129 if ( isset( $options['social_publisher']['enabled'] ) && isset( $fan_page_info ) && isset( $fan_page_info[0] ) && isset( $fan_page_info[0][2] ) ) { 126 130 add_meta_box( 127 131 'fb_fan_page_message_box_id', … … 232 236 'name' => get_the_title(), 233 237 'caption' => apply_filters( 'the_excerpt', get_the_excerpt() ), 234 'description' => apply_filters( 'the_excerpt', get_the_excerpt() ),238 'description' => fb_strip_and_format_desc( $post ), 235 239 'message' => $fan_page_message, 236 240 ); … … 243 247 'name' => get_the_title(), 244 248 'caption' => apply_filters( 'the_excerpt', get_the_excerpt() ), 245 'description' => apply_filters( 'the_excerpt', get_the_excerpt() ),249 'description' => fb_strip_and_format_desc( $post ), 246 250 'message' => $fan_page_message, 247 251 ); … … 260 264 update_post_meta($post_id, 'fb_fan_page_post_id', sanitize_text_field($publish_result['id'])); 261 265 } 262 catch ( FacebookApiException $e) {266 catch (WP_FacebookApiException $e) { 263 267 $error_result = $e->getResult(); 264 268 … … 351 355 'name' => get_the_title(), 352 356 'caption' => apply_filters( 'the_excerpt', get_the_excerpt() ), 353 'description' => apply_filters( 'the_excerpt', get_the_excerpt() ), 357 'description' => fb_strip_and_format_desc( $post ), 354 358 'message' => $mentioned_friends_message, 355 359 ); … … 361 365 'name' => get_the_title(), 362 366 'caption' => apply_filters( 'the_excerpt', get_the_excerpt() ), 363 'description' => apply_filters( 'the_excerpt', get_the_excerpt() ), 367 'description' => fb_strip_and_format_desc( $post ), 364 368 'message' => $mentioned_friends_message, 365 369 ); … … 372 376 $publish_ids_friends[] = sanitize_text_field( $publish_result['id'] ); 373 377 374 $friends_posts .= '<a href="' . sanitize_text_field( fb_get_permalink_from_feed_publish_id( $publish_result['id'] ) ) . '" target="_blank"><img src="http://graph.facebook.com/' . $friend['id'] . '/picture" width="15"></a> ';375 } 376 catch ( FacebookApiException $e) {378 $friends_posts .= '<a href="' . esc_url( fb_get_permalink_from_feed_publish_id( $publish_result['id'] ) ) . '" target="_blank"><img src="' . esc_url( 'http://graph.facebook.com/' . $friend['id'] . '/picture' ) . '" width="15"></a> '; 379 } 380 catch (WP_FacebookApiException $e) { 377 381 $error_result = $e->getResult(); 378 382 379 383 if ($e->getCode() == 210) { 380 $status_messages[] = array( 'message' => sprintf( __( 'Failed posting to mentioned friend\'s Facebook Timeline. <img src=" http://graph.facebook.com/' . $friend['id'] . '/picture" width="15"> Error: Page doesn\'t allow posts from other Facebook users. Full error: ' . json_encode ( $error_result['error'] ), true ) ), 'error' => true );384 $status_messages[] = array( 'message' => sprintf( __( 'Failed posting to mentioned friend\'s Facebook Timeline. <img src="' . esc_url( 'http://graph.facebook.com/' . $friend['id'] . '/picture' ) . '" width="15"> Error: Page doesn\'t allow posts from other Facebook users. Full error: ' . json_encode ( $error_result['error'] ), true ) ), 'error' => true ); 381 385 } 382 386 else { 383 $status_messages[] = array( 'message' => sprintf( __( 'Failed posting to mentioned friend\'s Facebook Timeline. <img src=" http://graph.facebook.com/' . $friend['id'] . '/picture" width="15"> Error: ' . json_encode ( $error_result['error'] ), true ) ), 'error' => true );387 $status_messages[] = array( 'message' => sprintf( __( 'Failed posting to mentioned friend\'s Facebook Timeline. <img src="' . esc_url( 'http://graph.facebook.com/' . $friend['id'] . '/picture' ) . '" width="15"> Error: ' . json_encode ( $error_result['error'] ), true ) ), 'error' => true ); 384 388 } 385 389 } … … 410 414 'name' => get_the_title(), 411 415 'caption' => apply_filters( 'the_excerpt', get_the_excerpt() ), 412 'description' => apply_filters( 'the_excerpt', get_the_excerpt() ),416 'description' => fb_strip_and_format_desc( $post ), 413 417 'message' => $mentioned_pages_message, 414 418 ); … … 420 424 'name' => get_the_title(), 421 425 'caption' => apply_filters( 'the_excerpt', get_the_excerpt() ), 422 'description' => apply_filters( 'the_excerpt', get_the_excerpt() ),426 'description' => fb_strip_and_format_desc( $post ), 423 427 'message' => $mentioned_pages_message, 424 428 ); … … 434 438 435 439 } 436 catch ( FacebookApiException $e) {440 catch (WP_FacebookApiException $e) { 437 441 $error_result = $e->getResult(); 438 442 … … 469 473 470 474 } 471 catch ( FacebookApiException $e) {475 catch (WP_FacebookApiException $e) { 472 476 $error_result = $e->getResult(); 473 477 … … 510 514 if ( ! isset( $facebook ) ) 511 515 return; 512 513 $accounts = fb_get_user_pages(); 514 515 $accounts_options = array('disabled' => '[Disabled]'); 516 517 $options = get_option('fb_options'); 518 519 if (isset($options['social_publisher']) && isset($options['social_publisher']['publish_to_fan_page']) && $options['social_publisher']['publish_to_fan_page'] != 'disabled') { 520 preg_match_all("/(.*?)@@!!(.*?)@@!!(.*?)$/su", $options['social_publisher']['publish_to_fan_page'], $fan_page_info, PREG_SET_ORDER); 521 } 522 523 foreach($accounts as $account) { 524 if (isset($account['name']) && isset($account['category']) && $account['category'] != 'Application') { 525 $account_options_key = $account['name'] . "@@!!" . $account['id'] . "@@!!" . $account['access_token']; 526 $accounts_options[$account_options_key] = $account['name']; 527 528 if ( isset( $fan_page_info ) && isset( $fan_page_info[0] ) && isset( $fan_page_info[0][2] ) ) { 529 if ($account['id'] == $fan_page_info[0][2]) { 530 $options['social_publisher']['publish_to_fan_page'] = $account_options_key; 531 532 update_option( 'fb_options', $options ); 533 } 534 } 535 } 536 } 516 517 $fan_page_option = array(); 518 519 if (!$facebook->getUser() ) { 520 $fan_page_option = array( 521 'name' => 'publish_to_fan_page', 522 'type' => 'disabled_text', 523 'disabled_text' => '<a href="#" onclick="authFacebook(); return false;">'.__('Link your Facebook account to your WordPress account to enable.','facebook').'</a>', 524 'help_text' => __( 'All new posts will be automatically published to this Facebook Page.', 'facebook' ), 525 ); 526 } 527 else { 528 $accounts = fb_get_user_pages(); 529 530 $accounts_options = array('disabled' => '[Disabled]'); 531 532 $options = get_option('fb_options'); 533 534 if (isset($options['social_publisher']) && isset($options['social_publisher']['publish_to_fan_page']) && $options['social_publisher']['publish_to_fan_page'] != 'disabled') { 535 preg_match_all("/(.*?)@@!!(.*?)@@!!(.*?)$/su", $options['social_publisher']['publish_to_fan_page'], $fan_page_info, PREG_SET_ORDER); 536 } 537 538 foreach($accounts as $account) { 539 if (isset($account['name']) && isset($account['category']) && $account['category'] != 'Application') { 540 $account_options_key = $account['name'] . "@@!!" . $account['id'] . "@@!!" . $account['access_token']; 541 $accounts_options[$account_options_key] = $account['name']; 542 543 if ( isset( $fan_page_info ) && isset( $fan_page_info[0] ) && isset( $fan_page_info[0][2] ) ) { 544 if ($account['id'] == $fan_page_info[0][2]) { 545 $options['social_publisher']['publish_to_fan_page'] = $account_options_key; 546 547 update_option( 'fb_options', $options ); 548 } 549 } 550 } 551 } 552 553 $fan_page_option = array( 554 'name' => 'publish_to_fan_page', 555 'type' => 'dropdown', 556 'options' => $accounts_options, 557 'help_text' => __( 'New posts will be publish to this Facebook Page.', 'facebook' ), 558 ); 559 560 } 537 561 538 562 $parent = array( … … 544 568 'image' => plugins_url( 'images/settings_social_publisher.png', __FILE__) 545 569 ); 546 547 if (count($accounts_options) < 2) { 548 $fan_page_option = array( 549 'name' => 'publish_to_fan_page', 550 'type' => 'disabled_text', 551 'disabled_text' => '<a href="#" onclick="authFacebook(); return false;">'.__('Link your Facebook account to your WordPress account to enable.','facebook').'</a>', 552 'help_text' => __( 'All new posts will be automatically published to this Facebook Page.', 'facebook' ), 553 ); 554 } 555 else { 556 $fan_page_option = array( 557 'name' => 'publish_to_fan_page', 558 'type' => 'dropdown', 559 'options' => $accounts_options, 560 'help_text' => __( 'New posts will be publish to this Facebook Page.', 'facebook' ), 561 ); 562 } 563 570 564 571 $children = array( 565 572 array( … … 593 600 add_action( 'transition_post_status', 'fb_publish_later', 10, 3); 594 601 function fb_publish_later($new_status, $old_status, $post) { 602 $options = get_option('fb_options'); 603 595 604 // check that the new status is "publish" and that the old status was not "publish" 596 605 if ($new_status == 'publish' && $old_status != 'publish') { … … 598 607 $post_types = get_post_types( array('public' => true), 'objects' ); 599 608 foreach ( $post_types as $post_type ) { 600 if ( $post->post_type == $post_type->name ) {609 if ( $post->post_type == $post_type->name && isset( $options['social_publisher']['enabled'] ) ) { 601 610 fb_post_to_fb_page($post->ID); 602 611 … … 623 632 $delete_result = $facebook->api('/' . $fb_page_post_id, 'DELETE', array('ref' => 'fbwpp')); 624 633 } 625 catch ( FacebookApiException $e) {634 catch (WP_FacebookApiException $e) { 626 635 } 627 636 } … … 633 642 $delete_result = $facebook->api('/' . $fb_author_post_id, 'DELETE', array('ref' => 'fbwpp')); 634 643 } 635 catch ( FacebookApiException $e) {644 catch (WP_FacebookApiException $e) { 636 645 } 637 646 … … 645 654 $delete_result = $facebook->api('/' . $page_post_ids, 'DELETE', array('ref' => 'fbwpp')); 646 655 } 647 catch ( FacebookApiException $e) {656 catch (WP_FacebookApiException $e) { 648 657 } 649 658 } … … 657 666 $delete_result = $facebook->api('/' . $page_post_ids, 'DELETE', array('ref' => 'fbwpp')); 658 667 } 659 catch ( FacebookApiException $e) {668 catch (WP_FacebookApiException $e) { 660 669 } 661 670 } … … 686 695 $accounts = $facebook->api('/me/accounts', 'GET', array('ref' => 'fbwpp')); 687 696 } 688 catch ( FacebookApiException $e) {697 catch (WP_FacebookApiException $e) { 689 698 return $accounts; 690 699 } -
facebook/trunk/fb-wp-helpers.php
r561366 r571850 258 258 259 259 260 function fb_option_name($field){ 261 switch ($field) { 262 case 'app_id': 263 return 'App ID'; 264 break; 265 case 'app_secret': 266 return 'App secret'; 267 break; 268 case 'app_namespace': 269 return 'App namespace'; 270 break; 271 case 'social_publisher': 272 return "Social Publisher"; 273 break; 274 case 'recommendations_bar': 275 return "Recommendations Bar"; 276 break; 277 case 'like': 278 return "Like Button"; 279 break; 280 case 'subscribe': 281 return "Subscribe Button"; 282 break; 283 case 'send': 284 return "Send Button"; 285 break; 286 case 'comments': 287 return "Comments Box"; 288 break; 289 default: 290 return ''; 291 break; 292 } 293 } 294 260 295 ?> -
facebook/trunk/includes/facebook-php-sdk/base_facebook.php
r556379 r571850 16 16 */ 17 17 18 if ( ! class_exists( ' FacebookApiException' ) ):18 if ( ! class_exists( 'WP_FacebookApiException' ) ): 19 19 /** 20 20 * Thrown when an API call returns an exception. … … 22 22 * @author Naitik Shah <[email protected]> 23 23 */ 24 class FacebookApiException extends Exception24 class WP_FacebookApiException extends Exception 25 25 { 26 26 /** … … 37 37 $this->result = $result; 38 38 39 $code = isset($result['error_code']) ? $result['error_code'] : 0; 39 //when api call fails (no available transport, i.e. cURL etc. not working), error code comes 40 // out as string 'http_failure', but $code needs to be int. is_int returns false if !isset() 41 $code = is_int($result['error_code']) ? $result['error_code'] : 0; 40 42 41 43 if (isset($result['error_description'])) { … … 102 104 endif; 103 105 104 if ( ! class_exists( ' BaseFacebook' ) ):106 if ( ! class_exists( 'WP_BaseFacebook' ) ): 105 107 /** 106 108 * Provides access to the Facebook Platform. This class provides … … 112 114 * @author Naitik Shah <[email protected]> 113 115 */ 114 abstract class BaseFacebook116 abstract class WP_BaseFacebook 115 117 { 116 118 /** … … 214 216 * 215 217 * @param string $appId The Application ID 216 * @return BaseFacebook218 * @return WP_BaseFacebook 217 219 */ 218 220 public function setAppId($appId) { … … 234 236 * 235 237 * @param string $apiSecret The App Secret 236 * @return BaseFacebook238 * @return WP_BaseFacebook 237 239 * @deprecated 238 240 */ … … 246 248 * 247 249 * @param string $appSecret The App Secret 248 * @return BaseFacebook250 * @return WP_BaseFacebook 249 251 */ 250 252 public function setAppSecret($appSecret) { … … 276 278 * Thanks to http://stackoverflow.com/questions/486896/adding-a-parameter-to-the-url-with-javascript for the workaround 277 279 */ 278 public function getExtendedAccessToken() {280 public function setExtendedAccessToken() { 279 281 try { 280 282 // need to circumvent json_decode by calling _oauthRequest … … 288 290 'fb_exchange_token'=>$this->getAccessToken(), 289 291 )); 290 } catch ( FacebookApiException $e) {292 } catch (WP_FacebookApiException $e) { 291 293 // most likely that user very recently revoked authorization. 292 294 // In any event, we don't have an access token, so say so. … … 314 316 * 315 317 * @param boolean $fileUploadSupport The file upload support status. 316 * @return BaseFacebook318 * @return WP_BaseFacebook 317 319 */ 318 320 public function setFileUploadSupport($fileUploadSupport) { … … 347 349 * 348 350 * @param string $access_token an access token. 349 * @return BaseFacebook351 * @return WP_BaseFacebook 350 352 */ 351 353 public function setAccessToken($access_token) { … … 616 618 * Constructs and returns the name of the cookie that 617 619 * potentially houses the signed request for the app user. 618 * The cookie is not set by the BaseFacebook class, but620 * The cookie is not set by the WP_BaseFacebook class, but 619 621 * it may be set by the JavaScript SDK. 620 622 * … … 628 630 /** 629 631 * Constructs and returns the name of the coookie that potentially contain 630 * metadata. The cookie is not set by the BaseFacebook class, but it may be632 * metadata. The cookie is not set by the WP_BaseFacebook class, but it may be 631 633 * set by the JavaScript SDK. 632 634 * … … 678 680 $user_info = $this->api('/me'); 679 681 return $user_info['id']; 680 } catch ( FacebookApiException $e) {682 } catch (WP_FacebookApiException $e) { 681 683 return 0; 682 684 } … … 737 739 'redirect_uri' => $redirect_uri, 738 740 'code' => $code)); 739 } catch ( FacebookApiException $e) {741 } catch (WP_FacebookApiException $e) { 740 742 // most likely that user very recently revoked authorization. 741 743 // In any event, we don't have an access token, so say so. … … 762 764 * 763 765 * @return mixed The decoded response object 764 * @throws FacebookApiException766 * @throws WP_FacebookApiException 765 767 */ 766 768 protected function _restserver($params) { … … 810 812 * 811 813 * @return mixed The decoded response object 812 * @throws FacebookApiException814 * @throws WP_FacebookApiException 813 815 */ 814 816 protected function _graph($path, $method = 'GET', $params = array()) { … … 845 847 * 846 848 * @return string The decoded response object 847 * @throws FacebookApiException849 * @throws WP_FacebookApiException 848 850 */ 849 851 protected function _oauthRequest($url, $params) { … … 908 910 909 911 if ($result === false) { 910 $e = new FacebookApiException(array(912 $e = new WP_FacebookApiException(array( 911 913 'error_code' => curl_errno($ch), 912 914 'error' => array( … … 1128 1130 */ 1129 1131 protected function throwAPIException($result) { 1130 $e = new FacebookApiException($result);1132 $e = new WP_FacebookApiException($result); 1131 1133 switch ($e->getType()) { 1132 1134 // OAuth 2.0 Draft 00 style … … 1268 1270 1269 1271 /** 1270 * Get the data for $key, persisted by BaseFacebook::setPersistentData()1272 * Get the data for $key, persisted by WP_BaseFacebook::setPersistentData() 1271 1273 * 1272 1274 * @param string $key The key of the data to retrieve -
facebook/trunk/includes/facebook-php-sdk/class-facebook-wp.php
r561366 r571850 1 1 <?php 2 2 3 if ( ! class_exists( ' Facebook' ) )3 if ( ! class_exists( 'WP_Facebook' ) ) 4 4 require_once( dirname( __FILE__ ) . '/facebook.php' ); 5 5 … … 9 9 * @since 1.0 10 10 */ 11 class Facebook_WP extendsFacebook {11 class Facebook_WP_Extend extends WP_Facebook { 12 12 /** 13 13 * Override Facebook PHP SDK cURL function with WP_HTTP … … 25 25 26 26 if ( empty( $url ) || empty( $params ) ) 27 throw new FacebookApiException( array( 'error_code' => 400, 'error' => array( 'type' => 'makeRequest', 'message' => 'Invalid parameters and/or URI passed to makeRequest' ) ) );28 27 throw new WP_FacebookApiException( array( 'error_code' => 400, 'error' => array( 'type' => 'makeRequest', 'message' => 'Invalid parameters and/or URI passed to makeRequest' ) ) ); 28 29 29 $params = array( 30 30 'redirection' => 0, … … 32 32 'timeout' => 60, 33 33 'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) . '; facebook-php-' . self::VERSION . '-wp' ), 34 'headers' => array( ' Expect:'),34 'headers' => array( 'Connection' => 'close' , 'Content-type' => 'application/x-www-form-urlencoded'), 35 35 'sslverify' => false, // warning: might be overridden by 'https_ssl_verify' filter 36 36 'body' => http_build_query( $params, '', '&' ) … … 40 40 41 41 if ( is_wp_error( $response ) ) { 42 throw new FacebookApiException( array( 'error_code' => $response->get_error_code(), 'error_msg' => $response->get_error_message() ) );42 throw new WP_FacebookApiException( array( 'error_code' => $response->get_error_code(), 'error_msg' => $response->get_error_message() ) ); 43 43 } 44 44 else if ( wp_remote_retrieve_response_code( $response ) != '200' ) { … … 51 51 } 52 52 53 throw new FacebookApiException(array(53 throw new WP_FacebookApiException(array( 54 54 'error_code' => $fb_response->error->code, 55 55 'error' => array( … … 67 67 * Thanks to http://stackoverflow.com/questions/486896/adding-a-parameter-to-the-url-with-javascript for the workaround 68 68 */ 69 public function getExtendedAccessToken() {69 public function setExtendedAccessToken() { 70 70 try { 71 71 // need to circumvent json_decode by calling _oauthRequest … … 79 79 'fb_exchange_token'=>$this->getAccessToken(), 80 80 )); 81 } catch ( FacebookApiException $e) {81 } catch (WP_FacebookApiException $e) { 82 82 // most likely that user very recently revoked authorization. 83 83 // In any event, we don't have an access token, so say so. -
facebook/trunk/includes/facebook-php-sdk/facebook.php
r556379 r571850 18 18 require_once( dirname(__FILE__) . '/base_facebook.php' ); 19 19 20 if ( ! class_exists( ' Facebook' ) ):20 if ( ! class_exists( 'WP_Facebook' ) ): 21 21 22 22 /** 23 * Extends the BaseFacebook class with the intent of using23 * Extends the WP_BaseFacebook class with the intent of using 24 24 * PHP sessions to store user ids and access tokens. 25 25 */ 26 class Facebook extendsBaseFacebook26 class WP_Facebook extends WP_BaseFacebook 27 27 { 28 28 /** … … 33 33 * 34 34 * @param Array $config the application configuration. 35 * @see BaseFacebook::__construct in facebook.php35 * @see WP_BaseFacebook::__construct in facebook.php 36 36 */ 37 37 public function __construct($config) { 38 if (!session_id()) { 39 session_start(); 40 } 38 41 39 parent::__construct($config); 42 40 } -
facebook/trunk/readme.txt
r561366 r571850 1 1 === Facebook === 2 Contributors: Facebook, automattic, mattwkelly, niallkennedy, jamesgpearce, ravi.grover, danielbachhuber, gigawats, eosgood, Otto422 Contributors: Facebook, automattic, mattwkelly, niallkennedy, rgharpuray, ngfeldman, jamesgpearce, ravi.grover, danielbachhuber, gigawats, eosgood, Otto42 3 3 Tags: Facebook, comments, social, friends, like, like button, social plugins, facebook platform, page, posts, sidebar, plugin, open graph 4 4 Requires at least: 3.2.1 … … 55 55 == Changelog == 56 56 57 = 1.0.2 = 58 59 * Fixed issue where some sites were extremely slow as a result of installing the plugin (due to cURL not being installed). 60 * Added warning and actively disable portions of the plugin if SSL not installed. 61 * Fixed bug in social publishing. 62 * Added logic to disable meta boxes/publishing if social publishing is disabled. 63 * Fixed forever loading issue on FB settings page if no active user exists. 64 * Added proper escaping. 65 * Added global settings to set whether social plugins show on all posts, all pages, both, or neither. Done for like button, subscribe button, send button, comments, and recommendations bar. 66 * Added per-post/page settings for showing/hiding social plugins. 67 * Fixed poorly formatted description that was being set when publishing to friends' and Pages' feeds. 68 * Added notification if plugins that are potentially conflicting are installed. 69 * Added suggestions for what to enter in fields in the new user experience. 70 * Bug fixes to ensure everything works on mobile (including support for WPTouch). 71 * Bug fixes to Pages drop down on the Facebook settings page. 72 * Removed the need to create PHP sessions, relying on user meta/transients now. 73 57 74 = 1.0.1 = 58 75 -
facebook/trunk/scripts/fb-admin.dev.js
r561366 r571850 49 49 50 50 jQuery(function() { 51 jQuery("#suggest-friends").tokenInput( "?fb-friends=1", {51 jQuery("#suggest-friends").tokenInput(ajaxurl + "?fb-friends=1&action=fb_friend_page_autocomplete&autocompleteNonce=" +FBNonce.autocompleteNonce, { 52 52 theme: "facebook", 53 53 preventDuplicates: true, 54 hintText: "Type to find a friend." 54 hintText: "Type to find a friend.", 55 animateDropdown: false, 56 noResultsText: "No friend found.", 55 57 }); 56 });; 58 }); 59 60 jQuery(function() { 61 jQuery("#suggest-pages").tokenInput(ajaxurl + "?fb-pages=1&action=fb_friend_page_autocomplete&autocompleteNonce=" +FBNonce.autocompleteNonce, { 62 theme: "facebook", 63 preventDuplicates: true, 64 hintText: "Type to find a page.", 65 animateDropdown: false, 66 noResultsText: "No page found.", 67 }); 68 }); 57 69 58 70 function fbShowDebugInfo() { 59 $('#debug-output').show(); 60 61 return false; 71 jQuery('#debug-output').show(); 62 72 } -
facebook/trunk/social-plugins/fb-comments.php
r561366 r571850 47 47 if ( isset ( $post ) ) { 48 48 if ( comments_open( get_the_ID() ) && post_type_supports( get_post_type(), 'comments' ) ) { 49 if ( is_singular() ) { 50 $options = get_option('fb_options'); 51 52 foreach($options['comments'] as $param => $val) { 53 $param = str_replace('_', '-', $param); 54 49 $options = get_option('fb_options'); 50 $show_indiv = get_post_meta( $post->ID, 'fb_social_plugin_settings_box_comments', true ); 51 if ( ! is_home() && ( 'default' == $show_indiv || empty( $show_indiv ) ) && $options['comments']['show_on'] ) { 52 if ( ( is_page() && ( $options['comments']['show_on'] == 'all pages' || $options['comments']['show_on'] == 'all posts and pages' ) ) 53 or ( is_single() && ( $options['comments']['show_on'] == 'all posts' || $options['comments']['show_on'] == 'all posts and pages' ) ) ) 54 { 55 foreach( $options['comments'] as $param => $val ) { 56 $param = str_replace( '_', '-', $param ); 57 58 $params[$param] = $val; 59 } 60 61 $content .= fb_get_comments( $params ); 62 } 63 } 64 elseif ( 'show' == $show_indiv ) { 65 foreach( $options['comments'] as $param => $val ) { 66 $param = str_replace( '_', '-', $param ); 67 55 68 $params[$param] = $val; 56 69 } 57 58 $content .= fb_get_comments( $params);70 71 $content .= fb_get_comments( $params ); 59 72 } 60 else{61 }73 //elseif ( 'no' == $show_indiv ) { 74 //} 62 75 } 63 76 } … … 77 90 $comments = $facebook->api('/comments', array('ids' => $url)); 78 91 } 79 catch ( FacebookApiException $e) {92 catch (WP_FacebookApiException $e) { 80 93 } 81 94 … … 137 150 'help_text' => 'The color scheme of the plugin.', 138 151 ), 152 array('name' => 'show_on', 153 'type' => 'dropdown', 154 'default' => 'all posts and pages', 155 'options' => array('all posts' => 'all posts', 'all pages' => 'all pages', 'all posts and pages' => 'all posts and pages', 'individual posts and pages' => 'individual posts and pages' ), 156 'help_text' => __( 'Whether the plugin will appear on all posts or pages by default. If "individual posts and pages" is selected, you must explicitly set each post and page to display the plugin.', 'facebook' ), 157 ) 139 158 ); 140 159 -
facebook/trunk/social-plugins/fb-like.php
r561366 r571850 45 45 } 46 46 47 if ( empty( $options['like']['show_on_homepage'] ) && is_singular() ) { 47 $show_indiv = get_post_meta( $post->ID, 'fb_social_plugin_settings_box_like', true ); 48 49 if ( is_home() && isset ( $options['like']['show_on_homepage'] ) ) { 48 50 $content = $new_content; 49 51 } 50 elseif ( isset($options['like']['show_on_homepage']) ) { 52 elseif ( ( 'default' == $show_indiv || empty( $show_indiv ) ) && isset ( $options['like']['show_on'] ) ) { 53 if ( is_page() && ( $options['like']['show_on'] == 'all pages' || $options['like']['show_on'] == 'all posts and pages' ) ) 54 $content = $new_content; 55 elseif ( is_single() && ( $options['like']['show_on'] == 'all posts' || $options['like']['show_on'] == 'all posts and pages' ) ) 56 $content = $new_content; 57 } 58 elseif ( 'show' == $show_indiv ) { 51 59 $content = $new_content; 52 60 } … … 193 201 'help_text' => __( 'Where the button will display on the page or post.', 'facebook' ), 194 202 ); 203 $array['children'][] = array('name' => 'show_on', 204 'type' => 'dropdown', 205 'default' => 'all posts and pages', 206 'options' => array('all posts' => 'all posts', 'all pages' => 'all pages', 'all posts and pages' => 'all posts and pages', 'individual posts and pages' => 'individual posts and pages' ), 207 'help_text' => __( 'Whether the plugin will appear on all posts or pages by default. If "individual posts and pages" is selected, you must explicitly set each post and page to display the plugin.', 'facebook' ), 208 ); 195 209 $array['children'][] = array('name' => 'show_on_homepage', 196 210 'type' => 'checkbox', -
facebook/trunk/social-plugins/fb-recommendations-bar.php
r556379 r571850 6 6 } 7 7 8 function fb_recommendations_bar_automatic($content) { 9 if (!is_home()) { 10 $options = get_option('fb_options'); 11 12 $content .= fb_get_recommendations_bar($options['recommendations_bar']); 8 function fb_recommendations_bar_automatic( $content ) { 9 global $post; 10 $show_indiv = get_post_meta( $post->ID, 'fb_social_plugin_settings_box_recommendations_bar', true ); 11 $options = get_option('fb_options'); 12 if ( ! is_home() && ( 'default' == $show_indiv || empty( $show_indiv ) ) && $options['recommendations_bar']['show_on'] ) { 13 if ( ( is_page() && ( $options['recommendations_bar']['show_on'] == 'all pages' || $options['recommendations_bar']['show_on'] == 'all posts and pages' ) ) 14 or ( is_single() && ( $options['recommendations_bar']['show_on'] == 'all posts' || $options['recommendations_bar']['show_on'] == 'all posts and pages' ) ) ) 15 { 16 $content .= fb_get_recommendations_bar( $options['recommendations_bar'] ); 17 } 13 18 } 14 19 elseif ( 'show' == $show_indiv ) { 20 $content .= fb_get_recommendations_bar( $options['recommendations_bar'] ); 21 } 22 //elseif ( 'no' == $show_indiv ) { 23 //} 24 15 25 return $content; 16 26 } … … 53 63 'help_text' => __( 'The side of the window that the plugin will display.', 'facebook' ), 54 64 ), 65 array('name' => 'show_on', 66 'type' => 'dropdown', 67 'default' => 'all posts and pages', 68 'options' => array('all posts' => 'all posts', 'all pages' => 'all pages', 'all posts and pages' => 'all posts and pages', 'individual posts and pages' => 'individual posts and pages' ), 69 'help_text' => __( 'Whether the plugin will appear on all posts or pages by default. If "individual posts and pages" is selected, you must explicitly set each post and page to display the plugin.', 'facebook' ), 70 ) 55 71 ); 56 72 -
facebook/trunk/social-plugins/fb-send.php
r561366 r571850 12 12 13 13 if ( isset( $post ) ) { 14 if ( isset( $options['send']['show_on_homepage']) ) {14 if ( isset( $options['send']['show_on_homepage'] ) ) { 15 15 $options['send']['href'] = get_permalink($post->ID); 16 16 } … … 18 18 $new_content = ''; 19 19 20 switch ( $options['send']['position']) {20 switch ( $options['send']['position'] ) { 21 21 case 'top': 22 $new_content = fb_get_send_button( $options['send']) . $content;22 $new_content = fb_get_send_button( $options['send'] ) . $content; 23 23 break; 24 24 case 'bottom': 25 $new_content = $content . fb_get_send_button( $options['send']);25 $new_content = $content . fb_get_send_button( $options['send'] ); 26 26 break; 27 27 case 'both': 28 $new_content = fb_get_send_button( $options['send']) . $content;29 $new_content .= fb_get_send_button( $options['send']);28 $new_content = fb_get_send_button( $options['send'] ) . $content; 29 $new_content .= fb_get_send_button( $options['send'] ); 30 30 break; 31 31 } 32 33 if ( empty( $options['send']['show_on_homepage'] ) && is_singular() ) { 32 33 $show_indiv = get_post_meta( $post->ID, 'fb_social_plugin_settings_box_send', true ); 34 35 if ( is_home() && isset ( $options['send']['show_on_homepage'] ) ) { 34 36 $content = $new_content; 35 37 } 36 elseif ( isset($options['send']['show_on_homepage']) ) { 38 elseif ( ( 'default' == $show_indiv || empty( $show_indiv ) ) && isset ( $options['send']['show_on'] ) ) { 39 if ( is_page() && ( $options['send']['show_on'] == 'all pages' || $options['send']['show_on'] == 'all posts and pages' ) ) 40 $content = $new_content; 41 elseif ( is_single() && ( $options['send']['show_on'] == 'all posts' || $options['send']['show_on'] == 'all posts and pages' ) ) 42 $content = $new_content; 43 } 44 elseif ( 'show' == $show_indiv ) { 37 45 $content = $new_content; 38 46 } 47 39 48 } 40 49 … … 156 165 'help_text' => __( 'Where the button will display on the page or post.', 'facebook' ), 157 166 ); 167 $array['children'][] = array('name' => 'show_on', 168 'type' => 'dropdown', 169 'default' => 'all posts and pages', 170 'options' => array('all posts' => 'all posts', 'all pages' => 'all pages', 'all posts and pages' => 'all posts and pages', 'individual posts and pages' => 'individual posts and pages' ), 171 'help_text' => __( 'Whether the plugin will appear on all posts or pages by default. If "individual posts and pages" is selected, you must explicitly set each post and page to display the plugin.', 'facebook' ), 172 ); 158 173 $array['children'][] = array('name' => 'show_on_homepage', 159 174 'type' => 'checkbox', -
facebook/trunk/social-plugins/fb-social-plugins.php
r561366 r571850 65 65 return $params; 66 66 } 67 68 if ( true ) { 69 add_action( 'add_meta_boxes', 'fb_add_social_plugin_settings_box' ); 70 add_action( 'save_post', 'fb_add_social_plugin_settings_box_save' ); 71 } 72 73 /** 74 * Add meta box for social plugin settings for individual posts and pages 75 * 76 * @since 1.0.2 77 */ 78 function fb_add_social_plugin_settings_box() { 79 global $post; 80 $options = get_option('fb_options'); 81 82 if ( true ) { 83 add_meta_box( 84 'fb_social_plugin_settings_box_id', 85 __( 'Facebook Social Plugins', 'facebook' ), 86 'fb_add_social_plugin_settings_box_content', 87 'post' 88 ); 89 add_meta_box( 90 'fb_social_plugin_settings_box_id', 91 __( 'Facebook Social Plugins', 'facebook' ), 92 'fb_add_social_plugin_settings_box_content', 93 'page' 94 ); 95 } 96 } 97 98 /** 99 * Add meta boxes for a custom Status that is used when posting to an Author's Timeline 100 * 101 * @since 1.0.2 102 */ 103 function fb_add_social_plugin_settings_box_content( $post ) { 104 $options = get_option('fb_options'); 105 106 $features = array( 'like', 'subscribe', 'send', 'comments', 'recommendations_bar' ); 107 echo '<table><p>Change the settings below to show or hide particular Social Plugins. </p>'; 108 foreach ( $features as $feature ) { 109 if ( $options[ $feature ]['enabled'] ) { 110 $value = get_post_meta($post->ID,"fb_social_plugin_settings_box_$feature",true); 111 echo '<tr><td>' . fb_option_name( $feature ) . "</td> <td><label><input type = \"radio\" name=\"fb_social_plugin_settings_box_$feature\" value=\"default\" " 112 . ( $value == 'default' || empty($value) ? 'checked="checked" ' : '' ) . "/>Default (" . $options[$feature]['show_on'] . ")</label></td> <td><label><input type=\"radio\" name=\"fb_social_plugin_settings_box_$feature\" value =\"show\" " 113 . ( $value == 'show' ? 'checked="checked" ' : '' ) . "/>Show</label></td> <td><label><input type=\"radio\" name=\"fb_social_plugin_settings_box_$feature\" value =\"hide\" " 114 . ( $value == 'hide' ? 'checked="checked" ' : '' ) . "/>Hide</label></td> </tr>" ; 115 } 116 } 117 echo '</table><p class="howto"> If \'Default\' is selected, the Social Plugin will appear based on the global setting, set on the Facebook Settings page. If you choose "Show" or "Hide", the Social Plugin will ignore the global setting for this ' . ( $post->post_type == 'page' ? 'page' : 'post' ) . '.</p>'; 118 } 119 120 function fb_add_social_plugin_settings_box_save( $post_id ) { 121 $features = array( 'like', 'subscribe', 'send', 'comments', 'recommendations_bar' ); 122 foreach ( $features as $feature ) { 123 $index = "fb_social_plugin_settings_box_$feature"; 124 if ( isset( $_POST) && isset( $_POST[$index] )) { 125 switch ( $_POST[ $index ]) { 126 case 'default': 127 update_post_meta( $post_id, $index, 'default' ); 128 break; 129 case 'show': 130 update_post_meta( $post_id, $index, 'show' ); 131 break; 132 case 'hide': 133 update_post_meta( $post_id, $index, 'hide' ); 134 break; 135 } 136 } 137 } 138 } 139 140 141 /* 142 function fb_add_social_plugin_settings_box_content( $post ) { 143 $options = get_option('fb_options'); 144 145 $features = array( 'like', 'subscribe', 'send', 'comments', 'recommendations_bar' ); 146 echo '<table><p>Change the settings below to show or hide particular Social Plugins.</p>'; 147 foreach ( $features as $feature ) { 148 if ( $options[$feature]['enabled'] ) { 149 $value = get_post_meta( $post->ID, "fb_social_plugin_settings_box_$feature", true ); 150 151 if ( empty( $value ) ) { 152 if ( $post->post_type == 'page' ) { 153 if ( $options[$feature]['show_on'] == 'all posts and pages' || $options[$feature]['show_on'] == 'all pages' ) { 154 $value = 'show'; 155 } 156 else { 157 $value = 'hide'; 158 } 159 } 160 else { 161 if ( $options[$feature]['show_on'] == 'all posts and pages' || $options[$feature]['show_on'] == 'all posts' ) { 162 $value = 'show'; 163 } 164 else { 165 $value = 'hide'; 166 } 167 } 168 } 169 170 echo '<tr><td>' . fb_option_name( $feature ) . "</td> <td><label><input type=\"radio\" name=\"fb_social_plugin_settings_box_$feature\" value =\"show\" " 171 . ( $value == 'show' ? 'checked="checked" ' : '' ) . "/>Show</label></td> <td><label><input type=\"radio\" name=\"fb_social_plugin_settings_box_$feature\" value =\"hide\" " 172 . ( $value == 'hide' ? 'checked="checked" ' : '' ) . "/>Hide</label></td> </tr>" ; 173 } 174 } 175 echo '</table>'; 176 } 177 178 function fb_add_social_plugin_settings_box_save( $post_id ) { 179 $features = array( 'like', 'subscribe', 'send', 'comments', 'recommendations_bar' ); 180 foreach ( $features as $feature ) { 181 $index = "fb_social_plugin_settings_box_$feature"; 182 if ( isset( $_POST) && isset( $_POST[$index] )) { 183 switch ( $_POST[$index]) { 184 case 'show': 185 update_post_meta( $post_id, $index, 'show' ); 186 break; 187 case 'hide': 188 update_post_meta( $post_id, $index, 'hide' ); 189 break; 190 } 191 } 192 } 193 } 194 */ 67 195 ?> -
facebook/trunk/social-plugins/fb-subscribe.php
r561366 r571850 12 12 13 13 if ( isset ($post ) ) { 14 if ( isset( $options['subscribe']['show_on_homepage']) ) {15 16 $options['subscribe']['href'] = get_permalink( $post->ID);17 } 18 19 $fb_data = fb_get_user_meta( get_the_author_meta('ID'), 'fb_data', true);20 21 if ( !$fb_data) {14 if ( isset( $options['subscribe']['show_on_homepage'] ) ) { 15 16 $options['subscribe']['href'] = get_permalink( $post->ID ); 17 } 18 19 $fb_data = fb_get_user_meta( get_the_author_meta( 'ID' ), 'fb_data', true ); 20 21 if ( ! $fb_data ) { 22 22 return $content; 23 23 } … … 27 27 $new_content = ''; 28 28 29 if ( isset($fb_data['username'])) {30 switch ( $options['subscribe']['position']) {29 if ( isset( $fb_data['username'] ) ) { 30 switch ( $options['subscribe']['position'] ) { 31 31 case 'top': 32 $new_content = fb_get_subscribe_button( $options['subscribe']) . $content;32 $new_content = fb_get_subscribe_button( $options['subscribe'] ) . $content; 33 33 break; 34 34 case 'bottom': 35 $new_content = $content . fb_get_subscribe_button( $options['subscribe']);35 $new_content = $content . fb_get_subscribe_button( $options['subscribe'] ); 36 36 break; 37 37 case 'both': 38 $new_content = fb_get_subscribe_button( $options['subscribe']) . $content;39 $new_content .= fb_get_subscribe_button( $options['subscribe']);38 $new_content = fb_get_subscribe_button( $options['subscribe'] ) . $content; 39 $new_content .= fb_get_subscribe_button( $options['subscribe'] ); 40 40 break; 41 41 } 42 42 } 43 43 44 if ( empty( $options['subscribe']['show_on_homepage'] ) && is_singular() ) { 44 $show_indiv = get_post_meta( $post->ID, 'fb_social_plugin_settings_box_subscribe', true ); 45 46 if ( is_home() && isset ( $options['subscribe']['show_on_homepage'] ) ) { 45 47 $content = $new_content; 46 48 } 47 elseif ( isset($options['subscribe']['show_on_homepage']) ) { 49 elseif ( ( 'default' == $show_indiv || empty( $show_indiv ) ) && isset ( $options['subscribe']['show_on'] ) ) { 50 if ( is_page() && ( $options['subscribe']['show_on'] == 'all pages' || $options['subscribe']['show_on'] == 'all posts and pages' ) ) 51 $content = $new_content; 52 elseif ( is_single() && ( $options['subscribe']['show_on'] == 'all posts' || $options['subscribe']['show_on'] == 'all posts and pages' ) ) 53 $content = $new_content; 54 } 55 elseif ( 'show' == $show_indiv ) { 48 56 $content = $new_content; 49 57 } 50 58 } 51 59 52 53 54 60 return $content; 55 61 } … … 188 194 'help_text' => __( 'Where the button will display on the page or post.', 'facebook' ), 189 195 ); 196 $array['children'][] = array('name' => 'show_on', 197 'type' => 'dropdown', 198 'default' => 'all posts and pages', 199 'options' => array('all posts' => 'all posts', 'all pages' => 'all pages', 'all posts and pages' => 'all posts and pages', 'individual posts and pages' => 'individual posts and pages' ), 200 'help_text' => __( 'Whether the plugin will appear on all posts or pages by default. If "individual posts and pages" is selected, you must explicitly set each post and page to display the plugin.', 'facebook' ), 201 ); 190 202 $array['children'][] = array('name' => 'show_on_homepage', 191 203 'type' => 'checkbox', … … 193 205 'help_text' => __( 'If the plugin should appear on the homepage as part of the Post previews. If unchecked, the plugin will only display on the Post itself.', 'facebook' ), 194 206 ); 207 195 208 } 196 209 -
facebook/trunk/style/style.css
r556868 r571850 12 12 margin-bottom: 2px; 13 13 } 14 15 @media only screen and (max-device-width: 480px) { 16 .fb-like { 17 float: left; 18 width: 100%; 19 } 20 21 div#page { 22 width: 480px; 23 } 24 25 div.fb-comments span{ 26 float:left; 27 width:100%; 28 } 29 } 30
Note: See TracChangeset
for help on using the changeset viewer.