AnsPress_Theme::ap_before_html_body()
Description #
Add default before body sidebar in AnsPress contents
Source #
File: includes/class-theme.php
public static function ap_before_html_body() { if ( is_user_logged_in() ) { $current_user = wp_get_current_user(); $data = array( 'user_login' => $current_user->data->user_login, 'display_name' => $current_user->data->display_name, 'user_email' => $current_user->data->user_email, 'avatar' => get_avatar( $current_user->ID ), ); ?> <script type="text/javascript"> apCurrentUser = <?php echo wp_json_encode( $data ); ?>; </script> <?php } dynamic_sidebar( 'ap-before' ); }
Expand full source code Collapse full source code View on GitHub: includes/class-theme.php:190
Add your comment