'; $author_box .= '
'; // Add avatar here $author_box .= ''; // Close author-details $author_box .= ''; // Close about-post-author-section // Append the author box to the post content return $content . $author_box; } // Return original content if not a single post return $content; } // Hook the author box to the content add_filter( 'the_content', 'about_post_author_main' ); // Enqueue public style function about_post_author_style_enqueue() { // wp_enqueue_style( 'about-post-author-styles', plugins_url( 'assets/css/about-post-author-styles.css', __FILE__ ) ); } add_action( 'wp_enqueue_scripts', 'about_post_author_style_enqueue' ); // Enqueue admin styles and scripts function about_post_author_admin_enqueue() { wp_enqueue_style( 'about-post-author-admin-styles', plugins_url( 'assets/css/admin-styles.css', __FILE__ ) ); wp_enqueue_script( 'about-post-author-admin-script', plugins_url( 'assets/js/admin-script.js', __FILE__ ), array( 'jquery' ), false, true ); } add_action( 'admin_enqueue_scripts', 'about_post_author_admin_enqueue' ); // Enqueue frontend styles function enqueue_about_post_author_styles() { if ( is_single() && is_singular( 'post' ) ) { wp_enqueue_style( 'about-post-author-frontend', plugin_dir_url( __FILE__ ) . 'assets/css/author-box.css', array(), '1.0', 'all' ); } } add_action( 'wp_enqueue_scripts', 'enqueue_about_post_author_styles' ); // Add settings menu page with modern design function about_post_author_option_page() { add_menu_page( __( 'About Post Author Settings', 'about-post-author' ), __( 'About Post Author', 'about-post-author' ), 'manage_options', 'about-post-author', 'about_post_author_settings_page', 'dashicons-admin-users', 101 ); } add_action( 'admin_menu', 'about_post_author_option_page' ); // Render settings page with tabs and live preview function about_post_author_settings_page() { ?>