This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Custom_Widget_Pods_Testimonials extends WP_Widget { | |
public function __construct() { | |
$widget_ops = array('classname' => 'widget_pods_testimonials', 'description' => __( "Featured Testimonials.") ); | |
parent::__construct('pods_testimonials', __('Featured Testimonials'), $widget_ops); | |
$this->alt_option_name = 'widget_pods_testimonials'; | |
add_action( 'save_post', array($this, 'flush_widget_cache') ); | |
add_action( 'deleted_post', array($this, 'flush_widget_cache') ); | |
add_action( 'switch_theme', array($this, 'flush_widget_cache') ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Name: CPT Admin Fields | |
* | |
* Description: Allow adding fields to the CPT editor table. | |
* | |
* Version: 2.3 | |
* | |
* Category: Advanced | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Loop Add to Cart | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/loop/add-to-cart.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Add virtual Field Grouping to Pods | |
* This requires the PR from https://github.com/pods-framework/pods/pull/3548 which will hopefully be | |
* available in Pods 2.6.6 | |
* James Golovich <james@gnuinter.net> | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Beaver Builder Cache Helper | |
* Description: This plugin will clear various caches when layouts and templates are saved. It also clears the cache when WordPress finishes updating plugins and themes. The plugin also defines the DONOTCACHEPAGE constant when the builder is active, this is respected by most cache plugins. | |
* Version: 1.0 | |
* License: GNU General Public License v2.0 | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ | |
class FL_Cache_Buster { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'pre_get_posts', function ( $query ) { | |
if ( $query->is_main_query() && !is_admin() && $query->is_post_type_archive( 'name_of_post_type') ) { | |
$query->set('orderby', 'meta_value_num'); | |
$query->set('meta_key', 'custom_field_name'); | |
$query->set('order', 'ASC'); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Move the wp-admin bar to the bottom */ | |
#wpadminbar { | |
bottom: 0; | |
position: fixed; | |
top: initial; | |
} | |
body.logged-in.admin-bar { | |
margin-top: -32px; | |
} | |
@media(max-width:782px) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Filter the Pods saving process and run actions / modify values | |
* | |
* @param array $pieces An array of different variables you can *change*, see below | |
* | |
* List of $pieces variables includes: | |
* | |
* array $pieces['fields'] An array of fields on the Pod, 'value' key stores the *new* value if it's been set to save | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! BeaverBuilder Add Panel Option for jQuery v1.00 | |
* http://www.badabing.nl/jquery-plugins/beaverbuilder-paneloptions/ | |
* Do not remove any of this notice (you're welcome to use this code in commercial projects) | |
* Copyright (c) 2016 Didou Schol www.badabing.nl | |
* Licensed under the MIT license */ | |
( function ( $ ) { | |
$.extend ({ | |
bbAddPanel: function ( options ) { | |
// DEFAULT OPTIONS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 2 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. |
OlderNewer