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: Ingyenes szállítási küszöb - WooCommerce | |
* Plugin URI: https://github.com/trueqap/ingyenes-szallitasi-kuszob-woocommerce | |
* Description: A bővítmény segítségével kiírhatjuk a kosár oldalra, hogy mennyit kell még vásárolni az ingyenes szállításig. | |
* Version: 1.0 | |
* Author: Trueqap | |
* Author URI: https://github.com/trueqap/ | |
* License: GPL2 | |
*/ |
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 posts_for_current_author($query) { | |
global $pagenow; | |
if( 'edit.php' != $pagenow || !$query->is_admin ) | |
return $query; | |
if( !current_user_can( 'edit_others_posts' ) ) { | |
global $user_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
?php | |
$product = new WC_Product( get_the_ID() ); // in function.php maybe... | |
if( $product->is_type( 'simple' ) ){ | |
// a simple product | |
} elseif( $product->is_type( 'variable' ) ){ |
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 egyedi_jellemzok() { | |
echo'IDE JÖHET MINDEN SZÖVEG, AKÁR HTML IS, VAGY SCRIPT'; | |
} | |
add_action('woocommerce_after_add_to_cart_button', 'egyedi_jellemzok'); |
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 delete_associated_media( $id ) { | |
$media = get_children( array( | |
'post_parent' => $id, | |
'post_type' => 'attachment' | |
) ); | |
if( empty( $media ) ) { | |
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 | |
add_action( 'admin_init', 'redirect_non_admin_users' ); | |
function redirect_non_admin_users() { | |
if ( ! current_user_can( 'manage_options' ) && '/wp-admin/admin-ajax.php' != $_SERVER['PHP_SELF'] ) { | |
wp_redirect( home_url() ); | |
exit; | |
} | |
} |
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
UPDATE wp_options SET option_value = replace(option_value, 'http://regiwebcim.hu', 'http://ujwebcim.hu') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://regiwebcim.hu','http://ujwebcim.hu'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://regiwebcim.hu', 'http://ujwebcim.hu'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://regiwebcim.hu','http://ujwebcim.hu'); | |
UPDATE wp_options SET option_value = replace(option_value, 'http://regiwebcim.hu', 'http://ujwebcim.hu'); |
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 | |
//Részletek itt: https://wphu.org/tippek-trukkok/hogyan-jussunk-wordpress-adminba-hozzaferes-nelkul/ | |
require_once('wp-blog-header.php'); | |
require_once('wp-includes/registration.php'); | |
$newusername = 'wphu.org-potkulcs'; | |
$newpassword = 'wphu.org-potjelszo'; |
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 | |
//https://wphu.org/kozosseg/tema/targy-eszkoz-lefoglalo-plugin/#post-263704 | |
add_filter( 'woocommerce_variable_sale_price_html', 'ar_torles', 10, 2 ); | |
add_filter( 'woocommerce_variable_price_html', 'ar_torles', 10, 2 ); | |
add_filter( 'woocommerce_get_price_html', 'ar_torles', 10, 2 ); | |
function ar_torles( $price, $product ) { | |
$price = ''; |
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 | |
//https://woopress.hu/forumok/tema/rende/ | |
function RENDELES_DATUMA_ES_IDO_OSZLOP( $columns ) { | |
$new_columns = ( is_array( $columns ) ) ? $columns : array(); | |
unset( $new_columns[ 'order_actions' ] ); | |
$new_columns['RENDELES_DATUMA_ES_IDO'] = 'Rendelés dátuma'; |
OlderNewer