author alexhermann

 Methods

Debug a var

Debug(\var $var, boolean $detail) 
echo string

Parameters

$var

\var

$detail

boolean

default = false

__autoload()

__autoload($class_name) 

Parameters

$class_name

plugin construct

__construct() : void

Activity contents

activity_content() : void

add_js_options()

add_js_options($manual) 

Parameters

$manual

Add meta boxes for admin

add_meta_boxes() : void

add support for ogimage opengraph

add_theme_support() : void

Checks if we should add links to the bar.

admin_bar_init() : void

Admin content

admin_content() : void

Admin css enqueue Stylesheet

admin_enqueue_css() : void

Admin js enqueue Javascript

admin_enqueue_js() : void

Admin initialisation

admin_initialisation() : void

Admin plugin init menu call form init.php

admin_menu() : void

Get a html field for media by ajax post

ajax_get_media_field() 
echo string $html

Admin form crete/copy/edit (by ajax post)

ajax_get_open_graph_object_form() 
echo form object's templte

Application infos content

app_infos_content() : void

authenticate()

authenticate($user, $username, $password) 

Parameters

$user

$username

$password

Getter the first image displayed in a post.

catch_that_image(string $post_content) : \the

Parameters

$post_content

string

Returns

\theimage found.

clear_facebook_user_data()

clear_facebook_user_data($user_id) 

Parameters

$user_id

create_OpenGraphProtocolAudio()

create_OpenGraphProtocolAudio($audio_url) 

Parameters

$audio_url

create_OpenGraphProtocolImage()

create_OpenGraphProtocolImage($image_url) 

Parameters

$image_url

create_OpenGraphProtocolVideo()

create_OpenGraphProtocolVideo($video_url) 

Parameters

$video_url

current_facebook_user_can()

current_facebook_user_can($perm) : true

Parameters

$perm

Returns

trueif the user has this perm.

Debug

debug_content() : void

Define the relating tags on the current page/post/.

define_ogp_objects() : string

..

Returns

string$html

This function delete an opengraph object template (ajax post)

delete_ogp_object() 
echo string (json array)

Display Error in admin Facebook AWD area

display_all_errors() : void

Display Message in admin Facebook AWD area

display_messages($message, $type, $echo) : void

Parameters

$message

$type

$echo

Helper to display html opengraph tags depending on the current WP_query.

display_ogp_objects() 

This function is called by hook wp_head.

echo string

Add avatar Facebook As Default

fb_addgravatar(array $avatar_defaults) : string

Parameters

$avatar_defaults

array

Returns

string

Get avatar from facebook Replace it where we need it.

fb_get_avatar(string $avatar, object $comments_objects, int $size, string $default, string $alt) : string

Parameters

$avatar

string

$comments_objects

object

$size

int

$default

string

$alt

string

Returns

string

fb_get_pages()

fb_get_pages() 

Admin fcbk info content

fcbk_content() : void

Flush rules WP

flush_rules() : void

Add JS to front

front_enqueue_js() : void

Admin Infos

general_content() : void

get_all_facebook_users()

get_all_facebook_users() 

Get App infos form api and store it in options

get_app_info() : string

Returns

string$errors

Get app infos content model

get_app_infos_content() : void

Get current URL

get_current_url() : string

Returns

stringcurrent url

Setter $this->current_user

get_current_user() : void

Get the WP_User ID from current Facebook User

get_existing_user_from_facebook() : int

Returns

int

get_facebook_page_url()

get_facebook_page_url() 

Get all facebook Data only when.

get_facebook_user_data() : string

Then store them.

Exceptions

\FacebookApiException

Returns

string

get_me()

get_me() 

Helper to get html opengraph tags by post id.

get_ogp_tags(integer $post_id) : string

Parameters

$post_id

integer

Returns

string$html

Admin form crete/copy/edit (ajax post)

get_open_graph_object_form($object_id, $copy) 
echo string $html

Parameters

$object_id

$copy

Admin return an item for object's template list in admin.

get_open_graph_object_list_item(array $object) : string

Parameters

$object

array

Returns

string

All pages the user authorize to publish on.

get_pages_to_publish() : array

Returns

arrayAll Facebook pages linked by user

get_permissions()

get_permissions() 

Get the plugin path required for Facebook AWD plugins

get_plugins_model_path() : string

Returns

string$path

Helper to get a descrtion from the post.

get_post_description(\WP_Post $post) : string

Parameters

$post

\WP_Post

Returns

string

Helper to get a post thumbnail

get_post_thumbnail(\WP_Post $post) : string

Parameters

$post

\WP_Post

Returns

string

get_the_activity_box()

get_the_activity_box(array $options) : \the: string

Parameters

$options

array

Returns

\theActivity Button
string

get_the_comments_box()

get_the_comments_box(\WP_Post $post, array $options) : \the: string

Parameters

$post

\WP_Post

object $post

$options

array

Returns

\thecomment box
string

Getter Help in the plugin tooltip

get_the_help(string $elem, string $class, string $image) : string

Parameters

$elem

string

$class

string

$image

string

Returns

stringa link to open lightbox with linked content

get_the_like_box()

get_the_like_box(array $options) : \the: string

Parameters

$options

array

Returns

\theLike Box
string

get_the_like_button()

get_the_like_button($post, $options) : \the: string

Parameters

$post

$options

Returns

\thelike button
string

get_the_shared_activity_box()

get_the_shared_activity_box(array $options) : \the: string

Parameters

$options

array

Returns

\theshared activity box
string

Getter WP User infos form FB uid

get_user_from_fbuid(int $fb_uid) : array | boolean

Parameters

$fb_uid

int

Returns

arrayboolean

get_user_from_provider()

get_user_from_provider() 

Getter Version

get_version(array $plugin_folder_var) : array

Parameters

$plugin_folder_var

array

Returns

array

Event Called when the options are updated in plugins.

hook_post_from_plugin_options() : void

Set all facebook Data

init_facebook_user_data($user_id) : void

Parameters

$user_id

plugin init

initial() : void

Isert query vars

insert_query_vars($vars) : \$vars

Parameters

$vars

Returns

\$vars

insert rules WP

insert_rewrite_rules($rules) : void

Parameters

$rules

Know if a user is logged in facebook.

is_user_logged_in_facebook() : boolean

Returns

boolean

Test if url return 200

is_valid_url(string $url) : boolean

Parameters

$url

string

Returns

boolean

Add Js init fcbk to footer ADMIN AND FRONT Print debug if active here

js_sdk_init() : void

logout()

logout($redirect_url) 

Parameters

$redirect_url

Change logout url for users connected with Facebook

logout_url(string $url) : string

Parameters

$url

string

Returns

string

missing config notices

missing_config() : void

ogp_language_attributes()

ogp_language_attributes($language_attributes) 

Parameters

$language_attributes

Admin page for opengraph settings

open_graph_content() 
echo string $html

This function transform an array into an OpenGraphProtocol object

opengraph_array_to_object(array $object) : \OpenGraphProtocol

Parameters

$object

array

Returns

\OpenGraphProtocol$ogp

parse_request()

parse_request() 

INIT PHP SDK 3.1.1 version Modified to Change TimeOut Connect the user here

php_sdk_init() : void

plugin Options

plugins_content() : void

Add manager to post editor

post_manager_content(\WP_Post $post) : void

Parameters

$post

\WP_Post

object $post

process_opengraph_pattern()

process_opengraph_pattern($array_replace, $object_template) 

Parameters

$array_replace

$object_template

Publish the WP_Post to facebook

publish_post_to_facebook(string $message, string $read_more_text, array $to_pages, int $post_id) : string

Parameters

$message

string

$read_more_text

string

$to_pages

array

$post_id

int

Returns

stringThe result of the query

Like box register widgets

register_AWD_facebook_widgets() : void

register_user()

register_user() 

Render opengraph tags, replace pattern by value depending on linked_object

render_ogp_tags($object_template, $from_post) : string

Parameters

$object_template

$from_post

Returns

string$html

save_facebook_user_data()

save_facebook_user_data($user_id) 

Parameters

$user_id

Admin save/update object template

save_ogp_object() : \json

Returns

\jsonarray

Save customs fields during post edition

save_options_post_editor(int $post_id) : void

Parameters

$post_id

int

Set Admin Roles Add FB capabalities to default WP roles

set_admin_roles() : void

Settings Options

settings_content() : void

shortcode_activity_box()

shortcode_activity_box(array $atts) : \the: string

Parameters

$atts

array

Returns

\theActivity Box shortcode
string

shortcode_comments_box()

shortcode_comments_box(array $atts) : \the: string

Parameters

$atts

array

Returns

\thecomment box shortcode
string

shortcode_like_box()

shortcode_like_box(array $atts) : \the: string

Parameters

$atts

array

Returns

\thelike box shortcode
string

shortcode_like_button()

shortcode_like_button($atts) : \the: \html

Parameters

$atts

Returns

\thelike button shortcode
\htmlcode

shortcode_shared_activity_box()

shortcode_shared_activity_box(array $atts) : \the: string

Parameters

$atts

array

Returns

\thelike button shortcode
string

Filter the comment form to add fbcomments

the_comments_form() : void

The Filter on the content to add like button

the_content(string $content) : string

Parameters

$content

string

Returns

string$content

Update options when settings are updated.

update_options_from_post() : boolean

Returns

boolean

hook action added to init

wp_init() : void

 Properties

   

$_logout_url : string
 

$_unsync_url : string
 

$blog_admin_hook_position 
 

$blog_admin_page_hook 
 

$current_user 
 

$errors 
 

$fcbk 
 

$file_name 
 

$me 
 

$messages 
 

$options 
 

$plugin_name : \unknown_type
 

$plugin_option_pref 
 

$plugin_page_admin_name 
 

$plugin_slug 
 

$plugins : array
 

$ptd 
 

$uid 
 

$warnings