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
def incremental_map_reduce( | |
map_f, | |
reduce_f, | |
db, | |
source_table_name, | |
target_table_name, | |
source_queued_date_field_name, | |
counter_table_name = "IncrementalMRCounters", | |
counter_key = None, | |
max_datetime = None, |
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 ACF_File_Custom { | |
private static $instance; | |
public static function register() { | |
if ( self::$instance == null ) { | |
self::$instance = new ACF_File_Custom(); | |
} | |
} |
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 | |
/* | |
* Include this inside your functions.php with an include_once() or something | |
* | |
* DEFINITELY do a DB backup first!! | |
*/ | |
function iso_adjustment_query() { |
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
add_action( 'wp_enqueue_scripts', 'my_strength_meter_localize_script' ); | |
function my_strength_meter_localize_script() { | |
wp_localize_script( 'password-strength-meter', 'pwsL10n', array( | |
'empty' => __( 'But... it\'s empty!', 'theme-domain' ), | |
'short' => __( 'Too short!', 'theme-domain' ), | |
'bad' => __( 'Not even close!', 'theme-domain' ), | |
'good' => __( 'You are getting closer...', 'theme-domain' ), | |
'strong' => __( 'Now, that\'s a password!', 'theme-domain' ), | |
'mismatch' => __( 'They are completely different, come on!', 'theme-domain' ) | |
) ); |
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 | |
// RESTRICT ACCESS TO WP-ADMIN DASHBOARD | |
function restrict_admin_access(){ | |
if( !current_user_can( 'edit_posts' ) ) { | |
wp_redirect( home_url() ); | |
die(); | |
} | |
} | |
add_action( 'admin_init', restrict_admin_access, 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 | |
/** | |
* Allow to open password protected pages with the password in URL | |
* For example: http://examle.com/my-protected-page?access_token=2341223 (GET param: ?access_token=[POST PASSWORD]) | |
* Feel free to replace 'access_token' with any other string | |
* | |
* Author: Max Kostinevich | |
* Author URI: https://maxkostinevich.com | |
*/ |
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
<script> | |
(function($) { | |
$(window).load(function() { | |
setTimeout(function() { | |
$('.et-social-icon').each(function() { | |
$(this).children('a').attr('target', '_blank'); | |
}); | |
}, 1500); | |
}); | |
})(jQuery); |
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
public static function delete_signup( $key ) { | |
// get signup from $key ## | |
$signup = GFSignup::get( $key ); | |
// return error, if nothing found ## | |
if( is_wp_error( $signup ) ) { | |
return $signup; | |
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
@media screen and (min-width: 981px) and (max-width: 1230px) { | |
.et_header_style_left .logo_container { | |
position: relative; | |
} | |
#main-header #et-top-navigation { | |
float: none; | |
padding-top: 0; | |
} | |
#main-header #logo { | |
margin: 0px 0 0 12px; |
OlderNewer