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 | |
namespace RMG\QuoteBuilder; | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
if ( class_exists( 'RMG\QuoteBuilder\Settings_Quotes', false ) ) { | |
return new Settings_Quotes(); |
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
.quotation { | |
&:before { | |
content: '\201C'; | |
} | |
&:after { | |
content: '\201D'; | |
} | |
} |
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 | |
namespace RMG\PageSpeed; | |
/** | |
* Get the HTML for an image with limited srcset sizes | |
* | |
* @param string|int $image_id | |
* @param string $size The image size name ex. `medium`, `thumb` | |
* @param boolean $icon | |
* @param null|array $attrs | |
* |
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 | |
class ACF_Product_Options { | |
static $slug = 'hwid_attributes'; | |
public static function init() { | |
// Gather the global attribute types | |
$attribute_terms = wc_get_attribute_taxonomy_names(); |
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
if( window.acf ) { | |
window.acf.addAction( 'render_block_preview/type=accordion', function( $elem, blockDetails ) { | |
initializeElement( $elem ); | |
} ); | |
} |
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 | |
namespace HWID\SampleCode; | |
class GravityForms { | |
public static function init() { | |
add_filter( 'gform_custom_merge_tags', [ 'HWID\SampleCode\GravityForms', 'custom_merge_tags' ], 10, 4 ); | |
add_filter( 'gform_replace_merge_tags', [ 'HWID\SampleCode\GravityForms', 'replace_merge_tags' ], 10, 3 ); | |
} | |
/** |
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_filter( 'woocommerce_breadcrumb_main_term', 'hwid_breadcrumbs_primary_category' ); | |
/** | |
* Override the default term for WooCommerce cookies if Yoast SEO is installed | |
* | |
* @param WP_Term $term | |
* | |
* @return WP_Error|WP_Term|null |
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
setlocal enabledelayedexpansion | |
set var=%1 | |
set output= | |
for /f "delims=" %%a in ('git diff-tree --no-commit-id --name-only -r %1^^') do ( set output=!output! "%%a" ) | |
git archive -o update-%var:~0,7%.zip HEAD %output% | |
endlocal |
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 | |
function hwid_acf_admin_footer() { | |
?> | |
<script> | |
( function( $) { | |
acf.add_filter( 'wysiwyg_tinymce_settings', function( mceInit, id ) { | |
// grab the classes defined within the field admin and put them in an array | |
var classes = $( '#' + id ).closest( '.acf-field-wysiwyg' ).attr( 'class' ); |
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 | |
function my_acf_admin_footer() { | |
?> | |
<script> | |
( function( $) { | |
acf.add_filter( 'wysiwyg_tinymce_settings', function( mceInit, id ) { | |
if ( id === 'special-wysiwyg-field' ) { | |
mceInit.body_class += ' magical-field-class'; | |
} | |
return mceInit; |
NewerOlder