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 | |
/** | |
* Sets path for ACF json | |
* This is going to generate local JSON copies in your given folder for each ACF Group. | |
* When the ACF Group is saved/updated, | |
*/ | |
define( 'IP_ACF_PLUGIN_DIR_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) ); | |
function ip_acf_json_save_point( $path ) { | |
// Update path |
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( 'wp_footer', 'mycustom_wp_footer' ); | |
function mycustom_wp_footer() { | |
$site_url = get_site_url(); | |
?> | |
<script> | |
document.addEventListener( 'wpcf7mailsent', function( event ) { | |
location = '<?php echo $site_url; ?>/landing-thank-you/'; |
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 User Role Class to Body | |
*/ | |
function print_user_classes() { | |
if ( is_user_logged_in() ) { | |
add_filter( 'body_class','class_to_body' ); | |
add_filter( 'admin_body_class', 'class_to_body_admin' ); | |
} | |
} |
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 endpoint rewrite. | |
*/ | |
function ip_custom_endpoint() { | |
add_rewrite_endpoint( 'edit-wishlists', EP_ROOT | EP_PAGES ); | |
} | |
add_action( 'init', 'ip_custom_endpoint', 10, 1 ); | |
/** |
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 | |
/** | |
* Reorder my-account menu | |
* | |
* @param array $menu_links Array containing menu items | |
* @return array Filtered links | |
*/ | |
function ip_reorder_my_account_menu( $menu_links ){ | |
$logout_link = $menu_links['customer-logout']; |
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 woo_custom_breakpoint( $px ) { | |
$px = '782px'; | |
return $px; | |
} | |
add_filter( 'woocommerce_style_smallscreen_breakpoint', 'woo_custom_breakpoint' ); |
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 remove_my_account_menu_items( $items ) { | |
unset( $items['edit-address'] ); | |
unset( $items['orders'] ); | |
unset( $items['downloads'] ); | |
return $items; | |
} | |
add_filter( 'woocommerce_account_menu_items', 'remove_my_account_menu_items' ); |
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
ul.columns { | |
column-count: 2; | |
column-gap: 20px; | |
} | |
ul.columns li { | |
font-size: 16px; | |
line-height: 2; | |
/* This will keep the li from breaking on to new lines */ | |
-webkit-column-break-inside: avoid; |
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 | |
/** | |
* Lowering specificity of WordPress global styles. | |
*/ | |
add_action( 'init', function() { | |
// WP5.9+ only. | |
if ( ! function_exists( 'wp_get_global_stylesheet' ) ) { | |
return; | |
} |
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: | |
* Plugin URI : | |
* Description: | |
* Version: 1.0.0 | |
* Author: Inverse Paradox | |
* Author URI: https://inverseparadox.com | |
* Text Domain: | |
* Domain Path: /languages |
NewerOlder