Advertisement
daymobrew

Add 'col' class to Genesis footer widgets

Sep 8th, 2019
630
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.67 KB | None | 0 0
  1. <?php
  2. /*
  3. Plugin Name: Add class to Genesis footer widgets
  4. Plugin URI: https://www.damiencarbery.com
  5. Description: Add a 'col' class to Genesis footer widgets - asked in Genesis WordPress Facebook group.
  6. Author: Damien Carbery
  7. Version: 0.1
  8. */
  9.  
  10. add_filter( 'genesis_attr_footer-widget-area', 'dcwd_genesis_attributes_footer_widget_area', 20, 3 );
  11. function dcwd_genesis_attributes_footer_widget_area( $attributes, $context, $args ) {
  12.     //error_log( "Attributes: " . var_export( $attributes, true ) );
  13.     //error_log( "Context: " . var_export( $context, true ) );
  14.     //error_log( "Args: " . var_export( $args, true ) );
  15.    
  16.     $attributes['class'] .= ' col';
  17.  
  18.     return $attributes;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement