This file contains hidden or 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
/* | |
modifiying the general wp_query and adding the suppress filters to be off all the time | |
*/ | |
add_action( '__before_loop' , 'modify_main_wp_query1' ); | |
add_action( '__after_loop' , 'modify_main_wp_query1' ); | |
function modify_main_wp_query1() { | |
global $wp_query; |
This file contains hidden or 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
/* paste this into your functions.php of the theme */ | |
/ * Join posts and postmeta tables */ | |
function product_search_join( $join ) { | |
if( ! is_search() || ! is_woocommerce() ) { | |
return $join; | |
} | |
global $wpdb; | |
This file contains hidden or 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
UPDATE wp_options SET option_value = replace(option_value, 'http://sezavino.mk', 'https://sezavino.mk') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://ivankarangelova.com','https://sezavino.mk'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://ivankarangelova.com', 'https://sezavino.mk'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://ivankarangelova.com','https://sezavino.mk'); |
This file contains hidden or 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 | |
// Hide prices | |
add_filter('woocommerce_get_price_html', 'show_price_logged'); | |
function show_price_logged($price){ | |
if(is_user_logged_in() ) { | |
return $price; | |
} else { | |
add_action( 'woocommerce_single_product_summary', 'print_login_to_see', 31 ); | |
add_action( 'woocommerce_after_shop_loop_item', 'print_login_to_see', 11 ); |
This file contains hidden or 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
/*mile test */ | |
function make_filename_hash($filename) { | |
if( isset($_REQUEST['post_id']) ) { | |
$post_id = (int)$_REQUEST['post_id']; | |
}else{ | |
$post_id=0; | |
} | |
$info = pathinfo($filename); | |
$ext = empty($info['extension']) ? '' : '.' . $info['extension']; |
This file contains hidden or 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
$username = $_POST['fs_username']; | |
$password = $_POST['fs_password']; | |
echo "<pre>"; | |
var_dump("Username: ", $username, "Password: ", $password); | |
echo "</pre>"; | |
$api_login_url = "https://servicesbeta.fidelitysalus.it/v3/account/login"; | |
$login_response = wp_remote_retrieve_body(wp_remote_post( $api_login_url, array( | |
'method' => 'POST', |
This file contains hidden or 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
/// HTML PAGE TEMPLATE SHOULD HAVE THIS CODE (KEEP IN MIND THAT THE INSERT.PHP IS IN THE TEMPLATE DIR | |
<form action="<?php echo get_template_directory_uri(); ?>/insert.php" method="post"> | |
Name:<input type="text" name="name"/> | |
<input type="submit" name="submit"/> | |
</form> | |
/// THE INSERT.PHP FILE SHOULD HAVE THIS CODE | |
<?php | |
global $wpdb |
NewerOlder