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
http://example.com/wp-login.php?action=logout |
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
for i in `seq 10`; do openssl rand -base64 16 | colrm 17; done |
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
rsync -avP user@server:/home/servername/website/web/wp-content/uploads/ /Users/yaymark/projects/website/web/wp-content/uploads |
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
UPDATE `wp_users` SET `user_pass`= MD5('tzFuO7YR1ElE85lu3Xmt') WHERE `user_login`='iamtheadminbowbeforeme'; |
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_filter( 'woocommerce_get_price_html', 'my_price_html', 100, 2 ); | |
function my_price_html( $price, $product ){ | |
// swap the regular and sale prices | |
$pos_start = strpos($price, '<del>'); | |
if ($pos_start !== false) { | |
$end = '</del>'; | |
$end_length = strlen($end); | |
$pos_end_start = strpos($price, $end); | |
$pos_end = $pos_end_start + $end_length; |
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 | |
$template = get_page_template_slug(); | |
$args = array( | |
'post_type' => 'page', | |
'meta_query' => array( | |
array( | |
'key' => '_wp_page_template', | |
'value' => $template | |
) | |
) |
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
// Callback function to remove default bio field from user profile page | |
// https://gist.github.com/dkomando/6214787a8d36d9f13c9b | |
if(!function_exists('remove_bio_box')){ | |
function remove_bio_box($buffer){ | |
$buffer = preg_replace('/<tr class=\"user-description-wrap\"[\s\S]*?<\/tr>/','',$buffer,1); | |
return $buffer; | |
} | |
function user_profile_subject_start(){ ob_start('remove_bio_box'); } | |
function user_profile_subject_end(){ ob_end_flush(); } |
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 post_type_no_editor() { | |
$post_type = 'insert_post_type_here'; | |
remove_post_type_support($post_type, 'editor'); | |
} | |
add_action('init', 'post_type_no_editor', 100); |
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 ($) { | |
$.fn.outline = function(options) { | |
var settings = $.extend({ | |
borderWidth: "1px", | |
borderStyle: "solid", | |
borderColor: "red" | |
}, options); | |
return this.css({ | |
borderWidth: settings.borderWidth, |
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 | |
// Apply Bootstrap 4 custom checkboxes and radio buttons to Gravity Fields generated forms | |
// Derived from https://jayhoffmann.com/using-gravity-forms-bootstrap-styles/ | |
add_filter( 'gform_field_container', 'add_bootstrap_control_class', 10, 6 ); | |
function add_bootstrap_control_class( $field_container, $field, $form, $css_class, $style, $field_content ) { | |
$id = $field->id; | |
$field_id = is_admin() || empty( $form ) ? "field_{$id}" : 'field_' . $form['id'] . "_$id"; |