Version Description
- Plugin submitted to http://wordpress.org for review and approval
- Plugin approved and commited to wordpress.org for availability of download
=
Download this release
Release Info
Developer | Access Keys |
Plugin | AccessPress Twitter Feed – Twitter Feed for WordPress |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- APTF.class.php +125 -0
- accesspress-twitter-feed.php +311 -0
- css/backend.css +172 -0
- css/fonts.css +1 -0
- css/fonts/WebSymbols-Regular.eot +0 -0
- css/fonts/WebSymbols-Regular.svg +257 -0
- css/fonts/WebSymbols-Regular.ttf +0 -0
- css/fonts/WebSymbols-Regular.woff +0 -0
- css/frontend.css +281 -0
- css/images/Thumbs.db +0 -0
- css/images/bx_loader.gif +0 -0
- css/images/controls.png +0 -0
- css/images/icon.png +0 -0
- css/images/logo.png +0 -0
- css/images/next.png +0 -0
- css/images/prev.png +0 -0
- css/jquery.bxslider.css +208 -0
- images/aplite.png +0 -0
- images/appro.png +0 -0
- images/flicker.png +0 -0
- images/googleplus.png +0 -0
- images/icon.png +0 -0
- images/logo.png +0 -0
- images/pinterest.png +0 -0
- images/twitter.png +0 -0
- inc/backend/boards/about.php +56 -0
- inc/backend/boards/how-to-use.php +17 -0
- inc/backend/boards/main-settings.php +111 -0
- inc/backend/header.php +26 -0
- inc/backend/save-settings.php +40 -0
- inc/backend/settings.php +49 -0
- inc/backend/slider-widget.php +118 -0
- inc/backend/widget.php +100 -0
- inc/frontend/shortcode.php +32 -0
- inc/frontend/slider-shortcode.php +31 -0
- inc/frontend/templates/default/template-1.php +111 -0
- inc/frontend/templates/default/template-2.php +103 -0
- inc/frontend/templates/default/template-3.php +105 -0
- inc/frontend/templates/follow-btn.php +3 -0
- inc/frontend/templates/slider/template-1.php +112 -0
- inc/frontend/templates/slider/template-2.php +111 -0
- inc/frontend/templates/slider/template-3.php +110 -0
- inc/frontend/templates/tweet-actions.php +5 -0
- js/backend.js +20 -0
- js/frontend.js +26 -0
- js/jquery.bxslider.min.js +10 -0
- oauth/OAuth.php +874 -0
- oauth/twitteroauth.php +246 -0
- readme.txt +92 -0
APTF.class.php
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Version 2.2.1
|
4 |
+
* The base class for the storm twitter feed for developers.
|
5 |
+
* This class provides all the things needed for the wordpress plugin, but in theory means you don't need to use it with wordpress.
|
6 |
+
* What could go wrong?
|
7 |
+
*/
|
8 |
+
|
9 |
+
|
10 |
+
if (!class_exists('TwitterOAuth')) {
|
11 |
+
require_once('oauth/twitteroauth.php');
|
12 |
+
} else {
|
13 |
+
define('TFD_USING_EXISTING_LIBRARY_TWITTEROAUTH',true);
|
14 |
+
}
|
15 |
+
|
16 |
+
class APTF_Twitter_Class {
|
17 |
+
|
18 |
+
private $defaults = array(
|
19 |
+
'directory' => '',
|
20 |
+
'key' => '',
|
21 |
+
'secret' => '',
|
22 |
+
'token' => '',
|
23 |
+
'token_secret' => '',
|
24 |
+
'screenname' => '',
|
25 |
+
'cache_expire' => 1
|
26 |
+
);
|
27 |
+
|
28 |
+
public $st_last_error = false;
|
29 |
+
|
30 |
+
function __construct($args = array()) {
|
31 |
+
$this->defaults = array_merge($this->defaults, $args);
|
32 |
+
}
|
33 |
+
|
34 |
+
function __toString() {
|
35 |
+
return print_r($this->defaults, true);
|
36 |
+
}
|
37 |
+
|
38 |
+
function getTweets($screenname = false,$count = 20,$options = false) {
|
39 |
+
// BC: $count used to be the first argument
|
40 |
+
if (is_int($screenname)) {
|
41 |
+
list($screenname, $count) = array($count, $screenname);
|
42 |
+
}
|
43 |
+
|
44 |
+
if ($count > 20) $count = 20;
|
45 |
+
if ($count < 1) $count = 1;
|
46 |
+
|
47 |
+
$default_options = array('trim_user'=>true, 'exclude_replies'=>true, 'include_rts'=>false);
|
48 |
+
|
49 |
+
if ($options === false || !is_array($options)) {
|
50 |
+
$options = $default_options;
|
51 |
+
} else {
|
52 |
+
$options = array_merge($default_options, $options);
|
53 |
+
}
|
54 |
+
|
55 |
+
if ($screenname === false || $screenname === 20) $screenname = $this->defaults['screenname'];
|
56 |
+
|
57 |
+
|
58 |
+
//If we're here, we need to load.
|
59 |
+
$result = $this->oauthGetTweets($screenname,$options);
|
60 |
+
|
61 |
+
if (is_array($result) && isset($result['errors'])) {
|
62 |
+
if (is_array($result) && isset($result['errors'][0]) && isset($result['errors'][0]['message'])) {
|
63 |
+
$last_error = $result['errors'][0]['message'];
|
64 |
+
} else {
|
65 |
+
$last_error = $result['errors'];
|
66 |
+
}
|
67 |
+
return array('error'=>__('Twitter said: ',APTF_TD).json_encode($last_error));
|
68 |
+
} else {
|
69 |
+
if (is_array($result)) {
|
70 |
+
return $this->cropTweets($result,$count);
|
71 |
+
|
72 |
+
} else {
|
73 |
+
$last_error = __('Something went wrong with the twitter request: ',APTF_TD).json_encode($result);
|
74 |
+
return array('error'=>$last_error);
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
}
|
79 |
+
|
80 |
+
private function cropTweets($result,$count) {
|
81 |
+
return array_slice($result, 0, $count);
|
82 |
+
}
|
83 |
+
|
84 |
+
|
85 |
+
|
86 |
+
private function getOptionsHash($options) {
|
87 |
+
$hash = md5(serialize($options));
|
88 |
+
return $hash;
|
89 |
+
}
|
90 |
+
|
91 |
+
|
92 |
+
|
93 |
+
private function oauthGetTweets($screenname,$options) {
|
94 |
+
$key = $this->defaults['key'];
|
95 |
+
$secret = $this->defaults['secret'];
|
96 |
+
$token = $this->defaults['token'];
|
97 |
+
$token_secret = $this->defaults['token_secret'];
|
98 |
+
|
99 |
+
$cachename = $screenname."-".$this->getOptionsHash($options);
|
100 |
+
|
101 |
+
$options = array_merge($options, array('screen_name' => $screenname, 'count' => 20));
|
102 |
+
|
103 |
+
if (empty($key)) return array('error'=>__('Missing Consumer Key - Check Settings',APTF_TD));
|
104 |
+
if (empty($secret)) return array('error'=>__('Missing Consumer Secret - Check Settings',APTF_TD));
|
105 |
+
if (empty($token)) return array('error'=>__('Missing Access Token - Check Settings',APTF_TD));
|
106 |
+
if (empty($token_secret)) return array('error'=>__('Missing Access Token Secret - Check Settings',APTF_TD));
|
107 |
+
if (empty($screenname)) return array('error'=>__('Missing Twitter Feed Screen Name - Check Settings',APTF_TD));
|
108 |
+
|
109 |
+
$connection = new TwitterOAuth($key, $secret, $token, $token_secret);
|
110 |
+
$result = $connection->get('statuses/user_timeline', $options);
|
111 |
+
|
112 |
+
if (isset($result['errors'])) {
|
113 |
+
if (is_array($results) && isset($result['errors'][0]) && isset($result['errors'][0]['message'])) {
|
114 |
+
$last_error = '['.date('r').'] Twitter error: '.$result['errors'][0]['message'];
|
115 |
+
$this->st_last_error = $last_error;
|
116 |
+
} else {
|
117 |
+
$last_error = '['.date('r').'] Twitter returned an invalid response. It is probably down.';
|
118 |
+
$this->st_last_error = $last_error;
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
+
return $result;
|
123 |
+
|
124 |
+
}
|
125 |
+
}
|
accesspress-twitter-feed.php
ADDED
@@ -0,0 +1,311 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
defined('ABSPATH') or die('No script kiddies please!');
|
4 |
+
/**
|
5 |
+
* Plugin Name: AccessPress Twitter Feed
|
6 |
+
* Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-twitter-feed/
|
7 |
+
* Description: A plugin to show your twitter feed in your site with various configurable settings
|
8 |
+
* Version: 1.0.0
|
9 |
+
* Author: AccessPress Themes
|
10 |
+
* Author URI: http://accesspressthemes.com
|
11 |
+
* Text Domain: ap-twitter-feed
|
12 |
+
* Domain Path: /languages/
|
13 |
+
* License: GPL
|
14 |
+
*/
|
15 |
+
/**
|
16 |
+
* Declartion of necessary constants for plugin
|
17 |
+
* */
|
18 |
+
if (!defined('APTF_IMAGE_DIR')) {
|
19 |
+
define('APTF_IMAGE_DIR', plugin_dir_url(__FILE__) . 'images');
|
20 |
+
}
|
21 |
+
if (!defined('APTF_JS_DIR')) {
|
22 |
+
define('APTF_JS_DIR', plugin_dir_url(__FILE__) . 'js');
|
23 |
+
}
|
24 |
+
if (!defined('APTF_CSS_DIR')) {
|
25 |
+
define('APTF_CSS_DIR', plugin_dir_url(__FILE__) . 'css');
|
26 |
+
}
|
27 |
+
if (!defined('APTF_VERSION')) {
|
28 |
+
define('APTF_VERSION', '1.0.0');
|
29 |
+
}
|
30 |
+
|
31 |
+
if (!defined('APTF_TD')) {
|
32 |
+
define('APTF_TD', 'ap-twitter-feed');
|
33 |
+
}
|
34 |
+
include_once('inc/backend/widget.php');
|
35 |
+
include_once('inc/backend/slider-widget.php');
|
36 |
+
if (!class_exists('APTF_Class')) {
|
37 |
+
|
38 |
+
class APTF_Class {
|
39 |
+
|
40 |
+
var $aptf_settings;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Initialization of plugin from constructor
|
44 |
+
*/
|
45 |
+
function __construct() {
|
46 |
+
$this->aptf_settings = get_option('aptf_settings');
|
47 |
+
add_action('init', array($this, 'load_text_domain')); //loads plugin text domain for internationalization
|
48 |
+
add_action('admin_init', array($this, 'session_init')); //starts session in admin section
|
49 |
+
add_action('admin_menu', array($this, 'add_plugin_admin_menu')); //adds the menu in admin section
|
50 |
+
add_action('admin_enqueue_scripts', array($this, 'register_admin_scripts')); //registers scripts and css for admin section
|
51 |
+
register_activation_hook(__FILE__, array($this, 'load_default_settings')); //loads default settings for the plugin while activating the plugin
|
52 |
+
add_action('admin_post_aptf_form_action', array($this, 'aptf_form_action')); //action to save settings
|
53 |
+
add_action('admin_post_aptf_restore_settings', array($this, 'aptf_restore_settings')); //action to restore default settings
|
54 |
+
add_action('admin_post_aptf_delete_cache', array($this, 'aptf_delete_cache')); //action to delete cache
|
55 |
+
add_shortcode('ap-twitter-feed', array($this, 'feed_shortcode')); //registers shortcode to display the feeds
|
56 |
+
add_shortcode('ap-twitter-feed-slider', array($this, 'feed_slider_shortcode')); //registers shortcode to display the feeds as slider
|
57 |
+
add_action('widgets_init', array($this, 'register_widget')); //registers the widget
|
58 |
+
add_action('wp_enqueue_scripts',array($this,'register_front_assests'));//registers assets for the frontend
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Loads Plugin Text Domain
|
63 |
+
*
|
64 |
+
*/
|
65 |
+
function load_text_domain() {
|
66 |
+
load_plugin_textdomain(APTF_TD, false, basename(dirname(__FILE__)) . '/languages');
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Starts Session
|
71 |
+
*/
|
72 |
+
function session_init() {
|
73 |
+
if (!session_id()) {
|
74 |
+
session_start();
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Loads Default Settings
|
80 |
+
*/
|
81 |
+
function load_default_settings() {
|
82 |
+
$default_settings = $this->get_default_settings();
|
83 |
+
if (!get_option('aptf_settings')) {
|
84 |
+
update_option('aptf_settings', $default_settings);
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Adds plugin's menu in the admin section
|
90 |
+
*/
|
91 |
+
function add_plugin_admin_menu() {
|
92 |
+
add_menu_page(__('AccessPress Twitter Feed', APTF_TD), __('AccessPress Twitter Feed', APTF_TD), 'manage_options', 'ap-twitter-feed', array($this, 'main_setting_page'), APTF_IMAGE_DIR . '/icon.png');
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Plugin's main setting page
|
97 |
+
*/
|
98 |
+
function main_setting_page() {
|
99 |
+
include('inc/backend/settings.php');
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Register all the scripts in admin section
|
104 |
+
*/
|
105 |
+
function register_admin_scripts() {
|
106 |
+
if (isset($_GET['page']) && $_GET['page'] == 'ap-twitter-feed') {
|
107 |
+
wp_enqueue_script('aptf-admin-script', APTF_JS_DIR . '/backend.js', array('jquery'), APTF_VERSION);
|
108 |
+
wp_enqueue_style('aptf-backend-css', APTF_CSS_DIR . '/backend.css', array(), APTF_VERSION);
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Return default settings array
|
114 |
+
* @return array
|
115 |
+
*/
|
116 |
+
function get_default_settings() {
|
117 |
+
$default_settings = array('consumer_key' => '',
|
118 |
+
'consumer_secret' => '',
|
119 |
+
'access_token' => '',
|
120 |
+
'access_token_secret' => '',
|
121 |
+
'twitter_username' => '',
|
122 |
+
'twitter_account_name',
|
123 |
+
'cache_period' => '',
|
124 |
+
'total_feed' => '5',
|
125 |
+
'feed_template' => 'template-1',
|
126 |
+
'time_format' => 'elapsed_time',
|
127 |
+
'display_username' => 1,
|
128 |
+
'display_twitter_actions'=>1,
|
129 |
+
'fallback_message'=>'',
|
130 |
+
'display_follow_button'=>0
|
131 |
+
);
|
132 |
+
return $default_settings;
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
*
|
137 |
+
* @param string $username
|
138 |
+
* @param int $count
|
139 |
+
* @param array $options
|
140 |
+
* @return array
|
141 |
+
*/
|
142 |
+
function get_tweets($username = false, $count = 20, $options = false) {
|
143 |
+
include_once('APTF.class.php');
|
144 |
+
$aptf_settings = $this->aptf_settings;
|
145 |
+
$config['key'] = $aptf_settings['consumer_key'];
|
146 |
+
$config['secret'] = $aptf_settings['consumer_secret'];
|
147 |
+
$config['token'] = $aptf_settings['access_token'];
|
148 |
+
$config['token_secret'] = $aptf_settings['access_token_secret'];
|
149 |
+
$config['screenname'] = $aptf_settings['twitter_username'];
|
150 |
+
$config['directory'] = plugin_dir_path(__FILE__);
|
151 |
+
$tweets = get_transient('aptf_tweets');
|
152 |
+
if (false === $tweets) {
|
153 |
+
$cache_period = intval($aptf_settings['cache_period']) * 60;
|
154 |
+
$cache_period = ($cache_period < 1) ? 3600 : $cache_period;
|
155 |
+
$obj = new APTF_Twitter_Class($config);
|
156 |
+
$res = $obj->getTweets($username, $count, $options);
|
157 |
+
if(!isset($res['error'])){
|
158 |
+
set_transient('aptf_tweets', $res, $cache_period);
|
159 |
+
}
|
160 |
+
|
161 |
+
} else {
|
162 |
+
$res = $tweets;
|
163 |
+
}
|
164 |
+
|
165 |
+
|
166 |
+
return $res;
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Prints array in pre format
|
171 |
+
*/
|
172 |
+
function print_array($array) {
|
173 |
+
echo "<pre>";
|
174 |
+
print_r($array);
|
175 |
+
echo "</pre>";
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Saves settings in option table
|
180 |
+
*/
|
181 |
+
function aptf_form_action() {
|
182 |
+
if (!empty($_POST) && wp_verify_nonce($_POST['aptf_nonce_field'], 'aptf_action_nonce')) {
|
183 |
+
include('inc/backend/save-settings.php');
|
184 |
+
} else {
|
185 |
+
die('No script kiddies please!');
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Restores Default Settings
|
191 |
+
*/
|
192 |
+
function aptf_restore_settings() {
|
193 |
+
if (!empty($_GET) && wp_verify_nonce($_GET['_wpnonce'], 'aptf-restore-nonce')) {
|
194 |
+
$aptf_settings = $this->get_default_settings();
|
195 |
+
update_option('aptf_settings', $aptf_settings);
|
196 |
+
$_SESSION['aptf_msg'] = __('Restored Default Settings Successfully.', APTF_TD);
|
197 |
+
wp_redirect(admin_url() . 'admin.php?page=ap-twitter-feed');
|
198 |
+
} else {
|
199 |
+
die('No script kiddies please!');
|
200 |
+
}
|
201 |
+
}
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Registers shortcode to display feed
|
205 |
+
*/
|
206 |
+
function feed_shortcode($atts) {
|
207 |
+
ob_start();
|
208 |
+
include('inc/frontend/shortcode.php');
|
209 |
+
$html = ob_get_contents();
|
210 |
+
ob_get_clean();
|
211 |
+
return $html;
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* Register shortcode for feeds slider
|
216 |
+
*/
|
217 |
+
function feed_slider_shortcode($atts){
|
218 |
+
ob_start();
|
219 |
+
include('inc/frontend/slider-shortcode.php');
|
220 |
+
$html = ob_get_contents();
|
221 |
+
ob_get_clean();
|
222 |
+
return $html;
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Deletes Feeds from cache
|
227 |
+
*/
|
228 |
+
function aptf_delete_cache() {
|
229 |
+
delete_transient('aptf_tweets');
|
230 |
+
$_SESSION['aptf_msg'] = __('Cache Deleted Successfully.', APTF_TD);
|
231 |
+
wp_redirect(admin_url() . 'admin.php?page=ap-twitter-feed');
|
232 |
+
}
|
233 |
+
|
234 |
+
/**
|
235 |
+
*
|
236 |
+
* @param varchar $date
|
237 |
+
* @param string $format
|
238 |
+
* @return type
|
239 |
+
*/
|
240 |
+
function get_date_format($date, $format) {
|
241 |
+
switch($format){
|
242 |
+
case 'full_date':
|
243 |
+
$date = strtotime($date);
|
244 |
+
$date = date('F j, Y, g:i a',$date);
|
245 |
+
break;
|
246 |
+
case 'date_only':
|
247 |
+
$date = strtotime($date);
|
248 |
+
$date = date('F j, Y',$date);
|
249 |
+
break;
|
250 |
+
case 'elapsed_time':
|
251 |
+
$current_date = strtotime(date('h:i A M d Y'));
|
252 |
+
$tweet_date = strtotime($date);
|
253 |
+
$total_seconds = $current_date - $tweet_date;
|
254 |
+
$seconds = $total_seconds % 60;
|
255 |
+
$total_minutes = $total_seconds / 60;
|
256 |
+
;
|
257 |
+
$minutes = $total_minutes % 60;
|
258 |
+
$total_hours = $total_minutes / 60;
|
259 |
+
$hours = $total_hours % 24;
|
260 |
+
$total_days = $total_hours / 24;
|
261 |
+
$days = $total_days % 365;
|
262 |
+
$years = $total_days / 365;
|
263 |
+
|
264 |
+
if ($years > 1) {
|
265 |
+
$date = $years . __(' year ago', APTF_TD);
|
266 |
+
} elseif ($days > 1) {
|
267 |
+
$date = $days . __(' days ago', APTF_TD);
|
268 |
+
} elseif ($hours > 1) {
|
269 |
+
$date = $hours . __(' hours ago', APTF_TD);
|
270 |
+
} elseif ($minutes > 1) {
|
271 |
+
$date = $minutes . __(' minutes ago', APTF_TD);
|
272 |
+
} else {
|
273 |
+
$date = __("1 minute ago", APTF_TD);
|
274 |
+
}
|
275 |
+
break;
|
276 |
+
default:
|
277 |
+
break;
|
278 |
+
}
|
279 |
+
return $date;
|
280 |
+
}
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Registers Widget
|
284 |
+
*/
|
285 |
+
function register_widget() {
|
286 |
+
register_widget('APTF_Widget');
|
287 |
+
register_widget('APTF_Slider_Widget');
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Registers Assets for frontend
|
292 |
+
*/
|
293 |
+
function register_front_assests(){
|
294 |
+
wp_enqueue_script('aptf-bxslider',APTF_JS_DIR.'/jquery.bxslider.min.js',array('jquery'),APTF_VERSION);
|
295 |
+
wp_enqueue_style('aptf-bxslider',APTF_CSS_DIR.'/jquery.bxslider.css',array(),APTF_VERSION);
|
296 |
+
wp_enqueue_script('aptf-front-js',APTF_JS_DIR.'/frontend.js',array('jquery','aptf-bxslider'),APTF_VERSION);
|
297 |
+
wp_enqueue_style('aptf-front-css',APTF_CSS_DIR.'/frontend.css',array(),APTF_VERSION);
|
298 |
+
wp_enqueue_style('aptf-font-css',APTF_CSS_DIR.'/fonts.css',array(),APTF_VERSION);
|
299 |
+
}
|
300 |
+
|
301 |
+
|
302 |
+
|
303 |
+
|
304 |
+
}
|
305 |
+
|
306 |
+
/**
|
307 |
+
* Plugin Initialization
|
308 |
+
*/
|
309 |
+
$aptf_obj = new APTF_Class();
|
310 |
+
}
|
311 |
+
|
css/backend.css
ADDED
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
To change this license header, choose License Headers in Project Properties.
|
3 |
+
To change this template file, choose Tools | Templates
|
4 |
+
and open the template in the editor.
|
5 |
+
*/
|
6 |
+
/*
|
7 |
+
Created on : Mar 6, 2015, 2:37:46 PM
|
8 |
+
Author : AccessPress Twitter Feed
|
9 |
+
*/
|
10 |
+
|
11 |
+
.aptf-panel{
|
12 |
+
background: #55ACEE;
|
13 |
+
border-radius: 15px 15px 0 0;
|
14 |
+
float: left;
|
15 |
+
width: 810px;
|
16 |
+
}
|
17 |
+
.aptf-header-wrapper {
|
18 |
+
background: none repeat scroll 0 0 #55ACEE;
|
19 |
+
border-bottom: 5px solid #20627b;
|
20 |
+
border-radius: 15px 15px 0 0;
|
21 |
+
color: #fff;
|
22 |
+
height: 65px;
|
23 |
+
position: relative;
|
24 |
+
}
|
25 |
+
.apsc-logo {
|
26 |
+
float: left;
|
27 |
+
padding: 15px 0 0 20px;
|
28 |
+
width: auto;
|
29 |
+
}
|
30 |
+
.apsc-socials {
|
31 |
+
left: 50%;
|
32 |
+
margin-left: -100px;
|
33 |
+
position: absolute;
|
34 |
+
text-align: center;
|
35 |
+
top: 5px;
|
36 |
+
width: 200px;
|
37 |
+
}
|
38 |
+
.apsc-socials p {
|
39 |
+
margin: 5px 0;
|
40 |
+
}
|
41 |
+
.aptf-header-wrapper .apsc-title {
|
42 |
+
color: #fff;
|
43 |
+
float: right;
|
44 |
+
font-size: 20px;
|
45 |
+
line-height: 65px;
|
46 |
+
padding: 0 20px 0 0;
|
47 |
+
}
|
48 |
+
.aptf-nav{
|
49 |
+
border-left: 1px solid #55ACEE;
|
50 |
+
float: left;
|
51 |
+
margin-bottom: 52px;
|
52 |
+
position: relative;
|
53 |
+
width: 199px;
|
54 |
+
}
|
55 |
+
.aptf-nav ul{
|
56 |
+
margin: 0;
|
57 |
+
}
|
58 |
+
.aptf-nav li{
|
59 |
+
margin-bottom: 0;
|
60 |
+
}
|
61 |
+
.aptf-nav li a{
|
62 |
+
background-color: #55ACEE;
|
63 |
+
border-bottom: 1px solid #CCC;
|
64 |
+
color: white;
|
65 |
+
display: block;
|
66 |
+
font-family: "Ubuntu",sans-serif;
|
67 |
+
font-size: 13px;
|
68 |
+
font-weight: bold;
|
69 |
+
margin: 0;
|
70 |
+
outline: 0 none;
|
71 |
+
padding: 12px 23px;
|
72 |
+
text-decoration: none;
|
73 |
+
text-transform: uppercase;
|
74 |
+
}
|
75 |
+
.aptf-nav li a:hover,
|
76 |
+
.aptf-nav li a.aptf-active-trigger{
|
77 |
+
background: #FFF;
|
78 |
+
color: #55ACEE;
|
79 |
+
}
|
80 |
+
.aptf-board-wrapper{
|
81 |
+
background: none repeat scroll 0 0 #fff;
|
82 |
+
border-bottom: 1px solid #55ACEE;
|
83 |
+
border-right: 1px solid #55ACEE;
|
84 |
+
float: left;
|
85 |
+
min-height: 515px;
|
86 |
+
padding: 10px 25px !important;
|
87 |
+
width: 559px;
|
88 |
+
}
|
89 |
+
.aptf-single-board-wrapper h3{
|
90 |
+
font-size: 23px;
|
91 |
+
font-weight: 400;
|
92 |
+
line-height: 29px;
|
93 |
+
margin: 0;
|
94 |
+
padding: 0 15px 9px 0;
|
95 |
+
}
|
96 |
+
.aptf-option-wrapper{
|
97 |
+
border-bottom: 1px solid #ddd;
|
98 |
+
margin-bottom: 10px;
|
99 |
+
padding-bottom: 10px;
|
100 |
+
}
|
101 |
+
.aptf-option-wrapper label{
|
102 |
+
display: inline-block;
|
103 |
+
font-size: 14px;
|
104 |
+
font-weight: bold;
|
105 |
+
line-height: 1.6;
|
106 |
+
padding: 5px 5px 5px 0;
|
107 |
+
vertical-align: top;
|
108 |
+
width: 195px;
|
109 |
+
}
|
110 |
+
.aptf-option-field,
|
111 |
+
.aptf-fields-configurations {
|
112 |
+
display: inline-block;
|
113 |
+
width: calc(100% - 205px);
|
114 |
+
}
|
115 |
+
.aptf-option-field label{
|
116 |
+
width: 100%;
|
117 |
+
}
|
118 |
+
.aptf-option-field label span{
|
119 |
+
color: #666666;
|
120 |
+
display: inline-block;
|
121 |
+
font-size: 12px;
|
122 |
+
font-style: italic;
|
123 |
+
margin-left: 2px;
|
124 |
+
}
|
125 |
+
.aptf-option-note {
|
126 |
+
color: #666666;
|
127 |
+
display: inline-block;
|
128 |
+
font-style: italic;
|
129 |
+
line-height: 1.6;
|
130 |
+
margin-left: 2px;
|
131 |
+
padding-top: 5px;
|
132 |
+
width: calc( 100% - 26px );
|
133 |
+
}
|
134 |
+
.aptf-option-note a{
|
135 |
+
padding: 0 3px;
|
136 |
+
}
|
137 |
+
|
138 |
+
.aptf-message{
|
139 |
+
background-color: #EEE;
|
140 |
+
border-left: 4px solid #55ACEE;
|
141 |
+
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.2);
|
142 |
+
display: block;
|
143 |
+
font-size: 14px;
|
144 |
+
line-height: 19px;
|
145 |
+
margin-bottom: 10px;
|
146 |
+
padding: 11px 15px;
|
147 |
+
text-align: left;
|
148 |
+
}
|
149 |
+
.aptf-option-field > input[type="text"],
|
150 |
+
.aptf-option-field > input[type="number"] {
|
151 |
+
width: 100%;
|
152 |
+
}
|
153 |
+
.aptf-option-field > input[type="checkbox"] {
|
154 |
+
margin-top: 8px;
|
155 |
+
vertical-align: top;
|
156 |
+
}
|
157 |
+
.social-icon li{
|
158 |
+
display: inline-block;
|
159 |
+
}
|
160 |
+
.aptf-board-wrapper .button-primary{
|
161 |
+
background: #55acee !important;
|
162 |
+
border-color: #2B99EA !important;
|
163 |
+
}
|
164 |
+
.seperator{
|
165 |
+
padding-bottom: 10px;
|
166 |
+
}
|
167 |
+
.dottedline{
|
168 |
+
border-bottom: 1px dotted #CCC;
|
169 |
+
}
|
170 |
+
#aptf-about-board h3{
|
171 |
+
padding-bottom: 0;
|
172 |
+
}
|
css/fonts.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
/* @font-face kit by Fonts2u (http://www.fonts2u.com) */ @font-face {font-family:"WebSymbols-Regular";src:url("fonts/WebSymbols-Regular.eot?") format("eot"),url("fonts/WebSymbols-Regular.woff") format("woff"),url("fonts/WebSymbols-Regular.ttf") format("truetype"),url("fonts/WebSymbols-Regular.svg#WebSymbols-Regular") format("svg");font-weight:normal;font-style:normal;}
|
css/fonts/WebSymbols-Regular.eot
ADDED
Binary file
|
css/fonts/WebSymbols-Regular.svg
ADDED
@@ -0,0 +1,257 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" standalone="no"?>
|
2 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3 |
+
<svg>
|
4 |
+
<metadata>
|
5 |
+
Created by FontForge 20110222 at Sat Jan 14 12:53:56 2012
|
6 |
+
By www-data
|
7 |
+
Web Symbols is a trademark of Just Be Nice studio.
|
8 |
+
</metadata>
|
9 |
+
<defs>
|
10 |
+
<font id="WebSymbols-Regular" horiz-adv-x="1000" >
|
11 |
+
<font-face
|
12 |
+
font-family="Web Symbols"
|
13 |
+
font-weight="400"
|
14 |
+
font-stretch="normal"
|
15 |
+
units-per-em="1000"
|
16 |
+
panose-1="0 0 0 0 0 0 0 0 0 0"
|
17 |
+
ascent="801"
|
18 |
+
descent="-199"
|
19 |
+
x-height="683"
|
20 |
+
cap-height="800"
|
21 |
+
bbox="0 -200 1550 869"
|
22 |
+
underline-thickness="50"
|
23 |
+
underline-position="-50"
|
24 |
+
stemh="264"
|
25 |
+
stemv="264"
|
26 |
+
unicode-range="U+0020-00D7"
|
27 |
+
/>
|
28 |
+
<missing-glyph />
|
29 |
+
<glyph glyph-name="space" unicode=" " horiz-adv-x="250"
|
30 |
+
/>
|
31 |
+
<glyph glyph-name="exclam" unicode="!"
|
32 |
+
/>
|
33 |
+
<glyph glyph-name="numbersign" unicode="#" horiz-adv-x="965"
|
34 |
+
d="M207 259c0 -23 -24 -26 -42 -26h-16v52h23c18 0 35 -5 35 -26zM190 355c0 -21 -17 -23 -34 -23h-7v46h8c16 0 33 -3 33 -23zM265 -112h62v241h-62v-148h-1l-115 148h-62v-241h62v147h1zM388 -112h63v241h-63v-241zM270 252c0 33 -14 57 -49 62v0c20 10 27 29 27 49
|
35 |
+
c0 46 -29 63 -72 63h-89v-241h96c44 0 87 17 87 67zM684 -107v75c-13 -16 -33 -26 -54 -26c-38 0 -65 27 -65 66c0 37 26 66 64 66c21 0 42 -9 55 -26v75c-18 7 -37 12 -57 12c-70 0 -127 -57 -127 -127c0 -72 57 -126 129 -126c19 0 37 5 55 11zM309 185h137v53h-74v42h70
|
36 |
+
v53h-70v40h74v53h-137v-241zM222 561v162h-136v-51h74v-112c0 -12 -1 -31 -18 -31c-10 0 -21 12 -27 19l-34 -36c14 -22 35 -36 62 -36c52 0 79 34 79 85zM740 -112h137v53h-75v41h71v53h-71v41h75v53h-137v-241zM484 588v135h-63v-126c0 -32 -3 -66 -42 -66
|
37 |
+
c-40 0 -43 34 -43 66v126h-63v-135c0 -73 28 -112 106 -112c77 0 105 39 105 112zM697 564c0 79 -104 58 -104 93c0 14 16 20 27 20c15 0 30 -6 42 -16l25 49c-23 13 -50 20 -76 20c-48 0 -83 -32 -83 -81c0 -85 103 -54 103 -95c0 -17 -15 -25 -30 -25c-21 0 -40 12 -56 25
|
38 |
+
l-26 -50c24 -18 54 -28 84 -28c56 0 94 30 94 88zM838 670h52v53h-166v-53h51v-187h63v187zM965 801v-1000h-965v1000h965z" />
|
39 |
+
<glyph glyph-name="percent" unicode="%"
|
40 |
+
d="M306 -32l161 -168h-467v467l168 -161l161 161c38 38 100 38 138 0s38 -100 0 -138zM1000 800v-467l-168 161l-161 -161c-38 -38 -100 -38 -138 0s-38 100 0 138l161 161l-161 168h467z" />
|
41 |
+
<glyph glyph-name="ampersand" unicode="&"
|
42 |
+
d="M644 382l116 -102v280h-280l102 -116l-13 -13l-213 -213l-116 102v-280h280l-102 116zM1000 300c0 -276 -224 -500 -500 -500s-500 224 -500 500s224 500 500 500s500 -224 500 -500z" />
|
43 |
+
<glyph glyph-name="parenleft" unicode="("
|
44 |
+
d="M547 68l71 71l-161 161l161 161l-71 71l-233 -232zM1000 300c0 -276 -224 -500 -500 -500s-500 224 -500 500s224 500 500 500s500 -224 500 -500z" />
|
45 |
+
<glyph glyph-name="parenright" unicode=")"
|
46 |
+
d="M453 68l233 232l-233 232l-71 -71l161 -161l-161 -161zM1000 300c0 -276 -224 -500 -500 -500s-500 224 -500 500s224 500 500 500s500 -224 500 -500z" />
|
47 |
+
<glyph glyph-name="asterisk" unicode="*"
|
48 |
+
d="M740 220l180 180h-120c-41 124 -177 213 -305 213c-175 0 -317 -141 -317 -316s142 -316 317 -316c84 0 164 33 223 92l-62 71c-42 -41 -98 -64 -156 -64c-121 0 -220 99 -220 220s99 220 220 220c56 0 117 -23 156 -64c17 -19 15 -34 24 -56h-120zM1000 300
|
49 |
+
c0 -276 -224 -500 -500 -500s-500 224 -500 500s224 500 500 500s500 -224 500 -500z" />
|
50 |
+
<glyph glyph-name="plus" unicode="+"
|
51 |
+
d="M560 242h235v118h-235v235h-118v-235h-236v-118h236v-236h118v236zM1000 300c0 -276 -224 -500 -500 -500s-500 224 -500 500s224 500 500 500s500 -224 500 -500z" />
|
52 |
+
<glyph glyph-name="comma" unicode=","
|
53 |
+
d="M840 505c37 37 37 98 0 135s-98 37 -135 0s-37 -98 0 -135s98 -37 135 0zM1000 665v-270l-595 -595l-405 405l595 595h270z" />
|
54 |
+
<glyph glyph-name="hyphen" unicode="-"
|
55 |
+
d="M206 242h589v118h-589v-118zM1000 300c0 -276 -224 -500 -500 -500s-500 224 -500 500s224 500 500 500s500 -224 500 -500z" />
|
56 |
+
<glyph glyph-name="period" unicode="." horiz-adv-x="1179"
|
57 |
+
d="M1179 729c-322 -286 -715 -929 -715 -929s-143 179 -464 500l107 107l286 -250c536 536 714 643 714 643s36 0 72 -71z" />
|
58 |
+
<glyph glyph-name="slash" unicode="/"
|
59 |
+
d="M260 354l-54 -53c160 -160 232 -249 232 -249s196 320 356 463c-18 35 -36 35 -36 35s-89 -53 -356 -320zM500 801c276 0 500 -224 500 -500s-224 -500 -500 -500s-500 224 -500 500s224 500 500 500z" />
|
60 |
+
<glyph glyph-name="zero" unicode="0"
|
61 |
+
d="M188 -26l-83 83l187 187l83 -83zM812 -26l-187 187l83 83l187 -187zM292 494l-187 187l83 83l187 -187zM0 428h265v-118h-265v118zM735 310v118h265v-118h-265zM559 -131h-118v265h118v-265zM559 604h-118v265h118v-265z" />
|
62 |
+
<glyph glyph-name="one" unicode="1"
|
63 |
+
d="M188 -26l-83 83l187 187l83 -83zM812 764l83 -83l-187 -187l-83 83zM812 -26l-187 187l83 83l187 -187zM292 494l-187 187l83 83l187 -187zM0 428h265v-118h-265v118zM559 -131h-118v265h118v-265zM559 604h-118v265h118v-265z" />
|
64 |
+
<glyph glyph-name="two" unicode="2"
|
65 |
+
d="M188 -26l-83 83l187 187l83 -83zM812 764l83 -83l-187 -187l-83 83zM292 494l-187 187l83 83l187 -187zM0 428h265v-118h-265v118zM735 310v118h265v-118h-265zM559 -131h-118v265h118v-265zM559 604h-118v265h118v-265z" />
|
66 |
+
<glyph glyph-name="three" unicode="3"
|
67 |
+
d="M188 -26l-83 83l187 187l83 -83zM812 764l83 -83l-187 -187l-83 83zM812 -26l-187 187l83 83l187 -187zM292 494l-187 187l83 83l187 -187zM0 428h265v-118h-265v118zM735 310v118h265v-118h-265zM559 604h-118v265h118v-265z" />
|
68 |
+
<glyph glyph-name="four" unicode="4"
|
69 |
+
d="M812 764l83 -83l-187 -187l-83 83zM812 -26l-187 187l83 83l187 -187zM292 494l-187 187l83 83l187 -187zM0 428h265v-118h-265v118zM735 310v118h265v-118h-265zM559 -131h-118v265h118v-265zM559 604h-118v265h118v-265z" />
|
70 |
+
<glyph glyph-name="five" unicode="5"
|
71 |
+
d="M188 -26l-83 83l187 187l83 -83zM812 764l83 -83l-187 -187l-83 83zM812 -26l-187 187l83 83l187 -187zM292 494l-187 187l83 83l187 -187zM735 310v118h265v-118h-265zM559 -131h-118v265h118v-265zM559 604h-118v265h118v-265z" />
|
72 |
+
<glyph glyph-name="six" unicode="6"
|
73 |
+
d="M188 -26l-83 83l187 187l83 -83zM812 764l83 -83l-187 -187l-83 83zM812 -26l-187 187l83 83l187 -187zM0 428h265v-118h-265v118zM735 310v118h265v-118h-265zM559 -131h-118v265h118v-265zM559 604h-118v265h118v-265z" />
|
74 |
+
<glyph glyph-name="seven" unicode="7"
|
75 |
+
d="M188 -26l-83 83l187 187l83 -83zM812 764l83 -83l-187 -187l-83 83zM812 -26l-187 187l83 83l187 -187zM292 494l-187 187l83 83l187 -187zM0 428h265v-118h-265v118zM735 310v118h265v-118h-265zM559 -131h-118v265h118v-265z" />
|
76 |
+
<glyph glyph-name="colon" unicode=":"
|
77 |
+
d="M661 182l71 71l-232 233l-232 -233l71 -71l161 161zM1000 300c0 -276 -224 -500 -500 -500s-500 224 -500 500s224 500 500 500s500 -224 500 -500z" />
|
78 |
+
<glyph glyph-name="semicolon" unicode=";"
|
79 |
+
d="M500 114l232 233l-71 71l-161 -161l-161 161l-71 -71zM1000 300c0 -276 -224 -500 -500 -500s-500 224 -500 500s224 500 500 500s500 -224 500 -500z" />
|
80 |
+
<glyph glyph-name="less" unicode="<" horiz-adv-x="654"
|
81 |
+
d="M308 300l346 -346l-154 -154l-500 500l500 500l154 -154z" />
|
82 |
+
<glyph glyph-name="greater" unicode=">" horiz-adv-x="654"
|
83 |
+
d="M154 800l500 -500l-500 -500l-154 154l346 346l-346 346z" />
|
84 |
+
<glyph glyph-name="question" unicode="?" horiz-adv-x="586"
|
85 |
+
d="M379 507c0 48 -38 86 -86 86s-86 -38 -86 -86s38 -86 86 -86s86 38 86 86zM586 507c0 0 0 -162 -293 -707c-293 545 -293 707 -293 707c0 162 131 293 293 293s293 -131 293 -293z" />
|
86 |
+
<glyph glyph-name="at" unicode="@" horiz-adv-x="1360"
|
87 |
+
d="M157 -42h1048v558l-494 -412h-61l-493 412v-558zM174 639l507 -423l507 423h-1014zM105 796h1152c58 0 105 -47 105 -105v-785c0 -58 -47 -105 -105 -105h-1152c-58 0 -105 47 -105 105v785c0 58 47 105 105 105z" />
|
88 |
+
<glyph glyph-name="A" unicode="A" horiz-adv-x="1113"
|
89 |
+
d="M1113 507c0 -89 -37 -177 -100 -239l-448 -444l-62 61l448 444c47 46 74 112 74 178c0 119 -87 206 -206 206c-67 0 -132 -29 -180 -75l-493 -489c-35 -35 -59 -83 -59 -133c0 -76 56 -130 131 -130c50 0 99 24 134 59l377 372c23 24 53 62 53 97c0 30 -26 45 -54 45
|
90 |
+
c-32 0 -64 -17 -86 -40l-340 -336l-61 61l339 336c39 39 92 66 148 66c75 0 142 -53 142 -131c0 -61 -38 -117 -79 -159l-377 -372c-52 -52 -123 -84 -196 -84c-124 0 -218 91 -218 216c0 73 33 143 84 194l493 489c65 63 151 101 242 101c167 0 294 -126 294 -293z" />
|
91 |
+
<glyph glyph-name="B" unicode="B"
|
92 |
+
d="M250 -75c0 -69 -56 -125 -125 -125s-125 56 -125 125s56 125 125 125s125 -56 125 -125zM660 -200h-192c0 125 -49 243 -137 331c-89 89 -206 137 -331 137v192c364 0 660 -296 660 -660zM1000 -200h-193c0 446 -362 808 -807 808v192c551 0 1000 -449 1000 -1000z" />
|
93 |
+
<glyph glyph-name="C" unicode="C" horiz-adv-x="1435"
|
94 |
+
d="M1435 83c0 -148 -114 -271 -261 -282v-1h-870v1c-7 -1 -14 -1 -21 -1c-156 0 -283 127 -283 283c0 99 53 191 138 242c-5 20 -8 41 -8 62c0 156 127 283 283 283c68 0 134 -26 186 -70c57 121 180 200 314 200c192 0 348 -156 348 -348c0 -35 -5 -70 -16 -103
|
95 |
+
c113 -39 190 -147 190 -266z" />
|
96 |
+
<glyph glyph-name="D" unicode="D" horiz-adv-x="1091"
|
97 |
+
d="M91 -108h636v364h-636v-364zM818 256h182v363h-636v-182h454v-181zM1091 801v-636h-273v-364h-818v636h273v364h818z" />
|
98 |
+
<glyph glyph-name="F" unicode="F" horiz-adv-x="1391"
|
99 |
+
d="M1391 419v-10l-68 -523c-6 -47 -50 -86 -98 -86h-1058c-48 0 -93 39 -99 86l-67 523c-1 3 -1 7 -1 10c0 44 35 76 78 76h1235c43 0 78 -32 78 -76zM1313 583h-1235c27 140 96 45 121 116l24 72c66 25 138 29 208 29c48 0 120 -12 164 -29l25 -72c33 -31 30 -29 76 -29
|
100 |
+
h485c25 0 90 -5 110 -22c10 -9 20 -54 22 -65z" />
|
101 |
+
<glyph glyph-name="H" unicode="H" horiz-adv-x="1500"
|
102 |
+
d="M308 300l346 -346l-154 -154l-500 500l500 500l154 -154zM1000 800l500 -500l-500 -500l-154 154l346 346l-346 346z" />
|
103 |
+
<glyph glyph-name="I" unicode="I" horiz-adv-x="1360"
|
104 |
+
d="M1163 7c2 -2 1 -7 -3 -7h-955h-1c-3 0 -4 2 -4 4v2c34 68 219 456 279 579c1 3 5 3 7 1l311 -386l152 122c5 2 7 0 7 0l1 -2c81 -103 123 -210 206 -313zM1120 480c0 -44 -36 -80 -80 -80s-80 36 -80 80s36 80 80 80s80 -36 80 -80zM120 -80h1120v760h-1120v-760z
|
105 |
+
M1360 800v-1000h-1360v1000h1360z" />
|
106 |
+
<glyph glyph-name="J" unicode="J" horiz-adv-x="1360"
|
107 |
+
d="M760 120l117 -120h-636l-1 360h-240l300 320l300 -320h-240v-240h400zM1120 320h240l-300 -320l-300 320h240v240h-400l-117 120h636z" />
|
108 |
+
<glyph glyph-name="K" unicode="K"
|
109 |
+
d="M613 445l-115 -115c-17 11 -37 17 -56 17c-28 0 -55 -11 -75 -31l-175 -176c-20 -19 -31 -46 -31 -74c0 -58 47 -105 105 -105c30 0 71 15 82 46h238l-132 -129c-50 -49 -117 -78 -188 -78c-147 0 -266 119 -266 266c0 70 28 139 78 188l175 176c50 50 118 78 189 78
|
110 |
+
c62 0 123 -22 171 -63zM1000 534c0 -70 -28 -139 -78 -188l-175 -176c-50 -50 -118 -78 -189 -78c-62 0 -123 22 -171 63l115 115c17 -11 37 -17 56 -17c28 0 55 11 75 31l175 176c20 19 31 46 31 74c0 58 -47 105 -105 105c-30 0 -71 -15 -82 -46h-238l132 129
|
111 |
+
c50 49 117 78 188 78c147 0 266 -119 266 -266z" />
|
112 |
+
<glyph glyph-name="L" unicode="L"
|
113 |
+
d="M681 391c0 151 -122 273 -272 273c-151 0 -273 -122 -273 -273c0 -150 122 -272 273 -272c150 0 272 122 272 272zM746 160l254 -255l-105 -105l-254 254c-66 -45 -146 -72 -232 -72c-226 0 -409 183 -409 409s183 409 409 409s409 -183 409 -409
|
114 |
+
c0 -86 -27 -166 -72 -231z" />
|
115 |
+
<glyph glyph-name="M" unicode="M" horiz-adv-x="1360"
|
116 |
+
d="M80 -120h120v80h-120v-80zM280 -120h120v80h-120v-80zM520 -120h120v80h-120v-80zM80 40h320v520h-320v-520zM720 -120h120v80h-120v-80zM80 640h120v80h-120v-80zM960 -120h120v80h-120v-80zM520 40h320v520h-320v-520zM280 640h120v80h-120v-80zM1160 -120h120v80h-120
|
117 |
+
v-80zM520 640h120v80h-120v-80zM960 40h320v520h-320v-520zM720 640h120v80h-120v-80zM960 640h120v80h-120v-80zM1160 640h120v80h-120v-80zM1360 800v-1000h-1360v1000h1360z" />
|
118 |
+
<glyph glyph-name="N" unicode="N" horiz-adv-x="1063"
|
119 |
+
d="M775 800c168 0 288 -117 288 -287v-60c0 -262 -341 -521 -532 -653c-191 132 -531 391 -531 653v60c0 170 120 287 287 287c114 0 174 -46 244 -129c71 83 130 129 244 129z" />
|
120 |
+
<glyph glyph-name="O" unicode="O" horiz-adv-x="1063"
|
121 |
+
d="M946 458c1 16 0 33 0 50c0 73 -56 166 -134 175c-12 2 -25 2 -37 2c-77 0 -107 -32 -155 -88l-89 -105l-89 105c-48 56 -77 88 -155 88c-12 0 -24 0 -37 -2c-80 -9 -130 -101 -134 -175c-1 -17 0 -34 0 -50c0 -23 9 -54 17 -75c59 -173 256 -337 398 -441
|
122 |
+
c143 104 339 268 399 441c7 22 16 51 16 75zM1063 513v-60c0 -262 -341 -521 -532 -653c-191 132 -531 391 -531 653v60c0 170 120 287 287 287c114 0 174 -46 244 -129c71 83 130 129 244 129c168 0 288 -117 288 -287z" />
|
123 |
+
<glyph glyph-name="P" unicode="P"
|
124 |
+
d="M680 100c0 -33 -27 -60 -60 -60c-16 0 -31 6 -42 18l-120 120c-17 17 -18 40 -18 62v320c0 33 27 60 60 60s60 -27 60 -60v-315l102 -103c12 -11 18 -26 18 -42zM883 300c0 211 -172 383 -383 383c-81 0 -161 -26 -226 -74l2 -2c-31 -23 -60 -52 -83 -83l-2 2
|
125 |
+
c-48 -65 -74 -145 -74 -226c0 -211 172 -383 383 -383c81 0 161 26 226 74l-2 2c31 23 60 52 83 83l2 -2c48 65 74 145 74 226zM1000 300c0 -276 -224 -500 -500 -500s-500 224 -500 500s224 500 500 500s500 -224 500 -500z" />
|
126 |
+
<glyph glyph-name="Q" unicode="Q"
|
127 |
+
d="M585 496c0 -47 -37 -88 -85 -88s-85 41 -85 88s37 88 85 88s85 -41 85 -88zM727 217c0 34 -26 63 -60 63c-10 0 -20 -3 -28 -8c-45 -23 -89 -36 -140 -36c-50 0 -94 13 -138 36c-9 4 -18 7 -28 7c-34 0 -60 -29 -60 -63c0 -62 97 -87 147 -97l-117 -121
|
128 |
+
c-12 -12 -18 -28 -18 -44c0 -34 26 -63 60 -63c17 0 32 7 43 18l112 116l112 -116c11 -11 26 -18 43 -18c34 0 60 29 60 63c0 16 -6 32 -18 44l-117 121c49 10 147 36 147 98zM705 496c0 114 -88 213 -205 213s-205 -99 -205 -213s88 -213 205 -213s205 99 205 213z
|
129 |
+
M1000 712v-824c0 -48 -40 -88 -88 -88h-824c-48 0 -88 40 -88 88v824c0 48 40 88 88 88h824c48 0 88 -40 88 -88z" />
|
130 |
+
<glyph glyph-name="R" unicode="R" horiz-adv-x="1050"
|
131 |
+
d="M1050 415c0 -15 -19 -30 -29 -38l-275 -200l105 -323c3 -10 5 -20 5 -30c0 -13 -4 -24 -18 -24c-13 0 -28 9 -38 17l-275 199l-275 -199c-11 -8 -25 -17 -39 -17c-13 0 -18 11 -18 23c0 11 3 21 6 31l105 323l-275 200c-11 8 -29 23 -29 37c0 21 35 23 49 23l340 -1
|
132 |
+
l104 324c4 13 15 40 32 40s27 -27 31 -40l106 -324l339 1c14 0 49 -2 49 -22z" />
|
133 |
+
<glyph glyph-name="S" unicode="S"
|
134 |
+
d="M652 300c0 80 -66 144 -146 144s-145 -63 -145 -144c0 -80 65 -144 145 -144s146 64 146 144zM1000 372v-142l-185 -26c-6 -17 -13 -34 -21 -50l120 -157l-102 -100l-159 118c-16 -8 -34 -15 -51 -21l-30 -194h-143l-27 197c-15 5 -29 11 -43 18l-161 -119l-101 100
|
135 |
+
l121 160c-8 15 -14 30 -19 46l-199 28v142l199 28c5 15 12 31 19 45l-120 159l101 100l160 -119c15 8 31 14 47 20l28 195h143l28 -195c16 -5 33 -12 48 -19l158 117l102 -100l-119 -156c8 -16 15 -32 20 -48z" />
|
136 |
+
<glyph glyph-name="T" unicode="T" horiz-adv-x="925"
|
137 |
+
d="M641 181v106c-128 -73 -374 -16 -374 -190c0 -87 63 -127 143 -127c132 0 231 72 231 211zM925 -173h-264c-12 32 -16 59 -18 92c-81 -80 -193 -119 -306 -119c-182 0 -337 87 -337 286c0 245 220 275 412 300c34 4 67 9 100 15c60 11 131 24 131 99
|
138 |
+
c0 103 -82 126 -170 126c-111 0 -169 -31 -187 -145h-244c17 248 219 319 438 319c211 0 412 -56 412 -308v-408c0 -86 -2 -176 33 -257z" />
|
139 |
+
<glyph glyph-name="U" unicode="U" horiz-adv-x="1070"
|
140 |
+
d="M1070 -137c0 -21 -1 -42 -2 -63h-1067c0 21 -1 42 -1 63c0 4 0 30 1 37c34 145 303 139 398 250c10 13 17 20 17 38c0 24 -6 50 -11 73c-9 47 -26 61 -42 101c-18 41 -25 88 -33 132c-4 25 -6 50 -6 75c0 135 68 231 211 231s211 -96 211 -231c0 -25 -3 -50 -7 -75
|
141 |
+
c-7 -44 -15 -91 -32 -132c-17 -40 -33 -54 -42 -101c-5 -23 -11 -49 -11 -73c0 -18 6 -25 17 -38c95 -111 363 -105 397 -250c2 -8 2 -33 2 -37z" />
|
142 |
+
<glyph glyph-name="V" unicode="V" horiz-adv-x="857"
|
143 |
+
d="M429 -9c148 0 272 115 284 262h143c-12 -227 -200 -404 -427 -404c-102 0 -201 36 -279 102l-150 -150v405h405l-153 -153c50 -40 113 -62 177 -62zM707 651l150 150v-405h-405l153 153c-50 40 -113 62 -176 62c-148 0 -273 -115 -285 -262h-143c12 227 200 404 428 404
|
144 |
+
c101 0 200 -36 278 -102z" />
|
145 |
+
<glyph glyph-name="W" unicode="W" horiz-adv-x="1113"
|
146 |
+
d="M626 5c0 38 -31 69 -70 69c-38 0 -69 -31 -69 -69s31 -70 69 -70c39 0 70 32 70 70zM626 392v146h-139v-146c0 -32 8 -50 13 -81l26 -162h59l27 162c6 31 14 49 14 81zM1113 -119c0 -55 -46 -80 -95 -80h-923c-50 0 -95 26 -95 80c0 21 7 42 18 61l461 804
|
147 |
+
c17 28 43 55 78 55c34 0 60 -27 76 -55l462 -805c10 -18 18 -39 18 -60z" />
|
148 |
+
<glyph glyph-name="X" unicode="X" horiz-adv-x="1188"
|
149 |
+
d="M746 53l106 -107c-94 -88 -207 -146 -338 -146c-287 0 -514 213 -514 502c0 276 228 498 502 498c134 0 251 -60 349 -148l-105 -106c-68 62 -150 104 -243 104c-200 0 -354 -159 -354 -358c0 -189 166 -342 353 -342c93 0 176 41 244 103zM912 565l276 -266l-276 -264
|
150 |
+
v177h-413v176h413v177z" />
|
151 |
+
<glyph glyph-name="Z" unicode="Z" horiz-adv-x="1217"
|
152 |
+
d="M870 300c0 36 -30 65 -66 65h-391c-36 0 -65 -29 -65 -65s29 -65 65 -65h391c36 0 66 29 66 65zM1174 452v-609c0 -23 -20 -43 -44 -43h-1043c-24 0 -44 20 -44 43v609c0 24 20 44 44 44h1043c24 0 44 -20 44 -44zM1217 757v-131c0 -24 -19 -43 -43 -43h-1131
|
153 |
+
c-23 0 -43 19 -43 43v131c0 23 20 43 43 43h1131c24 0 43 -20 43 -43z" />
|
154 |
+
<glyph glyph-name="bracketleft" unicode="[" horiz-adv-x="529"
|
155 |
+
d="M265 35l-265 530h529z" />
|
156 |
+
<glyph glyph-name="backslash" unicode="\"
|
157 |
+
d="M726 -9l-535 535c-48 -65 -74 -145 -74 -226c0 -211 172 -383 383 -383c81 0 161 26 226 74zM883 300c0 211 -172 383 -383 383c-81 0 -161 -26 -226 -74l535 -535c48 65 74 145 74 226zM1000 300c0 -276 -224 -500 -500 -500s-500 224 -500 500s224 500 500 500
|
158 |
+
s500 -224 500 -500z" />
|
159 |
+
<glyph glyph-name="bracketright" unicode="]" horiz-adv-x="529"
|
160 |
+
d="M529 300l-529 -265v530z" />
|
161 |
+
<glyph glyph-name="underscore" unicode="_" horiz-adv-x="1360"
|
162 |
+
d="M160 277l317 135v96l-317 134v-99l209 -84l-209 -83v-99zM522 200h318v77h-318v-77zM1360 800v-1000h-1360v1000h1360z" />
|
163 |
+
<glyph glyph-name="a" unicode="a" horiz-adv-x="760"
|
164 |
+
d="M160 -40h440v560h-120v120h-320v-680zM560 800l200 -200l-1 -800h-759v1000h560z" />
|
165 |
+
<glyph glyph-name="b" unicode="b" horiz-adv-x="1316"
|
166 |
+
d="M158 108h671v316h-118v118h-553v-434zM987 503v-553h-987v750h789z" />
|
167 |
+
<glyph glyph-name="c" unicode="c" horiz-adv-x="1137"
|
168 |
+
d="M1137 700v-532c0 -55 -45 -100 -100 -100h-168v-268l-267 268h-502c-55 0 -100 45 -100 100v532c0 55 45 100 100 100h937c55 0 100 -45 100 -100z" />
|
169 |
+
<glyph glyph-name="d" unicode="d" horiz-adv-x="1179"
|
170 |
+
d="M1179 336c0 -257 -264 -465 -590 -465c-83 0 -162 14 -234 39l2 -3l-357 -107c99 133 106 270 106 270c-66 75 -106 167 -106 266c0 256 264 464 589 464c326 0 590 -208 590 -464z" />
|
171 |
+
<glyph glyph-name="e" unicode="e" horiz-adv-x="1179"
|
172 |
+
d="M429 336c0 39 -32 71 -72 71c-39 0 -71 -32 -71 -71c0 -40 32 -72 71 -72c40 0 72 32 72 72zM679 336c0 39 -32 71 -72 71c-39 0 -71 -32 -71 -71c0 -40 32 -72 71 -72c40 0 72 32 72 72zM929 336c0 39 -32 71 -72 71c-39 0 -71 -32 -71 -71c0 -40 32 -72 71 -72
|
173 |
+
c40 0 72 32 72 72zM1179 336c0 -257 -264 -465 -590 -465c-83 0 -162 14 -234 39l2 -3l-357 -107c99 133 106 270 106 270c-66 75 -106 167 -106 266c0 256 264 464 589 464c326 0 590 -208 590 -464z" />
|
174 |
+
<glyph glyph-name="f" unicode="f"
|
175 |
+
d="M813 552l20 118c-43 15 -143 15 -143 15c-61 0 -97 -24 -123 -58c-25 -33 -26 -85 -26 -119v-6v-36v-36h-79v-115h79v-400h149v400h118l9 115h-127v36v42v12c0 31 28 42 59 42c0 0 31 0 64 -10zM1000 712v-824c0 -48 -40 -88 -88 -88h-824c-48 0 -88 40 -88 88v824
|
176 |
+
c0 48 40 88 88 88h824c48 0 88 -40 88 -88z" />
|
177 |
+
<glyph glyph-name="g" unicode="g"
|
178 |
+
d="M468 121c0 -64 -78 -98 -133 -98c-54 0 -124 28 -124 92c0 69 74 96 133 96c53 0 124 -27 124 -90zM413 466c0 -41 -16 -85 -64 -85c-63 0 -94 85 -94 137c0 41 17 85 64 85c63 0 94 -85 94 -137zM548 636c0 12 -12 11 -22 11c-62 0 -181 6 -244 -14
|
179 |
+
c-75 -25 -127 -83 -127 -164c0 -94 65 -156 158 -155h6c0 -69 11 -33 23 -66c-96 0 -226 -33 -226 -151c0 -112 111 -152 205 -152c110 0 227 53 227 179c0 113 -126 162 -126 195c0 37 97 51 97 175c0 39 -11 84 -44 107c22 3 73 3 73 35zM763 473h121v60h-121v122h-60
|
180 |
+
v-122h-122v-60h122v-121h60v121zM1000 712v-824c0 -48 -40 -88 -88 -88h-824c-48 0 -88 40 -88 88v824c0 48 40 88 88 88h824c48 0 88 -40 88 -88z" />
|
181 |
+
<glyph glyph-name="h" unicode="h" horiz-adv-x="1185"
|
182 |
+
d="M501 801v-319c684 -94 684 -593 684 -593s-148 274 -684 228v-316l-501 499z" />
|
183 |
+
<glyph glyph-name="i" unicode="i" horiz-adv-x="1550"
|
184 |
+
d="M866 801v-319c684 -94 684 -593 684 -593s-148 274 -684 228v-316l-501 499zM501 801v-182l-319 -319l319 -318v-181l-501 499z" />
|
185 |
+
<glyph glyph-name="j" unicode="j" horiz-adv-x="1185"
|
186 |
+
d="M0 482h684v319l501 -501l-501 -499v316h-684v365z" />
|
187 |
+
<glyph glyph-name="k" unicode="k"
|
188 |
+
d="M544 348h183l-1 119h-184l2 181h-112c-2 -45 -16 -87 -37 -118c-10 -15 -19 -37 -31 -47c-20 -16 -51 -15 -76 -15h-15v-120l91 -3v-303c0 -111 92 -121 161 -121h45c106 0 126 10 150 23v128v0v0c-31 -20 -68 -35 -105 -35c-38 0 -71 23 -71 38v273zM1000 712v-824
|
189 |
+
c0 -48 -40 -88 -88 -88h-824c-48 0 -88 40 -88 88v824c0 48 40 88 88 88h824c48 0 88 -40 88 -88z" />
|
190 |
+
<glyph glyph-name="l" unicode="l"
|
191 |
+
d="M200 0h128v419h-128v-419zM332 535c0 37 -26 65 -67 65s-68 -28 -68 -65c0 -36 26 -65 66 -65c43 0 70 29 69 65zM668 0h129v247c0 124 -64 181 -148 181c-69 0 -111 -40 -128 -68h-2l-6 59h-111c1 -38 3 -82 3 -134v-285h128v241c0 12 1 24 4 33c10 24 31 49 66 49
|
192 |
+
c47 0 65 -37 65 -91v-232zM1000 712v-824c0 -48 -40 -88 -88 -88h-824c-48 0 -88 40 -88 88v824c0 48 40 88 88 88h824c48 0 88 -40 88 -88z" />
|
193 |
+
<glyph glyph-name="m" unicode="m"
|
194 |
+
d="M880 547c0 69 -50 93 -112 93c-102 0 -197 -85 -228 -179c53 4 100 2 100 -64c0 -48 -59 -195 -113 -195c-15 0 -27 9 -36 19c-76 79 -26 398 -159 398c-82 0 -189 -116 -252 -165v-5c15 -15 14 -33 41 -33c23 0 44 14 67 14c24 0 35 -21 43 -40c9 -22 15 -47 23 -70
|
195 |
+
c15 -43 26 -87 37 -130c18 -70 49 -230 142 -230c191 0 415 404 444 553c2 12 3 23 3 34zM1000 712v-824c0 -48 -40 -88 -88 -88h-824c-48 0 -88 40 -88 88v824c0 48 40 88 88 88h824c48 0 88 -40 88 -88z" />
|
196 |
+
<glyph glyph-name="n" unicode="n"
|
197 |
+
d="M89 349l150 -107l-150 -106v213zM1000 14v-213h-669v213h669zM1000 349v-213h-669v213h669zM1000 683v-213h-669v213h669z" />
|
198 |
+
<glyph glyph-name="o" unicode="o"
|
199 |
+
d="M239 349v-213l-150 106zM1000 14v-213h-669v213h669zM1000 349v-213h-669v213h669zM1000 683v-213h-669v213h669z" />
|
200 |
+
<glyph glyph-name="p" unicode="p"
|
201 |
+
d="M239 -93c0 -41 -34 -76 -76 -76s-76 35 -76 76c0 42 34 77 76 77s76 -35 76 -77zM239 242c0 -42 -34 -76 -76 -76s-76 34 -76 76s34 76 76 76s76 -34 76 -76zM1000 14v-213h-669v213h669zM239 577c0 -42 -34 -76 -76 -76s-76 34 -76 76s34 76 76 76s76 -34 76 -76z
|
202 |
+
M1000 349v-213h-669v213h669zM1000 683v-213h-669v213h669z" />
|
203 |
+
<glyph glyph-name="q" unicode="q"
|
204 |
+
d="M233 -128c0 -40 -34 -62 -71 -62c-41 0 -71 24 -71 66v3h38c0 -21 10 -37 32 -37c18 0 32 11 32 30c0 20 -16 29 -35 28h-9v27c17 -1 40 2 40 24c0 15 -12 24 -27 24c-20 0 -29 -14 -29 -33h-37c1 40 26 64 66 64c32 0 64 -17 64 -52c0 -17 -10 -34 -27 -38
|
205 |
+
c22 -5 34 -22 34 -44zM232 175v-33h-141c2 83 101 83 101 132c0 16 -11 27 -28 27c-24 0 -30 -21 -31 -41h-37c0 44 23 75 70 75c35 0 65 -21 65 -59c0 -57 -64 -62 -90 -101h91zM1000 14v-213h-669v213h669zM196 662v-192h-42v125h-46v29c29 0 50 7 56 38h32zM1000 349
|
206 |
+
v-213h-669v213h669zM1000 683v-213h-669v213h669z" />
|
207 |
+
<glyph glyph-name="r" unicode="r"
|
208 |
+
d="M324 35c0 49 -40 89 -89 89c-48 0 -88 -40 -88 -89c0 -48 40 -88 88 -88c49 0 89 40 89 88zM477 -53h136c0 257 -209 466 -466 466v-135c88 0 171 -35 233 -97c63 -62 97 -145 97 -234zM717 -53h136c0 389 -317 706 -706 706v-135c314 0 570 -256 570 -571zM1000 712
|
209 |
+
v-824c0 -48 -40 -88 -88 -88h-824c-48 0 -88 40 -88 88v824c0 48 40 88 88 88h824c48 0 88 -40 88 -88z" />
|
210 |
+
<glyph glyph-name="s" unicode="s"
|
211 |
+
d="M783 175c0 245 -402 165 -402 282c0 51 73 65 112 65c146 0 101 -120 192 -120c36 0 69 28 69 65c0 19 -6 38 -15 54c-44 80 -153 105 -237 105c-113 0 -265 -41 -265 -181c0 -237 395 -147 395 -284c0 -63 -81 -83 -132 -83c-163 0 -109 145 -206 145
|
212 |
+
c-36 0 -70 -24 -70 -62c0 -31 13 -60 31 -85c57 -82 154 -104 249 -104c126 0 279 52 279 203zM1000 73c0 -152 -126 -273 -277 -273c-45 0 -90 11 -130 32c-29 -5 -58 -8 -88 -8c-260 0 -477 208 -477 471c0 32 4 63 10 94c-25 42 -38 90 -38 138c0 152 126 273 277 273
|
213 |
+
c51 0 103 -14 147 -42c27 5 54 7 81 7c261 0 477 -208 477 -470c0 -34 -3 -68 -11 -101c19 -38 29 -79 29 -121z" />
|
214 |
+
<glyph glyph-name="t" unicode="t" horiz-adv-x="1003"
|
215 |
+
d="M1003 240c-31 -34 -75 -47 -120 -46c-51 -212 -275 -336 -482 -336c-161 0 -306 72 -401 204c48 -46 114 -72 181 -72c73 0 141 30 191 83c-27 -4 -72 8 -72 42c0 22 23 37 41 45c-52 -6 -100 14 -124 62c19 21 42 26 69 28c-57 14 -101 42 -112 102c17 5 35 8 53 8h8
|
216 |
+
c-44 24 -88 67 -86 121l1 8c87 -33 175 -70 257 -116c28 -16 53 -40 76 -63c32 88 76 196 157 249c-1 -12 -7 -22 -15 -31c21 20 49 34 78 38c-3 -22 -34 -34 -53 -41c25 8 59 25 84 25c7 0 15 -2 15 -11c0 -18 -69 -33 -87 -40c114 12 198 -93 218 -194c12 -4 24 -6 36 -6
|
217 |
+
c23 0 62 7 83 19c-18 -43 -66 -63 -110 -66c25 -11 57 -15 83 -15c10 0 21 1 31 3z" />
|
218 |
+
<glyph glyph-name="u" unicode="u" horiz-adv-x="963"
|
219 |
+
d="M741 -199v1000h222v-1000h-222zM593 -199h-223v667h223v-667zM222 -199h-222v333h222v-333z" />
|
220 |
+
<glyph glyph-name="v" unicode="v"
|
221 |
+
d="M605 187c0 -85 -94 -77 -153 -77h-22v150h51c57 0 124 3 124 -73zM567 430c0 -68 -56 -67 -107 -67h-30v127h39c44 0 98 0 98 -60zM760 184c0 79 -46 129 -123 145v3c53 22 83 72 83 129c0 128 -122 139 -221 139h-219v-600h240c119 0 240 44 240 184zM1000 712v-824
|
222 |
+
c0 -48 -40 -88 -88 -88h-824c-48 0 -88 40 -88 88v824c0 48 40 88 88 88h824c48 0 88 -40 88 -88z" />
|
223 |
+
<glyph glyph-name="w" unicode="w" horiz-adv-x="582"
|
224 |
+
d="M582 388v-356c0 -22 -9 -32 -32 -32h-518c-22 0 -32 10 -32 32v356c0 23 10 33 32 33h389v194c0 73 -65 97 -128 97s-131 -29 -131 -102v-125h-97v128h1c12 118 112 194 227 194c120 0 211 -99 222 -214h1l2 -172c29 0 64 8 64 -33z" />
|
225 |
+
<glyph glyph-name="x" unicode="x" horiz-adv-x="582"
|
226 |
+
d="M421 550c0 73 -65 97 -128 97s-131 -29 -131 -102v-124h259v129zM582 388v-356c0 -22 -9 -32 -32 -32h-518c-22 0 -32 10 -32 32v356c0 41 36 33 65 33v127h1c12 118 112 194 227 194c120 0 211 -98 222 -214h1l2 -107c29 0 64 8 64 -33z" />
|
227 |
+
<glyph glyph-name="y" unicode="y"
|
228 |
+
d="M611 90v-133c0 -13 -4 -21 -18 -21c-12 0 -17 3 -25 11v158c6 6 13 10 22 10c16 0 21 -10 21 -25zM802 87v-28h-45v28c0 16 5 27 23 27c17 0 22 -12 22 -27zM258 192h61v50h-179v-50h60v-293h58v293zM414 -101h51v253h-51v-192c-7 -8 -19 -19 -31 -19c-11 0 -13 8 -13 17
|
229 |
+
v194h-52v-213c0 -23 10 -44 36 -44c21 0 46 17 60 32v-28zM664 -48v140c0 33 -12 63 -50 63c-18 0 -34 -10 -46 -23v110h-52v-343h52v20c15 -16 27 -23 49 -23c35 0 47 24 47 56zM855 -29v19h-53c0 -21 7 -53 -23 -53c-22 0 -22 18 -22 35v48h98v64c0 46 -26 75 -73 75
|
230 |
+
c-45 0 -79 -29 -79 -75v-113c0 -47 26 -79 75 -79c52 0 77 28 77 79zM926 62c0 -48 -3 -97 -6 -145c-5 -68 -58 -108 -123 -111c-99 -5 -198 -5 -297 -5s-199 0 -297 5c-65 3 -118 43 -123 111c-3 48 -6 97 -6 145s3 97 6 145c5 68 58 108 123 111c98 5 198 5 297 5
|
231 |
+
s199 0 297 -5c65 -3 118 -43 123 -111c3 -48 6 -97 6 -145zM315 801h73l-55 -165c-11 -33 -21 -50 -28 -83c-1 -8 0 -159 0 -176h-72c0 16 1 162 0 168c-7 34 -17 52 -29 85l-57 171h73l46 -169h5zM505 450v171c0 14 -15 23 -28 23s-26 -9 -26 -23v-171c0 -16 10 -26 26 -26
|
232 |
+
c17 0 28 8 28 26zM570 617v-162c0 -58 -38 -86 -93 -86c-53 0 -92 32 -92 87v162c0 55 45 80 95 80c48 0 90 -30 90 -81zM807 690v-313h-64v35c-19 -20 -45 -39 -74 -39c-34 0 -45 26 -45 56v261h64v-240c0 -12 3 -21 17 -21c12 0 30 15 38 24v237h64z" />
|
233 |
+
<glyph glyph-name="z" unicode="z"
|
234 |
+
d="M1000 235v-9l-426 -426h-565l-9 9v565l426 426h9l139 -139zM574 384v277h-277l-10 -9v-555l10 -10h555l9 10v268l-9 9h-268z" />
|
235 |
+
<glyph glyph-name="braceleft" unicode="{" horiz-adv-x="471"
|
236 |
+
d="M235 182l-235 236h471z" />
|
237 |
+
<glyph glyph-name="braceright" unicode="}" horiz-adv-x="471"
|
238 |
+
d="M471 182h-471l235 236z" />
|
239 |
+
<glyph glyph-name="asciitilde" unicode="~"
|
240 |
+
d="M412 360h103l-162 265l-162 -265h103v-294h118v294zM647 7l162 236h-103v293h-118v-293h-103zM1000 301c0 -276 -224 -500 -500 -500s-500 224 -500 500s224 500 500 500s500 -224 500 -500z" />
|
241 |
+
<glyph glyph-name="quotesingle" unicode="'"
|
242 |
+
d="M654 300l346 -346l-154 -154l-346 346l-346 -346l-154 154l346 346l-346 346l154 154l346 -346l346 346l154 -154z" />
|
243 |
+
<glyph glyph-name="grave" unicode="`"
|
244 |
+
d="M848 241h-142v118h142c-25 147 -142 264 -289 289v-142h-118v142c-147 -25 -264 -142 -289 -289h142v-118h-142c25 -147 142 -264 289 -289v142h118v-142c147 25 264 142 289 289zM1000 300c0 -276 -224 -500 -500 -500s-500 224 -500 500s224 500 500 500
|
245 |
+
s500 -224 500 -500z" />
|
246 |
+
<glyph glyph-name="onesuperior" unicode="¹"
|
247 |
+
d="M120 -79h200v200h-200v-200zM440 241v-440h-440v440h440zM680 -79h200v200h-200v-200zM1000 241v-440h-440v440h440zM120 481h200v200h-200v-200zM440 801v-440h-440v440h440zM680 481h200v200h-200v-200zM1000 801v-440h-440v440h440z" />
|
248 |
+
<glyph glyph-name="twosuperior" unicode="²"
|
249 |
+
d="M1000 -39v-160h-1000v160h1000zM1000 241v-160h-1000v160h1000zM1000 521v-160h-1000v160h1000zM1000 801v-160h-1000v160h1000z" />
|
250 |
+
<glyph glyph-name="multiply" unicode="×"
|
251 |
+
d="M661 68l71 71l-161 161l161 161l-71 71l-161 -161l-161 161l-71 -71l161 -161l-161 -161l71 -71l161 161zM1000 300c0 -276 -224 -500 -500 -500s-500 224 -500 500s224 500 500 500s500 -224 500 -500z" />
|
252 |
+
<glyph glyph-name="threesuperior" unicode="³"
|
253 |
+
d="M120 -79h200v200h-200v-200zM440 241v-440h-440v440h440zM1000 -39v-160h-440v160h440zM120 481h200v200h-200v-200zM440 801v-440h-440v440h440zM1000 241v-160h-440v160h440zM1000 521v-160h-440v160h440zM1000 801v-160h-440v160h440z" />
|
254 |
+
<glyph glyph-name="uni007F"
|
255 |
+
/>
|
256 |
+
</font>
|
257 |
+
</defs></svg>
|
css/fonts/WebSymbols-Regular.ttf
ADDED
Binary file
|
css/fonts/WebSymbols-Regular.woff
ADDED
Binary file
|
css/frontend.css
ADDED
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
To change this license header, choose License Headers in Project Properties.
|
3 |
+
To change this template file, choose Tools | Templates
|
4 |
+
and open the template in the editor.
|
5 |
+
*/
|
6 |
+
/*
|
7 |
+
Created on : Mar 6, 2015, 2:37:38 PM
|
8 |
+
Author : sagar
|
9 |
+
*/
|
10 |
+
.aptf-single-tweet-wrapper{
|
11 |
+
/*background: #FFF;*/
|
12 |
+
clear: both;
|
13 |
+
float: left;
|
14 |
+
margin-bottom: 20px;
|
15 |
+
width: 100%;
|
16 |
+
}
|
17 |
+
.aptf-tweet-content a{
|
18 |
+
border-bottom: none !important;
|
19 |
+
color: #00B0ED !important;
|
20 |
+
-webkit-transition: all 1s ease;/* Safari 3.2+, Chrome */
|
21 |
+
-moz-transition: all 1s ease;/* Firefox 4-15 */
|
22 |
+
-o-transition: all 1s ease;/* Opera 10.5-12.00 */
|
23 |
+
transition: all 1s ease;/* Firefox 16+, Opera 12.50+ */
|
24 |
+
}
|
25 |
+
.aptf-tweet-date{
|
26 |
+
float: left;
|
27 |
+
}
|
28 |
+
.aptf-tweet-date p{
|
29 |
+
margin-bottom: 0;
|
30 |
+
}
|
31 |
+
.aptf-tweet-actions-wrapper{
|
32 |
+
float: right;
|
33 |
+
}
|
34 |
+
.aptf-tweet-content .aptf-tweet-name{
|
35 |
+
border-bottom: none !important;
|
36 |
+
color: #333;
|
37 |
+
font-weight: bold;
|
38 |
+
text-decoration: none !important;
|
39 |
+
}
|
40 |
+
.aptf-tweet-username{
|
41 |
+
font-size: 80%;
|
42 |
+
color: #999;
|
43 |
+
}
|
44 |
+
.aptf-tweet-actions {
|
45 |
+
font-family: 'WebSymbols-Regular';
|
46 |
+
color: #333;
|
47 |
+
}
|
48 |
+
.aptf-tweet-actions a {
|
49 |
+
border-bottom: none !important;
|
50 |
+
color: #999;
|
51 |
+
text-decoration: none !important;
|
52 |
+
}
|
53 |
+
.aptf-timestamp{
|
54 |
+
margin-bottom: 0 !important;
|
55 |
+
}
|
56 |
+
.aptf-timestamp a{
|
57 |
+
border-bottom: none !important;
|
58 |
+
text-decoration: none !important;
|
59 |
+
}
|
60 |
+
.aptf-template-1 .aptf-tweet-content{
|
61 |
+
background: #EEE;
|
62 |
+
position: relative;
|
63 |
+
border: 1px solid #CCC;
|
64 |
+
border-radius: 5px;
|
65 |
+
padding: 15px;
|
66 |
+
}
|
67 |
+
.aptf-template-1 .aptf-tweet-content:after{
|
68 |
+
content: ' ';
|
69 |
+
border-left: 10px solid transparent;
|
70 |
+
border-right: 10px solid transparent;
|
71 |
+
border-top: 10px solid #EEE;
|
72 |
+
bottom: -10px;
|
73 |
+
height: 0;
|
74 |
+
position: absolute;
|
75 |
+
width: 0;
|
76 |
+
}
|
77 |
+
.aptf-template-1 .aptf-tweet-content:after, .aptf-template-1 .aptf-tweet-content:before{
|
78 |
+
top: 100%;
|
79 |
+
left: 30px;
|
80 |
+
border: solid transparent;
|
81 |
+
content: " ";
|
82 |
+
height: 0;
|
83 |
+
width: 0;
|
84 |
+
position: absolute;
|
85 |
+
pointer-events: none;
|
86 |
+
}
|
87 |
+
.aptf-template-1 .aptf-tweet-content:after{
|
88 |
+
border-color: rgba(238, 238, 238, 0);
|
89 |
+
border-top-color: #EEE;
|
90 |
+
border-width: 10px;
|
91 |
+
margin-left: -10px;
|
92 |
+
}
|
93 |
+
.aptf-template-1 .aptf-tweet-content:before{
|
94 |
+
border-color: rgba(204, 204, 204, 0);
|
95 |
+
border-top-color: #CCC;
|
96 |
+
border-width: 11px;
|
97 |
+
margin-left: -11px;
|
98 |
+
}
|
99 |
+
.aptf-template-1 .aptf-tweet-actions{
|
100 |
+
background: none repeat scroll 0 0 #fff;
|
101 |
+
border-radius: 20px;
|
102 |
+
display: none;
|
103 |
+
padding: 2px 10px;
|
104 |
+
position: absolute;
|
105 |
+
right: 15px;
|
106 |
+
top: 10px;
|
107 |
+
}
|
108 |
+
.aptf-template-1 .aptf-tweet-content:hover .aptf-tweet-actions{
|
109 |
+
display: block;
|
110 |
+
}
|
111 |
+
.aptf-template-1 .aptf-tweet-name, .aptf-slider-template-3 .aptf-tweet-name{
|
112 |
+
border-bottom: medium none !important;
|
113 |
+
display: inline-block;
|
114 |
+
font-weight: bold;
|
115 |
+
padding-top: 10px;
|
116 |
+
text-decoration: none;
|
117 |
+
}
|
118 |
+
.aptf-template-1 .aptf-tweet-date, .aptf-slider-template-3 .aptf-tweet-date{
|
119 |
+
display: inline-block;
|
120 |
+
float: none;
|
121 |
+
}
|
122 |
+
|
123 |
+
.aptf-template-3 .aptf-single-tweet-wrapper{
|
124 |
+
border: 1px solid #b2dbe9;
|
125 |
+
border-radius: 10px;
|
126 |
+
clear: both;
|
127 |
+
color: #333;
|
128 |
+
float: left;
|
129 |
+
margin-bottom: 20px;
|
130 |
+
padding: 10px;
|
131 |
+
width: 100%;
|
132 |
+
|
133 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=90, Color=#b8b8b8)";/*IE 8*/
|
134 |
+
-moz-box-shadow: 0px 0px 4px #b8b8b8;/*FF 3.5+*/
|
135 |
+
-webkit-box-shadow: 0px 0px 4px #b8b8b8;/*Saf3-4, Chrome, iOS 4.0.2-4.2, Android 2.3+*/
|
136 |
+
box-shadow: 0px 0px 4px #b8b8b8;/* FF3.5+, Opera 9+, Saf1+, Chrome, IE10 */
|
137 |
+
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=90, Color=#b8b8b8); /*IE 5.5-7*/
|
138 |
+
}
|
139 |
+
|
140 |
+
.aptf-template-3 .aptf-timestamp{
|
141 |
+
margin-bottom: 0;
|
142 |
+
font-size: 80%;
|
143 |
+
color: #999;
|
144 |
+
display: inline-block;
|
145 |
+
}
|
146 |
+
.aptf-template-3 .aptf-tweet-actions-wrapper{
|
147 |
+
float: none;
|
148 |
+
padding: 10px 0 5px;
|
149 |
+
font-size: 80%;
|
150 |
+
}
|
151 |
+
.aptf-template-3 .aptf-tweet-actions-wrapper a{
|
152 |
+
margin-right: 5px;
|
153 |
+
}
|
154 |
+
|
155 |
+
.aptf-tweets-slider-wrapper .aptf-timestamp{
|
156 |
+
margin-bottom: 0;
|
157 |
+
font-size: 80%;
|
158 |
+
color: #999;
|
159 |
+
display: inline-block;
|
160 |
+
}
|
161 |
+
.aptf-tweets-slider-wrapper .aptf-timestamp p{
|
162 |
+
margin-bottom: 0;
|
163 |
+
}
|
164 |
+
.aptf-slider-template-2 .aptf-single-tweet-slide{
|
165 |
+
border: 1px solid #b2dbe9;
|
166 |
+
border-radius: 10px;
|
167 |
+
color: #333;
|
168 |
+
padding: 10px;
|
169 |
+
}
|
170 |
+
|
171 |
+
.aptf-slider-template-3 .aptf-single-tweet-wrapper{
|
172 |
+
clear: none;
|
173 |
+
}
|
174 |
+
|
175 |
+
.aptf-slider-template-3 .aptf-tweet-content{
|
176 |
+
background: #EEE;
|
177 |
+
position: relative;
|
178 |
+
border: 1px solid #CCC;
|
179 |
+
border-radius: 5px;
|
180 |
+
padding: 15px;
|
181 |
+
}
|
182 |
+
.aptf-slider-template-3 .aptf-tweet-content:after{
|
183 |
+
content: ' ';
|
184 |
+
border-left: 10px solid transparent;
|
185 |
+
border-right: 10px solid transparent;
|
186 |
+
border-top: 10px solid #EEE;
|
187 |
+
bottom: -10px;
|
188 |
+
height: 0;
|
189 |
+
position: absolute;
|
190 |
+
width: 0;
|
191 |
+
}
|
192 |
+
.aptf-template-3 .aptf-tweet-content:after, .aptf-slider-template-3 .aptf-tweet-content:before {
|
193 |
+
top: 100%;
|
194 |
+
left: 0;
|
195 |
+
border: solid transparent;
|
196 |
+
content: " ";
|
197 |
+
height: 0;
|
198 |
+
width: 0;
|
199 |
+
position: absolute;
|
200 |
+
pointer-events: none;
|
201 |
+
}
|
202 |
+
.aptf-slider-template-3 .aptf-tweet-content:after{
|
203 |
+
border-color: rgba(238, 238, 238, 0);
|
204 |
+
border-top-color: #EEE;
|
205 |
+
border-width: 10px;
|
206 |
+
margin-left: -3px;
|
207 |
+
}
|
208 |
+
.aptf-slider-template-3 .aptf-tweet-content:before{
|
209 |
+
border-color: rgba(204, 204, 204, 0);
|
210 |
+
border-top-color: #CCC;
|
211 |
+
border-width: 11px;
|
212 |
+
margin-left: 11px;
|
213 |
+
}
|
214 |
+
.aptf-slider-template-3 .aptf-tweet-actions{
|
215 |
+
background: none repeat scroll 0 0 #fff;
|
216 |
+
border-radius: 20px;
|
217 |
+
display: none;
|
218 |
+
padding: 2px 10px;
|
219 |
+
position: absolute;
|
220 |
+
right: 15px;
|
221 |
+
top: 10px;
|
222 |
+
}
|
223 |
+
.aptf-slider-template-3 .aptf-tweet-content:hover .aptf-tweet-actions{
|
224 |
+
display: block;
|
225 |
+
}
|
226 |
+
.aptf-slider-template-3 .aptf-tweet-name{
|
227 |
+
border-bottom: medium none !important;
|
228 |
+
display: inline-block;
|
229 |
+
font-weight: bold;
|
230 |
+
padding-top: 10px;
|
231 |
+
}
|
232 |
+
.aptf-slider-template-3 .aptf-tweet-date{
|
233 |
+
display: inline-block;
|
234 |
+
float: none;
|
235 |
+
}
|
236 |
+
.aptf-tweet-box {
|
237 |
+
color: #333;
|
238 |
+
}
|
239 |
+
.aptf-follow-btn{
|
240 |
+
background-color: #eee;
|
241 |
+
background-image: linear-gradient(#fff, #dedede);
|
242 |
+
border: 1px solid #ccc;
|
243 |
+
border-radius: 3px;
|
244 |
+
|
245 |
+
-webkit-box-sizing: border-box;
|
246 |
+
-moz-box-sizing: border-box;
|
247 |
+
box-sizing: border-box;
|
248 |
+
|
249 |
+
color: #333;
|
250 |
+
cursor: pointer;
|
251 |
+
display: inline-block;
|
252 |
+
font: bold 13px/37px "Helvetica Neue",Arial,sans-serif;
|
253 |
+
height: 40px;
|
254 |
+
overflow: hidden;
|
255 |
+
position: relative;
|
256 |
+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
257 |
+
max-width: 100%;
|
258 |
+
}
|
259 |
+
.aptf-follow-btn a{
|
260 |
+
border-bottom: none !important;
|
261 |
+
text-decoration: none !important;
|
262 |
+
}
|
263 |
+
.aptf-follow-btn i {
|
264 |
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAoCAYAAABq13MpAAAGcklEQVRYw+2YXUyTVxjHz4vJLiZGd7MtXi2LkZtdELM7lyzOG7Nk2RJvl8iujBiNV2JcMA0fwqCFEGCAfJRC+SyltqWFgnwUlIKAWB3yOVrAttQWC1ZCOi6ePc8LL74tVD6ly2KTf87J6Tnv+3uf8zzP+WAAwEhMIj8h1MViEs0Jlqi+we5oJFjGCX3D9X+fmKTmq/f/rzkRlX5fzkmNPhLVqW2DQ1Ify9eFAZ8kafUsURMX+qCo1BYry3oILKcfmLQb2N3Wzqhk48xn6YbLuwJO1cQeydAvURkWONtk5UoGgKsaXRPWo3LarVHSJvkRmXHm+6pHV3h4YdDp0gE7D5XUJPo6QyzLfwKscgZY1UtgChuwkjH4tOhpQPp4Nn430GeU/TcJ4sif5iV2V/NL6P/H81oTOIUVuPsO4AyeNVG9ehw4xTP4oubZ268VFiP2jd4Y9Hufw8TKJoAgufT2RZZikJ8s7JMzxTQw1QKwhtdrZY0Likd9Azjm1G6gpcOz8VzdFHC1E8AV9gKXYdCI3eWc9q96Tj0DnHEBuObXa6J60yvgtC740Tw3jf0Sgtzj89JhK6tyAKt2Ag9f+AxY8SgPyQMLUs5hd/hut/5MH3mp3z3H6eeBa7ADV/4UuNxO4DINw1GyZklMw/MhTut8BywCj2mb9wvAQdBN0z5ldJ1zlbemygusdn5NVBeA8b/Tart/D8CMyVrjjteNeo81v1rljF7gdC7gVNPAKUeAdwuaAb17MzS6yTdGmzPoWWJLXLG8Go9We1aDLCtWnRskA27zXqCfuP0Xj9ZNBHgwwQWE6acP4Nu9m6FxZn7tmbWEg2Zpg670U1rXUpB1xVbWOsjKF/YCTQHU5X5rjmn3+IP8djthMJaNe+6EhUbFmub8jefaPZ5NbtHk8TuX/1HsEZiXetJz5rc+11BMxw7Bsc+3bS99oUH/bgGRYCL/o93Hp7gKO7B6zzqwF342L7jWgaP3A03jzxrGTJzm5dausIVrlP/tU22KD+FhFJ1djjfma4/mbdf6vbZrgz6bbOTN6IvFgGU9cvcLLOjqi6WA5bp10RbTuRDe4vhR1594bTT74aA3ghEVJxL575cHBLuhC3rr+bPN06ajOkdgS4tj26UB79w6A9sO+oMpKk0j5zKbOrksk48reLiW6mjFE0Oj1U+2elbK7P7nNCNh0+dhQZOLSa0u3U8dttmTOvsKv5DQUo2gx0wLqz88eu2RTbwZxX412y1ehwnN1mES1sE6RdKjkneaTg8b+kD0Efoj9P8WWiKRbHnmo/bExMQbWEqwjBPawvU/VOjk5GQ9gmxagdLS0qzZ2dmQm5sLWVlZkJ6e3pmamjqD5eWIQ8vlcjtBpaSkyAUrIlxsQUEBKJVKqK6uhsrKSigrK4Pi4uLA48eP4yMO3dfXZyovLweCzMjIWCT4e/fuySsqKkCtVkNjYyNf1tXVwdjY2K7PiB8EurS01FpTUwO1tbVA8AgM2MZDErAgsvgez4gHD22325UqlWqVrEmqr6/nJVhZsDSW/v288NatW++9sFkPcjm6po9EdcFdqbx9+3Zs0LbUYrGMazSaVbFlxcKPgqGhIfNegfGlsRjwS1SGA6bAz8/P52eZRHV0Vyu5KyUA9IIrQYMGBwfT9Xr9kti6YivrdLr9nBEZBvHNvLw8ykIEvunCRiaTJRQVFQG5aUNDAy+qU/CTuyLwWyyNm86IDoejsaOjwxPqFkaj0b+8vLyvMyIaJV6hUPAxk5OTA2g5DcJvuAvOZD1lqtB30wxTbLW1tfEXNhvTkpSUJM/MzPQJKY6+UhjU3d3tWgfe75HrVE9PzxzFCr2jsLAQpFIppdlh/ABJVVXVECWCrWYZPcAfesPEnxHRyube3l4b5mAbWsU2ir/FxcUDOyOiv8ahpb0UN0L6pJRaUlIC5BY0A2TVUGgyII5xRuSM6Ha7LyJkgMDEuV+YfnG7WDQzDx48sERqwxTtdDrNFB9bwYUTBSNO+p2I7fImJyfPoF8PNTc37wic+hgMhqALm0isaNEIY6KVdSfQ5BoTExOq/8J++ioFOAV7S0tLWItTOyWF0AubiO0fMOjO42JlwgAMhFvMMJNteWFzqKC0j8Cc3Il7cR/t0SnVUZCFLiaYk1empqbCXtgctoUTcO+iQ5eYRUuv0EJCOZhAtVrtaldXl2dkZGTbC5tIuMa+L2z+BexZXK+OBaruAAAAAElFTkSuQmCC") no-repeat scroll 0 0 transparent;
|
265 |
+
height: 13px;
|
266 |
+
left: 6px;
|
267 |
+
margin-top: -5px;
|
268 |
+
position: absolute;
|
269 |
+
top: 50%;
|
270 |
+
width: 16px;
|
271 |
+
}
|
272 |
+
.aptf-follow-btn .label {
|
273 |
+
padding: 0 10px 0 25px;
|
274 |
+
white-space: nowrap;
|
275 |
+
}
|
276 |
+
.aptf-center-align {
|
277 |
+
text-align: center;
|
278 |
+
}
|
279 |
+
.aptf-seperator{
|
280 |
+
padding: 8px;
|
281 |
+
}
|
css/images/Thumbs.db
ADDED
Binary file
|
css/images/bx_loader.gif
ADDED
Binary file
|
css/images/controls.png
ADDED
Binary file
|
css/images/icon.png
ADDED
Binary file
|
css/images/logo.png
ADDED
Binary file
|
css/images/next.png
ADDED
Binary file
|
css/images/prev.png
ADDED
Binary file
|
css/jquery.bxslider.css
ADDED
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* BxSlider v4.1.2 - Fully loaded, responsive content slider
|
3 |
+
* http://bxslider.com
|
4 |
+
*
|
5 |
+
* Written by: Steven Wanderski, 2014
|
6 |
+
* http://stevenwanderski.com
|
7 |
+
* (while drinking Belgian ales and listening to jazz)
|
8 |
+
*
|
9 |
+
* CEO and founder of bxCreative, LTD
|
10 |
+
* http://bxcreative.com
|
11 |
+
*/
|
12 |
+
|
13 |
+
|
14 |
+
/** RESET AND LAYOUT
|
15 |
+
===================================*/
|
16 |
+
|
17 |
+
.bx-wrapper {
|
18 |
+
position: relative;
|
19 |
+
/*margin: 0 auto 60px;
|
20 |
+
padding: 0;
|
21 |
+
*zoom: 1;*/
|
22 |
+
}
|
23 |
+
|
24 |
+
.bx-wrapper img {
|
25 |
+
max-width: 100%;
|
26 |
+
display: block;
|
27 |
+
}
|
28 |
+
|
29 |
+
/** THEME
|
30 |
+
===================================*/
|
31 |
+
|
32 |
+
.bx-wrapper .bx-viewport {
|
33 |
+
/*-moz-box-shadow: 0 0 5px #ccc;
|
34 |
+
-webkit-box-shadow: 0 0 5px #ccc;
|
35 |
+
box-shadow: 0 0 5px #ccc;
|
36 |
+
|
37 |
+
left: -5px;
|
38 |
+
background: #fff;
|
39 |
+
border: 1px solid #fff;*/
|
40 |
+
/*fix other elements on the page moving (on Chrome)*/
|
41 |
+
-webkit-transform: translatez(0);
|
42 |
+
-moz-transform: translatez(0);
|
43 |
+
-ms-transform: translatez(0);
|
44 |
+
-o-transform: translatez(0);
|
45 |
+
transform: translatez(0);
|
46 |
+
}
|
47 |
+
|
48 |
+
.bx-wrapper .bx-pager,
|
49 |
+
.bx-wrapper .bx-controls-auto {
|
50 |
+
position: absolute;
|
51 |
+
bottom: -30px;
|
52 |
+
width: 100%;
|
53 |
+
}
|
54 |
+
|
55 |
+
/* LOADER */
|
56 |
+
|
57 |
+
.bx-wrapper .bx-loading {
|
58 |
+
min-height: 50px;
|
59 |
+
background: url(images/bx_loader.gif) center center no-repeat #fff;
|
60 |
+
height: 100%;
|
61 |
+
width: 100%;
|
62 |
+
position: absolute;
|
63 |
+
top: 0;
|
64 |
+
left: 0;
|
65 |
+
z-index: 2000;
|
66 |
+
}
|
67 |
+
|
68 |
+
/* PAGER */
|
69 |
+
|
70 |
+
.bx-wrapper .bx-pager {
|
71 |
+
text-align: center;
|
72 |
+
font-size: .85em;
|
73 |
+
font-family: Arial;
|
74 |
+
font-weight: bold;
|
75 |
+
color: #666;
|
76 |
+
padding-top: 20px;
|
77 |
+
}
|
78 |
+
|
79 |
+
.bx-wrapper .bx-pager .bx-pager-item,
|
80 |
+
.bx-wrapper .bx-controls-auto .bx-controls-auto-item {
|
81 |
+
display: inline-block;
|
82 |
+
*zoom: 1;
|
83 |
+
*display: inline;
|
84 |
+
}
|
85 |
+
|
86 |
+
.bx-wrapper .bx-pager.bx-default-pager a {
|
87 |
+
background: #666;
|
88 |
+
text-indent: -9999px;
|
89 |
+
display: block;
|
90 |
+
width: 10px;
|
91 |
+
height: 10px;
|
92 |
+
margin: 0 5px;
|
93 |
+
outline: 0;
|
94 |
+
-moz-border-radius: 5px;
|
95 |
+
-webkit-border-radius: 5px;
|
96 |
+
border-radius: 5px;
|
97 |
+
}
|
98 |
+
|
99 |
+
.bx-wrapper .bx-pager.bx-default-pager a:hover,
|
100 |
+
.bx-wrapper .bx-pager.bx-default-pager a.active {
|
101 |
+
background: #000;
|
102 |
+
}
|
103 |
+
|
104 |
+
/* DIRECTION CONTROLS (NEXT / PREV) */
|
105 |
+
|
106 |
+
.bx-wrapper .bx-prev {
|
107 |
+
right: 20px;
|
108 |
+
background: url(images/prev.png) no-repeat;
|
109 |
+
}
|
110 |
+
|
111 |
+
.bx-wrapper .bx-next {
|
112 |
+
right: 0px;
|
113 |
+
background: url(images/next.png) no-repeat;
|
114 |
+
}
|
115 |
+
|
116 |
+
.bx-wrapper .bx-prev:hover {
|
117 |
+
background-position: 0 0;
|
118 |
+
opacity: 1;
|
119 |
+
}
|
120 |
+
|
121 |
+
.bx-wrapper .bx-next:hover {
|
122 |
+
background-position: 0 0;
|
123 |
+
opacity: 1;
|
124 |
+
}
|
125 |
+
|
126 |
+
.bx-wrapper .bx-controls-direction a {
|
127 |
+
border-bottom: medium none;
|
128 |
+
height: 16px;
|
129 |
+
margin-top: -8px;
|
130 |
+
outline: 0 none;
|
131 |
+
position: absolute;
|
132 |
+
text-indent: -9999px;
|
133 |
+
top: -10px;
|
134 |
+
width: 16px;
|
135 |
+
z-index: 9999;
|
136 |
+
opacity: 0.5;
|
137 |
+
}
|
138 |
+
|
139 |
+
.bx-wrapper .bx-controls-direction a.disabled {
|
140 |
+
display: none;
|
141 |
+
}
|
142 |
+
|
143 |
+
/* AUTO CONTROLS (START / STOP) */
|
144 |
+
|
145 |
+
.bx-wrapper .bx-controls-auto {
|
146 |
+
text-align: center;
|
147 |
+
}
|
148 |
+
|
149 |
+
.bx-wrapper .bx-controls-auto .bx-start {
|
150 |
+
display: block;
|
151 |
+
text-indent: -9999px;
|
152 |
+
width: 10px;
|
153 |
+
height: 11px;
|
154 |
+
outline: 0;
|
155 |
+
background: url(images/controls.png) -86px -11px no-repeat;
|
156 |
+
margin: 0 3px;
|
157 |
+
}
|
158 |
+
|
159 |
+
.bx-wrapper .bx-controls-auto .bx-start:hover,
|
160 |
+
.bx-wrapper .bx-controls-auto .bx-start.active {
|
161 |
+
background-position: -86px 0;
|
162 |
+
}
|
163 |
+
|
164 |
+
.bx-wrapper .bx-controls-auto .bx-stop {
|
165 |
+
display: block;
|
166 |
+
text-indent: -9999px;
|
167 |
+
width: 9px;
|
168 |
+
height: 11px;
|
169 |
+
outline: 0;
|
170 |
+
background: url(images/controls.png) -86px -44px no-repeat;
|
171 |
+
margin: 0 3px;
|
172 |
+
}
|
173 |
+
|
174 |
+
.bx-wrapper .bx-controls-auto .bx-stop:hover,
|
175 |
+
.bx-wrapper .bx-controls-auto .bx-stop.active {
|
176 |
+
background-position: -86px -33px;
|
177 |
+
}
|
178 |
+
|
179 |
+
/* PAGER WITH AUTO-CONTROLS HYBRID LAYOUT */
|
180 |
+
|
181 |
+
.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-pager {
|
182 |
+
text-align: left;
|
183 |
+
width: 80%;
|
184 |
+
}
|
185 |
+
|
186 |
+
.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-controls-auto {
|
187 |
+
right: 0;
|
188 |
+
width: 35px;
|
189 |
+
}
|
190 |
+
|
191 |
+
/* IMAGE CAPTIONS */
|
192 |
+
|
193 |
+
.bx-wrapper .bx-caption {
|
194 |
+
position: absolute;
|
195 |
+
bottom: 0;
|
196 |
+
left: 0;
|
197 |
+
background: #666\9;
|
198 |
+
background: rgba(80, 80, 80, 0.75);
|
199 |
+
width: 100%;
|
200 |
+
}
|
201 |
+
|
202 |
+
.bx-wrapper .bx-caption span {
|
203 |
+
color: #fff;
|
204 |
+
font-family: Arial;
|
205 |
+
display: block;
|
206 |
+
font-size: .85em;
|
207 |
+
padding: 10px;
|
208 |
+
}
|
images/aplite.png
ADDED
Binary file
|
images/appro.png
ADDED
Binary file
|
images/flicker.png
ADDED
Binary file
|
images/googleplus.png
ADDED
Binary file
|
images/icon.png
ADDED
Binary file
|
images/logo.png
ADDED
Binary file
|
images/pinterest.png
ADDED
Binary file
|
images/twitter.png
ADDED
Binary file
|
inc/backend/boards/about.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="aptf-single-board-wrapper" id="aptf-about-board" style="display: none">
|
2 |
+
<h3><?php _e('About', APTF_TD); ?></h3>
|
3 |
+
|
4 |
+
<p><strong>AccessPress Twitter Feed </strong> - is a FREE WordPress Plugin by AccessPress Themes. </p>
|
5 |
+
|
6 |
+
<p>AccessPress Themes is a venture of Access Keys - who has developed hundreds of Custom WordPress themes and plugins for its clients over the years. </p>
|
7 |
+
|
8 |
+
<p><strong>AccessPress Twitter Feed</strong> is a <strong>FREE</strong> <strong>Twitter plugin</strong> for <strong>WordPress</strong>. It just takes a few minute to set it up and use. Start strong Twitter integration right on your website and increase your social reach to next level.</p>
|
9 |
+
<div class="halfseperator"></div>
|
10 |
+
<p><strong>Please visit our product page for more details here:</strong><br />
|
11 |
+
<a href="https://accesspressthemes.com/wordpress-plugins/accesspress-twitter-feed/" target="_blank">https://accesspressthemes.com/wordpress-plugins/accesspress-twitter-feed/</a></p>
|
12 |
+
<div class="halfseperator"></div>
|
13 |
+
|
14 |
+
<div class="halfseperator"></div>
|
15 |
+
|
16 |
+
|
17 |
+
<h3>Other products by AccessPress themes </h3>
|
18 |
+
<div class="product">
|
19 |
+
<div class="logo-product"><img src="<?php echo APTF_IMAGE_DIR; ?>/aplite.png" alt="<?php esc_attr_e('AccessPress Anonymous Post', 'aps-counter'); ?>" /></div>
|
20 |
+
<div class="productext"><p><strong>AccessPress Lite</strong> - A very popular Free WordPress theme, available in WordPress.org<br />
|
21 |
+
<a href="http://accesspressthemes.com/wordpress-themes/accesspress-lite/" target="_blank">http://accesspressthemes.com/wordpress-themes/accesspress-lite/</a></p>
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
|
25 |
+
<div class="product">
|
26 |
+
<div class="logo-product"><img src="<?php echo APTF_IMAGE_DIR; ?>/appro.png" alt="<?php esc_attr_e('AccessPress Social Counter', 'aps-counter'); ?>" /></div>
|
27 |
+
<div class="productext"><p><strong>AccessPress Pro</strong> - Premium version of AccessPress lite<br />
|
28 |
+
<a href="http://accesspressthemes.com/wordpress-themes/accesspress-lite/" target="_blank">http://accesspressthemes.com/wordpress-themes/accesspress-pro/</a></p>
|
29 |
+
</div>
|
30 |
+
</div>
|
31 |
+
|
32 |
+
<div class="seperator"></div><div class="dottedline"></div><div class="seperator"></div>
|
33 |
+
|
34 |
+
<h3>Get in touch</h3>
|
35 |
+
<p>If you’ve any question/feedback, please get in touch: <br />
|
36 |
+
<strong>General enquiries:</strong> <a href="mailto:info@accesspressthemes.com">info@accesspressthemes.com</a><br />
|
37 |
+
<strong>Support:</strong> <a href="mailto:support@accesspressthemes.com">support@accesspressthemes.com</a><br />
|
38 |
+
<strong>Sales:</strong> <a href="mailto:sales@accesspressthemes.com">sales@accesspressthemes.com</a>
|
39 |
+
</p>
|
40 |
+
<div class="seperator"></div><div class="dottedline"></div><div class="seperator"></div>
|
41 |
+
<h3>Get social</h3>
|
42 |
+
<p>Get connected with us on social media. Facebook is the best place to find updates on our themes/plugins: </p>
|
43 |
+
|
44 |
+
|
45 |
+
<p><strong>Like us on facebook:</strong><br />
|
46 |
+
<iframe style="border: none; overflow: hidden; width: 100%; height: 206px;" src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FAccessPress-Themes%2F1396595907277967&width=842&height=258&colorscheme=light&show_faces=true&header=false&stream=false&show_border=true&appId=1411139805828592" width="240" height="150" frameborder="0" scrolling="no"></iframe></p>
|
47 |
+
|
48 |
+
<ul class="social-icon">
|
49 |
+
<li><a href="https://plus.google.com/u/0/+Accesspressthemesprofile/about" target="_blank"><img src="<?php echo APTF_IMAGE_DIR; ?>/googleplus.png" alt="google+"></a></li>
|
50 |
+
<li><a href="http://www.pinterest.com/accesspresswp/" target="_blank"><img src="<?php echo APTF_IMAGE_DIR; ?>/pinterest.png" alt="pinterest"></a></li>
|
51 |
+
<li><a href="https://www.flickr.com/photos/accesspressthemes/" target="_blank"><img src="<?php echo APTF_IMAGE_DIR; ?>/flicker.png" alt="flicker"></a></li>
|
52 |
+
<li><a href="https://twitter.com/apthemes" target="_blank"><img src="<?php echo APTF_IMAGE_DIR; ?>/twitter.png" alt="twitter"/></a></li>
|
53 |
+
</ul>
|
54 |
+
|
55 |
+
|
56 |
+
</div>
|
inc/backend/boards/how-to-use.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="aptf-single-board-wrapper" id="aptf-how_to_use-board" style="display:none">
|
2 |
+
<h3><?php _e('How to use', APTF_TD); ?></h3>
|
3 |
+
<p>There are two methods to display your Twitter Feeds in your site using AccessPress Twitter Feed Plugin.</p>
|
4 |
+
<h4>Normal Feeds</h4>
|
5 |
+
<p>For displaying Twitter Feeds in normal manner, you can use <br><br/>[ap-twitter-feed]<br/><br/> shortcode or AccessPress Twitter Feed Widget in any registered widget area from Appearance Widget Section.You can also pass template parameter in the shortcode such as <br/>
|
6 |
+
[ap-twitter-feed template="template-1/template-2/template-3"]</p>
|
7 |
+
|
8 |
+
<h4>Feeds In Slider</h4>
|
9 |
+
<p>To display the twitter feeds, you can either use <br/><Br/>
|
10 |
+
[ap-twitter-feed-slider] <br/><br/> <strong>Shortcode</strong> or <strong>AccessPress Twitter Feed Widget</strong> in any registered widget area from Appearance Widget Section.You can use template parameter in this shortcode too.</p>
|
11 |
+
<p>Extra parameters that you can pass in slider shortcode are auto_slide="true/false" slide_duration="any duration in milliseconds:e.g: 1000" and controls="true/false"</p>
|
12 |
+
<p>
|
13 |
+
[ap-twitter-feed-slider controls="true" slide_duration="2000" auto_slide="true"]
|
14 |
+
</p>
|
15 |
+
|
16 |
+
<p>For detailed documentation please visit <a href="https://accesspressthemes.com/documentation/documentationplugin-instruction-accesspress-twitter-feed/" target="_blank">here</a></p>
|
17 |
+
</div>
|
inc/backend/boards/main-settings.php
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="aptf-single-board-wrapper" id="aptf-settings-board">
|
2 |
+
<h3><?php _e('Settings', APTF_TD); ?></h3>
|
3 |
+
<div class="aptf-option-wrapper">
|
4 |
+
<label>Twitter Consumer Key</label>
|
5 |
+
<div class="aptf-option-field">
|
6 |
+
<input type="text" name="consumer_key" value="<?php echo esc_attr($aptf_settings['consumer_key']); ?>"/>
|
7 |
+
<div class="aptf-option-note"><?php _e('Please create an app on Twitter through this link:', APTF_TD); ?><a href="https://dev.twitter.com/apps" target="_blank">https://dev.twitter.com/apps</a><?php _e(' and get this information.', APTF_TD); ?></div>
|
8 |
+
</div>
|
9 |
+
</div>
|
10 |
+
<div class="aptf-option-wrapper">
|
11 |
+
<label>Twitter Consumer Secret</label>
|
12 |
+
<div class="aptf-option-field">
|
13 |
+
<input type="text" name="consumer_secret" value="<?php echo esc_attr($aptf_settings['consumer_secret']); ?>"/>
|
14 |
+
<div class="aptf-option-note"><?php _e('Please create an app on Twitter through this link:', APTF_TD); ?><a href="https://dev.twitter.com/apps" target="_blank">https://dev.twitter.com/apps</a><?php _e(' and get this information.', APTF_TD); ?></div>
|
15 |
+
</div>
|
16 |
+
</div>
|
17 |
+
<div class="aptf-option-wrapper">
|
18 |
+
<label>Twitter Access Token</label>
|
19 |
+
<div class="aptf-option-field">
|
20 |
+
<input type="text" name="access_token" value="<?php echo esc_attr($aptf_settings['access_token']); ?>"/>
|
21 |
+
<div class="aptf-option-note"><?php _e('Please create an app on Twitter through this link:', APTF_TD); ?><a href="https://dev.twitter.com/apps" target="_blank">https://dev.twitter.com/apps</a><?php _e(' and get this information.', APTF_TD); ?></div>
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
<div class="aptf-option-wrapper">
|
25 |
+
<label>Twitter Access Token Secret</label>
|
26 |
+
<div class="aptf-option-field">
|
27 |
+
<input type="text" name="access_token_secret" value="<?php echo esc_attr($aptf_settings['access_token_secret']); ?>"/>
|
28 |
+
<div class="aptf-option-note"><?php _e('Please create an app on Twitter through this link:', APTF_TD); ?><a href="https://dev.twitter.com/apps" target="_blank">https://dev.twitter.com/apps</a><?php _e(' and get this information.', APTF_TD); ?></div>
|
29 |
+
</div>
|
30 |
+
</div>
|
31 |
+
<div class="aptf-option-wrapper">
|
32 |
+
<label><?php _e('Twitter Username',APTF_TD);?></label>
|
33 |
+
<div class="aptf-option-field">
|
34 |
+
<input type="text" name="twitter_username" value="<?php echo isset($aptf_settings['twitter_username']) ? $aptf_settings['twitter_username'] : ''; ?>" placeholder="e.g: @apthemes"/>
|
35 |
+
<div class="aptf-option-note"><?php _e('Please enter the username of twitter account from which the feeds need to be fetched.For example:@apthemes', APTF_TD); ?></div>
|
36 |
+
</div>
|
37 |
+
</div>
|
38 |
+
<div class="aptf-option-wrapper">
|
39 |
+
<label><?php _e('Twitter Account Name',APTF_TD);?></label>
|
40 |
+
<div class="aptf-option-field">
|
41 |
+
<input type="text" name="twitter_account_name" value="<?php echo isset($aptf_settings['twitter_account_name']) ? $aptf_settings['twitter_account_name'] : ''; ?>" placeholder="e.g: AccessPress Themes"/>
|
42 |
+
<div class="aptf-option-note"><?php _e('Please enter the account name to be displayed.For example:AccessPress Themes', APTF_TD); ?></div>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
<div class="aptf-option-wrapper">
|
46 |
+
<label>Cache Period</label>
|
47 |
+
<div class="aptf-option-field">
|
48 |
+
<input type="text" name="cache_period" value="<?php echo esc_attr($aptf_settings['cache_period']); ?>" placeholder="e.g: 60"/>
|
49 |
+
<div class="aptf-option-note"><?php _e('Please enter the time period in minutes in which the feeds should be fetched.Default is 60 Minutes', APTF_TD); ?></div>
|
50 |
+
</div>
|
51 |
+
</div>
|
52 |
+
<div class="aptf-option-wrapper">
|
53 |
+
<label><?php _e('Total Number of Feed', APTF_TD); ?></label>
|
54 |
+
<div class="aptf-option-field">
|
55 |
+
<input type="number" name="total_feed" value="<?php echo isset($aptf_settings['total_feed']) ? esc_attr($aptf_settings['total_feed']) : ''; ?>" placeholder="e.g: 5"/>
|
56 |
+
<div class="aptf-option-note"><?php _e('Please enter the number of feeds to be fetched.Default number of feeds is 5.', APTF_TD); ?></div>
|
57 |
+
</div>
|
58 |
+
</div>
|
59 |
+
<div class="aptf-option-wrapper">
|
60 |
+
<label><?php _e('Feeds Template', APTF_TD); ?></label>
|
61 |
+
<div class="aptf-option-field">
|
62 |
+
<?php for ($i = 1; $i <= 3; $i++) {
|
63 |
+
?>
|
64 |
+
<label><input type="radio" name="feed_template" value="template-<?php echo $i; ?>" <?php checked($aptf_settings['feed_template'], 'template-' . $i); ?>/>Template <?php echo $i; ?></label>
|
65 |
+
<?php
|
66 |
+
}
|
67 |
+
?>
|
68 |
+
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
<div class="aptf-option-wrapper">
|
72 |
+
<label><?php _e('Time Format', APTF_TD); ?></label>
|
73 |
+
<div class="aptf-option-field">
|
74 |
+
<label><input type="radio" name="time_format" value="full_date" <?php checked($aptf_settings['time_format'],'full_date');?>/><?php _e('Full Date and Time: <span>e.g March 10, 2001, 5:16 pm</span>', APTF_TD); ?></label>
|
75 |
+
<label><input type="radio" name="time_format" value="date_only" <?php checked($aptf_settings['time_format'],'date_only');?>/><?php _e('Date only: <span>e.g March 10, 2001</span>', APTF_TD); ?></label>
|
76 |
+
<label><input type="radio" name="time_format" value="elapsed_time" <?php checked($aptf_settings['time_format'],'elapsed_time');?>/><?php _e('Elapsed Time: <span>e.g 12 hours ago</span>', APTF_TD); ?></label>
|
77 |
+
</div>
|
78 |
+
</div>
|
79 |
+
<div class="aptf-option-wrapper">
|
80 |
+
<label><?php _e('Display Username', APTF_TD); ?></label>
|
81 |
+
<div class="aptf-option-field">
|
82 |
+
<input type="checkbox" name="display_username" value="1" <?php checked($aptf_settings['display_username'],true);?>/>
|
83 |
+
<div class="aptf-option-note"><?php _e('Check if you want to show your username in each tweet', APTF_TD); ?></div>
|
84 |
+
</div>
|
85 |
+
</div>
|
86 |
+
<div class="aptf-option-wrapper">
|
87 |
+
<label><?php _e('Display Twitter Actions(Reply, Retweet, Favorite)', APTF_TD); ?></label>
|
88 |
+
<div class="aptf-option-field">
|
89 |
+
<input type="checkbox" name="display_twitter_actions" value="1" <?php checked($aptf_settings['display_twitter_actions'],true);?>/>
|
90 |
+
<div class="aptf-option-note"><?php _e('Check if you want to display twitter actions', APTF_TD); ?></div>
|
91 |
+
</div>
|
92 |
+
</div>
|
93 |
+
<div class="aptf-option-wrapper">
|
94 |
+
<label><?php _e('Fallback Unavailable Message', APTF_TD); ?></label>
|
95 |
+
<div class="aptf-option-field">
|
96 |
+
<input type="text" name="fallback_message" value="<?php echo isset($aptf_settings['fallback_message']) ? esc_attr($aptf_settings['fallback_message']) : ''; ?>"/>
|
97 |
+
<div class="aptf-option-note"><?php _e('Please enter the message to display if the twitter is unavailable sometime.', APTF_TD); ?></div>
|
98 |
+
</div>
|
99 |
+
</div>
|
100 |
+
<div class="aptf-option-wrapper">
|
101 |
+
<label><?php _e('Display Twitter Follow Button', APTF_TD); ?></label>
|
102 |
+
<div class="aptf-option-field">
|
103 |
+
<input type="checkbox" name="display_follow_button" value="1" <?php checked($aptf_settings['display_follow_button'],true);?>/>
|
104 |
+
<div class="aptf-option-note"><?php _e('Check if you want to display twitter follow button at the end of the feeds', APTF_TD); ?></div>
|
105 |
+
</div>
|
106 |
+
</div>
|
107 |
+
<div class="aptf-option-wrapper">
|
108 |
+
<label><?php ?></label>
|
109 |
+
</div>
|
110 |
+
|
111 |
+
</div>
|
inc/backend/header.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="aptf-header-wrapper">
|
2 |
+
<div class="apsc-logo">
|
3 |
+
<img src="<?php echo APTF_IMAGE_DIR; ?>/logo.png" alt="<?php esc_attr_e('AccessPress Twitter FEED', APTF_TD); ?>" />
|
4 |
+
</div>
|
5 |
+
|
6 |
+
<div class="apsc-socials">
|
7 |
+
<p><?php _e('Follow us for new updates', APTF_TD) ?></p>
|
8 |
+
<div class="ap-social-bttns">
|
9 |
+
|
10 |
+
<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FAccessPress-Themes%2F1396595907277967&width&layout=button&action=like&show_faces=false&share=false&height=35&appId=1411139805828592" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:20px; width:50px " allowTransparency="true"></iframe>
|
11 |
+
|
12 |
+
<a href="https://twitter.com/apthemes" class="twitter-follow-button" data-show-count="false" data-lang="en">Follow @apthemes</a>
|
13 |
+
<script>!function (d, s, id) {
|
14 |
+
var js, fjs = d.getElementsByTagName(s)[0];
|
15 |
+
if (!d.getElementById(id)) {
|
16 |
+
js = d.createElement(s);
|
17 |
+
js.id = id;
|
18 |
+
js.src = "//platform.twitter.com/widgets.js";
|
19 |
+
fjs.parentNode.insertBefore(js, fjs);
|
20 |
+
}
|
21 |
+
}(document, "script", "twitter-wjs");</script>
|
22 |
+
|
23 |
+
</div>
|
24 |
+
</div>
|
25 |
+
<div class="apsc-title"><?php _e('AccessPress Twitter Feed', APTF_TD); ?></div>
|
26 |
+
</div>
|
inc/backend/save-settings.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
//$this->print_array($_POST);
|
4 |
+
/**
|
5 |
+
* [action] => aptf_form_action
|
6 |
+
[consumer_key] => Roo0zrWHjCUrB13fNvsLmBOZN
|
7 |
+
[consumer_secret] => 8aU1sfjKaDRK7rmZJ3JXC5cC0zNcunV4CmVYDl8NiuaXtt0NRq
|
8 |
+
[access_token] => 256050616-psaikzDyzWQ1tFDNRQzIDpBLSnxNiPB7ieYUKaUG
|
9 |
+
[access_token_secret] => 2Rjcetsnc0dYbd8TZlEoUo6Sn51bT1Qa2c9ia8JQUn5g4
|
10 |
+
[twitter_username] => @apthemes
|
11 |
+
[cache_period] => 60
|
12 |
+
[total_feed] => 5
|
13 |
+
[feed_template] => template-
|
14 |
+
[aptf_nonce_field] => 6f8a90d5c4
|
15 |
+
[_wp_http_referer] => /accesspress-twitter-feed/wp-admin/admin.php?page=ap-twitter-feed
|
16 |
+
[aptf_settings_submit] => Save Settings
|
17 |
+
*/
|
18 |
+
foreach ($_POST as $key => $val) {
|
19 |
+
$$key = sanitize_text_field($val);
|
20 |
+
}
|
21 |
+
|
22 |
+
$aptf_settings = array('consumer_key' => $consumer_key,
|
23 |
+
'consumer_secret' => $consumer_secret,
|
24 |
+
'access_token' => $access_token,
|
25 |
+
'access_token_secret' => $access_token_secret,
|
26 |
+
'twitter_username' => $twitter_username,
|
27 |
+
'twitter_account_name'=>$twitter_account_name,
|
28 |
+
'cache_period' => $cache_period,
|
29 |
+
'total_feed' => $total_feed,
|
30 |
+
'feed_template' => $feed_template,
|
31 |
+
'time_format' => $time_format,
|
32 |
+
'display_username' => isset($display_username)?1:0,
|
33 |
+
'display_twitter_actions'=>isset($display_twitter_actions)?1:0,
|
34 |
+
'fallback_message'=>$fallback_message,
|
35 |
+
'display_follow_button'=>isset($display_follow_button)?1:0
|
36 |
+
);
|
37 |
+
update_option('aptf_settings', $aptf_settings);
|
38 |
+
$_SESSION['aptf_msg'] = __('Settings Saved Successfully',APTF_TD);
|
39 |
+
wp_redirect(admin_url().'admin.php?page=ap-twitter-feed');
|
40 |
+
|
inc/backend/settings.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$aptf_settings = $this->aptf_settings;
|
3 |
+
//$this->print_array($aptf_settings);
|
4 |
+
?>
|
5 |
+
<div class="wrap">
|
6 |
+
<div class="aptf-panel">
|
7 |
+
<?php include('header.php'); ?>
|
8 |
+
<div class="aptf-nav">
|
9 |
+
<ul>
|
10 |
+
<li><a href="javascript:void(0)" id="aptf-settings-trigger" class="aptf-tabs-trigger aptf-active-trigger"><?php _e('Settings', APTF_VERSION); ?></a></li>
|
11 |
+
<li><a href="javascript:void(0)" id="aptf-how_to_use-trigger" class="aptf-tabs-trigger"><?php _e('How To Use', APTF_VERSION); ?></a></li>
|
12 |
+
<li><a href="javascript:void(0)" id="aptf-about-trigger" class="aptf-tabs-trigger"><?php _e('About', APTF_VERSION); ?></a></li>
|
13 |
+
</ul>
|
14 |
+
</div>
|
15 |
+
<div class="aptf-board-wrapper">
|
16 |
+
<?php if(isset($_SESSION['aptf_msg'])){?>
|
17 |
+
<div class="aptf-message"><?php echo $_SESSION['aptf_msg'];unset($_SESSION['aptf_msg']);?></div>
|
18 |
+
<?php }
|
19 |
+
?>
|
20 |
+
<form method="post" action="<?php echo admin_url().'admin-post.php';?>">
|
21 |
+
<input type="hidden" name="action" value="aptf_form_action"/>
|
22 |
+
<?php
|
23 |
+
/**
|
24 |
+
* Settings Panel
|
25 |
+
*/
|
26 |
+
include('boards/main-settings.php');
|
27 |
+
|
28 |
+
/**
|
29 |
+
* How To use Panel
|
30 |
+
*/
|
31 |
+
include('boards/how-to-use.php');
|
32 |
+
|
33 |
+
/**
|
34 |
+
* About Panel
|
35 |
+
*/
|
36 |
+
include('boards/about.php');
|
37 |
+
?>
|
38 |
+
<?php
|
39 |
+
wp_nonce_field('aptf_action_nonce','aptf_nonce_field');
|
40 |
+
$restore_nonce = wp_create_nonce('aptf-restore-nonce');
|
41 |
+
?>
|
42 |
+
<input type="submit" name="aptf_settings_submit" value="<?php _e('Save Settings',APTF_TD);?>" class="button button-primary"/>
|
43 |
+
<a href="<?php echo admin_url().'admin-post.php?action=aptf_restore_settings&_wpnonce='.$restore_nonce;?>" onclick="return confirm('<?php _e('Are you sure you want to restore default settings?',APTF_TD)?>');"><input type="button" value="<?php _e('Restore Default Settings',APTF_TD);?>" class="button button-primary"/></a>
|
44 |
+
<a href="<?php echo admin_url().'admin-post.php?action=aptf_delete_cache';?>" onclick="return confirm('<?php _e('Are you sure you want to delete cache?',APTF_TD)?>');"><input type="button" value="<?php _e('Delete Cache',APTF_TD);?>" class="button button-primary"/></a>
|
45 |
+
</form>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
|
inc/backend/slider-widget.php
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') or die("No script kiddies please!");
|
3 |
+
/**
|
4 |
+
* Adds AccessPress Twitter Feed Widget
|
5 |
+
*/
|
6 |
+
class APTF_Slider_Widget extends WP_Widget {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Register widget with WordPress.
|
10 |
+
*/
|
11 |
+
function __construct() {
|
12 |
+
parent::__construct(
|
13 |
+
'aptf_slider_widget', // Base ID
|
14 |
+
__('AccessPress Tweets Slider', APTF_TD), // Name
|
15 |
+
array('description' => __('AccessPress Tweets Slider Widget', APTF_TD)) // Args
|
16 |
+
);
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Front-end display of widget.
|
21 |
+
*
|
22 |
+
* @see WP_Widget::widget()
|
23 |
+
*
|
24 |
+
* @param array $args Widget arguments.
|
25 |
+
* @param array $instance Saved values from database.
|
26 |
+
*/
|
27 |
+
public function widget($args, $instance) {
|
28 |
+
|
29 |
+
echo $args['before_widget'];
|
30 |
+
if (!empty($instance['title'])) {
|
31 |
+
echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title'];
|
32 |
+
}
|
33 |
+
$controls = isset($instance['controls'])?$instance['controls']:false;
|
34 |
+
$slide_duration = (isset($instance['slide_duration'])&& $instance['slide_duration']!='')?$instance['slide_duration']:'1500';
|
35 |
+
$auto_slide = isset($instance['auto_slide'])?$instance['auto_slide']:false;
|
36 |
+
$template = isset($instance['template'])?$instance['template']:'template-1';
|
37 |
+
$follow_button = (isset($instance['follow_button']) && $instance['follow_button']==1)?'true':'false';
|
38 |
+
echo do_shortcode('[ap-twitter-feed-slider auto_slide="'.$auto_slide.'" controls="'.$controls.'" slide_duration="'.$slide_duration.'" follow_button="'.$follow_button.'" template="'.$template.'"]');
|
39 |
+
echo $args['after_widget'];
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Back-end widget form.
|
44 |
+
*
|
45 |
+
* @see WP_Widget::form()
|
46 |
+
*
|
47 |
+
* @param array $instance Previously saved values from database.
|
48 |
+
*/
|
49 |
+
public function form($instance) {
|
50 |
+
$title = isset($instance['title'])?$instance['title']:'';
|
51 |
+
$controls = (isset($instance['controls']))?$instance['controls']:0;
|
52 |
+
$slide_duration = (isset($instance['slide_duration']))?$instance['slide_duration']:'';
|
53 |
+
$auto_slide = (isset($instance['auto_slide']))?$instance['auto_slide']:0;
|
54 |
+
$template = isset($instance['template'])?$instance['template']:'template-1';
|
55 |
+
$follow_button = isset($instance['follow_button'])?$instance['follow_button']:0;
|
56 |
+
|
57 |
+
?>
|
58 |
+
<p>
|
59 |
+
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', APTF_TD); ?></label>
|
60 |
+
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>"/>
|
61 |
+
</p>
|
62 |
+
<p>
|
63 |
+
<label for="<?php echo $this->get_field_id('controls'); ?>"><?php _e('Slider Controls:', APTF_TD); ?></label>
|
64 |
+
<input class="widefat" id="<?php echo $this->get_field_id('controls'); ?>" name="<?php echo $this->get_field_name('controls'); ?>" type="checkbox" value="1" <?php checked($controls,true);?>/>
|
65 |
+
</p>
|
66 |
+
<p>
|
67 |
+
<label for="<?php echo $this->get_field_id('slide_duration'); ?>"><?php _e('Slide Duration:', APTF_TD); ?></label>
|
68 |
+
<input class="widefat" id="<?php echo $this->get_field_id('slide_duration'); ?>" name="<?php echo $this->get_field_name('slide_duration'); ?>" type="text" placeholder="e.g: 1000" value="<?php echo $slide_duration;?>"/>
|
69 |
+
</p>
|
70 |
+
<p>
|
71 |
+
<label for="<?php echo $this->get_field_id('auto_slide'); ?>"><?php _e('Auto Slide:', APTF_TD); ?></label>
|
72 |
+
<input class="widefat" id="<?php echo $this->get_field_id('auto_slide'); ?>" name="<?php echo $this->get_field_name('auto_slide'); ?>" type="checkbox" value="1" <?php checked($auto_slide,true);?>/>
|
73 |
+
</p>
|
74 |
+
<p>
|
75 |
+
<label for="<?php echo $this->get_field_id('template'); ?>"><?php _e('Template:', APTF_TD); ?></label>
|
76 |
+
<select class="widefat" id="<?php echo $this->get_field_id('template'); ?>" name="<?php echo $this->get_field_name('template'); ?>" >
|
77 |
+
<?php for($i=1;$i<=3;$i++){
|
78 |
+
?>
|
79 |
+
<option value="template-<?php echo $i;?>" <?php selected($template,'template-'.$i);?>>Template <?php echo $i;?></option>
|
80 |
+
<?php
|
81 |
+
}?>
|
82 |
+
</select>
|
83 |
+
</p>
|
84 |
+
<p>
|
85 |
+
<label for="<?php echo $this->get_field_id('follow_button'); ?>"><?php _e('Display Follow Button:', APTF_TD); ?></label>
|
86 |
+
<input class="widefat" id="<?php echo $this->get_field_id('follow_button'); ?>" name="<?php echo $this->get_field_name('follow_button'); ?>" type="checkbox" value="1" <?php checked($follow_button,true);?>/>
|
87 |
+
</p>
|
88 |
+
<?php
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Sanitize widget form values as they are saved.
|
93 |
+
*
|
94 |
+
* @see WP_Widget::update()
|
95 |
+
*
|
96 |
+
* @param array $new_instance Values just sent to be saved.
|
97 |
+
* @param array $old_instance Previously saved values from database.
|
98 |
+
*
|
99 |
+
* @return array Updated safe values to be saved.
|
100 |
+
*/
|
101 |
+
public function update($new_instance, $old_instance) {
|
102 |
+
// echo "<pre>";
|
103 |
+
// die(print_r($new_instance,true));
|
104 |
+
$instance = array();
|
105 |
+
$instance['title'] = isset($new_instance['title'])?strip_tags($new_instance['title']):'';
|
106 |
+
$instance['slide_duration'] = isset($new_instance['slide_duration'])?sanitize_text_field($new_instance['slide_duration']):'';
|
107 |
+
$instance['template'] = isset($new_instance['template'])?$new_instance['template']:'';
|
108 |
+
$instance['controls'] = isset($new_instance['controls'])?$new_instance['controls']:0;
|
109 |
+
$instance['auto_slide'] = isset($new_instance['auto_slide'])?$new_instance['auto_slide']:0;
|
110 |
+
$instance['follow_button'] = isset($new_instance['follow_button'])?$new_instance['follow_button']:0;
|
111 |
+
|
112 |
+
return $instance;
|
113 |
+
}
|
114 |
+
|
115 |
+
}
|
116 |
+
|
117 |
+
// class APS_PRO_Widget
|
118 |
+
?>
|
inc/backend/widget.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') or die("No script kiddies please!");
|
3 |
+
/**
|
4 |
+
* Adds AccessPress Twitter Feed Widget
|
5 |
+
*/
|
6 |
+
class APTF_Widget extends WP_Widget {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Register widget with WordPress.
|
10 |
+
*/
|
11 |
+
function __construct() {
|
12 |
+
parent::__construct(
|
13 |
+
'aptf_widget', // Base ID
|
14 |
+
__('AccessPress Twitter Feeds', APTF_TD), // Name
|
15 |
+
array('description' => __('AccessPress Twitter Feed Widget', APTF_TD)) // Args
|
16 |
+
);
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Front-end display of widget.
|
21 |
+
*
|
22 |
+
* @see WP_Widget::widget()
|
23 |
+
*
|
24 |
+
* @param array $args Widget arguments.
|
25 |
+
* @param array $instance Saved values from database.
|
26 |
+
*/
|
27 |
+
public function widget($args, $instance) {
|
28 |
+
$follow_button = (isset($instance['follow_button']) && $instance['follow_button']==1)?'true':'false';
|
29 |
+
echo $args['before_widget'];
|
30 |
+
if (!empty($instance['title'])) {
|
31 |
+
echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title'];
|
32 |
+
}
|
33 |
+
|
34 |
+
if(isset($instance['template']) && $instance['template']!=''){
|
35 |
+
echo do_shortcode('[ap-twitter-feed template="'.$instance['template'].'" follow_button="'.$follow_button.'"]');
|
36 |
+
}else
|
37 |
+
{
|
38 |
+
echo do_shortcode('[ap-twitter-feed follow_button="'.$follow_button.'"]');
|
39 |
+
}
|
40 |
+
echo $args['after_widget'];
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Back-end widget form.
|
45 |
+
*
|
46 |
+
* @see WP_Widget::form()
|
47 |
+
*
|
48 |
+
* @param array $instance Previously saved values from database.
|
49 |
+
*/
|
50 |
+
public function form($instance) {
|
51 |
+
$title = isset($instance['title'])?$instance['title']:'';
|
52 |
+
$template = isset($instance['template'])?$instance['template']:'';
|
53 |
+
$follow_button = isset($instance['follow_button'])?$instance['follow_button']:0;
|
54 |
+
|
55 |
+
?>
|
56 |
+
<p>
|
57 |
+
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', APTF_TD); ?></label>
|
58 |
+
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>"/>
|
59 |
+
</p>
|
60 |
+
<p>
|
61 |
+
<label for="<?php echo $this->get_field_id('template'); ?>"><?php _e('Template:', APTF_TD); ?></label>
|
62 |
+
<select class="widefat" id="<?php echo $this->get_field_id('template'); ?>" name="<?php echo $this->get_field_name('template'); ?>" >
|
63 |
+
<option value="">Default</option>
|
64 |
+
<?php for($i=1;$i<=3;$i++){
|
65 |
+
?>
|
66 |
+
<option value="template-<?php echo $i;?>" <?php selected($template,'template-'.$i);?>>Template <?php echo $i;?></option>
|
67 |
+
<?php
|
68 |
+
}?>
|
69 |
+
</select>
|
70 |
+
</p>
|
71 |
+
<p>
|
72 |
+
<label for="<?php echo $this->get_field_id('follow_button'); ?>"><?php _e('Display Follow Button:', APTF_TD); ?></label>
|
73 |
+
<input class="widefat" id="<?php echo $this->get_field_id('follow_button'); ?>" name="<?php echo $this->get_field_name('follow_button'); ?>" type="checkbox" value="1" <?php checked($follow_button,true);?>/>
|
74 |
+
</p>
|
75 |
+
<?php
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Sanitize widget form values as they are saved.
|
80 |
+
*
|
81 |
+
* @see WP_Widget::update()
|
82 |
+
*
|
83 |
+
* @param array $new_instance Values just sent to be saved.
|
84 |
+
* @param array $old_instance Previously saved values from database.
|
85 |
+
*
|
86 |
+
* @return array Updated safe values to be saved.
|
87 |
+
*/
|
88 |
+
public function update($new_instance, $old_instance) {
|
89 |
+
//die(print_r($new_instance));
|
90 |
+
$instance = array();
|
91 |
+
$instance['title'] = (!empty($new_instance['title']) ) ? strip_tags($new_instance['title']): '';
|
92 |
+
$instance['template'] = (!empty($new_instance['template']) ) ? strip_tags($new_instance['template']): '';
|
93 |
+
$instance['follow_button'] = isset($new_instance['follow_button'])?$new_instance['follow_button']:0;
|
94 |
+
return $instance;
|
95 |
+
}
|
96 |
+
|
97 |
+
}
|
98 |
+
|
99 |
+
// class APS_PRO_Widget
|
100 |
+
?>
|
inc/frontend/shortcode.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$aptf_settings = $this->aptf_settings;
|
3 |
+
$username = $aptf_settings['twitter_username'];
|
4 |
+
$display_name = $aptf_settings['twitter_account_name'];
|
5 |
+
$tweets = $this->get_tweets($username, $aptf_settings['total_feed']);
|
6 |
+
if(isset($atts['template'])){
|
7 |
+
$aptf_settings['feed_template'] = $atts['template'];
|
8 |
+
}
|
9 |
+
if(isset($atts['follow_button'])){
|
10 |
+
if($atts['follow_button']=='true'){
|
11 |
+
$aptf_settings['display_follow_button'] = 1;
|
12 |
+
}
|
13 |
+
else{
|
14 |
+
$aptf_settings['display_follow_button'] = 0;
|
15 |
+
}
|
16 |
+
|
17 |
+
}
|
18 |
+
if(isset($tweets['error'])){
|
19 |
+
?>
|
20 |
+
<p><?php _e('Something went wrong with the twitter.',APTF_TD);?></p>
|
21 |
+
<?php
|
22 |
+
}
|
23 |
+
else
|
24 |
+
{
|
25 |
+
|
26 |
+
//var_dump($tweets);
|
27 |
+
$template = $aptf_settings['feed_template'].'.php';
|
28 |
+
//$this->print_array($tweets);
|
29 |
+
include('templates/default/'.$template);
|
30 |
+
}
|
31 |
+
?>
|
32 |
+
|
inc/frontend/slider-shortcode.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$aptf_settings = $this->aptf_settings;
|
3 |
+
$username = $aptf_settings['twitter_username'];
|
4 |
+
$tweets = $this->get_tweets($username, $aptf_settings['total_feed']);
|
5 |
+
$template = isset($atts['template'])?$atts['template']:'template-1';
|
6 |
+
$auto_slide = isset($atts['auto_slide'])?$atts['auto_slide']:'true';
|
7 |
+
$slide_controls = isset($atts['controls'])?$atts['controls']:'true';
|
8 |
+
$slide_duration = isset($atts['slide_duration'])?$atts['slide_duration']:'3000';
|
9 |
+
if(isset($atts['follow_button'])){
|
10 |
+
if($atts['follow_button']=='true'){
|
11 |
+
$aptf_settings['display_follow_button'] = 1;
|
12 |
+
}
|
13 |
+
else{
|
14 |
+
$aptf_settings['display_follow_button'] = 0;
|
15 |
+
}
|
16 |
+
|
17 |
+
}
|
18 |
+
if(isset($tweets['error'])){
|
19 |
+
$fallback_message = ($aptf_settings['fallback_message']=='')?__('Something went wrong with the twitter.',APTF_TD):$aptf_settings['fallback_message'];
|
20 |
+
?>
|
21 |
+
<p><?php echo $fallback_message;?></p>
|
22 |
+
<?php
|
23 |
+
}
|
24 |
+
else
|
25 |
+
{
|
26 |
+
include('templates/slider/'.$template.'.php');
|
27 |
+
//var_dump($tweets);
|
28 |
+
|
29 |
+
}
|
30 |
+
?>
|
31 |
+
|
inc/frontend/templates/default/template-1.php
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="aptf-tweets-wrapper aptf-template-1"><?php
|
2 |
+
if (is_array($tweets)) {
|
3 |
+
|
4 |
+
// to use with intents
|
5 |
+
//echo '<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>';
|
6 |
+
|
7 |
+
foreach ($tweets as $tweet) {
|
8 |
+
//$this->print_array($tweet);
|
9 |
+
?>
|
10 |
+
|
11 |
+
<div class="aptf-single-tweet-wrapper">
|
12 |
+
<div class="aptf-tweet-content">
|
13 |
+
|
14 |
+
<div class="aptf-tweet-box">
|
15 |
+
<?php
|
16 |
+
if ($tweet['text']) {
|
17 |
+
$the_tweet = $tweet['text'] . ' '; //adding an extra space to convert hast tag into links
|
18 |
+
/*
|
19 |
+
Twitter Developer Display Requirements
|
20 |
+
https://dev.twitter.com/terms/display-requirements
|
21 |
+
|
22 |
+
2.b. Tweet Entities within the Tweet text must be properly linked to their appropriate home on Twitter. For example:
|
23 |
+
i. User_mentions must link to the mentioned user's profile.
|
24 |
+
ii. Hashtags must link to a twitter.com search with the hashtag as the query.
|
25 |
+
iii. Links in Tweet text must be displayed using the display_url
|
26 |
+
field in the URL entities API response, and link to the original t.co url field.
|
27 |
+
*/
|
28 |
+
|
29 |
+
// i. User_mentions must link to the mentioned user's profile.
|
30 |
+
if (is_array($tweet['entities']['user_mentions'])) {
|
31 |
+
foreach ($tweet['entities']['user_mentions'] as $key => $user_mention) {
|
32 |
+
$the_tweet = preg_replace(
|
33 |
+
'/@' . $user_mention['screen_name'] . '/i', '<a href="http://www.twitter.com/' . $user_mention['screen_name'] . '" target="_blank">@' . $user_mention['screen_name'] . '</a>', $the_tweet);
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
// ii. Hashtags must link to a twitter.com search with the hashtag as the query.
|
38 |
+
if (is_array($tweet['entities']['hashtags'])) {
|
39 |
+
foreach ($tweet['entities']['hashtags'] as $hashtag) {
|
40 |
+
$the_tweet = str_replace(' #' . $hashtag['text'] . ' ', ' <a href="https://twitter.com/search?q=%23' . $hashtag['text'] . '&src=hash" target="_blank">#' . $hashtag['text'] . '</a> ', $the_tweet);
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
// iii. Links in Tweet text must be displayed using the display_url
|
45 |
+
// field in the URL entities API response, and link to the original t.co url field.
|
46 |
+
if (is_array($tweet['entities']['urls'])) {
|
47 |
+
foreach ($tweet['entities']['urls'] as $key => $link) {
|
48 |
+
$the_tweet = preg_replace(
|
49 |
+
'`' . $link['url'] . '`', '<a href="' . $link['url'] . '" target="_blank">' . $link['url'] . '</a>', $the_tweet);
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
echo $the_tweet . ' ';
|
54 |
+
?>
|
55 |
+
</div><!--tweet content-->
|
56 |
+
<?php if (isset($aptf_settings['display_twitter_actions']) && $aptf_settings['display_twitter_actions'] == 1) { ?>
|
57 |
+
<!--Tweet Action -->
|
58 |
+
<?php include(plugin_dir_path(__FILE__) . '../tweet-actions.php'); ?>
|
59 |
+
<!--Tweet Action -->
|
60 |
+
<?php } ?>
|
61 |
+
</div>
|
62 |
+
<?php if ($aptf_settings['display_username'] == 1) { ?><a href="http://twitter.com/<?php echo $username; ?>" class="aptf-tweet-name" target="_blank"><?php echo $username; ?></a> <?php } ?>
|
63 |
+
<div class="aptf-tweet-date">
|
64 |
+
<?php
|
65 |
+
// 3. Tweet Actions
|
66 |
+
// Reply, Retweet, and Favorite action icons must always be visible for the user to interact with the Tweet. These actions must be implemented using Web Intents or with the authenticated Twitter API.
|
67 |
+
// No other social or 3rd party actions similar to Follow, Reply, Retweet and Favorite may be attached to a Tweet.
|
68 |
+
// get the sprite or images from twitter's developers resource and update your stylesheet
|
69 |
+
// echo '
|
70 |
+
// <div class="twitter_intents">
|
71 |
+
// <p><a class="reply" href="https://twitter.com/intent/tweet?in_reply_to='.$tweet['id_str'].'">Reply</a></p>
|
72 |
+
// <p><a class="retweet" href="https://twitter.com/intent/retweet?tweet_id='.$tweet['id_str'].'">Retweet</a></p>
|
73 |
+
// <p><a class="favorite" href="https://twitter.com/intent/favorite?tweet_id='.$tweet['id_str'].'">Favorite</a></p>
|
74 |
+
// </div>';
|
75 |
+
// 4. Tweet Timestamp
|
76 |
+
// The Tweet timestamp must always be visible and include the time and date. e.g., “3:00 PM - 31 May 12”.
|
77 |
+
// 5. Tweet Permalink
|
78 |
+
// The Tweet timestamp must always be linked to the Tweet permalink.
|
79 |
+
?>
|
80 |
+
|
81 |
+
<p class="aptf-timestamp">
|
82 |
+
<a href="https://twitter.com/<?php echo $username; ?>/status/<?php echo $tweet['id_str']; ?>" target="_blank"> -
|
83 |
+
<?php echo $this->get_date_format($tweet['created_at'], $aptf_settings['time_format']); ?>
|
84 |
+
</a>
|
85 |
+
</p>
|
86 |
+
|
87 |
+
<?php
|
88 |
+
} else {
|
89 |
+
?>
|
90 |
+
|
91 |
+
<p><a href="http://twitter.com/'<?php echo $username; ?> " target="_blank"><?php _e('Click here to read ' . $username . '\'S Twitter feed', APTF_TD); ?></a></p>
|
92 |
+
<?php
|
93 |
+
}
|
94 |
+
?>
|
95 |
+
</div><!--tweet_date-->
|
96 |
+
|
97 |
+
|
98 |
+
|
99 |
+
|
100 |
+
</div><!-- single_tweet_wrap-->
|
101 |
+
|
102 |
+
|
103 |
+
<?php
|
104 |
+
}
|
105 |
+
}
|
106 |
+
?>
|
107 |
+
</div>
|
108 |
+
<?php if(isset($aptf_settings['display_follow_button']) && $aptf_settings['display_follow_button']==1){
|
109 |
+
include(plugin_dir_path(__FILE__) . '../follow-btn.php');
|
110 |
+
}
|
111 |
+
?>
|
inc/frontend/templates/default/template-2.php
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="aptf-tweets-wrapper aptf-template-2"><?php
|
2 |
+
if (is_array($tweets)) {
|
3 |
+
|
4 |
+
// to use with intents
|
5 |
+
//echo '<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>';
|
6 |
+
|
7 |
+
foreach ($tweets as $tweet) {
|
8 |
+
//$this->print_array($tweet);
|
9 |
+
?>
|
10 |
+
|
11 |
+
<div class="aptf-single-tweet-wrapper">
|
12 |
+
<div class="aptf-tweet-content">
|
13 |
+
<?php if ($aptf_settings['display_username'] == 1) { ?><a href="http://twitter.com/<?php echo $username; ?>" class="aptf-tweet-name" target="_blank"><?php echo $display_name; ?></a> <span class="aptf-tweet-username"><?php echo $username; ?></span> <?php } ?>
|
14 |
+
<div class="clear"></div>
|
15 |
+
<?php
|
16 |
+
if ($tweet['text']) {
|
17 |
+
$the_tweet = $tweet['text'] . ' '; //adding an extra space to convert hast tag into links
|
18 |
+
/*
|
19 |
+
Twitter Developer Display Requirements
|
20 |
+
https://dev.twitter.com/terms/display-requirements
|
21 |
+
|
22 |
+
2.b. Tweet Entities within the Tweet text must be properly linked to their appropriate home on Twitter. For example:
|
23 |
+
i. User_mentions must link to the mentioned user's profile.
|
24 |
+
ii. Hashtags must link to a twitter.com search with the hashtag as the query.
|
25 |
+
iii. Links in Tweet text must be displayed using the display_url
|
26 |
+
field in the URL entities API response, and link to the original t.co url field.
|
27 |
+
*/
|
28 |
+
|
29 |
+
// i. User_mentions must link to the mentioned user's profile.
|
30 |
+
if (is_array($tweet['entities']['user_mentions'])) {
|
31 |
+
foreach ($tweet['entities']['user_mentions'] as $key => $user_mention) {
|
32 |
+
$the_tweet = preg_replace(
|
33 |
+
'/@' . $user_mention['screen_name'] . '/i', '<a href="http://www.twitter.com/' . $user_mention['screen_name'] . '" target="_blank">@' . $user_mention['screen_name'] . '</a>', $the_tweet);
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
// ii. Hashtags must link to a twitter.com search with the hashtag as the query.
|
38 |
+
if (is_array($tweet['entities']['hashtags'])) {
|
39 |
+
foreach ($tweet['entities']['hashtags'] as $hashtag) {
|
40 |
+
$the_tweet = str_replace(' #' . $hashtag['text'] . ' ', ' <a href="https://twitter.com/search?q=%23' . $hashtag['text'] . '&src=hash" target="_blank">#' . $hashtag['text'] . '</a> ', $the_tweet);
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
// iii. Links in Tweet text must be displayed using the display_url
|
45 |
+
// field in the URL entities API response, and link to the original t.co url field.
|
46 |
+
if (is_array($tweet['entities']['urls'])) {
|
47 |
+
foreach ($tweet['entities']['urls'] as $key => $link) {
|
48 |
+
$the_tweet = preg_replace(
|
49 |
+
'`' . $link['url'] . '`', '<a href="' . $link['url'] . '" target="_blank">' . $link['url'] . '</a>', $the_tweet);
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
echo $the_tweet . ' ';
|
54 |
+
?>
|
55 |
+
</div><!--tweet content-->
|
56 |
+
<div class="aptf-tweet-date">
|
57 |
+
<?php
|
58 |
+
// 3. Tweet Actions
|
59 |
+
// Reply, Retweet, and Favorite action icons must always be visible for the user to interact with the Tweet. These actions must be implemented using Web Intents or with the authenticated Twitter API.
|
60 |
+
// No other social or 3rd party actions similar to Follow, Reply, Retweet and Favorite may be attached to a Tweet.
|
61 |
+
// get the sprite or images from twitter's developers resource and update your stylesheet
|
62 |
+
// echo '
|
63 |
+
// <div class="twitter_intents">
|
64 |
+
// <p><a class="reply" href="https://twitter.com/intent/tweet?in_reply_to='.$tweet['id_str'].'">Reply</a></p>
|
65 |
+
// <p><a class="retweet" href="https://twitter.com/intent/retweet?tweet_id='.$tweet['id_str'].'">Retweet</a></p>
|
66 |
+
// <p><a class="favorite" href="https://twitter.com/intent/favorite?tweet_id='.$tweet['id_str'].'">Favorite</a></p>
|
67 |
+
// </div>';
|
68 |
+
// 4. Tweet Timestamp
|
69 |
+
// The Tweet timestamp must always be visible and include the time and date. e.g., “3:00 PM - 31 May 12”.
|
70 |
+
// 5. Tweet Permalink
|
71 |
+
// The Tweet timestamp must always be linked to the Tweet permalink.
|
72 |
+
?>
|
73 |
+
|
74 |
+
<p class="aptf-timestamp">
|
75 |
+
<a href="https://twitter.com/<?php echo $username; ?>/status/<?php echo $tweet['id_str']; ?>" target="_blank"> -
|
76 |
+
<?php echo $this->get_date_format($tweet['created_at'], $aptf_settings['time_format']); ?>
|
77 |
+
</a>
|
78 |
+
</p>
|
79 |
+
|
80 |
+
<?php
|
81 |
+
} else {
|
82 |
+
?>
|
83 |
+
|
84 |
+
<p><a href="http://twitter.com/'<?php echo $username; ?> " target="_blank"><?php _e('Click here to read ' . $username . '\'S Twitter feed', APTF_TD); ?></a></p>
|
85 |
+
<?php
|
86 |
+
}
|
87 |
+
?>
|
88 |
+
</div><!--tweet_date-->
|
89 |
+
<?php if (isset($aptf_settings['display_twitter_actions']) && $aptf_settings['display_twitter_actions'] == 1) { ?>
|
90 |
+
<!--Tweet Action -->
|
91 |
+
<?php include(plugin_dir_path(__FILE__) . '../tweet-actions.php'); ?>
|
92 |
+
<!--Tweet Action -->
|
93 |
+
<?php } ?>
|
94 |
+
</div><!-- single_tweet_wrap-->
|
95 |
+
<?php
|
96 |
+
}
|
97 |
+
}
|
98 |
+
?>
|
99 |
+
</div>
|
100 |
+
<?php if(isset($aptf_settings['display_follow_button']) && $aptf_settings['display_follow_button']==1){
|
101 |
+
include(plugin_dir_path(__FILE__) . '../follow-btn.php');
|
102 |
+
}
|
103 |
+
?>
|
inc/frontend/templates/default/template-3.php
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="aptf-tweets-wrapper aptf-template-3"><?php
|
2 |
+
if (is_array($tweets)) {
|
3 |
+
|
4 |
+
// to use with intents
|
5 |
+
//echo '<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>';
|
6 |
+
|
7 |
+
foreach ($tweets as $tweet) {
|
8 |
+
//$this->print_array($tweet);
|
9 |
+
?>
|
10 |
+
|
11 |
+
<div class="aptf-single-tweet-wrapper">
|
12 |
+
<div class="aptf-tweet-content">
|
13 |
+
<?php if ($aptf_settings['display_username'] == 1) { ?><a href="http://twitter.com/<?php echo $username; ?>" target="_blank"><?php echo $username; ?></a><?php } ?>
|
14 |
+
<p class="aptf-timestamp">
|
15 |
+
<a href="https://twitter.com/<?php echo $username; ?>/status/<?php echo $tweet['id_str']; ?>" target="_blank"> -
|
16 |
+
<?php echo $this->get_date_format($tweet['created_at'], $aptf_settings['time_format']); ?>
|
17 |
+
</a>
|
18 |
+
</p>
|
19 |
+
|
20 |
+
<div class="clear"></div>
|
21 |
+
<?php
|
22 |
+
if ($tweet['text']) {
|
23 |
+
$the_tweet = $tweet['text'] . ' '; //adding an extra space to convert hast tag into links
|
24 |
+
/*
|
25 |
+
Twitter Developer Display Requirements
|
26 |
+
https://dev.twitter.com/terms/display-requirements
|
27 |
+
|
28 |
+
2.b. Tweet Entities within the Tweet text must be properly linked to their appropriate home on Twitter. For example:
|
29 |
+
i. User_mentions must link to the mentioned user's profile.
|
30 |
+
ii. Hashtags must link to a twitter.com search with the hashtag as the query.
|
31 |
+
iii. Links in Tweet text must be displayed using the display_url
|
32 |
+
field in the URL entities API response, and link to the original t.co url field.
|
33 |
+
*/
|
34 |
+
|
35 |
+
// i. User_mentions must link to the mentioned user's profile.
|
36 |
+
if (is_array($tweet['entities']['user_mentions'])) {
|
37 |
+
foreach ($tweet['entities']['user_mentions'] as $key => $user_mention) {
|
38 |
+
$the_tweet = preg_replace(
|
39 |
+
'/@' . $user_mention['screen_name'] . '/i', '<a href="http://www.twitter.com/' . $user_mention['screen_name'] . '" target="_blank">@' . $user_mention['screen_name'] . '</a>', $the_tweet);
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
// ii. Hashtags must link to a twitter.com search with the hashtag as the query.
|
44 |
+
if (is_array($tweet['entities']['hashtags'])) {
|
45 |
+
foreach ($tweet['entities']['hashtags'] as $hashtag) {
|
46 |
+
$the_tweet = str_replace(' #' . $hashtag['text'] . ' ', ' <a href="https://twitter.com/search?q=%23' . $hashtag['text'] . '&src=hash" target="_blank">#' . $hashtag['text'] . '</a> ', $the_tweet);
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
// iii. Links in Tweet text must be displayed using the display_url
|
51 |
+
// field in the URL entities API response, and link to the original t.co url field.
|
52 |
+
if (is_array($tweet['entities']['urls'])) {
|
53 |
+
foreach ($tweet['entities']['urls'] as $key => $link) {
|
54 |
+
$the_tweet = preg_replace(
|
55 |
+
'`' . $link['url'] . '`', '<a href="' . $link['url'] . '" target="_blank">' . $link['url'] . '</a>', $the_tweet);
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
echo $the_tweet . ' ';
|
60 |
+
?>
|
61 |
+
</div><!--tweet content-->
|
62 |
+
<div class="aptf-tweet-date">
|
63 |
+
<?php
|
64 |
+
// 3. Tweet Actions
|
65 |
+
// Reply, Retweet, and Favorite action icons must always be visible for the user to interact with the Tweet. These actions must be implemented using Web Intents or with the authenticated Twitter API.
|
66 |
+
// No other social or 3rd party actions similar to Follow, Reply, Retweet and Favorite may be attached to a Tweet.
|
67 |
+
// get the sprite or images from twitter's developers resource and update your stylesheet
|
68 |
+
// echo '
|
69 |
+
// <div class="twitter_intents">
|
70 |
+
// <p><a class="reply" href="https://twitter.com/intent/tweet?in_reply_to='.$tweet['id_str'].'">Reply</a></p>
|
71 |
+
// <p><a class="retweet" href="https://twitter.com/intent/retweet?tweet_id='.$tweet['id_str'].'">Retweet</a></p>
|
72 |
+
// <p><a class="favorite" href="https://twitter.com/intent/favorite?tweet_id='.$tweet['id_str'].'">Favorite</a></p>
|
73 |
+
// </div>';
|
74 |
+
// 4. Tweet Timestamp
|
75 |
+
// The Tweet timestamp must always be visible and include the time and date. e.g., “3:00 PM - 31 May 12”.
|
76 |
+
// 5. Tweet Permalink
|
77 |
+
// The Tweet timestamp must always be linked to the Tweet permalink.
|
78 |
+
?>
|
79 |
+
|
80 |
+
|
81 |
+
<?php
|
82 |
+
} else {
|
83 |
+
?>
|
84 |
+
|
85 |
+
<p><a href="http://twitter.com/'<?php echo $username; ?> " target="_blank"><?php _e('Click here to read ' . $username . '\'S Twitter feed', APTF_TD); ?></a></p>
|
86 |
+
<?php
|
87 |
+
}
|
88 |
+
?>
|
89 |
+
</div><!--tweet_date-->
|
90 |
+
<?php if (isset($aptf_settings['display_twitter_actions']) && $aptf_settings['display_twitter_actions'] == 1) { ?>
|
91 |
+
<!--Tweet Action -->
|
92 |
+
<?php include(plugin_dir_path(__FILE__) . '../tweet-actions.php'); ?>
|
93 |
+
<!--Tweet Action -->
|
94 |
+
<?php } ?>
|
95 |
+
</div><!-- single_tweet_wrap-->
|
96 |
+
<?php
|
97 |
+
}
|
98 |
+
}
|
99 |
+
?>
|
100 |
+
|
101 |
+
</div>
|
102 |
+
<?php if(isset($aptf_settings['display_follow_button']) && $aptf_settings['display_follow_button']==1){
|
103 |
+
include(plugin_dir_path(__FILE__) . '../follow-btn.php');
|
104 |
+
}
|
105 |
+
?>
|
inc/frontend/templates/follow-btn.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<div class="aptf-center-align">
|
2 |
+
<div class="aptf-follow-btn"><a href="<?php echo "https://twitter.com/".$username;?>" target="_blank"><i></i><span id="l" class="label">Follow <b><?php echo $username;?></b></span></a></div>
|
3 |
+
</div>
|
inc/frontend/templates/slider/template-1.php
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="aptf-tweets-slider-wrapper aptf-slider-template-1" data-auto-slide ="<?php echo $auto_slide; ?>" data-slide-controls = "<?php echo $slide_controls; ?>" data-slide-duration="<?php echo $slide_duration; ?>"><?php
|
2 |
+
if (is_array($tweets)) {
|
3 |
+
|
4 |
+
// to use with intents
|
5 |
+
//echo '<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>';
|
6 |
+
|
7 |
+
foreach ($tweets as $tweet) {
|
8 |
+
//$this->print_array($tweet);
|
9 |
+
?>
|
10 |
+
|
11 |
+
<div class="aptf-single-tweet-slide">
|
12 |
+
<div class="aptf-tweet-content">
|
13 |
+
<?php if ($aptf_settings['display_username'] == 1) { ?><a href="http://twitter.com/<?php echo $username; ?>" class="aptf-tweet-name" target="_blank"><?php echo $username; ?></a><?php } ?>
|
14 |
+
<p class="aptf-timestamp">
|
15 |
+
<a href="https://twitter.com/<?php echo $username; ?>/status/<?php echo $tweet['id_str']; ?>" class="aptf-tweet-name" target="_blank"> -
|
16 |
+
<?php echo $this->get_date_format($tweet['created_at'], $aptf_settings['time_format']); ?>
|
17 |
+
</a>
|
18 |
+
</p>
|
19 |
+
|
20 |
+
<div class="clear"></div>
|
21 |
+
<?php
|
22 |
+
if ($tweet['text']) {
|
23 |
+
$the_tweet = $tweet['text'] . ' '; //adding an extra space to convert hast tag into links
|
24 |
+
/*
|
25 |
+
Twitter Developer Display Requirements
|
26 |
+
https://dev.twitter.com/terms/display-requirements
|
27 |
+
|
28 |
+
2.b. Tweet Entities within the Tweet text must be properly linked to their appropriate home on Twitter. For example:
|
29 |
+
i. User_mentions must link to the mentioned user's profile.
|
30 |
+
ii. Hashtags must link to a twitter.com search with the hashtag as the query.
|
31 |
+
iii. Links in Tweet text must be displayed using the display_url
|
32 |
+
field in the URL entities API response, and link to the original t.co url field.
|
33 |
+
*/
|
34 |
+
|
35 |
+
// i. User_mentions must link to the mentioned user's profile.
|
36 |
+
if (is_array($tweet['entities']['user_mentions'])) {
|
37 |
+
foreach ($tweet['entities']['user_mentions'] as $key => $user_mention) {
|
38 |
+
$the_tweet = preg_replace(
|
39 |
+
'/@' . $user_mention['screen_name'] . '/i', '<a href="http://www.twitter.com/' . $user_mention['screen_name'] . '" target="_blank">@' . $user_mention['screen_name'] . '</a>', $the_tweet);
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
// ii. Hashtags must link to a twitter.com search with the hashtag as the query.
|
44 |
+
if (is_array($tweet['entities']['hashtags'])) {
|
45 |
+
foreach ($tweet['entities']['hashtags'] as $hashtag) {
|
46 |
+
$the_tweet = str_replace(' #' . $hashtag['text'] . ' ', ' <a href="https://twitter.com/search?q=%23' . $hashtag['text'] . '&src=hash" target="_blank">#' . $hashtag['text'] . '</a> ', $the_tweet);
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
// iii. Links in Tweet text must be displayed using the display_url
|
51 |
+
// field in the URL entities API response, and link to the original t.co url field.
|
52 |
+
if (is_array($tweet['entities']['urls'])) {
|
53 |
+
foreach ($tweet['entities']['urls'] as $key => $link) {
|
54 |
+
$the_tweet = preg_replace(
|
55 |
+
'`' . $link['url'] . '`', '<a href="' . $link['url'] . '" target="_blank">' . $link['url'] . '</a>', $the_tweet);
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
echo $the_tweet . ' ';
|
60 |
+
?>
|
61 |
+
</div><!--tweet content-->
|
62 |
+
<div class="aptf-tweet-date">
|
63 |
+
<?php
|
64 |
+
// 3. Tweet Actions
|
65 |
+
// Reply, Retweet, and Favorite action icons must always be visible for the user to interact with the Tweet. These actions must be implemented using Web Intents or with the authenticated Twitter API.
|
66 |
+
// No other social or 3rd party actions similar to Follow, Reply, Retweet and Favorite may be attached to a Tweet.
|
67 |
+
// get the sprite or images from twitter's developers resource and update your stylesheet
|
68 |
+
// echo '
|
69 |
+
// <div class="twitter_intents">
|
70 |
+
// <p><a class="reply" href="https://twitter.com/intent/tweet?in_reply_to='.$tweet['id_str'].'">Reply</a></p>
|
71 |
+
// <p><a class="retweet" href="https://twitter.com/intent/retweet?tweet_id='.$tweet['id_str'].'">Retweet</a></p>
|
72 |
+
// <p><a class="favorite" href="https://twitter.com/intent/favorite?tweet_id='.$tweet['id_str'].'">Favorite</a></p>
|
73 |
+
// </div>';
|
74 |
+
// 4. Tweet Timestamp
|
75 |
+
// The Tweet timestamp must always be visible and include the time and date. e.g., “3:00 PM - 31 May 12”.
|
76 |
+
// 5. Tweet Permalink
|
77 |
+
// The Tweet timestamp must always be linked to the Tweet permalink.
|
78 |
+
?>
|
79 |
+
|
80 |
+
<!-- <p class="aptf-timestamp">
|
81 |
+
<a href="https://twitter.com/<?php echo $username; ?>/status/<?php echo $tweet['id_str']; ?>" target="_blank"> -
|
82 |
+
<?php echo $this->get_date_format($tweet['created_at'], $aptf_settings['time_format']); ?>
|
83 |
+
</a>
|
84 |
+
</p> -->
|
85 |
+
|
86 |
+
<?php
|
87 |
+
} else {
|
88 |
+
?>
|
89 |
+
|
90 |
+
<p><a href="http://twitter.com/'<?php echo $username; ?> " class="aptf-tweet-name" target="_blank"><?php _e('Click here to read ' . $username . '\'S Twitter feed', APTF_TD); ?></a></p>
|
91 |
+
<?php
|
92 |
+
}
|
93 |
+
?>
|
94 |
+
</div><!--tweet_date-->
|
95 |
+
<!--Tweet Action -->
|
96 |
+
<?php include(plugin_dir_path(__FILE__) . '../tweet-actions.php'); ?>
|
97 |
+
<!--Tweet Action -->
|
98 |
+
|
99 |
+
</div><!-- single_tweet_wrap-->
|
100 |
+
<?php
|
101 |
+
}
|
102 |
+
}
|
103 |
+
?>
|
104 |
+
</div>
|
105 |
+
|
106 |
+
<?php if(isset($aptf_settings['display_follow_button']) && $aptf_settings['display_follow_button']==1){
|
107 |
+
?>
|
108 |
+
<div class="aptf-seperator"></div>
|
109 |
+
<?php
|
110 |
+
include(plugin_dir_path(__FILE__) . '../follow-btn.php');
|
111 |
+
}
|
112 |
+
?>
|
inc/frontend/templates/slider/template-2.php
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="aptf-tweets-slider-wrapper aptf-slider-template-2" data-auto-slide ="<?php echo $auto_slide; ?>" data-slide-controls = "<?php echo $slide_controls; ?>" data-slide-duration="<?php echo $slide_duration; ?>"><?php
|
2 |
+
if (is_array($tweets)) {
|
3 |
+
|
4 |
+
// to use with intents
|
5 |
+
//echo '<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>';
|
6 |
+
|
7 |
+
foreach ($tweets as $tweet) {
|
8 |
+
//$this->print_array($tweet);
|
9 |
+
?>
|
10 |
+
|
11 |
+
<div class="aptf-single-tweet-slide">
|
12 |
+
<div class="aptf-tweet-content">
|
13 |
+
<?php if ($aptf_settings['display_username'] == 1) { ?><a href="http://twitter.com/<?php echo $username; ?>" class="aptf-tweet-name" target="_blank"><?php echo $username; ?></a><?php } ?>
|
14 |
+
<p class="aptf-timestamp">
|
15 |
+
<a href="https://twitter.com/<?php echo $username; ?>/status/<?php echo $tweet['id_str']; ?>" class="aptf-tweet-name" target="_blank"> -
|
16 |
+
<?php echo $this->get_date_format($tweet['created_at'], $aptf_settings['time_format']); ?>
|
17 |
+
</a>
|
18 |
+
</p>
|
19 |
+
|
20 |
+
<div class="clear"></div>
|
21 |
+
<?php
|
22 |
+
if ($tweet['text']) {
|
23 |
+
$the_tweet = $tweet['text'] . ' '; //adding an extra space to convert hast tag into links
|
24 |
+
/*
|
25 |
+
Twitter Developer Display Requirements
|
26 |
+
https://dev.twitter.com/terms/display-requirements
|
27 |
+
|
28 |
+
2.b. Tweet Entities within the Tweet text must be properly linked to their appropriate home on Twitter. For example:
|
29 |
+
i. User_mentions must link to the mentioned user's profile.
|
30 |
+
ii. Hashtags must link to a twitter.com search with the hashtag as the query.
|
31 |
+
iii. Links in Tweet text must be displayed using the display_url
|
32 |
+
field in the URL entities API response, and link to the original t.co url field.
|
33 |
+
*/
|
34 |
+
|
35 |
+
// i. User_mentions must link to the mentioned user's profile.
|
36 |
+
if (is_array($tweet['entities']['user_mentions'])) {
|
37 |
+
foreach ($tweet['entities']['user_mentions'] as $key => $user_mention) {
|
38 |
+
$the_tweet = preg_replace(
|
39 |
+
'/@' . $user_mention['screen_name'] . '/i', '<a href="http://www.twitter.com/' . $user_mention['screen_name'] . '" target="_blank">@' . $user_mention['screen_name'] . '</a>', $the_tweet);
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
// ii. Hashtags must link to a twitter.com search with the hashtag as the query.
|
44 |
+
if (is_array($tweet['entities']['hashtags'])) {
|
45 |
+
foreach ($tweet['entities']['hashtags'] as $hashtag) {
|
46 |
+
$the_tweet = str_replace(' #' . $hashtag['text'] . ' ', ' <a href="https://twitter.com/search?q=%23' . $hashtag['text'] . '&src=hash" target="_blank">#' . $hashtag['text'] . '</a> ', $the_tweet);
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
// iii. Links in Tweet text must be displayed using the display_url
|
51 |
+
// field in the URL entities API response, and link to the original t.co url field.
|
52 |
+
if (is_array($tweet['entities']['urls'])) {
|
53 |
+
foreach ($tweet['entities']['urls'] as $key => $link) {
|
54 |
+
$the_tweet = preg_replace(
|
55 |
+
'`' . $link['url'] . '`', '<a href="' . $link['url'] . '" target="_blank">' . $link['url'] . '</a>', $the_tweet);
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
echo $the_tweet . ' ';
|
60 |
+
?>
|
61 |
+
</div><!--tweet content-->
|
62 |
+
<div class="aptf-tweet-date">
|
63 |
+
<?php
|
64 |
+
// 3. Tweet Actions
|
65 |
+
// Reply, Retweet, and Favorite action icons must always be visible for the user to interact with the Tweet. These actions must be implemented using Web Intents or with the authenticated Twitter API.
|
66 |
+
// No other social or 3rd party actions similar to Follow, Reply, Retweet and Favorite may be attached to a Tweet.
|
67 |
+
// get the sprite or images from twitter's developers resource and update your stylesheet
|
68 |
+
// echo '
|
69 |
+
// <div class="twitter_intents">
|
70 |
+
// <p><a class="reply" href="https://twitter.com/intent/tweet?in_reply_to='.$tweet['id_str'].'">Reply</a></p>
|
71 |
+
// <p><a class="retweet" href="https://twitter.com/intent/retweet?tweet_id='.$tweet['id_str'].'">Retweet</a></p>
|
72 |
+
// <p><a class="favorite" href="https://twitter.com/intent/favorite?tweet_id='.$tweet['id_str'].'">Favorite</a></p>
|
73 |
+
// </div>';
|
74 |
+
// 4. Tweet Timestamp
|
75 |
+
// The Tweet timestamp must always be visible and include the time and date. e.g., “3:00 PM - 31 May 12”.
|
76 |
+
// 5. Tweet Permalink
|
77 |
+
// The Tweet timestamp must always be linked to the Tweet permalink.
|
78 |
+
?>
|
79 |
+
|
80 |
+
<!-- <p class="aptf-timestamp">
|
81 |
+
<a href="https://twitter.com/<?php echo $username; ?>/status/<?php echo $tweet['id_str']; ?>" target="_blank"> -
|
82 |
+
<?php echo $this->get_date_format($tweet['created_at'], $aptf_settings['time_format']); ?>
|
83 |
+
</a>
|
84 |
+
</p> -->
|
85 |
+
|
86 |
+
<?php
|
87 |
+
} else {
|
88 |
+
?>
|
89 |
+
|
90 |
+
<p><a href="http://twitter.com/'<?php echo $username; ?> " class="aptf-tweet-name" target="_blank"><?php _e('Click here to read ' . $username . '\'S Twitter feed', APTF_TD); ?></a></p>
|
91 |
+
<?php
|
92 |
+
}
|
93 |
+
?>
|
94 |
+
</div><!--tweet_date-->
|
95 |
+
<!--Tweet Action -->
|
96 |
+
<?php include(plugin_dir_path(__FILE__) . '../tweet-actions.php'); ?>
|
97 |
+
<!--Tweet Action -->
|
98 |
+
|
99 |
+
</div><!-- single_tweet_wrap-->
|
100 |
+
<?php
|
101 |
+
}
|
102 |
+
}
|
103 |
+
?>
|
104 |
+
</div>
|
105 |
+
<?php if(isset($aptf_settings['display_follow_button']) && $aptf_settings['display_follow_button']==1){
|
106 |
+
?>
|
107 |
+
<div class="aptf-seperator"></div>
|
108 |
+
<?php
|
109 |
+
include(plugin_dir_path(__FILE__) . '../follow-btn.php');
|
110 |
+
}
|
111 |
+
?>
|
inc/frontend/templates/slider/template-3.php
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="aptf-tweets-slider-wrapper aptf-slider-template-3" data-auto-slide ="<?php echo $auto_slide; ?>" data-slide-controls = "<?php echo $slide_controls; ?>" data-slide-duration="<?php echo $slide_duration; ?>"><?php
|
2 |
+
if (is_array($tweets)) {
|
3 |
+
|
4 |
+
// to use with intents
|
5 |
+
//echo '<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>';
|
6 |
+
|
7 |
+
foreach ($tweets as $tweet) {
|
8 |
+
//$this->print_array($tweet);
|
9 |
+
?>
|
10 |
+
|
11 |
+
<div class="aptf-single-tweet-wrapper">
|
12 |
+
<div class="aptf-tweet-content">
|
13 |
+
|
14 |
+
<div class="aptf-tweet-box">
|
15 |
+
<?php
|
16 |
+
if ($tweet['text']) {
|
17 |
+
$the_tweet = $tweet['text'] . ' '; //adding an extra space to convert hast tag into links
|
18 |
+
/*
|
19 |
+
Twitter Developer Display Requirements
|
20 |
+
https://dev.twitter.com/terms/display-requirements
|
21 |
+
|
22 |
+
2.b. Tweet Entities within the Tweet text must be properly linked to their appropriate home on Twitter. For example:
|
23 |
+
i. User_mentions must link to the mentioned user's profile.
|
24 |
+
ii. Hashtags must link to a twitter.com search with the hashtag as the query.
|
25 |
+
iii. Links in Tweet text must be displayed using the display_url
|
26 |
+
field in the URL entities API response, and link to the original t.co url field.
|
27 |
+
*/
|
28 |
+
|
29 |
+
// i. User_mentions must link to the mentioned user's profile.
|
30 |
+
if (is_array($tweet['entities']['user_mentions'])) {
|
31 |
+
foreach ($tweet['entities']['user_mentions'] as $key => $user_mention) {
|
32 |
+
$the_tweet = preg_replace(
|
33 |
+
'/@' . $user_mention['screen_name'] . '/i', '<a href="http://www.twitter.com/' . $user_mention['screen_name'] . '" target="_blank">@' . $user_mention['screen_name'] . '</a>', $the_tweet);
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
// ii. Hashtags must link to a twitter.com search with the hashtag as the query.
|
38 |
+
if (is_array($tweet['entities']['hashtags'])) {
|
39 |
+
foreach ($tweet['entities']['hashtags'] as $hashtag) {
|
40 |
+
$the_tweet = str_replace(' #' . $hashtag['text'] . ' ', ' <a href="https://twitter.com/search?q=%23' . $hashtag['text'] . '&src=hash" target="_blank">#' . $hashtag['text'] . '</a> ', $the_tweet);
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
// iii. Links in Tweet text must be displayed using the display_url
|
45 |
+
// field in the URL entities API response, and link to the original t.co url field.
|
46 |
+
if (is_array($tweet['entities']['urls'])) {
|
47 |
+
foreach ($tweet['entities']['urls'] as $key => $link) {
|
48 |
+
$the_tweet = preg_replace(
|
49 |
+
'`' . $link['url'] . '`', '<a href="' . $link['url'] . '" target="_blank">' . $link['url'] . '</a>', $the_tweet);
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
echo $the_tweet . ' ';
|
54 |
+
?>
|
55 |
+
</div><!--tweet content-->
|
56 |
+
<?php if (isset($aptf_settings['display_twitter_actions']) && $aptf_settings['display_twitter_actions'] == 1) { ?>
|
57 |
+
<!--Tweet Action -->
|
58 |
+
<?php include(plugin_dir_path(__FILE__) . '../tweet-actions.php'); ?>
|
59 |
+
<!--Tweet Action -->
|
60 |
+
<?php } ?>
|
61 |
+
</div>
|
62 |
+
<?php if ($aptf_settings['display_username'] == 1) { ?><a href="http://twitter.com/<?php echo $username; ?>" class="aptf-tweet-name" target="_blank"><?php echo $username; ?></a> <?php } ?>
|
63 |
+
<div class="aptf-tweet-date">
|
64 |
+
<?php
|
65 |
+
// 3. Tweet Actions
|
66 |
+
// Reply, Retweet, and Favorite action icons must always be visible for the user to interact with the Tweet. These actions must be implemented using Web Intents or with the authenticated Twitter API.
|
67 |
+
// No other social or 3rd party actions similar to Follow, Reply, Retweet and Favorite may be attached to a Tweet.
|
68 |
+
// get the sprite or images from twitter's developers resource and update your stylesheet
|
69 |
+
// echo '
|
70 |
+
// <div class="twitter_intents">
|
71 |
+
// <p><a class="reply" href="https://twitter.com/intent/tweet?in_reply_to='.$tweet['id_str'].'">Reply</a></p>
|
72 |
+
// <p><a class="retweet" href="https://twitter.com/intent/retweet?tweet_id='.$tweet['id_str'].'">Retweet</a></p>
|
73 |
+
// <p><a class="favorite" href="https://twitter.com/intent/favorite?tweet_id='.$tweet['id_str'].'">Favorite</a></p>
|
74 |
+
// </div>';
|
75 |
+
// 4. Tweet Timestamp
|
76 |
+
// The Tweet timestamp must always be visible and include the time and date. e.g., “3:00 PM - 31 May 12”.
|
77 |
+
// 5. Tweet Permalink
|
78 |
+
// The Tweet timestamp must always be linked to the Tweet permalink.
|
79 |
+
?>
|
80 |
+
|
81 |
+
<p class="aptf-timestamp">
|
82 |
+
<a href="https://twitter.com/<?php echo $username; ?>/status/<?php echo $tweet['id_str']; ?>" target="_blank"> -
|
83 |
+
<?php echo $this->get_date_format($tweet['created_at'], $aptf_settings['time_format']); ?>
|
84 |
+
</a>
|
85 |
+
</p>
|
86 |
+
|
87 |
+
<?php
|
88 |
+
} else {
|
89 |
+
?>
|
90 |
+
|
91 |
+
<p><a href="http://twitter.com/'<?php echo $username; ?> " target="_blank"><?php _e('Click here to read ' . $username . '\'S Twitter feed', APTF_TD); ?></a></p>
|
92 |
+
<?php
|
93 |
+
}
|
94 |
+
?>
|
95 |
+
</div><!--tweet_date-->
|
96 |
+
|
97 |
+
|
98 |
+
</div><!-- single_tweet_wrap-->
|
99 |
+
<?php
|
100 |
+
}
|
101 |
+
}
|
102 |
+
?>
|
103 |
+
</div>
|
104 |
+
<?php if(isset($aptf_settings['display_follow_button']) && $aptf_settings['display_follow_button']==1){
|
105 |
+
?>
|
106 |
+
<div class="aptf-seperator"></div>
|
107 |
+
<?php
|
108 |
+
include(plugin_dir_path(__FILE__) . '../follow-btn.php');
|
109 |
+
}
|
110 |
+
?>
|
inc/frontend/templates/tweet-actions.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="aptf-tweet-actions-wrapper aptf-tweet-actions">
|
2 |
+
<a href="https://twitter.com/intent/tweet?in_reply_to=<?php echo $tweet['id_str']; ?>" class="aptf-tweet-reply aptf-tweet-action-reply" target="_blank">h</a>
|
3 |
+
<a href="https://twitter.com/intent/retweet?tweet_id=<?php echo $tweet['id_str']; ?>" class="aptf-tweet-retweet aptf-tweet-action-retweet" target="_blank">J</a>
|
4 |
+
<a href="https://twitter.com/intent/favorite?tweet_id=<?php echo $tweet['id_str']; ?>" class="aptf-tweet-fav aptf-tweet-action-favourite" target="_blank">R</a>
|
5 |
+
</div>
|
js/backend.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
$(function () {
|
3 |
+
//All the backend js for the plugin
|
4 |
+
|
5 |
+
/*
|
6 |
+
Settings Tabs Switching
|
7 |
+
*/
|
8 |
+
$('.aptf-tabs-trigger').click(function(){
|
9 |
+
$('.aptf-tabs-trigger').removeClass('aptf-active-trigger');
|
10 |
+
$(this).addClass('aptf-active-trigger');
|
11 |
+
var attr_id = $(this).attr('id');
|
12 |
+
var arr_id = attr_id.split('-');
|
13 |
+
var id = arr_id[1];
|
14 |
+
$('.aptf-single-board-wrapper').hide();
|
15 |
+
$('#aptf-'+id+'-board').show();
|
16 |
+
});
|
17 |
+
|
18 |
+
|
19 |
+
});
|
20 |
+
}(jQuery));
|
js/frontend.js
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function aptf_popitup(url) {
|
2 |
+
newwindow=window.open(url,'name','height=400,width=650');
|
3 |
+
if (window.focus) {newwindow.focus()}
|
4 |
+
return false;
|
5 |
+
}
|
6 |
+
|
7 |
+
(function ($) {
|
8 |
+
$(function () {
|
9 |
+
//All the frontend js for the plugin
|
10 |
+
|
11 |
+
$('.aptf-tweets-slider-wrapper').each(function(){
|
12 |
+
var controls = $(this).attr('data-slide-controls');
|
13 |
+
var auto = $(this).attr('data-slide-controls');
|
14 |
+
var slide_duration = $(this).attr('data-slide-duration');
|
15 |
+
$(this).bxSlider({
|
16 |
+
auto:auto,
|
17 |
+
controls:controls,
|
18 |
+
pause:slide_duration,
|
19 |
+
pager:false,
|
20 |
+
speed:1500
|
21 |
+
});
|
22 |
+
});
|
23 |
+
|
24 |
+
|
25 |
+
});//document.ready close
|
26 |
+
}(jQuery));
|
js/jquery.bxslider.min.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* BxSlider v4.1.2 - Fully loaded, responsive content slider
|
3 |
+
* http://bxslider.com
|
4 |
+
*
|
5 |
+
* Copyright 2014, Steven Wanderski - http://stevenwanderski.com - http://bxcreative.com
|
6 |
+
* Written while drinking Belgian ales and listening to jazz
|
7 |
+
*
|
8 |
+
* Released under the MIT license - http://opensource.org/licenses/MIT
|
9 |
+
*/
|
10 |
+
!function(t){var e={},s={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",autoHover:!1,autoDelay:0,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:function(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function(){},onSlidePrev:function(){},onSliderResize:function(){}};t.fn.bxSlider=function(n){if(0==this.length)return this;if(this.length>1)return this.each(function(){t(this).bxSlider(n)}),this;var o={},r=this;e.el=this;var a=t(window).width(),l=t(window).height(),d=function(){o.settings=t.extend({},s,n),o.settings.slideWidth=parseInt(o.settings.slideWidth),o.children=r.children(o.settings.slideSelector),o.children.length<o.settings.minSlides&&(o.settings.minSlides=o.children.length),o.children.length<o.settings.maxSlides&&(o.settings.maxSlides=o.children.length),o.settings.randomStart&&(o.settings.startSlide=Math.floor(Math.random()*o.children.length)),o.active={index:o.settings.startSlide},o.carousel=o.settings.minSlides>1||o.settings.maxSlides>1,o.carousel&&(o.settings.preloadImages="all"),o.minThreshold=o.settings.minSlides*o.settings.slideWidth+(o.settings.minSlides-1)*o.settings.slideMargin,o.maxThreshold=o.settings.maxSlides*o.settings.slideWidth+(o.settings.maxSlides-1)*o.settings.slideMargin,o.working=!1,o.controls={},o.interval=null,o.animProp="vertical"==o.settings.mode?"top":"left",o.usingCSS=o.settings.useCSS&&"fade"!=o.settings.mode&&function(){var t=document.createElement("div"),e=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i in e)if(void 0!==t.style[e[i]])return o.cssPrefix=e[i].replace("Perspective","").toLowerCase(),o.animProp="-"+o.cssPrefix+"-transform",!0;return!1}(),"vertical"==o.settings.mode&&(o.settings.maxSlides=o.settings.minSlides),r.data("origStyle",r.attr("style")),r.children(o.settings.slideSelector).each(function(){t(this).data("origStyle",t(this).attr("style"))}),c()},c=function(){r.wrap('<div class="bx-wrapper"><div class="bx-viewport"></div></div>'),o.viewport=r.parent(),o.loader=t('<div class="bx-loading" />'),o.viewport.prepend(o.loader),r.css({width:"horizontal"==o.settings.mode?100*o.children.length+215+"%":"auto",position:"relative"}),o.usingCSS&&o.settings.easing?r.css("-"+o.cssPrefix+"-transition-timing-function",o.settings.easing):o.settings.easing||(o.settings.easing="swing"),f(),o.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),o.viewport.parent().css({maxWidth:p()}),o.settings.pager||o.viewport.parent().css({margin:"0 auto 0px"}),o.children.css({"float":"horizontal"==o.settings.mode?"left":"none",listStyle:"none",position:"relative"}),o.children.css("width",u()),"horizontal"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginRight",o.settings.slideMargin),"vertical"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginBottom",o.settings.slideMargin),"fade"==o.settings.mode&&(o.children.css({position:"absolute",zIndex:0,display:"none"}),o.children.eq(o.settings.startSlide).css({zIndex:o.settings.slideZIndex,display:"block"})),o.controls.el=t('<div class="bx-controls" />'),o.settings.captions&&P(),o.active.last=o.settings.startSlide==x()-1,o.settings.video&&r.fitVids();var e=o.children.eq(o.settings.startSlide);"all"==o.settings.preloadImages&&(e=o.children),o.settings.ticker?o.settings.pager=!1:(o.settings.pager&&T(),o.settings.controls&&C(),o.settings.auto&&o.settings.autoControls&&E(),(o.settings.controls||o.settings.autoControls||o.settings.pager)&&o.viewport.after(o.controls.el)),g(e,h)},g=function(e,i){var s=e.find("img, iframe").length;if(0==s)return i(),void 0;var n=0;e.find("img, iframe").each(function(){t(this).one("load",function(){++n==s&&i()}).each(function(){this.complete&&t(this).load()})})},h=function(){if(o.settings.infiniteLoop&&"fade"!=o.settings.mode&&!o.settings.ticker){var e="vertical"==o.settings.mode?o.settings.minSlides:o.settings.maxSlides,i=o.children.slice(0,e).clone().addClass("bx-clone"),s=o.children.slice(-e).clone().addClass("bx-clone");r.append(i).prepend(s)}o.loader.remove(),S(),"vertical"==o.settings.mode&&(o.settings.adaptiveHeight=!0),o.viewport.height(v()),r.redrawSlider(),o.settings.onSliderLoad(o.active.index),o.initialized=!0,o.settings.responsive&&t(window).bind("resize",Z),o.settings.auto&&o.settings.autoStart&&H(),o.settings.ticker&&L(),o.settings.pager&&q(o.settings.startSlide),o.settings.controls&&W(),o.settings.touchEnabled&&!o.settings.ticker&&O()},v=function(){var e=0,s=t();if("vertical"==o.settings.mode||o.settings.adaptiveHeight)if(o.carousel){var n=1==o.settings.moveSlides?o.active.index:o.active.index*m();for(s=o.children.eq(n),i=1;i<=o.settings.maxSlides-1;i++)s=n+i>=o.children.length?s.add(o.children.eq(i-1)):s.add(o.children.eq(n+i))}else s=o.children.eq(o.active.index);else s=o.children;return"vertical"==o.settings.mode?(s.each(function(){e+=t(this).outerHeight()}),o.settings.slideMargin>0&&(e+=o.settings.slideMargin*(o.settings.minSlides-1))):e=Math.max.apply(Math,s.map(function(){return t(this).outerHeight(!1)}).get()),e},p=function(){var t="100%";return o.settings.slideWidth>0&&(t="horizontal"==o.settings.mode?o.settings.maxSlides*o.settings.slideWidth+(o.settings.maxSlides-1)*o.settings.slideMargin:o.settings.slideWidth),t},u=function(){var t=o.settings.slideWidth,e=o.viewport.width();return 0==o.settings.slideWidth||o.settings.slideWidth>e&&!o.carousel||"vertical"==o.settings.mode?t=e:o.settings.maxSlides>1&&"horizontal"==o.settings.mode&&(e>o.maxThreshold||e<o.minThreshold&&(t=(e-o.settings.slideMargin*(o.settings.minSlides-1))/o.settings.minSlides)),t},f=function(){var t=1;if("horizontal"==o.settings.mode&&o.settings.slideWidth>0)if(o.viewport.width()<o.minThreshold)t=o.settings.minSlides;else if(o.viewport.width()>o.maxThreshold)t=o.settings.maxSlides;else{var e=o.children.first().width();t=Math.floor(o.viewport.width()/e)}else"vertical"==o.settings.mode&&(t=o.settings.minSlides);return t},x=function(){var t=0;if(o.settings.moveSlides>0)if(o.settings.infiniteLoop)t=o.children.length/m();else for(var e=0,i=0;e<o.children.length;)++t,e=i+f(),i+=o.settings.moveSlides<=f()?o.settings.moveSlides:f();else t=Math.ceil(o.children.length/f());return t},m=function(){return o.settings.moveSlides>0&&o.settings.moveSlides<=f()?o.settings.moveSlides:f()},S=function(){if(o.children.length>o.settings.maxSlides&&o.active.last&&!o.settings.infiniteLoop){if("horizontal"==o.settings.mode){var t=o.children.last(),e=t.position();b(-(e.left-(o.viewport.width()-t.width())),"reset",0)}else if("vertical"==o.settings.mode){var i=o.children.length-o.settings.minSlides,e=o.children.eq(i).position();b(-e.top,"reset",0)}}else{var e=o.children.eq(o.active.index*m()).position();o.active.index==x()-1&&(o.active.last=!0),void 0!=e&&("horizontal"==o.settings.mode?b(-e.left,"reset",0):"vertical"==o.settings.mode&&b(-e.top,"reset",0))}},b=function(t,e,i,s){if(o.usingCSS){var n="vertical"==o.settings.mode?"translate3d(0, "+t+"px, 0)":"translate3d("+t+"px, 0, 0)";r.css("-"+o.cssPrefix+"-transition-duration",i/1e3+"s"),"slide"==e?(r.css(o.animProp,n),r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),D()})):"reset"==e?r.css(o.animProp,n):"ticker"==e&&(r.css("-"+o.cssPrefix+"-transition-timing-function","linear"),r.css(o.animProp,n),r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),b(s.resetValue,"reset",0),N()}))}else{var a={};a[o.animProp]=t,"slide"==e?r.animate(a,i,o.settings.easing,function(){D()}):"reset"==e?r.css(o.animProp,t):"ticker"==e&&r.animate(a,speed,"linear",function(){b(s.resetValue,"reset",0),N()})}},w=function(){for(var e="",i=x(),s=0;i>s;s++){var n="";o.settings.buildPager&&t.isFunction(o.settings.buildPager)?(n=o.settings.buildPager(s),o.pagerEl.addClass("bx-custom-pager")):(n=s+1,o.pagerEl.addClass("bx-default-pager")),e+='<div class="bx-pager-item"><a href="" data-slide-index="'+s+'" class="bx-pager-link">'+n+"</a></div>"}o.pagerEl.html(e)},T=function(){o.settings.pagerCustom?o.pagerEl=t(o.settings.pagerCustom):(o.pagerEl=t('<div class="bx-pager" />'),o.settings.pagerSelector?t(o.settings.pagerSelector).html(o.pagerEl):o.controls.el.addClass("bx-has-pager").append(o.pagerEl),w()),o.pagerEl.on("click","a",I)},C=function(){o.controls.next=t('<a class="bx-next" href="">'+o.settings.nextText+"</a>"),o.controls.prev=t('<a class="bx-prev" href="">'+o.settings.prevText+"</a>"),o.controls.next.bind("click",y),o.controls.prev.bind("click",z),o.settings.nextSelector&&t(o.settings.nextSelector).append(o.controls.next),o.settings.prevSelector&&t(o.settings.prevSelector).append(o.controls.prev),o.settings.nextSelector||o.settings.prevSelector||(o.controls.directionEl=t('<div class="bx-controls-direction" />'),o.controls.directionEl.append(o.controls.prev).append(o.controls.next),o.controls.el.addClass("bx-has-controls-direction").append(o.controls.directionEl))},E=function(){o.controls.start=t('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+o.settings.startText+"</a></div>"),o.controls.stop=t('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+o.settings.stopText+"</a></div>"),o.controls.autoEl=t('<div class="bx-controls-auto" />'),o.controls.autoEl.on("click",".bx-start",k),o.controls.autoEl.on("click",".bx-stop",M),o.settings.autoControlsCombine?o.controls.autoEl.append(o.controls.start):o.controls.autoEl.append(o.controls.start).append(o.controls.stop),o.settings.autoControlsSelector?t(o.settings.autoControlsSelector).html(o.controls.autoEl):o.controls.el.addClass("bx-has-controls-auto").append(o.controls.autoEl),A(o.settings.autoStart?"stop":"start")},P=function(){o.children.each(function(){var e=t(this).find("img:first").attr("title");void 0!=e&&(""+e).length&&t(this).append('<div class="bx-caption"><span>'+e+"</span></div>")})},y=function(t){o.settings.auto&&r.stopAuto(),r.goToNextSlide(),t.preventDefault()},z=function(t){o.settings.auto&&r.stopAuto(),r.goToPrevSlide(),t.preventDefault()},k=function(t){r.startAuto(),t.preventDefault()},M=function(t){r.stopAuto(),t.preventDefault()},I=function(e){o.settings.auto&&r.stopAuto();var i=t(e.currentTarget),s=parseInt(i.attr("data-slide-index"));s!=o.active.index&&r.goToSlide(s),e.preventDefault()},q=function(e){var i=o.children.length;return"short"==o.settings.pagerType?(o.settings.maxSlides>1&&(i=Math.ceil(o.children.length/o.settings.maxSlides)),o.pagerEl.html(e+1+o.settings.pagerShortSeparator+i),void 0):(o.pagerEl.find("a").removeClass("active"),o.pagerEl.each(function(i,s){t(s).find("a").eq(e).addClass("active")}),void 0)},D=function(){if(o.settings.infiniteLoop){var t="";0==o.active.index?t=o.children.eq(0).position():o.active.index==x()-1&&o.carousel?t=o.children.eq((x()-1)*m()).position():o.active.index==o.children.length-1&&(t=o.children.eq(o.children.length-1).position()),t&&("horizontal"==o.settings.mode?b(-t.left,"reset",0):"vertical"==o.settings.mode&&b(-t.top,"reset",0))}o.working=!1,o.settings.onSlideAfter(o.children.eq(o.active.index),o.oldIndex,o.active.index)},A=function(t){o.settings.autoControlsCombine?o.controls.autoEl.html(o.controls[t]):(o.controls.autoEl.find("a").removeClass("active"),o.controls.autoEl.find("a:not(.bx-"+t+")").addClass("active"))},W=function(){1==x()?(o.controls.prev.addClass("disabled"),o.controls.next.addClass("disabled")):!o.settings.infiniteLoop&&o.settings.hideControlOnEnd&&(0==o.active.index?(o.controls.prev.addClass("disabled"),o.controls.next.removeClass("disabled")):o.active.index==x()-1?(o.controls.next.addClass("disabled"),o.controls.prev.removeClass("disabled")):(o.controls.prev.removeClass("disabled"),o.controls.next.removeClass("disabled")))},H=function(){o.settings.autoDelay>0?setTimeout(r.startAuto,o.settings.autoDelay):r.startAuto(),o.settings.autoHover&&r.hover(function(){o.interval&&(r.stopAuto(!0),o.autoPaused=!0)},function(){o.autoPaused&&(r.startAuto(!0),o.autoPaused=null)})},L=function(){var e=0;if("next"==o.settings.autoDirection)r.append(o.children.clone().addClass("bx-clone"));else{r.prepend(o.children.clone().addClass("bx-clone"));var i=o.children.first().position();e="horizontal"==o.settings.mode?-i.left:-i.top}b(e,"reset",0),o.settings.pager=!1,o.settings.controls=!1,o.settings.autoControls=!1,o.settings.tickerHover&&!o.usingCSS&&o.viewport.hover(function(){r.stop()},function(){var e=0;o.children.each(function(){e+="horizontal"==o.settings.mode?t(this).outerWidth(!0):t(this).outerHeight(!0)});var i=o.settings.speed/e,s="horizontal"==o.settings.mode?"left":"top",n=i*(e-Math.abs(parseInt(r.css(s))));N(n)}),N()},N=function(t){speed=t?t:o.settings.speed;var e={left:0,top:0},i={left:0,top:0};"next"==o.settings.autoDirection?e=r.find(".bx-clone").first().position():i=o.children.first().position();var s="horizontal"==o.settings.mode?-e.left:-e.top,n="horizontal"==o.settings.mode?-i.left:-i.top,a={resetValue:n};b(s,"ticker",speed,a)},O=function(){o.touch={start:{x:0,y:0},end:{x:0,y:0}},o.viewport.bind("touchstart",X)},X=function(t){if(o.working)t.preventDefault();else{o.touch.originalPos=r.position();var e=t.originalEvent;o.touch.start.x=e.changedTouches[0].pageX,o.touch.start.y=e.changedTouches[0].pageY,o.viewport.bind("touchmove",Y),o.viewport.bind("touchend",V)}},Y=function(t){var e=t.originalEvent,i=Math.abs(e.changedTouches[0].pageX-o.touch.start.x),s=Math.abs(e.changedTouches[0].pageY-o.touch.start.y);if(3*i>s&&o.settings.preventDefaultSwipeX?t.preventDefault():3*s>i&&o.settings.preventDefaultSwipeY&&t.preventDefault(),"fade"!=o.settings.mode&&o.settings.oneToOneTouch){var n=0;if("horizontal"==o.settings.mode){var r=e.changedTouches[0].pageX-o.touch.start.x;n=o.touch.originalPos.left+r}else{var r=e.changedTouches[0].pageY-o.touch.start.y;n=o.touch.originalPos.top+r}b(n,"reset",0)}},V=function(t){o.viewport.unbind("touchmove",Y);var e=t.originalEvent,i=0;if(o.touch.end.x=e.changedTouches[0].pageX,o.touch.end.y=e.changedTouches[0].pageY,"fade"==o.settings.mode){var s=Math.abs(o.touch.start.x-o.touch.end.x);s>=o.settings.swipeThreshold&&(o.touch.start.x>o.touch.end.x?r.goToNextSlide():r.goToPrevSlide(),r.stopAuto())}else{var s=0;"horizontal"==o.settings.mode?(s=o.touch.end.x-o.touch.start.x,i=o.touch.originalPos.left):(s=o.touch.end.y-o.touch.start.y,i=o.touch.originalPos.top),!o.settings.infiniteLoop&&(0==o.active.index&&s>0||o.active.last&&0>s)?b(i,"reset",200):Math.abs(s)>=o.settings.swipeThreshold?(0>s?r.goToNextSlide():r.goToPrevSlide(),r.stopAuto()):b(i,"reset",200)}o.viewport.unbind("touchend",V)},Z=function(){var e=t(window).width(),i=t(window).height();(a!=e||l!=i)&&(a=e,l=i,r.redrawSlider(),o.settings.onSliderResize.call(r,o.active.index))};return r.goToSlide=function(e,i){if(!o.working&&o.active.index!=e)if(o.working=!0,o.oldIndex=o.active.index,o.active.index=0>e?x()-1:e>=x()?0:e,o.settings.onSlideBefore(o.children.eq(o.active.index),o.oldIndex,o.active.index),"next"==i?o.settings.onSlideNext(o.children.eq(o.active.index),o.oldIndex,o.active.index):"prev"==i&&o.settings.onSlidePrev(o.children.eq(o.active.index),o.oldIndex,o.active.index),o.active.last=o.active.index>=x()-1,o.settings.pager&&q(o.active.index),o.settings.controls&&W(),"fade"==o.settings.mode)o.settings.adaptiveHeight&&o.viewport.height()!=v()&&o.viewport.animate({height:v()},o.settings.adaptiveHeightSpeed),o.children.filter(":visible").fadeOut(o.settings.speed).css({zIndex:0}),o.children.eq(o.active.index).css("zIndex",o.settings.slideZIndex+1).fadeIn(o.settings.speed,function(){t(this).css("zIndex",o.settings.slideZIndex),D()});else{o.settings.adaptiveHeight&&o.viewport.height()!=v()&&o.viewport.animate({height:v()},o.settings.adaptiveHeightSpeed);var s=0,n={left:0,top:0};if(!o.settings.infiniteLoop&&o.carousel&&o.active.last)if("horizontal"==o.settings.mode){var a=o.children.eq(o.children.length-1);n=a.position(),s=o.viewport.width()-a.outerWidth()}else{var l=o.children.length-o.settings.minSlides;n=o.children.eq(l).position()}else if(o.carousel&&o.active.last&&"prev"==i){var d=1==o.settings.moveSlides?o.settings.maxSlides-m():(x()-1)*m()-(o.children.length-o.settings.maxSlides),a=r.children(".bx-clone").eq(d);n=a.position()}else if("next"==i&&0==o.active.index)n=r.find("> .bx-clone").eq(o.settings.maxSlides).position(),o.active.last=!1;else if(e>=0){var c=e*m();n=o.children.eq(c).position()}if("undefined"!=typeof n){var g="horizontal"==o.settings.mode?-(n.left-s):-n.top;b(g,"slide",o.settings.speed)}}},r.goToNextSlide=function(){if(o.settings.infiniteLoop||!o.active.last){var t=parseInt(o.active.index)+1;r.goToSlide(t,"next")}},r.goToPrevSlide=function(){if(o.settings.infiniteLoop||0!=o.active.index){var t=parseInt(o.active.index)-1;r.goToSlide(t,"prev")}},r.startAuto=function(t){o.interval||(o.interval=setInterval(function(){"next"==o.settings.autoDirection?r.goToNextSlide():r.goToPrevSlide()},o.settings.pause),o.settings.autoControls&&1!=t&&A("stop"))},r.stopAuto=function(t){o.interval&&(clearInterval(o.interval),o.interval=null,o.settings.autoControls&&1!=t&&A("start"))},r.getCurrentSlide=function(){return o.active.index},r.getCurrentSlideElement=function(){return o.children.eq(o.active.index)},r.getSlideCount=function(){return o.children.length},r.redrawSlider=function(){o.children.add(r.find(".bx-clone")).outerWidth(u()),o.viewport.css("height",v()),o.settings.ticker||S(),o.active.last&&(o.active.index=x()-1),o.active.index>=x()&&(o.active.last=!0),o.settings.pager&&!o.settings.pagerCustom&&(w(),q(o.active.index))},r.destroySlider=function(){o.initialized&&(o.initialized=!1,t(".bx-clone",this).remove(),o.children.each(function(){void 0!=t(this).data("origStyle")?t(this).attr("style",t(this).data("origStyle")):t(this).removeAttr("style")}),void 0!=t(this).data("origStyle")?this.attr("style",t(this).data("origStyle")):t(this).removeAttr("style"),t(this).unwrap().unwrap(),o.controls.el&&o.controls.el.remove(),o.controls.next&&o.controls.next.remove(),o.controls.prev&&o.controls.prev.remove(),o.pagerEl&&o.settings.controls&&o.pagerEl.remove(),t(".bx-caption",this).remove(),o.controls.autoEl&&o.controls.autoEl.remove(),clearInterval(o.interval),o.settings.responsive&&t(window).unbind("resize",Z))},r.reloadSlider=function(t){void 0!=t&&(n=t),r.destroySlider(),d()},d(),this}}(jQuery);
|
oauth/OAuth.php
ADDED
@@ -0,0 +1,874 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// vim: foldmethod=marker
|
3 |
+
|
4 |
+
/* Generic exception class
|
5 |
+
*/
|
6 |
+
if (!class_exists('OAuthException')) {
|
7 |
+
class OAuthException extends Exception {
|
8 |
+
// pass
|
9 |
+
}
|
10 |
+
}
|
11 |
+
|
12 |
+
class OAuthConsumer {
|
13 |
+
public $key;
|
14 |
+
public $secret;
|
15 |
+
|
16 |
+
function __construct($key, $secret, $callback_url=NULL) {
|
17 |
+
$this->key = $key;
|
18 |
+
$this->secret = $secret;
|
19 |
+
$this->callback_url = $callback_url;
|
20 |
+
}
|
21 |
+
|
22 |
+
function __toString() {
|
23 |
+
return "OAuthConsumer[key=$this->key,secret=$this->secret]";
|
24 |
+
}
|
25 |
+
}
|
26 |
+
|
27 |
+
class OAuthToken {
|
28 |
+
// access tokens and request tokens
|
29 |
+
public $key;
|
30 |
+
public $secret;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* key = the token
|
34 |
+
* secret = the token secret
|
35 |
+
*/
|
36 |
+
function __construct($key, $secret) {
|
37 |
+
$this->key = $key;
|
38 |
+
$this->secret = $secret;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* generates the basic string serialization of a token that a server
|
43 |
+
* would respond to request_token and access_token calls with
|
44 |
+
*/
|
45 |
+
function to_string() {
|
46 |
+
return "oauth_token=" .
|
47 |
+
OAuthUtil::urlencode_rfc3986($this->key) .
|
48 |
+
"&oauth_token_secret=" .
|
49 |
+
OAuthUtil::urlencode_rfc3986($this->secret);
|
50 |
+
}
|
51 |
+
|
52 |
+
function __toString() {
|
53 |
+
return $this->to_string();
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* A class for implementing a Signature Method
|
59 |
+
* See section 9 ("Signing Requests") in the spec
|
60 |
+
*/
|
61 |
+
abstract class OAuthSignatureMethod {
|
62 |
+
/**
|
63 |
+
* Needs to return the name of the Signature Method (ie HMAC-SHA1)
|
64 |
+
* @return string
|
65 |
+
*/
|
66 |
+
abstract public function get_name();
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Build up the signature
|
70 |
+
* NOTE: The output of this function MUST NOT be urlencoded.
|
71 |
+
* the encoding is handled in OAuthRequest when the final
|
72 |
+
* request is serialized
|
73 |
+
* @param OAuthRequest $request
|
74 |
+
* @param OAuthConsumer $consumer
|
75 |
+
* @param OAuthToken $token
|
76 |
+
* @return string
|
77 |
+
*/
|
78 |
+
abstract public function build_signature($request, $consumer, $token);
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Verifies that a given signature is correct
|
82 |
+
* @param OAuthRequest $request
|
83 |
+
* @param OAuthConsumer $consumer
|
84 |
+
* @param OAuthToken $token
|
85 |
+
* @param string $signature
|
86 |
+
* @return bool
|
87 |
+
*/
|
88 |
+
public function check_signature($request, $consumer, $token, $signature) {
|
89 |
+
$built = $this->build_signature($request, $consumer, $token);
|
90 |
+
return $built == $signature;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104]
|
96 |
+
* where the Signature Base String is the text and the key is the concatenated values (each first
|
97 |
+
* encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&'
|
98 |
+
* character (ASCII code 38) even if empty.
|
99 |
+
* - Chapter 9.2 ("HMAC-SHA1")
|
100 |
+
*/
|
101 |
+
class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod {
|
102 |
+
function get_name() {
|
103 |
+
return "HMAC-SHA1";
|
104 |
+
}
|
105 |
+
|
106 |
+
public function build_signature($request, $consumer, $token) {
|
107 |
+
$base_string = $request->get_signature_base_string();
|
108 |
+
$request->base_string = $base_string;
|
109 |
+
|
110 |
+
$key_parts = array(
|
111 |
+
$consumer->secret,
|
112 |
+
($token) ? $token->secret : ""
|
113 |
+
);
|
114 |
+
|
115 |
+
$key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
|
116 |
+
$key = implode('&', $key_parts);
|
117 |
+
|
118 |
+
return base64_encode(hash_hmac('sha1', $base_string, $key, true));
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* The PLAINTEXT method does not provide any security protection and SHOULD only be used
|
124 |
+
* over a secure channel such as HTTPS. It does not use the Signature Base String.
|
125 |
+
* - Chapter 9.4 ("PLAINTEXT")
|
126 |
+
*/
|
127 |
+
class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod {
|
128 |
+
public function get_name() {
|
129 |
+
return "PLAINTEXT";
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* oauth_signature is set to the concatenated encoded values of the Consumer Secret and
|
134 |
+
* Token Secret, separated by a '&' character (ASCII code 38), even if either secret is
|
135 |
+
* empty. The result MUST be encoded again.
|
136 |
+
* - Chapter 9.4.1 ("Generating Signatures")
|
137 |
+
*
|
138 |
+
* Please note that the second encoding MUST NOT happen in the SignatureMethod, as
|
139 |
+
* OAuthRequest handles this!
|
140 |
+
*/
|
141 |
+
public function build_signature($request, $consumer, $token) {
|
142 |
+
$key_parts = array(
|
143 |
+
$consumer->secret,
|
144 |
+
($token) ? $token->secret : ""
|
145 |
+
);
|
146 |
+
|
147 |
+
$key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
|
148 |
+
$key = implode('&', $key_parts);
|
149 |
+
$request->base_string = $key;
|
150 |
+
|
151 |
+
return $key;
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in
|
157 |
+
* [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for
|
158 |
+
* EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a
|
159 |
+
* verified way to the Service Provider, in a manner which is beyond the scope of this
|
160 |
+
* specification.
|
161 |
+
* - Chapter 9.3 ("RSA-SHA1")
|
162 |
+
*/
|
163 |
+
abstract class OAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod {
|
164 |
+
public function get_name() {
|
165 |
+
return "RSA-SHA1";
|
166 |
+
}
|
167 |
+
|
168 |
+
// Up to the SP to implement this lookup of keys. Possible ideas are:
|
169 |
+
// (1) do a lookup in a table of trusted certs keyed off of consumer
|
170 |
+
// (2) fetch via http using a url provided by the requester
|
171 |
+
// (3) some sort of specific discovery code based on request
|
172 |
+
//
|
173 |
+
// Either way should return a string representation of the certificate
|
174 |
+
protected abstract function fetch_public_cert(&$request);
|
175 |
+
|
176 |
+
// Up to the SP to implement this lookup of keys. Possible ideas are:
|
177 |
+
// (1) do a lookup in a table of trusted certs keyed off of consumer
|
178 |
+
//
|
179 |
+
// Either way should return a string representation of the certificate
|
180 |
+
protected abstract function fetch_private_cert(&$request);
|
181 |
+
|
182 |
+
public function build_signature($request, $consumer, $token) {
|
183 |
+
$base_string = $request->get_signature_base_string();
|
184 |
+
$request->base_string = $base_string;
|
185 |
+
|
186 |
+
// Fetch the private key cert based on the request
|
187 |
+
$cert = $this->fetch_private_cert($request);
|
188 |
+
|
189 |
+
// Pull the private key ID from the certificate
|
190 |
+
$privatekeyid = openssl_get_privatekey($cert);
|
191 |
+
|
192 |
+
// Sign using the key
|
193 |
+
$ok = openssl_sign($base_string, $signature, $privatekeyid);
|
194 |
+
|
195 |
+
// Release the key resource
|
196 |
+
openssl_free_key($privatekeyid);
|
197 |
+
|
198 |
+
return base64_encode($signature);
|
199 |
+
}
|
200 |
+
|
201 |
+
public function check_signature($request, $consumer, $token, $signature) {
|
202 |
+
$decoded_sig = base64_decode($signature);
|
203 |
+
|
204 |
+
$base_string = $request->get_signature_base_string();
|
205 |
+
|
206 |
+
// Fetch the public key cert based on the request
|
207 |
+
$cert = $this->fetch_public_cert($request);
|
208 |
+
|
209 |
+
// Pull the public key ID from the certificate
|
210 |
+
$publickeyid = openssl_get_publickey($cert);
|
211 |
+
|
212 |
+
// Check the computed signature against the one passed in the query
|
213 |
+
$ok = openssl_verify($base_string, $decoded_sig, $publickeyid);
|
214 |
+
|
215 |
+
// Release the key resource
|
216 |
+
openssl_free_key($publickeyid);
|
217 |
+
|
218 |
+
return $ok == 1;
|
219 |
+
}
|
220 |
+
}
|
221 |
+
|
222 |
+
class OAuthRequest {
|
223 |
+
private $parameters;
|
224 |
+
private $http_method;
|
225 |
+
private $http_url;
|
226 |
+
// for debug purposes
|
227 |
+
public $base_string;
|
228 |
+
public static $version = '1.0';
|
229 |
+
public static $POST_INPUT = 'php://input';
|
230 |
+
|
231 |
+
function __construct($http_method, $http_url, $parameters=NULL) {
|
232 |
+
@$parameters or $parameters = array();
|
233 |
+
$parameters = array_merge( OAuthUtil::parse_parameters(parse_url($http_url, PHP_URL_QUERY)), $parameters);
|
234 |
+
$this->parameters = $parameters;
|
235 |
+
$this->http_method = $http_method;
|
236 |
+
$this->http_url = $http_url;
|
237 |
+
}
|
238 |
+
|
239 |
+
|
240 |
+
/**
|
241 |
+
* attempt to build up a request from what was passed to the server
|
242 |
+
*/
|
243 |
+
public static function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) {
|
244 |
+
$scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on")
|
245 |
+
? 'http'
|
246 |
+
: 'https';
|
247 |
+
@$http_url or $http_url = $scheme .
|
248 |
+
'://' . $_SERVER['HTTP_HOST'] .
|
249 |
+
':' .
|
250 |
+
$_SERVER['SERVER_PORT'] .
|
251 |
+
$_SERVER['REQUEST_URI'];
|
252 |
+
@$http_method or $http_method = $_SERVER['REQUEST_METHOD'];
|
253 |
+
|
254 |
+
// We weren't handed any parameters, so let's find the ones relevant to
|
255 |
+
// this request.
|
256 |
+
// If you run XML-RPC or similar you should use this to provide your own
|
257 |
+
// parsed parameter-list
|
258 |
+
if (!$parameters) {
|
259 |
+
// Find request headers
|
260 |
+
$request_headers = OAuthUtil::get_headers();
|
261 |
+
|
262 |
+
// Parse the query-string to find GET parameters
|
263 |
+
$parameters = OAuthUtil::parse_parameters($_SERVER['QUERY_STRING']);
|
264 |
+
|
265 |
+
// It's a POST request of the proper content-type, so parse POST
|
266 |
+
// parameters and add those overriding any duplicates from GET
|
267 |
+
if ($http_method == "POST"
|
268 |
+
&& @strstr($request_headers["Content-Type"],
|
269 |
+
"application/x-www-form-urlencoded")
|
270 |
+
) {
|
271 |
+
$post_data = OAuthUtil::parse_parameters(
|
272 |
+
file_get_contents(self::$POST_INPUT)
|
273 |
+
);
|
274 |
+
$parameters = array_merge($parameters, $post_data);
|
275 |
+
}
|
276 |
+
|
277 |
+
// We have a Authorization-header with OAuth data. Parse the header
|
278 |
+
// and add those overriding any duplicates from GET or POST
|
279 |
+
if (@substr($request_headers['Authorization'], 0, 6) == "OAuth ") {
|
280 |
+
$header_parameters = OAuthUtil::split_header(
|
281 |
+
$request_headers['Authorization']
|
282 |
+
);
|
283 |
+
$parameters = array_merge($parameters, $header_parameters);
|
284 |
+
}
|
285 |
+
|
286 |
+
}
|
287 |
+
|
288 |
+
return new OAuthRequest($http_method, $http_url, $parameters);
|
289 |
+
}
|
290 |
+
|
291 |
+
/**
|
292 |
+
* pretty much a helper function to set up the request
|
293 |
+
*/
|
294 |
+
public static function from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters=NULL) {
|
295 |
+
@$parameters or $parameters = array();
|
296 |
+
$defaults = array("oauth_version" => OAuthRequest::$version,
|
297 |
+
"oauth_nonce" => OAuthRequest::generate_nonce(),
|
298 |
+
"oauth_timestamp" => OAuthRequest::generate_timestamp(),
|
299 |
+
"oauth_consumer_key" => $consumer->key);
|
300 |
+
if ($token)
|
301 |
+
$defaults['oauth_token'] = $token->key;
|
302 |
+
|
303 |
+
$parameters = array_merge($defaults, $parameters);
|
304 |
+
|
305 |
+
return new OAuthRequest($http_method, $http_url, $parameters);
|
306 |
+
}
|
307 |
+
|
308 |
+
public function set_parameter($name, $value, $allow_duplicates = true) {
|
309 |
+
if ($allow_duplicates && isset($this->parameters[$name])) {
|
310 |
+
// We have already added parameter(s) with this name, so add to the list
|
311 |
+
if (is_scalar($this->parameters[$name])) {
|
312 |
+
// This is the first duplicate, so transform scalar (string)
|
313 |
+
// into an array so we can add the duplicates
|
314 |
+
$this->parameters[$name] = array($this->parameters[$name]);
|
315 |
+
}
|
316 |
+
|
317 |
+
$this->parameters[$name][] = $value;
|
318 |
+
} else {
|
319 |
+
$this->parameters[$name] = $value;
|
320 |
+
}
|
321 |
+
}
|
322 |
+
|
323 |
+
public function get_parameter($name) {
|
324 |
+
return isset($this->parameters[$name]) ? $this->parameters[$name] : null;
|
325 |
+
}
|
326 |
+
|
327 |
+
public function get_parameters() {
|
328 |
+
return $this->parameters;
|
329 |
+
}
|
330 |
+
|
331 |
+
public function unset_parameter($name) {
|
332 |
+
unset($this->parameters[$name]);
|
333 |
+
}
|
334 |
+
|
335 |
+
/**
|
336 |
+
* The request parameters, sorted and concatenated into a normalized string.
|
337 |
+
* @return string
|
338 |
+
*/
|
339 |
+
public function get_signable_parameters() {
|
340 |
+
// Grab all parameters
|
341 |
+
$params = $this->parameters;
|
342 |
+
|
343 |
+
// Remove oauth_signature if present
|
344 |
+
// Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.")
|
345 |
+
if (isset($params['oauth_signature'])) {
|
346 |
+
unset($params['oauth_signature']);
|
347 |
+
}
|
348 |
+
|
349 |
+
return OAuthUtil::build_http_query($params);
|
350 |
+
}
|
351 |
+
|
352 |
+
/**
|
353 |
+
* Returns the base string of this request
|
354 |
+
*
|
355 |
+
* The base string defined as the method, the url
|
356 |
+
* and the parameters (normalized), each urlencoded
|
357 |
+
* and the concated with &.
|
358 |
+
*/
|
359 |
+
public function get_signature_base_string() {
|
360 |
+
$parts = array(
|
361 |
+
$this->get_normalized_http_method(),
|
362 |
+
$this->get_normalized_http_url(),
|
363 |
+
$this->get_signable_parameters()
|
364 |
+
);
|
365 |
+
|
366 |
+
$parts = OAuthUtil::urlencode_rfc3986($parts);
|
367 |
+
|
368 |
+
return implode('&', $parts);
|
369 |
+
}
|
370 |
+
|
371 |
+
/**
|
372 |
+
* just uppercases the http method
|
373 |
+
*/
|
374 |
+
public function get_normalized_http_method() {
|
375 |
+
return strtoupper($this->http_method);
|
376 |
+
}
|
377 |
+
|
378 |
+
/**
|
379 |
+
* parses the url and rebuilds it to be
|
380 |
+
* scheme://host/path
|
381 |
+
*/
|
382 |
+
public function get_normalized_http_url() {
|
383 |
+
$parts = parse_url($this->http_url);
|
384 |
+
|
385 |
+
$port = @$parts['port'];
|
386 |
+
$scheme = $parts['scheme'];
|
387 |
+
$host = $parts['host'];
|
388 |
+
$path = @$parts['path'];
|
389 |
+
|
390 |
+
$port or $port = ($scheme == 'https') ? '443' : '80';
|
391 |
+
|
392 |
+
if (($scheme == 'https' && $port != '443')
|
393 |
+
|| ($scheme == 'http' && $port != '80')) {
|
394 |
+
$host = "$host:$port";
|
395 |
+
}
|
396 |
+
return "$scheme://$host$path";
|
397 |
+
}
|
398 |
+
|
399 |
+
/**
|
400 |
+
* builds a url usable for a GET request
|
401 |
+
*/
|
402 |
+
public function to_url() {
|
403 |
+
$post_data = $this->to_postdata();
|
404 |
+
$out = $this->get_normalized_http_url();
|
405 |
+
if ($post_data) {
|
406 |
+
$out .= '?'.$post_data;
|
407 |
+
}
|
408 |
+
return $out;
|
409 |
+
}
|
410 |
+
|
411 |
+
/**
|
412 |
+
* builds the data one would send in a POST request
|
413 |
+
*/
|
414 |
+
public function to_postdata() {
|
415 |
+
return OAuthUtil::build_http_query($this->parameters);
|
416 |
+
}
|
417 |
+
|
418 |
+
/**
|
419 |
+
* builds the Authorization: header
|
420 |
+
*/
|
421 |
+
public function to_header($realm=null) {
|
422 |
+
$first = true;
|
423 |
+
if($realm) {
|
424 |
+
$out = 'Authorization: OAuth realm="' . OAuthUtil::urlencode_rfc3986($realm) . '"';
|
425 |
+
$first = false;
|
426 |
+
} else
|
427 |
+
$out = 'Authorization: OAuth';
|
428 |
+
|
429 |
+
$total = array();
|
430 |
+
foreach ($this->parameters as $k => $v) {
|
431 |
+
if (substr($k, 0, 5) != "oauth") continue;
|
432 |
+
if (is_array($v)) {
|
433 |
+
throw new OAuthException('Arrays not supported in headers');
|
434 |
+
}
|
435 |
+
$out .= ($first) ? ' ' : ',';
|
436 |
+
$out .= OAuthUtil::urlencode_rfc3986($k) .
|
437 |
+
'="' .
|
438 |
+
OAuthUtil::urlencode_rfc3986($v) .
|
439 |
+
'"';
|
440 |
+
$first = false;
|
441 |
+
}
|
442 |
+
return $out;
|
443 |
+
}
|
444 |
+
|
445 |
+
public function __toString() {
|
446 |
+
return $this->to_url();
|
447 |
+
}
|
448 |
+
|
449 |
+
|
450 |
+
public function sign_request($signature_method, $consumer, $token) {
|
451 |
+
$this->set_parameter(
|
452 |
+
"oauth_signature_method",
|
453 |
+
$signature_method->get_name(),
|
454 |
+
false
|
455 |
+
);
|
456 |
+
$signature = $this->build_signature($signature_method, $consumer, $token);
|
457 |
+
$this->set_parameter("oauth_signature", $signature, false);
|
458 |
+
}
|
459 |
+
|
460 |
+
public function build_signature($signature_method, $consumer, $token) {
|
461 |
+
$signature = $signature_method->build_signature($this, $consumer, $token);
|
462 |
+
return $signature;
|
463 |
+
}
|
464 |
+
|
465 |
+
/**
|
466 |
+
* util function: current timestamp
|
467 |
+
*/
|
468 |
+
private static function generate_timestamp() {
|
469 |
+
return time();
|
470 |
+
}
|
471 |
+
|
472 |
+
/**
|
473 |
+
* util function: current nonce
|
474 |
+
*/
|
475 |
+
private static function generate_nonce() {
|
476 |
+
$mt = microtime();
|
477 |
+
$rand = mt_rand();
|
478 |
+
|
479 |
+
return md5($mt . $rand); // md5s look nicer than numbers
|
480 |
+
}
|
481 |
+
}
|
482 |
+
|
483 |
+
class OAuthServer {
|
484 |
+
protected $timestamp_threshold = 300; // in seconds, five minutes
|
485 |
+
protected $version = '1.0'; // hi blaine
|
486 |
+
protected $signature_methods = array();
|
487 |
+
|
488 |
+
protected $data_store;
|
489 |
+
|
490 |
+
function __construct($data_store) {
|
491 |
+
$this->data_store = $data_store;
|
492 |
+
}
|
493 |
+
|
494 |
+
public function add_signature_method($signature_method) {
|
495 |
+
$this->signature_methods[$signature_method->get_name()] =
|
496 |
+
$signature_method;
|
497 |
+
}
|
498 |
+
|
499 |
+
// high level functions
|
500 |
+
|
501 |
+
/**
|
502 |
+
* process a request_token request
|
503 |
+
* returns the request token on success
|
504 |
+
*/
|
505 |
+
public function fetch_request_token(&$request) {
|
506 |
+
$this->get_version($request);
|
507 |
+
|
508 |
+
$consumer = $this->get_consumer($request);
|
509 |
+
|
510 |
+
// no token required for the initial token request
|
511 |
+
$token = NULL;
|
512 |
+
|
513 |
+
$this->check_signature($request, $consumer, $token);
|
514 |
+
|
515 |
+
// Rev A change
|
516 |
+
$callback = $request->get_parameter('oauth_callback');
|
517 |
+
$new_token = $this->data_store->new_request_token($consumer, $callback);
|
518 |
+
|
519 |
+
return $new_token;
|
520 |
+
}
|
521 |
+
|
522 |
+
/**
|
523 |
+
* process an access_token request
|
524 |
+
* returns the access token on success
|
525 |
+
*/
|
526 |
+
public function fetch_access_token(&$request) {
|
527 |
+
$this->get_version($request);
|
528 |
+
|
529 |
+
$consumer = $this->get_consumer($request);
|
530 |
+
|
531 |
+
// requires authorized request token
|
532 |
+
$token = $this->get_token($request, $consumer, "request");
|
533 |
+
|
534 |
+
$this->check_signature($request, $consumer, $token);
|
535 |
+
|
536 |
+
// Rev A change
|
537 |
+
$verifier = $request->get_parameter('oauth_verifier');
|
538 |
+
$new_token = $this->data_store->new_access_token($token, $consumer, $verifier);
|
539 |
+
|
540 |
+
return $new_token;
|
541 |
+
}
|
542 |
+
|
543 |
+
/**
|
544 |
+
* verify an api call, checks all the parameters
|
545 |
+
*/
|
546 |
+
public function verify_request(&$request) {
|
547 |
+
$this->get_version($request);
|
548 |
+
$consumer = $this->get_consumer($request);
|
549 |
+
$token = $this->get_token($request, $consumer, "access");
|
550 |
+
$this->check_signature($request, $consumer, $token);
|
551 |
+
return array($consumer, $token);
|
552 |
+
}
|
553 |
+
|
554 |
+
// Internals from here
|
555 |
+
/**
|
556 |
+
* version 1
|
557 |
+
*/
|
558 |
+
private function get_version(&$request) {
|
559 |
+
$version = $request->get_parameter("oauth_version");
|
560 |
+
if (!$version) {
|
561 |
+
// Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.
|
562 |
+
// Chapter 7.0 ("Accessing Protected Ressources")
|
563 |
+
$version = '1.0';
|
564 |
+
}
|
565 |
+
if ($version !== $this->version) {
|
566 |
+
throw new OAuthException("OAuth version '$version' not supported");
|
567 |
+
}
|
568 |
+
return $version;
|
569 |
+
}
|
570 |
+
|
571 |
+
/**
|
572 |
+
* figure out the signature with some defaults
|
573 |
+
*/
|
574 |
+
private function get_signature_method(&$request) {
|
575 |
+
$signature_method =
|
576 |
+
@$request->get_parameter("oauth_signature_method");
|
577 |
+
|
578 |
+
if (!$signature_method) {
|
579 |
+
// According to chapter 7 ("Accessing Protected Ressources") the signature-method
|
580 |
+
// parameter is required, and we can't just fallback to PLAINTEXT
|
581 |
+
throw new OAuthException('No signature method parameter. This parameter is required');
|
582 |
+
}
|
583 |
+
|
584 |
+
if (!in_array($signature_method,
|
585 |
+
array_keys($this->signature_methods))) {
|
586 |
+
throw new OAuthException(
|
587 |
+
"Signature method '$signature_method' not supported " .
|
588 |
+
"try one of the following: " .
|
589 |
+
implode(", ", array_keys($this->signature_methods))
|
590 |
+
);
|
591 |
+
}
|
592 |
+
return $this->signature_methods[$signature_method];
|
593 |
+
}
|
594 |
+
|
595 |
+
/**
|
596 |
+
* try to find the consumer for the provided request's consumer key
|
597 |
+
*/
|
598 |
+
private function get_consumer(&$request) {
|
599 |
+
$consumer_key = @$request->get_parameter("oauth_consumer_key");
|
600 |
+
if (!$consumer_key) {
|
601 |
+
throw new OAuthException("Invalid consumer key");
|
602 |
+
}
|
603 |
+
|
604 |
+
$consumer = $this->data_store->lookup_consumer($consumer_key);
|
605 |
+
if (!$consumer) {
|
606 |
+
throw new OAuthException("Invalid consumer");
|
607 |
+
}
|
608 |
+
|
609 |
+
return $consumer;
|
610 |
+
}
|
611 |
+
|
612 |
+
/**
|
613 |
+
* try to find the token for the provided request's token key
|
614 |
+
*/
|
615 |
+
private function get_token(&$request, $consumer, $token_type="access") {
|
616 |
+
$token_field = @$request->get_parameter('oauth_token');
|
617 |
+
$token = $this->data_store->lookup_token(
|
618 |
+
$consumer, $token_type, $token_field
|
619 |
+
);
|
620 |
+
if (!$token) {
|
621 |
+
throw new OAuthException("Invalid $token_type token: $token_field");
|
622 |
+
}
|
623 |
+
return $token;
|
624 |
+
}
|
625 |
+
|
626 |
+
/**
|
627 |
+
* all-in-one function to check the signature on a request
|
628 |
+
* should guess the signature method appropriately
|
629 |
+
*/
|
630 |
+
private function check_signature(&$request, $consumer, $token) {
|
631 |
+
// this should probably be in a different method
|
632 |
+
$timestamp = @$request->get_parameter('oauth_timestamp');
|
633 |
+
$nonce = @$request->get_parameter('oauth_nonce');
|
634 |
+
|
635 |
+
$this->check_timestamp($timestamp);
|
636 |
+
$this->check_nonce($consumer, $token, $nonce, $timestamp);
|
637 |
+
|
638 |
+
$signature_method = $this->get_signature_method($request);
|
639 |
+
|
640 |
+
$signature = $request->get_parameter('oauth_signature');
|
641 |
+
$valid_sig = $signature_method->check_signature(
|
642 |
+
$request,
|
643 |
+
$consumer,
|
644 |
+
$token,
|
645 |
+
$signature
|
646 |
+
);
|
647 |
+
|
648 |
+
if (!$valid_sig) {
|
649 |
+
throw new OAuthException("Invalid signature");
|
650 |
+
}
|
651 |
+
}
|
652 |
+
|
653 |
+
/**
|
654 |
+
* check that the timestamp is new enough
|
655 |
+
*/
|
656 |
+
private function check_timestamp($timestamp) {
|
657 |
+
if( ! $timestamp )
|
658 |
+
throw new OAuthException(
|
659 |
+
'Missing timestamp parameter. The parameter is required'
|
660 |
+
);
|
661 |
+
|
662 |
+
// verify that timestamp is recentish
|
663 |
+
$now = time();
|
664 |
+
if (abs($now - $timestamp) > $this->timestamp_threshold) {
|
665 |
+
throw new OAuthException(
|
666 |
+
"Expired timestamp, yours $timestamp, ours $now"
|
667 |
+
);
|
668 |
+
}
|
669 |
+
}
|
670 |
+
|
671 |
+
/**
|
672 |
+
* check that the nonce is not repeated
|
673 |
+
*/
|
674 |
+
private function check_nonce($consumer, $token, $nonce, $timestamp) {
|
675 |
+
if( ! $nonce )
|
676 |
+
throw new OAuthException(
|
677 |
+
'Missing nonce parameter. The parameter is required'
|
678 |
+
);
|
679 |
+
|
680 |
+
// verify that the nonce is uniqueish
|
681 |
+
$found = $this->data_store->lookup_nonce(
|
682 |
+
$consumer,
|
683 |
+
$token,
|
684 |
+
$nonce,
|
685 |
+
$timestamp
|
686 |
+
);
|
687 |
+
if ($found) {
|
688 |
+
throw new OAuthException("Nonce already used: $nonce");
|
689 |
+
}
|
690 |
+
}
|
691 |
+
|
692 |
+
}
|
693 |
+
|
694 |
+
class OAuthDataStore {
|
695 |
+
function lookup_consumer($consumer_key) {
|
696 |
+
// implement me
|
697 |
+
}
|
698 |
+
|
699 |
+
function lookup_token($consumer, $token_type, $token) {
|
700 |
+
// implement me
|
701 |
+
}
|
702 |
+
|
703 |
+
function lookup_nonce($consumer, $token, $nonce, $timestamp) {
|
704 |
+
// implement me
|
705 |
+
}
|
706 |
+
|
707 |
+
function new_request_token($consumer, $callback = null) {
|
708 |
+
// return a new token attached to this consumer
|
709 |
+
}
|
710 |
+
|
711 |
+
function new_access_token($token, $consumer, $verifier = null) {
|
712 |
+
// return a new access token attached to this consumer
|
713 |
+
// for the user associated with this token if the request token
|
714 |
+
// is authorized
|
715 |
+
// should also invalidate the request token
|
716 |
+
}
|
717 |
+
|
718 |
+
}
|
719 |
+
|
720 |
+
class OAuthUtil {
|
721 |
+
public static function urlencode_rfc3986($input) {
|
722 |
+
if (is_array($input)) {
|
723 |
+
return array_map(array('OAuthUtil', 'urlencode_rfc3986'), $input);
|
724 |
+
} else if (is_scalar($input)) {
|
725 |
+
return str_replace(
|
726 |
+
'+',
|
727 |
+
' ',
|
728 |
+
str_replace('%7E', '~', rawurlencode($input))
|
729 |
+
);
|
730 |
+
} else {
|
731 |
+
return '';
|
732 |
+
}
|
733 |
+
}
|
734 |
+
|
735 |
+
|
736 |
+
// This decode function isn't taking into consideration the above
|
737 |
+
// modifications to the encoding process. However, this method doesn't
|
738 |
+
// seem to be used anywhere so leaving it as is.
|
739 |
+
public static function urldecode_rfc3986($string) {
|
740 |
+
return urldecode($string);
|
741 |
+
}
|
742 |
+
|
743 |
+
// Utility function for turning the Authorization: header into
|
744 |
+
// parameters, has to do some unescaping
|
745 |
+
// Can filter out any non-oauth parameters if needed (default behaviour)
|
746 |
+
public static function split_header($header, $only_allow_oauth_parameters = true) {
|
747 |
+
$pattern = '/(([-_a-z]*)=("([^"]*)"|([^,]*)),?)/';
|
748 |
+
$offset = 0;
|
749 |
+
$params = array();
|
750 |
+
while (preg_match($pattern, $header, $matches, PREG_OFFSET_CAPTURE, $offset) > 0) {
|
751 |
+
$match = $matches[0];
|
752 |
+
$header_name = $matches[2][0];
|
753 |
+
$header_content = (isset($matches[5])) ? $matches[5][0] : $matches[4][0];
|
754 |
+
if (preg_match('/^oauth_/', $header_name) || !$only_allow_oauth_parameters) {
|
755 |
+
$params[$header_name] = OAuthUtil::urldecode_rfc3986($header_content);
|
756 |
+
}
|
757 |
+
$offset = $match[1] + strlen($match[0]);
|
758 |
+
}
|
759 |
+
|
760 |
+
if (isset($params['realm'])) {
|
761 |
+
unset($params['realm']);
|
762 |
+
}
|
763 |
+
|
764 |
+
return $params;
|
765 |
+
}
|
766 |
+
|
767 |
+
// helper to try to sort out headers for people who aren't running apache
|
768 |
+
public static function get_headers() {
|
769 |
+
if (function_exists('apache_request_headers')) {
|
770 |
+
// we need this to get the actual Authorization: header
|
771 |
+
// because apache tends to tell us it doesn't exist
|
772 |
+
$headers = apache_request_headers();
|
773 |
+
|
774 |
+
// sanitize the output of apache_request_headers because
|
775 |
+
// we always want the keys to be Cased-Like-This and arh()
|
776 |
+
// returns the headers in the same case as they are in the
|
777 |
+
// request
|
778 |
+
$out = array();
|
779 |
+
foreach( $headers AS $key => $value ) {
|
780 |
+
$key = str_replace(
|
781 |
+
" ",
|
782 |
+
"-",
|
783 |
+
ucwords(strtolower(str_replace("-", " ", $key)))
|
784 |
+
);
|
785 |
+
$out[$key] = $value;
|
786 |
+
}
|
787 |
+
} else {
|
788 |
+
// otherwise we don't have apache and are just going to have to hope
|
789 |
+
// that $_SERVER actually contains what we need
|
790 |
+
$out = array();
|
791 |
+
if( isset($_SERVER['CONTENT_TYPE']) )
|
792 |
+
$out['Content-Type'] = $_SERVER['CONTENT_TYPE'];
|
793 |
+
if( isset($_ENV['CONTENT_TYPE']) )
|
794 |
+
$out['Content-Type'] = $_ENV['CONTENT_TYPE'];
|
795 |
+
|
796 |
+
foreach ($_SERVER as $key => $value) {
|
797 |
+
if (substr($key, 0, 5) == "HTTP_") {
|
798 |
+
// this is chaos, basically it is just there to capitalize the first
|
799 |
+
// letter of every word that is not an initial HTTP and strip HTTP
|
800 |
+
// code from przemek
|
801 |
+
$key = str_replace(
|
802 |
+
" ",
|
803 |
+
"-",
|
804 |
+
ucwords(strtolower(str_replace("_", " ", substr($key, 5))))
|
805 |
+
);
|
806 |
+
$out[$key] = $value;
|
807 |
+
}
|
808 |
+
}
|
809 |
+
}
|
810 |
+
return $out;
|
811 |
+
}
|
812 |
+
|
813 |
+
// This function takes a input like a=b&a=c&d=e and returns the parsed
|
814 |
+
// parameters like this
|
815 |
+
// array('a' => array('b','c'), 'd' => 'e')
|
816 |
+
public static function parse_parameters( $input ) {
|
817 |
+
if (!isset($input) || !$input) return array();
|
818 |
+
|
819 |
+
$pairs = explode('&', $input);
|
820 |
+
|
821 |
+
$parsed_parameters = array();
|
822 |
+
foreach ($pairs as $pair) {
|
823 |
+
$split = explode('=', $pair, 2);
|
824 |
+
$parameter = OAuthUtil::urldecode_rfc3986($split[0]);
|
825 |
+
$value = isset($split[1]) ? OAuthUtil::urldecode_rfc3986($split[1]) : '';
|
826 |
+
|
827 |
+
if (isset($parsed_parameters[$parameter])) {
|
828 |
+
// We have already recieved parameter(s) with this name, so add to the list
|
829 |
+
// of parameters with this name
|
830 |
+
|
831 |
+
if (is_scalar($parsed_parameters[$parameter])) {
|
832 |
+
// This is the first duplicate, so transform scalar (string) into an array
|
833 |
+
// so we can add the duplicates
|
834 |
+
$parsed_parameters[$parameter] = array($parsed_parameters[$parameter]);
|
835 |
+
}
|
836 |
+
|
837 |
+
$parsed_parameters[$parameter][] = $value;
|
838 |
+
} else {
|
839 |
+
$parsed_parameters[$parameter] = $value;
|
840 |
+
}
|
841 |
+
}
|
842 |
+
return $parsed_parameters;
|
843 |
+
}
|
844 |
+
|
845 |
+
public static function build_http_query($params) {
|
846 |
+
if (!$params) return '';
|
847 |
+
|
848 |
+
// Urlencode both keys and values
|
849 |
+
$keys = OAuthUtil::urlencode_rfc3986(array_keys($params));
|
850 |
+
$values = OAuthUtil::urlencode_rfc3986(array_values($params));
|
851 |
+
$params = array_combine($keys, $values);
|
852 |
+
|
853 |
+
// Parameters are sorted by name, using lexicographical byte value ordering.
|
854 |
+
// Ref: Spec: 9.1.1 (1)
|
855 |
+
uksort($params, 'strcmp');
|
856 |
+
|
857 |
+
$pairs = array();
|
858 |
+
foreach ($params as $parameter => $value) {
|
859 |
+
if (is_array($value)) {
|
860 |
+
// If two or more parameters share the same name, they are sorted by their value
|
861 |
+
// Ref: Spec: 9.1.1 (1)
|
862 |
+
natsort($value);
|
863 |
+
foreach ($value as $duplicate_value) {
|
864 |
+
$pairs[] = $parameter . '=' . $duplicate_value;
|
865 |
+
}
|
866 |
+
} else {
|
867 |
+
$pairs[] = $parameter . '=' . $value;
|
868 |
+
}
|
869 |
+
}
|
870 |
+
// For each parameter, the name is separated from the corresponding value by an '=' character (ASCII code 61)
|
871 |
+
// Each name-value pair is separated by an '&' character (ASCII code 38)
|
872 |
+
return implode('&', $pairs);
|
873 |
+
}
|
874 |
+
}
|
oauth/twitteroauth.php
ADDED
@@ -0,0 +1,246 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* Abraham Williams (abraham@abrah.am) http://abrah.am
|
5 |
+
*
|
6 |
+
* The first PHP Library to support OAuth for Twitter's REST API.
|
7 |
+
* Modified for compatibility with other plugins which could provide OAuthConsumer by Liam Gladdy, 2014.
|
8 |
+
*/
|
9 |
+
|
10 |
+
/* Load OAuth lib. You can find it at http://oauth.net */
|
11 |
+
if (!class_exists('OAuthConsumer')) {
|
12 |
+
require_once('OAuth.php');
|
13 |
+
} else {
|
14 |
+
define('THR_USING_EXISTING_LIBRARY_OAUTH',true);
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Twitter OAuth class
|
19 |
+
*/
|
20 |
+
class TwitterOAuth {
|
21 |
+
/* Contains the last HTTP status code returned. */
|
22 |
+
public $http_code;
|
23 |
+
/* Contains the last API call. */
|
24 |
+
public $url;
|
25 |
+
/* Set up the API root URL. */
|
26 |
+
public $host = "https://api.twitter.com/1.1/";
|
27 |
+
/* Set timeout default. */
|
28 |
+
public $timeout = 3;
|
29 |
+
/* Set connect timeout. */
|
30 |
+
public $connecttimeout = 2;
|
31 |
+
/* Verify SSL Cert. */
|
32 |
+
public $ssl_verifypeer = FALSE;
|
33 |
+
/* Respons format. */
|
34 |
+
public $format = 'json';
|
35 |
+
/* Decode returned json data. */
|
36 |
+
public $decode_json = TRUE;
|
37 |
+
/* Contains the last HTTP headers returned. */
|
38 |
+
public $http_info;
|
39 |
+
/* Set the useragnet. */
|
40 |
+
public $useragent = 'Twitter Feed for Wordpress Developers 2.2.0';
|
41 |
+
/* Immediately retry the API call if the response was not successful. */
|
42 |
+
//public $retry = TRUE;
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Set API URLS
|
49 |
+
*/
|
50 |
+
function accessTokenURL() { return 'https://api.twitter.com/oauth/access_token'; }
|
51 |
+
function authenticateURL() { return 'https://api.twitter.com/oauth/authenticate'; }
|
52 |
+
function authorizeURL() { return 'https://api.twitter.com/oauth/authorize'; }
|
53 |
+
function requestTokenURL() { return 'https://api.twitter.com/oauth/request_token'; }
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Debug helpers
|
57 |
+
*/
|
58 |
+
function lastStatusCode() { return $this->http_status; }
|
59 |
+
function lastAPICall() { return $this->last_api_call; }
|
60 |
+
|
61 |
+
/**
|
62 |
+
* construct TwitterOAuth object
|
63 |
+
*/
|
64 |
+
function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) {
|
65 |
+
$this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1();
|
66 |
+
$this->consumer = new OAuthConsumer($consumer_key, $consumer_secret);
|
67 |
+
if (!empty($oauth_token) && !empty($oauth_token_secret)) {
|
68 |
+
$this->token = new OAuthConsumer($oauth_token, $oauth_token_secret);
|
69 |
+
} else {
|
70 |
+
$this->token = NULL;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Get a request_token from Twitter
|
77 |
+
*
|
78 |
+
* @returns a key/value array containing oauth_token and oauth_token_secret
|
79 |
+
*/
|
80 |
+
function getRequestToken($oauth_callback) {
|
81 |
+
$parameters = array();
|
82 |
+
$parameters['oauth_callback'] = $oauth_callback;
|
83 |
+
$request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters);
|
84 |
+
$token = OAuthUtil::parse_parameters($request);
|
85 |
+
$this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
|
86 |
+
return $token;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Get the authorize URL
|
91 |
+
*
|
92 |
+
* @returns a string
|
93 |
+
*/
|
94 |
+
function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) {
|
95 |
+
if (is_array($token)) {
|
96 |
+
$token = $token['oauth_token'];
|
97 |
+
}
|
98 |
+
if (empty($sign_in_with_twitter)) {
|
99 |
+
return $this->authorizeURL() . "?oauth_token={$token}";
|
100 |
+
} else {
|
101 |
+
return $this->authenticateURL() . "?oauth_token={$token}";
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Exchange request token and secret for an access token and
|
107 |
+
* secret, to sign API calls.
|
108 |
+
*
|
109 |
+
* @returns array("oauth_token" => "the-access-token",
|
110 |
+
* "oauth_token_secret" => "the-access-secret",
|
111 |
+
* "user_id" => "9436992",
|
112 |
+
* "screen_name" => "abraham")
|
113 |
+
*/
|
114 |
+
function getAccessToken($oauth_verifier) {
|
115 |
+
$parameters = array();
|
116 |
+
$parameters['oauth_verifier'] = $oauth_verifier;
|
117 |
+
$request = $this->oAuthRequest($this->accessTokenURL(), 'GET', $parameters);
|
118 |
+
$token = OAuthUtil::parse_parameters($request);
|
119 |
+
$this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
|
120 |
+
return $token;
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* One time exchange of username and password for access token and secret.
|
125 |
+
*
|
126 |
+
* @returns array("oauth_token" => "the-access-token",
|
127 |
+
* "oauth_token_secret" => "the-access-secret",
|
128 |
+
* "user_id" => "9436992",
|
129 |
+
* "screen_name" => "abraham",
|
130 |
+
* "x_auth_expires" => "0")
|
131 |
+
*/
|
132 |
+
function getXAuthToken($username, $password) {
|
133 |
+
$parameters = array();
|
134 |
+
$parameters['x_auth_username'] = $username;
|
135 |
+
$parameters['x_auth_password'] = $password;
|
136 |
+
$parameters['x_auth_mode'] = 'client_auth';
|
137 |
+
$request = $this->oAuthRequest($this->accessTokenURL(), 'POST', $parameters);
|
138 |
+
$token = OAuthUtil::parse_parameters($request);
|
139 |
+
$this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
|
140 |
+
return $token;
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* GET wrapper for oAuthRequest.
|
145 |
+
*/
|
146 |
+
function get($url, $parameters = array()) {
|
147 |
+
$response = $this->oAuthRequest($url, 'GET', $parameters);
|
148 |
+
if ($this->format === 'json' && $this->decode_json) {
|
149 |
+
return json_decode($response,true);
|
150 |
+
}
|
151 |
+
return $response;
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* POST wrapper for oAuthRequest.
|
156 |
+
*/
|
157 |
+
function post($url, $parameters = array()) {
|
158 |
+
$response = $this->oAuthRequest($url, 'POST', $parameters);
|
159 |
+
if ($this->format === 'json' && $this->decode_json) {
|
160 |
+
return json_decode($response,true);
|
161 |
+
}
|
162 |
+
return $response;
|
163 |
+
}
|
164 |
+
|
165 |
+
/**
|
166 |
+
* DELETE wrapper for oAuthReqeust.
|
167 |
+
*/
|
168 |
+
function delete($url, $parameters = array()) {
|
169 |
+
$response = $this->oAuthRequest($url, 'DELETE', $parameters);
|
170 |
+
if ($this->format === 'json' && $this->decode_json) {
|
171 |
+
return json_decode($response,true);
|
172 |
+
}
|
173 |
+
return $response;
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Format and sign an OAuth / API request
|
178 |
+
*/
|
179 |
+
function oAuthRequest($url, $method, $parameters) {
|
180 |
+
if (strrpos($url, 'https://') !== 0 && strrpos($url, 'http://') !== 0) {
|
181 |
+
$url = "{$this->host}{$url}.{$this->format}";
|
182 |
+
}
|
183 |
+
$request = OAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $parameters);
|
184 |
+
$request->sign_request($this->sha1_method, $this->consumer, $this->token);
|
185 |
+
switch ($method) {
|
186 |
+
case 'GET':
|
187 |
+
return $this->http($request->to_url(), 'GET');
|
188 |
+
default:
|
189 |
+
return $this->http($request->get_normalized_http_url(), $method, $request->to_postdata());
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Make an HTTP request
|
195 |
+
*
|
196 |
+
* @return API results
|
197 |
+
*/
|
198 |
+
function http($url, $method, $postfields = NULL) {
|
199 |
+
$this->http_info = array();
|
200 |
+
$ci = curl_init();
|
201 |
+
/* Curl settings */
|
202 |
+
curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);
|
203 |
+
curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);
|
204 |
+
curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);
|
205 |
+
curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);
|
206 |
+
curl_setopt($ci, CURLOPT_HTTPHEADER, array('Expect:'));
|
207 |
+
curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);
|
208 |
+
curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));
|
209 |
+
curl_setopt($ci, CURLOPT_HEADER, FALSE);
|
210 |
+
|
211 |
+
switch ($method) {
|
212 |
+
case 'POST':
|
213 |
+
curl_setopt($ci, CURLOPT_POST, TRUE);
|
214 |
+
if (!empty($postfields)) {
|
215 |
+
curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);
|
216 |
+
}
|
217 |
+
break;
|
218 |
+
case 'DELETE':
|
219 |
+
curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');
|
220 |
+
if (!empty($postfields)) {
|
221 |
+
$url = "{$url}?{$postfields}";
|
222 |
+
}
|
223 |
+
}
|
224 |
+
|
225 |
+
curl_setopt($ci, CURLOPT_URL, $url);
|
226 |
+
$response = curl_exec($ci);
|
227 |
+
$this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);
|
228 |
+
$this->http_info = array_merge($this->http_info, curl_getinfo($ci));
|
229 |
+
$this->url = $url;
|
230 |
+
curl_close ($ci);
|
231 |
+
return $response;
|
232 |
+
}
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Get the header info to store.
|
236 |
+
*/
|
237 |
+
function getHeader($ch, $header) {
|
238 |
+
$i = strpos($header, ':');
|
239 |
+
if (!empty($i)) {
|
240 |
+
$key = str_replace('-', '_', strtolower(substr($header, 0, $i)));
|
241 |
+
$value = trim(substr($header, $i + 2));
|
242 |
+
$this->http_header[$key] = $value;
|
243 |
+
}
|
244 |
+
return strlen($header);
|
245 |
+
}
|
246 |
+
}
|
readme.txt
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== AccessPress Twitter Feed ===
|
2 |
+
Contributors: Access Keys
|
3 |
+
Tags: twitter, twitter feeds, twitter slider, twitter feeds slider, twitter plugin, twitter feed plugin, twitter tweets, tweets, twitter tweet plugin, recent tweets widget, recent tweets plugin, recent tweet feeds
|
4 |
+
Donate link: http://accesspressthemes.com/donation/
|
5 |
+
Requires at least: 3.8
|
6 |
+
Tested up to: 4.1
|
7 |
+
Stable tag: 1.0.0
|
8 |
+
License: GPLv2 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
Display real-time Twitter feeds on your website. Update your website visitors with your latest Tweets.
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
<strong>AccessPress Twitter Feed</strong> is a FREE Twitter plugin for WordPress. You can use this to display real time Twitter feeds on any where on your webiste by using shortcode or widgets. Display tweets as a feed or in slider. It just takes a few minute to set it up and use. Start strong Twitter integration right on your website and increase your social reach to next level.
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
= Features: =
|
20 |
+
|
21 |
+
* <strong>Fetch latest tweets from any account</strong>
|
22 |
+
* <strong>Configurable number of tweets to display</strong>
|
23 |
+
* <strong>Caching option to prevent frequent API calls</strong>
|
24 |
+
* <strong>3 Beautiful design templates to choose from.</strong>
|
25 |
+
* <strong>Easy use with shortcode with various configurable parameters</strong>
|
26 |
+
* <strong>Display tweets in slider</strong>
|
27 |
+
* <strong>Configure tweet date/time format</strong>
|
28 |
+
* <strong>Option to show/hide full user name</strong>
|
29 |
+
* <strong>Lightweight</strong> - Installs in seconds
|
30 |
+
* <strong>User friendly</strong> - very easy to configure and setup.
|
31 |
+
* <strong>Super Support</strong>
|
32 |
+
- Dedicated email, forum support
|
33 |
+
* <strong>Free updates</strong>
|
34 |
+
- Get free updates for lifetime.
|
35 |
+
|
36 |
+
|
37 |
+
= Some Useful Links =
|
38 |
+
* <strong>Support Email</strong>: support@accesspressthemes.com
|
39 |
+
* <strong>Support Forum Link</strong>: http://accesspressthemes.com/support/
|
40 |
+
* <strong>Website Link</strong>: http://accesspressthemes.com/
|
41 |
+
* <strong>Youtube channel link</strong>: https://www.youtube.com/watch?v=TjZNcVG3fDE
|
42 |
+
* <strong>Facebook link</strong>: https://www.facebook.com/AccessPressThemes
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
+
For a easy installation guide checkout the Installation tab above.
|
47 |
+
|
48 |
+
For complete information and documentation regarding plugin,please visit below links.
|
49 |
+
|
50 |
+
[Plugin information](https://accesspressthemes.com/wordpress-plugins/accesspress-twitter-feed/)
|
51 |
+
|
52 |
+
[Documentation](https://accesspressthemes.com/documentation/documentationplugin-instruction-accesspress-twitter-feed/)
|
53 |
+
|
54 |
+
[Demo](http://accesspressthemes.com/demo/wordpress-plugins/accesspress-twitter-feed/)
|
55 |
+
|
56 |
+
|
57 |
+
== Installation ==
|
58 |
+
1. Unzip accesspress-twitter-feed.zip
|
59 |
+
1. Upload all the files to the /wp-content/plugins/accesspress-twitter-feed
|
60 |
+
1. Activate the plugin through the 'Plugins' menu in WordPress.
|
61 |
+
1. For customizing the plugin's settings, click on AccessPress Twitter Feed menu in Wordpress left admin menu.
|
62 |
+
1. To display the social counts in the frontend,please use [ap-twitter-feed] shortcode or AccessPress Twitter Feed Widget wherever necessary.
|
63 |
+
|
64 |
+
== Frequently Asked Questions ==
|
65 |
+
= What does this plugin do? =
|
66 |
+
This plugin provides the ability to to display your twitter account feed in your website in friendly manner with various configurable backend settings.
|
67 |
+
|
68 |
+
= Will it effect my site's speed? =
|
69 |
+
No , because we have provided the caching option to store the twitter feeds in the database and update within certain period kept in the plugin cache settings section.
|
70 |
+
|
71 |
+
= Do I need to design the feeds again? =
|
72 |
+
No , you won't need to get any trouble regarding design and layout of the feeds since we have provided inbuilt 3 beautiful feeds template.You can choose any as per your requirement.
|
73 |
+
|
74 |
+
|
75 |
+
|
76 |
+
= Where can I find the documentation for the plugin? =
|
77 |
+
Once you install the plugin , you can check some general documentation about how to use the plugin in the "How to use" panel of the plugin's settings page.Detail documentation can be found [here](https://accesspressthemes.com/documentation/documentationplugin-instruction-accesspress-twitter-feed/)
|
78 |
+
|
79 |
+
== Screenshots ==
|
80 |
+
1. Frontend Display of Twitter Feeds
|
81 |
+
2. Backend Plugin Settings Section
|
82 |
+
3. Backend Plugin's Widget Section
|
83 |
+
|
84 |
+
|
85 |
+
== Changelog ==
|
86 |
+
= 1.0.0 =
|
87 |
+
* Plugin submitted to http://wordpress.org for review and approval
|
88 |
+
* Plugin approved and commited to wordpress.org for availability of download
|
89 |
+
|
90 |
+
|
91 |
+
== Upgrade Notice ==
|
92 |
+
There is an update available for the AccessPress Twitter Feed Plugin.Please update to recieve new updates and bug fixes.
|