v 1.1
Peter Molnar hello@petermolnar.eu
Tue, 26 May 2015 10:33:08 +0100
2 files changed,
15 insertions(+),
7 deletions(-)
M
keyring-reactions-importer.php
→
keyring-reactions-importer.php
@@ -3,7 +3,7 @@ /*
Plugin Name: Keyring Reactions Importer Plugin URI: https://github.com/petermolnar/keyring-reactions-importer Description: A recations (comments, favs, etc. ) importer based on Keyring -Version: 1.0 +Version: 1.1 Author: Peter Molnar <hello@petermolnar.eu> Author URI: http://petermolnar.eu/ License: GPLv3@@ -98,8 +98,8 @@
// Add a Keyring handler to push us to the next step of the importer once connected add_action( 'keyring_connection_verified', array( &$this, 'verified_connection' ), 10, 2 ); - add_action( 'add_meta_boxes', array(&$this, 'add_post_meta_box' )); - add_action( 'save_post', array(&$this, 'handle_post_meta_box' ) ); + //add_action( 'add_meta_boxes', array(&$this, 'add_post_meta_box' )); + //add_action( 'save_post', array(&$this, 'handle_post_meta_box' ) ); // additional comment types add_action('admin_comment_types_dropdown', array(&$this, 'comment_types_dropdown'));@@ -790,10 +790,11 @@ }
function display_post_meta_box() { wp_nonce_field( basename( __FILE__ ), static::SILONAME ); + global $post; ?> <p> <?php - printf ( '<input style="margin-right: 1em;" class="button button-primary " "id="import-%s" name="import-%s" type="submit" value="Import"></input>', static::SLUG, static::SLUG, static::SLUG, static::SLUG ); + printf ( '<input style="margin-right: 1em;" class="button button-primary " "id="import-%s" name="import-%s" type="submit" value="Import for #%s"></input>', static::SLUG, static::SLUG, $post->ID ); printf ('<label for="import-%s">%s</label><br />', static::SLUG, sprintf(__('Manually import reactions from %s for this post now'), static::SILONAME )); ?> </p>@@ -816,8 +817,9 @@ if ( ! current_user_can( 'edit_page', $post_id ) )
return $post_id; if (isset( $_POST['import-' . static::SLUG ] )) { - die ('eddig ok'); - $this->do_single_import( $post_id ); + $id = split('#', $_POST['import-' . static::SLUG ]); + $id = $id[1]; + $this->do_single_import( $id ); } }
M
readme.txt
→
readme.txt
@@ -3,7 +3,7 @@ Contributors: cadeyrn
Tags: instagram, facebook, flickr, 500px, backfeed, indieweb, comments, likes, favorites Requires at least: 3.0 Tested up to: 4.2.1 -Stable tag: 1.0 +Stable tag: 1.1 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html@@ -52,6 +52,12 @@ 3. Activate the desired importer.
4. Make sure WP-Cron is not disabled fully in case you wish to use auto-import. == Changelog == + += 1.1 = +*2015-05-26* + +* Facebook broke it's API... again. Fixed. + = 1.0 = *2015-05-01*