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
//https://stackoverflow.com/questions/3586401/cant-decode-json-string-in-php | |
$json = stripslashes('{\"json\":[{\"username\":\"1062576\",\"accountId\":\"45656565\"}]}'); | |
$postarray = json_decode($json); | |
print_r($postarray); |
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
//https://stackoverflow.com/a/26744533/861265 | |
function getURLParams(url){ | |
var p={}; | |
url.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(s,k,v){p[k]=v}) | |
return p; | |
} |
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
Steps to download, compile, and install are as follows (I'm installing version 1.0.1g below; please replace "1.0.1g" with your version number): | |
Step – 1 : Downloading OpenSSL: | |
Run the command as below : | |
$ wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz | |
Also, download the MD5 hash to verify the integrity of the downloaded file for just varifacation purpose. In the same folder where you have downloaded the OpenSSL file from the website : |
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('acf/fields/relationship/query/name=also_may_like', 'exclude_outofstock', 10, 3); | |
function exclude_outofstock ( $args, $field, $post_id ) { | |
$meta_query[] = [ | |
'key' => '_stock_status', | |
'value' => 'instock', | |
'compare' => '=', |
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 add_acf_body_class($class) { | |
$value = get_field('header_height'); | |
$class[] = $value; | |
return $class; | |
} | |
add_filter('body_class', 'add_acf_body_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 | |
//Disable the new user notification sent to the site admin | |
function smartwp_disable_new_user_notifications() { | |
//Remove original use created emails | |
remove_action( 'register_new_user', 'wp_send_new_user_notifications' ); | |
remove_action( 'edit_user_created_user', 'wp_send_new_user_notifications', 10, 2 ); | |
//Add new function to take over email creation | |
add_action( 'register_new_user', 'smartwp_send_new_user_notifications' ); | |
add_action( 'edit_user_created_user', 'smartwp_send_new_user_notifications', 10, 2 ); |
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_theme_support( 'title-tag' ); | |
?> |
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
<table> | |
<tbody> | |
<tr> | |
<td> | |
<div><label>CCL Business Segment</label> | |
<p>Food & Beverage</p></div> | |
<div><label>Site Location</label> | |
<p>Holzkirchen, Germany</p></div> | |
</td> | |
<td> <div><label>CCL Team Lead</label> |
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( 'elementor/query/brandProductsQuery', function( $query ) { | |
$meta_query[] = [ | |
'key' => '_stock_status', | |
'value' => 'instock', | |
'compare' => '=', | |
]; | |
$query->set('meta_query', $meta_query); | |
}); |