Changeset 3791 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php
- Timestamp:
- 08/09/2016 06:58:20 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php
r3570 r3791 35 35 36 36 <div class="plugin-actions"> 37 38 37 <?php 39 if ( false && is_user_logged_in() ) { // Hide Favorites until it's styled properly.38 if ( is_user_logged_in() ) : 40 39 $url = Template::get_favourite_link( $post ); 41 echo '<a href="' . esc_url( $url ) . '" class="plugin-favorite-heart' . (Tools::favorited_plugin( $post ) ? ' favorited' : '' ) . '" onclick="jQuery(this).toggleClass(\'favorited\')"></a>'; 42 } 43 ?> 40 ?> 41 <div class="plugin-favorite"> 42 <a href="<?php echo esc_url( $url ); ?>" class="plugin-favorite-heart<?php echo Tools::favorited_plugin( $post ) ? ' favorited' : ''; ?>"></a> 43 <script> 44 jQuery( '.plugin-favorite-heart' ) 45 .on( 'click touchstart animationend', function() { 46 jQuery( this ).toggleClass( 'is-animating' ); 47 } ) 48 .on( 'click', function() { 49 jQuery( this ).toggleClass( 'favorited' ); 50 } ); 51 </script> 52 </div> 53 <?php endif; ?> 44 54 45 55 <a class="plugin-download button download-button button-large" href="<?php echo esc_url( Template::download_link() ); ?>" itemprop="downloadUrl"><?php _e( 'Download', 'wporg-plugins' ); ?></a>
Note: See TracChangeset
for help on using the changeset viewer.