Plugin Directory

Changeset 1864036


Ignore:
Timestamp:
04/25/2018 09:04:16 AM (8 years ago)
Author:
aspexi
Message:

2.1.12

Location:
aspexi-facebook-like-box-sidebox
Files:
20 added
2 edited

Legend:

Unmodified
Added
Removed
  • aspexi-facebook-like-box-sidebox/trunk/aspexi-facebook-side-box.php

    r1797197 r1864036  
    55Description: Plugin adds fancy Facebook Like Box Sidebox
    66Author: Aspexi
    7 Version: 2.1.11
     7Version: 2.1.12
    88Author URI: http://aspexi.com/
    99License: GPLv2 or later
     
    3131if ( !class_exists( 'AspexiFBsidebox' ) ) {
    3232
    33     define('ASPEXIFBSIDEBOX_VERSION', '2.1.11');
     33    define('ASPEXIFBSIDEBOX_VERSION', '2.1.12');
    3434    define('ASPEXIFBSIDEBOX_URL', plugin_dir_url( __FILE__ ) );
    3535    define('aspexifbsidebox_ADMIN_URL', 'themes.php?page=' . basename( __FILE__ ) );
     
    4747
    4848            add_action( 'admin_menu',           array( &$this, 'admin_menu'));
     49            add_action( 'admin_notices',        array( &$this, 'admin_notices'));
    4950            add_action( 'init',                 array( &$this, 'init' ), 10 );
    5051            add_action( 'wp_footer',            array( &$this, 'get_html' ), 21 );
    5152            add_action( 'admin_enqueue_scripts',array( &$this, 'admin_scripts') );
     53            add_action( 'wp_ajax_afbsb_hide_notice', array( &$this, 'admin_notices_handle') );
    5254            add_action( 'wp_enqueue_scripts',   array( &$this, 'init_scripts') );
    5355            add_filter( 'plugin_action_links',  array( &$this, 'settings_link' ), 10, 2);
     
    7476                'locale' => 'en_GB',
    7577                'status' => 'enabled',
     78                'hide_notice' => '0'
    7679            );
    7780
     
    631634                                </div>
    632635                            </div>
     636                            <div class="postbox">
     637                                <h3><span><?php _e('Security Services with ASecure.me', 'aspexifbsidebox'); ?></span></h3>
     638                                <div class="inside">
     639                                    <div style="width: 170px; margin: 0 auto;">
     640                                        <a href="https://asecure.me/?utm_source=slideboxfree" target="_blank"><img src="<?php echo ASPEXIFBSIDEBOX_URL.'images/be250.png'; ?>" alt="" border="0" width="170" /></a>
     641                                    </div>
     642                                    <p style="text-align: center;"><?php _e('We offer security services, backups and more. <a href="https://asecure.me/?utm_source=slideboxfree" target="_blank">Check out now</a>.'); ?></p>
     643                                </div>
     644                            </div>
    633645                            <div id="aspexifbsidebox-footer" style="text-align:left;text-shadow:0 1px 0 #fff;margin:0 0 10px;color:#888;"><?php echo sprintf(__('If you like %s please leave us a %s rating. A huge thank you in advance!'), '<strong>Aspexi Facebook Like Box Sidebox HD</strong>', '<a href="https://wordpress.org/plugins/aspexi-facebook-like-box-sidebox/reviews/#new-post" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733</a>') ?></div>
    634646                            <script type="text/javascript">
     
    730742                if (d.getElementById(id)) return;
    731743                js = d.createElement(s); js.id = id;
    732                 js.src = "//connect.facebook.net/'.$locale.'/sdk.js#xfbml=1&version=v2.11&appId=1548213832159053";
     744                js.src = "//connect.facebook.net/'.$locale.'/sdk.js#xfbml=1&version=v2.12&appId=1548213832159053";
    733745                fjs.parentNode.insertBefore(js, fjs);
    734746            }(document, \'script\', \'facebook - jssdk\'));</script>
     
    822834
    823835        public function admin_scripts() {
    824             // premium only
     836            wp_enqueue_script( 'aspexi-facebook-side-box-admin', ASPEXIFBSIDEBOX_URL . 'js/afbsb-admin.js', array( 'jquery' ), false, true );
     837
     838            wp_localize_script( 'aspexi-facebook-side-box-admin', 'aflb_admin', array(
     839                    'nonce'   => wp_create_nonce( "afbsbhidenotice-nonce" )
     840            ) );
    825841            return;
    826842        }
     
    861877            return $extra_admin_content;
    862878        }
     879
     880        public function admin_notices() {
     881
     882            if( !isset($this->cf['hide_notice']) || @$this->cf['hide_notice'] != '1' ) {
     883        ?>
     884            <div class="notice notice-success" id="afbsbnotice" style="display: flex;flex-wrap: wrap;">
     885                <p><?php _e( 'Is your site secure? Check out how can you protect your website with <a href="https://asecure.me/?utm_source=sideboxfree" target="_blank">ASecure.me</a> services.', 'aspexifblikebox' ); ?>
     886                    <div style="flex: 1 300px;margin: .5em 0;text-align: right;">
     887                        <input type="button" id="afbsbhidenotice" value="<?php _e( 'Hide this notice', 'aspexifbsidebox' ); ?>" class="button" />
     888                        <input type="button" value="<?php _e( 'Visit ASecure.me', 'aspexifbsidebox' ); ?>" onclick="window.open('https://asecure.me/?utm_source=sideboxfree');" class="button-primary" />
     889                    </div>
     890                </p>
     891            </div>
     892        <?php
     893            }
     894        }
     895
     896        public function admin_notices_handle() {
     897
     898            check_ajax_referer( 'afbsbhidenotice-nonce', 'nonce' );
     899
     900            $this->cf['hide_notice'] = '1';
     901
     902            update_option( 'aspexifbsidebox_options',  $this->cf, '', 'yes' );
     903
     904            die();
     905        }
    863906    }
    864907
  • aspexi-facebook-like-box-sidebox/trunk/readme.txt

    r1797197 r1864036  
    66Tags: facebook, likebox, like box, floating, button, slider, facebook likebox, facebook like box, facebook slider, facebook buttons, sidebox, facebook sidebox, like box sidebox, likebox sidebox, side box, like box side box
    77Requires at least: 3.0
    8 Tested up to: 4.9
    9 Stable tag: 2.1.11
     8Tested up to: 4.9.5
     9Stable tag: 2.1.12
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    125125== Changelog ==
    126126
     127= 2.1.12 =
     128* Facebook API update
     129
    127130= 2.1.11 =
    128131* (premium) Disable on pages fix for some IDs
Note: See TracChangeset for help on using the changeset viewer.