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 | |
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(){ |
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
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' ) |
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
mogrify -resize 1500x1500 -format jpg -path ../ESG_small *.jpg |
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 | |
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; |
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
<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"> |
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
#!/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.
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
find . -iname '*.php' -mmin -$(echo $(date +%s) - $(date +%s -d"Apr 25, 2018 00:00:01") | bc -l | awk '{print $1 / 60}' ) -mmin +$(echo $(date +%s) - $(date +%s -d"May 3, 2018 23:59:59") | bc -l | awk '{print $1 / 60}' ) -exec ls -ld --time-style=full-iso {} \; > ~/getthisfucker/maybemodified.txt |
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
// Found at: | |
// https://github.com/wp-cli/wp-cli/issues/1734#issuecomment-87897943 | |
// | |
// Note that $_SERVER['DOCUMENT_ROOT'] will return a string with a trailing slash on | |
// some systems and not others, so we'll make sure it's gone in all cases where there | |
// is ambiguity by using rtrim. | |
// Also note that this is above the loading of the wp-config-*.php files so that these can | |
// be over-ridden as required. | |
<?php /* php tag is just for gist highlight*/ |
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
if (!empty($badusers)) { | |
foreach ($badusers as $bu) { | |
$output .= "PROBLEM with uid [<b>".$bu['userid']."</b>]: freemoney [<b>".n($bu['freemoney'])."</b>] should be [<b>".n($bu['calculated'])."</b>], diff is [<b>".n(abs($bu['freemoney']-$bu['calculated']))."</b>]<br/>\n"; | |
if ($bu['calculated'] >= 0) { | |
if (!$sim) { | |
$conn->execute('update betusers set freemoney = '.$bu['calculated'].' where userid = '.$bu['userid']); | |
} | |
$output .= "Fixed with sql update.<br />\n"; | |
} else { | |
$output .= "Negative value, not fixed, check manually!<br />\n"; |