First create global variables (in functions.php or as a mu-plugin):
<?php
/*
* CUSTOM GLOBAL VARIABLES
*/
function wtnerd_global_vars() {| <?php | |
| /** | |
| * This is free and unencumbered software released into the public domain. | |
| * | |
| * Anyone is free to copy, modify, publish, use, compile, sell, or | |
| * distribute this software, either in source code form or as a compiled | |
| * binary, for any purpose, commercial or non-commercial, and by any | |
| * means. | |
| * |
| <?php | |
| $regions = array( | |
| 'Africa' => DateTimeZone::AFRICA, | |
| 'America' => DateTimeZone::AMERICA, | |
| 'Antarctica' => DateTimeZone::ANTARCTICA, | |
| 'Aisa' => DateTimeZone::ASIA, | |
| 'Atlantic' => DateTimeZone::ATLANTIC, | |
| 'Europe' => DateTimeZone::EUROPE, | |
| 'Indian' => DateTimeZone::INDIAN, | |
| 'Pacific' => DateTimeZone::PACIFIC |
| ############################################################################### | |
| # The MIT License | |
| # | |
| # Copyright 2012-2014 Jakub Jirutka <[email protected]>. | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is |
| // When true, the form will be saved to DB after dynamic population | |
| define('EO_SAVE_FORM_ON_PRE_RENDER', true); | |
| // Adds a filter to form id 7. Replace 26 with your actual form id | |
| add_filter('gform_pre_render_7', 'eo_populate_checkbox'); | |
| add_filter('gform_admin_pre_render_7', 'eo_populate_checkbox'); | |
| function eo_populate_checkbox($form) { | |
| if (EO_SAVE_FORM_ON_PRE_RENDER) |
| <?php | |
| /** | |
| Plugin Name: Gravity Forms Cookies | |
| Plugin URI: http://ounceoftalent.com/ | |
| Description: Saves the query string parameters from a users visit to a cookie and allows these values to be populated via Gravity Forms' Dynamic Population feature. | |
| Version: 1.5 | |
| Author: David Smith | |
| Author URI: http://ounceoftalent.com | |
| License: GPL2 | |
| */ |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| ########################################### | |
| # IMPORTANT NOTE: | |
| # | |
| # As of asuswrt-merlin 380.67 Beta, you | |
| # can now configure SSL certificates from | |
| # the Webui, making these instructions | |
| # unnecessary. | |
| ########################################### | |
| //require cyrpto module | |
| var crypto=require('crypto'); | |
| //key and iv should be same as the one in encrypt.php | |
| var decipher=crypto.createDecipheriv('aes-256-cbc','12345678901234561234567890123456','1234567890123456'); | |
| //since we have already added padding while encrypting, we will set autopadding of node js to false. | |
| decipher.setAutoPadding(false); | |
| // copy the output of encrypt.php and paste it below |
First create global variables (in functions.php or as a mu-plugin):
<?php
/*
* CUSTOM GLOBAL VARIABLES
*/
function wtnerd_global_vars() {| <?php | |
| //Simple Ajax Login Form | |
| //Source: http://natko.com/wordpress-ajax-login-without-a-plugin-the-right-way/ | |
| ?> | |
| //html | |
| <form id="login" action="login" method="post"> | |
| <h1>Site Login</h1> | |
| <p class="status"></p> | |
| <label for="username">Username</label> |