Skip to content
Browse files

Merge pull request #37 from crowdfavorite/develop

3.1.1
  • Loading branch information...
2 parents 182de18 + 0ba6656 commit c4115d7be6a7ea6e1139b3c794b2e61b39b5fd87 @mospaw mospaw committed Apr 16, 2015
Showing with 32 additions and 11 deletions.
  1. +7 −2 README.txt
  2. +22 −6 classes/aktt.php
  3. +1 −1 classes/aktt_tweet.php
  4. +1 −1 twitter-tools.php
  5. +1 −1 views/widget.php
View
9 README.txt
@@ -2,8 +2,8 @@
Contributors: alexkingorg, crowdfavorite
Tags: twitter, tweet, integration, post, notify, integrate, archive, widget, shortcode, social
Requires at least: 3.8
-Tested up to: 3.8
-Stable tag: 3.0.5
+Tested up to: 4.2
+Stable tag: 3.1.1
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -145,6 +145,11 @@ Version 3.1 brings support for Social 2.10's CRON action names and requires Soci
== Changelog ==
+= 3.1.1 =
+
+* (new) Use Twitter icon in admin menu
+
+
= 3.1 =
* (new) Requires Social v2.10
View
28 classes/aktt.php
@@ -2,7 +2,7 @@
class AKTT {
// settings: aktt_v3_settings
- static $ver = '3.1';
+ static $ver = '3.1.1';
static $enabled = false;
static $prefix = 'aktt_';
static $post_type = 'aktt_tweet';
@@ -74,6 +74,7 @@ static function init() {
add_action('admin_init', array('AKTT', 'admin_controller'), 1);
add_action('admin_menu', array('AKTT', 'admin_menu'));
add_filter('plugin_action_links', array('AKTT', 'plugin_action_links'), 10, 2);
+ add_filter('post_row_actions', array('AKTT', 'post_row_actions'), 10, 2);
add_action('admin_enqueue_scripts', array('AKTT', 'admin_enqueue_scripts'));
// Cron Hooks
@@ -192,6 +193,7 @@ static function register_post_type() {
'with_front' => false
),
'has_archive' => true,
+ 'menu_icon' => 'dashicons-twitter',
));
}
@@ -415,13 +417,27 @@ static function the_posts($posts) {
}
/**
+ * Appends a "View on Twitter.com" link to post listing quick links
+ *
+ * @param array $actions
+ * @param object $post Post object
+ * @return array
+ */
+ static function post_row_actions($actions, $post) {
+ if (isset($post->tweet)) {
+ $actions['view-on-twitter'] = '<a href="' . esc_url($post->tweet->status_url()) . '">' . __( 'View on Twitter.com', 'twitter-tools' ) . '</a>';
+ }
+ return $actions;
+ }
+
+ /**
* Prepends a "settings" link for our plugin on the plugins.php page
*
* @param array $links
* @param string $file -- filename of plugin
* @return array
*/
- function plugin_action_links($links, $file) {
+ static function plugin_action_links($links, $file) {
if (basename($file) == basename(AKTT_FILE)) {
$settings_link = '<a href="options-general.php?page='.self::$menu_page_slug.'">'.__('Settings', 'twitter-tools').'</a>';
array_unshift($links, $settings_link);
@@ -433,7 +449,7 @@ function plugin_action_links($links, $file) {
/**
* Adds a link to the "Settings" menu in WP-Admin.
*/
- public function admin_menu() {
+ public static function admin_menu() {
add_options_page(
__('Twitter Tools Options', 'twitter-tools'),
__('Twitter Tools', 'twitter-tools'),
@@ -859,7 +875,7 @@ static function social_key_auth() {
*
* @return void
*/
- function controller(){
+ static function controller(){
if (isset($_GET['aktt_action'])) {
switch ($_GET['aktt_action']) {
case 'download_account_tweets':
@@ -923,7 +939,7 @@ function controller(){
*
* @return void
*/
- function admin_controller(){
+ static function admin_controller(){
if (isset($_GET['aktt_action'])) {
switch ($_GET['aktt_action']) {
case 'manual_tweet_download':
@@ -981,7 +997,7 @@ function admin_controller(){
* @param string $hook_suffix
* @return void
*/
- function admin_enqueue_scripts($hook_suffix) {
+ static function admin_enqueue_scripts($hook_suffix) {
add_action('admin_footer', array('AKTT', 'admin_js'));
if ($hook_suffix == 'settings_page_twitter-tools') {
wp_enqueue_script('suggest');
View
2 classes/aktt_tweet.php
@@ -186,7 +186,7 @@ public function urls() {
* @return string
*/
public function status_url() {
- if ($username = $this->username() && $id = $this->id()) {
+ if (($username = $this->username()) && ($id = $this->id())) {
return AKTT::status_url($username, $id);
}
return null;
View
2 twitter-tools.php
@@ -3,7 +3,7 @@
Plugin Name: Twitter Tools
Plugin URI: http://crowdfavorite.com/wordpress/plugins/twitter-tools/
Description: An integration between your WordPress site and Twitter. Create posts from your tweets. Show your tweets in your sidebar. Relies on <a href="http://wordpress.org/extend/plugins/social/">Social</a>.
-Version: 3.1
+Version: 3.1.1
Author: Crowd Favorite
Author URI: http://crowdfavorite.com
*/
View
2 views/widget.php
@@ -3,7 +3,7 @@
include('tweet-list.php');
?>
- <p class="aktt_more_updates"><a href="<?php echo esc_url(AKTT::profile_url($username)); ?>"><?php _e('Follow Me on Twitter', 'twitter-tools'); ?></a></p>
+ <p class="aktt_more_updates"><a href="<?php echo esc_url(AKTT::profile_url($username)); ?>"><?php echo apply_filters( 'aktt_follow_text', __('Follow Me on Twitter', 'twitter-tools') ); ?></a></p>
<?php
if (AKTT::option('credit')) {
?>

0 comments on commit c4115d7

Please sign in to comment.
Something went wrong with that request. Please try again.