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 | |
$random[] = '<a href="http://www.all4yourwebsite.com/" title="Website templates, dreamweaver templates, flash intro templates"><img src="images/banners/all4webBanner468_60.jpg" alt="all4yourWebsite.com - web design templates" /></a>'; | |
$random[] = '<a href="http://www.designers-website.eu/" title="Premium Web Design Templates"><img src="/images/banners/designers_website_468_60.jpg" alt="Designers Website" /></a>'; | |
// ad more banners if you like | |
$random[] = '<script type="text/javascript"><!-- | |
google_ad_client = "pub-xxxxxxxxxxx"; | |
google_ad_width = 468; |
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 | |
$cache_time = 3600*24; // 24 hours | |
$cache_file = $_SERVER['DOCUMENT_ROOT'].'/cache/test.rss'; | |
$timedif = @(time() - filemtime($cache_file)); | |
if (file_exists($cache_file) && $timedif < $cache_time) { | |
$string = file_get_contents($cache_file); | |
} else { | |
$string = file_get_contents('http://www.web-development-blog.com/feed/'); |
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
order deny, allow | |
deny from all | |
# geef hier uw IP adres op | |
Allow from 95.397.xxx.xxx | |
# misschien heeft u nog een 2. IP adres? | |
#Allow from 177.165.xxx.xxx |
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
User-agent: * | |
Disallow: *.php | |
Disallow: */feed/ | |
Sitemap: http://www.uwdomeinnaam.nl/sitemap_index.xml |
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
function add_thickbox_attributes_gallery_link( $anchor_tag, $image_id ) { | |
$image = get_post( $image_id ); | |
if( isset($image->post_parent)) { | |
$rel = '<a class="thickbox" rel="attached-to-'.intval($image->post_parent).'"'; | |
$anchor_tag = str_replace('<a', $rel, $anchor_tag); | |
} | |
return $anchor_tag; | |
} | |
add_filter('wp_get_attachment_link', 'add_thickbox_attributes_gallery_link', 1, 2); |
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 a widget to the dashboard. | |
* | |
* This function is hooked into the 'wp_dashboard_setup' action below. | |
*/ | |
function mk_posts_like_stats_widget() { | |
wp_add_dashboard_widget('mk_posts_like_stats', 'Popular Post Stats', 'mk_posts_like_stats_func'); |
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 | |
/* | |
Redirect customers from the checkout page to the my account page | |
Conditions: not logged in, no guest checkout and not yes received an order | |
The query var redirect_to_checkout, this one is used to redirect back to the checkout after login or registration | |
*/ | |
function checkout_template_redirect() { | |
global $wp; | |
$guest = get_query_var( 'guest', '' ); |
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 to your theme's functions.php file | |
function add_noindex_for_feeds($headers) { | |
$req_uri = filter_input(INPUT_SERVER, 'REQUEST_URI'); | |
if ( '/feed/' == substr($req_uri, -6) ) { | |
$headers['X-Robots-Tag'] = 'noindex'; | |
} | |
return $headers; | |
} |
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 WordPress (child) theme | |
// Let op, niet alle bestandstypes zijn veilig voor de uploadfunctie. | |
function fws_add_file_types_to_uploads($file_types){ | |
$new_filetypes = array(); | |
$new_filetypes['svg'] = 'image/svg+xml'; | |
$new_filetypes['zip'] = 'application/zip'; | |
$file_types = array_merge($file_types, $new_filetypes ); | |
return $file_types; |
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 | |
// the Serverpilot wrapper, get it the class from https://github.com/daverogers/serverpilot-php | |
include_once 'ServerPilot.php'; | |
$sp_id = 'SPCLIENTID'; | |
$api_key = 'SPAPIKEY'; | |
// you can find those id's in the URL from your Serverpilot application | |
$from_server = 'MIGRATEFROM'; | |
$to_server = 'MIGRATETO'; |