'' . __('Settings', 'General') . ''); $author_pro_link = array('Get Pro' => 'Go Pro'); $links = array_merge($author_settings_link, $links); $links = array_merge($author_pro_link, $links); } return $links; } add_filter( 'plugin_action_links', 'author_settings_link', 10, 5 ); class About_Author_Shorcode_And_Widget { public function __construct() { if (is_admin()) { add_action('init', array(&$this, 'AboutmeShortcode')); add_action('add_meta_boxes', array(&$this, 'Add_all_About_m_e_meta_boxes'),1); add_action('admin_enqueue_scripts', array(&$this,'my_about_me_style_files'),1); add_action('about_me_save_post', array(&$this, 'About_me_Save_Settings'),1); add_action('save_post', array(&$this, 'Abt_Save_fag_meta_box_save'), 9, 1); } } public function my_about_me_style_files($hook) { if ( $hook != 'edit.php' && $hook != 'post.php' && $hook != 'post-new.php') { return; } wp_enqueue_script( 'jquery' ); wp_enqueue_script('theme-preview'); wp_enqueue_script('media-upload'); wp_enqueue_script('thickbox'); wp_enqueue_script('upload_media_widget', WEBLIZAR_ABOUT_ME_PLUGIN_URL .'js/upload-media.js', array('jquery')); wp_enqueue_style('thickbox'); wp_enqueue_style( 'wp-color-picker' ); wp_enqueue_script( 'wp-color-picker' ); // code-mirror css & js for custom css section wp_enqueue_style('author_codemirror-css', WEBLIZAR_ABOUT_ME_PLUGIN_URL.'css/codemirror/codemirror.css'); wp_enqueue_style('author_blackboard', WEBLIZAR_ABOUT_ME_PLUGIN_URL.'css/codemirror/blackboard.css'); wp_enqueue_style('author_show-hint-css', WEBLIZAR_ABOUT_ME_PLUGIN_URL.'css/codemirror/show-hint.css'); wp_enqueue_script('author_codemirror-js',WEBLIZAR_ABOUT_ME_PLUGIN_URL.'css/codemirror/codemirror.js',array('jquery')); wp_enqueue_script('author_css-js',WEBLIZAR_ABOUT_ME_PLUGIN_URL.'css/codemirror/aa-css.js',array('jquery')); wp_enqueue_script('author_css-hint-js',WEBLIZAR_ABOUT_ME_PLUGIN_URL.'css/codemirror/css-hint.js',array('jquery')); } // Register Custom Post Type public function AboutmeShortcode() { $labels = array ( 'name' => 'About Author', 'singular_name' => 'About Author', 'menu_name' => 'About Author', 'add_new' => 'Add New', 'add_new_item' => 'Add New', 'edit_item' =>'Edit About Author', 'new_item' => 'New About Author', 'view_item' => 'View About Author', 'search_items' => 'Search About Author', 'not_found' => 'No About Author Shortcode Found', 'not_found_in_trash' => 'No About Author Shortcode in Trash', 'parent_item_colon' => 'Parent About Author:', 'all_items' => 'All Shortcodes', ); $args = array( 'labels' => $labels, 'hierarchical' => false, 'supports' => array( 'title'), 'public' => false, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 65, 'menu_icon' => 'dashicons-id', 'show_in_nav_menus' => false, 'publicly_queryable' => false, 'exclude_from_search' => true, 'has_archive' => true, 'query_var' => true, 'can_export' => true, 'rewrite' => false, 'capability_type' =>'post' ); register_post_type( 'about_author', $args ); add_filter( 'manage_edit-about_author_columns', array(&$this, 'about_author_columns' )) ; add_action( 'manage_about_author_posts_custom_column', array(&$this, 'about_author_manage_columns' ), 10, 2 ); } function about_author_columns( $columns ){ $columns = array( 'cb' => '', 'title' => __( 'About Author' ), 'shortcode' => __( 'About Author Shortcode' ), 'date' => __( 'Date' ) ); return $columns; } function about_author_manage_columns( $column, $post_id ){ global $post; switch( $column ) { case 'shortcode' : echo ''; break; default : break; } } //add metaboxes public function Add_all_About_m_e_meta_boxes() { add_meta_box( __(' Add Images', 'WL_ABTM_TXT_DM'), __('Select Template', 'WL_ABTM_TXT_DM'), array(&$this, 'about_me_meta_box_setting_function'), 'about_author', 'normal', 'low' ); add_meta_box ( __('Add Settings', 'WL_ABTM_TXT_DM'), __('Add settings', 'WL_ABTM_TXT_DM'), array(&$this, 'me_meta_box_setting_function'), 'about_author', 'normal', 'low'); add_meta_box ( __('Copy Shortcode', 'WL_ABTM_TXT_DM'), __('Copy Shortcode', 'WL_ABTM_TXT_DM'), array(&$this, 'ABTM_shotcode_meta_box_function'), 'about_author', 'side', 'low'); add_meta_box(__('UpgradetoAboutAuthorPro','WL_ABTM_TXT_DM') , __('About Author Pro', 'WL_ABTM_TXT_DM'), array(&$this,'abtm_about_author_pro_meta_box'), 'about_author', 'side', 'low'); add_meta_box ( __('Preview Shortcode', 'WL_ABTM_TXT_DM'), __('Preview Shortcode', 'WL_ABTM_TXT_DM'), array(&$this, 'ab_preview_box'), 'about_author', 'side', 'low'); add_meta_box(__('Activate About Author Widget','WL_ABTM_TXT_DM') , __('Activate About Author Widget', 'WL_ABTM_TXT_DM'), array(&$this,'abtm_use_widget_meta_box'), 'about_author', 'side', 'low'); } //add setting page of general settings public function about_me_meta_box_setting_function($post) { require("settings/template-settings.php"); } public function me_meta_box_setting_function($post) { require("settings/general-settings.php"); } //display short code on custom post type page public function ABTM_shotcode_meta_box_function() { ?>

">

Click here to preview

'; $ABT=$_REQUEST['post']; echo ' '; } else { echo "

Please save first to check preview.

"; } } public function abtm_use_widget_meta_box() { ?>

About Author Widget

Buy Now $15
Buy Now $15
$About_me_bg_color, 'About_me_user_name' => $About_me_user_name, 'About_me_web_site_name' => $About_me_web_site_name, 'About_me_dis_cription' => $About_me_dis_cription, 'followfb' => $followfb, 'followgoogle' => $followgoogle, 'followinsta' => $followinsta, 'followlinkdln' =>$followlinkdln, 'followpint' =>$followpint, 'followtwit' =>$followtwit, 'bodr' =>$bodr, 'img_bdr_type' =>$img_bdr_type, 'bdr_size' =>$bdr_size, 'img_bdr_color' =>$img_bdr_color, 'name_font_size' =>$name_font_size, 'name_Color' =>$name_Color, 'weblink_font_size' =>$weblink_font_size, 'weblink_text_color' =>$weblink_text_color, 'dis_font_size' =>$dis_font_size, 'dis_text_color' =>$dis_text_color, 'PGPP_Font_Style' =>$PGPP_Font_Style, 'profile_user_image' =>$profile_user_image, 'user_header_image' =>$user_header_image, 'About_me_social_color' =>$About_me_social_color, 'About_me_custom_css' =>$About_me_custom_css, 'Tem_pl_at_e' =>$Tem_pl_at_e, 'Social_icon_size' =>$Social_icon_size, ); $abt_Settings = "abt_Settings_".$PostID; update_post_meta($PostID, $abt_Settings, serialize($ABTArray)); } } } // end of class //create object of About_Author_Shorcode_And_Widget class global $About_Author_Shorcode_And_Widget; $About_Author_Shorcode_And_Widget = new About_Author_Shorcode_And_Widget(); //include short code file require_once("about-author-use-shortcode.php"); // include widget code file require_once("about-author-widget-code.php"); add_action('media_buttons_context', 'aa_add_rpg_custom_button'); add_action('admin_footer', 'aa_add_rpg_inline_popup_content'); //add media button fuction function aa_add_rpg_custom_button($context) { $container_id = 'AMSA'; $title = __('Select About Author Shortcode to insert with content','WL_ABTM_TXT_DM') ; $context = ' '. __("About Author Shortcode And Widget","'WL_ABTM_TXT_DM'").' '; return $context; } function aa_add_rpg_inline_popup_content() { ?>

sanitize_text_field($_POST['followfb']), 'followgoogle' =>sanitize_text_field($_POST['followgoogle']), 'followinsta' =>sanitize_text_field($_POST['followinsta']), 'followlinkdln' =>sanitize_text_field($_POST['followlinkdln']), 'followtwit' =>sanitize_text_field($_POST['followtwit']), 'followpint' =>sanitize_text_field($_POST['followpint']), ); foreach($metas as $key => $value) { update_user_meta( $user_id, $key, $value ); } } add_action( 'show_user_profile', 'fb_add_custom_user_profile_fields' ); add_action( 'edit_user_profile', 'fb_add_custom_user_profile_fields' ); add_action( 'personal_options_update', 'fb_save_custom_user_profile_fields' ); add_action( 'edit_user_profile_update', 'fb_save_custom_user_profile_fields' ); function load_author_info_after_page_content($content) { if (!is_single() && get_post_type( $post = get_post() ) == "page") { $ABio_settings = unserialize(get_option('author_info_Settings')); $use_page=$ABio_settings[0]['Author_short_code']; $switch_off_page = $ABio_settings[0]['switch_off_page']; if($switch_off_page=='yes') { if($use_page) { $content .= do_shortcode( '[ABINFO id='. $use_page.']' ); } } } return $content; } add_filter( "the_content", "load_author_info_after_page_content", 20 ); function load_author_info_after_post_content($content){ if (is_single() && get_post_type( $post = get_post() ) == "post") { $ABio_settings = unserialize(get_option('author_info_Settings')); $use_page=$ABio_settings[0]['Author_short_code']; $switch_off_post = $ABio_settings[0]['switch_off_post']; if($switch_off_post=='yes') { if($use_page) { $content .= do_shortcode( '[ABINFO id='. $use_page.']' ); } } } return $content; } add_filter( "the_content", "load_author_info_after_post_content", 20); require_once("author-setting/about-author-use-shortcode2.php"); // Review Notice Box add_action( "admin_notices", "review_admin_notice_aatp_free" ); function review_admin_notice_aatp_free() { global $pagenow; $aatp_screen = get_current_screen(); if ( $pagenow == 'edit.php' && $aatp_screen->post_type == "about_author" ) { include( 'aatp-banner.php' ); } } ?>