View getinvoicelist.php
This file contains 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 | |
function getInvoices($contact, $page = 0) { | |
global $link, $api, $today, $year_ago; | |
$filters = array( | |
'contact_id' => $contact, | |
'is_sent' => 1, | |
'invoice_date' => array($year_ago, $today) | |
); | |
//print_r($filters); |
View Bestaande_klanten.php
This file contains 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_action('wp_footer', 'fw_get_user_for_clicky'); | |
function fw_get_user_for_clicky() { | |
$current_user = wp_get_current_user(); | |
if ( $current_user->exists() ) { | |
// Vraag je klant/gebruiker eerst om toestemming voordat je deze code toont | |
echo ' | |
<script type="text/javascript"> | |
var clicky_custom = clicky_custom || {}; | |
clicky_custom.visitor = { |
View functions.php
This file contains 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 this code snippet to your child theme's functions.php file | |
add_filter('comment_form_default_fields', 'fw_remove_comment_author_url'); | |
function fw_remove_comment_author_url($fields) { | |
if (isset($fields['url'])) { | |
unset($fields['url']); | |
} | |
return $fields; | |
} |
View .htaccess
This file contains 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
# add this code to your .htaccess file (Apache based servers only) | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_URI} \.(jpg|jpeg|png|gif|bmp|ico|css|js|swf|htm|html|txt|php|asp|aspx)$ [NC] | |
RewriteRule .* - [L,R=404] | |
</IfModule> |
View mysql_db_backup.sh
This file contains 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/sh | |
# Find out what databases are in mysql and back them up | |
# Delete old backups | |
STARTTIME=` date +%Y%m%d-%H%M ` | |
BACKUP_DIR="/srv/users/serverpilot/apps/backups" | |
LOGFILE="/srv/users/serverpilot/apps/backups/db_backup.log" | |
USER="root" | |
PASSWD="ENTER_ROOT_PASSWORD" | |
KEEP="20" |
View redirect_user_add.php
This file contains 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 | |
// place this code snippet to the functions.php file from your WordPress child theme | |
add_action("current_screen", "redirect_user_add"); | |
function redirect_user_add() { | |
if (!empty($_GET['id'])) { | |
$currentScreen = get_current_screen(); | |
if ($currentScreen->id == "users") { | |
wp_redirect( admin_url("/user-edit.php?user_id=".(int)$_GET['id']) ); |
View uitverkocht-uitschakelen.php
This file contains 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 | |
// plaats deze code in het functions.php bestand van je child thema | |
add_filter( 'woocommerce_variation_is_active', 'fws_disable_variations_out_of_stock', 10, 2 ); | |
function fws_disable_variations_out_of_stock( $is_active, $variation ) { | |
if ( ! $variation->is_in_stock() ) return false; | |
return $is_active; | |
} |
View Admin_columns_variation_name.php
This file contains 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 | |
function ac_column_value_usage( $col_value, $id, AC\Column $column ) { | |
if ('column-wc-product_details' == $column->get_type()) { | |
$order = wc_get_order( $id ); | |
foreach ( $order->get_items() as $item_id => $item ) { | |
if ( $item->get_variation_id() ) { | |
$product = $item->get_product(); | |
foreach ( $product->get_attributes() as $attribute => $value ) { | |
$name = term_exists( $value, $attribute ) ? get_term_by( 'slug', $value, $attribute )->name : $value; | |
$col_value = $col_value .'<br>' . $name; |
View functions.php
This file contains 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 | |
function fws_enqueue_recaptcha() { | |
$sitekey = mysitekey'; | |
wp_enqueue_script( 'fws-recaptcha', '//www.google.com/recaptcha/api.js?render=' . $sitekey, null, null, true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'oceanwp_child_enqueue_parent_style' ); | |
View check-email-list.php
This file contains 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 | |
set_time_limit(0); | |
ini_set('memory_limit', '2048M'); // if your list is very long | |
$api_key = 'PLACE HERE YOUR API'; | |
$fp = fopen('emailchecked.csv', 'w'); | |
fputcsv($fp, array('Email address', 'Valid MX', 'Valid SMTP', 'Score')); | |
$count = 0; |
NewerOlder