Plugin Directory

Changeset 3206719


Ignore:
Timestamp:
12/12/2024 06:04:04 AM (13 months ago)
Author:
bplugins
Message:

Release 1.2.7 - Copyright issue resolved

Location:
easy-twitter-feeds
Files:
10 added
5 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • easy-twitter-feeds/trunk/easy-twitter-feeds.php

    r3086830 r3206719  
    1 <?php
    2 
     1<?php
    32/*
    4  * Plugin Name: Easy Twitter Feeds
    5  * Plugin URI:  https://twitter-feed.bplugins.com/
     3 * Plugin Name: Feeds For Twitter
    64 * Description: You can Embed your Twitter timeline feed, Follow widget anywhere in WordPress using Shortcode. 
    7  * Version: 1.2.6
     5 * Version: 1.2.7
    86 * Author: bPlugins
    97 * Author URI: https://bplugins.com/
    10  * Text Domain:  easy-twitter
     8 * Text Domain:  easy-twitter-feeds
    119 * Domain Path:  /languages
    1210 * License: GPLv3
    1311 */
    14 // ABS PATH
    15 if (!defined('ABSPATH'))
    16 {
    17     exit;
    18 }
     12
     13
    1914/*Some Set-up*/
    20 define('ETF_VERSION', '1.2.6');
    21 define('ETF_DIR_URL', plugin_dir_url(__FILE__));
    22 define('ETF_DIR_PATH', plugin_dir_path(__FILE__));
    23 // freemius integration
     15define('ETF_PLUGIN_DIR', WP_PLUGIN_URL . '/' . plugin_basename( dirname(__FILE__) ) . '/' );
     16define('ETF_PLUGIN_VERSION', '1.2.7' );
    2417
    25 if (!function_exists('etf_fs'))
    26 {
    27     // Create a helper function for easy SDK access.
    28     function etf_fs()
    29     {
    30         global $etf_fs;
     18add_action('plugin_loaded','etf_load_textdomain');
     19function etf_load_textdomain(){
     20    load_textdomain('easy-twitter-feeds', ETF_PLUGIN_DIR.'languages');
    3121
    32         if (!isset($etf_fs))
    33         {
    34             require_once dirname(__FILE__) . '/freemius/start.php';
    35             $etf_fs = fs_dynamic_init(
    36                 array(
    37                     'id' => '14839',
    38                     'slug' => 'easy-twitter-feeds',
    39                     'premium_slug' => 'easy-twitter-feeds-pro',
    40                     'type' => 'plugin',
    41                     'public_key' => 'pk_ba9a28a91e7b8f97d024123dad59c',
    42                     'is_premium' => false,
    43                     'premium_suffix' => 'Pro',
    44                     'has_addons' => false,
    45                     'has_paid_plans' => true,
    46                     'trial' => array(
    47                         'days' => 7,
    48                         'is_require_payment' => false,
    49                     ),
    50                     'menu' => array(
    51                         'slug' => 'edit.php?post_type=easy-twitter-feeds',
    52                         'contact' => false,
    53                         'support' => false,
    54                     ),
    55                     'is_live' => true,
    56                 )
    57             );
    58         }
    59 
    60         return $etf_fs;
    61     }
    62 
    63     etf_fs();
    64     do_action('etf_fs_loaded');
    6522}
    6623
    67 require_once ETF_DIR_PATH . 'inc/block.php';
    68 require_once ETF_DIR_PATH . 'inc/CustomPost.php';
    69 require_once ETF_DIR_PATH . 'inc/ShortCode.php';
    70 function etfIsPremium()
    71 {
    72     return etf_fs()->is__premium_only() && etf_fs()->can_use_premium_code();
     24//Script and style
     25function etf_style_and_scripts() {
     26   // wp_enqueue_style( 'h5ap-style', plugin_dir_url( __FILE__ ) . 'public/style/plyr.css', array(), ETF_PLUGIN_VERSION , 'all' );
     27    wp_enqueue_script( 'widget-js', plugin_dir_url( __FILE__ ). 'public/js/widget.js' , array(), ETF_PLUGIN_VERSION , false );
    7328}
     29add_action( 'wp_enqueue_scripts', 'etf_style_and_scripts' );
    7430
    75 class ETFPlugin
    76 {
    77     public function __construct()
    78     {
    79         add_action('init', [$this, 'onInit']);
    80         add_action('wp_ajax_etfPipeChecker', [$this, 'etfPipeChecker']);
    81         add_action('wp_ajax_nopriv_etfPipeChecker', [$this, 'etfPipeChecker']);
    82         add_action('admin_init', [$this, 'registerSettings']);
    83         add_action('rest_api_init', [$this, 'registerSettings']);
    84     }
    8531
    86     function onInit()
    87     {
    88         load_plugin_textdomain('easy-twitter', false, dirname(plugin_basename(__FILE__)) . '/languages');
    89     }
     32// Shortcode for Timeline
     33function etf_shortcode_func($atts){
     34    extract( shortcode_atts( array(
    9035
    91     function etfPipeChecker()
    92     {
    93         $nonce = $_POST['_wpnonce'] ?? null;
    94         if (!wp_verify_nonce($nonce, 'wp_ajax'))
    95         {
    96             wp_send_json_error('Invalid Request');
    97         }
    98         wp_send_json_success([
    99             'isPipe' => etfIsPremium(),
    100         ]);
    101     }
     36        'username' => null,
     37        'width' => null,
     38        'height' => null,
     39        'theme' => 'dark',
     40        'title' => 'Tweets by',
    10241
    103     function registerSettings()
    104     {
    105         register_setting('etfUtils', 'etfUtils', [
    106             'show_in_rest' => [
    107                 'name' => 'etfUtils',
    108                 'schema' => [
    109                     'type' => 'string',
    110                 ],
    111             ],
    112             'type' => 'string',
    113             'default' => wp_json_encode([
    114                 'nonce' => wp_create_nonce('wp_ajax'),
    115             ]),
    116             'sanitize_callback' => 'sanitize_text_field',
    117         ]);
    118     }
     42    ), $atts ) );
     43?> 
     44<?php if (!empty($username)){ ?>
     45<a class="twitter-timeline"
     46   data-width="<?php echo esc_attr($width); ?>"
     47   data-height="<?php echo esc_attr($height); ?>"
     48   data-theme="<?php echo esc_attr($theme); ?>"
     49   href="https://twitter.com/<?php echo esc_attr($username); ?>">
     50   <?php echo esc_html($title); ?> <?php echo esc_html($username); ?>
     51</a>
     52
     53<?php }else{ echo '<h2>You must enter your Twitter handle in the username attribute of the shortcode.  </h2>';}
    11954
    12055}
    121 new ETFPlugin();
     56add_shortcode('timeline','etf_shortcode_func');
     57
     58
     59// Shortcode for Follow button
     60function etf_shortcode_follow_func($atts) {
     61    $atts = shortcode_atts(
     62        array(
     63            'username' => null,
     64            'size'     => null,
     65            'count'    => null,
     66        ),
     67        $atts
     68    );
     69
     70    if (!empty($atts['username'])) {
     71        $username = sanitize_text_field($atts['username']);
     72        $size = esc_attr($atts['size']);
     73        $count = esc_attr($atts['count']);
     74
     75        return sprintf(
     76            '<a href="https://twitter.com/%s" class="twitter-follow-button" data-size="%s" data-show-count="%s">Follow @%s</a>',
     77            $username, $size, $count, esc_html($username)
     78        );
     79    } else {
     80        return '<h2>' . esc_html__('You must enter your Twitter handle in the username attribute of the shortcode.', 'easy-twitter-feeds') . '</h2>';
     81    }
     82}
     83add_shortcode('follow_button', 'etf_shortcode_follow_func');
  • easy-twitter-feeds/trunk/readme.txt

    r3171811 r3206719  
    1 === Easy Twitter Feed - Twitter feeds plugin for WP   ===
    2 Contributors: bplugins, abuhayat, charlescormier, shehabulislam , shehab24, freemius
     1=== Feeds For Twitter  ===
     2Contributors: bplugins, abuhayat, charlescormier, shehabulislam, btechnologies, freemius
    33Tags: Twitter Feed, Embed Twitter , X Post, follow button, X
    44Requires at least: 4.0
    5 Tested up to: 6.5.3
    6 Stable tag: 1.2.6
     5Tested up to: 6.7.1
     6Stable tag: 1.2.7
    77Requires PHP: 7.1
    88Donate link: https://www.buymeacoffee.com/abuhayat
    9 License: GPLv2 or later
    10 License URI: http://www.gnu.org/licenses/gpl-2.0.html
     9License: GPLv3 or later
     10License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1111
    1212Embed Twitter Timeline/Feed, Post, Video, Hashtag, Follow Button, Tweet Button easily. This plugin is lightweight but super powerful.
     
    182182
    183183== Upgrade Notice ==
     184
     185= 1.2.7 - 12 Dec, 24 =
     186* TradeMark Issues solved.
    184187
    185188= 1.2.6 =
     
    211214== Changelog ==
    212215
     216= 1.2.7 - 12 Dec, 24 =
     217* TradeMark Issues solved.
     218
    213219= 1.2.5 =
    214220* Performance and code improvement
Note: See TracChangeset for help on using the changeset viewer.