I hereby claim:
- I am benracicot on github.
- I am benracicot (https://keybase.io/benracicot) on keybase.
- I have a public key ASBKBJ2svvYhwpWSwq3bx57zse0eaexCiGJmKbK2GlPHpgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # Only allow internal IP to access login page | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR] | |
| RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$ | |
| RewriteCond %{REMOTE_ADDR} !^xx.xxx.xx.xxx$ | |
| RewriteRule ^(.*)$ - [R=403,L] | |
| </IfModule> |
| String.prototype.plural = function () { | |
| // last character | |
| var last = this.charAt(this.length-1); | |
| if (this.last === 'y') { | |
| if ( (this.charAt(this.length - 2)).isVowel() ) { | |
| // If the y has a vowel before it (i.e. toys), then you just add the s. | |
| return this + 's'; | |
| } | |
| else { |
| add_action( 'init', 'my_ajax_init' ); | |
| function my_ajax_init() { | |
| add_action('wp_ajax_nopriv_create_user', 'create_user_function'); | |
| add_action('wp_ajax_create_user', 'create_user_function'); | |
| } | |
| <?php | |
| // Add this code to functions.php to create a custom table to store order data. | |
| // ALTERNATE | |
| // Use a CPT to create a post each time an order is made. | |
| // require_once('order-post-type.php'); | |
| // ALTERNATE | |
| <?php | |
| // Base AJAX Pagination code | |
| //Bad practice: // header.php | |
| function custom_head(){ | |
| echo '<script type="text/javascript">var ajaxurl = \''.admin_url('admin-ajax.php').'\';</script>'; | |
| } |