Skip to content

Instantly share code, notes, and snippets.

View calvez's full-sized avatar
🏠
Working from home

calvez calvez

🏠
Working from home
  • Budapest, Hungary
View GitHub Profile
@calvez
calvez / gnome-keyring-daemon-use-100percent-cpu.mkd
Created August 24, 2018 09:04 — forked from noromanba/gnome-keyring-daemon-use-100percent-cpu.mkd
gnome-keyring use 100% CPU usage when Google Chrome started
<?php
// Register Sidebars
function szif_sidebars() {
$args = array(
'id' => 'szif',
'class' => 'szif-right',
'name' => __( 'Szépirodalmi figyelő', 'szif' ),
'description' => __( 'A szépirodalmi figyelő oldalain megejelenő sidebar', 'szif' ),
@calvez
calvez / wp-recent-posts-shortcode.php
Last active August 4, 2018 18:02
How To Create WordPress Recent Posts Shortcode
//https://chiefthemes.com/create-wordpress-recent-posts-shortcode/
<?php
function chiefthemes_posts_shortcode($atts, $content = NULL)
{
$atts = shortcode_atts(
[
'orderby' => 'date',
<?php
add_filter('woocommerce_product_single_add_to_cart_text', 'rental_single_product_add_to_cart',10,2);
add_filter('woocommerce_product_add_to_cart_text', 'rental_single_product_add_to_cart',10,2);
function rental_single_product_add_to_cart( $title,$product ) {
return 'Ajánlatkérés';
}
add_action('woocommerce_widget_shopping_cart_before_buttons', 'rental_before_mini_cart_checkout',10);
function rental_before_mini_cart_checkout(){
@calvez
calvez / functions.php
Created July 24, 2018 09:23 — forked from furtive/functions.php
In WooCommerce, make the online store notice only show up in store pages as opposed to the entire site, which is the default behaviour.
if ( ! function_exists( 'woocommerce_demo_store' ) ) {
/**
* Adds a demo store banner to the site if enabled
*
* @access public
* @return void
*/
function woocommerce_demo_store() {
if ( get_option( 'woocommerce_demo_store' ) == 'no' )
@calvez
calvez / mogrify
Created July 8, 2018 20:00
imagemagicks
mogrify -resize 1500x1500 -format jpg -path ../ESG_small *.jpg
<?php
header('Content-Type: application/json');
//$xmlfile = 'xml/EIT_00002_20140507.xml';
function xml2json($file) {
if (file_exists($file)) {
$xml = simplexml_load_file($file);
$date = $xml->EventDate;
@calvez
calvez / slide-inner-content.html
Created June 4, 2018 10:03
target slide variations
<div class="carousel-inner" style="float: none; margin: 0 auto;">
<div class="row">
<div class="col-md-12">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
@calvez
calvez / wp-update.sh
Created May 17, 2018 04:39 — forked from bananana/wp-update.sh
Bash script to run automatic updates and backups using wp-cli
#!/bin/bash
#
# Backup and update WordPress using wp-cli
#
# Set the -e shell option so the script exits immediately if any command within
# it exits with a non-zero status.
set -e
# Set PATH environment variable
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.