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
/** | |
* Add that code to your theme functions.php file. Choose or modify which file/mime type need and delete the others. | |
* Replace the file type. More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types | |
* Gist by Tamas Rottenbacher | |
* Source: https://wpsmackdown.com/add-remove-filetypes-wordpress-media-library/ | |
*/ | |
function disable_mime_types($mime_types){ | |
unset($mime_types['bmp']); // Disable .bmp file upload | |
unset($mime_types['tiff']); // Disable .tiff file upload | |
return $mime_types; |
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
/** | |
* Add that code to your theme functions.php file. Choose or modify which file/mime type need and delete the others. | |
* Replace the file type. More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types | |
* Gist by Tamas Rottenbacher | |
* Source: https://wpsmackdown.com/add-remove-filetypes-wordpress-media-library/ | |
*/ | |
function approve_mime_types($mime_types){ | |
$mime_types['rar'] = 'application/x-rar-compressed'; // Approve .rar file upload | |
$mime_types['bmp'] = 'image/bmp'; // Approve .bmp image upload | |
$mime_types['svg'] = 'image/svg+xml'; // Approve .svg image upload |
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 | |
/* | |
* Plugin Name: Pont shipping for Woocommerce - Add custom Prefix | |
* Plugin URI: https://rotisoft.hu/bovitmenyek/ | |
* Description: Szathmari Andor WC-PONT Sprinter rendszernel elotag hozzadasa, hogy SprinterPartnerPortalon egyes webshopok rendelesei elkulonithetoek legyenek. | |
* Version: 1.0 | |
* Author: Rottenbacher RotiSoft Tamas | |
* Author URI: https://rotisoft.hu/ | |
* | |
* Requires at least: 5.7 |
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
# Block WordPress xmlrpc.php requests | |
<Files xmlrpc.php> | |
order deny,allow | |
deny from all | |
</Files> |
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
max_execution_time = 180 | |
max_input_time = 300 | |
max_input_vars = 10000 | |
memory_limit = 256M | |
upload_max_filesize = 128MB | |
post_max_size = 128M |
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_value upload_max_filesize 128M | |
php_value post_max_size 128M | |
php_value max_execution_time 180 | |
php_value max_input_time 300 | |
php_value memory_limit 256M | |
php_value max_input_vars 10000 |
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
/** | |
* Add that code to your WordPress site wp-config.php file. | |
* Replace the domain.tld to your site domain. | |
* Don't forget the https. | |
* Gist by Tamas Rottenbacher | |
* Source: https://wordpress.org/support/article/changing-the-site-url/ | |
*/ | |
define( 'WP_HOME', 'https://example.com' ); | |
define( 'WP_SITEURL', 'https://example.com' ); |
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
/** | |
* Sets the extension and mime type for .webp files. | |
* @param array $wp_check_filetype_and_ext File data array containing 'ext', 'type', and * 'proper_filename' keys. | |
* @param string $file Full path to the file. | |
* @param string $filename The name of the file (may differ from $file due to | |
* $file being in a tmp directory). | |
* @param array $mimes Key is the file extension with value as the mime type. | |
*/ | |
add_filter( 'wp_check_filetype_and_ext', 'wpse_file_and_ext_webp', 10, 4 ); |
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
DELETE relations.*, taxes.*, terms.* | |
FROM wp_term_relationships AS relations | |
INNER JOIN wp_term_taxonomy AS taxes | |
ON relations.term_taxonomy_id=taxes.term_taxonomy_id | |
INNER JOIN wp_terms AS terms | |
ON taxes.term_id=terms.term_id | |
WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type='product'); | |
DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type = 'product'); | |
DELETE FROM wp_posts WHERE post_type = 'product'; |
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
add_action( 'woocommerce_archive_description', 'rs_woo_category_description' ); | |
function rs_woo_category_description() { | |
$parentid = get_queried_object_id(); | |
$args = array( 'parent' => $parentid); | |
$terms = get_terms( 'product_cat', $args ); | |
if ( $terms ) { | |
echo '<hr>'; | |
echo '<div class="rssubcategories">'; | |
echo '<h2>Alkategóriák</h2>'; |
NewerOlder