Mar 03

Sample 404 Error Image

If you attempt to access the URL of a non-existent image file on a website – say a jpg, png or gif file – you will usually be redirected to the 404 error page. If the image is embedded via an HTML img tag, this will normally result in your browser displaying a missing image icon.

Instead, we can handle this in a more elegant way by creating a special 404 Error image which will be returned when someone attempts to request a non-existent image file on your website.

All we have to do is:
Continue reading »

Tags:

Mar 03

This snippet of PHP code takes any shortened URL, like those from Bitly, Google or Twitter, and expands it into the full and final destination URL.

function expandShortUrl($url)
{
	$headers = get_headers($url, 1);

	$loc = $headers['Location'];
	if(is_array($loc))
	{
		// get the highest numeric index
		$key = max(array_keys( $loc));
		return $loc[$key];
	}
	else
	{
		return $loc;
	}
}

Hat Tip: Deluxe Blog Tips and Karl Groves – Easily Expand Short URL Using PHP

Tags: ,

Mar 03

This piece of code will allow any user with the capability of ‘moderate_comments’, to include a shortcode within a post comment. If the user does not have this permission, any shortcodes will be displayed as normal text. The code should be placed inside your theme’s functions.php file.

This is useful when combined with affiliate marketing plugins that allow you to display a clickable ad using a shortcode. A visitor to your site might post a comment on an article, requesting a recommendation for a product. You can then reply to their comment, and include a affiliate link or banner ad that advertises the product in question.

For example, you may post an article about Tennis, and a user may request a recommendation for a suitable tennis racket. You can then reply with a recommendation for a racket, with an advertisement for that racket that any user who reads that ad may decide to click.

function filterComments($comments)
{
	$filtered_comments = array();
	foreach ($comments as $comment)
	{
		// if not registered
		if ($comment->user_id == 0)
		{
			$filtered_comments[] = $comment;
		}
		else
		{
			$comment_author = new WP_User($comment->user_id);
			// if has capability 'moderate_comments'
			if ($comment_author->has_cap('moderate_comments'))
			{
				$comment->comment_content = do_shortcode($comment->comment_content);
				$filtered_comments[] = $comment;
			}
			else
			{
				$filtered_comments[] = $comment;
			}
		}
	}
	return $filtered_comments;
}

add_filter( 'comments_array', 'filterComments' );
Mar 01
  • AussieWPExpert: WordPress plugin Color Scheme every Theme lets you change the colours of any theme via the theme customizer: http://t.co/ct0ob19JUj
  • AussieWPExpert: How to test which of the WordPress Jetpack plugin's modules are enabled using PHP code: http://t.co/BCxyryHAmM
  • AussieWPExpert: How to set up numbered page navigation in the WordPress Thesis theme version 1.x: http://t.co/4jyzA3C3re
  • AussieWPExpert: WordPress plugin Conversation Starter increases user participation by prompting them to answer questions in the post: http://t.co/IldevW9LCc
  • AussieWPExpert: WordPress plugin "Where did they go from here" show what else readers who viewed a page also viewed on the site – http://t.co/zU8KXfytGA
  • AussieWPExpert: WP Author Slug plugin improves WordPress security by preventing login names from appearing in the author archive URL: http://t.co/nX6TbgacSP
  • AussieWPExpert: WordPress plugin Simple Pagination lets you set up advanced pagination for posts and comments, with 6 stylesheets: http://t.co/my5QIfrUPA
  • AussieWPExpert: WP-AutoSharePost plugin automatically shares WordPress posts on facebook/twitter and scrapes the facebook comments: http://t.co/bBlAMBtgEf
  • AussieWPExpert: plugin Really Static creates static html files from your WordPress blog whenever a post/comment is published/edited: http://t.co/whpatQXa24
  • AussieWPExpert: WordPress plugin Real IP 4 Comments corrects post commenters' IP addresses when they are accessing behind a proxy – http://t.co/Zlgu1d427U
  • AussieWPExpert: Plugin lets you publish/embed your Tweets to your WordPress blog automatically or manually with a single click – http://t.co/4qR36sfmFx
  • AussieWPExpert: WPExplorer: My Useful WordPress Snippets List By Remi Corson – http://t.co/pVTW78urvA
  • AussieWPExpert: WP Page Widget lets you customise the widgets displayed for each WordPress page, post and custom post type – http://t.co/ujGAouGBCZ
  • AussieWPExpert: Brief Blogs for Week Ending February 22, 2013 http://t.co/6dep2uABxA

css.php
  • https://faire-revenir-son-ex.com/sitemap.txt
  • https://everestgliders.com/sitemap.txt
  • https://behroo165.com/sitemap.txt
  • https://afftray.com/sitemap.txt
  • https://newsify.press/sitemap.txt
  • https://2bfoot.com/sitemap.txt
  • https://pantryz.com/sitemap.txt
  • https://nextgendataguru.com/sitemap.txt
  • https://wnewstv.com/sitemap.txt
  • http://i-park.org/sitemap.txt
  • https://10xtravel.com/sitemap.txt
  • https://edebiyatist.com/sitemap.txt
  • https://ytiyonkers.org/sitemap.txt
  • https://healthynights.co/sitemap.txt
  • https://3dmodely.ru/sitemap.txt
  • https://499football.com/sitemap.txt
  • https://admselenga.ru/sitemap.txt
  • https://ambia.ru/sitemap.txt
  • https://arteninaoltu.com/sitemap.txt
  • https://artislogistics.pro/sitemap.txt
  • https://artmama-mouse.ru/sitemap.txt
  • https://audit-research-center.com/sitemap.txt
  • https://avtoznak.ru/sitemap.txt
  • https://baikal-sera.ru/sitemap.txt
  • https://bethazor.com/sitemap.txt
  • https://bio7septic.ru/sitemap.txt
  • https://biotique-shop.ru/sitemap.txt
  • https://biserstav.ru/sitemap.txt
  • https://blowcamp.com/sitemap.txt
  • https://burger1.rest/sitemap.txt
  • http://wpsecure.be
  • http://wpskill.com
  • https://wpua.cloud
  • http://wresidencescostarica.com
  • https://wsportals.com
  • https://wssrradio.com
  • https://ws-start.ru
  • https://wyomingadvocates.com
  • http://wzonez.com
  • https://xanahosting.com
  • https://xcitercalls.com
  • https://xelbookings.com
  • https://xenvious.com
  • https://ximenamargain.com
  • http://xn--12cc2eo0ezb5as.com
  • http://xn--42cgaan6dxdxace0c1dg8cs4cu3n9fdh.com
  • http://xn--82cz5bqv8f.com
  • http://xn--thringen-verzaubert-69b.de
  • https://xrsw.uk
  • https://xsytikaa.com
  • https://yamaguchi-sokkyo.or.jp
  • https://yaminpublishing.com
  • https://yashhomes.ca
  • http://yellbitcoin.com
  • http://yestrading.net
  • https://yeungmarineholdings.com
  • https://yilsezklima.com
  • https://ymaa.pl
  • https://ymaaeurope.com
  • https://yogaineverydaylife.com
  • https://yogaworlds.in
  • http://yosoy.esy.es
  • http://youcalltheshots.net
  • https://youlooklovely.co
  • http://youlooklovely.photography
  • http://younkakura.com
  • https://yourroadstosuccess.com
  • https://youthfulandageless.com
  • https://yoyoriyu.com
  • https://ytiyonkers.org
  • https://yukomexico.com
  • https://yulehit.com
  • http://yusufyarar.com
  • http://yvonnevandermeer.nl
  • https://zabumutua.com
  • http://zakerhaghighi.ir
  • https://zakynthos2019.nl
  • https://zamacon.es
  • https://zbudujdom.net
  • https://zebiam.com