admin_url( 'admin-ajax.php' ), 'template_directory' => get_bloginfo( 'template_directory' ) )); } public static function shortcode_author_profile ( $atts ) { global $post; // Scrub user id $user_id = isset( $atts['id'] ) ? $atts['id'] : $post->post_author; $user = get_user_by( 'id', $user_id ); $meta = get_user_meta( $user_id, '' ); // Start output buffering ob_start(); ?>

About data->display_name : $meta['app_author_name'][0] ; ?>

'avatar' ) ); else echo '
' . get_avatar( $user_id, 96 ) . '
'; ?>
post_type == 'post' ) || in_array( $post->post_type, $post_types ) ) return $content .= do_shortcode('[author-profile]'); return $content; } public static function admin_menu () { // Add menu page which allows the user to specify which post types to work with add_options_page( 'Author Profile Plus', 'Author Profile Plus', 'manage_options', 'author-profile-plus', array( __CLASS__, '_options_page' ) ); } public static function user_profile_fields ( $user ) { ?>

  Author Profile Plus


Name to display on author. If blank, will fall back to default Display Name

Author biography. If blank, will fall back to user biography if one exists
ID, 'app_author_avatar', true ) ): ?>

 Remove avatar



Author custom avatar. If not set, will fall back to WordPress user avatar

Author Facebook link

Author Twitter username (EG, "@birdbrainlogic")

Author Google Plus profile page

Author LinkedIn profile page

Post Navigator) public static function _options_page () { // Process form submission if there is one if( !empty( $_POST ) ) update_option( 'app_post_types', $_POST['post_types'] ); // Get all post types and filter by what the user has selected // Fallback to "post" and "page" types if no selection has been made yet $_post_types = get_post_types(); $post_types = get_option( 'app_post_types' ); if( empty( $post_types ) || !is_array( $post_types ) ) $post_types = array( 'post' ); // Render options in-line with WordPress core styling echo '
'; echo '

'; echo '

Author Profile Plus

'; echo '
'; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo '
'; echo ' Supported Post Types
choose which post types Author Profile Plus should work with'; echo '
'; foreach( $_post_types as $post_type_slug ) { $post_type = get_post_type_object( $post_type_slug ); if( $post_type->public == 1 ) echo '  ' . $post_type->labels->singular_name . '
'; } echo '
'; echo ' '; echo '
'; echo '
'; echo '
'; } } ?>