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
python -Xutf8 manage.py dumpdata -o data.json |
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
RewriteEngine On | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R,L] | |
RewriteEngine On | |
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d |
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
RENAME table wp_actionscheduler_actions TO new_actionscheduler_actions; | |
RENAME table wp_actionscheduler_claims TO new_actionscheduler_claims; | |
RENAME table wp_actionscheduler_groups TO new_actionscheduler_groups; | |
RENAME table wp_actionscheduler_logs TO new_actionscheduler_logs; | |
RENAME table wp_commentmeta TO new_commentmeta; | |
RENAME table wp_comments TO new_comments; | |
RENAME table wp_links TO new_links; | |
RENAME table wp_options TO new_options; | |
RENAME table wp_postmeta TO new_postmeta; | |
RENAME table wp_posts TO new_posts; |
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
{ | |
"ad": "Andorra", | |
"ae": "United Arab Emirates", | |
"af": "Afghanistan", | |
"ag": "Antigua and Barbuda", | |
"ai": "Anguilla", | |
"al": "Albania", | |
"am": "Armenia", | |
"ao": "Angola", | |
"aq": "Antarctica", |
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 | |
add_action('wp_ajax_register_user_front_end', 'register_user_front_end', 0); | |
add_action('wp_ajax_nopriv_register_user_front_end', 'register_user_front_end'); | |
function register_user_front_end() { | |
$new_user_name = stripcslashes($_POST['new_user_name']); | |
$new_user_email = stripcslashes($_POST['new_user_email']); | |
$new_user_password = $_POST['new_user_password']; | |
$user_nice_name = strtolower($_POST['new_user_email']); | |
$user_data = array( | |
'user_login' => $new_user_name, |
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
{ | |
"terminal.integrated.fontSize": 14, | |
"workbench.startupEditor": "newUntitledFile", | |
"polacode.backgroundColor": "#6633CC", | |
"editor.tabSize": 2, | |
"editor.fontSize": 16, | |
"editor.lineHeight": 26, | |
"editor.fontFamily": "Fira Code", |
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
admin | |
$P$BqkUCOYZwSyDH864WAQqHQ7.Ld743d0 |
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
function nb_filter_search() | |
{ | |
wp_enqueue_script("js_nb_filter_search", get_stylesheet_directory_uri() . '/js/nbfilter.js', array('jquery'), '1.0', true); | |
wp_localize_script("js_nb_filter_search", 'ajax_nb_filter_search', array('ajax_url' => admin_url('admin-ajax.php'))); | |
} | |
add_action('wp_enqueue_scripts', 'nb_filter_search'); |
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
/*Contact form 7 remove span*/ | |
add_filter('wpcf7_form_elements', function($content) { | |
$content = preg_replace('/<(span).*?class="\s*(?:.*\s)?wpcf7-form-control-wrap(?:\s[^"]+)?\s*"[^\>]*>(.*)<\/\1>/i', '\2', $content); | |
$content = str_replace('<br />', '', $content); | |
return $content; | |
}); |
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
// Wordpress - Function to wrap all images and adds Pinterest button | |
// Add Pinterest Button to all Images in the_content() | |
// Wraps image with container and add link to share src from all <img> in the content | |
function gear_pinterest_in_content_images($content) { | |
$dom = new DOMDocument('UTF-8'); | |
@$dom->loadHTML( utf8_decode($content) ); // Decode to simple ISO to avoid accent errors | |
$dom->preserveWhiteSpace = false; | |
$images = $dom->getElementsByTagName('img'); |
NewerOlder