Advertisement
srikat

Untitled

Jan 22nd, 2015
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | None | 0 0
  1. <?php
  2.  
  3. add_action( 'get_header', 'vg_check_login' );
  4.  
  5. function vg_check_login() {
  6.     if( is_user_logged_in() ) {
  7.         return;
  8.     }
  9.  
  10.     remove_action( 'genesis_loop', 'genesis_do_loop' );
  11.  
  12.     add_action( 'genesis_loop', 'vg_do_custom_loop' );
  13.  
  14.     add_filter( 'genesis_attr_content', 'vg_add_entry_class' );
  15. }
  16.  
  17. function vg_do_custom_loop() {    
  18.     echo do_shortcode( '[wordpress_social_login]' );
  19. }
  20.  
  21. function vg_add_entry_class( $attributes ) {
  22.     $attributes['class'] .= ' entry';
  23.     return $attributes;
  24. }
  25.  
  26. genesis();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement