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('avada_options_sections', 'avada_child_options_sections'); | |
function avada_child_options_sections( $sections ) | |
{ | |
$sections['header']['fields']['header_info_1']['fields']['header_layout']['choices']['v8'] = AVADA_CHILD_THEME_DIR_URI . '/assets/img/header-pattern/header-8.png'; | |
$sections['header']['fields']['header_info_1']['fields']['header_number']['required'][] = array( | |
'setting' => 'header_layout', | |
'operator' => '=', |
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 download_file( $file_url, $save_to ) { | |
$content = file_get_contents( $file_url ); | |
file_put_contents( $save_to, $content ); | |
} | |
if ( ! wp_next_scheduled( 'download_external_scripts_cron_hook' ) ) { | |
wp_schedule_event( time(), 'daily', 'download_external_scripts_cron_hook' ); | |
} |
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 GK_Category_Walker | |
*/ | |
class GK_Category_Walker extends Walker_Category{ | |
public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { | |
/** This filter is documented in wp-includes/category-template.php */ | |
$cat_name = apply_filters( | |
'list_cats', |
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 color_inverse_rgb($color){ | |
$rgb = trim( $color ); | |
if( strrpos($rgb, 'rgb') ){ | |
$rgb = str_replace('rgb(', '', $rgb); | |
$rgb = str_replace(')','',$rgb); | |
$rgb_array = explode(',',$rgb); | |
foreach ($rgb_array as $key => $rgb_color ){ | |
$rgb_array[$key] = 255 - (int)$rgb_color; | |
} |
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 if (!isset($_SERVER['HTTP_USER_AGENT']) || stripos($_SERVER['HTTP_USER_AGENT'], 'Speed Insights') === false): ?> | |
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
ga('create', 'UA-46357715-1', 'auto'); | |
ga('send', 'pageview'); | |
</script> |
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
<% | |
for(var i=0; i < quantity; i++ ) { | |
var modIncrement = i+1; | |
var mod = modIncrement % 3; | |
if( ( mod == 1 ) ){ | |
%> | |
<%- include('user/page-start', {index: i}); %> |
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
// Get The Page ID You Need | |
get_option( 'woocommerce_shop_page_id' ); | |
get_option( 'woocommerce_cart_page_id' ); | |
get_option( 'woocommerce_checkout_page_id' ); | |
get_option( 'woocommerce_pay_page_id' ); | |
get_option( 'woocommerce_thanks_page_id' ); | |
get_option( 'woocommerce_myaccount_page_id' ); | |
get_option( 'woocommerce_edit_address_page_id' ); | |
get_option( 'woocommerce_view_order_page_id' ); | |
get_option( 'woocommerce_terms_page_id' ); |
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
add_filter( 'fw_ext_page_builder_content_wrapper_class', '_fw_page_builder_wrapper_class' ); | |
function _fw_page_builder_wrapper_class($class) | |
{ | |
return 'my-custom-wrapper-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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
# END WordPress |
NewerOlder