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
var buttonChange = document.querySelector('#dns-content-nameservers button'); | |
buttonChange.click(); | |
setTimeout(function() { | |
var radioCustom = document.querySelector('#nameserver-type-CUSTOM'), | |
list = ['new nameserver #1', 'new nameserver #2', 'new nameserver #3', 'new nameserver #4']; | |
radioCustom.click(); | |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f [NC] | |
RewriteRule ^(.*\.(js|css|png|jpe?g|gif|ico)) https://domainname.com/$1 [QSA,L,C] | |
</IfModule> |
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
# Basic Settings | |
# | |
fontName = "Monaco" | |
fontSize = 16 | |
# Extra files to include | |
# | |
myExtraIncludes = ".tm_properties,.htaccess,.gitignore" | |
fileBrowserGlob = "{*,$myExtraIncludes}" | |
include = "{$include,$myExtraIncludes}" |
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
function action_pmxi_saved_post( $id ) { | |
$dir = wp_upload_dir(); | |
$img_array = []; | |
$media = get_attached_media('image', $id); | |
$thepost = get_post($id); | |
foreach($media as $media_id => $item) { | |
$metadata = wp_get_attachment_metadata($item->ID, true); | |
$directory = explode('/', $metadata['file']); | |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f [NC] | |
RewriteRule ^(.*\.(js|css|png|jpe?g|gif|ico)) https://www.example.com/$1 [QSA,L,C] | |
</IfModule> | |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / |
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
# Virtual Hosts | |
# | |
# Required modules: mod_log_config | |
# If you want to maintain multiple domains/hostnames on your | |
# machine you can setup VirtualHost containers for them. Most configurations | |
# use only name-based virtual hosts so the server doesn't need to worry about | |
# IP addresses. This is indicated by the asterisks in the directives below. | |
# | |
# Please see the documentation at |
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
function create_field( $field ) | |
{ | |
$o = array( 'id', 'class', 'min', 'max', 'step', 'name', 'value' ); | |
$e = '<input type="number"'; | |
foreach( $o as $k ) | |
{ | |
$val = $field[ $k ]; | |
if ( $k == 'step' && empty($val) ) $val = 'any'; | |
$e .= ' ' . $k . '="' . esc_attr( $val ) . '"'; |
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_head', 'form_acf', 10 ); | |
public function form_acf() { | |
if ( is_page('Add an Opportunity') ) { | |
echo '<script src="https://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>'; | |
acf_form_head(); | |
} | |
} |
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
function wordpress_fix_bug( $wp_query ) { | |
// The function below is a temporary fix for this bug: http://core.trac.wordpress.org/ticket/18614 | |
if ( $wp_query->is_post_type_archive && $wp_query->is_tax ) { | |
global $post_type_obj; | |
$wp_query->is_tax = false; | |
$post_type_obj = get_queried_object(); | |
if (empty($post_type_obj->labels)) { | |
$post_type_obj->labels = new stdClass(); | |
$post_type_obj->labels->name = 'dev/hack to fix WordPress Bug'; | |
} |
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
if ( $crop ) { | |
$cmp_x = $orig_width / $dest_width; | |
$cmp_y = $orig_height / $dest_height; | |
// Calculate x or y coordinate, and width or height of source | |
if ( $cmp_x > $cmp_y ) { | |
$src_w = round( $orig_width / $cmp_x * $cmp_y ); | |
$src_x = round( ( $orig_width - ( $orig_width / $cmp_x * $cmp_y ) ) / 2 ); | |
} | |
else if ( $cmp_y > $cmp_x ) { | |
$src_h = round( $orig_height / $cmp_y * $cmp_x ); |
NewerOlder