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
<?php if ( ! defined( 'ABSPATH' ) ) exit; | |
return apply_filters( 'ninja-forms-unique-field-settings', array( | |
/* | |
* Checkbox Default Value | |
*/ | |
'checkbox_default_value' => array( | |
'name' => 'default_value', | |
'type' => 'select', |
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
<?php | |
$numbers = array( | |
12, | |
1551, | |
'21', | |
'5115', | |
'I am a string', | |
); |
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
<?php | |
$numbers = array( | |
12, | |
1551, | |
'21', | |
'5115', | |
'I am a string', | |
); |
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
<?php | |
//will delete the transient named my_cached_data | |
delete_transient( 'my_cached_data' ); |
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
<?php | |
//Set transient that will be cached for one hour. | |
set_transient('my_cached_data' , $my_object , 60*60); | |
get_transient( 'my_cached_data' ); |
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
<?php | |
get_transient( $transient ); | |
$transient //is the unique string we created earlier. |
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
<?php | |
class Phone | |
{ | |
//Creating private properties | |
private $_type; | |
private $_os; | |
public function setType( $type ) |
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
set_transient( $transient , $value , $expiration); | |
$transient //This is a string that will be used as a unique identifier for your cached data. It must be less than 45 characters. | |
$value //This will be an array, object, or variable you wish to cache. | |
$expiration //An integer of the maximum of seconds to keep the data before expiring. |
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
<?php | |
//Example of single class method chaining | |
class stringExample | |
{ | |
private $str; | |
function __construct() | |
{ | |
$this->str = ''; |
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
//Reassign jQuery call to a variable. | |
var $j = jQuery; | |
//Then use the variable as a wrapper for the jQuery call. | |
$j(#somefunction); |