Skip to content

Instantly share code, notes, and snippets.

View GLWalker's full-sized avatar
🤠

G.L.Walker GLWalker

🤠
  • WeTite
  • Texas
  • 04:02 (UTC -06:00)
View GitHub Profile
@GLWalker
GLWalker / gist:f293e8ab61303c465f41
Created September 16, 2015 15:55
Woocommerce Review Star Ratings. Please read description to learn more...
/* ==========================================================================
Snippet Name: WooCommerce Review Star Ratings
Description: This css snippet blends all woocommerce star rating for a consistant look sitewide. Consolidates code and makes uses of WooCommerce.eot font. If you disabled the woocommerce.css and built your own styles then this will work great. If you are overriding woocommerce.css by adding styles to another styesheet that loads afterwards, this will still work fine, but you may need to target specific elements or create a master reset targeting all elements listed below in order to remove some of woocommerce default margins and padding.
Author: GL Walker
Author URI: http://wsfive.com
========================================================================== */
.woocommerce .star-rating, .woocommerce p.stars [class^="star-"], .woocommerce p.stars [class*=" star-"] {
font-family: WooCommerce;
speak: none;
font-weight: 400;
@GLWalker
GLWalker / gist:22f7caeb09b268548dff
Created December 16, 2015 18:51
Woocommerce CSS Color Breakdown
/* ==========================================================================
Snippet Name: WooCommerce Colors
Description: This css is all woocommerce things that are colored, text, fonts, buttons, borders, you name it. Use to aid in design.
Author: GL Walker
Author URI: http://wsfive.com
========================================================================== */
.woocommerce form .form-row.woocommerce-invalid .select2-container, .woocommerce form .form-row.woocommerce-invalid input.input-text, .woocommerce form .form-row.woocommerce-invalid select {
border-color: #a00
}
@GLWalker
GLWalker / gist:2ff30298be597d7cfb661fc7f85b2595
Created November 23, 2021 05:11
BuddyPress Goup Members Output
function group_members($group_id = false, $role = array())
{
if (!$group_id) {
return '';
}
$members = new \BP_Group_Member_Query(array(
'group_id' => $group_id,
'per_page' => 3,
@GLWalker
GLWalker / gist:e20c5dede1015c8ea473c6d9cbb7912d
Created November 23, 2021 05:14
BuddyPress Group Admin's Output with Boostrap 5 css classes
/**
* Output markup listing group admins.
*
* @since 1.0.0
*
* @param object|bool $group Optional. Group object.
* Default: current group in loop.
*/
function systmp_bp_group_list_admins($group = false)
{
@GLWalker
GLWalker / gist:ce8e0cdb7935c82b1c101bdf4935ddf5
Created November 23, 2021 05:17
BuddyPress Group Mod's Output with Boostrap 5 css classes
/**
* Output markup listing group mod.
*
* @since 1.0.0
*
* @param object|bool $group Optional. Group object.
* Default: current group in loop.
*/
function systmp_bp_group_list_mods($group = false)
{
@GLWalker
GLWalker / gist:164d2904137a14fed97d71a37c5ca459
Created November 26, 2021 05:56
Prevent duplicate BuddyPress group names
/**
* Check if the given BuddyPress group name is duplicate. A group with same name already exists.
*
* @abstract https://buddydev.com/prevent-duplicate-buddypress-group-names/
* @since 1.0.0
* @param string $name name to be checked.
* @param int $group_id group id(exclude this group from test).
*
* @return bool
*/
<?php if (bp_group_has_members(array('per_page' => 10, 'exclude_banned' => 0, 'page_arg' => 'page'))) : ?>
<div class="bp-widget group-members-list table-responsive" aria-live="assertive" aria-relevant="all">
<?php
/**
* Fires before the display of the group members list.
*
* @since 1.1.0
*/
<?php
/**
* Function for recreating BuddyPress pagination with BootStrap 5 markup
*
* @package SystemPress
*/
// Exit if accessed directly.
defined('ABSPATH') || exit;
@GLWalker
GLWalker / class-wt-walker-page.php
Last active March 7, 2022 17:14
Bootstrap 5 WP Page Walker Widget Classes
<?php
/**
* Post API: Walker_Page class
*
* @package ClassicPress
* @subpackage Template
* @since WP-4.4.0
*
* Modified for Bootstrap 5 List Group with Accordian
<?php
/**
* Putting this here for reference in case others need to accomplish similar. This creates
a new archives widget and adds some settings for bootstrap classes then apply's them
with a couple filters.
*/
/**
* Widget API: WP_Widget_Archives class
*
* @package WordPress