Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

TrueQAP trueqap

🎯
Focusing
Block or report user

Report or block trueqap

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@trueqap
trueqap / example.php
Created Feb 18, 2020
Example WordPress plugin settings
View example.php
<?php
class MySettingsPage
{
/**
* Holds the values to be used in the fields callbacks
*/
private $options;
/**
@trueqap
trueqap / init.php
Created Dec 19, 2019
WooCommerce disable BACS for subscriptions
View init.php
<?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 Nov 21, 2019
Menü javítás
View style.css
@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 Oct 31, 2019
DIVI fix cart icon on mobile
View style.css
#et-secondary-menu {
display: block!important;
}
@media screen and (max-width: 767px) {
#et-secondary-menu {
margin-bottom: 16px;
}
}
View .htaccess
<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 Sep 17, 2019
Divi social ikonok megnyitása új ablakban
View divi.js
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".et-social-icon a").attr('target', 'blank');
});
</script>
@trueqap
trueqap / functions.php
Created Sep 1, 2019
WordPress Clone Role
View functions.php
<?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 Aug 30, 2019
WordPress hide links when the user is not logged in
View style.css
body:not(.logged-in) .example {
display: none !important;
}
@trueqap
trueqap / functions.php
Created Aug 16, 2019
Hide Divi project menu
View functions.php
<?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
View schema.js
<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"
},
You can’t perform that action at this time.