WordPress.org

Making WordPress.org

Changeset 8449


Ignore:
Timestamp:
03/11/2019 11:49:21 PM (9 months ago)
Author:
coffee2code
Message:

Browse Happy: Remove Facebook 'like' buttons for browsers.

Also renames 'browsehappy_like_button' action to 'browsehappy_browser_after'.

Fixes #3732.

Location:
sites/trunk/browsehappy.com/public_html
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/browsehappy.com/public_html/functions.php

    r7711 r8449  
    199199    foreach ( $browsers as $browser )
    200200        delete_transient( 'browsehappy_version_' . $browser );
    201 }
    202 
    203 add_action( 'browsehappy_like_button', 'browsehappy_like_button' );
    204 
    205 function browsehappy_like_button( $browser ) {
    206     $facebook_page = browsehappy_get_browser_data( $browser )->facebook;
    207     if ( false === $facebook_page ) {
    208         echo '<p class="likebutton"></p>';
    209         return;
    210     }
    211 
    212 ?>
    213 <p class="likebutton"><iframe src="https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2F<?php echo $facebook_page; ?>&amp;layout=button_count&amp;show_faces=false&amp;width=172&amp;action=like&amp;font=lucida+grande&amp;colorscheme=light&amp;height=20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:172px; height:20px;"></iframe></p>
    214 <?php
    215201}
    216202
  • sites/trunk/browsehappy.com/public_html/index.php

    r8448 r8449  
    1515    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    1616
    17     <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/style.css?8" />
     17    <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/style.css?9" />
    1818    <script src="<?php echo get_template_directory_uri(); ?>/js/modernizr-1.6.min.js"></script>
    1919    <script src="https://use.typekit.com/lsw6yis.js"></script>
     
    5050                    <p class="website"><?php _e( 'Visit website for more info', 'browsehappy' ); ?></p>
    5151                </a>
    52                 <?php do_action( 'browsehappy_like_button', $browser ); ?>
     52                <?php do_action( 'browsehappy_browser_after', $browser ); ?>
    5353            </li><!-- #<?php echo $browser; ?> -->
    5454<?php endforeach; ?>
  • sites/trunk/browsehappy.com/public_html/style.css

    r8447 r8449  
    472472}
    473473
    474 #browserlist p.likebutton {
    475     text-align: center;
    476     margin: 15px 5px 0;
    477     min-height: 25px;
    478 }
    479 
    480 html[dir="rtl"] #browserlist p.likebutton iframe html {
    481     float: right;
    482 }
    483 
    484474/* Footer */
    485475
Note: See TracChangeset for help on using the changeset viewer.