WordPress.org

Making WordPress.org

Changeset 500


Ignore:
Timestamp:
04/05/2014 01:04:01 AM (6 years ago)
Author:
iandunn
Message:

Post Types: Make the schedule shortcode more mobile friendly.

props nvwd
fixes #353

Location:
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php

    r483 r500  
    2222        add_action( 'admin_print_styles', array( $this, 'admin_css' ) );
    2323        add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
     24        add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
    2425
    2526        add_action( 'save_post', array( $this, 'save_post_speaker' ), 10, 2 );
     
    190191        wp_enqueue_style( 'campicons', plugins_url( 'fonts/campicons.css', __FILE__ ), array(), 1 );
    191192    }
     193   
     194    function wp_enqueue_scripts() {
     195        wp_enqueue_style( 'wcb_shortcodes', plugins_url( 'css/shortcodes.css', __FILE__ ), array(), 1 );
     196    }
    192197
    193198    /**
     
    543548                // Determine the session title
    544549                if ( 'permalink' == $attr['session_link'] && 'session' == $session_type )
    545                     $session_title = sprintf( '<a class="wcpt-session-title" href="%s">%s</a>', esc_url( get_permalink( $session->ID ) ), $session_title );
     550                    $session_title_html = sprintf( '<a class="wcpt-session-title" href="%s">%s</a>', esc_url( get_permalink( $session->ID ) ), $session_title );
    546551                elseif ( 'anchor' == $attr['session_link'] && 'session' == $session_type )
    547                     $session_title = 'noop';
     552                    $session_title_html = 'noop';
    548553                else
    549                     $session_title = sprintf( '<span class="wcpt-session-title">%s</span>', $session_title );
    550 
    551                 $content = $session_title;
     554                    $session_title_html = sprintf( '<span class="wcpt-session-title">%s</span>', $session_title );
     555
     556                $content = $session_title_html;
    552557
    553558                $speakers_names = array();
     
    584589                }
    585590
    586                 $columns_html .= sprintf( '<td colspan="%d" class="%s">%s</td>', $colspan, esc_attr( implode( ' ', $classes ) ), $content );
     591                $columns_html .= sprintf( '<td colspan="%d" class="%s" data-track-title="%s">%s</td>', $colspan, esc_attr( implode( ' ', $classes ) ), $session_title, $content );
    587592            }
    588593
Note: See TracChangeset for help on using the changeset viewer.