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 type='text/javascript'> | |
if (window.location.href== "http://pulse-gym.at.ua/") { | |
window.location.href = 'https://pulse-gym.com.ua/'; | |
} | |
</script> | |
<script type='text/javascript'> | |
if (window.location.href== "http://pulse-gym.at.ua/publ/1/vidy_sportivnogo_pitanija/2-1-0-3") { | |
window.location.href = 'https://pulse-gym.com.ua/vidy-sportivnogo-pitaniya/'; | |
} | |
</script> |
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_filter( 'woocommerce_checkout_fields' , 'custom_remove_woo_checkout_fields' ); | |
function custom_remove_woo_checkout_fields( $fields ) { | |
// remove billing fields | |
unset($fields['billing']['billing_first_name']); | |
unset($fields['billing']['billing_last_name']); | |
unset($fields['billing']['billing_company']); | |
unset($fields['billing']['billing_address_1']); | |
unset($fields['billing']['billing_address_2']); |
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
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
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 | |
// ДОБАВЛЯЕМ НОВОГО АДМИНА НА САЙТ WORDPRESS | |
// ---------------------------------- | |
// Загрузите этот файл в папку с сайтом и откройте в браузере. | |
// Удалите этот файл когда закончите. | |
require_once('wp-blog-header.php'); | |
require_once('wp-includes/registration.php'); | |
// ---------------------------------------------------- |
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 custom walker to functions.php | |
class BS_Page_Walker extends Walker_Page { | |
public function start_lvl( &$output, $depth = 0, $args = array() ) { | |
$indent = str_repeat("\t", $depth); | |
$output .= "\n$indent<ul class='dropdown-menu' role='menu'>\n"; | |
} | |
public function start_el( &$output, $page, $depth = 0, $args = array(), $current_page = 0 ) { |
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 f(x) { return 28 + (x + Math.floor(x/8)) % 2 + 2 % x + 2 * Math.floor(1/x); } |
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 | |
if( $terms = get_terms( 'category', array( | |
'orderby' => 'name', | |
'hide_empty' => 0, | |
'parent' => 76, | |
) ) ) : | |
echo '<ul class="sidebar_countries\">'; | |
foreach ($terms as $term) : |
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
server { | |
..... bla bla bla ..... | |
# Редиректы | |
rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last; | |
# Сам пост | |
rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last; | |
rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last; |
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
/** | |
* Recent_Posts widget w/ category exclude class | |
* This allows specific Category IDs to be removed from the Sidebar Recent Posts list | |
* Copypasted from http://pastebin.com/jxDnqPqR | |
*/ | |
class WP_Widget_Recent_Posts_Exclude extends WP_Widget { | |
function __construct() { | |
$widget_ops = array('classname' => 'widget_recent_entries', 'description' => __( "The most recent posts on your site") ); | |
parent::__construct('recent-posts', __('Recent Posts with Exclude'), $widget_ops); |