Example #1
0
		</div> <!-- /container -->
	</section>

	<!-- Modal -->
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

	  	<div class="modal-dialog">
		    <div class="modal-content">
		      	<div class="modal-header">
		        	<button type="button" class="close" data-dismiss="modal">
		        	<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
		        	</button>
		        	<h3>Formulario de Contacto</h3>
		      	</div>
		      	<div class="modal-body">
		      		<?php $sr_only = (is_ie() && get_browser_version() <= 9) ? '' : 'sr-only'; ?>
                	<!-- Change the "action" attribute to your back-end URL -->
	                <form id="registrationForm" method="post" action="<?php echo get_permalink($wp_query->post->ID); ?>">
						<div class="row">
	                		<div class="col-xs-6">
								<div class="form-group <?php if ($error_name) echo 'has-error'; ?>">
									<label class="<?php echo $sr_only; ?>" for="contact_name">Nombre Completo (*)</label>
									<input type="text" class="form-control" id="contact_name" name="contact_name" placeholder="Nombre Completo (*)" value="<?php if (isset($_POST['contact_name'])) echo esc_attr($_POST['contact_name']); ?>" />
								</div>

								<div class="form-group <?php if ($error_email) echo 'has-error'; ?>">
									<label class="<?php echo $sr_only; ?>" for="contact_email">Correo EletrĂ³nico (*)</label>
									<input type="email" class="form-control" id="contact_email" name="contact_email" placeholder="Correo EletrĂ³nico (*)" value="<?php if (isset($_POST['contact_email'])) echo esc_attr($_POST['contact_email']); ?>" />
								</div>

								<div class="form-group <?php if ($error_ruc) echo 'has-error'; ?>">
				</div>

				<div style="padding:5px; margin:10px 0; border-radius:5px; background:#E6E6E6">
					<p>Get browser name:</p>
					<?php 
        echo '<pre>get_browser_name() = ';
        echo get_browser_name();
        echo '</pre>';
        ?>
				</div>

				<div style="padding:5px; margin:10px 0; border-radius:5px; background:#E6E6E6">
					<p>Get browser version:</p>
					<?php 
        echo '<pre>get_browser_version() = ';
        echo get_browser_version();
        echo '</pre>';
        ?>
				</div>

				<div style="padding:5px; margin:10px 0; border-radius:5px; background:#E6E6E6">
					<p>Test for specific browsers:</p>
					<?php 
        echo '<pre>is_firefox() = ';
        echo is_firefox();
        echo '</pre>';
        echo '<pre>is_safari() = ';
        echo is_safari();
        echo '</pre>';
        echo '<pre>is_chrome() = ';
        echo is_chrome();
Example #3
0
        echo '<pre>browser_supports_css() = ';
        echo browser_supports_css();
        echo '</pre>';
        ?>
						</div>

						<div style="padding:5px; margin:10px 0; border-radius:5px; background:#E6E6E6">
							<p>Test for higher or lower versions of a browser:</p>
							<?php 
        echo '<pre>if(is_ie() && get_browser_version() < 10) = ';
        if (is_ie() && get_browser_version() < 10) {
            echo TRUE;
        }
        echo '</pre>';
        echo '<pre>if(is_firefox() && get_browser_version() >= 19) = ';
        if (is_firefox() && get_browser_version() >= 19) {
            echo TRUE;
        }
        ?>
						</div>

						<div style="padding:5px; margin:10px 0; border-radius:5px; background:#E6E6E6">
							<p>Test for specific versions of a browser:</p>
							<?php 
        echo '<pre>if(is_ie(11)) = ';
        if (is_ie(11)) {
            echo TRUE;
        }
        echo '</pre>';
        echo '<pre>if(is_firefox(35)) = ';
        if (is_firefox(35)) {
Example #4
0
/**
 * Conditional to test for less than IE11.
 *
 * @return bool
 * @deprecated Use the future-proof syntax instead of this function: if(is_ie() && get_browser_version() < 11) { }
 */
function is_lt_IE11() {
	_deprecated_function(__FUNCTION__, '3.6', 'is_ie');
	if (is_ie() && get_browser_version() < 11) {
		return TRUE;
	} else {
		return FALSE;
	}
}