Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

TrueQAP trueqap

🎯
Focusing
View GitHub Profile
View style.css
.et_boxed_layout #page-container, .et_boxed_layout #page-container .container, .et_boxed_layout #page-container .et_pb_row, .et_boxed_layout.et_non_fixed_nav.et_transparent_nav #page-container #top-header, .et_boxed_layout.et_pb_pagebuilder_layout.single #page-container .et_pb_row, .et_boxed_layout.et_pb_pagebuilder_layout.single.et_full_width_page #page-container .et_pb_row, .et_boxed_layout.et_pb_pagebuilder_layout.single.et_full_width_portfolio_page #page-container .et_pb_row, .et_fixed_nav.et_boxed_layout #page-container #main-header, .et_fixed_nav.et_boxed_layout #page-container #top-header, .et_non_fixed_nav.et_transparent_nav.et_boxed_layout #page-container #main-header {
width: 100% !important;
max-width: 100% !important;
margin: auto;
}
@trueqap
trueqap / functions.php
Created Nov 26, 2020
woocommerce_checkout_nyitva_tartas -> Shortcode
View functions.php
<?php
// [woocommerce_checkout_nyitva_tartas]
function woocommerce_checkout_nyitva_tartas($atts)
{
$jelenlegi_ido = date('h:i:s a');
$nyitas = "10:00 am"; //am -> délelőtt
$zaras = "4:00 pm"; // pm -> délután
$date1 = DateTime::createFromFormat('h:i a', $jelenlegi_ido);
$date2 = DateTime::createFromFormat('h:i a', $nyitas);
View nyelv-css.php
<?php
$current_lang = apply_filters('wpml_current_language', NULL);
function lang_en() {
wp_enqueue_style( 'custom-style', get_template_directory_uri() . '/en.css' );
}
function lang_it() {
wp_enqueue_style( 'custom-style', get_template_directory_uri() . '/it.css' );
View php.ini
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value_max_execution_time 300
php_value max_input_time 300
max_input_vars 10000
@trueqap
trueqap / style.css
Last active Sep 14, 2020
style.css
View style.css
.myglow {
background: #FF0C0C;
border-radius: 50%;
margin: 10px;
height: 10px;
width: 10px;
box-shadow: 0 0 0 0 rgba(0, 0, 0, 1);
transform: scale(1);
animation: pulse 2s infinite;
animation-delay: 100ms;
@trueqap
trueqap / toinnodb.sh
Created Jul 31, 2020
WordPress MyISAM to InnoDB with CLI
View toinnodb.sh
#!/usr/bin/env bash
WP_TABLES=($(wp db query "SHOW TABLE STATUS WHERE Engine = 'MyISAM'" --allow-root --silent --skip-column-names | awk '{ print $1}'))
for WP_TABLES in ${WP_TABLES[@]}
do
echo "Converting ${WP_TABLES} to InnoDB"
wp db query "ALTER TABLE ${WP_TABLES} ENGINE=InnoDB" --allow-root
echo "Converted ${WP_TABLES} to InnoDB"
@trueqap
trueqap / function.php
Last active Jul 28, 2020
disable_autofocus_firstname
View function.php
<?php
function disable_autofocus_firstname($fields) {
$fields['billing_first_name']['autofocus'] = false;
$fields['billing_last_name']['autofocus'] = false;
return $fields;
}
add_filter('woocommerce_checkout_fields', 'disable_autofocus_firstname');
@trueqap
trueqap / functions.php
Created Jul 24, 2020
Számlázási adatok eltüntetése
View functions.php
<?php
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
function custom_override_checkout_fields( $fields ) {
unset($fields['billing']['billing_first_name']);
unset($fields['billing']['billing_last_name']);
unset($fields['billing']['billing_company']);
unset($fields['billing']['billing_address_1']);
unset($fields['billing']['billing_address_2']);
@trueqap
trueqap / woo.php
Created Jun 18, 2020
List WooCommerce Product by Total sales
View woo.php
<?php
$args = array(
'post_type' => 'product',
'meta_key' => 'total_sales',
'orderby' => 'meta_value_num',
'posts_per_page' => 1,
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
global $product; ?>
@trueqap
trueqap / woo.php
Created Jun 18, 2020
List WooCommerce Product by Total sales
View woo.php
<?php
$args = array(
'post_type' => 'product',
'meta_key' => 'total_sales',
'orderby' => 'meta_value_num',
'posts_per_page' => 1,
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
global $product; ?>
You can’t perform that action at this time.