*/ class Add_Social_Share_Buttons_Plugin_Admin { /** * The ID of this plugin. * * @since 1.0.0 * @access private * @var string $plugin_name The ID of this plugin. */ private $plugin_name; /** * The version of this plugin. * * @since 1.0.0 * @access private * @var string $version The current version of this plugin. */ private $version; /** * Initialize the class and set its properties. * * @since 1.0.0 * @param string $plugin_name The name of this plugin. * @param string $version The version of this plugin. */ public function __construct( $plugin_name, $version ) { $this->plugin_name = $plugin_name; $this->version = $version; } /** * Register the stylesheets for the admin area. * * @since 1.0.0 */ public function enqueue_styles() { /** * This function is provided for demonstration purposes only. * * An instance of this class should be passed to the run() function * defined in Add_Social_Share_Buttons_Plugin_Loader as all of the hooks are defined * in that particular class. * * The Add_Social_Share_Buttons_Plugin_Loader will then create the relationship * between the defined hooks and the functions defined in this * class. */ wp_enqueue_style( 'add-social-share-buttons-plugin-admin', plugin_dir_url( __FILE__ ) . 'css/add-social-share-buttons-plugin-admin.css', array('wp-jquery-ui-dialog'), $this->version, 'all' ); wp_enqueue_style( 'chosen-css', plugin_dir_url( __FILE__ ) . 'css/chosen.css', array(), $this->version, 'all' ); } /** * Register the JavaScript for the admin area. * * @since 1.0.0 */ public function enqueue_scripts() { /** * This function is provided for demonstration purposes only. * * An instance of this class should be passed to the run() function * defined in Add_Social_Share_Buttons_Plugin_Loader as all of the hooks are defined * in that particular class. * * The Add_Social_Share_Buttons_Plugin_Loader will then create the relationship * between the defined hooks and the functions defined in this * class. */ wp_enqueue_script( 'jquery-ui-sortable' ); wp_enqueue_script( 'add-social-share-buttons-plugin-admin', plugin_dir_url( __FILE__ ) . 'js/add-social-share-buttons-plugin-admin.js', array( 'jquery','jquery-ui-dialog' ), $this->version, false ); wp_enqueue_script( 'jquery-validate-min', plugin_dir_url( __FILE__ ) . 'js/jquery.validate.min.js', $this->version, false ); wp_enqueue_script( 'chosen-jquery-js', plugin_dir_url( __FILE__ ) . 'js/chosen.jquery.js', '4.5.2'); } /** * add plugin main menu in admin menu * */ public function whatsapp_sharing_custom_menu() { //add admin main Crea plugins menu add_submenu_page('options-general.php',ADSSB_PLUGIN_PAGE_MENU_TITLE,__(ADSSB_PLUGIN_NAME, ADSSB_PLUGIN_SLUG),'manage_options',ADSSB_PLUGIN_PAGE_MENU_SLUG,'custom_whatsapp_sharing_setting_html'); /** * function for plugin admin menu callback html function */ function custom_whatsapp_sharing_setting_html() { global $wpdb; $current_user = wp_get_current_user(); if (!get_option('assb_plugin_notice_shown')) { echo '

Subscribe for latest plugin update and get notified when we update our plugin and launch new products for free!

'; } //get settings option $get_share_settings = get_option( ADSSB_PLUGIN_GLOBAL_SETTING_KEY ); $get_share_settings = maybe_unserialize( $get_share_settings ); $get_services = get_option( ADSSB_PLUGIN_ADD_SOCIAL_BUTTIN_KEY ); $get_services = maybe_unserialize( $get_services ); $sharesmallimagearray = array(); $sharesmallimagearray['Whatsapp'] = ASSB_PATH.'/images/whatsapp_small.png'; $sharesmallimagearray['Viber'] = ASSB_PATH.'/images/viber_small.png'; $sharesmallimagearray['Facebook'] = ASSB_PATH.'/images/facebook_small.png'; $sharesmallimagearray['Twitter'] = ASSB_PATH.'/images/twitter_small.png'; $sharesmallimagearray['Google_plus'] = ASSB_PATH.'/images/googleplus_small.png'; $sharesmallimagearray['Linkedin'] = ASSB_PATH.'/images/linkedin_small.png'; $sharemediumimagearray = array(); $sharemediumimagearray['Whatsapp'] = ASSB_PATH.'/images/whatsapp_medium.png'; $sharemediumimagearray['Viber'] = ASSB_PATH.'/images/viber_medium.png'; $sharemediumimagearray['Facebook'] = ASSB_PATH.'/images/facebook_medium.png'; $sharemediumimagearray['Twitter'] = ASSB_PATH.'/images/twitter_medium.png'; $sharemediumimagearray['Google_plus'] = ASSB_PATH.'/images/googleplus_medium.png'; $sharemediumimagearray['Linkedin'] = ASSB_PATH.'/images/linkedin_medium.png'; $sharelargeagearray = array(); $sharelargeagearray['Whatsapp'] = ASSB_PATH.'/images/whatsapp_large.png'; $sharelargeagearray['Viber'] = ASSB_PATH.'/images/viber_large.png'; $sharelargeagearray['Facebook'] = ASSB_PATH.'/images/facebook_large.png'; $sharelargeagearray['Twitter'] = ASSB_PATH.'/images/twitter_large.png'; $sharelargeagearray['Google_plus'] = ASSB_PATH.'/images/googleplus_large.png'; $sharelargeagearray['Linkedin'] = ASSB_PATH.'/images/linkedin_large.png'; ?>

1 ) { ?>
$values ) { if( $get_share_settings['share_button_size'] !='' && !empty($get_share_settings['share_button_size'] ) ) { if( $get_share_settings['share_button_size'] == 'small' ) { ?><?php echo $values; ?><?php echo $values; ?><?php echo $values; ?><?php echo $values; ?>
'; if (isset($post_types) && !empty($post_types)) { foreach ($post_types as $cpost) { if($cpost != "attachment" && $cpost != "revision" && $cpost != "nav_menu_item" && $cpost != "product_variation" && $cpost != "shop_order" && $cpost != "shop_order_refund" && $cpost != "shop_coupon" && $cpost != "shop_webhook" && $cpost != "scheduled-action" && $cpost != "shop_subscription"&& $cpost != "wpcf7_contact_form"&& $cpost != "mc4wp-form") { if( $get_share_settings['share_posttype'] !='' && !empty($get_share_settings['share_posttype'] ) ) { if( in_array($cpost, $get_share_settings['share_posttype']) ) { $html .=''; } else{ $html .=''; } } else{ $html .=''; } } } } $html .='( '. __( ADSSB_PLUGIN_POSTTYPE_NOTE, ADSSB_PLUGIN_SLUG ) .' )'; echo $html; ?>
( )
type="checkbox" name="include_listing_page" value="1" >

'POST', 'timeout' => 45, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => true, 'headers' => array(), 'body' => array('user'=>array('user_email'=>$email_id,'plugin_site' => $log_url,'status' => 1,'plugin_id' => '24','activation_date'=>$cur_date)), 'cookies' => array())); update_option('assb_plugin_notice_shown', 'true'); } public function hide_subscribe_assbfn() { $email_id= $_POST['email_id']; update_option('assb_plugin_notice_shown', 'true'); } }