Version Description
- Fix for expiring token issue
- Fix missing icons
- Fix for empty() array check
- Fix for setup limbo
Download this release
Release Info
Developer | philipjohn |
Plugin | Instant Articles for WP |
Version | 3.1.3 |
Comparing to | |
See all releases |
Code changes from version 3.1.2 to 3.1.3
- css/instant-articles-wizard.css +2 -2
- facebook-instant-articles.php +1 -1
- readme.txt +7 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +4 -4
- vendor/composer/installed.json +6 -6
- vendor/symfony/css-selector/XPath/Translator.php +0 -3
- wizard/class-instant-articles-wizard-state.php +8 -3
- wizard/class-instant-articles-wizard.php +12 -0
- wizard/templates/page-selection-template.php +1 -1
- wizard/templates/wizard-template.php +1 -1
css/instant-articles-wizard.css
CHANGED
@@ -190,7 +190,7 @@
|
|
190 |
color: #373b42;
|
191 |
}
|
192 |
.instant-articles-card-title-edit {
|
193 |
-
background: url('
|
194 |
background-size: 13px 13px;
|
195 |
background-repeat: no-repeat;
|
196 |
width: 15px;
|
@@ -335,7 +335,7 @@ a.instant-articles-button {
|
|
335 |
outline: none;
|
336 |
}
|
337 |
.instant-articles-button-icon-facebook {
|
338 |
-
background: url('
|
339 |
background-size: 18px 18px;
|
340 |
background-repeat: no-repeat;
|
341 |
display: inline-block;
|
190 |
color: #373b42;
|
191 |
}
|
192 |
.instant-articles-card-title-edit {
|
193 |
+
background: url('../assets/pencil.png');
|
194 |
background-size: 13px 13px;
|
195 |
background-repeat: no-repeat;
|
196 |
width: 15px;
|
335 |
outline: none;
|
336 |
}
|
337 |
.instant-articles-button-icon-facebook {
|
338 |
+
background: url('../assets/icon-fb-login.png');
|
339 |
background-size: 18px 18px;
|
340 |
background-repeat: no-repeat;
|
341 |
display: inline-block;
|
facebook-instant-articles.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Description: Add support for Instant Articles for Facebook to your WordPress site.
|
5 |
* Author: Automattic, Dekode, Facebook
|
6 |
* Author URI: https://vip.wordpress.com/plugins/instant-articles/
|
7 |
-
* Version: 3.1.
|
8 |
* Text Domain: instant-articles
|
9 |
* License: GPLv2
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
4 |
* Description: Add support for Instant Articles for Facebook to your WordPress site.
|
5 |
* Author: Automattic, Dekode, Facebook
|
6 |
* Author URI: https://vip.wordpress.com/plugins/instant-articles/
|
7 |
+
* Version: 3.1.3
|
8 |
* Text Domain: instant-articles
|
9 |
* License: GPLv2
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: trrine, olethomas, bjornjohansen, dekode, automattic, facebook
|
|
3 |
Tags: instant articles, facebook, mobile
|
4 |
Requires at least: 4.3
|
5 |
Tested up to: 4.6
|
6 |
-
Stable tag: 3.1.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -85,6 +85,12 @@ Usually simply visiting the permalinks settings page in the WordPress dashboard
|
|
85 |
|
86 |
== Changelog ==
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
= 3.1 =
|
89 |
* New on-boarding flow wizard
|
90 |
* Automattic URL claiming
|
3 |
Tags: instant articles, facebook, mobile
|
4 |
Requires at least: 4.3
|
5 |
Tested up to: 4.6
|
6 |
+
Stable tag: 3.1.3
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
85 |
|
86 |
== Changelog ==
|
87 |
|
88 |
+
= 3.1.3 =
|
89 |
+
* Fix for expiring token issue
|
90 |
+
* Fix missing icons
|
91 |
+
* Fix for empty() array check
|
92 |
+
* Fix for setup limbo
|
93 |
+
|
94 |
= 3.1 =
|
95 |
* New on-boarding flow wizard
|
96 |
* Automattic URL claiming
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit337744729a91b1fdea5f68820e3d1dfe::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit84d77f682115366106947dee11e898d3
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit84d77f682115366106947dee11e898d3
|
|
48 |
$loader->register(true);
|
49 |
|
50 |
if ($useStaticLoader) {
|
51 |
-
$includeFiles = Composer\Autoload\
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
-
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
-
function
|
64 |
{
|
65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit337744729a91b1fdea5f68820e3d1dfe
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit337744729a91b1fdea5f68820e3d1dfe', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit337744729a91b1fdea5f68820e3d1dfe', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit337744729a91b1fdea5f68820e3d1dfe::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
48 |
$loader->register(true);
|
49 |
|
50 |
if ($useStaticLoader) {
|
51 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit337744729a91b1fdea5f68820e3d1dfe::$files;
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
+
composerRequire337744729a91b1fdea5f68820e3d1dfe($fileIdentifier, $file);
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
+
function composerRequire337744729a91b1fdea5f68820e3d1dfe($fileIdentifier, $file)
|
64 |
{
|
65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'7e702cccdb9dd904f2ccf22e5f37abae' => __DIR__ . '/..' . '/facebook/php-sdk-v4/src/Facebook/polyfills.php',
|
@@ -122,9 +122,9 @@ class ComposerStaticInit84d77f682115366106947dee11e898d3
|
|
122 |
public static function getInitializer(ClassLoader $loader)
|
123 |
{
|
124 |
return \Closure::bind(function () use ($loader) {
|
125 |
-
$loader->prefixLengthsPsr4 =
|
126 |
-
$loader->prefixDirsPsr4 =
|
127 |
-
$loader->classMap =
|
128 |
|
129 |
}, null, ClassLoader::class);
|
130 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit337744729a91b1fdea5f68820e3d1dfe
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'7e702cccdb9dd904f2ccf22e5f37abae' => __DIR__ . '/..' . '/facebook/php-sdk-v4/src/Facebook/polyfills.php',
|
122 |
public static function getInitializer(ClassLoader $loader)
|
123 |
{
|
124 |
return \Closure::bind(function () use ($loader) {
|
125 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit337744729a91b1fdea5f68820e3d1dfe::$prefixLengthsPsr4;
|
126 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit337744729a91b1fdea5f68820e3d1dfe::$prefixDirsPsr4;
|
127 |
+
$loader->classMap = ComposerStaticInit337744729a91b1fdea5f68820e3d1dfe::$classMap;
|
128 |
|
129 |
}, null, ClassLoader::class);
|
130 |
}
|
vendor/composer/installed.json
CHANGED
@@ -93,23 +93,23 @@
|
|
93 |
},
|
94 |
{
|
95 |
"name": "symfony/css-selector",
|
96 |
-
"version": "v2.8.
|
97 |
-
"version_normalized": "2.8.
|
98 |
"source": {
|
99 |
"type": "git",
|
100 |
"url": "https://github.com/symfony/css-selector.git",
|
101 |
-
"reference": "
|
102 |
},
|
103 |
"dist": {
|
104 |
"type": "zip",
|
105 |
-
"url": "https://api.github.com/repos/symfony/css-selector/zipball/
|
106 |
-
"reference": "
|
107 |
"shasum": ""
|
108 |
},
|
109 |
"require": {
|
110 |
"php": ">=5.3.9"
|
111 |
},
|
112 |
-
"time": "2016-06
|
113 |
"type": "library",
|
114 |
"extra": {
|
115 |
"branch-alias": {
|
93 |
},
|
94 |
{
|
95 |
"name": "symfony/css-selector",
|
96 |
+
"version": "v2.8.11",
|
97 |
+
"version_normalized": "2.8.11.0",
|
98 |
"source": {
|
99 |
"type": "git",
|
100 |
"url": "https://github.com/symfony/css-selector.git",
|
101 |
+
"reference": "71c8c3a04c126300c37089b1baa7c6322dfb845f"
|
102 |
},
|
103 |
"dist": {
|
104 |
"type": "zip",
|
105 |
+
"url": "https://api.github.com/repos/symfony/css-selector/zipball/71c8c3a04c126300c37089b1baa7c6322dfb845f",
|
106 |
+
"reference": "71c8c3a04c126300c37089b1baa7c6322dfb845f",
|
107 |
"shasum": ""
|
108 |
},
|
109 |
"require": {
|
110 |
"php": ">=5.3.9"
|
111 |
},
|
112 |
+
"time": "2016-09-06 10:55:00",
|
113 |
"type": "library",
|
114 |
"extra": {
|
115 |
"branch-alias": {
|
vendor/symfony/css-selector/XPath/Translator.php
CHANGED
@@ -70,9 +70,6 @@ class Translator implements TranslatorInterface
|
|
70 |
*/
|
71 |
private $attributeMatchingTranslators = array();
|
72 |
|
73 |
-
/**
|
74 |
-
* Constructor.
|
75 |
-
*/
|
76 |
public function __construct(ParserInterface $parser = null)
|
77 |
{
|
78 |
$this->mainParser = $parser ?: new Parser();
|
70 |
*/
|
71 |
private $attributeMatchingTranslators = array();
|
72 |
|
|
|
|
|
|
|
73 |
public function __construct(ParserInterface $parser = null)
|
74 |
{
|
75 |
$this->mainParser = $parser ?: new Parser();
|
wizard/class-instant-articles-wizard-state.php
CHANGED
@@ -242,7 +242,7 @@ class Instant_Articles_Wizard_State {
|
|
242 |
} catch (Exception $e) {
|
243 |
// Here we override the error message to give an actionable
|
244 |
// instruction to the user that is specific for WordPress.
|
245 |
-
throw new Exception("Could not claim the URL for
|
246 |
}
|
247 |
}
|
248 |
|
@@ -301,10 +301,15 @@ class Instant_Articles_Wizard_State {
|
|
301 |
|
302 |
Instant_Articles_Option_FB_Page::update_option( $pages[ $page_id ] );
|
303 |
|
|
|
|
|
|
|
304 |
// You should always claim the URL after updating the FB Page option so the fb:pages meta tag is rendered.
|
305 |
-
|
|
|
|
|
306 |
|
307 |
-
return
|
308 |
}
|
309 |
|
310 |
/**
|
242 |
} catch (Exception $e) {
|
243 |
// Here we override the error message to give an actionable
|
244 |
// instruction to the user that is specific for WordPress.
|
245 |
+
throw new Exception("Could not automatically claim the URL for this site, please claim it manually on your Page's Publishing Tools.");
|
246 |
}
|
247 |
}
|
248 |
|
301 |
|
302 |
Instant_Articles_Option_FB_Page::update_option( $pages[ $page_id ] );
|
303 |
|
304 |
+
// Update the option before claiming the URL.
|
305 |
+
$success = update_option( 'instant-articles-current-state', self::STATE_STYLE_SELECTION );
|
306 |
+
|
307 |
// You should always claim the URL after updating the FB Page option so the fb:pages meta tag is rendered.
|
308 |
+
if ( $success ) {
|
309 |
+
self::claim_url();
|
310 |
+
}
|
311 |
|
312 |
+
return $success;
|
313 |
}
|
314 |
|
315 |
/**
|
wizard/class-instant-articles-wizard.php
CHANGED
@@ -263,6 +263,18 @@ class Instant_Articles_Wizard {
|
|
263 |
}
|
264 |
// ----------------------------------
|
265 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
|
267 |
// Grabs the current configured style
|
268 |
// ----------------------------------
|
263 |
}
|
264 |
// ----------------------------------
|
265 |
|
266 |
+
// Handle redirection from Login flow
|
267 |
+
// ----------------------------------
|
268 |
+
// Only during STATE_PAGE_SELECTION
|
269 |
+
if ( $current_state === Instant_Articles_Wizard_State::STATE_PAGE_SELECTION ) {
|
270 |
+
$fb_helper = new Instant_Articles_Wizard_FB_Helper();
|
271 |
+
try {
|
272 |
+
$pages = $fb_helper->get_pages();
|
273 |
+
} catch ( Facebook\Exceptions\FacebookSDKException $e ) {
|
274 |
+
// If we couldn't fetch the pages, revert to the App setup
|
275 |
+
Instant_Articles_Wizard_State::do_transition( Instant_Articles_Wizard_State::STATE_APP_SETUP );
|
276 |
+
}
|
277 |
+
}
|
278 |
|
279 |
// Grabs the current configured style
|
280 |
// ----------------------------------
|
wizard/templates/page-selection-template.php
CHANGED
@@ -32,7 +32,7 @@
|
|
32 |
<strong><a href="https://www.facebook.com/pages/create" target="_blank">Create one</a>.</strong>
|
33 |
</p>
|
34 |
<ul class="instant-articles-wizard-page-selection">
|
35 |
-
<?php foreach ( $
|
36 |
<li>
|
37 |
<input
|
38 |
type="radio"
|
32 |
<strong><a href="https://www.facebook.com/pages/create" target="_blank">Create one</a>.</strong>
|
33 |
</p>
|
34 |
<ul class="instant-articles-wizard-page-selection">
|
35 |
+
<?php foreach ( $pages as $page ) { ?>
|
36 |
<li>
|
37 |
<input
|
38 |
type="radio"
|
wizard/templates/wizard-template.php
CHANGED
@@ -98,7 +98,7 @@
|
|
98 |
|
99 |
<?php if ( ! $ajax ) : ?>
|
100 |
</div>
|
101 |
-
<?php if (
|
102 |
<a class="instant-articles-advanced-settings instant-articles-wizard-toggle" href="#">▼ Advanced Settings</a>
|
103 |
<div class="instant-articles-wizard-advanced-settings-box" style="display: block;">
|
104 |
<?php include( dirname( __FILE__ ) . '/advanced-template.php' ); ?>
|
98 |
|
99 |
<?php if ( ! $ajax ) : ?>
|
100 |
</div>
|
101 |
+
<?php if ( count( get_settings_errors() ) !== 0 ) : ?>
|
102 |
<a class="instant-articles-advanced-settings instant-articles-wizard-toggle" href="#">▼ Advanced Settings</a>
|
103 |
<div class="instant-articles-wizard-advanced-settings-box" style="display: block;">
|
104 |
<?php include( dirname( __FILE__ ) . '/advanced-template.php' ); ?>
|