wp-social.php
| 1 | <?php |
| 2 | |
| 3 | defined('ABSPATH') || exit; |
| 4 | |
| 5 | /* |
| 6 | * Plugin Name: Wp Social |
| 7 | * Plugin URI: https://wpmet.com/ |
| 8 | * Description: Wp Social Login / Social Sharing / Social Counter System for Facebook, Google, Twitter, Linkedin, Dribble, Pinterest, Wordpress, Instagram, GitHub, Vkontakte, Reddit and more providers. |
| 9 | * Author: Wpmet |
| 10 | * Version: 1.4.4 |
| 11 | * Author URI: https://wpmet.com/ |
| 12 | * Text Domain: wp-social |
| 13 | * License: GPL2+ |
| 14 | * Domain Path: /languages/ |
| 15 | **/ |
| 16 | |
| 17 | define('WSLU_VERSION', '1.4.4'); |
| 18 | define('WSLU_VERSION_PREVIOUS_STABLE_VERSION', '1.4.3'); |
| 19 | |
| 20 | define("WSLU_LOGIN_PLUGIN", plugin_dir_path(__FILE__)); |
| 21 | define("WSLU_LOGIN_PLUGIN_URL", plugin_dir_url(__FILE__)); |
| 22 | |
| 23 | |
| 24 | require(WSLU_LOGIN_PLUGIN . 'autoload.php'); |
| 25 | |
| 26 | require_once plugin_dir_path( __FILE__ ) . '/lib/notice/notice.php'; |
| 27 | require_once plugin_dir_path( __FILE__ ) . '/lib/banner/init.php'; |
| 28 | |
| 29 | // init notice class |
| 30 | \Oxaim\Libs\Notice::init(); |
| 31 | |
| 32 | if( ! function_exists('xs_social_plugin_activate')) : |
| 33 | function xs_social_plugin_activate() { |
| 34 | $counter = New \WP_Social\Inc\Counter(false); |
| 35 | $counter->xs_counter_defalut_providers(); |
| 36 | } |
| 37 | |
| 38 | // custom function added |
| 39 | if(file_exists(WSLU_LOGIN_PLUGIN . 'inc/custom-function.php')) { |
| 40 | include(WSLU_LOGIN_PLUGIN . 'inc/custom-function.php'); |
| 41 | } |
| 42 | endif; |
| 43 | |
| 44 | |
| 45 | function xs_social_plugin_deactivate() { |
| 46 | |
| 47 | } |
| 48 | |
| 49 | register_activation_hook(__FILE__, 'xs_social_plugin_activate'); |
| 50 | register_deactivation_hook( __FILE__, 'xs_social_plugin_deactivate' ); |
| 51 | |
| 52 | |
| 53 | |
| 54 | if( ! function_exists('wslu_social_init')) : |
| 55 | |
| 56 | function wslu_social_init() { |
| 57 | |
| 58 | add_action( 'init', 'i18n' ); |
| 59 | |
| 60 | \WP_Social\Inc\Elementor\Elements::instance()->_init(); |
| 61 | |
| 62 | \WP_Social\App\API_Routes::instance()->init(); |
| 63 | |
| 64 | new \WP_Social\Inc\Admin_Settings(); |
| 65 | new \WP_Social\Inc\Counter(); |
| 66 | new \WP_Social\Inc\Share(); |
| 67 | |
| 68 | \WP_Social\Inc\Login::instance()->init(); |
| 69 | \WP_Social\App\Avatar::instance()->init(); |
| 70 | |
| 71 | \Wpmet\Libs\Pro_Awareness\Init::init(); |
| 72 | |
| 73 | \Wpmet\Libs\Pro_Awareness\Init::instance('wp-social') |
| 74 | ->set_parent_menu_slug('wslu_global_setting') |
| 75 | ->set_pro_link('https://wpmet.com/plugin/wp-social/?utm_source=wp_social&utm_medium=inplugin_campaign&utm_campaign=go_pro') |
| 76 | ->set_grid([ |
| 77 | 'url' => 'https://facebook.com', |
| 78 | 'title' => 'Our facebook group', |
| 79 | 'thumbnail' => 'https://template.canva.com/EADakGvFucI/2/0/400w-TuiRIruBKbM.jpg', |
| 80 | 'description' => 'You will get the latest information regarding our release, bug fixing etc etc.' |
| 81 | ]) |
| 82 | ->set_default_grid_thumbnail('https://c8.alamy.com/comp/2AKYFRB/tech-support-word-concepts-banner-customer-service-technical-support-free-chatbot-problem-fixing-isolated-lettering-typography-idea-with-linear-i-2AKYFRB.jpg') |
| 83 | ->set_default_grid_desc('Get prioritize help from our support engineer') |
| 84 | ->call(); |
| 85 | |
| 86 | add_action( 'widgets_init', '\WP_Social\Inc\Counter_Widget::register' ); |
| 87 | add_action( 'widgets_init', '\WP_Social\Inc\Share_Widget::register' ); |
| 88 | add_action( 'widgets_init', '\WP_Social\Inc\Login_widget::register' ); |
| 89 | |
| 90 | do_action('wslu_social/plugin_loaded'); |
| 91 | |
| 92 | // banner |
| 93 | add_action('admin_head', function() { |
| 94 | |
| 95 | \Wpmet\Libs\Banner\Init::instance() |
| 96 | ->set_text_domain('wp-social') |
| 97 | // ->is_test(true) |
| 98 | ->set_api_url('https://api.wpmet.com/public/jhanda/index.php') |
| 99 | ->set_plugin_screens('toplevel_page_wslu_global_setting') |
| 100 | ->set_plugin_screens('wp-social_page_wslu_share_setting') |
| 101 | ->set_plugin_screens('wp-social_page_wslu_counter_setting') |
| 102 | ->call(); |
| 103 | }); |
| 104 | } |
| 105 | |
| 106 | add_action('plugins_loaded', 'wslu_social_init', 118); |
| 107 | |
| 108 | endif; |
| 109 | |
| 110 | |
| 111 | if(!function_exists('i18n')) { |
| 112 | |
| 113 | function i18n() { |
| 114 | load_plugin_textdomain('wp-social', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/'); |
| 115 | } |
| 116 | } |
| 117 | |
| 118 |