Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Requires (pulls in) the initializing functions of Dynamik
- * which are found in the /lib/init.php file.
- *
- * @package Dynamik
- */
- /**
- * Include Genesis theme files
- */
- require_once( get_template_directory() . '/lib/init.php' );
- /**
- * Include Dynamik theme files
- */
- require_once( get_stylesheet_directory() . '/lib/init.php' );
- add_action( 'admin_bar_menu', 'wp_admin_bar_my_custom_account_menu', 11 );
- function wp_admin_bar_my_custom_account_menu( $wp_admin_bar ) {
- $user_id = get_current_user_id();
- $current_user = wp_get_current_user();
- $profile_url = get_edit_profile_url( $user_id );
- if ( 0 != $user_id ) {
- /* Add the "My Account" menu */
- $avatar = get_avatar( $user_id, 28 );
- $howdy = sprintf( __('Welkom, %1$s u kunt hier uitloggen'), $current_user->display_name );
- $class = empty( $avatar ) ? '' : 'with-avatar';
- $wp_admin_bar->add_menu( array(
- 'id' => 'my-account',
- 'parent' => 'top-secondary',
- 'title' => $howdy . $avatar,
- 'href' => $profile_url,
- 'meta' => array(
- 'class' => $class,
- ),
- ) );
- }
- }
- add_filter ('the_content', 'my_remove_event_datetimes', 100 );
- // remove datetimes
- function my_remove_event_datetimes( $content ) {
- if ( 'espresso_events' == get_post_type() && is_singular() && !post_password_required() ) {
- remove_filter( 'the_content', array( 'EED_Event_Single', 'event_datetimes' ), 110 );
- add_filter( 'the_content', 'my_add_event_datetimes', 122);
- }
- return $content;
- }
- // add datetimes after the tickets
- function my_add_event_datetimes( $content ) {
- return $content . EEH_Template::locate_template( 'content-espresso_events-datetimes.php' );
- }
- add_filter ('the_content', 'my_remove_event_tickets', 100 );
- // remove tickets
- function my_remove_event_tickets( $content ) {
- if ( 'espresso_events' == get_post_type() && is_singular() && !post_password_required() ) {
- remove_filter( 'the_content', array( 'EED_Event_Single', 'event_tickets' ), 120 );
- add_filter( 'the_content', 'my_add_event_tickets', 121);
- }
- return $content;
- }
- // add tickets after the content
- function my_add_event_tickets( $content ) {
- return $content . EEH_Template::locate_template( 'content-espresso_events-tickets.php' );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement