<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Development - Web Development Tutorial for Developer&#039;s, Asp.net Tutorial, PHP Development, Wordpress Integration &#187; WordPress</title>
	<atom:link href="http://www.solutions4ever.net/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.solutions4ever.net</link>
	<description>Web Development Solutions Provider</description>
	<lastBuildDate>Mon, 30 Jan 2012 10:11:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Phone number validation in contact form 7</title>
		<link>http://www.solutions4ever.net/2011/04/phone-number-validation-in-contact-form-7/</link>
		<comments>http://www.solutions4ever.net/2011/04/phone-number-validation-in-contact-form-7/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 08:15:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.solutions4ever.net/?p=277</guid>
		<description><![CDATA[<p>If you want to validate you phone number within contact form 7 wordpress plugin. Here is the great example of that. Please follow the give steps .</p>
<p>first, i went to the plugin folder and edited, contact-form-7/modules/text.php
and created a new function (please excuse my mistakes in naming conventions).</p>
<p>1. i inserted this  ... <a href="http://www.solutions4ever.net/2011/04/phone-number-validation-in-contact-form-7/" class="expert-read-more" >Read More</a>]]></description>
			<content:encoded><![CDATA[<p>If you want to validate you phone number within contact form 7 wordpress plugin. Here is the great example of that. Please follow the give steps .</p>
<p>first, i went to the plugin folder and edited, contact-form-7/modules/text.php<br />
and created a new function (please excuse my mistakes in naming conventions).</p>
<p>1. i inserted this code:<br />
wpcf7_add_shortcode( &#8216;digit&#8217;, &#8216;wpcf7_text_shortcode_handler&#8217;, true );<br />
wpcf7_add_shortcode( &#8216;digit*&#8217;, &#8216;wpcf7_text_shortcode_handler&#8217;, true );</p>
<p>after this:<br />
wpcf7_add_shortcode( &#8216;email*&#8217;, &#8216;wpcf7_text_shortcode_handler&#8217;, true );</p>
<p>2. i inserted this code:<br />
if ( &#8216;digit&#8217; == $type || &#8216;digit*&#8217; == $type )<br />
$class_att .= &#8216; wpcf7-validates-as-digit&#8217;;</p>
<p>after this:<br />
if ( &#8216;text*&#8217; == $type || &#8216;email*&#8217; == $type )<br />
$class_att .= &#8216; wpcf7-validates-as-required&#8217;;</p>
<p>3. i inserted this code:<br />
add_filter( &#8216;wpcf7_validate_email*&#8217;, &#8216;wpcf7_text_validation_filter&#8217;, 10, 2 );<br />
add_filter( &#8216;wpcf7_validate_digit*&#8217;, &#8216;wpcf7_text_validation_filter&#8217;, 10, 2 );</p>
<p>after this:<br />
add_filter( &#8216;wpcf7_validate_email&#8217;, &#8216;wpcf7_text_validation_filter&#8217;, 10, 2 );</p>
<p>4. i inserted this code:<br />
if ( &#8216;digit&#8217; == $type || &#8216;digit*&#8217; == $type ) {<br />
if ( &#8221; == $_POST[$name] ) {<br />
$result['valid'] = false;<br />
$result['reason'][$name] = $wpcf7_contact_form->message( &#8216;invalid_required&#8217; );<br />
}<br />
elseif ( &#8221; != $_POST[$name] &#038;&#038; ! is_telnum( $_POST[$name] ) ) {<br />
$result['valid'] = false;<br />
$result['reason'][$name] = $wpcf7_contact_form->message( &#8216;invalid_digit&#8217; );<br />
}<br />
}</p>
<p>after this if code:<br />
if ( &#8216;email&#8217; == $type || &#8216;email*&#8217; == $type ) {<br />
if ( &#8216;email*&#8217; == $type &#038;&#038; &#8221; == $_POST[$name] ) {<br />
$result['valid'] = false;<br />
$result['reason'][$name] = $wpcf7_contact_form->message( &#8216;invalid_required&#8217; );<br />
} elseif ( &#8221; != $_POST[$name] &#038;&#038; ! is_email( $_POST[$name] ) ) {<br />
$result['valid'] = false;<br />
$result['reason'][$name] = $wpcf7_contact_form->message( &#8216;invalid_email&#8217; );<br />
}<br />
}</p>
<p>second, i went to contact-form-7/includes/functions.php to add the error message for the telephone number validation.</p>
<p>1. i inserted this code:<br />
&#8216;invalid_digit&#8217; => array(<br />
&#8216;description&#8217; => __( &#8220;There is a field that sender is needed to fill in with numbers&#8221;, &#8216;wpcf7&#8242; ),<br />
&#8216;default&#8217; => __( &#8216;Please fill the required field with numbers.&#8217;, &#8216;wpcf7&#8242; )<br />
)</p>
<p>after this code:<br />
&#8216;invalid_required&#8217; => array(<br />
&#8216;description&#8217; => __( &#8220;There is a field that sender is needed to fill in&#8221;, &#8216;wpcf7&#8242; ),<br />
&#8216;default&#8217; => __( &#8216;Please fill the required field.&#8217;, &#8216;wpcf7&#8242; )<br />
),</p>
<p>third, i went to the formatting file located at wp-includes/formatting.php and created a new function</p>
<p>function is_telnum($telnum)<br />
{<br />
$regexp = &#8216;/^[0-9\+\-]{7,}$/&#8217;;</p>
<p>if(preg_match($regexp, $telnum))<br />
return true;<br />
else<br />
return false;<br />
}</p>
<p>NOTE:<br />
in my code, i created a function wherein the input text for the telephone number will accept minimum of 7 characters (this only includes numbers and characters + and -)</p>
<p>example of valid inputs:<br />
+1234567<br />
01234567<br />
02-1234567</p>
<p>Now to use it in the contact form 7, please use this tag just<br />
Your Phone</td>
<td>[digit* text-417]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solutions4ever.net/2011/04/phone-number-validation-in-contact-form-7/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin Development</title>
		<link>http://www.solutions4ever.net/2010/02/wordpress-plugin-development/</link>
		<comments>http://www.solutions4ever.net/2010/02/wordpress-plugin-development/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 09:59:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.solutions4ever.net/2010/02/wordpress-plugin-development/</guid>
		<description><![CDATA[<p>Introduction</p>
<p>WordPress Plugins permit easy modification, customization, and enhancement to a WordPress blog.  As an alternative of changing the core programming of WordPress, you can add functionality with WordPress Plugins. Here is a basic explanation:</p>
<p>WordPress Plugin: A WordPress Plugin is a program, or a set of one or more functions, written  ... <a href="http://www.solutions4ever.net/2010/02/wordpress-plugin-development/" class="expert-read-more" >Read More</a>]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>WordPress Plugins permit easy modification, customization, and enhancement to a WordPress blog.  As an alternative of changing the core programming of WordPress, you can add functionality with WordPress Plugins. Here is a basic explanation:</p>
<p><strong>WordPress Plugin:</strong> A WordPress Plugin is a program, or a set of one or more functions, written in the PHP scripting language, that adds a particular set of features or services to the WordPress weblog, which can be effortlessly integrated with the weblog using access points and methods provided by the WordPress Plugin Application Program Interface (API).</p>
<p>Wish that WordPress had some new or customized functionality? The first thing to do is to search various WordPress Plugin repositories and sources to see if someone has already created a WordPress Plugin that suits your needs. Also we can help you develop or convert any wordpress plugin as per your needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solutions4ever.net/2010/02/wordpress-plugin-development/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

