├── .gitmodules ├── APTF.class.php ├── accesspress-twitter-feed.php ├── css ├── backend.css ├── fonts.css ├── fonts │ ├── WebSymbols-Regular.eot │ ├── WebSymbols-Regular.svg │ ├── WebSymbols-Regular.ttf │ └── WebSymbols-Regular.woff ├── frontend.css ├── images │ ├── Thumbs.db │ ├── bx_loader.gif │ ├── controls.png │ ├── icon.png │ ├── logo.png │ ├── next.png │ └── prev.png └── jquery.bxslider.css ├── images ├── aplite.png ├── appro.png ├── flicker.png ├── googleplus.png ├── icon.png ├── logo.png ├── pinterest.png ├── screenshot-1.png ├── screenshot-2.png ├── screenshot-3.png ├── twitter.png ├── upgrade-1.jpg └── upgrade-2.jpg ├── inc ├── backend │ ├── boards │ │ ├── about.php │ │ ├── how-to-use.php │ │ └── main-settings.php │ ├── header.php │ ├── save-settings.php │ ├── settings.php │ ├── slider-widget.php │ └── widget.php └── frontend │ ├── shortcode.php │ ├── slider-shortcode.php │ └── templates │ ├── default │ ├── template-1.php │ ├── template-2.php │ └── template-3.php │ ├── follow-btn.php │ ├── slider │ ├── template-1.php │ ├── template-2.php │ └── template-3.php │ └── tweet-actions.php ├── js ├── backend.js ├── frontend.js └── jquery.bxslider.min.js ├── languages └── accesspress-twitter-feed.pot ├── oauth ├── OAuth.php └── twitteroauth.php ├── readme.md ├── readme.txt └── twitteroauth ├── OAuth.php └── twitteroauth.php /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "loklak_php_api"] 2 | path = loklak_php_api 3 | url = https://github.com/loklak/loklak_php_api 4 | -------------------------------------------------------------------------------- /APTF.class.php: -------------------------------------------------------------------------------- 1 | '', 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 | } 126 | -------------------------------------------------------------------------------- /accesspress-twitter-feed.php: -------------------------------------------------------------------------------- 1 | aptf_settings = get_option('aptf_settings'); 51 | add_action('init', array($this, 'load_text_domain')); //loads plugin text domain for internationalization 52 | add_action('admin_init', array($this, 'session_init')); //starts session in admin section 53 | add_action('admin_menu', array($this, 'add_plugin_admin_menu')); //adds the menu in admin section 54 | add_action('admin_enqueue_scripts', array($this, 'register_admin_scripts')); //registers scripts and css for admin section 55 | register_activation_hook(__FILE__, array($this, 'load_default_settings')); //loads default settings for the plugin while activating the plugin 56 | add_action('admin_post_aptf_form_action', array($this, 'aptf_form_action')); //action to save settings 57 | add_action('admin_post_aptf_restore_settings', array($this, 'aptf_restore_settings')); //action to restore default settings 58 | add_action('admin_post_aptf_delete_cache', array($this, 'aptf_delete_cache')); //action to delete cache 59 | add_shortcode('ap-twitter-feed', array($this, 'feed_shortcode')); //registers shortcode to display the feeds 60 | add_shortcode('ap-twitter-feed-slider', array($this, 'feed_slider_shortcode')); //registers shortcode to display the feeds as slider 61 | add_action('widgets_init', array($this, 'register_widget')); //registers the widget 62 | add_action('wp_enqueue_scripts',array($this,'register_front_assests'));//registers assets for the frontend 63 | } 64 | 65 | /** 66 | * Loads Plugin Text Domain 67 | * 68 | */ 69 | function load_text_domain() { 70 | load_plugin_textdomain('accesspress-twitter-feed', false, basename(dirname(__FILE__)) . '/languages'); 71 | } 72 | 73 | /** 74 | * Starts Session 75 | */ 76 | function session_init() { 77 | if (!session_id()) { 78 | session_start(); 79 | } 80 | } 81 | 82 | /** 83 | * Loads Default Settings 84 | */ 85 | function load_default_settings() { 86 | $default_settings = $this->get_default_settings(); 87 | if (!get_option('aptf_settings')) { 88 | update_option('aptf_settings', $default_settings); 89 | } 90 | delete_transient('aptf_tweets'); 91 | } 92 | 93 | /** 94 | * Adds plugin's menu in the admin section 95 | */ 96 | function add_plugin_admin_menu() { 97 | add_menu_page(__('AccessPress Twitter Feed', 'accesspress-twitter-feed'), __('AccessPress Twitter Feed', 'accesspress-twitter-feed'), 'manage_options', 'ap-twitter-feed', array($this, 'main_setting_page'), 'dashicons-twitter'); 98 | } 99 | 100 | /** 101 | * Plugin's main setting page 102 | */ 103 | function main_setting_page() { 104 | include('inc/backend/settings.php'); 105 | } 106 | 107 | /** 108 | * Register all the scripts in admin section 109 | */ 110 | function register_admin_scripts() { 111 | if (isset($_GET['page']) && $_GET['page'] == 'ap-twitter-feed') { 112 | wp_enqueue_script('aptf-admin-script', APTF_JS_DIR . '/backend.js', array('jquery'), APTF_VERSION); 113 | wp_enqueue_style('aptf-backend-css', APTF_CSS_DIR . '/backend.css', array(), APTF_VERSION); 114 | } 115 | } 116 | 117 | /** 118 | * Return default settings array 119 | * @return array 120 | */ 121 | function get_default_settings() { 122 | $default_settings = array('loklak_api' => '', 123 | 'consumer_key' => '', 124 | 'consumer_secret' => '', 125 | 'access_token' => '', 126 | 'access_token_secret' => '', 127 | 'twitter_username' => '', 128 | 'twitter_account_name', 129 | 'cache_period' => '', 130 | 'total_feed' => '5', 131 | 'feed_template' => 'template-1', 132 | 'time_format' => 'elapsed_time', 133 | 'display_username' => 1, 134 | 'display_twitter_actions'=>1, 135 | 'fallback_message'=>'', 136 | 'display_follow_button'=>0 137 | ); 138 | return $default_settings; 139 | } 140 | 141 | 142 | 143 | /** 144 | * Prints array in pre format 145 | */ 146 | function print_array($array) { 147 | echo "
";
148 |             print_r($array);
149 |             echo "
"; 150 | } 151 | 152 | /** 153 | * Saves settings in option table 154 | */ 155 | function aptf_form_action() { 156 | if (!empty($_POST) && wp_verify_nonce($_POST['aptf_nonce_field'], 'aptf_action_nonce')) { 157 | include('inc/backend/save-settings.php'); 158 | } else { 159 | die('No script kiddies please!'); 160 | } 161 | } 162 | 163 | /** 164 | * Restores Default Settings 165 | */ 166 | function aptf_restore_settings() { 167 | if (!empty($_GET) && wp_verify_nonce($_GET['_wpnonce'], 'aptf-restore-nonce')) { 168 | $aptf_settings = $this->get_default_settings(); 169 | update_option('aptf_settings', $aptf_settings); 170 | $_SESSION['aptf_msg'] = __('Default Settings Restored Successfully.', 'accesspress-twitter-feed'); 171 | wp_redirect(admin_url() . 'admin.php?page=ap-twitter-feed'); 172 | } else { 173 | die('No script kiddies please!'); 174 | } 175 | } 176 | 177 | /** 178 | * Registers shortcode to display feed 179 | */ 180 | function feed_shortcode($atts) { 181 | ob_start(); 182 | include('inc/frontend/shortcode.php'); 183 | $html = ob_get_contents(); 184 | ob_get_clean(); 185 | return $html; 186 | } 187 | 188 | /** 189 | * Register shortcode for feeds slider 190 | */ 191 | function feed_slider_shortcode($atts){ 192 | ob_start(); 193 | include('inc/frontend/slider-shortcode.php'); 194 | $html = ob_get_contents(); 195 | ob_get_clean(); 196 | return $html; 197 | } 198 | 199 | /** 200 | * Deletes Feeds from cache 201 | */ 202 | function aptf_delete_cache() { 203 | delete_transient('aptf_tweets'); 204 | $_SESSION['aptf_msg'] = __('Cache Deleted Successfully.', 'accesspress-twitter-feed'); 205 | wp_redirect(admin_url() . 'admin.php?page=ap-twitter-feed'); 206 | } 207 | 208 | /** 209 | * 210 | * @param varchar $date 211 | * @param string $format 212 | * @return type 213 | */ 214 | function get_date_format($date, $format) { 215 | switch($format){ 216 | case 'full_date': 217 | $date = strtotime($date); 218 | $date = date('F j, Y, g:i a',$date); 219 | break; 220 | case 'date_only': 221 | $date = strtotime($date); 222 | $date = date('F j, Y',$date); 223 | break; 224 | case 'elapsed_time': 225 | $current_date = strtotime(date('h:i A M d Y')); 226 | $tweet_date = strtotime($date); 227 | $total_seconds = $current_date - $tweet_date; 228 | 229 | $seconds = $total_seconds % 60; 230 | $total_minutes = $total_seconds / 60; 231 | ; 232 | $minutes = $total_minutes % 60; 233 | $total_hours = $total_minutes / 60; 234 | $hours = $total_hours % 24; 235 | $total_days = $total_hours / 24; 236 | $days = $total_days % 365; 237 | $years = $total_days / 365; 238 | 239 | if ($years >= 1) { 240 | if($years == 1){ 241 | $date = $years . __(' year ago', 'accesspress-twitter-feed'); 242 | } 243 | else 244 | { 245 | $date = $years . __(' year ago', 'accesspress-twitter-feed'); 246 | } 247 | 248 | } elseif ($days >= 1) { 249 | if($days == 1){ 250 | $date = $days . __(' day ago', 'accesspress-twitter-feed'); 251 | } 252 | else 253 | { 254 | $date = $days . __(' days ago', 'accesspress-twitter-feed'); 255 | } 256 | 257 | } elseif ($hours >= 1) { 258 | if($hours == 1){ 259 | $date = $hours . __(' hour ago', 'accesspress-twitter-feed'); 260 | } 261 | else 262 | { 263 | $date = $hours . __(' hours ago', 'accesspress-twitter-feed'); 264 | } 265 | 266 | } elseif ($minutes > 1) { 267 | $date = $minutes . __(' minutes ago', 'accesspress-twitter-feed'); 268 | 269 | 270 | } else { 271 | $date = __("1 minute ago", 'accesspress-twitter-feed'); 272 | } 273 | break; 274 | default: 275 | break; 276 | } 277 | return $date; 278 | } 279 | 280 | /** 281 | * Registers Widget 282 | */ 283 | function register_widget() { 284 | register_widget('APTF_Widget'); 285 | register_widget('APTF_Slider_Widget'); 286 | } 287 | 288 | /** 289 | * Registers Assets for frontend 290 | */ 291 | function register_front_assests(){ 292 | wp_enqueue_script('aptf-bxslider',APTF_JS_DIR.'/jquery.bxslider.min.js',array('jquery'),APTF_VERSION); 293 | wp_enqueue_style('aptf-bxslider',APTF_CSS_DIR.'/jquery.bxslider.css',array(),APTF_VERSION); 294 | wp_enqueue_script('aptf-front-js',APTF_JS_DIR.'/frontend.js',array('jquery','aptf-bxslider'),APTF_VERSION); 295 | wp_enqueue_style('aptf-front-css',APTF_CSS_DIR.'/frontend.css',array(),APTF_VERSION); 296 | wp_enqueue_style('aptf-font-css',APTF_CSS_DIR.'/fonts.css',array(),APTF_VERSION); 297 | } 298 | 299 | /** 300 | * New Functions 301 | * */ 302 | function get_oauth_connection($cons_key, $cons_secret, $oauth_token, $oauth_token_secret){ 303 | $ai_connection = new TwitterOAuth($cons_key, $cons_secret, $oauth_token, $oauth_token_secret); 304 | return $ai_connection; 305 | } 306 | 307 | function get_twitter_tweets($username,$tweets_number){ 308 | $tweets = get_transient('aptf_tweets'); 309 | //$this->print_array($tweets); 310 | if (empty((array)$tweets) || false === $tweets ) 311 | { 312 | $aptf_settings = $this->aptf_settings; 313 | if($aptf_settings['loklak_api']) 314 | { 315 | $loklak = new Loklak(); 316 | $username = explode('@', $username)[1]; 317 | $tweets = $loklak->search('', null, null, $username, $tweets_number); 318 | $tweets = json_decode($tweets, true); 319 | $tweets = json_decode($tweets['body'], true); 320 | $tweets = $tweets['statuses']; 321 | } 322 | else { 323 | $consumer_key = $aptf_settings['consumer_key']; 324 | $consumer_secret = $aptf_settings['consumer_secret']; 325 | $access_token = $aptf_settings['access_token']; 326 | $access_token_secret = $aptf_settings['access_token_secret']; 327 | $oauth_connection = $this->get_oauth_connection($consumer_key, $consumer_secret, $access_token, $access_token_secret); 328 | $tweets = $oauth_connection->get("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=".$username."&count=".$tweets_number); 329 | } 330 | $cache_period = intval($aptf_settings['cache_period']) * 60; 331 | $cache_period = ($cache_period < 1) ? 3600 : $cache_period; 332 | if(!isset($tweets->errors)){ 333 | set_transient('aptf_tweets', $tweets, $cache_period); 334 | } 335 | 336 | } 337 | return $tweets; 338 | } 339 | 340 | 341 | 342 | 343 | } 344 | 345 | /** 346 | * Plugin Initialization 347 | */ 348 | $aptf_obj = new APTF_Class(); 349 | } 350 | 351 | -------------------------------------------------------------------------------- /css/backend.css: -------------------------------------------------------------------------------- 1 | .aptf-panel{ 2 | background: #55ACEE; 3 | border-radius: 15px 15px 0 0; 4 | float: left; 5 | width: 810px; 6 | } 7 | .aptf-header-wrapper { 8 | background: none repeat scroll 0 0 #55ACEE; 9 | border-bottom: 5px solid #20627b; 10 | border-radius: 15px 15px 0 0; 11 | color: #fff; 12 | height: 65px; 13 | position: relative; 14 | } 15 | .apsc-logo { 16 | float: left; 17 | padding: 15px 0 0 20px; 18 | width: auto; 19 | } 20 | .apsc-socials { 21 | left: 50%; 22 | margin-left: -100px; 23 | position: absolute; 24 | text-align: center; 25 | top: 5px; 26 | width: 200px; 27 | } 28 | .apsc-socials p { 29 | margin: 5px 0; 30 | } 31 | .aptf-header-wrapper .apsc-title { 32 | color: #fff; 33 | float: right; 34 | font-size: 20px; 35 | line-height: 65px; 36 | padding: 0 20px 0 0; 37 | } 38 | .aptf-nav{ 39 | border-left: 1px solid #55ACEE; 40 | float: left; 41 | margin-bottom: 52px; 42 | position: relative; 43 | width: 199px; 44 | } 45 | .aptf-nav ul{ 46 | margin: 0; 47 | } 48 | .aptf-nav li{ 49 | margin-bottom: 0; 50 | } 51 | .aptf-nav li a{ 52 | background-color: #55ACEE; 53 | border-bottom: 1px solid #CCC; 54 | color: white; 55 | display: block; 56 | font-family: "Ubuntu",sans-serif; 57 | font-size: 13px; 58 | font-weight: bold; 59 | margin: 0; 60 | outline: 0 none; 61 | padding: 12px 23px; 62 | text-decoration: none; 63 | text-transform: uppercase; 64 | } 65 | .aptf-nav li a:hover, 66 | .aptf-nav li a.aptf-active-trigger{ 67 | background: #FFF; 68 | color: #55ACEE; 69 | } 70 | .aptf-board-wrapper{ 71 | background: none repeat scroll 0 0 #fff; 72 | border-bottom: 1px solid #55ACEE; 73 | border-right: 1px solid #55ACEE; 74 | float: left; 75 | min-height: 515px; 76 | padding: 10px 25px !important; 77 | width: 559px; 78 | } 79 | .aptf-single-board-wrapper h3{ 80 | font-size: 23px; 81 | font-weight: 400; 82 | line-height: 29px; 83 | margin: 0; 84 | padding: 0 15px 9px 0; 85 | } 86 | .aptf-option-wrapper{ 87 | border-bottom: 1px solid #ddd; 88 | margin-bottom: 10px; 89 | padding-bottom: 10px; 90 | } 91 | .aptf-option-wrapper label{ 92 | display: inline-block; 93 | font-size: 14px; 94 | font-weight: bold; 95 | line-height: 1.6; 96 | padding: 5px 5px 5px 0; 97 | vertical-align: top; 98 | width: 195px; 99 | } 100 | .aptf-option-field, 101 | .aptf-fields-configurations { 102 | display: inline-block; 103 | width: calc(100% - 205px); 104 | } 105 | .aptf-option-field label{ 106 | width: 100%; 107 | } 108 | .aptf-option-field label span{ 109 | color: #666666; 110 | display: inline-block; 111 | font-size: 12px; 112 | font-style: italic; 113 | margin-left: 2px; 114 | } 115 | .aptf-option-note { 116 | color: #666666; 117 | display: inline-block; 118 | font-style: italic; 119 | line-height: 1.6; 120 | margin-left: 2px; 121 | padding-top: 5px; 122 | width: calc( 100% - 12px ); 123 | background-color: aliceblue; 124 | padding: 5px; 125 | margin-top: 10px; 126 | box-shadow: 0 0 2px; 127 | } 128 | .aptf-option-note a{ 129 | padding: 0 3px; 130 | } 131 | 132 | .aptf-message{ 133 | background-color: #EEE; 134 | border-left: 4px solid #55ACEE; 135 | box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.2); 136 | display: block; 137 | font-size: 14px; 138 | line-height: 19px; 139 | margin-bottom: 10px; 140 | padding: 11px 15px; 141 | text-align: left; 142 | } 143 | .aptf-option-field > input[type="text"], 144 | .aptf-option-field > input[type="number"] { 145 | width: 100%; 146 | } 147 | .aptf-option-field > input[type="checkbox"] { 148 | margin-top: 8px; 149 | vertical-align: top; 150 | } 151 | .social-icon li{ 152 | display: inline-block; 153 | } 154 | .aptf-board-wrapper .button-primary{ 155 | background: #55acee !important; 156 | border-color: #2B99EA !important; 157 | } 158 | .seperator{ 159 | padding-bottom: 10px; 160 | } 161 | .dottedline{ 162 | border-bottom: 1px dotted #CCC; 163 | } 164 | #aptf-about-board h3{ 165 | padding-bottom: 0; 166 | } 167 | .aptf-promo { 168 | float: left; 169 | width: 27%; 170 | margin-left: 20px; 171 | } 172 | input.aptf-demo-btn { 173 | background: #FFFFFF; 174 | width: 147px; 175 | height: 43px; 176 | border-radius: 5px; 177 | } 178 | input.aptf-upgrade-btn { 179 | background: #0EB2E7; 180 | width: 147px; 181 | height: 43px; 182 | border-radius: 5px; 183 | color:white; 184 | } 185 | .aptf-promo-actions { 186 | margin-bottom: 10px; 187 | margin-top: 10px; 188 | } 189 | .aptf-promo-actions input[type="button"]:hover{cursor: pointer;} -------------------------------------------------------------------------------- /css/fonts.css: -------------------------------------------------------------------------------- 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;} 2 | -------------------------------------------------------------------------------- /css/fonts/WebSymbols-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/css/fonts/WebSymbols-Regular.eot -------------------------------------------------------------------------------- /css/fonts/WebSymbols-Regular.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 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 | 9 | 10 | 11 | 28 | 29 | 31 | 33 | 39 | 41 | 43 | 45 | 47 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 64 | 66 | 68 | 70 | 72 | 74 | 76 | 78 | 80 | 82 | 84 | 86 | 88 | 91 | 93 | 96 | 98 | 101 | 103 | 106 | 108 | 112 | 115 | 118 | 120 | 123 | 126 | 130 | 133 | 136 | 139 | 142 | 145 | 148 | 151 | 154 | 156 | 159 | 161 | 163 | 165 | 167 | 169 | 171 | 174 | 177 | 181 | 183 | 185 | 187 | 190 | 193 | 196 | 198 | 200 | 203 | 207 | 210 | 214 | 218 | 220 | 223 | 225 | 227 | 233 | 235 | 237 | 239 | 241 | 243 | 246 | 248 | 250 | 252 | 254 | 256 | 257 | 258 | -------------------------------------------------------------------------------- /css/fonts/WebSymbols-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/css/fonts/WebSymbols-Regular.ttf -------------------------------------------------------------------------------- /css/fonts/WebSymbols-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/css/fonts/WebSymbols-Regular.woff -------------------------------------------------------------------------------- /css/frontend.css: -------------------------------------------------------------------------------- 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 | a.aptf-follow-link{ 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 | } 282 | a.aptf-follow-link:focus{ 283 | outline:none !important; 284 | } -------------------------------------------------------------------------------- /css/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/css/images/Thumbs.db -------------------------------------------------------------------------------- /css/images/bx_loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/css/images/bx_loader.gif -------------------------------------------------------------------------------- /css/images/controls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/css/images/controls.png -------------------------------------------------------------------------------- /css/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/css/images/icon.png -------------------------------------------------------------------------------- /css/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/css/images/logo.png -------------------------------------------------------------------------------- /css/images/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/css/images/next.png -------------------------------------------------------------------------------- /css/images/prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/css/images/prev.png -------------------------------------------------------------------------------- /css/jquery.bxslider.css: -------------------------------------------------------------------------------- 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 | } 209 | -------------------------------------------------------------------------------- /images/aplite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/images/aplite.png -------------------------------------------------------------------------------- /images/appro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/images/appro.png -------------------------------------------------------------------------------- /images/flicker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/images/flicker.png -------------------------------------------------------------------------------- /images/googleplus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/images/googleplus.png -------------------------------------------------------------------------------- /images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/images/icon.png -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/images/logo.png -------------------------------------------------------------------------------- /images/pinterest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/images/pinterest.png -------------------------------------------------------------------------------- /images/screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/images/screenshot-1.png -------------------------------------------------------------------------------- /images/screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/images/screenshot-2.png -------------------------------------------------------------------------------- /images/screenshot-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/images/screenshot-3.png -------------------------------------------------------------------------------- /images/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/images/twitter.png -------------------------------------------------------------------------------- /images/upgrade-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/images/upgrade-1.jpg -------------------------------------------------------------------------------- /images/upgrade-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fossasia/wp-accesspress-twitter-feed/c5c80ba530b3e8f88a88b9a494bdb17c05d1b732/images/upgrade-2.jpg -------------------------------------------------------------------------------- /inc/backend/boards/about.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inc/backend/boards/how-to-use.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inc/backend/boards/main-settings.php: -------------------------------------------------------------------------------- 1 |
2 |

3 |
4 | 5 |
6 | /> 7 |
loklak.org and get plugin data through loklak (no registration and authentication required). Find out more ', 'accesspress-twitter-feed'); ?>
8 |
9 |
10 |
11 | 12 | 16 |
17 |
18 | 19 | 23 |
24 |
25 | 26 | 30 |
31 |
32 | 33 | 37 |
38 |
39 | 40 |
41 | 42 |
43 |
44 |
45 |
46 | 47 |
48 | 49 |
50 |
51 |
52 |
53 | 54 |
55 | 56 |
57 |
58 |
59 |
60 | 61 |
62 | 63 |
64 |
65 |
66 |
67 | 68 |
69 | 71 | 72 | 75 | 76 |
77 |
78 |
79 | 80 |
81 | 82 | 83 | 84 |
85 |
86 |
87 | 88 |
89 | /> 90 |
91 |
92 |
93 |
94 | 95 |
96 | /> 97 |
98 |
99 |
100 |
101 | 102 |
103 | 104 |
105 |
106 |
107 |
108 | 109 |
110 | /> 111 |
112 |
113 |
114 |
115 | 116 |
117 | 118 |
-------------------------------------------------------------------------------- /inc/backend/header.php: -------------------------------------------------------------------------------- 1 |
2 | 5 | 6 |
7 |

8 |
9 | 10 | 11 |    12 | 13 | 22 | 23 |
24 |
25 |
26 |
-------------------------------------------------------------------------------- /inc/backend/save-settings.php: -------------------------------------------------------------------------------- 1 | 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('loklak_api' => $loklak_api, 23 | 'consumer_key' => $consumer_key, 24 | 'consumer_secret' => $consumer_secret, 25 | 'access_token' => $access_token, 26 | 'access_token_secret' => $access_token_secret, 27 | 'twitter_username' => $twitter_username, 28 | 'twitter_account_name'=>$twitter_account_name, 29 | 'cache_period' => $cache_period, 30 | 'total_feed' => $total_feed, 31 | 'feed_template' => $feed_template, 32 | 'time_format' => $time_format, 33 | 'display_username' => isset($display_username)?1:0, 34 | 'display_twitter_actions'=>isset($display_twitter_actions)?1:0, 35 | 'fallback_message'=>$fallback_message, 36 | 'display_follow_button'=>isset($display_follow_button)?1:0 37 | ); 38 | update_option('aptf_settings', $aptf_settings); 39 | $_SESSION['aptf_msg'] = __('Settings Saved Successfully','accesspress-twitter-feed'); 40 | wp_redirect(admin_url().'admin.php?page=ap-twitter-feed'); 41 | 42 | -------------------------------------------------------------------------------- /inc/backend/settings.php: -------------------------------------------------------------------------------- 1 | aptf_settings; 3 | //$this->print_array($aptf_settings); 4 | ?> 5 |
6 |
7 | 8 |
9 |
    10 |
  • 11 |
  • 12 |
  • 13 |
14 |
15 |
16 | 17 |
21 | 23 |
24 | 25 | 41 | 45 | 46 | 47 | 48 |
49 |
50 |
51 |
52 | 53 |
54 | 55 | 56 |
57 | 58 | 59 |
60 | 61 | 62 |
63 |
64 |
65 | 66 | -------------------------------------------------------------------------------- /inc/backend/slider-widget.php: -------------------------------------------------------------------------------- 1 | __('AccessPress Tweets Slider Widget', 'accesspress-twitter-feed')) // 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 |

59 | 60 | 61 |

62 |

63 | 64 | /> 65 |

66 |

67 | 68 | 69 |

70 |

71 | 72 | /> 73 |

74 |

75 | 76 | 83 |

84 |

85 | 86 | /> 87 |

88 | "; 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: -------------------------------------------------------------------------------- 1 | __('AccessPress Twitter Feed Widget', 'accesspress-twitter-feed')) // 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 |

57 | 58 | 59 |

60 |

61 | 62 | 70 |

71 |

72 | 73 | /> 74 |

75 | -------------------------------------------------------------------------------- /inc/frontend/shortcode.php: -------------------------------------------------------------------------------- 1 | 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 | $tweets = $this->get_twitter_tweets($username, $aptf_settings['total_feed']); 7 | //$this->print_array($tweets); 8 | //die(); 9 | if(isset($atts['template'])){ 10 | $aptf_settings['feed_template'] = $atts['template']; 11 | } 12 | if(isset($atts['follow_button'])){ 13 | if($atts['follow_button']=='true'){ 14 | $aptf_settings['display_follow_button'] = 1; 15 | } 16 | else{ 17 | $aptf_settings['display_follow_button'] = 0; 18 | } 19 | 20 | } 21 | if(isset($tweets->errors)){ 22 | $fallback_message = ($aptf_settings['fallback_message']=='')?__('Something went wrong with the twitter.','accesspress-twitter-feed'):$aptf_settings['fallback_message']; 23 | ?> 24 |

25 | print_array($tweets); 33 | include('templates/default/'.$template); 34 | } 35 | ?> 36 | 37 | -------------------------------------------------------------------------------- /inc/frontend/slider-shortcode.php: -------------------------------------------------------------------------------- 1 | aptf_settings; 3 | $username = $aptf_settings['twitter_username']; 4 | $tweets = $this->get_twitter_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->errors)){ 19 | //$this->print_array($tweets); 20 | $fallback_message = ($aptf_settings['fallback_message']=='')?__('Something went wrong with the twitter.','accesspress-twitter-feed'):$aptf_settings['fallback_message']; 21 | ?> 22 |

23 | 32 | 33 | -------------------------------------------------------------------------------- /inc/frontend/templates/default/template-1.php: -------------------------------------------------------------------------------- 1 |
'; 6 | 7 | foreach ($tweets as $tweet) { 8 | $tweet = (object)$tweet; 9 | $loklak = $aptf_settings['loklak_api']; 10 | ?> 11 | 12 |
13 |
14 | 15 |
16 | text) { 19 | $the_tweet = ' '.$tweet->text . ' '; //adding an extra space to convert hast tag into links 20 | 21 | // i. User_mentions must link to the mentioned user's profile. 22 | if ( isset($tweet->entities->user_mentions) && is_array($tweet->entities->user_mentions)) { 23 | foreach ($tweet->entities->user_mentions as $key => $user_mention) { 24 | $the_tweet = preg_replace( 25 | '/@' . $user_mention->screen_name . '/i', '@' . $user_mention->screen_name . '', $the_tweet); 26 | } 27 | } 28 | else if ( isset($tweet->mentions) && is_array($tweet->mentions)) { 29 | foreach ($tweet->mentions as $user_mention) { 30 | $the_tweet = preg_replace( 31 | '/@' . $user_mention . '/i', '@' . $user_mention . '', $the_tweet); 32 | } 33 | } 34 | 35 | // ii. Hashtags must link to a twitter.com search with the hashtag as the query. 36 | if ( isset($tweet->entities->hashtags) && is_array($tweet->entities->hashtags)) { 37 | foreach ($tweet->entities->hashtags as $hashtag) { 38 | $the_tweet = str_replace(' #' . $hashtag->text . ' ', ' #' . $hashtag->text . ' ', $the_tweet); 39 | } 40 | } 41 | 42 | else if ( isset($tweet->hashtags) && is_array($tweet->hashtags)) { 43 | foreach ($tweet->hashtags as $hashtag) { 44 | $the_tweet = str_replace(' #' . $hashtag . ' ', ' #' . $hashtag . ' ', $the_tweet); 45 | } 46 | } 47 | 48 | // iii. Links in Tweet text must be displayed using the display_url 49 | // field in the URL entities API response, and link to the original t.co url field. 50 | 51 | if ( isset($tweet->entities->urls) && is_array($tweet->entities->urls)) { 52 | foreach ($tweet->entities->urls as $key => $link) { 53 | $the_tweet = preg_replace( 54 | '`' . $link->url . '`', '' . $link->url . '', $the_tweet); 55 | } 56 | } 57 | else if ( isset($tweet->links) && is_array($tweet->links)) { 58 | foreach ($tweet->links as $link) { 59 | $the_tweet = preg_replace( 60 | '`' . $link . '`', '' . $link . '', $the_tweet); 61 | } 62 | } 63 | 64 | echo $the_tweet . ' '; 65 | ?> 66 |
67 | 68 | 69 | 70 | 71 | 72 |
73 | 74 | 81 | 84 | 85 |

86 | 89 | 90 | 91 | 92 | 93 | 94 |
95 | 96 | 97 | 101 |
102 | 106 | -------------------------------------------------------------------------------- /inc/frontend/templates/default/template-2.php: -------------------------------------------------------------------------------- 1 |
'; 6 | 7 | foreach ($tweets as $tweet) { 8 | //$this->print_array($tweet); 9 | $tweet = (object)$tweet; 10 | $loklak = $aptf_settings['loklak_api']; 11 | ?> 12 | 13 |
14 |
15 | 16 |
17 | text) { 19 | $the_tweet = ' '.$tweet->text . ' '; //adding an extra space to convert hast tag into links 20 | 21 | // i. User_mentions must link to the mentioned user's profile. 22 | if ( isset($tweet->entities->user_mentions) && is_array($tweet->entities->user_mentions)) { 23 | foreach ($tweet->entities->user_mentions as $key => $user_mention) { 24 | $the_tweet = preg_replace( 25 | '/@' . $user_mention->screen_name . '/i', '@' . $user_mention->screen_name . '', $the_tweet); 26 | } 27 | } 28 | else if ( isset($tweet->mentions) && is_array($tweet->mentions)) { 29 | foreach ($tweet->mentions as $user_mention) { 30 | $the_tweet = preg_replace( 31 | '/@' . $user_mention . '/i', '@' . $user_mention . '', $the_tweet); 32 | } 33 | } 34 | 35 | // ii. Hashtags must link to a twitter.com search with the hashtag as the query. 36 | if ( isset($tweet->entities->hashtags) && is_array($tweet->entities->hashtags)) { 37 | foreach ($tweet->entities->hashtags as $hashtag) { 38 | $the_tweet = str_replace(' #' . $hashtag->text . ' ', ' #' . $hashtag->text . ' ', $the_tweet); 39 | } 40 | } 41 | 42 | else if ( isset($tweet->hashtags) && is_array($tweet->hashtags)) { 43 | foreach ($tweet->hashtags as $hashtag) { 44 | $the_tweet = str_replace(' #' . $hashtag . ' ', ' #' . $hashtag . ' ', $the_tweet); 45 | } 46 | } 47 | 48 | // iii. Links in Tweet text must be displayed using the display_url 49 | // field in the URL entities API response, and link to the original t.co url field. 50 | 51 | if ( isset($tweet->entities->urls) && is_array($tweet->entities->urls)) { 52 | foreach ($tweet->entities->urls as $key => $link) { 53 | $the_tweet = preg_replace( 54 | '`' . $link->url . '`', '' . $link->url . '', $the_tweet); 55 | } 56 | } 57 | else if ( isset($tweet->links) && is_array($tweet->links)) { 58 | foreach ($tweet->links as $link) { 59 | $the_tweet = preg_replace( 60 | '`' . $link . '`', '' . $link . '', $the_tweet); 61 | } 62 | } 63 | 64 | echo $the_tweet . ' '; 65 | ?> 66 |
67 | 74 | 77 | 78 |

79 | 82 | 83 | 84 | 85 | 86 | 87 | 88 |
89 | 93 |
94 | -------------------------------------------------------------------------------- /inc/frontend/templates/default/template-3.php: -------------------------------------------------------------------------------- 1 |
print_array($aptf_settings); 4 | // to use with intents 5 | //echo ''; 6 | 7 | foreach ($tweets as $tweet) { 8 | //$this->print_array($tweet); 9 | $tweet = (object)$tweet; 10 | $loklak = $aptf_settings['loklak_api']; 11 | ?> 12 | 13 |
14 |
15 | 16 |

17 | - 18 | get_date_format($tweet->created_at, $aptf_settings['time_format']); ?> 19 | 20 |

21 | 22 |
23 | text) { 25 | $the_tweet = ' '.$tweet->text . ' '; //adding an extra space to convert hast tag into links 26 | 27 | // i. User_mentions must link to the mentioned user's profile. 28 | if ( isset($tweet->entities->user_mentions) && is_array($tweet->entities->user_mentions)) { 29 | foreach ($tweet->entities->user_mentions as $key => $user_mention) { 30 | $the_tweet = preg_replace( 31 | '/@' . $user_mention->screen_name . '/i', '@' . $user_mention->screen_name . '', $the_tweet); 32 | } 33 | } 34 | else if ( isset($tweet->mentions) && is_array($tweet->mentions)) { 35 | foreach ($tweet->mentions as $user_mention) { 36 | $the_tweet = preg_replace( 37 | '/@' . $user_mention . '/i', '@' . $user_mention . '', $the_tweet); 38 | } 39 | } 40 | 41 | // ii. Hashtags must link to a twitter.com search with the hashtag as the query. 42 | if ( isset($tweet->entities->hashtags) && is_array($tweet->entities->hashtags)) { 43 | foreach ($tweet->entities->hashtags as $hashtag) { 44 | $the_tweet = str_replace(' #' . $hashtag->text . ' ', ' #' . $hashtag->text . ' ', $the_tweet); 45 | } 46 | } 47 | 48 | else if ( isset($tweet->hashtags) && is_array($tweet->hashtags)) { 49 | foreach ($tweet->hashtags as $hashtag) { 50 | $the_tweet = str_replace(' #' . $hashtag . ' ', ' #' . $hashtag . ' ', $the_tweet); 51 | } 52 | } 53 | 54 | // iii. Links in Tweet text must be displayed using the display_url 55 | // field in the URL entities API response, and link to the original t.co url field. 56 | 57 | if ( isset($tweet->entities->urls) && is_array($tweet->entities->urls)) { 58 | foreach ($tweet->entities->urls as $key => $link) { 59 | $the_tweet = preg_replace( 60 | '`' . $link->url . '`', '' . $link->url . '', $the_tweet); 61 | } 62 | } 63 | else if ( isset($tweet->links) && is_array($tweet->links)) { 64 | foreach ($tweet->links as $link) { 65 | $the_tweet = preg_replace( 66 | '`' . $link . '`', '' . $link . '', $the_tweet); 67 | } 68 | } 69 | 70 | echo $the_tweet . ' '; 71 | ?> 72 |
73 | 74 | 77 | 78 |

79 | 82 | 83 | 84 | 85 | 86 | 87 | 88 |
89 | 93 | 94 |
95 | -------------------------------------------------------------------------------- /inc/frontend/templates/follow-btn.php: -------------------------------------------------------------------------------- 1 |
2 | " target="_blank" class="aptf-follow-link"> 3 |
-------------------------------------------------------------------------------- /inc/frontend/templates/slider/template-1.php: -------------------------------------------------------------------------------- 1 |
'; 6 | 7 | foreach ($tweets as $tweet) { 8 | //$this->print_array($tweet); 9 | ?> 10 | 11 |
12 |
13 | 14 |

15 | - 16 | get_date_format($tweet->created_at, $aptf_settings['time_format']); ?> 17 | 18 |

19 | 20 |
21 | 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', '@' . $user_mention->screen_name . '', $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 . ' ', ' #' . $hashtag->text . ' ', $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 . '`', '' . $link->url . '', $the_tweet); 56 | } 57 | } 58 | 59 | echo $the_tweet . ' '; 60 | ?> 61 |
62 | 63 | 66 | 67 |

68 | 71 | 72 | 73 | 74 | 75 | 76 |
77 | 81 |
82 | 83 | 85 |
86 | -------------------------------------------------------------------------------- /inc/frontend/templates/slider/template-2.php: -------------------------------------------------------------------------------- 1 |
'; 6 | 7 | foreach ($tweets as $tweet) { 8 | //$this->print_array($tweet); 9 | ?> 10 | 11 |
12 |
13 | 14 |

15 | - 16 | get_date_format($tweet->created_at, $aptf_settings['time_format']); ?> 17 | 18 |

19 | 20 |
21 | 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', '@' . $user_mention->screen_name . '', $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 . ' ', ' #' . $hashtag->text . ' ', $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 . '`', '' . $link->url . '', $the_tweet); 56 | } 57 | } 58 | 59 | echo $the_tweet . ' '; 60 | ?> 61 |
62 | 65 | 66 |

67 | 70 | 71 | 72 | 73 | 74 | 75 |
76 | 80 |
81 | 83 |
84 | -------------------------------------------------------------------------------- /inc/frontend/templates/slider/template-3.php: -------------------------------------------------------------------------------- 1 |
'; 6 | 7 | foreach ($tweets as $tweet) { 8 | //$this->print_array($tweet); 9 | ?> 10 | 11 |
12 |
13 | 14 |
15 | 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', '@' . $user_mention->screen_name . '', $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 . ' ', ' #' . $hashtag->text . ' ', $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 . '`', '' . $link->url . '', $the_tweet); 50 | } 51 | } 52 | 53 | echo $the_tweet . ' '; 54 | ?> 55 |
56 | 57 | 58 | 59 | 60 | 61 |
62 | 63 | 71 | 74 | 75 |

76 | 79 | 80 | 81 | 82 |
83 | 87 |
88 | 90 |
91 | -------------------------------------------------------------------------------- /inc/frontend/templates/tweet-actions.php: -------------------------------------------------------------------------------- 1 |
2 | h 3 | J 4 | R 5 |
-------------------------------------------------------------------------------- /js/backend.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | 3 | $(function () { 4 | //All the backend js for the plugin 5 | 6 | /* 7 | Settings Tabs Switching 8 | */ 9 | $('.aptf-tabs-trigger').click(function(){ 10 | $('.aptf-tabs-trigger').removeClass('aptf-active-trigger'); 11 | $(this).addClass('aptf-active-trigger'); 12 | var attr_id = $(this).attr('id'); 13 | var arr_id = attr_id.split('-'); 14 | var id = arr_id[1]; 15 | $('.aptf-single-board-wrapper').hide(); 16 | $('#aptf-'+id+'-board').show(); 17 | }); 18 | 19 | if($("input[name='loklak_api']").prop('checked')){ 20 | aptf_update_twitter_auth(true); 21 | } 22 | 23 | $("input[name='loklak_api']").live('change', function() { 24 | if($(this).is(':checked')){ 25 | aptf_update_twitter_auth(true); 26 | } 27 | else { 28 | aptf_update_twitter_auth(false); 29 | } 30 | }); 31 | function aptf_update_twitter_auth(arg) { 32 | $("input[name='consumer_key']").prop('disabled', arg); 33 | $("input[name='consumer_secret']").prop('disabled', arg); 34 | $("input[name='access_token']").prop('disabled', arg); 35 | $("input[name='access_token_secret']").prop('disabled', arg); 36 | } 37 | }); 38 | }(jQuery)); 39 | -------------------------------------------------------------------------------- /js/frontend.js: -------------------------------------------------------------------------------- 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 | adaptiveHeight:true 22 | }); 23 | }); 24 | 25 | 26 | });//document.ready close 27 | }(jQuery)); -------------------------------------------------------------------------------- /js/jquery.bxslider.min.js: -------------------------------------------------------------------------------- 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.length1||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('
'),o.viewport=r.parent(),o.loader=t('
'),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('
'),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||e0)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;e0&&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+='"}o.pagerEl.html(e)},T=function(){o.settings.pagerCustom?o.pagerEl=t(o.settings.pagerCustom):(o.pagerEl=t('
'),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(''+o.settings.nextText+""),o.controls.prev=t(''+o.settings.prevText+""),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('
'),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('"),o.controls.stop=t('"),o.controls.autoEl=t('
'),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('
'+e+"
")})},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); -------------------------------------------------------------------------------- /languages/accesspress-twitter-feed.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: AccessPress Twitter Feed\n" 4 | "POT-Creation-Date: 2015-05-11 11:34+0545\n" 5 | "PO-Revision-Date: 2015-05-11 11:34+0545\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Access Keys \n" 8 | "Language: English\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "X-Generator: Poedit 1.5.7\n" 13 | "X-Poedit-KeywordsList: __;_e\n" 14 | "X-Poedit-Basepath: .\n" 15 | "X-Poedit-SourceCharset: UTF-8\n" 16 | "X-Poedit-SearchPath-0: ..\n" 17 | 18 | #: ../accesspress-twitter-feed.php:93 ../inc/backend/header.php:25 19 | msgid "AccessPress Twitter Feed" 20 | msgstr "" 21 | 22 | #: ../accesspress-twitter-feed.php:165 23 | msgid "Default Settings Restored Successfully." 24 | msgstr "" 25 | 26 | #: ../accesspress-twitter-feed.php:199 27 | msgid "Cache Deleted Successfully." 28 | msgstr "" 29 | 30 | #: ../accesspress-twitter-feed.php:236 ../accesspress-twitter-feed.php:240 31 | msgid " year ago" 32 | msgstr "" 33 | 34 | #: ../accesspress-twitter-feed.php:245 35 | msgid " day ago" 36 | msgstr "" 37 | 38 | #: ../accesspress-twitter-feed.php:249 39 | msgid " days ago" 40 | msgstr "" 41 | 42 | #: ../accesspress-twitter-feed.php:254 43 | msgid " hour ago" 44 | msgstr "" 45 | 46 | #: ../accesspress-twitter-feed.php:258 47 | msgid " hours ago" 48 | msgstr "" 49 | 50 | #: ../accesspress-twitter-feed.php:262 51 | msgid " minutes ago" 52 | msgstr "" 53 | 54 | #: ../accesspress-twitter-feed.php:266 55 | msgid "1 minute ago" 56 | msgstr "" 57 | 58 | #: ../inc/backend/header.php:7 59 | msgid "Follow us for new updates" 60 | msgstr "" 61 | 62 | #: ../inc/backend/save-settings.php:38 63 | msgid "Settings Saved Successfully" 64 | msgstr "" 65 | 66 | #: ../inc/backend/settings.php:10 ../inc/backend/boards/main-settings.php:2 67 | msgid "Settings" 68 | msgstr "" 69 | 70 | #: ../inc/backend/settings.php:11 71 | msgid "How To Use" 72 | msgstr "" 73 | 74 | #: ../inc/backend/settings.php:12 ../inc/backend/boards/about.php:2 75 | msgid "About" 76 | msgstr "" 77 | 78 | #: ../inc/backend/settings.php:45 79 | msgid "Save Settings" 80 | msgstr "" 81 | 82 | #: ../inc/backend/settings.php:46 83 | msgid "Are you sure you want to restore default settings?" 84 | msgstr "" 85 | 86 | #: ../inc/backend/settings.php:46 87 | msgid "Restore Default Settings" 88 | msgstr "" 89 | 90 | #: ../inc/backend/settings.php:47 91 | msgid "Are you sure you want to delete cache?" 92 | msgstr "" 93 | 94 | #: ../inc/backend/settings.php:47 95 | msgid "Delete Cache" 96 | msgstr "" 97 | 98 | #: ../inc/backend/slider-widget.php:14 99 | msgid "AccessPress Tweets Slider" 100 | msgstr "" 101 | 102 | #: ../inc/backend/slider-widget.php:15 103 | msgid "AccessPress Tweets Slider Widget" 104 | msgstr "" 105 | 106 | #: ../inc/backend/slider-widget.php:59 ../inc/backend/widget.php:57 107 | msgid "Title:" 108 | msgstr "" 109 | 110 | #: ../inc/backend/slider-widget.php:63 111 | msgid "Slider Controls:" 112 | msgstr "" 113 | 114 | #: ../inc/backend/slider-widget.php:67 115 | msgid "Slide Duration:" 116 | msgstr "" 117 | 118 | #: ../inc/backend/slider-widget.php:71 119 | msgid "Auto Slide:" 120 | msgstr "" 121 | 122 | #: ../inc/backend/slider-widget.php:75 ../inc/backend/widget.php:61 123 | msgid "Template:" 124 | msgstr "" 125 | 126 | #: ../inc/backend/slider-widget.php:85 ../inc/backend/widget.php:72 127 | msgid "Display Follow Button:" 128 | msgstr "" 129 | 130 | #: ../inc/backend/widget.php:14 131 | msgid "AccessPress Twitter Feeds" 132 | msgstr "" 133 | 134 | #: ../inc/backend/widget.php:15 135 | msgid "AccessPress Twitter Feed Widget" 136 | msgstr "" 137 | 138 | #: ../inc/backend/boards/how-to-use.php:2 139 | msgid "How to use" 140 | msgstr "" 141 | 142 | #: ../inc/backend/boards/main-settings.php:7 143 | #: ../inc/backend/boards/main-settings.php:14 144 | #: ../inc/backend/boards/main-settings.php:21 145 | #: ../inc/backend/boards/main-settings.php:28 146 | msgid "Please create an app on Twitter through this link:" 147 | msgstr "" 148 | 149 | #: ../inc/backend/boards/main-settings.php:7 150 | #: ../inc/backend/boards/main-settings.php:14 151 | #: ../inc/backend/boards/main-settings.php:21 152 | #: ../inc/backend/boards/main-settings.php:28 153 | msgid " and get this information." 154 | msgstr "" 155 | 156 | #: ../inc/backend/boards/main-settings.php:32 157 | msgid "Twitter Username" 158 | msgstr "" 159 | 160 | #: ../inc/backend/boards/main-settings.php:35 161 | msgid "" 162 | "Please enter the username of twitter account from which the feeds need to be " 163 | "fetched.For example:@apthemes" 164 | msgstr "" 165 | 166 | #: ../inc/backend/boards/main-settings.php:39 167 | msgid "Twitter Account Name" 168 | msgstr "" 169 | 170 | #: ../inc/backend/boards/main-settings.php:42 171 | msgid "" 172 | "Please enter the account name to be displayed.For example:AccessPress Themes" 173 | msgstr "" 174 | 175 | #: ../inc/backend/boards/main-settings.php:49 176 | msgid "" 177 | "Please enter the time period in minutes in which the feeds should be fetched." 178 | "Default is 60 Minutes" 179 | msgstr "" 180 | 181 | #: ../inc/backend/boards/main-settings.php:53 182 | msgid "Total Number of Feed" 183 | msgstr "" 184 | 185 | #: ../inc/backend/boards/main-settings.php:56 186 | msgid "" 187 | "Please enter the number of feeds to be fetched.Default number of feeds is 5." 188 | msgstr "" 189 | 190 | #: ../inc/backend/boards/main-settings.php:60 191 | msgid "Feeds Template" 192 | msgstr "" 193 | 194 | #: ../inc/backend/boards/main-settings.php:72 195 | msgid "Time Format" 196 | msgstr "" 197 | 198 | #: ../inc/backend/boards/main-settings.php:74 199 | msgid "Full Date and Time: e.g March 10, 2001, 5:16 pm" 200 | msgstr "" 201 | 202 | #: ../inc/backend/boards/main-settings.php:75 203 | msgid "Date only: e.g March 10, 2001" 204 | msgstr "" 205 | 206 | #: ../inc/backend/boards/main-settings.php:76 207 | msgid "Elapsed Time: e.g 12 hours ago" 208 | msgstr "" 209 | 210 | #: ../inc/backend/boards/main-settings.php:80 211 | msgid "Display Username" 212 | msgstr "" 213 | 214 | #: ../inc/backend/boards/main-settings.php:83 215 | msgid "Check if you want to show your username in each tweet" 216 | msgstr "" 217 | 218 | #: ../inc/backend/boards/main-settings.php:87 219 | msgid "Display Twitter Actions(Reply, Retweet, Favorite)" 220 | msgstr "" 221 | 222 | #: ../inc/backend/boards/main-settings.php:90 223 | msgid "Check if you want to display twitter actions" 224 | msgstr "" 225 | 226 | #: ../inc/backend/boards/main-settings.php:94 227 | msgid "Fallback Unavailable Message" 228 | msgstr "" 229 | 230 | #: ../inc/backend/boards/main-settings.php:97 231 | msgid "" 232 | "Please enter the message to display if the twitter is unavailable sometime." 233 | msgstr "" 234 | 235 | #: ../inc/backend/boards/main-settings.php:101 236 | msgid "Display Twitter Follow Button" 237 | msgstr "" 238 | 239 | #: ../inc/backend/boards/main-settings.php:104 240 | msgid "" 241 | "Check if you want to display twitter follow button at the end of the feeds" 242 | msgstr "" 243 | 244 | #: ../inc/frontend/shortcode.php:22 ../inc/frontend/slider-shortcode.php:20 245 | msgid "Something went wrong with the twitter." 246 | msgstr "" 247 | 248 | #: ../inc/frontend/templates/default/template-1.php:64 249 | #: ../inc/frontend/templates/default/template-2.php:57 250 | #: ../inc/frontend/templates/default/template-3.php:57 251 | #: ../inc/frontend/templates/slider/template-1.php:67 252 | #: ../inc/frontend/templates/slider/template-2.php:66 253 | #: ../inc/frontend/templates/slider/template-3.php:75 254 | msgid "Click here to read " 255 | msgstr "" 256 | -------------------------------------------------------------------------------- /oauth/twitteroauth.php: -------------------------------------------------------------------------------- 1 | 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 | } 247 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | === AccessPress Twitter Feed === 2 | 3 | Contributors: Access Keys 4 | 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 5 | Donate link: http://accesspressthemes.com/donation/ 6 | Requires at least: 3.8 7 | Tested up to: 4.3 8 | Stable tag: 1.3.5 9 | License: GPLv2 or later 10 | License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 | 12 | Display real-time Twitter feeds on your website. Update your website visitors with your latest Tweets. 13 | 14 | == Description == 15 | 16 | AccessPress Twitter Feed 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. 17 | 18 | 19 | 20 | 21 | = Free Features: = 22 | 23 | * Fetch latest tweets from any account 24 | * Configurable number of tweets to display 25 | * Caching option to prevent frequent API calls 26 | * 3 Beautiful design templates to choose from. 27 | * Easy use with shortcode with various configurable parameters 28 | * Display tweets in slider 29 | * Configure tweet date/time format 30 | * Option to show/hide full user name 31 | * Lightweight - Installs in seconds 32 | * User friendly - very easy to configure and setup. 33 | * Super Support 34 | - Dedicated email, forum support 35 | * Free updates 36 | - Get free updates for lifetime. 37 | 38 | = Premium Features: = 39 | 40 | ★ Multiple Twitter Accounts Support 41 | 42 | ★ Beautifully designed 12 themes to select from 43 | 44 | ★ Tweets Media(Image) Embeds Support 45 | 46 | ★ Twitter Timeline layout included 47 | 48 | ★ Slider mode available with more configurable options 49 | 50 | ★ Ticker mode available with various configurable options 51 | 52 | ★ Advanced Caching option to prevent frequent API calls 53 | 54 | ★ Super support – get support via email/support forum/online chat 55 | 56 | ★ And many more... 57 | 58 | 59 | = Premium Upgrade = 60 | 61 | * For premium upgrade, please go [here](https://accesspressthemes.com/wordpress-plugins/accesspress-twitter-feed-pro/) 62 | 63 | 64 | 65 | = Some Useful Links = 66 | 67 | * Support Email: support@accesspressthemes.com 68 | * Support Forum Link: http://accesspressthemes.com/support/ 69 | * Website Link: http://accesspressthemes.com/ 70 | * Youtube channel link: https://www.youtube.com/watch?v=TjZNcVG3fDE 71 | * Facebook link: https://www.facebook.com/AccessPressThemes 72 | 73 | 74 | 75 | For a easy installation guide checkout the Installation tab above. 76 | 77 | For complete information and documentation regarding plugin,please visit below links. 78 | 79 | [Plugin information](https://accesspressthemes.com/wordpress-plugins/accesspress-twitter-feed/) 80 | 81 | [Documentation](https://accesspressthemes.com/documentation/documentationplugin-instruction-accesspress-twitter-feed/) 82 | 83 | [Demo](http://accesspressthemes.com/demo/wordpress-plugins/accesspress-twitter-feed/) 84 | 85 | 86 | == Installation == 87 | 88 | 1. Unzip accesspress-twitter-feed.zip 89 | 1. Upload all the files to the /wp-content/plugins/accesspress-twitter-feed 90 | 1. Activate the plugin through the 'Plugins' menu in WordPress. 91 | 1. For customizing the plugin's settings, click on AccessPress Twitter Feed menu in Wordpress left admin menu. 92 | 1. To display the social counts in the frontend,please use [ap-twitter-feed] shortcode or AccessPress Twitter Feed Widget wherever necessary. 93 | 94 | == Frequently Asked Questions == 95 | 96 | = What does this plugin do? = 97 | 98 | This plugin provides the ability to to display your twitter account feed in your website in friendly manner with various configurable backend settings. 99 | 100 | = Will it effect my site's speed? = 101 | 102 | 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. 103 | 104 | = Do I need to design the feeds again? = 105 | 106 | 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. 107 | 108 | 109 | 110 | = Where can I find the documentation for the plugin? = 111 | 112 | 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/) 113 | 114 | == Screenshots == 115 | 116 | 1. Frontend Display of Twitter Feeds 117 | 118 | ![Frontend Display of Twitter Feeds](./images/screenshot-1.png) 119 | 2. Backend Plugin Settings Section 120 | 121 | ![Backend Plugin Settings Section](./images/screenshot-2.png) 122 | 3. Backend Plugin's Widget Section 123 | 124 | ![Backend Plugin's Widget Section](./images/screenshot-3.png) 125 | 126 | 127 | == Changelog == 128 | = 1.3.5 = 129 | * Updated how to use section 130 | 131 | = 1.3.4 = 132 | * Updated backend notes layout 133 | 134 | = 1.3.3 = 135 | * Updated text domain to match plugin's slug 136 | 137 | = 1.3.2 = 138 | * Updated style for backend notes 139 | 140 | = 1.3.1 = 141 | * Updated note for total number of tweets field 142 | 143 | = 1.3.0 = 144 | * Updated Menu Icon 145 | 146 | = 1.2.8 = 147 | * Added Escaping for output values in plugin settings fields 148 | 149 | = 1.2.7 = 150 | * Added some sanitization while saving the values in database 151 | 152 | = 1.2.6 = 153 | * Done some modifications with default settings 154 | 155 | = 1.2.5 = 156 | * Checked oauth class exists with PHP to prevent conflict 157 | 158 | = 1.2.4 = 159 | * Checked API class exists with PHP to prevent conflict 160 | 161 | = 1.2.3 = 162 | * Update a note in the plugin settings 163 | 164 | = 1.2.2 = 165 | * Updates language file 166 | 167 | = 1.2.1 = 168 | * Done small change for twitter username display 169 | 170 | = 1.2.0 = 171 | * Fixed small bug regarding twitter widget 172 | 173 | = 1.1.9 = 174 | * Done some modifications on API class 175 | 176 | = 1.1.8 = 177 | * Added some more translation texts 178 | 179 | = 1.1.7 = 180 | * Done small fix for twitter slider speed 181 | 182 | = 1.1.6 = 183 | * Added adaptive height for twitter slider 184 | 185 | = 1.1.5 = 186 | * Added Language file 187 | 188 | = 1.1.4 = 189 | * Small fix for hastags 190 | 191 | = 1.1.3 = 192 | * Done some update in upgrade sidebar 193 | * Updated backend message 194 | 195 | = 1.1.2 = 196 | * Done some code cleanup for default templates 197 | * Fixed div structure for date format 198 | 199 | = 1.1.1 = 200 | * Added Promo Banner in sidebar 201 | 202 | = 1.1.0 = 203 | * API updated 204 | * Small bug for time elasped date format fixed 205 | 206 | = 1.0.2 = 207 | * Fixed fallback message for default shortcode and widget 208 | 209 | = 1.0.1 = 210 | * Fixed small css for follow button 211 | 212 | = 1.0.0 = 213 | * Plugin submitted to http://wordpress.org for review and approval 214 | * Plugin approved and commited to wordpress.org for availability of download 215 | 216 | 217 | == Upgrade Notice == 218 | 219 | There is an update available for the AccessPress Twitter Feed Plugin.Please update to recieve new updates and bug fixes. -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | === AccessPress Twitter Feed === 2 | 3 | Contributors: Access Keys 4 | Tags: twitter, loklak, loklak api, tweet feeds, twitter feeds, twitter slider, twitter feeds slider, twitter tweet plugin, recent tweets widget, recent tweets plugin, recent tweet feeds 5 | Requires at least: 3.8 6 | Tested up to: 4.5.1 7 | Stable tag: 1.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 | 15 | AccessPress Twitter Feed 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. 16 | 17 | 18 | = Free Features: = 19 | 20 | * Fetch latest tweets from any account 21 | * Configurable number of tweets to display 22 | * Caching option to prevent frequent API calls 23 | * 3 Beautiful design templates to choose from. 24 | * Easy use with shortcode with various configurable parameters 25 | * Display tweets in slider 26 | * Configure tweet date/time format 27 | * Option to show/hide full user name 28 | * Lightweight - Installs in seconds 29 | * User friendly - very easy to configure and setup. 30 | * Super Support 31 | - Dedicated email, forum support 32 | * Free updates 33 | - Get free updates for lifetime. 34 | 35 | = Premium Features: = 36 | 37 | ★ Multiple Twitter Accounts Support 38 | 39 | ★ Beautifully designed 12 themes to select from 40 | 41 | ★ Tweets Media(Image) Embeds Support 42 | 43 | ★ Twitter Timeline layout included 44 | 45 | ★ Slider mode available with more configurable options 46 | 47 | ★ Ticker mode available with various configurable options 48 | 49 | ★ Advanced Caching option to prevent frequent API calls 50 | 51 | ★ Super support – get support via email/support forum/online chat 52 | 53 | ★ And many more... 54 | 55 | 56 | = Premium Upgrade = 57 | 58 | * For premium upgrade, please go [here](https://accesspressthemes.com/wordpress-plugins/accesspress-twitter-feed-pro/) 59 | 60 | 61 | 62 | For a easy installation guide checkout the Installation tab above. 63 | 64 | For complete information and documentation regarding plugin,please visit below links. 65 | 66 | [Plugin information](https://accesspressthemes.com/wordpress-plugins/accesspress-twitter-feed/) 67 | 68 | [Documentation](https://accesspressthemes.com/documentation/documentationplugin-instruction-accesspress-twitter-feed/) 69 | 70 | [Demo](http://accesspressthemes.com/demo/wordpress-plugins/accesspress-twitter-feed/) 71 | 72 | 73 | == Installation == 74 | 75 | 1. Unzip accesspress-twitter-feed.zip 76 | 1. Upload all the files to the /wp-content/plugins/accesspress-twitter-feed 77 | 1. Activate the plugin through the 'Plugins' menu in WordPress. 78 | 1. For customizing the plugin's settings, click on AccessPress Twitter Feed menu in Wordpress left admin menu. 79 | 1. To display the social counts in the frontend,please use [ap-twitter-feed] shortcode or AccessPress Twitter Feed Widget wherever necessary. 80 | 81 | == Frequently Asked Questions == 82 | 83 | = What does this plugin do? = 84 | 85 | This plugin provides the ability to to display your twitter account feed in your website in friendly manner with various configurable backend settings. 86 | 87 | = Will it effect my site's speed? = 88 | 89 | 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. 90 | 91 | = Do I need to design the feeds again? = 92 | 93 | 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. 94 | 95 | 96 | 97 | = Where can I find the documentation for the plugin? = 98 | 99 | 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/) 100 | 101 | == Screenshots == 102 | 103 | 1. Frontend Display of Twitter Feeds 104 | 105 | ![Frontend Display of Twitter Feeds](./images/screenshot-1.png) 106 | 2. Backend Plugin Settings Section 107 | 108 | ![Backend Plugin Settings Section](./images/screenshot-2.png) 109 | 3. Backend Plugin's Widget Section 110 | 111 | ![Backend Plugin's Widget Section](./images/screenshot-3.png) 112 | 113 | 114 | == Changelog == 115 | = 1.0 = 116 | * First version 117 | 118 | 119 | == Upgrade Notice == 120 | 121 | There is an update available for the AccessPress Twitter Feed Plugin. Please update to recieve new updates and bug fixes. -------------------------------------------------------------------------------- /twitteroauth/twitteroauth.php: -------------------------------------------------------------------------------- 1 | http_status; } 55 | function lastAPICall() { return $this->last_api_call; } 56 | 57 | /** 58 | * construct TwitterOAuth object 59 | */ 60 | function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) { 61 | $this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1(); 62 | $this->consumer = new OAuthConsumer($consumer_key, $consumer_secret); 63 | if (!empty($oauth_token) && !empty($oauth_token_secret)) { 64 | $this->token = new OAuthConsumer($oauth_token, $oauth_token_secret); 65 | } else { 66 | $this->token = NULL; 67 | } 68 | } 69 | 70 | 71 | /** 72 | * Get a request_token from Twitter 73 | * 74 | * @returns a key/value array containing oauth_token and oauth_token_secret 75 | */ 76 | function getRequestToken($oauth_callback) { 77 | $parameters = array(); 78 | $parameters['oauth_callback'] = $oauth_callback; 79 | $request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters); 80 | $token = OAuthUtil::parse_parameters($request); 81 | $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']); 82 | return $token; 83 | } 84 | 85 | /** 86 | * Get the authorize URL 87 | * 88 | * @returns a string 89 | */ 90 | function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) { 91 | if (is_array($token)) { 92 | $token = $token['oauth_token']; 93 | } 94 | if (empty($sign_in_with_twitter)) { 95 | return $this->authorizeURL() . "?oauth_token={$token}"; 96 | } else { 97 | return $this->authenticateURL() . "?oauth_token={$token}"; 98 | } 99 | } 100 | 101 | /** 102 | * Exchange request token and secret for an access token and 103 | * secret, to sign API calls. 104 | * 105 | * @returns array("oauth_token" => "the-access-token", 106 | * "oauth_token_secret" => "the-access-secret", 107 | * "user_id" => "9436992", 108 | * "screen_name" => "abraham") 109 | */ 110 | function getAccessToken($oauth_verifier) { 111 | $parameters = array(); 112 | $parameters['oauth_verifier'] = $oauth_verifier; 113 | $request = $this->oAuthRequest($this->accessTokenURL(), 'GET', $parameters); 114 | $token = OAuthUtil::parse_parameters($request); 115 | $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']); 116 | return $token; 117 | } 118 | 119 | /** 120 | * One time exchange of username and password for access token and secret. 121 | * 122 | * @returns array("oauth_token" => "the-access-token", 123 | * "oauth_token_secret" => "the-access-secret", 124 | * "user_id" => "9436992", 125 | * "screen_name" => "abraham", 126 | * "x_auth_expires" => "0") 127 | */ 128 | function getXAuthToken($username, $password) { 129 | $parameters = array(); 130 | $parameters['x_auth_username'] = $username; 131 | $parameters['x_auth_password'] = $password; 132 | $parameters['x_auth_mode'] = 'client_auth'; 133 | $request = $this->oAuthRequest($this->accessTokenURL(), 'POST', $parameters); 134 | $token = OAuthUtil::parse_parameters($request); 135 | $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']); 136 | return $token; 137 | } 138 | 139 | /** 140 | * GET wrapper for oAuthRequest. 141 | */ 142 | function get($url, $parameters = array()) { 143 | $response = $this->oAuthRequest($url, 'GET', $parameters); 144 | if ($this->format === 'json' && $this->decode_json) { 145 | return json_decode($response); 146 | } 147 | return $response; 148 | } 149 | 150 | /** 151 | * POST wrapper for oAuthRequest. 152 | */ 153 | function post($url, $parameters = array()) { 154 | $response = $this->oAuthRequest($url, 'POST', $parameters); 155 | if ($this->format === 'json' && $this->decode_json) { 156 | return json_decode($response); 157 | } 158 | return $response; 159 | } 160 | 161 | /** 162 | * DELETE wrapper for oAuthReqeust. 163 | */ 164 | function delete($url, $parameters = array()) { 165 | $response = $this->oAuthRequest($url, 'DELETE', $parameters); 166 | if ($this->format === 'json' && $this->decode_json) { 167 | return json_decode($response); 168 | } 169 | return $response; 170 | } 171 | 172 | /** 173 | * Format and sign an OAuth / API request 174 | */ 175 | function oAuthRequest($url, $method, $parameters) { 176 | if (strrpos($url, 'https://') !== 0 && strrpos($url, 'http://') !== 0) { 177 | $url = "{$this->host}{$url}.{$this->format}"; 178 | } 179 | $request = OAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $parameters); 180 | $request->sign_request($this->sha1_method, $this->consumer, $this->token); 181 | switch ($method) { 182 | case 'GET': 183 | return $this->http($request->to_url(), 'GET'); 184 | default: 185 | return $this->http($request->get_normalized_http_url(), $method, $request->to_postdata()); 186 | } 187 | } 188 | 189 | /** 190 | * Make an HTTP request 191 | * 192 | * @return API results 193 | */ 194 | function http($url, $method, $postfields = NULL) { 195 | $this->http_info = array(); 196 | $ci = curl_init(); 197 | /* Curl settings */ 198 | curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent); 199 | curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout); 200 | curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout); 201 | curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE); 202 | curl_setopt($ci, CURLOPT_HTTPHEADER, array('Expect:')); 203 | curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer); 204 | curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader')); 205 | curl_setopt($ci, CURLOPT_HEADER, FALSE); 206 | 207 | switch ($method) { 208 | case 'POST': 209 | curl_setopt($ci, CURLOPT_POST, TRUE); 210 | if (!empty($postfields)) { 211 | curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields); 212 | } 213 | break; 214 | case 'DELETE': 215 | curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE'); 216 | if (!empty($postfields)) { 217 | $url = "{$url}?{$postfields}"; 218 | } 219 | } 220 | 221 | curl_setopt($ci, CURLOPT_URL, $url); 222 | $response = curl_exec($ci); 223 | $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE); 224 | $this->http_info = array_merge($this->http_info, curl_getinfo($ci)); 225 | $this->url = $url; 226 | curl_close ($ci); 227 | return $response; 228 | } 229 | 230 | /** 231 | * Get the header info to store. 232 | */ 233 | function getHeader($ch, $header) { 234 | $i = strpos($header, ':'); 235 | if (!empty($i)) { 236 | $key = str_replace('-', '_', strtolower(substr($header, 0, $i))); 237 | $value = trim(substr($header, $i + 2)); 238 | $this->http_header[$key] = $value; 239 | } 240 | return strlen($header); 241 | } 242 | } 243 | } --------------------------------------------------------------------------------