Last active
August 29, 2015 14:16
-
-
Save ahmedeshaan/28f45ef2a36cf151eb76 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<div class="wp-social-box"> | |
<h3>Xpert Optin Option</h3> | |
<form class="optin-form" method="post"> | |
<div class="width-70"> | |
<label for="title">On Page Load</label> | |
<input type="checkbox" name="block_one" value="onloadValue"></input> | |
</div> | |
<div class="width-70"> | |
<label for="block_one_position">Select</label> | |
<select name="block_one_position" id="block_one_position"> | |
<option value="top">Top</option> | |
<option value="middle">Middle</option> | |
<option value="bottom">Bottom</option> | |
</select> | |
</div> | |
<div class="modal-footer"> | |
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes" /></p> | |
</div> | |
</form> | |
</div> | |
<?php | |
if(isset($_POST['block_one']) && !empty($_POST['block_one'])) { | |
$onLoad = $_POST['block_one']; | |
if($onLoad == 'onloadValue'){ | |
wp_enqueue_script('app-optin-js', plugins_url('assets/js/app_optin.js', __FILE__), array('jquery')); | |
} | |
} |
obiPlabon
commented
Mar 3, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment