This file contains 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 | |
add_action( 'popmake_get_the_popup_data_attr', 'my_custom_popup_data_attr', 10, 2 ); | |
function my_custom_popup_data_attr( $data_attr, $popup_id ) { | |
if ( $popup_id == 123 && empty( $_GET['popup'] ) ) { | |
unset( $data_attr['meta']['auto_open'] ); | |
} | |
return $data_attr; | |
} |
This file contains 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 | |
global $fs; | |
$values = array( | |
'free1' => 'Free 1', | |
'free2' => 'Free 2', | |
# if ( $fs->is__premium_only() ) : | |
'pro1' => 'Pro 1', | |
'pro2' => 'Pro 2', | |
# endif; |
This file contains 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 Chain_Demo { | |
private $variable = null; | |
private $method = 'get'; | |
public function set() { | |
$this->method = 'set'; | |
return $this; |
This file contains 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 | |
/** | |
* Convert a comma separated file into an associated array. | |
* The first row should contain the array keys. | |
* | |
* Example: | |
* | |
* @param string $filename Path to the CSV file | |
* @param string $delimiter The separator used in the file | |
* @return array |
This file contains 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 | |
function sort_by_string_position( $a, $b ) { | |
$num = ' Pages Posts'; | |
$ai = stripos( $num, $a ); | |
$bi = stripos( $num, $b ); | |
// If its not set move it to the end of the line. | |
if ( ! $ai ) { | |
$ai = strlen( $num ); | |
} |
This file contains 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 | |
function sort_array_using_array( $a, $b ) { | |
$order = array( | |
__( 'First', 'popup-maker' ), | |
__( 'Second', 'popup-maker' ), | |
__( 'Third', 'popup-maker' ), | |
); | |
$ai = in_array( $a, $order ) ? array_search ( $a, $order ) : count( $order ) + 1; | |
$bi = in_array( $b, $order ) ? array_search ( $b, $order ) : count( $order ) + 1; |
This file contains 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
<input type="checkbox" value="1" name="popup_display_position_fixed" id="popup_display_position_fixed" <?php checked( $position_fixed, 1 ); ?>/> |
This file contains 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 | |
/* | |
Plugin Name: Easy Digital Downloads - Clean unused & expired discounts | |
Version: 1.0 | |
Description: Clears expired & unused discounts in EDD daily. | |
Author: Daniel Iser | |
Author URI: http://presspowered.com | |
Original Author: Danny van Kooten | |
Original Author URI: http://dvk.co/ |
This file contains 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 | |
add_action( 'wp_footer', 'custom_popup_js', 1000 ); | |
function custom_popup_js() { ?> | |
<script type="text/javascript"> | |
(function ($, document) { | |
$(document).ready(function () { | |
var hash = window.location.hash, | |
selector = $('#'+hash); | |
if (selector.length) { | |
selector.popmake('open'); |