Skip to content

Instantly share code, notes, and snippets.

View trueqap's full-sized avatar
🎯
Focusing

TrueQAP trueqap

🎯
Focusing
View GitHub Profile
@trueqap
trueqap / example.php
Created February 18, 2020 16:56
Example WordPress plugin settings
<?php
class MySettingsPage
{
/**
* Holds the values to be used in the fields callbacks
*/
private $options;
/**
@trueqap
trueqap / init.php
Created December 19, 2019 06:16
WooCommerce disable BACS for subscriptions
<?php
function woo_disable_bacs_for_subscriptions( $available_gateways ) {
global $wp;
if ( class_exists( 'WC_Subscriptions_Cart' ) ) {
// 2.6+ compatibility
$cart_contains_renewal = function_exists( 'wcs_cart_contains_renewal' ) ? wcs_cart_contains_renewal() : WC_Subscriptions_Cart::cart_contains_subscription_renewal();
if ( is_checkout_pay_page() ) {
$order_contains_renewal = function_exists( 'wcs_order_contains_subscription' ) ? wcs_order_contains_subscription( $wp->query_vars['order-pay'] ) : WC_Subscriptions_Order::order_contains_subscription( $wp->query_vars['order-pay'] );
} else {
@trueqap
trueqap / style.css
Last active November 21, 2019 18:45
Menü javítás
@media only screen and (min-width: 981px){
.et_header_style_centered #top-menu>li>a {
padding-bottom: 0px;
}
}
.et_header_style_centered #top-menu>li>a {
padding-bottom: 0px;
}
@trueqap
trueqap / style.css
Created October 31, 2019 17:01
DIVI fix cart icon on mobile
#et-secondary-menu {
display: block!important;
}
@media screen and (max-width: 767px) {
#et-secondary-menu {
margin-bottom: 16px;
}
}
<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>
@trueqap
trueqap / divi.js
Created September 17, 2019 06:18
Divi social ikonok megnyitása új ablakban
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".et-social-icon a").attr('target', 'blank');
});
</script>
@trueqap
trueqap / functions.php
Created September 1, 2019 06:59
WordPress Clone Role
<?php
add_action('init', 'kisker_role');
function kisker_role()
{
global $wp_roles;
if (!isset($wp_roles)) {
$wp_roles = new WP_Roles();
@trueqap
trueqap / style.css
Created August 30, 2019 06:52
WordPress hide links when the user is not logged in
body:not(.logged-in) .example {
display: none !important;
}
@trueqap
trueqap / functions.php
Created August 16, 2019 12:39
Hide Divi project menu
<?php
add_filter( 'et_project_posttype_args', 'hide_divi_project', 10, 1 );
function hide_divi_project( $args ) {
return array_merge( $args, array(
'public' => false,
'exclude_from_search' => false,
'publicly_queryable' => false,
'show_in_nav_menus' => false,
'show_ui' => false
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"name": "Cyberpunk 2077",
"image": "a te keped eleresi utvonala",
"brand": {
"@type": "Organization",
"name": "a weboldalad neve"
},