Version Description
- Fixed css on footer when using different themes
- Updated all.js to sdk.js (bryant1410)
- Optimization for sites with no Facebook App
- Added error messages for special cases
- Added advanced option for selecting Facebook SDK version
- Fixed locale error inside editor
- Fixed link underline in some themes
- Fixed several css and html structure nothing critical
Download this release
Release Info
Developer | poxtron |
Plugin | WP Embed Facebook |
Version | 2.0.9 |
Comparing to | |
See all releases |
Code changes from version 2.0.8 to 2.0.9
- lib/admin/admin.css +8 -8
- lib/base_facebook.php +11 -3
- lib/class-sigami-facebook.php +3 -0
- lib/class-wp-embed-fb-admin.php +63 -41
- lib/class-wp-embed-fb-plugin.php +43 -36
- lib/class-wp-embed-fb.php +113 -93
- lib/js/fb.js +4 -5
- lib/lightbox2/css/lightbox.css +0 -210
- lib/lightbox2/css/lightbox.min.css +1 -0
- lib/lightbox2/{img → images}/close.png +0 -0
- lib/lightbox2/{img → images}/loading.gif +0 -0
- lib/lightbox2/{img → images}/next.png +0 -0
- lib/lightbox2/{img → images}/prev.png +0 -0
- lib/lightbox2/js/lightbox.min.js +120 -1
- readme.txt +18 -6
- templates/classic/album.php +2 -1
- templates/classic/classic.css +1 -188
- templates/classic/classic.sass +1 -0
- templates/classic/com-page.php +2 -1
- templates/classic/event.php +3 -1
- templates/classic/page.php +4 -2
- templates/classic/photo.php +2 -1
- templates/classic/post.php +2 -1
- templates/classic/profile.php +2 -1
- templates/classic/social-plugin.php +4 -0
- templates/classic/video.php +1 -0
- templates/default/album.php +3 -2
- templates/default/com-page.php +2 -1
- templates/default/default.css +1 -191
- templates/default/default.sass +1 -0
- templates/default/event.php +3 -1
- templates/default/page.php +3 -2
- templates/default/photo.php +2 -1
- templates/default/post.php +2 -1
- templates/default/profile.php +2 -1
- templates/default/social-plugin.php +5 -1
- templates/default/video.php +1 -0
- wp-embed-facebook.php +7 -4
lib/admin/admin.css
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
padding:1px 22px 22px 22px;
|
3 |
background: #fff;
|
4 |
border:1px solid #ccc;
|
5 |
-
border-top:
|
6 |
margin-bottom: 20px;
|
7 |
}
|
8 |
section {
|
@@ -30,9 +30,9 @@ section:first-child {
|
|
30 |
}
|
31 |
|
32 |
.no-js section:first-child {
|
33 |
-
margin:
|
34 |
-
padding:
|
35 |
-
border:
|
36 |
}
|
37 |
.nav-tab-active {
|
38 |
background-color: #ffffff;
|
@@ -64,16 +64,16 @@ section:first-child {
|
|
64 |
}
|
65 |
}
|
66 |
.welcome-panel-last .button-red {
|
67 |
-
background: #D2002C none repeat scroll 0
|
68 |
border-color: #AA0012;
|
69 |
-
box-shadow:
|
70 |
color: #FFF;
|
71 |
text-decoration: none;
|
72 |
}
|
73 |
.welcome-panel-last .button-red:focus, .welcome-panel-last .button-red:hover {
|
74 |
-
background: #AB1F42 none repeat scroll 0
|
75 |
border-color: #AA0012;
|
76 |
-
box-shadow:
|
77 |
color: #FFF;
|
78 |
}
|
79 |
.welcome-panel-last p {
|
2 |
padding:1px 22px 22px 22px;
|
3 |
background: #fff;
|
4 |
border:1px solid #ccc;
|
5 |
+
border-top:0;
|
6 |
margin-bottom: 20px;
|
7 |
}
|
8 |
section {
|
30 |
}
|
31 |
|
32 |
.no-js section:first-child {
|
33 |
+
margin:0;
|
34 |
+
padding:0;
|
35 |
+
border:0;
|
36 |
}
|
37 |
.nav-tab-active {
|
38 |
background-color: #ffffff;
|
64 |
}
|
65 |
}
|
66 |
.welcome-panel-last .button-red {
|
67 |
+
background: #D2002C none repeat scroll 0 0;
|
68 |
border-color: #AA0012;
|
69 |
+
box-shadow: 0 1px 0 rgba(230, 14, 23, 0.5) inset, 0 1px 0 rgba(173, 173, 173, 0.15);
|
70 |
color: #FFF;
|
71 |
text-decoration: none;
|
72 |
}
|
73 |
.welcome-panel-last .button-red:focus, .welcome-panel-last .button-red:hover {
|
74 |
+
background: #AB1F42 none repeat scroll 0 0;
|
75 |
border-color: #AA0012;
|
76 |
+
box-shadow: 0 1px 0 rgba(230, 14, 23, 0.5) inset;
|
77 |
color: #FFF;
|
78 |
}
|
79 |
.welcome-panel-last p {
|
lib/base_facebook.php
CHANGED
@@ -400,6 +400,8 @@ abstract class BaseFacebook
|
|
400 |
$this->setPersistentData(
|
401 |
'access_token', $response_params['access_token']
|
402 |
);
|
|
|
|
|
403 |
}
|
404 |
|
405 |
/**
|
@@ -567,6 +569,7 @@ abstract class BaseFacebook
|
|
567 |
) {
|
568 |
$user = $this->getUserFromAccessToken();
|
569 |
if ($user) {
|
|
|
570 |
$this->setPersistentData('user_id', $user);
|
571 |
} else {
|
572 |
$this->clearAllPersistentData();
|
@@ -780,6 +783,7 @@ abstract class BaseFacebook
|
|
780 |
* either logged in to Facebook or has granted an offline access permission.
|
781 |
*
|
782 |
* @param string $code An authorization code.
|
|
|
783 |
* @return mixed An access token exchanged for the authorization code, or
|
784 |
* false if an access token could not be generated.
|
785 |
*/
|
@@ -936,7 +940,7 @@ abstract class BaseFacebook
|
|
936 |
}
|
937 |
|
938 |
return $this->makeRequest($url, $params);
|
939 |
-
}
|
940 |
|
941 |
/**
|
942 |
* Makes an HTTP request. This method can be overridden by subclasses if
|
@@ -948,6 +952,7 @@ abstract class BaseFacebook
|
|
948 |
* @param CurlHandler $ch Initialized curl handle
|
949 |
*
|
950 |
* @return string The response text
|
|
|
951 |
*/
|
952 |
protected function makeRequest($url, $params, $ch = null)
|
953 |
{
|
@@ -1054,7 +1059,7 @@ abstract class BaseFacebook
|
|
1054 |
/**
|
1055 |
* Makes a signed_request blob using the given data.
|
1056 |
*
|
1057 |
-
* @param array The data array.
|
1058 |
* @return string The signed request.
|
1059 |
*/
|
1060 |
protected function makeSignedRequest($data)
|
@@ -1207,6 +1212,7 @@ abstract class BaseFacebook
|
|
1207 |
// The base domain is stored in the metadata cookie if not we fallback
|
1208 |
// to the current hostname
|
1209 |
$metadata = $this->getMetadataCookie();
|
|
|
1210 |
if (array_key_exists('base_domain', $metadata) &&
|
1211 |
!empty($metadata['base_domain'])
|
1212 |
) {
|
@@ -1286,6 +1292,8 @@ abstract class BaseFacebook
|
|
1286 |
*
|
1287 |
* @param $result array A record storing the error message returned
|
1288 |
* by a failed API call.
|
|
|
|
|
1289 |
*/
|
1290 |
protected function throwAPIException($result)
|
1291 |
{
|
@@ -1392,7 +1400,7 @@ abstract class BaseFacebook
|
|
1392 |
/**
|
1393 |
* Parses the metadata cookie that our Javascript API set
|
1394 |
*
|
1395 |
-
* @return
|
1396 |
*/
|
1397 |
protected function getMetadataCookie()
|
1398 |
{
|
400 |
$this->setPersistentData(
|
401 |
'access_token', $response_params['access_token']
|
402 |
);
|
403 |
+
|
404 |
+
return $response_params['access_token'];
|
405 |
}
|
406 |
|
407 |
/**
|
569 |
) {
|
570 |
$user = $this->getUserFromAccessToken();
|
571 |
if ($user) {
|
572 |
+
/** @noinspection PhpParamsInspection */
|
573 |
$this->setPersistentData('user_id', $user);
|
574 |
} else {
|
575 |
$this->clearAllPersistentData();
|
783 |
* either logged in to Facebook or has granted an offline access permission.
|
784 |
*
|
785 |
* @param string $code An authorization code.
|
786 |
+
* @param string $redirect_uri A redirect url.
|
787 |
* @return mixed An access token exchanged for the authorization code, or
|
788 |
* false if an access token could not be generated.
|
789 |
*/
|
940 |
}
|
941 |
|
942 |
return $this->makeRequest($url, $params);
|
943 |
+
}/** @noinspection PhpUndefinedClassInspection */
|
944 |
|
945 |
/**
|
946 |
* Makes an HTTP request. This method can be overridden by subclasses if
|
952 |
* @param CurlHandler $ch Initialized curl handle
|
953 |
*
|
954 |
* @return string The response text
|
955 |
+
* @throws FacebookApiException
|
956 |
*/
|
957 |
protected function makeRequest($url, $params, $ch = null)
|
958 |
{
|
1059 |
/**
|
1060 |
* Makes a signed_request blob using the given data.
|
1061 |
*
|
1062 |
+
* @param array $data The data array.
|
1063 |
* @return string The signed request.
|
1064 |
*/
|
1065 |
protected function makeSignedRequest($data)
|
1212 |
// The base domain is stored in the metadata cookie if not we fallback
|
1213 |
// to the current hostname
|
1214 |
$metadata = $this->getMetadataCookie();
|
1215 |
+
/** @noinspection PhpParamsInspection */
|
1216 |
if (array_key_exists('base_domain', $metadata) &&
|
1217 |
!empty($metadata['base_domain'])
|
1218 |
) {
|
1292 |
*
|
1293 |
* @param $result array A record storing the error message returned
|
1294 |
* by a failed API call.
|
1295 |
+
*
|
1296 |
+
* @throws FacebookApiException
|
1297 |
*/
|
1298 |
protected function throwAPIException($result)
|
1299 |
{
|
1400 |
/**
|
1401 |
* Parses the metadata cookie that our Javascript API set
|
1402 |
*
|
1403 |
+
* @return array mapping key to value
|
1404 |
*/
|
1405 |
protected function getMetadataCookie()
|
1406 |
{
|
lib/class-sigami-facebook.php
CHANGED
@@ -77,6 +77,9 @@ class Sigami_Facebook extends BaseFacebook
|
|
77 |
* methods. The implementation uses PHP sessions to maintain
|
78 |
* a store for authorization codes, user ids, CSRF states, and
|
79 |
* access tokens.
|
|
|
|
|
|
|
80 |
*/
|
81 |
protected function setPersistentData($key, $value) {
|
82 |
if (!in_array($key, self::$kSupportedKeys)) {
|
77 |
* methods. The implementation uses PHP sessions to maintain
|
78 |
* a store for authorization codes, user ids, CSRF states, and
|
79 |
* access tokens.
|
80 |
+
*
|
81 |
+
* @param string $key
|
82 |
+
* @param array $value
|
83 |
*/
|
84 |
protected function setPersistentData($key, $value) {
|
85 |
if (!in_array($key, self::$kSupportedKeys)) {
|
lib/class-wp-embed-fb-admin.php
CHANGED
@@ -45,7 +45,7 @@ class WP_Embed_FB_Admin {
|
|
45 |
</script>
|
46 |
<?php
|
47 |
endif;
|
48 |
-
if(get_option('
|
49 |
?>
|
50 |
<script type="text/javascript">
|
51 |
jQuery(document).on( 'click', '.wpemfb_warning .notice-dismiss', function() {
|
@@ -114,6 +114,7 @@ class WP_Embed_FB_Admin {
|
|
114 |
<tr valign="middle">
|
115 |
<th><?php echo $label ?></th>
|
116 |
<td>
|
|
|
117 |
<input type="checkbox" id="<?php echo $name ?>"
|
118 |
name="<?php echo $name ?>" <?php echo $checked ?> />
|
119 |
</td>
|
@@ -122,12 +123,16 @@ class WP_Embed_FB_Admin {
|
|
122 |
ob_end_flush();
|
123 |
break;
|
124 |
case 'select' :
|
|
|
125 |
$option = get_option( $name );
|
|
|
|
|
126 |
ob_start();
|
127 |
?>
|
128 |
<tr valign="middle">
|
129 |
<th><?php echo $label ?></th>
|
130 |
<td>
|
|
|
131 |
<select name="<?php echo $name ?>">
|
132 |
<?php foreach ( $args as $value => $name ) : ?>
|
133 |
<option
|
@@ -157,6 +162,7 @@ class WP_Embed_FB_Admin {
|
|
157 |
<tr valign="middle">
|
158 |
<th><?php echo $label ?></th>
|
159 |
<td>
|
|
|
160 |
<input id="<?php echo $name ?>"
|
161 |
type="<?php echo $type ?>"
|
162 |
name="<?php echo $name ?>" <?php echo isset( $args['required'] ) ? 'required' : '' ?>
|
@@ -206,7 +212,6 @@ class WP_Embed_FB_Admin {
|
|
206 |
}
|
207 |
if ( isset( $_POST['wpemfb_max_width'] ) && is_int( $_POST['wpemfb_max_width'] ) ) {
|
208 |
$prop = get_option( 'wpemfb_proportions' ) * $_POST['wpemfb_max_width'];
|
209 |
-
update_option( 'wpemfb_height', $prop );//TODO height is deprecated
|
210 |
}
|
211 |
}
|
212 |
/**
|
@@ -282,7 +287,7 @@ class WP_Embed_FB_Admin {
|
|
282 |
endif;
|
283 |
?>
|
284 |
<p><a href="https://developers.facebook.com/apps"
|
285 |
-
target="_blank"><?php _e( 'Create or view Facebook Apps', 'wp-embed-facebook' ) ?></a>
|
286 |
</p>
|
287 |
<?php
|
288 |
self::section( __( 'Facebook credentials', 'wp-embed-facebook' ) );
|
@@ -294,42 +299,45 @@ class WP_Embed_FB_Admin {
|
|
294 |
</section>
|
295 |
<section class="sections">
|
296 |
<?php
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
|
|
|
|
|
|
333 |
?>
|
334 |
|
335 |
</section>
|
@@ -343,6 +351,16 @@ class WP_Embed_FB_Admin {
|
|
343 |
self::field( 'checkbox', 'wpemfb_enq_wpemfb', __( 'Enqueue WPEmbedFB script', 'wp-embed-facebook' ) );
|
344 |
self::field( 'checkbox', 'wpemfb_enq_fbjs', __( 'Enqueue Facebook SDK', 'wp-embed-facebook' ) );
|
345 |
self::field( 'checkbox', 'wpemfb_force_app_token', __( 'Force app token', 'wp-embed-facebook' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
self::section();
|
347 |
?>
|
348 |
</section>
|
@@ -381,8 +399,12 @@ class WP_Embed_FB_Admin {
|
|
381 |
<hr>
|
382 |
<h4><?php _e( "Keep this plugin's core free and accessible to all.", 'wp-embed-facebook' ) ?></h4>
|
383 |
|
384 |
-
<p
|
385 |
-
|
|
|
|
|
|
|
|
|
386 |
</p>
|
387 |
|
388 |
<p><strong><a
|
45 |
</script>
|
46 |
<?php
|
47 |
endif;
|
48 |
+
if(get_option('wpemfb_close_warning2','false') == 'false') :
|
49 |
?>
|
50 |
<script type="text/javascript">
|
51 |
jQuery(document).on( 'click', '.wpemfb_warning .notice-dismiss', function() {
|
114 |
<tr valign="middle">
|
115 |
<th><?php echo $label ?></th>
|
116 |
<td>
|
117 |
+
<!--suppress HtmlFormInputWithoutLabel -->
|
118 |
<input type="checkbox" id="<?php echo $name ?>"
|
119 |
name="<?php echo $name ?>" <?php echo $checked ?> />
|
120 |
</td>
|
123 |
ob_end_flush();
|
124 |
break;
|
125 |
case 'select' :
|
126 |
+
|
127 |
$option = get_option( $name );
|
128 |
+
if( empty($option) && $name == 'wpemfb_sdk_version' )
|
129 |
+
$option = 'v2.6';
|
130 |
ob_start();
|
131 |
?>
|
132 |
<tr valign="middle">
|
133 |
<th><?php echo $label ?></th>
|
134 |
<td>
|
135 |
+
<!--suppress HtmlFormInputWithoutLabel -->
|
136 |
<select name="<?php echo $name ?>">
|
137 |
<?php foreach ( $args as $value => $name ) : ?>
|
138 |
<option
|
162 |
<tr valign="middle">
|
163 |
<th><?php echo $label ?></th>
|
164 |
<td>
|
165 |
+
<!--suppress HtmlFormInputWithoutLabel -->
|
166 |
<input id="<?php echo $name ?>"
|
167 |
type="<?php echo $type ?>"
|
168 |
name="<?php echo $name ?>" <?php echo isset( $args['required'] ) ? 'required' : '' ?>
|
212 |
}
|
213 |
if ( isset( $_POST['wpemfb_max_width'] ) && is_int( $_POST['wpemfb_max_width'] ) ) {
|
214 |
$prop = get_option( 'wpemfb_proportions' ) * $_POST['wpemfb_max_width'];
|
|
|
215 |
}
|
216 |
}
|
217 |
/**
|
287 |
endif;
|
288 |
?>
|
289 |
<p><a href="https://developers.facebook.com/apps"
|
290 |
+
target="_blank"><?php _e( 'Create or view your Facebook Apps', 'wp-embed-facebook' ) ?></a>
|
291 |
</p>
|
292 |
<?php
|
293 |
self::section( __( 'Facebook credentials', 'wp-embed-facebook' ) );
|
299 |
</section>
|
300 |
<section class="sections">
|
301 |
<?php
|
302 |
+
if(WP_Embed_FB_Plugin::has_fb_app()){
|
303 |
+
self::section( __( "General", 'wp-embed-facebook' ) );
|
304 |
+
/**
|
305 |
+
* Filter available templates
|
306 |
+
* @since 2.0.2
|
307 |
+
*/
|
308 |
+
$templates = apply_filters( 'wpemfb_admin_theme', array(
|
309 |
+
'default' => 'Default',
|
310 |
+
'classic' => 'Classic'
|
311 |
+
) );
|
312 |
+
self::field( 'select', 'wpemfb_theme', 'Template to use', $templates );
|
313 |
+
self::section();
|
314 |
+
self::section( __( "Albums", 'wp-embed-facebook' ) );
|
315 |
+
self::field( 'number', 'wpemfb_max_photos', __( 'Number of Photos', 'wp-embed-facebook' ) );
|
316 |
+
self::section();
|
317 |
+
self::section( __( "Events", 'wp-embed-facebook' ) );
|
318 |
+
self::field( 'checkbox', 'wpemfb_ev_local_tz', __( 'Use WordPress timezone string to calculate the date', 'wp-embed-facebook' ) );
|
319 |
+
self::section();
|
320 |
+
self::section( __( "Pages", 'wp-embed-facebook' ) );
|
321 |
+
self::field( 'checkbox', 'wpemfb_raw_page', __( 'Use custom embed by default', 'wp-embed-facebook' ) );
|
322 |
+
self::field( 'checkbox', 'wpemfb_show_like', __( 'Show like button', 'wp-embed-facebook' ) );
|
323 |
+
self::field( 'number', 'wpemfb_max_posts', __( 'Number of posts', 'wp-embed-facebook' ) );
|
324 |
+
self::section();
|
325 |
+
self::section( __( "Photo", 'wp-embed-facebook' ) );
|
326 |
+
self::field( 'checkbox', 'wpemfb_raw_photo', __( 'Use custom embed by default', 'wp-embed-facebook' ) );
|
327 |
+
self::section();
|
328 |
+
self::section( __( "Posts", 'wp-embed-facebook' ) );
|
329 |
+
self::field( 'checkbox', 'wpemfb_raw_post', __( 'Use custom embed by default', 'wp-embed-facebook' ) );
|
330 |
+
self::section();
|
331 |
+
self::section( __( "Videos", 'wp-embed-facebook' ) );
|
332 |
+
self::field( 'checkbox', 'wpemfb_raw_video', __( 'Use custom embed by default', 'wp-embed-facebook' ) );
|
333 |
+
self::field( 'checkbox', 'wpemfb_video_ratio', __( 'Force 16:9 ratio', 'wp-embed-facebook' ) );
|
334 |
+
self::section();
|
335 |
+
self::section( __( "Profiles", 'wp-embed-facebook' ) );
|
336 |
+
self::field( 'checkbox', 'wpemfb_show_follow', __( 'Show follow button', 'wp-embed-facebook' ) );
|
337 |
+
self::section();
|
338 |
+
} else {
|
339 |
+
echo "<br><p>You need a facebook app to use custom embeds</p>";
|
340 |
+
}
|
341 |
?>
|
342 |
|
343 |
</section>
|
351 |
self::field( 'checkbox', 'wpemfb_enq_wpemfb', __( 'Enqueue WPEmbedFB script', 'wp-embed-facebook' ) );
|
352 |
self::field( 'checkbox', 'wpemfb_enq_fbjs', __( 'Enqueue Facebook SDK', 'wp-embed-facebook' ) );
|
353 |
self::field( 'checkbox', 'wpemfb_force_app_token', __( 'Force app token', 'wp-embed-facebook' ) );
|
354 |
+
$versions = array(
|
355 |
+
'v2.0' => '2.0',
|
356 |
+
'v2.1' => '2.1',
|
357 |
+
'v2.2' => '2.2',
|
358 |
+
'v2.3' => '2.3',
|
359 |
+
'v2.4' => '2.4',
|
360 |
+
'v2.5' => '2.5',
|
361 |
+
'v2.6' => '2.6',
|
362 |
+
);
|
363 |
+
self::field( 'select', 'wpemfb_sdk_version', 'SDK Version', $versions );
|
364 |
self::section();
|
365 |
?>
|
366 |
</section>
|
399 |
<hr>
|
400 |
<h4><?php _e( "Keep this plugin's core free and accessible to all.", 'wp-embed-facebook' ) ?></h4>
|
401 |
|
402 |
+
<p>
|
403 |
+
<strong>
|
404 |
+
<a href="http://wordpress.org/plugins/wp-embed-facebook">Rate it<br>
|
405 |
+
<span style="color: gold;"> ★★★★★ </span>
|
406 |
+
</a>
|
407 |
+
</strong>
|
408 |
</p>
|
409 |
|
410 |
<p><strong><a
|
lib/class-wp-embed-fb-plugin.php
CHANGED
@@ -17,13 +17,16 @@ class WP_Embed_FB_Plugin {
|
|
17 |
if(!isset($type))
|
18 |
$type = $opt==false?"activated":"reactivated";
|
19 |
}
|
|
|
|
|
|
|
20 |
return self::whois($type);
|
21 |
}
|
22 |
/**
|
23 |
* Delete all plugin options on uninstall
|
24 |
*/
|
25 |
static function uninstall(){
|
26 |
-
$deprecated = array('wpemfb_show_posts'=>'','wpemfb_close_warning'=>'');
|
27 |
$defaults = self::getdefaults() + $deprecated;
|
28 |
if ( is_multisite() ) {
|
29 |
$sites = wp_get_sites();
|
@@ -50,7 +53,7 @@ class WP_Embed_FB_Plugin {
|
|
50 |
static function getdefaults(){
|
51 |
$locale = get_locale();
|
52 |
if(strpos($locale,'es_') !== false)
|
53 |
-
$locale = 'es_LA'
|
54 |
return array(
|
55 |
'wpemfb_max_width' => '450',
|
56 |
'wpemfb_max_photos' => '24',
|
@@ -58,7 +61,6 @@ class WP_Embed_FB_Plugin {
|
|
58 |
'wpemfb_app_id' => '',
|
59 |
'wpemfb_app_secret' => '',
|
60 |
'wpemfb_proportions' => 0.36867,
|
61 |
-
'wpemfb_height' => '221.202',
|
62 |
'wpemfb_show_like' => 'true',
|
63 |
'wpemfb_fb_root' => 'true',
|
64 |
'wpemfb_theme' => 'default',
|
@@ -80,9 +82,10 @@ class WP_Embed_FB_Plugin {
|
|
80 |
'wpemfb_page_hide_cover' => 'false',
|
81 |
'wpemfb_page_show_posts' => 'false',
|
82 |
'wpemfb_sdk_lang' => array_key_exists( $locale, self::get_fb_locales()) ? $locale : 'en_US',
|
83 |
-
'
|
84 |
'wpemfb_force_app_token' => 'true',
|
85 |
'wpemfb_video_download' => 'false',
|
|
|
86 |
);
|
87 |
}
|
88 |
//("uninstalled","deactivated","activated","reactivated")
|
@@ -96,11 +99,13 @@ class WP_Embed_FB_Plugin {
|
|
96 |
* session start if necessary
|
97 |
*/
|
98 |
static function init(){
|
99 |
-
if(
|
100 |
-
if(
|
|
|
|
|
|
|
101 |
session_start();
|
102 |
-
|
103 |
-
session_start();
|
104 |
}
|
105 |
}
|
106 |
/**
|
@@ -114,9 +119,12 @@ class WP_Embed_FB_Plugin {
|
|
114 |
*/
|
115 |
static function wp_enqueue_scripts(){
|
116 |
if(get_option('wpemfb_enqueue_style') == 'true'){
|
|
|
|
|
|
|
117 |
$theme = get_option('wpemfb_theme');
|
118 |
-
wp_enqueue_style('wpemfb-'.$theme
|
119 |
-
wp_enqueue_style('wpemfb-lightbox', self::get_url().'lib/lightbox2/css/lightbox.css',array(),false);
|
120 |
}
|
121 |
if(get_option('wpemfb_enq_lightbox') == 'true'){
|
122 |
wp_enqueue_script(
|
@@ -138,7 +146,10 @@ class WP_Embed_FB_Plugin {
|
|
138 |
self::get_url().'lib/js/fb.js',
|
139 |
array( 'jquery' )
|
140 |
);
|
141 |
-
$translation_array = array(
|
|
|
|
|
|
|
142 |
wp_localize_script( 'wpemfb-fbjs', 'WEF', $translation_array );
|
143 |
}
|
144 |
}
|
@@ -158,40 +169,36 @@ class WP_Embed_FB_Plugin {
|
|
158 |
return self::$url;
|
159 |
}
|
160 |
}
|
161 |
-
static function fb_root($content){
|
162 |
-
return '<div id="fb-root"></div>'.PHP_EOL.$content;
|
163 |
-
}
|
164 |
static function admin_notices(){
|
165 |
-
if(
|
166 |
-
|
167 |
-
|
168 |
-
<
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
</
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
|
|
|
|
179 |
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
} else {
|
184 |
-
//TODO rate and buy notice.
|
185 |
-
}
|
186 |
}
|
187 |
static function wpemfb_close_warning(){
|
188 |
if(current_user_can('manage_options'))
|
189 |
-
update_option('
|
190 |
die;
|
191 |
}
|
192 |
static function wpemfb_video_down(){
|
193 |
if(current_user_can('manage_options')){
|
194 |
-
update_option('
|
195 |
update_option('wpemfb_video_download','true');
|
196 |
}
|
197 |
die;
|
17 |
if(!isset($type))
|
18 |
$type = $opt==false?"activated":"reactivated";
|
19 |
}
|
20 |
+
|
21 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
22 |
+
|
23 |
return self::whois($type);
|
24 |
}
|
25 |
/**
|
26 |
* Delete all plugin options on uninstall
|
27 |
*/
|
28 |
static function uninstall(){
|
29 |
+
$deprecated = array('wpemfb_show_posts'=>'','wpemfb_close_warning'=>'','wpemfb_height'=>'','wpemfb_close_warning1'=>'');
|
30 |
$defaults = self::getdefaults() + $deprecated;
|
31 |
if ( is_multisite() ) {
|
32 |
$sites = wp_get_sites();
|
53 |
static function getdefaults(){
|
54 |
$locale = get_locale();
|
55 |
if(strpos($locale,'es_') !== false)
|
56 |
+
$locale = 'es_LA';
|
57 |
return array(
|
58 |
'wpemfb_max_width' => '450',
|
59 |
'wpemfb_max_photos' => '24',
|
61 |
'wpemfb_app_id' => '',
|
62 |
'wpemfb_app_secret' => '',
|
63 |
'wpemfb_proportions' => 0.36867,
|
|
|
64 |
'wpemfb_show_like' => 'true',
|
65 |
'wpemfb_fb_root' => 'true',
|
66 |
'wpemfb_theme' => 'default',
|
82 |
'wpemfb_page_hide_cover' => 'false',
|
83 |
'wpemfb_page_show_posts' => 'false',
|
84 |
'wpemfb_sdk_lang' => array_key_exists( $locale, self::get_fb_locales()) ? $locale : 'en_US',
|
85 |
+
'wpemfb_close_warning2' => 'false',
|
86 |
'wpemfb_force_app_token' => 'true',
|
87 |
'wpemfb_video_download' => 'false',
|
88 |
+
'wpemfb_sdk_version' => 'v2.6',
|
89 |
);
|
90 |
}
|
91 |
//("uninstalled","deactivated","activated","reactivated")
|
99 |
* session start if necessary
|
100 |
*/
|
101 |
static function init(){
|
102 |
+
if( self::has_fb_app() ){
|
103 |
+
if(version_compare(phpversion(), '5.4.0', '<')) {
|
104 |
+
if(session_id() == '')
|
105 |
+
session_start();
|
106 |
+
} elseif(session_status() == PHP_SESSION_NONE) {
|
107 |
session_start();
|
108 |
+
}
|
|
|
109 |
}
|
110 |
}
|
111 |
/**
|
119 |
*/
|
120 |
static function wp_enqueue_scripts(){
|
121 |
if(get_option('wpemfb_enqueue_style') == 'true'){
|
122 |
+
wp_register_style('wpemfb-default',self::get_url().'templates/default/default.css',array(),false);
|
123 |
+
wp_register_style('wpemfb-classic',self::get_url().'templates/classic/classic.css',array(),false);
|
124 |
+
// do_action('wpemfb_register_style');
|
125 |
$theme = get_option('wpemfb_theme');
|
126 |
+
wp_enqueue_style('wpemfb-'.$theme);
|
127 |
+
wp_enqueue_style('wpemfb-lightbox', self::get_url().'lib/lightbox2/css/lightbox.min.css',array(),false);
|
128 |
}
|
129 |
if(get_option('wpemfb_enq_lightbox') == 'true'){
|
130 |
wp_enqueue_script(
|
146 |
self::get_url().'lib/js/fb.js',
|
147 |
array( 'jquery' )
|
148 |
);
|
149 |
+
$translation_array = array(
|
150 |
+
'local' => get_option('wpemfb_sdk_lang','en_US'),
|
151 |
+
'version' => get_option('wpemfb_sdk_version','v2.6'),
|
152 |
+
'fb_id'=>get_option('wpemfb_app_id') == '0' ? '' : get_option('wpemfb_app_id'));
|
153 |
wp_localize_script( 'wpemfb-fbjs', 'WEF', $translation_array );
|
154 |
}
|
155 |
}
|
169 |
return self::$url;
|
170 |
}
|
171 |
}
|
|
|
|
|
|
|
172 |
static function admin_notices(){
|
173 |
+
if( (get_option('wpemfb_close_warning2','false') == 'false')) :
|
174 |
+
?>
|
175 |
+
<div class="notice wpemfb_warning is-dismissible">
|
176 |
+
<h2>WP Embed Facebook</h2>
|
177 |
+
<p>Hey! The last step.</p>
|
178 |
+
<p><img style="position:relative; top: 5px;" height="20px" width="auto" src="<?php echo WP_Embed_FB_Plugin::get_url().'lib/admin/ic_setting.png' ?>"> Turn on <a id="wef-video-down" href="<?php echo admin_url("options-general.php?page=embedfacebook") ?>">Video Download Option</a> in settings.</p>
|
179 |
+
<small>
|
180 |
+
<?php
|
181 |
+
printf(__('To embed albums, events, profiles and video as HTML5 you will need a <a target="_blank" href="%s">Facebook App</a>',''), 'https://developers.facebook.com/apps')
|
182 |
+
?>
|
183 |
+
</small>
|
184 |
+
<p>
|
185 |
+
<?php
|
186 |
+
printf(__('This free plugin has taken <strong>thousands of hours</strong> to develop and maintain consider making a <a target="_blank" href="%s">donation</a> or leaving a <a target="_blank" href="%s">review</a> <strong>do not let us loose faith</strong> in humanity.','wp-embed-facebook'), 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R8Q85GT3Q8Q26','https://wordpress.org/support/view/plugin-reviews/wp-embed-facebook')
|
187 |
+
?>
|
188 |
+
</p>
|
189 |
|
190 |
+
</div>
|
191 |
+
<?php
|
192 |
+
endif;
|
|
|
|
|
|
|
193 |
}
|
194 |
static function wpemfb_close_warning(){
|
195 |
if(current_user_can('manage_options'))
|
196 |
+
update_option('wpemfb_close_warning2','true');
|
197 |
die;
|
198 |
}
|
199 |
static function wpemfb_video_down(){
|
200 |
if(current_user_can('manage_options')){
|
201 |
+
update_option('wpemfb_close_warning2','true');
|
202 |
update_option('wpemfb_video_download','true');
|
203 |
}
|
204 |
die;
|
lib/class-wp-embed-fb.php
CHANGED
@@ -52,7 +52,7 @@ class WP_Embed_FB {
|
|
52 |
}
|
53 |
static function get_fbsdk(){
|
54 |
if( self::$fbsdk && self::$fbsdk instanceof Sigami_Facebook){
|
55 |
-
if(
|
56 |
self::$fbsdk->setAccessToken(get_option('wpemfb_app_id').'|'.get_option('wpemfb_app_secret'));
|
57 |
return self::$fbsdk;
|
58 |
} else {
|
@@ -64,7 +64,7 @@ class WP_Embed_FB {
|
|
64 |
$config['secret'] = get_option('wpemfb_app_secret','');
|
65 |
//$config['fileUpload'] = false; // optional
|
66 |
self::$fbsdk = new Sigami_Facebook($config);
|
67 |
-
if(
|
68 |
self::$fbsdk->setAccessToken(get_option('wpemfb_app_id').'|'.get_option('wpemfb_app_secret'));
|
69 |
return self::$fbsdk;
|
70 |
}
|
@@ -72,15 +72,17 @@ class WP_Embed_FB {
|
|
72 |
/**
|
73 |
* Run
|
74 |
* @param array $match[2]=url without ' https://www.facebook.com/ '
|
|
|
|
|
75 |
* @return string Embedded content
|
76 |
*
|
77 |
*/
|
78 |
static function fb_embed($match, $url=null, $atts=null ){
|
79 |
$juice = $match[2];
|
|
|
80 |
$type_and_id = apply_filters('wpemfb_type_id', self::get_type_and_id($juice,$url), $juice, $url) ;
|
81 |
if(is_string($type_and_id))
|
82 |
return $type_and_id;
|
83 |
-
self::set_atts($atts);
|
84 |
$return = self::print_embed($type_and_id['fb_id'],$type_and_id['type'],$juice);
|
85 |
self::clear_atts();
|
86 |
return $return;
|
@@ -93,7 +95,9 @@ class WP_Embed_FB {
|
|
93 |
* @return array|string
|
94 |
*/
|
95 |
static function get_type_and_id($juice,$original){
|
96 |
-
$
|
|
|
|
|
97 |
$fb_id = null;
|
98 |
$type = null;
|
99 |
if (($pos = strpos($juice, "?")) !== FALSE) {
|
@@ -120,17 +124,22 @@ class WP_Embed_FB {
|
|
120 |
}
|
121 |
if(in_array('posts',$juiceArray)){
|
122 |
$type = 'post';
|
123 |
-
if(
|
124 |
try{
|
|
|
125 |
$data = $fbsdk->api('/'.$juiceArray[0].'?fields=id');
|
126 |
$fb_id = $data['id'].'_'.$fb_id;
|
127 |
} catch(FacebookApiException $e){
|
128 |
$res = '<p><a href="'.$original.'" target="_blank" rel="nofollow">'.$original.'</a>';
|
129 |
if(is_super_admin()){
|
130 |
$error = $e->getResult();
|
131 |
-
if(isset($error['error']['code']))
|
132 |
-
$res .= '<br><span style="color: #4a0e13">'.__('
|
133 |
-
|
|
|
|
|
|
|
|
|
134 |
}
|
135 |
$res .= '</p>';
|
136 |
return $res;
|
@@ -153,23 +162,18 @@ class WP_Embed_FB {
|
|
153 |
*/
|
154 |
$type = apply_filters('wpemfb_embed_type', $type, $juiceArray);
|
155 |
if(!$type){
|
156 |
-
if(
|
157 |
try{
|
|
|
158 |
$metadata = $fbsdk->api('/'.$fb_id.'?metadata=1');
|
159 |
$type = $metadata['metadata']['type'];
|
160 |
} catch(FacebookApiException $e){
|
161 |
$res = '<p><a href="https://www.facebook.com/'.$juice.'" target="_blank" rel="nofollow">https://www.facebook.com/'.$juice.'</a>';
|
162 |
if(is_super_admin()){
|
163 |
-
//TODO explain this type of error
|
164 |
-
/*
|
165 |
-
"message": "(#803) Cannot query users by their username ",
|
166 |
-
"type": "OAuthException",
|
167 |
-
"code": 803
|
168 |
-
*/
|
169 |
$error = $e->getResult();
|
170 |
if(isset($error['error']['code']))
|
171 |
-
$res .= '<br><span style="color: #4a0e13">'.__('Code').': '.$error['error']['code'].'
|
172 |
-
$res .= '<br><span style="color: #4a0e13">'.__('Error').': '.$error['error']['message'].'</span>';
|
173 |
}
|
174 |
$res .= '</p>';
|
175 |
return $res;
|
@@ -178,12 +182,12 @@ class WP_Embed_FB {
|
|
178 |
$type = 'page';
|
179 |
}
|
180 |
}
|
181 |
-
if(!
|
182 |
-
$fb_id = str_replace(':0','',$fb_id);
|
183 |
$fb_id_array = explode('-',$fb_id);
|
184 |
if( !empty($fb_id_array) && is_int(end($fb_id_array)) ){
|
185 |
$fb_id = end($fb_id_array);
|
186 |
}
|
|
|
187 |
}
|
188 |
$fb_id = apply_filters('wpemfb_embed_fb_id',$fb_id, $juiceArray);
|
189 |
return array('type'=>$type,'fb_id'=>$fb_id);
|
@@ -249,12 +253,14 @@ class WP_Embed_FB {
|
|
249 |
return print_r($fb_data,true);
|
250 |
$template = self::locate_template($template_name);
|
251 |
//get default variables to use on templates
|
|
|
252 |
$width = !empty(self::$width) ? self::$width : get_option('wpemfb_max_width');
|
|
|
253 |
$prop = get_option('wpemfb_proportions');
|
254 |
ob_start();
|
255 |
//show embed post on admin
|
256 |
if(is_admin() && isset($fb_data['social_plugin'])) : ?>
|
257 |
-
<script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/<?php echo
|
258 |
<?php endif;
|
259 |
/**
|
260 |
* Change the file to include on a certain embed.
|
@@ -265,6 +271,7 @@ class WP_Embed_FB {
|
|
265 |
* @param array $fb_data data from facebook
|
266 |
*/
|
267 |
$template = apply_filters('wpemfb_template',$template,$fb_data,$type);
|
|
|
268 |
include( $template );
|
269 |
return preg_replace('/^\s+|\n|\r|\s+$/m', '', ob_get_clean());
|
270 |
}
|
@@ -276,89 +283,98 @@ class WP_Embed_FB {
|
|
276 |
/**
|
277 |
* get data from fb using WP_Embed_FB::$fbsdk->api('/'.$fb_id) :)
|
278 |
*
|
279 |
-
* @param int
|
280 |
-
* @param string
|
281 |
* @type string type of embed
|
282 |
-
* @return
|
283 |
*/
|
284 |
static function fb_api_get($fb_id, $url, $type=""){
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
$
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
|
|
327 |
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
|
354 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
355 |
$fb_data = '<p><a href="https://www.facebook.com/'.$url.'" target="_blank" rel="nofollow">https://www.facebook.com/'.$url.'</a>';
|
356 |
if(is_super_admin()){
|
357 |
-
$
|
358 |
-
$fb_data .= '<br><span style="color: #4a0e13">'.__('Error').': '.$error['error']['message'].'</span>';
|
359 |
}
|
360 |
$fb_data .= '</p>';
|
361 |
}
|
|
|
362 |
return $fb_data;
|
363 |
}
|
364 |
/**
|
@@ -407,7 +423,8 @@ class WP_Embed_FB {
|
|
407 |
}
|
408 |
return '';
|
409 |
}
|
410 |
-
static function embed_register_handler($match,
|
|
|
411 |
return self::fb_embed($match, $url, $atts);
|
412 |
}
|
413 |
static function make_clickable($text) {
|
@@ -454,5 +471,8 @@ class WP_Embed_FB {
|
|
454 |
static function clear_atts(){
|
455 |
self::$width = self::$raw = self::$num_posts = self::$theme = self::$num_photos = null;
|
456 |
}
|
|
|
|
|
|
|
457 |
}
|
458 |
|
52 |
}
|
53 |
static function get_fbsdk(){
|
54 |
if( self::$fbsdk && self::$fbsdk instanceof Sigami_Facebook){
|
55 |
+
if( get_option('wpemfb_force_app_token','true') == 'true' )
|
56 |
self::$fbsdk->setAccessToken(get_option('wpemfb_app_id').'|'.get_option('wpemfb_app_secret'));
|
57 |
return self::$fbsdk;
|
58 |
} else {
|
64 |
$config['secret'] = get_option('wpemfb_app_secret','');
|
65 |
//$config['fileUpload'] = false; // optional
|
66 |
self::$fbsdk = new Sigami_Facebook($config);
|
67 |
+
if( get_option('wpemfb_force_app_token','true') == 'true' )
|
68 |
self::$fbsdk->setAccessToken(get_option('wpemfb_app_id').'|'.get_option('wpemfb_app_secret'));
|
69 |
return self::$fbsdk;
|
70 |
}
|
72 |
/**
|
73 |
* Run
|
74 |
* @param array $match[2]=url without ' https://www.facebook.com/ '
|
75 |
+
* @param string $url Original url
|
76 |
+
* @param array $atts Attributes for the embed
|
77 |
* @return string Embedded content
|
78 |
*
|
79 |
*/
|
80 |
static function fb_embed($match, $url=null, $atts=null ){
|
81 |
$juice = $match[2];
|
82 |
+
self::set_atts($atts);
|
83 |
$type_and_id = apply_filters('wpemfb_type_id', self::get_type_and_id($juice,$url), $juice, $url) ;
|
84 |
if(is_string($type_and_id))
|
85 |
return $type_and_id;
|
|
|
86 |
$return = self::print_embed($type_and_id['fb_id'],$type_and_id['type'],$juice);
|
87 |
self::clear_atts();
|
88 |
return $return;
|
95 |
* @return array|string
|
96 |
*/
|
97 |
static function get_type_and_id($juice,$original){
|
98 |
+
$has_fb_app = WP_Embed_FB_Plugin::has_fb_app();
|
99 |
+
if($has_fb_app)
|
100 |
+
$fbsdk = self::get_fbsdk();
|
101 |
$fb_id = null;
|
102 |
$type = null;
|
103 |
if (($pos = strpos($juice, "?")) !== FALSE) {
|
124 |
}
|
125 |
if(in_array('posts',$juiceArray)){
|
126 |
$type = 'post';
|
127 |
+
if($has_fb_app && (self::is_raw('post')) ){
|
128 |
try{
|
129 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
130 |
$data = $fbsdk->api('/'.$juiceArray[0].'?fields=id');
|
131 |
$fb_id = $data['id'].'_'.$fb_id;
|
132 |
} catch(FacebookApiException $e){
|
133 |
$res = '<p><a href="'.$original.'" target="_blank" rel="nofollow">'.$original.'</a>';
|
134 |
if(is_super_admin()){
|
135 |
$error = $e->getResult();
|
136 |
+
if(isset($error['error']['code']) && ($error['error']['code'] == '803') ){
|
137 |
+
$res .= '<br><span style="color: #4a0e13">'.__('Error: Try embedding this post as a social plugin (only visible to super admins)','wp-embed-facebook').'</span>';
|
138 |
+
} else {
|
139 |
+
if(isset($error['error']['code']))
|
140 |
+
$res .= '<br><span style="color: #4a0e13">'.__('Code').': '.$error['error']['code'].' in type</span>';
|
141 |
+
$res .= '<br><span style="color: #4a0e13">'.__('Error').': '.$error['error']['message'].' (only visible to super admins)</span>';
|
142 |
+
}
|
143 |
}
|
144 |
$res .= '</p>';
|
145 |
return $res;
|
162 |
*/
|
163 |
$type = apply_filters('wpemfb_embed_type', $type, $juiceArray);
|
164 |
if(!$type){
|
165 |
+
if($has_fb_app){
|
166 |
try{
|
167 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
168 |
$metadata = $fbsdk->api('/'.$fb_id.'?metadata=1');
|
169 |
$type = $metadata['metadata']['type'];
|
170 |
} catch(FacebookApiException $e){
|
171 |
$res = '<p><a href="https://www.facebook.com/'.$juice.'" target="_blank" rel="nofollow">https://www.facebook.com/'.$juice.'</a>';
|
172 |
if(is_super_admin()){
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
$error = $e->getResult();
|
174 |
if(isset($error['error']['code']))
|
175 |
+
$res .= '<br><span style="color: #4a0e13">'.__('Code').': '.$error['error']['code'].' '.$type.'</span>';
|
176 |
+
$res .= '<br><span style="color: #4a0e13">'.__('Error').': '.$error['error']['message'].' (only visible to super admins)</span>';
|
177 |
}
|
178 |
$res .= '</p>';
|
179 |
return $res;
|
182 |
$type = 'page';
|
183 |
}
|
184 |
}
|
185 |
+
if(!is_numeric($fb_id)){
|
|
|
186 |
$fb_id_array = explode('-',$fb_id);
|
187 |
if( !empty($fb_id_array) && is_int(end($fb_id_array)) ){
|
188 |
$fb_id = end($fb_id_array);
|
189 |
}
|
190 |
+
$fb_id = str_replace(':0','',$fb_id);
|
191 |
}
|
192 |
$fb_id = apply_filters('wpemfb_embed_fb_id',$fb_id, $juiceArray);
|
193 |
return array('type'=>$type,'fb_id'=>$fb_id);
|
253 |
return print_r($fb_data,true);
|
254 |
$template = self::locate_template($template_name);
|
255 |
//get default variables to use on templates
|
256 |
+
/** @noinspection PhpUnusedLocalVariableInspection */
|
257 |
$width = !empty(self::$width) ? self::$width : get_option('wpemfb_max_width');
|
258 |
+
/** @noinspection PhpUnusedLocalVariableInspection */
|
259 |
$prop = get_option('wpemfb_proportions');
|
260 |
ob_start();
|
261 |
//show embed post on admin
|
262 |
if(is_admin() && isset($fb_data['social_plugin'])) : ?>
|
263 |
+
<script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/<?php echo get_option('wpemfb_sdk_lang','en_US'); ?>/sdk.js#xfbml=1&version=<?php echo get_option('wpemfb_sdk_version','v2.6') ?>"; fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'facebook-jssdk'));</script>
|
264 |
<?php endif;
|
265 |
/**
|
266 |
* Change the file to include on a certain embed.
|
271 |
* @param array $fb_data data from facebook
|
272 |
*/
|
273 |
$template = apply_filters('wpemfb_template',$template,$fb_data,$type);
|
274 |
+
/** @noinspection PhpIncludeInspection */
|
275 |
include( $template );
|
276 |
return preg_replace('/^\s+|\n|\r|\s+$/m', '', ob_get_clean());
|
277 |
}
|
283 |
/**
|
284 |
* get data from fb using WP_Embed_FB::$fbsdk->api('/'.$fb_id) :)
|
285 |
*
|
286 |
+
* @param int $fb_id Facebook id
|
287 |
+
* @param string $url Facebook url
|
288 |
* @type string type of embed
|
289 |
+
* @return array|string
|
290 |
*/
|
291 |
static function fb_api_get($fb_id, $url, $type=""){
|
292 |
+
if(WP_Embed_FB_Plugin::has_fb_app()){
|
293 |
+
$fbsdk = self::get_fbsdk();
|
294 |
+
try {
|
295 |
+
switch($type){
|
296 |
+
case 'album' :
|
297 |
+
self::$num_photos = is_int(self::$num_photos) ? self::$num_photos : get_option("wpemfb_max_photos");
|
298 |
+
$api_string = $fb_id.'?fields=name,id,from,description,count,photos.fields(name,picture,source,id).limit('.self::$num_photos.')';
|
299 |
+
break;
|
300 |
+
case 'page' :
|
301 |
+
$num_posts = is_int(self::$num_posts) ? self::$num_posts : get_option("wpemfb_max_posts");
|
302 |
+
$api_string = $fb_id.'?fields=name,picture,is_community_page,link,id,cover,category,website,likes,genre';
|
303 |
+
if(intval($num_posts) > 0)
|
304 |
+
$api_string .= ',posts.limit('.$num_posts.'){id,full_picture,type,via,source,parent_id,call_to_action,story,place,child_attachments,icon,created_time,message,description,caption,name,shares,link,picture,object_id,likes.limit(1).summary(true),comments.limit(1).summary(true)}';
|
305 |
+
break;
|
306 |
+
case 'video' :
|
307 |
+
$api_string = $fb_id.'?fields=id,source,picture,from';
|
308 |
+
break;
|
309 |
+
case 'photo' :
|
310 |
+
$api_string = $fb_id.'?fields=id,source,link,likes.limit(1).summary(true),comments.limit(1).summary(true)';
|
311 |
+
break;
|
312 |
+
case 'event' :
|
313 |
+
$api_string = $fb_id.'?fields=id,name,start_time,end_time,owner,place,picture,timezone,cover';
|
314 |
+
break;
|
315 |
+
case 'post' :
|
316 |
+
$api_string = $fb_id.'?fields=from{id,name,likes,link},id,full_picture,type,via,source,parent_id,call_to_action,story,place,child_attachments,icon,created_time,message,description,caption,name,shares,link,picture,object_id,likes.limit(1).summary(true),comments.limit(1).summary(true)';
|
317 |
+
break;
|
318 |
+
default :
|
319 |
+
$api_string = $fb_id;
|
320 |
+
break;
|
321 |
+
}
|
322 |
+
//echo "type";
|
323 |
+
/**
|
324 |
+
* Filter the fist fbsdk query
|
325 |
+
*
|
326 |
+
* @since 1.9
|
327 |
+
*
|
328 |
+
* @param string $api_string The fb api request string according to type
|
329 |
+
* @param string $fb_id The id of the object being requested.
|
330 |
+
* @param string $type The detected type of embed
|
331 |
+
*
|
332 |
+
*/
|
333 |
+
$fb_data = $fbsdk->api('v2.5/'.apply_filters('wpemfb_api_string',$api_string,$fb_id,$type));
|
334 |
+
$api_string2 = '';
|
335 |
|
336 |
+
/**
|
337 |
+
* Filter the second fbsdk query if necessary
|
338 |
+
*
|
339 |
+
* @since 1.9
|
340 |
+
*
|
341 |
+
* @param string $api_string2 The second request string empty if not necessary
|
342 |
+
* @param array $fb_data The result from the first query
|
343 |
+
* @param string $type The detected type of embed
|
344 |
+
*
|
345 |
+
*/
|
346 |
+
$api_string2 = apply_filters('wpemfb_2nd_api_string',$api_string2,$fb_data,$type);
|
347 |
|
348 |
+
if(!empty($api_string2)){
|
349 |
+
$extra_data = $fbsdk->api('/v2.5/'.$api_string2);
|
350 |
+
$fb_data = array_merge($fb_data,$extra_data);
|
351 |
+
}
|
352 |
+
/**
|
353 |
+
* Filter all data received from facebook.
|
354 |
+
*
|
355 |
+
* @since 1.9
|
356 |
+
*
|
357 |
+
* @param array $fb_data the final result
|
358 |
+
* @param string $type The detected type of embed
|
359 |
+
*/
|
360 |
+
$fb_data = apply_filters('wpemfb_fb_data',$fb_data,$type);
|
361 |
|
362 |
+
} catch(FacebookApiException $e) {
|
363 |
+
$fb_data = '<p><a href="https://www.facebook.com/'.$url.'" target="_blank" rel="nofollow">https://www.facebook.com/'.$url.'</a>';
|
364 |
+
if(is_super_admin()){
|
365 |
+
$error = $e->getResult();
|
366 |
+
$fb_data .= '<br><span style="color: #4a0e13">'.__('Error').': '.$error['error']['message'].' (only visible to super admins)</span>';
|
367 |
+
}
|
368 |
+
$fb_data .= '</p>';
|
369 |
+
}
|
370 |
+
} else {
|
371 |
$fb_data = '<p><a href="https://www.facebook.com/'.$url.'" target="_blank" rel="nofollow">https://www.facebook.com/'.$url.'</a>';
|
372 |
if(is_super_admin()){
|
373 |
+
$fb_data .= '<br><span style="color: #4a0e13">'.__('A Facebook App is needed to embed this url (only visible to super admins)','wp-embed-facebook').'</span>';
|
|
|
374 |
}
|
375 |
$fb_data .= '</p>';
|
376 |
}
|
377 |
+
|
378 |
return $fb_data;
|
379 |
}
|
380 |
/**
|
423 |
}
|
424 |
return '';
|
425 |
}
|
426 |
+
static function embed_register_handler($match, /** @noinspection PhpUnusedParameterInspection */
|
427 |
+
$attr=null, $url=null, $atts=null){
|
428 |
return self::fb_embed($match, $url, $atts);
|
429 |
}
|
430 |
static function make_clickable($text) {
|
471 |
static function clear_atts(){
|
472 |
self::$width = self::$raw = self::$num_posts = self::$theme = self::$num_photos = null;
|
473 |
}
|
474 |
+
static function fb_root($content){
|
475 |
+
return '<div id="fb-root"></div>'.PHP_EOL.$content;
|
476 |
+
}
|
477 |
}
|
478 |
|
lib/js/fb.js
CHANGED
@@ -1,12 +1,11 @@
|
|
1 |
jQuery(document).ready(function() {
|
2 |
jQuery.ajaxSetup({ cache: true });
|
3 |
-
var script_name = '//connect.facebook.net/'+ WEF.local +'/
|
4 |
jQuery.getScript(script_name, function(){
|
5 |
FB.init({
|
6 |
-
appId:
|
7 |
-
|
8 |
-
|
9 |
-
xfbml: true
|
10 |
});
|
11 |
});
|
12 |
});
|
1 |
jQuery(document).ready(function() {
|
2 |
jQuery.ajaxSetup({ cache: true });
|
3 |
+
var script_name = '//connect.facebook.net/' + WEF.local + '/sdk.js';
|
4 |
jQuery.getScript(script_name, function(){
|
5 |
FB.init({
|
6 |
+
appId: WEF.fb_id,
|
7 |
+
version: WEF.version,
|
8 |
+
xfbml: true
|
|
|
9 |
});
|
10 |
});
|
11 |
});
|
lib/lightbox2/css/lightbox.css
DELETED
@@ -1,210 +0,0 @@
|
|
1 |
-
/* Preload images */
|
2 |
-
body:after {
|
3 |
-
content: url(../img/close.png) url(../img/loading.gif) url(../img/prev.png) url(../img/next.png);
|
4 |
-
display: none;
|
5 |
-
}
|
6 |
-
|
7 |
-
.lightboxOverlay {
|
8 |
-
position: absolute;
|
9 |
-
top: 0;
|
10 |
-
left: 0;
|
11 |
-
z-index: 9999;
|
12 |
-
background-color: black;
|
13 |
-
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
|
14 |
-
opacity: 0.8;
|
15 |
-
display: none;
|
16 |
-
}
|
17 |
-
|
18 |
-
.lightbox {
|
19 |
-
position: absolute;
|
20 |
-
left: 0;
|
21 |
-
width: 100%;
|
22 |
-
z-index: 10000;
|
23 |
-
text-align: center;
|
24 |
-
line-height: 0;
|
25 |
-
font-weight: normal;
|
26 |
-
}
|
27 |
-
|
28 |
-
.lightbox .lb-image {
|
29 |
-
display: block;
|
30 |
-
height: auto;
|
31 |
-
max-width: inherit;
|
32 |
-
-webkit-border-radius: 3px;
|
33 |
-
-moz-border-radius: 3px;
|
34 |
-
-ms-border-radius: 3px;
|
35 |
-
-o-border-radius: 3px;
|
36 |
-
border-radius: 3px;
|
37 |
-
}
|
38 |
-
|
39 |
-
.lightbox a img {
|
40 |
-
border: none;
|
41 |
-
}
|
42 |
-
|
43 |
-
.lb-outerContainer {
|
44 |
-
position: relative;
|
45 |
-
background-color: white;
|
46 |
-
*zoom: 1;
|
47 |
-
width: 250px;
|
48 |
-
height: 250px;
|
49 |
-
margin: 0 auto;
|
50 |
-
-webkit-border-radius: 4px;
|
51 |
-
-moz-border-radius: 4px;
|
52 |
-
-ms-border-radius: 4px;
|
53 |
-
-o-border-radius: 4px;
|
54 |
-
border-radius: 4px;
|
55 |
-
}
|
56 |
-
|
57 |
-
.lb-outerContainer:after {
|
58 |
-
content: "";
|
59 |
-
display: table;
|
60 |
-
clear: both;
|
61 |
-
}
|
62 |
-
|
63 |
-
.lb-container {
|
64 |
-
padding: 4px;
|
65 |
-
}
|
66 |
-
|
67 |
-
.lb-loader {
|
68 |
-
position: absolute;
|
69 |
-
top: 43%;
|
70 |
-
left: 0;
|
71 |
-
height: 25%;
|
72 |
-
width: 100%;
|
73 |
-
text-align: center;
|
74 |
-
line-height: 0;
|
75 |
-
}
|
76 |
-
|
77 |
-
.lb-cancel {
|
78 |
-
display: block;
|
79 |
-
width: 32px;
|
80 |
-
height: 32px;
|
81 |
-
margin: 0 auto;
|
82 |
-
background: url(../img/loading.gif) no-repeat;
|
83 |
-
}
|
84 |
-
|
85 |
-
.lb-nav {
|
86 |
-
position: absolute;
|
87 |
-
top: 0;
|
88 |
-
left: 0;
|
89 |
-
height: 100%;
|
90 |
-
width: 100%;
|
91 |
-
z-index: 10;
|
92 |
-
}
|
93 |
-
|
94 |
-
.lb-container > .nav {
|
95 |
-
left: 0;
|
96 |
-
}
|
97 |
-
|
98 |
-
.lb-nav a {
|
99 |
-
outline: none;
|
100 |
-
background-image: url('data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
|
101 |
-
}
|
102 |
-
|
103 |
-
.lb-prev, .lb-next {
|
104 |
-
height: 100%;
|
105 |
-
cursor: pointer;
|
106 |
-
display: block;
|
107 |
-
}
|
108 |
-
|
109 |
-
.lb-nav a.lb-prev {
|
110 |
-
width: 34%;
|
111 |
-
left: 0;
|
112 |
-
float: left;
|
113 |
-
background: url(../img/prev.png) left 48% no-repeat;
|
114 |
-
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
|
115 |
-
opacity: 0;
|
116 |
-
-webkit-transition: opacity 0.6s;
|
117 |
-
-moz-transition: opacity 0.6s;
|
118 |
-
-o-transition: opacity 0.6s;
|
119 |
-
transition: opacity 0.6s;
|
120 |
-
}
|
121 |
-
|
122 |
-
.lb-nav a.lb-prev:hover {
|
123 |
-
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
|
124 |
-
opacity: 1;
|
125 |
-
}
|
126 |
-
|
127 |
-
.lb-nav a.lb-next {
|
128 |
-
width: 64%;
|
129 |
-
right: 0;
|
130 |
-
float: right;
|
131 |
-
background: url(../img/next.png) right 48% no-repeat;
|
132 |
-
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
|
133 |
-
opacity: 0;
|
134 |
-
-webkit-transition: opacity 0.6s;
|
135 |
-
-moz-transition: opacity 0.6s;
|
136 |
-
-o-transition: opacity 0.6s;
|
137 |
-
transition: opacity 0.6s;
|
138 |
-
}
|
139 |
-
|
140 |
-
.lb-nav a.lb-next:hover {
|
141 |
-
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
|
142 |
-
opacity: 1;
|
143 |
-
}
|
144 |
-
|
145 |
-
.lb-dataContainer {
|
146 |
-
margin: 0 auto;
|
147 |
-
padding-top: 5px;
|
148 |
-
*zoom: 1;
|
149 |
-
width: 100%;
|
150 |
-
-moz-border-radius-bottomleft: 4px;
|
151 |
-
-webkit-border-bottom-left-radius: 4px;
|
152 |
-
border-bottom-left-radius: 4px;
|
153 |
-
-moz-border-radius-bottomright: 4px;
|
154 |
-
-webkit-border-bottom-right-radius: 4px;
|
155 |
-
border-bottom-right-radius: 4px;
|
156 |
-
}
|
157 |
-
|
158 |
-
.lb-dataContainer:after {
|
159 |
-
content: "";
|
160 |
-
display: table;
|
161 |
-
clear: both;
|
162 |
-
}
|
163 |
-
|
164 |
-
.lb-data {
|
165 |
-
padding: 0 4px;
|
166 |
-
color: #ccc;
|
167 |
-
}
|
168 |
-
|
169 |
-
.lb-data .lb-details {
|
170 |
-
width: 85%;
|
171 |
-
float: left;
|
172 |
-
text-align: left;
|
173 |
-
line-height: 1.1em;
|
174 |
-
}
|
175 |
-
|
176 |
-
.lb-data .lb-caption {
|
177 |
-
font-size: 13px;
|
178 |
-
font-weight: bold;
|
179 |
-
line-height: 1em;
|
180 |
-
}
|
181 |
-
|
182 |
-
.lb-data .lb-number {
|
183 |
-
display: block;
|
184 |
-
clear: left;
|
185 |
-
padding-bottom: 1em;
|
186 |
-
font-size: 12px;
|
187 |
-
color: #999999;
|
188 |
-
}
|
189 |
-
|
190 |
-
.lb-data .lb-close {
|
191 |
-
display: block;
|
192 |
-
float: right;
|
193 |
-
width: 30px;
|
194 |
-
height: 30px;
|
195 |
-
background: url(../img/close.png) top right no-repeat;
|
196 |
-
text-align: right;
|
197 |
-
outline: none;
|
198 |
-
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
|
199 |
-
opacity: 0.7;
|
200 |
-
-webkit-transition: opacity 0.2s;
|
201 |
-
-moz-transition: opacity 0.2s;
|
202 |
-
-o-transition: opacity 0.2s;
|
203 |
-
transition: opacity 0.2s;
|
204 |
-
}
|
205 |
-
|
206 |
-
.lb-data .lb-close:hover {
|
207 |
-
cursor: pointer;
|
208 |
-
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
|
209 |
-
opacity: 1;
|
210 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/lightbox2/css/lightbox.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.lb-loader,.lightbox{text-align:center;line-height:0}body:after{content:url(../images/close.png) url(../images/loading.gif) url(../images/prev.png) url(../images/next.png);display:none}.lb-dataContainer:after,.lb-outerContainer:after{content:"";clear:both}body.lb-disable-scrolling{overflow:hidden}.lightboxOverlay{position:absolute;top:0;left:0;z-index:9999;background-color:#000;filter:alpha(Opacity=80);opacity:.8;display:none}.lightbox{position:absolute;left:0;width:100%;z-index:10000;font-weight:400}.lightbox .lb-image{display:block;height:auto;max-width:inherit;border-radius:3px}.lightbox a img{border:none}.lb-outerContainer{position:relative;background-color:#fff;width:250px;height:250px;margin:0 auto;border-radius:4px}.lb-loader,.lb-nav{position:absolute;left:0}.lb-outerContainer:after{display:table}.lb-container{padding:4px}.lb-loader{top:43%;height:25%;width:100%}.lb-cancel{display:block;width:32px;height:32px;margin:0 auto;background:url(../images/loading.gif) no-repeat}.lb-nav{top:0;height:100%;width:100%;z-index:10}.lb-container>.nav{left:0}.lb-nav a{outline:0;background-image:url(data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}.lb-next,.lb-prev{height:100%;cursor:pointer;display:block}.lb-nav a.lb-prev{width:34%;left:0;float:left;background:url(../images/prev.png) left 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-prev:hover{filter:alpha(Opacity=100);opacity:1}.lb-nav a.lb-next{width:64%;right:0;float:right;background:url(../images/next.png) right 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-next:hover{filter:alpha(Opacity=100);opacity:1}.lb-dataContainer{margin:0 auto;padding-top:5px;width:100%;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.lb-dataContainer:after{display:table}.lb-data{padding:0 4px;color:#ccc}.lb-data .lb-details{width:85%;float:left;text-align:left;line-height:1.1em}.lb-data .lb-caption{font-size:13px;font-weight:700;line-height:1em}.lb-data .lb-number{display:block;clear:left;padding-bottom:1em;font-size:12px;color:#999}.lb-data .lb-close{display:block;float:right;width:30px;height:30px;background:url(../images/close.png) top right no-repeat;text-align:right;outline:0;filter:alpha(Opacity=70);opacity:.7;-webkit-transition:opacity .2s;-moz-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s}.lb-data .lb-close:hover{cursor:pointer;filter:alpha(Opacity=100);opacity:1}
|
lib/lightbox2/{img → images}/close.png
RENAMED
File without changes
|
lib/lightbox2/{img → images}/loading.gif
RENAMED
File without changes
|
lib/lightbox2/{img → images}/next.png
RENAMED
File without changes
|
lib/lightbox2/{img → images}/prev.png
RENAMED
File without changes
|
lib/lightbox2/js/lightbox.min.js
CHANGED
@@ -6,5 +6,124 @@
|
|
6 |
* - Free for use in both personal and commercial projects
|
7 |
* - Attribution requires leaving author name, author link, and the license info intact
|
8 |
*/
|
9 |
-
(function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
//# sourceMappingURL=lightbox.min.map
|
6 |
* - Free for use in both personal and commercial projects
|
7 |
* - Attribution requires leaving author name, author link, and the license info intact
|
8 |
*/
|
9 |
+
(function () {
|
10 |
+
var a = jQuery, b = function () {
|
11 |
+
function a() {
|
12 |
+
this.fadeDuration = 500, this.fitImagesInViewport = !0, this.resizeDuration = 700, this.positionFromTop = 50, this.showImageNumberLabel = !0, this.alwaysShowNavOnTouchDevices = !1, this.wrapAround = !1
|
13 |
+
}
|
14 |
+
|
15 |
+
return a.prototype.albumLabel = function (a, b) {
|
16 |
+
return "Image " + a + " of " + b
|
17 |
+
}, a
|
18 |
+
}(), c = function () {
|
19 |
+
function b(a) {
|
20 |
+
this.options = a, this.album = [], this.currentImageIndex = void 0, this.init()
|
21 |
+
}
|
22 |
+
|
23 |
+
return b.prototype.init = function () {
|
24 |
+
this.enable(), this.build()
|
25 |
+
}, b.prototype.enable = function () {
|
26 |
+
var b = this;
|
27 |
+
a("body").on("click", "a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]", function (c) {
|
28 |
+
return b.start(a(c.currentTarget)), !1
|
29 |
+
})
|
30 |
+
}, b.prototype.build = function () {
|
31 |
+
var b = this;
|
32 |
+
a("<div id='lightboxOverlay' class='lightboxOverlay'></div><div id='lightbox' class='lightbox'><div class='lb-outerContainer'><div class='lb-container'><img class='lb-image' src='' /><div class='lb-nav'><a class='lb-prev' href='' ></a><a class='lb-next' href='' ></a></div><div class='lb-loader'><a class='lb-cancel'></a></div></div></div><div class='lb-dataContainer'><div class='lb-data'><div class='lb-details'><span class='lb-caption'></span><span class='lb-number'></span></div><div class='lb-closeContainer'><a class='lb-close'></a></div></div></div></div>").appendTo(a("body")), this.$lightbox = a("#lightbox"), this.$overlay = a("#lightboxOverlay"), this.$outerContainer = this.$lightbox.find(".lb-outerContainer"), this.$container = this.$lightbox.find(".lb-container"), this.containerTopPadding = parseInt(this.$container.css("padding-top"), 10), this.containerRightPadding = parseInt(this.$container.css("padding-right"), 10), this.containerBottomPadding = parseInt(this.$container.css("padding-bottom"), 10), this.containerLeftPadding = parseInt(this.$container.css("padding-left"), 10), this.$overlay.hide().on("click", function () {
|
33 |
+
return b.end(), !1
|
34 |
+
}), this.$lightbox.hide().on("click", function (c) {
|
35 |
+
return "lightbox" === a(c.target).attr("id") && b.end(), !1
|
36 |
+
}), this.$outerContainer.on("click", function (c) {
|
37 |
+
return "lightbox" === a(c.target).attr("id") && b.end(), !1
|
38 |
+
}), this.$lightbox.find(".lb-prev").on("click", function () {
|
39 |
+
return b.changeImage(0 === b.currentImageIndex ? b.album.length - 1 : b.currentImageIndex - 1), !1
|
40 |
+
}), this.$lightbox.find(".lb-next").on("click", function () {
|
41 |
+
return b.changeImage(b.currentImageIndex === b.album.length - 1 ? 0 : b.currentImageIndex + 1), !1
|
42 |
+
}), this.$lightbox.find(".lb-loader, .lb-close").on("click", function () {
|
43 |
+
return b.end(), !1
|
44 |
+
})
|
45 |
+
}, b.prototype.start = function (b) {
|
46 |
+
function c(a) {
|
47 |
+
d.album.push({link: a.attr("href"), title: a.attr("data-title") || a.attr("title")})
|
48 |
+
}
|
49 |
+
|
50 |
+
var d = this, e = a(window);
|
51 |
+
e.on("resize", a.proxy(this.sizeOverlay, this)), a("select, object, embed").css({visibility: "hidden"}), this.sizeOverlay(), this.album = [];
|
52 |
+
var f, g = 0, h = b.attr("data-lightbox");
|
53 |
+
if (h) {
|
54 |
+
f = a(b.prop("tagName") + '[data-lightbox="' + h + '"]');
|
55 |
+
for (var i = 0; i < f.length; i = ++i)c(a(f[i])), f[i] === b[0] && (g = i)
|
56 |
+
} else if ("lightbox" === b.attr("rel"))c(b); else {
|
57 |
+
f = a(b.prop("tagName") + '[rel="' + b.attr("rel") + '"]');
|
58 |
+
for (var j = 0; j < f.length; j = ++j)c(a(f[j])), f[j] === b[0] && (g = j)
|
59 |
+
}
|
60 |
+
var k = e.scrollTop() + this.options.positionFromTop, l = e.scrollLeft();
|
61 |
+
this.$lightbox.css({top: k + "px", left: l + "px"}).fadeIn(this.options.fadeDuration), this.changeImage(g)
|
62 |
+
}, b.prototype.changeImage = function (b) {
|
63 |
+
var c = this;
|
64 |
+
this.disableKeyboardNav();
|
65 |
+
var d = this.$lightbox.find(".lb-image");
|
66 |
+
this.$overlay.fadeIn(this.options.fadeDuration), a(".lb-loader").fadeIn("slow"), this.$lightbox.find(".lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption").hide(), this.$outerContainer.addClass("animating");
|
67 |
+
var e = new Image;
|
68 |
+
e.onload = function () {
|
69 |
+
var f, g, h, i, j, k, l;
|
70 |
+
d.attr("src", c.album[b].link), f = a(e), d.width(e.width), d.height(e.height), c.options.fitImagesInViewport && (l = a(window).width(), k = a(window).height(), j = l - c.containerLeftPadding - c.containerRightPadding - 20, i = k - c.containerTopPadding - c.containerBottomPadding - 120, (e.width > j || e.height > i) && (e.width / j > e.height / i ? (h = j, g = parseInt(e.height / (e.width / h), 10), d.width(h), d.height(g)) : (g = i, h = parseInt(e.width / (e.height / g), 10), d.width(h), d.height(g)))), c.sizeContainer(d.width(), d.height())
|
71 |
+
}, e.src = this.album[b].link, this.currentImageIndex = b
|
72 |
+
}, b.prototype.sizeOverlay = function () {
|
73 |
+
this.$overlay.width(a(window).width()).height(a(document).height())
|
74 |
+
}, b.prototype.sizeContainer = function (a, b) {
|
75 |
+
function c() {
|
76 |
+
d.$lightbox.find(".lb-dataContainer").width(g), d.$lightbox.find(".lb-prevLink").height(h), d.$lightbox.find(".lb-nextLink").height(h), d.showImage()
|
77 |
+
}
|
78 |
+
|
79 |
+
var d = this, e = this.$outerContainer.outerWidth(), f = this.$outerContainer.outerHeight(), g = a + this.containerLeftPadding + this.containerRightPadding, h = b + this.containerTopPadding + this.containerBottomPadding;
|
80 |
+
e !== g || f !== h ? this.$outerContainer.animate({
|
81 |
+
width: g,
|
82 |
+
height: h
|
83 |
+
}, this.options.resizeDuration, "swing", function () {
|
84 |
+
c()
|
85 |
+
}) : c()
|
86 |
+
}, b.prototype.showImage = function () {
|
87 |
+
this.$lightbox.find(".lb-loader").hide(), this.$lightbox.find(".lb-image").fadeIn("slow"), this.updateNav(), this.updateDetails(), this.preloadNeighboringImages(), this.enableKeyboardNav()
|
88 |
+
}, b.prototype.updateNav = function () {
|
89 |
+
var a = !1;
|
90 |
+
try {
|
91 |
+
document.createEvent("TouchEvent"), a = this.options.alwaysShowNavOnTouchDevices ? !0 : !1
|
92 |
+
} catch (b) {
|
93 |
+
}
|
94 |
+
this.$lightbox.find(".lb-nav").show(), this.album.length > 1 && (this.options.wrapAround ? (a && this.$lightbox.find(".lb-prev, .lb-next").css("opacity", "1"), this.$lightbox.find(".lb-prev, .lb-next").show()) : (this.currentImageIndex > 0 && (this.$lightbox.find(".lb-prev").show(), a && this.$lightbox.find(".lb-prev").css("opacity", "1")), this.currentImageIndex < this.album.length - 1 && (this.$lightbox.find(".lb-next").show(), a && this.$lightbox.find(".lb-next").css("opacity", "1"))))
|
95 |
+
}, b.prototype.updateDetails = function () {
|
96 |
+
var b = this;
|
97 |
+
"undefined" != typeof this.album[this.currentImageIndex].title && "" !== this.album[this.currentImageIndex].title && this.$lightbox.find(".lb-caption").html(this.album[this.currentImageIndex].title).fadeIn("fast").find("a").on("click", function () {
|
98 |
+
location.href = a(this).attr("href")
|
99 |
+
}), this.album.length > 1 && this.options.showImageNumberLabel ? this.$lightbox.find(".lb-number").text(this.options.albumLabel(this.currentImageIndex + 1, this.album.length)).fadeIn("fast") : this.$lightbox.find(".lb-number").hide(), this.$outerContainer.removeClass("animating"), this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration, function () {
|
100 |
+
return b.sizeOverlay()
|
101 |
+
})
|
102 |
+
}, b.prototype.preloadNeighboringImages = function () {
|
103 |
+
if (this.album.length > this.currentImageIndex + 1) {
|
104 |
+
var a = new Image;
|
105 |
+
a.src = this.album[this.currentImageIndex + 1].link
|
106 |
+
}
|
107 |
+
if (this.currentImageIndex > 0) {
|
108 |
+
var b = new Image;
|
109 |
+
b.src = this.album[this.currentImageIndex - 1].link
|
110 |
+
}
|
111 |
+
}, b.prototype.enableKeyboardNav = function () {
|
112 |
+
a(document).on("keyup.keyboard", a.proxy(this.keyboardAction, this))
|
113 |
+
}, b.prototype.disableKeyboardNav = function () {
|
114 |
+
a(document).off(".keyboard")
|
115 |
+
}, b.prototype.keyboardAction = function (a) {
|
116 |
+
var b = 27, c = 37, d = 39, e = a.keyCode, f = String.fromCharCode(e).toLowerCase();
|
117 |
+
e === b || f.match(/x|o|c/) ? this.end() : "p" === f || e === c ? 0 !== this.currentImageIndex ? this.changeImage(this.currentImageIndex - 1) : this.options.wrapAround && this.album.length > 1 && this.changeImage(this.album.length - 1) : ("n" === f || e === d) && (this.currentImageIndex !== this.album.length - 1 ? this.changeImage(this.currentImageIndex + 1) : this.options.wrapAround && this.album.length > 1 && this.changeImage(0))
|
118 |
+
}, b.prototype.end = function () {
|
119 |
+
this.disableKeyboardNav(), a(window).off("resize", this.sizeOverlay), this.$lightbox.fadeOut(this.options.fadeDuration), this.$overlay.fadeOut(this.options.fadeDuration), a("select, object, embed").css({visibility: "visible"})
|
120 |
+
}, b
|
121 |
+
}();
|
122 |
+
a(function () {
|
123 |
+
{
|
124 |
+
var a = new b;
|
125 |
+
new c(a)
|
126 |
+
}
|
127 |
+
})
|
128 |
+
}).call(this);
|
129 |
//# sourceMappingURL=lightbox.min.map
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: poxtron
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R8Q85GT3Q8Q26
|
4 |
Tags: Facebook, facebook, Social Plugins, embed facebook, facebook video, facebook posts, facebook publication, facebook publications, facebook event, facebook events, facebook pages, facebook page, facebook profiles, facebook album, facebook albums, facebook photos, facebook photo, social,
|
5 |
Requires at least: 3.8.1
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -38,18 +38,19 @@ You should see the embed right on the editor, try switching from text to visual
|
|
38 |
|
39 |
Alternatively you can use the [facebook] shortcode.
|
40 |
|
41 |
-
Read more about the
|
42 |
|
43 |
= Premium extension =
|
44 |
* Embed full event shortcode
|
45 |
* Embed full fan page shortcode
|
46 |
* Embed events with address and admins
|
47 |
* Embed albums with more that 100 photos
|
|
|
48 |
* Features cooking
|
49 |
* Embed personal data
|
50 |
* Shortcode creator
|
51 |
* Special templates for albums and pages
|
52 |
-
|
53 |
|
54 |
== Installation ==
|
55 |
|
@@ -79,6 +80,17 @@ This can only be achieved using the premium version
|
|
79 |
|
80 |
== Changelog ==
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
= 2.0.8 =
|
83 |
* Fix Event title css
|
84 |
|
@@ -275,5 +287,5 @@ This can only be achieved using the premium version
|
|
275 |
|
276 |
== Upgrade Notice ==
|
277 |
|
278 |
-
= 2.0.
|
279 |
-
*
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R8Q85GT3Q8Q26
|
4 |
Tags: Facebook, facebook, Social Plugins, embed facebook, facebook video, facebook posts, facebook publication, facebook publications, facebook event, facebook events, facebook pages, facebook page, facebook profiles, facebook album, facebook albums, facebook photos, facebook photo, social,
|
5 |
Requires at least: 3.8.1
|
6 |
+
Tested up to: 4.5
|
7 |
+
Stable tag: 2.0.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
38 |
|
39 |
Alternatively you can use the [facebook] shortcode.
|
40 |
|
41 |
+
Read more about the shortcodes on [this](http://www.wpembedfb.com/shortcode-attributes-and-examples/) page.
|
42 |
|
43 |
= Premium extension =
|
44 |
* Embed full event shortcode
|
45 |
* Embed full fan page shortcode
|
46 |
* Embed events with address and admins
|
47 |
* Embed albums with more that 100 photos
|
48 |
+
* Embed all upcoming events of a fan page
|
49 |
* Features cooking
|
50 |
* Embed personal data
|
51 |
* Shortcode creator
|
52 |
* Special templates for albums and pages
|
53 |
+
|
54 |
|
55 |
== Installation ==
|
56 |
|
80 |
|
81 |
== Changelog ==
|
82 |
|
83 |
+
= 2.0.9 =
|
84 |
+
* Fixed css on footer when using different themes
|
85 |
+
* Updated all.js to sdk.js (bryant1410)
|
86 |
+
* Optimization for sites with no Facebook App
|
87 |
+
* Added error messages for special cases
|
88 |
+
* Added advanced option for selecting Facebook SDK version
|
89 |
+
* Fixed locale error inside editor
|
90 |
+
* Fixed link underline in some themes
|
91 |
+
* Fixed several css and html structure nothing critical
|
92 |
+
|
93 |
+
|
94 |
= 2.0.8 =
|
95 |
* Fix Event title css
|
96 |
|
287 |
|
288 |
== Upgrade Notice ==
|
289 |
|
290 |
+
= 2.0.9 =
|
291 |
+
* Lots of bug fixed and improvements
|
templates/classic/album.php
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
<div class="wef-classic" style="max-width: <?php echo $width ?>px">
|
2 |
<div class="row">
|
3 |
<div class="col-3 text-center">
|
4 |
-
<a href="https://facebook.com/<?php
|
|
|
5 |
<img src="https://graph.facebook.com/<?php echo $fb_data['from']['id'] ?>/picture" />
|
6 |
</a>
|
7 |
</div>
|
1 |
<div class="wef-classic" style="max-width: <?php echo $width ?>px">
|
2 |
<div class="row">
|
3 |
<div class="col-3 text-center">
|
4 |
+
<a href="https://facebook.com/<?php /** @noinspection PhpUndefinedVariableInspection */
|
5 |
+
echo $fb_data['from']['id'] ?>" target="_blank" rel="nofollow">
|
6 |
<img src="https://graph.facebook.com/<?php echo $fb_data['from']['id'] ?>/picture" />
|
7 |
</a>
|
8 |
</div>
|
templates/classic/classic.css
CHANGED
@@ -1,188 +1 @@
|
|
1 |
-
.wef-classic {
|
2 |
-
font: 300 14px/20px Helvetica;
|
3 |
-
padding: 10px;
|
4 |
-
display: inline-block;
|
5 |
-
border-width: 1px;
|
6 |
-
border-style: solid;
|
7 |
-
border-color: #23487f;
|
8 |
-
width: 100%;
|
9 |
-
background-color: white; }
|
10 |
-
.wef-classic .row {
|
11 |
-
margin-left: -10px;
|
12 |
-
margin-right: -10px;
|
13 |
-
display: table;
|
14 |
-
width: 100%; }
|
15 |
-
.wef-classic .col-1, .wef-classic .col-2, .wef-classic .col-3, .wef-classic .col-4, .wef-classic .col-5, .wef-classic .col-6, .wef-classic .col-7, .wef-classic .col-8, .wef-classic .col-9, .wef-classic .col-10, .wef-classic .col-11, .wef-classic .col-12 {
|
16 |
-
/* float: left */
|
17 |
-
position: relative;
|
18 |
-
min-height: 1px;
|
19 |
-
padding-left: 10px;
|
20 |
-
padding-right: 10px;
|
21 |
-
display: table-cell;
|
22 |
-
vertical-align: middle;
|
23 |
-
text-align: left; }
|
24 |
-
.wef-classic .col-12 {
|
25 |
-
width: 100%; }
|
26 |
-
.wef-classic .col-11 {
|
27 |
-
width: 91.66667%; }
|
28 |
-
.wef-classic .col-10 {
|
29 |
-
width: 83.33333%; }
|
30 |
-
.wef-classic .col-9 {
|
31 |
-
width: 75%; }
|
32 |
-
.wef-classic .col-8 {
|
33 |
-
width: 66.66667%; }
|
34 |
-
.wef-classic .col-7 {
|
35 |
-
width: 58.33333%; }
|
36 |
-
.wef-classic .col-6 {
|
37 |
-
width: 50%; }
|
38 |
-
.wef-classic .col-5 {
|
39 |
-
width: 41.66667%; }
|
40 |
-
.wef-classic .col-4 {
|
41 |
-
width: 33.33333%; }
|
42 |
-
.wef-classic .col-3 {
|
43 |
-
width: 25%; }
|
44 |
-
.wef-classic .col-2 {
|
45 |
-
width: 16.66667%; }
|
46 |
-
.wef-classic .col-1 {
|
47 |
-
width: 8.33333%; }
|
48 |
-
.wef-classic hr {
|
49 |
-
margin-top: 10px !important;
|
50 |
-
margin-bottom: 10px !important;
|
51 |
-
margin-left: 0 !important;
|
52 |
-
margin-right: 0 !important;
|
53 |
-
float: none !important;
|
54 |
-
border-top: 1px;
|
55 |
-
border-style: solid;
|
56 |
-
border-color: #23487f;
|
57 |
-
-moz-box-sizing: content-box;
|
58 |
-
-webkit-box-sizing: content-box;
|
59 |
-
box-sizing: content-box;
|
60 |
-
height: 0 !important;
|
61 |
-
width: 100% !important; }
|
62 |
-
.wef-classic img.icon {
|
63 |
-
float: right;
|
64 |
-
box-shadow: none;
|
65 |
-
margin: 0;
|
66 |
-
padding: 0;
|
67 |
-
display: block; }
|
68 |
-
.wef-classic img.thumbnail {
|
69 |
-
border: 1px solid gray;
|
70 |
-
border-radius: 2px;
|
71 |
-
height: 60px !important;
|
72 |
-
margin: 1px;
|
73 |
-
padding: 2px;
|
74 |
-
width: 60px !important; }
|
75 |
-
.wef-classic .album-thumbs {
|
76 |
-
line-height: 1px !important; }
|
77 |
-
.wef-classic a {
|
78 |
-
font: 300 14px/20px Helvetica;
|
79 |
-
color: #23487f !important;
|
80 |
-
text-decoration: none !important;
|
81 |
-
border: 0 !important;
|
82 |
-
margin: 0 !important;
|
83 |
-
padding: 0 !important; }
|
84 |
-
.wef-classic a:focus, .wef-classic a:hover {
|
85 |
-
color: #23487f;
|
86 |
-
text-decoration: underline !important; }
|
87 |
-
.wef-classic a.post-likes {
|
88 |
-
color: #6d84b4 !important;
|
89 |
-
font-size: 12px !important; }
|
90 |
-
.wef-classic a.road-trip {
|
91 |
-
width: 0 !important;
|
92 |
-
height: 0 !important; }
|
93 |
-
.wef-classic a img {
|
94 |
-
display: inline-block !important; }
|
95 |
-
.wef-classic p {
|
96 |
-
font: 300 14px/20px Helvetica;
|
97 |
-
padding: 0 !important;
|
98 |
-
margin: 0 !important; }
|
99 |
-
.wef-classic p.post-time {
|
100 |
-
font-style: italic;
|
101 |
-
color: #8e8c8d;
|
102 |
-
font-size: 12px; }
|
103 |
-
.wef-classic p.caption-title {
|
104 |
-
font-size: 12px;
|
105 |
-
font-weight: bold; }
|
106 |
-
.wef-classic p.caption-link {
|
107 |
-
text-align: right;
|
108 |
-
word-break: break-all; }
|
109 |
-
.wef-classic p.caption-link a {
|
110 |
-
font-size: 12px;
|
111 |
-
color: #8e8c8d !important;
|
112 |
-
text-transform: uppercase; }
|
113 |
-
.wef-classic iframe, .wef-classic embed, .wef-classic object, .wef-classic video, .wef-classic audio {
|
114 |
-
width: 100% !important;
|
115 |
-
border: 0 !important;
|
116 |
-
margin: 0 !important;
|
117 |
-
padding: 0 !important; }
|
118 |
-
.wef-classic .post-link {
|
119 |
-
border-width: 1px;
|
120 |
-
border-style: solid;
|
121 |
-
border-color: #d0d0d0; }
|
122 |
-
.wef-classic .post-link p {
|
123 |
-
padding-left: 10px !important;
|
124 |
-
padding-right: 10px !important; }
|
125 |
-
.wef-classic .text-center {
|
126 |
-
text-align: center; }
|
127 |
-
.wef-classic .pl-none {
|
128 |
-
padding-left: 0 !important;
|
129 |
-
word-break: break-all; }
|
130 |
-
.wef-classic .color {
|
131 |
-
color: #23487f; }
|
132 |
-
.wef-classic .bold {
|
133 |
-
font-weight: bold !important; }
|
134 |
-
.wef-classic .title {
|
135 |
-
font-size: 20px !important;
|
136 |
-
font-weight: bold !important;
|
137 |
-
word-break: break-all;
|
138 |
-
display: inherit !important;
|
139 |
-
height: 100% !important;
|
140 |
-
background-color: transparent !important;
|
141 |
-
padding-top: 5px !important; }
|
142 |
-
.wef-classic .cover {
|
143 |
-
width: 100%;
|
144 |
-
background-size: 100%;
|
145 |
-
cursor: pointer; }
|
146 |
-
.wef-classic .pad-top {
|
147 |
-
padding-top: 5px; }
|
148 |
-
.wef-classic .page-post {
|
149 |
-
left: 2.6% !important; }
|
150 |
-
.wef-classic .caption-description p {
|
151 |
-
color: #8e8c8d !important;
|
152 |
-
font-style: italic !important;
|
153 |
-
font-size: 12px !important; }
|
154 |
-
.wef-classic .video {
|
155 |
-
position: relative;
|
156 |
-
display: block;
|
157 |
-
height: 0;
|
158 |
-
padding: 0 0 56.25%;
|
159 |
-
overflow: hidden; }
|
160 |
-
.wef-classic .video iframe, .wef-classic .video embed, .wef-classic .video object, .wef-classic .video video {
|
161 |
-
position: absolute;
|
162 |
-
top: 0;
|
163 |
-
left: 0;
|
164 |
-
bottom: 0;
|
165 |
-
height: 100%;
|
166 |
-
width: 100%;
|
167 |
-
border: 0;
|
168 |
-
margin: 0;
|
169 |
-
padding: 0; }
|
170 |
-
.wef-classic .wef-measure {
|
171 |
-
width: 100%; }
|
172 |
-
.wef-classic .break-all {
|
173 |
-
word-break: break-all; }
|
174 |
-
.wef-classic .event_address {
|
175 |
-
color: #565656;
|
176 |
-
font-size: 12px; }
|
177 |
-
|
178 |
-
.wef-video-link {
|
179 |
-
margin: 0 !important;
|
180 |
-
padding: 0 !important; }
|
181 |
-
.wef-video-link a {
|
182 |
-
font: 300 14px/20px Helvetica;
|
183 |
-
color: #23487f !important;
|
184 |
-
text-decoration: none !important;
|
185 |
-
border: 0 !important;
|
186 |
-
margin: 0 !important;
|
187 |
-
padding: 0 !important;
|
188 |
-
box-shadow: none !important; }
|
1 |
+
.wef-classic{font:300 14px/20px Helvetica;padding:10px;display:inline-block;border-width:1px;border-style:solid;border-color:#23487f;width:100%;background-color:#fff}.wef-classic .row{margin-left:-10px;margin-right:-10px;display:table;width:100%}.wef-classic .col-1,.wef-classic .col-2,.wef-classic .col-3,.wef-classic .col-4,.wef-classic .col-5,.wef-classic .col-6,.wef-classic .col-7,.wef-classic .col-8,.wef-classic .col-9,.wef-classic .col-10,.wef-classic .col-11,.wef-classic .col-12{position:relative;min-height:1px;padding-left:10px;padding-right:10px;display:table-cell;vertical-align:middle;text-align:left}.wef-classic .col-12{width:100%}.wef-classic .col-11{width:91.66667%}.wef-classic .col-10{width:83.33333%}.wef-classic .col-9{width:75%}.wef-classic .col-8{width:66.66667%}.wef-classic .col-7{width:58.33333%}.wef-classic .col-6{width:50%}.wef-classic .col-5{width:41.66667%}.wef-classic .col-4{width:33.33333%}.wef-classic .col-3{width:25%}.wef-classic .col-2{width:16.66667%}.wef-classic .col-1{width:8.33333%}.wef-classic hr{margin-top:10px !important;margin-bottom:10px !important;margin-left:0 !important;margin-right:0 !important;float:none !important;border-top:1px;border-style:solid;border-color:#23487f;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;height:0 !important;width:100% !important}.wef-classic img.icon{float:right;box-shadow:none;margin:0;padding:0;display:block}.wef-classic img.thumbnail{border:1px solid gray;border-radius:2px;height:60px !important;margin:1px;padding:2px;width:60px !important}.wef-classic .album-thumbs{line-height:1px !important}.wef-classic a{font:300 14px/20px Helvetica;color:#23487f !important;text-decoration:none !important;border:0 !important;margin:0 !important;padding:0 !important;box-shadow:none !important}.wef-classic a:focus,.wef-classic a:hover{color:#23487f;text-decoration:underline !important}.wef-classic a.post-likes{color:#6d84b4 !important;font-size:12px !important}.wef-classic a.road-trip{width:0 !important;height:0 !important}.wef-classic a img{display:inline-block !important}.wef-classic p{font:300 14px/20px Helvetica;padding:0 !important;margin:0 !important}.wef-classic p.post-time{font-style:italic;color:#8e8c8d;font-size:12px}.wef-classic p.caption-title{font-size:12px;font-weight:bold}.wef-classic p.caption-link{text-align:right;word-break:break-all}.wef-classic p.caption-link a{font-size:12px;color:#8e8c8d !important;text-transform:uppercase}.wef-classic iframe,.wef-classic embed,.wef-classic object,.wef-classic video,.wef-classic audio{width:100% !important;border:0 !important;margin:0 !important;padding:0 !important}.wef-classic .post-link{border-width:1px;border-style:solid;border-color:#d0d0d0}.wef-classic .post-link p{padding-left:10px !important;padding-right:10px !important}.wef-classic .text-center{text-align:center}.wef-classic .pl-none{padding-left:0 !important;word-break:break-all}.wef-classic .color{color:#23487f}.wef-classic .bold{font-weight:bold !important}.wef-classic .title{font-size:20px !important;font-weight:bold !important;word-break:break-all;display:inherit !important;height:100% !important;background-color:transparent !important;padding-top:5px !important}.wef-classic .cover{width:100%;background-size:100%;cursor:pointer}.wef-classic .pad-top{padding-top:5px}.wef-classic .page-post{left:2.6% !important}.wef-classic .caption-description p{color:#8e8c8d !important;font-style:italic !important;font-size:12px !important}.wef-classic .video{position:relative;display:block;height:0;padding:0 0 56.25%;overflow:hidden}.wef-classic .video iframe,.wef-classic .video embed,.wef-classic .video object,.wef-classic .video video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0;margin:0;padding:0}.wef-classic .wef-measure{width:100%}.wef-classic .break-all{word-break:break-all}.wef-classic .event_address{color:#565656;font-size:12px}.wef-video-link{margin:0 !important;padding:0 !important}.wef-video-link a{font:300 14px/20px Helvetica;color:#23487f !important;text-decoration:none !important;border:0 !important;margin:0 !important;padding:0 !important;box-shadow:none !important}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/classic/classic.sass
CHANGED
@@ -87,6 +87,7 @@
|
|
87 |
border: 0 !important
|
88 |
margin: 0 !important
|
89 |
padding: 0 !important
|
|
|
90 |
&:focus, &:hover
|
91 |
color: #23487F
|
92 |
text-decoration: underline !important
|
87 |
border: 0 !important
|
88 |
margin: 0 !important
|
89 |
padding: 0 !important
|
90 |
+
box-shadow: none !important
|
91 |
&:focus, &:hover
|
92 |
color: #23487F
|
93 |
text-decoration: underline !important
|
templates/classic/com-page.php
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
<div class="wef-classic" style="max-width: <?php echo $width ?>px">
|
2 |
<div class="row">
|
3 |
<div class="col-3 text-center">
|
4 |
-
<a href="https://www.facebook.com/<?php
|
|
|
5 |
<img src="https://graph.facebook.com/<?php echo $fb_data['id'] ?>/picture" />
|
6 |
</a>
|
7 |
</div>
|
1 |
<div class="wef-classic" style="max-width: <?php echo $width ?>px">
|
2 |
<div class="row">
|
3 |
<div class="col-3 text-center">
|
4 |
+
<a href="https://www.facebook.com/<?php /** @noinspection PhpUndefinedVariableInspection */
|
5 |
+
echo $fb_data['id'] ?>" target="_blank" rel="nofollow">
|
6 |
<img src="https://graph.facebook.com/<?php echo $fb_data['id'] ?>/picture" />
|
7 |
</a>
|
8 |
</div>
|
templates/classic/event.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
$height = $width * $prop;
|
3 |
$start_time_format = 'l, j F Y g:i a';
|
4 |
$old_time_zone = date_default_timezone_get();
|
@@ -8,12 +9,13 @@ if(get_option('wpemfb_ev_local_tz') == 'true'){
|
|
8 |
$timezone = isset( $fb_data['timezone'] ) ? $fb_data['timezone'] : get_option( 'timezone_string' );
|
9 |
}
|
10 |
date_default_timezone_set( $timezone );
|
|
|
11 |
$start_time = date_i18n( $start_time_format, strtotime( $fb_data['start_time'] ) );
|
12 |
date_default_timezone_set( $old_time_zone );
|
13 |
?>
|
14 |
<div class="wef-classic wef-measure" style="max-width: <?php echo $width ?>px">
|
15 |
<?php if(isset($fb_data['cover'])) : ?>
|
16 |
-
<div class="cover" style="height:<?php echo $height ?>px; background
|
17 |
<?php endif; ?>
|
18 |
<div class="row pad-top">
|
19 |
<div class="col-12">
|
1 |
<?php
|
2 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
3 |
$height = $width * $prop;
|
4 |
$start_time_format = 'l, j F Y g:i a';
|
5 |
$old_time_zone = date_default_timezone_get();
|
9 |
$timezone = isset( $fb_data['timezone'] ) ? $fb_data['timezone'] : get_option( 'timezone_string' );
|
10 |
}
|
11 |
date_default_timezone_set( $timezone );
|
12 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
13 |
$start_time = date_i18n( $start_time_format, strtotime( $fb_data['start_time'] ) );
|
14 |
date_default_timezone_set( $old_time_zone );
|
15 |
?>
|
16 |
<div class="wef-classic wef-measure" style="max-width: <?php echo $width ?>px">
|
17 |
<?php if(isset($fb_data['cover'])) : ?>
|
18 |
+
<div class="cover" style="height:<?php echo $height ?>px; background: transparent url('<?php echo $fb_data['cover']['source'] ?>') no-repeat scroll 0 <?php echo $fb_data['cover']['offset_y'] ?>%;" onclick="window.open('https://www.facebook.com/<?php echo $fb_data['id'] ?>', '_blank')" ></div>
|
19 |
<?php endif; ?>
|
20 |
<div class="row pad-top">
|
21 |
<div class="col-12">
|
templates/classic/page.php
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
3 |
$show_posts = get_option("wpemfb_show_posts") == "true" ? true : false;
|
4 |
?>
|
5 |
<div class="wef-classic wef-measure" style="max-width: <?php echo $width ?>px" >
|
6 |
-
<div class="cover" style="height:<?php echo $height ?>px; background
|
|
|
7 |
<div class="row pad-top">
|
8 |
<div class="col-2 text-center">
|
9 |
<a href="<?php echo $fb_data['link'] ?>" target="_blank" rel="nofollow">
|
1 |
<?php
|
2 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
3 |
+
$height = round((($width - 21 ) * $prop),2);
|
4 |
$show_posts = get_option("wpemfb_show_posts") == "true" ? true : false;
|
5 |
?>
|
6 |
<div class="wef-classic wef-measure" style="max-width: <?php echo $width ?>px" >
|
7 |
+
<div class="cover" style="height:<?php echo $height ?>px; background: transparent url('<?php /** @noinspection PhpUndefinedVariableInspection */
|
8 |
+
echo $fb_data['cover']['source'] ?>') no-repeat scroll 0 <?php echo $fb_data['cover']['offset_y'] ?>%; " onclick="window.open('<?php echo $fb_data['link'] ?>', '_blank')" ></div>
|
9 |
<div class="row pad-top">
|
10 |
<div class="col-2 text-center">
|
11 |
<a href="<?php echo $fb_data['link'] ?>" target="_blank" rel="nofollow">
|
templates/classic/photo.php
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
<div class="wef-classic" style="max-width: <?php echo $width ?>px" >
|
2 |
-
<a href="<?php
|
|
|
3 |
<img src="<?php echo $fb_data['source'] ?>" width="100%" height="auto" >
|
4 |
</a>
|
5 |
<a class="post-link" href="<?php echo $fb_data['link'] ?> " target="_blank" rel="nofollow">
|
1 |
<div class="wef-classic" style="max-width: <?php echo $width ?>px" >
|
2 |
+
<a href="<?php /** @noinspection PhpUndefinedVariableInspection */
|
3 |
+
echo $fb_data['link'] ?>" target="_blank" rel="nofollow">
|
4 |
<img src="<?php echo $fb_data['source'] ?>" width="100%" height="auto" >
|
5 |
</a>
|
6 |
<a class="post-link" href="<?php echo $fb_data['link'] ?> " target="_blank" rel="nofollow">
|
templates/classic/post.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
-
<?php $fb_post =
|
|
|
2 |
<div class="wef-classic" style="max-width: <?php echo $width ?>px" >
|
3 |
<div class="col-3 text-center">
|
4 |
<a href="https://www.facebook.com/<?php echo $fb_post['from']['id'] ?>" target="_blank" rel="nofollow">
|
1 |
+
<?php $fb_post = /** @noinspection PhpUndefinedVariableInspection */
|
2 |
+
$fb_data ?>
|
3 |
<div class="wef-classic" style="max-width: <?php echo $width ?>px" >
|
4 |
<div class="col-3 text-center">
|
5 |
<a href="https://www.facebook.com/<?php echo $fb_post['from']['id'] ?>" target="_blank" rel="nofollow">
|
templates/classic/profile.php
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
<div class="wef-classic" style="max-width: <?php echo $width ?>px">
|
2 |
<div class="row">
|
3 |
<div class="col-3 text-center">
|
4 |
-
<a href="https://www.facebook.com/<?php
|
|
|
5 |
<img src="https://graph.facebook.com/<?php echo $fb_data['id'] ?>/picture" />
|
6 |
</a>
|
7 |
</div>
|
1 |
<div class="wef-classic" style="max-width: <?php echo $width ?>px">
|
2 |
<div class="row">
|
3 |
<div class="col-3 text-center">
|
4 |
+
<a href="https://www.facebook.com/<?php /** @noinspection PhpUndefinedVariableInspection */
|
5 |
+
echo $fb_data['id'] ?>" target="_blank" rel="nofollow">
|
6 |
<img src="https://graph.facebook.com/<?php echo $fb_data['id'] ?>/picture" />
|
7 |
</a>
|
8 |
</div>
|
templates/classic/social-plugin.php
CHANGED
@@ -2,17 +2,21 @@
|
|
2 |
<?php
|
3 |
switch($type){
|
4 |
case 'page' :
|
|
|
5 |
echo WEF_Social_Plugins::page_plugin('https://www.facebook.com/'.$fb_data['link'],$width);
|
6 |
break;
|
7 |
case 'video' :
|
8 |
if(get_option('wpemfb_video_as_post','false') == 'true')
|
|
|
9 |
echo WEF_Social_Plugins::embedded_post('https://www.facebook.com/'.$fb_data['link'],$width);
|
10 |
else
|
|
|
11 |
echo WEF_Social_Plugins::embedded_video('https://www.facebook.com/'.$fb_data['link'],$width);
|
12 |
break;
|
13 |
//case 'photo' :
|
14 |
//case 'post' :
|
15 |
default:
|
|
|
16 |
echo WEF_Social_Plugins::embedded_post('https://www.facebook.com/'.$fb_data['link'],$width);
|
17 |
break;
|
18 |
}
|
2 |
<?php
|
3 |
switch($type){
|
4 |
case 'page' :
|
5 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
6 |
echo WEF_Social_Plugins::page_plugin('https://www.facebook.com/'.$fb_data['link'],$width);
|
7 |
break;
|
8 |
case 'video' :
|
9 |
if(get_option('wpemfb_video_as_post','false') == 'true')
|
10 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
11 |
echo WEF_Social_Plugins::embedded_post('https://www.facebook.com/'.$fb_data['link'],$width);
|
12 |
else
|
13 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
14 |
echo WEF_Social_Plugins::embedded_video('https://www.facebook.com/'.$fb_data['link'],$width);
|
15 |
break;
|
16 |
//case 'photo' :
|
17 |
//case 'post' :
|
18 |
default:
|
19 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
20 |
echo WEF_Social_Plugins::embedded_post('https://www.facebook.com/'.$fb_data['link'],$width);
|
21 |
break;
|
22 |
}
|
templates/classic/video.php
CHANGED
@@ -4,6 +4,7 @@ $use_ratio = (get_option('wpemfb_video_ratio') == 'true');
|
|
4 |
<div class="wef-classic" style="max-width: <?php echo $width ?>px">
|
5 |
<?php echo $use_ratio ? '<div class="video">' : '' ?>
|
6 |
<?php
|
|
|
7 |
$url = $fb_data['source'];
|
8 |
$file_array = explode('/',parse_url($url, PHP_URL_PATH));
|
9 |
$file = end($file_array);
|
4 |
<div class="wef-classic" style="max-width: <?php echo $width ?>px">
|
5 |
<?php echo $use_ratio ? '<div class="video">' : '' ?>
|
6 |
<?php
|
7 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
8 |
$url = $fb_data['source'];
|
9 |
$file_array = explode('/',parse_url($url, PHP_URL_PATH));
|
10 |
$file = end($file_array);
|
templates/default/album.php
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
<div class="wef-default" style="max-width: <?php echo $width ?>px">
|
2 |
<div class="row">
|
3 |
<div class="col-3 text-center">
|
4 |
-
<a href="https://facebook.com/<?php
|
|
|
5 |
<img src="https://graph.facebook.com/<?php echo $fb_data['from']['id'] ?>/picture" />
|
6 |
</a>
|
7 |
</div>
|
@@ -24,7 +25,7 @@
|
|
24 |
foreach ($fb_data['photos']['data'] as $pic) {
|
25 |
$data_title = isset($pic['name']) ? $pic['name'] : $fb_data['from']['name'];
|
26 |
?>
|
27 |
-
<a
|
28 |
<img class="thumbnail" src="<?php echo $pic['picture'] ?>" />
|
29 |
</a>
|
30 |
<?php
|
1 |
<div class="wef-default" style="max-width: <?php echo $width ?>px">
|
2 |
<div class="row">
|
3 |
<div class="col-3 text-center">
|
4 |
+
<a href="https://facebook.com/<?php /** @noinspection PhpUndefinedVariableInspection */
|
5 |
+
echo $fb_data['from']['id'] ?>" target="_blank" rel="nofollow">
|
6 |
<img src="https://graph.facebook.com/<?php echo $fb_data['from']['id'] ?>/picture" />
|
7 |
</a>
|
8 |
</div>
|
25 |
foreach ($fb_data['photos']['data'] as $pic) {
|
26 |
$data_title = isset($pic['name']) ? $pic['name'] : $fb_data['from']['name'];
|
27 |
?>
|
28 |
+
<a href="<?php echo $pic['source'] ?>" data-lightbox="roadtrip" data-title="<?php echo esc_attr(wp_rel_nofollow(make_clickable($data_title))) ?>" >
|
29 |
<img class="thumbnail" src="<?php echo $pic['picture'] ?>" />
|
30 |
</a>
|
31 |
<?php
|
templates/default/com-page.php
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
<div class="wef-default" style="max-width: <?php echo $width ?>px">
|
2 |
<div class="row">
|
3 |
<div class="col-3 text-center">
|
4 |
-
<a href="https://www.facebook.com/<?php
|
|
|
5 |
<img src="https://graph.facebook.com/<?php echo $fb_data['id'] ?>/picture" />
|
6 |
</a>
|
7 |
</div>
|
1 |
<div class="wef-default" style="max-width: <?php echo $width ?>px">
|
2 |
<div class="row">
|
3 |
<div class="col-3 text-center">
|
4 |
+
<a href="https://www.facebook.com/<?php /** @noinspection PhpUndefinedVariableInspection */
|
5 |
+
echo $fb_data['id'] ?>" target="_blank" rel="nofollow">
|
6 |
<img src="https://graph.facebook.com/<?php echo $fb_data['id'] ?>/picture" />
|
7 |
</a>
|
8 |
</div>
|
templates/default/default.css
CHANGED
@@ -1,191 +1 @@
|
|
1 |
-
.wef-default {
|
2 |
-
font: 300 14px/20px Helvetica;
|
3 |
-
padding: 10px;
|
4 |
-
display: inline-block;
|
5 |
-
border-width: 1px;
|
6 |
-
border-style: solid;
|
7 |
-
border-color: #dedede;
|
8 |
-
border-radius: 2px;
|
9 |
-
width: 100%;
|
10 |
-
background-color: white; }
|
11 |
-
.wef-default .row {
|
12 |
-
margin-left: -10px;
|
13 |
-
margin-right: -10px;
|
14 |
-
display: table;
|
15 |
-
width: 100%; }
|
16 |
-
.wef-default .col-1, .wef-default .col-2, .wef-default .col-3, .wef-default .col-4, .wef-default .col-5, .wef-default .col-6, .wef-default .col-7, .wef-default .col-8, .wef-default .col-9, .wef-default .col-10, .wef-default .col-11, .wef-default .col-12 {
|
17 |
-
/* float: left */
|
18 |
-
position: relative;
|
19 |
-
min-height: 1px;
|
20 |
-
padding-left: 10px;
|
21 |
-
padding-right: 10px;
|
22 |
-
display: table-cell;
|
23 |
-
vertical-align: middle;
|
24 |
-
text-align: left; }
|
25 |
-
.wef-default .col-12 {
|
26 |
-
width: 100%; }
|
27 |
-
.wef-default .col-11 {
|
28 |
-
width: 91.66667%; }
|
29 |
-
.wef-default .col-10 {
|
30 |
-
width: 83.33333%; }
|
31 |
-
.wef-default .col-9 {
|
32 |
-
width: 75%; }
|
33 |
-
.wef-default .col-8 {
|
34 |
-
width: 66.66667%; }
|
35 |
-
.wef-default .col-7 {
|
36 |
-
width: 58.33333%; }
|
37 |
-
.wef-default .col-6 {
|
38 |
-
width: 50%; }
|
39 |
-
.wef-default .col-5 {
|
40 |
-
width: 41.66667%; }
|
41 |
-
.wef-default .col-4 {
|
42 |
-
width: 33.33333%; }
|
43 |
-
.wef-default .col-3 {
|
44 |
-
width: 25%; }
|
45 |
-
.wef-default .col-2 {
|
46 |
-
width: 16.66667%; }
|
47 |
-
.wef-default .col-1 {
|
48 |
-
width: 8.33333%; }
|
49 |
-
.wef-default hr {
|
50 |
-
margin-top: 10px !important;
|
51 |
-
margin-bottom: 10px !important;
|
52 |
-
margin-left: 0 !important;
|
53 |
-
margin-right: 0 !important;
|
54 |
-
float: none !important;
|
55 |
-
border-top: 1px;
|
56 |
-
border-style: solid;
|
57 |
-
border-color: #dedede;
|
58 |
-
-moz-box-sizing: content-box;
|
59 |
-
-webkit-box-sizing: content-box;
|
60 |
-
box-sizing: content-box;
|
61 |
-
height: 0 !important;
|
62 |
-
width: 100% !important; }
|
63 |
-
.wef-default img.icon {
|
64 |
-
float: right;
|
65 |
-
box-shadow: none;
|
66 |
-
margin: 0;
|
67 |
-
padding: 0;
|
68 |
-
display: block; }
|
69 |
-
.wef-default img.thumbnail {
|
70 |
-
border: 1px solid gray;
|
71 |
-
border-radius: 2px;
|
72 |
-
height: 60px !important;
|
73 |
-
margin: 1px;
|
74 |
-
padding: 2px;
|
75 |
-
width: 60px !important; }
|
76 |
-
.wef-default .album-thumbs {
|
77 |
-
line-height: 1px !important; }
|
78 |
-
.wef-default a {
|
79 |
-
font: 300 14px/20px Helvetica;
|
80 |
-
color: #23487f !important;
|
81 |
-
text-decoration: none !important;
|
82 |
-
border: 0 !important;
|
83 |
-
margin: 0 !important;
|
84 |
-
padding: 0 !important; }
|
85 |
-
.wef-default a:focus, .wef-default a:hover {
|
86 |
-
color: #23487f;
|
87 |
-
text-decoration: underline !important; }
|
88 |
-
.wef-default a.post-likes {
|
89 |
-
color: #6d84b4 !important;
|
90 |
-
font-size: 12px !important; }
|
91 |
-
.wef-default a.road-trip {
|
92 |
-
width: 0 !important;
|
93 |
-
height: 0 !important; }
|
94 |
-
.wef-default a img {
|
95 |
-
display: inline-block !important;
|
96 |
-
margin: 0;
|
97 |
-
padding: 0; }
|
98 |
-
.wef-default p {
|
99 |
-
font: 300 14px/20px Helvetica;
|
100 |
-
padding: 0 !important;
|
101 |
-
margin: 0 !important; }
|
102 |
-
.wef-default p.post-time {
|
103 |
-
font-style: italic;
|
104 |
-
color: #8e8c8d;
|
105 |
-
font-size: 12px; }
|
106 |
-
.wef-default p.caption-title {
|
107 |
-
font-size: 12px;
|
108 |
-
font-weight: bold; }
|
109 |
-
.wef-default p.caption-link {
|
110 |
-
text-align: right;
|
111 |
-
word-break: break-all; }
|
112 |
-
.wef-default p.caption-link a {
|
113 |
-
font-size: 12px;
|
114 |
-
color: #8e8c8d !important;
|
115 |
-
text-transform: uppercase; }
|
116 |
-
.wef-default iframe, .wef-default embed, .wef-default object, .wef-default video, .wef-default audio {
|
117 |
-
width: 100% !important;
|
118 |
-
border: 0 !important;
|
119 |
-
margin: 0 !important;
|
120 |
-
padding: 0 !important; }
|
121 |
-
.wef-default .post-link {
|
122 |
-
border-width: 1px;
|
123 |
-
border-style: solid;
|
124 |
-
border-color: #d0d0d0; }
|
125 |
-
.wef-default .post-link p {
|
126 |
-
padding-left: 10px !important;
|
127 |
-
padding-right: 10px !important; }
|
128 |
-
.wef-default .text-center {
|
129 |
-
text-align: center; }
|
130 |
-
.wef-default .pl-none {
|
131 |
-
padding-left: 0 !important;
|
132 |
-
word-break: break-all; }
|
133 |
-
.wef-default .color {
|
134 |
-
color: #23487f; }
|
135 |
-
.wef-default .bold {
|
136 |
-
font-weight: bold !important; }
|
137 |
-
.wef-default .title {
|
138 |
-
font-size: 20px !important;
|
139 |
-
font-weight: bold !important;
|
140 |
-
word-break: break-all;
|
141 |
-
display: inherit !important;
|
142 |
-
height: 100% !important;
|
143 |
-
background-color: transparent !important;
|
144 |
-
padding-top: 5px !important; }
|
145 |
-
.wef-default .cover {
|
146 |
-
width: 100%;
|
147 |
-
background-size: 100%;
|
148 |
-
cursor: pointer; }
|
149 |
-
.wef-default .pad-top {
|
150 |
-
padding-top: 5px; }
|
151 |
-
.wef-default .page-post {
|
152 |
-
left: 2.6% !important; }
|
153 |
-
.wef-default .caption-description p {
|
154 |
-
color: #8e8c8d !important;
|
155 |
-
font-style: italic !important;
|
156 |
-
font-size: 12px !important; }
|
157 |
-
.wef-default .video {
|
158 |
-
position: relative;
|
159 |
-
display: block;
|
160 |
-
height: 0;
|
161 |
-
padding: 0 0 56.25%;
|
162 |
-
overflow: hidden; }
|
163 |
-
.wef-default .video iframe, .wef-default .video embed, .wef-default .video object, .wef-default .video video {
|
164 |
-
position: absolute;
|
165 |
-
top: 0;
|
166 |
-
left: 0;
|
167 |
-
bottom: 0;
|
168 |
-
height: 100%;
|
169 |
-
width: 100%;
|
170 |
-
border: 0;
|
171 |
-
margin: 0;
|
172 |
-
padding: 0; }
|
173 |
-
.wef-default .wef-measure {
|
174 |
-
width: 100%; }
|
175 |
-
.wef-default .break-all {
|
176 |
-
word-break: break-all; }
|
177 |
-
.wef-default .event_address {
|
178 |
-
color: #565656;
|
179 |
-
font-size: 12px; }
|
180 |
-
|
181 |
-
.wef-video-link {
|
182 |
-
margin: 0 !important;
|
183 |
-
padding: 0 !important; }
|
184 |
-
.wef-video-link a {
|
185 |
-
font: 300 14px/20px Helvetica;
|
186 |
-
color: #23487f !important;
|
187 |
-
text-decoration: none !important;
|
188 |
-
border: 0 !important;
|
189 |
-
margin: 0 !important;
|
190 |
-
padding: 0 !important;
|
191 |
-
box-shadow: none !important; }
|
1 |
+
.wef-default{font:300 14px/20px Helvetica;padding:10px;display:inline-block;border-width:1px;border-style:solid;border-color:#dedede;border-radius:2px;width:100%;background-color:#fff}.wef-default .row{margin-left:-10px;margin-right:-10px;display:table;width:100%}.wef-default .col-1,.wef-default .col-2,.wef-default .col-3,.wef-default .col-4,.wef-default .col-5,.wef-default .col-6,.wef-default .col-7,.wef-default .col-8,.wef-default .col-9,.wef-default .col-10,.wef-default .col-11,.wef-default .col-12{position:relative;min-height:1px;padding-left:10px;padding-right:10px;display:table-cell;vertical-align:middle;text-align:left}.wef-default .col-12{width:100%}.wef-default .col-11{width:91.66667%}.wef-default .col-10{width:83.33333%}.wef-default .col-9{width:75%}.wef-default .col-8{width:66.66667%}.wef-default .col-7{width:58.33333%}.wef-default .col-6{width:50%}.wef-default .col-5{width:41.66667%}.wef-default .col-4{width:33.33333%}.wef-default .col-3{width:25%}.wef-default .col-2{width:16.66667%}.wef-default .col-1{width:8.33333%}.wef-default hr{margin-top:10px !important;margin-bottom:10px !important;margin-left:0 !important;margin-right:0 !important;float:none !important;border-top:1px;border-style:solid;border-color:#dedede;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;height:0 !important;width:100% !important}.wef-default img.icon{float:right;box-shadow:none;margin:0;padding:0;display:block}.wef-default img.thumbnail{border:1px solid gray;border-radius:2px;height:60px !important;margin:1px;padding:2px;width:60px !important}.wef-default .album-thumbs{line-height:1px !important}.wef-default a{font:300 14px/20px Helvetica;color:#23487f !important;text-decoration:none !important;border:0 !important;margin:0 !important;padding:0 !important;box-shadow:none !important}.wef-default a:focus,.wef-default a:hover{color:#23487f;text-decoration:underline !important}.wef-default a.post-likes{color:#6d84b4 !important;font-size:12px !important}.wef-default a.road-trip{width:0 !important;height:0 !important}.wef-default a img{display:inline-block !important;margin:0;padding:0}.wef-default p{font:300 14px/20px Helvetica;padding:0 !important;margin:0 !important}.wef-default p.post-time{font-style:italic;color:#8e8c8d;font-size:12px}.wef-default p.caption-title{font-size:12px;font-weight:bold}.wef-default p.caption-link{text-align:right;word-break:break-all}.wef-default p.caption-link a{font-size:12px;color:#8e8c8d !important;text-transform:uppercase}.wef-default iframe,.wef-default embed,.wef-default object,.wef-default video,.wef-default audio{width:100% !important;border:0 !important;margin:0 !important;padding:0 !important}.wef-default .post-link{border-width:1px;border-style:solid;border-color:#d0d0d0}.wef-default .post-link p{padding-left:10px !important;padding-right:10px !important}.wef-default .text-center{text-align:center}.wef-default .pl-none{padding-left:0 !important;word-break:break-all}.wef-default .color{color:#23487f}.wef-default .bold{font-weight:bold !important}.wef-default .title{font-size:20px !important;font-weight:bold !important;word-break:break-all;display:inherit !important;height:100% !important;background-color:transparent !important;padding-top:5px !important}.wef-default .cover{width:100%;background-size:100%;cursor:pointer}.wef-default .pad-top{padding-top:5px}.wef-default .page-post{left:2.6% !important}.wef-default .caption-description p{color:#8e8c8d !important;font-style:italic !important;font-size:12px !important}.wef-default .video{position:relative;display:block;height:0;padding:0 0 56.25%;overflow:hidden}.wef-default .video iframe,.wef-default .video embed,.wef-default .video object,.wef-default .video video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0;margin:0;padding:0}.wef-default .wef-measure{width:100%}.wef-default .break-all{word-break:break-all}.wef-default .event_address{color:#565656;font-size:12px}.wef-video-link{margin:0 !important;padding:0 !important}.wef-video-link a{font:300 14px/20px Helvetica;color:#23487f !important;text-decoration:none !important;border:0 !important;margin:0 !important;padding:0 !important;box-shadow:none !important}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/default/default.sass
CHANGED
@@ -88,6 +88,7 @@
|
|
88 |
border: 0 !important
|
89 |
margin: 0 !important
|
90 |
padding: 0 !important
|
|
|
91 |
&:focus, &:hover
|
92 |
color: #23487F
|
93 |
text-decoration: underline !important
|
88 |
border: 0 !important
|
89 |
margin: 0 !important
|
90 |
padding: 0 !important
|
91 |
+
box-shadow: none !important
|
92 |
&:focus, &:hover
|
93 |
color: #23487F
|
94 |
text-decoration: underline !important
|
templates/default/event.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
$height = $width * $prop;
|
3 |
$start_time_format = 'l, j F Y g:i a';
|
4 |
$old_time_zone = date_default_timezone_get();
|
@@ -8,12 +9,13 @@ if(get_option('wpemfb_ev_local_tz') == 'true'){
|
|
8 |
$timezone = isset( $fb_data['timezone'] ) ? $fb_data['timezone'] : get_option( 'timezone_string' );
|
9 |
}
|
10 |
date_default_timezone_set( $timezone );
|
|
|
11 |
$start_time = date_i18n( $start_time_format, strtotime( $fb_data['start_time'] ) );
|
12 |
date_default_timezone_set( $old_time_zone );
|
13 |
?>
|
14 |
<div class="wef-default wef-measure" style="max-width: <?php echo $width ?>px">
|
15 |
<?php if(isset($fb_data['cover'])) : ?>
|
16 |
-
<div class="cover" style="height:<?php echo $height ?>px; background
|
17 |
<?php endif; ?>
|
18 |
<div class="row pad-top">
|
19 |
<div class="col-12">
|
1 |
<?php
|
2 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
3 |
$height = $width * $prop;
|
4 |
$start_time_format = 'l, j F Y g:i a';
|
5 |
$old_time_zone = date_default_timezone_get();
|
9 |
$timezone = isset( $fb_data['timezone'] ) ? $fb_data['timezone'] : get_option( 'timezone_string' );
|
10 |
}
|
11 |
date_default_timezone_set( $timezone );
|
12 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
13 |
$start_time = date_i18n( $start_time_format, strtotime( $fb_data['start_time'] ) );
|
14 |
date_default_timezone_set( $old_time_zone );
|
15 |
?>
|
16 |
<div class="wef-default wef-measure" style="max-width: <?php echo $width ?>px">
|
17 |
<?php if(isset($fb_data['cover'])) : ?>
|
18 |
+
<div class="cover" style="height:<?php echo $height ?>px; background: transparent url('<?php echo $fb_data['cover']['source'] ?>') no-repeat scroll 0 <?php echo $fb_data['cover']['offset_y'] ?>%; " onclick="window.open('https://www.facebook.com/<?php echo $fb_data['id'] ?>', '_blank')" ></div>
|
19 |
<?php endif; ?>
|
20 |
<div class="row pad-top">
|
21 |
<div class="col-12">
|
templates/default/page.php
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
3 |
$show_posts = get_option("wpemfb_show_posts") == "true" ? true : false;
|
4 |
?>
|
5 |
<div class="wef-default wef-measure" style="max-width: <?php echo $width ?>px" >
|
6 |
<?php if(isset($fb_data['cover'])) : ?>
|
7 |
-
<div class="cover" style="height:<?php echo $height ?>px; background
|
8 |
<?php endif; ?>
|
9 |
<div class="row pad-top">
|
10 |
<div class="col-2 text-center">
|
1 |
<?php
|
2 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
3 |
+
$height = round((($width - 21 ) * $prop),2);
|
4 |
$show_posts = get_option("wpemfb_show_posts") == "true" ? true : false;
|
5 |
?>
|
6 |
<div class="wef-default wef-measure" style="max-width: <?php echo $width ?>px" >
|
7 |
<?php if(isset($fb_data['cover'])) : ?>
|
8 |
+
<div class="cover" style="height:<?php echo $height ?>px; background: transparent url('<?php echo $fb_data['cover']['source'] ?>') no-repeat scroll 0 <?php echo $fb_data['cover']['offset_y'] ?>%;" onclick="window.open('<?php echo $fb_data['link'] ?>', '_blank')" ></div>
|
9 |
<?php endif; ?>
|
10 |
<div class="row pad-top">
|
11 |
<div class="col-2 text-center">
|
templates/default/photo.php
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
<div class="wef-default" style="max-width: <?php echo $width ?>px" >
|
2 |
-
<a href="<?php
|
|
|
3 |
<img src="<?php echo $fb_data['source'] ?>" width="100%" height="auto" >
|
4 |
</a>
|
5 |
<a class="post-link" href="<?php echo $fb_data['link'] ?> " target="_blank" rel="nofollow">
|
1 |
<div class="wef-default" style="max-width: <?php echo $width ?>px" >
|
2 |
+
<a href="<?php /** @noinspection PhpUndefinedVariableInspection */
|
3 |
+
echo $fb_data['link'] ?>" target="_blank" rel="nofollow">
|
4 |
<img src="<?php echo $fb_data['source'] ?>" width="100%" height="auto" >
|
5 |
</a>
|
6 |
<a class="post-link" href="<?php echo $fb_data['link'] ?> " target="_blank" rel="nofollow">
|
templates/default/post.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
-
<?php $fb_post =
|
|
|
2 |
<div class="wef-default" style="max-width: <?php echo $width ?>px" >
|
3 |
<div class="col-3 text-center">
|
4 |
<a href="https://www.facebook.com/<?php echo $fb_post['from']['id'] ?>" target="_blank" rel="nofollow">
|
1 |
+
<?php $fb_post = /** @noinspection PhpUndefinedVariableInspection */
|
2 |
+
$fb_data ?>
|
3 |
<div class="wef-default" style="max-width: <?php echo $width ?>px" >
|
4 |
<div class="col-3 text-center">
|
5 |
<a href="https://www.facebook.com/<?php echo $fb_post['from']['id'] ?>" target="_blank" rel="nofollow">
|
templates/default/profile.php
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
<div class="wef-default" style="max-width: <?php echo $width ?>px">
|
2 |
<div class="row">
|
3 |
<div class="col-3 text-center">
|
4 |
-
<a href="https://www.facebook.com/<?php
|
|
|
5 |
<img src="https://graph.facebook.com/<?php echo $fb_data['id'] ?>/picture" />
|
6 |
</a>
|
7 |
</div>
|
1 |
<div class="wef-default" style="max-width: <?php echo $width ?>px">
|
2 |
<div class="row">
|
3 |
<div class="col-3 text-center">
|
4 |
+
<a href="https://www.facebook.com/<?php /** @noinspection PhpUndefinedVariableInspection */
|
5 |
+
echo $fb_data['id'] ?>" target="_blank" rel="nofollow">
|
6 |
<img src="https://graph.facebook.com/<?php echo $fb_data['id'] ?>/picture" />
|
7 |
</a>
|
8 |
</div>
|
templates/default/social-plugin.php
CHANGED
@@ -2,15 +2,18 @@
|
|
2 |
<?php
|
3 |
switch($type){
|
4 |
case 'page' :
|
|
|
5 |
echo WEF_Social_Plugins::page_plugin('https://www.facebook.com/'.$fb_data['link'],$width);
|
6 |
break;
|
7 |
case 'video' :
|
8 |
if(get_option('wpemfb_video_as_post','false') == 'true')
|
|
|
9 |
echo WEF_Social_Plugins::embedded_post('https://www.facebook.com/'.$fb_data['link'],$width);
|
10 |
else{
|
|
|
11 |
echo WEF_Social_Plugins::embedded_video('https://www.facebook.com/'.$fb_data['link'],$width);
|
12 |
if( get_option('wpemfb_video_download','false') == 'true' ){
|
13 |
-
echo '<p class="wef-video-link"><a
|
14 |
}
|
15 |
}
|
16 |
|
@@ -18,6 +21,7 @@ switch($type){
|
|
18 |
//case 'photo' :
|
19 |
//case 'post' :
|
20 |
default:
|
|
|
21 |
echo WEF_Social_Plugins::embedded_post('https://www.facebook.com/'.$fb_data['link'],$width);
|
22 |
break;
|
23 |
}
|
2 |
<?php
|
3 |
switch($type){
|
4 |
case 'page' :
|
5 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
6 |
echo WEF_Social_Plugins::page_plugin('https://www.facebook.com/'.$fb_data['link'],$width);
|
7 |
break;
|
8 |
case 'video' :
|
9 |
if(get_option('wpemfb_video_as_post','false') == 'true')
|
10 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
11 |
echo WEF_Social_Plugins::embedded_post('https://www.facebook.com/'.$fb_data['link'],$width);
|
12 |
else{
|
13 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
14 |
echo WEF_Social_Plugins::embedded_video('https://www.facebook.com/'.$fb_data['link'],$width);
|
15 |
if( get_option('wpemfb_video_download','false') == 'true' ){
|
16 |
+
echo '<p class="wef-video-link"><a title="Download this video" href="http://www.freemake.com/free_video_downloader/">'.__('Download this video','wp-embed-facebook').'</a></p>';
|
17 |
}
|
18 |
}
|
19 |
|
21 |
//case 'photo' :
|
22 |
//case 'post' :
|
23 |
default:
|
24 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
25 |
echo WEF_Social_Plugins::embedded_post('https://www.facebook.com/'.$fb_data['link'],$width);
|
26 |
break;
|
27 |
}
|
templates/default/video.php
CHANGED
@@ -4,6 +4,7 @@ $use_ratio = (get_option('wpemfb_video_ratio') == 'true');
|
|
4 |
<div class="wef-default" style="max-width: <?php echo $width ?>px">
|
5 |
<?php echo $use_ratio ? '<div class="video">' : '' ?>
|
6 |
<?php
|
|
|
7 |
$url = $fb_data['source'];
|
8 |
$file_array = explode('/',parse_url($url, PHP_URL_PATH));
|
9 |
$file = end($file_array);
|
4 |
<div class="wef-default" style="max-width: <?php echo $width ?>px">
|
5 |
<?php echo $use_ratio ? '<div class="video">' : '' ?>
|
6 |
<?php
|
7 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
8 |
$url = $fb_data['source'];
|
9 |
$file_array = explode('/',parse_url($url, PHP_URL_PATH));
|
10 |
$file = end($file_array);
|
wp-embed-facebook.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Embed Facebook
|
|
4 |
Plugin URI: http://www.wpembedfb.com
|
5 |
Description: Embed any public Facebook video, photo, album, event, page, profile, or post. Copy the facebook url to a single line on your post, or use shortcode [facebook url ] more information at <a href="http://www.wpembedfb.com" title="plugin website">www.wpembedfb.com</a>
|
6 |
Author: Miguel Sirvent
|
7 |
-
Version: 2.0.
|
8 |
Author URI: http://www.wpembedfb.com
|
9 |
Text Domain: wp-embed-facebook
|
10 |
Domain Path: /lang
|
@@ -15,8 +15,11 @@ require_once('lib/class-wp-embed-fb-plugin.php');
|
|
15 |
require_once('lib/class-wef-social-plugins.php');
|
16 |
require_once('lib/class-wp-embed-fb.php');
|
17 |
|
18 |
-
|
|
|
|
|
19 |
add_action('plugins_loaded',array('WP_Embed_FB_Plugin','plugins_loaded'));
|
|
|
20 |
add_action('admin_notices',array('WP_Embed_FB_Plugin','admin_notices'));
|
21 |
add_action('wp_ajax_wpemfb_close_warning',array('WP_Embed_FB_Plugin','wpemfb_close_warning'));
|
22 |
add_action('wp_ajax_wpemfb_video_down',array('WP_Embed_FB_Plugin','wpemfb_video_down'));
|
@@ -27,8 +30,8 @@ register_deactivation_hook(__FILE__, array('WP_Embed_FB_Plugin', 'deactivate'));
|
|
27 |
|
28 |
add_action('wp_enqueue_scripts', array('WP_Embed_FB_Plugin', 'wp_enqueue_scripts') );
|
29 |
|
30 |
-
if( get_option('wpemfb_fb_root') === 'true' )
|
31 |
-
add_filter('the_content', array('
|
32 |
|
33 |
add_shortcode('facebook', array('WP_Embed_FB','shortcode') );
|
34 |
|
4 |
Plugin URI: http://www.wpembedfb.com
|
5 |
Description: Embed any public Facebook video, photo, album, event, page, profile, or post. Copy the facebook url to a single line on your post, or use shortcode [facebook url ] more information at <a href="http://www.wpembedfb.com" title="plugin website">www.wpembedfb.com</a>
|
6 |
Author: Miguel Sirvent
|
7 |
+
Version: 2.0.9
|
8 |
Author URI: http://www.wpembedfb.com
|
9 |
Text Domain: wp-embed-facebook
|
10 |
Domain Path: /lang
|
15 |
require_once('lib/class-wef-social-plugins.php');
|
16 |
require_once('lib/class-wp-embed-fb.php');
|
17 |
|
18 |
+
//Session start when there is a facebook app
|
19 |
+
add_action('init',array('WP_Embed_FB_Plugin','init'),999);
|
20 |
+
//Translation string
|
21 |
add_action('plugins_loaded',array('WP_Embed_FB_Plugin','plugins_loaded'));
|
22 |
+
//Donate or review notice
|
23 |
add_action('admin_notices',array('WP_Embed_FB_Plugin','admin_notices'));
|
24 |
add_action('wp_ajax_wpemfb_close_warning',array('WP_Embed_FB_Plugin','wpemfb_close_warning'));
|
25 |
add_action('wp_ajax_wpemfb_video_down',array('WP_Embed_FB_Plugin','wpemfb_video_down'));
|
30 |
|
31 |
add_action('wp_enqueue_scripts', array('WP_Embed_FB_Plugin', 'wp_enqueue_scripts') );
|
32 |
|
33 |
+
if( get_option('wpemfb_fb_root','true') === 'true' )
|
34 |
+
add_filter('the_content', array('WP_Embed_FB','fb_root'),10,1);
|
35 |
|
36 |
add_shortcode('facebook', array('WP_Embed_FB','shortcode') );
|
37 |
|