'' . esc_html__('Settings', 'General', 'WEBLIZAR_ABOUT_DOMAIN') . ''); $author_pro_link = array('Get Pro' => 'Get Premium'); $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, 'Weblizar_Save_fag_meta_box_save'), 9, 1); } } public function my_about_me_style_files($hook) { if ($hook != 'post.php' && $hook != 'post-new.php') { return; } wp_enqueue_script('jquery'); wp_register_script('popper', WEBLIZAR_ABOUT_ME_PLUGIN_URL . 'js/popper.min.js', array('jquery')); wp_enqueue_script('popper'); wp_register_script('bootstrap', WEBLIZAR_ABOUT_ME_PLUGIN_URL . 'js/bootstrap.min.js', array('jquery')); wp_enqueue_script('bootstrap'); 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('font-awesome', WEBLIZAR_ABOUT_ME_PLUGIN_URL . 'css/all.min.css'); wp_enqueue_style('author_codemirror-css', WEBLIZAR_ABOUT_ME_PLUGIN_URL . 'css/codemirror/codemirror.css'); wp_register_style('author_blackboard', WEBLIZAR_ABOUT_ME_PLUGIN_URL . 'css/codemirror/blackboard.css'); wp_enqueue_style('author_blackboard'); wp_register_style('author_show-hint-css', WEBLIZAR_ABOUT_ME_PLUGIN_URL . 'css/codemirror/show-hint.css'); wp_enqueue_style('author_show-hint-css'); wp_enqueue_style('bootstrap', WEBLIZAR_ABOUT_ME_PLUGIN_URL . 'css/bootstrap.min.css'); wp_register_script('author_codemirror-js', WEBLIZAR_ABOUT_ME_PLUGIN_URL . 'css/codemirror/codemirror.js', array('jquery')); wp_enqueue_script('author_codemirror-js'); wp_register_script('author_css-js', WEBLIZAR_ABOUT_ME_PLUGIN_URL . 'css/codemirror/aa-css.js', array('jquery')); wp_enqueue_script('author_css-js'); wp_register_script('author_css-hint-js', WEBLIZAR_ABOUT_ME_PLUGIN_URL . 'css/codemirror/css-hint.js', array('jquery')); wp_enqueue_script('author_css-hint-js'); } // Register Custom Post Type public function AboutmeShortcode() { $labels = array( 'name' => esc_html_x( 'About Author', 'Taxonomy General Name', WEBLIZAR_ABOUT_DOMAIN ), 'singular_name' => esc_html_x( 'About Author', 'Post Type Singular Name', WEBLIZAR_ABOUT_DOMAIN ), 'menu_name' => esc_html__( 'About Author', WEBLIZAR_ABOUT_DOMAIN ), 'add_new' => esc_html__( 'Add New', WEBLIZAR_ABOUT_DOMAIN ), 'add_new_item' => esc_html__( 'Add New', WEBLIZAR_ABOUT_DOMAIN ), 'edit_item' => esc_html__( 'Edit About Author', WEBLIZAR_ABOUT_DOMAIN ), 'new_item' => esc_html__( 'New About Author', WEBLIZAR_ABOUT_DOMAIN ), 'view_item' => esc_html__( 'View About Author', WEBLIZAR_ABOUT_DOMAIN ), 'search_items' => esc_html__( 'Search About Author', WEBLIZAR_ABOUT_DOMAIN ), 'not_found' => esc_html__( 'No About Author Shortcode Found', WEBLIZAR_ABOUT_DOMAIN ), 'not_found_in_trash' => esc_html__( 'No About Author Shortcode in Trash', WEBLIZAR_ABOUT_DOMAIN ), 'parent_item_colon' => esc_html__( 'Parent About Author:', WEBLIZAR_ABOUT_DOMAIN ), 'all_items' => esc_html__( 'All Shortcodes', WEBLIZAR_ABOUT_DOMAIN ), ); $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' => esc_html__('About Author', 'WEBLIZAR_ABOUT_DOMAIN'), 'shortcode' => esc_html__('About Author Shortcode', 'WEBLIZAR_ABOUT_DOMAIN'), 'author' => esc_html__('Author', 'WEBLIZAR_ABOUT_DOMAIN'), 'date' => esc_html__('Date', 'WEBLIZAR_ABOUT_DOMAIN') ); 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(esc_html__(' Add Images', 'WEBLIZAR_ABOUT_DOMAIN'), esc_html__('Select Template', 'WEBLIZAR_ABOUT_DOMAIN'), array(&$this, 'about_me_meta_box_setting_function'), 'about_author', 'normal', 'low'); add_meta_box(esc_html__('Add Settings', 'WEBLIZAR_ABOUT_DOMAIN'), esc_html__('Add settings', 'WEBLIZAR_ABOUT_DOMAIN'), array(&$this, 'me_meta_box_setting_function'), 'about_author', 'normal', 'low'); add_meta_box(esc_html__('Copy Shortcode', 'WEBLIZAR_ABOUT_DOMAIN'), esc_html__('Copy Shortcode', 'WEBLIZAR_ABOUT_DOMAIN'), array(&$this, 'Weblizar_shotcode_meta_box_function'), 'about_author', 'side', 'low'); add_meta_box(esc_html__('UpgradetoAboutAuthorPro', 'WEBLIZAR_ABOUT_DOMAIN'), esc_html__('About Author Pro', 'WEBLIZAR_ABOUT_DOMAIN'), array(&$this, 'weblizar_about_author_pro_meta_box'), 'about_author', 'side', 'low'); add_meta_box(esc_html__('Preview Shortcode', 'WEBLIZAR_ABOUT_DOMAIN'), esc_html__('Preview Shortcode', 'WEBLIZAR_ABOUT_DOMAIN'), array(&$this, 'ab_preview_box'), 'about_author', 'side', 'low'); add_meta_box(esc_html__('Activate About Author Widget', 'WEBLIZAR_ABOUT_DOMAIN'), esc_html__('Activate About Author Widget', 'WEBLIZAR_ABOUT_DOMAIN'), array(&$this, 'weblizar_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 Weblizar_shotcode_meta_box_function() { ?>

">

' . esc_html_e('Click here to preview', 'WEBLIZAR_ABOUT_DOMAIN') . '

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

" . esc_html_e("Please save first to check preview.", 'WEBLIZAR_ABOUT_DOMAIN') . "

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

$About_me_bg_color, 'About_me_user_name' => $About_me_user_name, 'About_me_web_site_name' => $About_me_web_site_name, 'About_me_web_site_url' => $About_me_web_site_url, 'About_me_dis_cription' => $About_me_dis_cription, 'followfb' => $followfb, '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, ); $weblizar_Settings = "weblizar_Settings_" . $PostID; update_post_meta($PostID, $weblizar_Settings, serialize($WeblizarArray)); } } } // 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', '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 = null; $container_id = 'AMSA'; $title = 'About Author'; $context .= ' About Author'; printf($context); } function aa_add_rpg_inline_popup_content() { ?> jQuery(document).ready(function() { jQuery('#Ab_tm_insert').on('click', function() { var id = jQuery('#Ab_Tm_ME option:selected').val(); window.send_to_editor('

[Weblizar id=' + id + ']

'); tb_remove(); }) });

esc_url_raw($_POST['followfb']), 'followinsta' => esc_url_raw($_POST['followinsta']), 'followlinkdln' => esc_url_raw($_POST['followlinkdln']), 'followtwit' => esc_url_raw($_POST['followtwit']), 'followpint' => esc_url_raw($_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") { $Weblizar_io_settings = unserialize(get_option('author_info_Settings')); if ( empty( $Weblizar_io_settings) ) return "Author Settings Not Found"; $use_page = isset($Weblizar_io_settings[0]['Author_short_code']) ? $Weblizar_io_settings[0]['Author_short_code'] :null; $switch_off_page = isset($Weblizar_io_settings[0]['switch_off_page'])?$Weblizar_io_settings[0]['switch_off_page']:'no'; 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") { $Weblizar_io_settings = unserialize(get_option('author_info_Settings')); if(isset($Weblizar_io_settings[0]['Author_short_code'])){ $use_page = $Weblizar_io_settings[0]['Author_short_code']; $switch_off_post = $Weblizar_io_settings[0]['switch_off_post']; }else{ $use_page = ""; $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"); ?>