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
Redirect 301 index\.php/[\d]{4}/[\d]{2}/[\d]{2}/(.*) http://%{HTTP_HOST}/$1 | |
# ------------------- | |
RewriteCond %{REQUEST_URI} (index\.php)/(\d{4})/(\d{2})/(\d{2})/(.*) | |
RewriteRule (index\.php)/(\d{4})/(\d{2})/(\d{2})/(.*) http://%{HTTP_HOST}/%5 | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ /$4 [R=301,NC,L] | |
RewriteRule ^index\.php/([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ /$4 [R=301,NC,L] | |
RewriteRule ^index\.php$ - [L] |
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
CREATE DATABASE `my_db` CHARACTER SET utf8 COLLATE utf8_general_ci; |
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 | |
/* | |
Plugin Name: List Comment Filters | |
Description: List all comment filters on wp_footer | |
Version: 1.1 | |
Author: Thomas Scholz | |
Author URI: http://toscho.de | |
License: GPL v2 | |
*/ |
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 | |
/** | |
* Created by PhpStorm. | |
* User: anonymous | |
* Date: 03.09.16 | |
* Time: 13:07 | |
*/ | |
// привязываем функции сотворения метабокса и | |
// сохранения данных к соответствующим хукам: | |
add_action('add_meta_boxes', 'car_params_init'); |
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
For Ubuntu 15.10 (64 bit): | |
sudo dpkg --force-all -r libnss3 | |
wget http://security.ubuntu.com/ubuntu/pool/main/n/nss/libnss3_3.19.2-1ubuntu1_amd64.deb | |
wget http://security.ubuntu.com/ubuntu/pool/main/n/nss/libnss3-nssdb_3.19.2-1ubuntu1_all.deb | |
sudo dpkg -i libnss3_3.19.2-1ubuntu1_amd64.deb libnss3-nssdb_3.19.2-1ubuntu1_all.deb |
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
/** | |
* @param string $str Text to find <img> src attribute value | |
* @param string(optional) $placeholder if <img> src attr is empty use $placeholder | |
* @param boolean(optional) $echo - if true display value else return value | |
* @return string | |
*/ | |
function ecf_find_img_url($str, $echo = false, $placeholder = 'http://placehold.it/350x150' ) { | |
$start = stripos($str, '<img'); | |
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 comments_all_func( $atts ){ | |
extract( shortcode_atts( array( | |
'category' => '' | |
), $atts ) ); | |
$categories = explode( ',', $atts['category'] ); | |
$taxq = array( | |
#'posts_per_page' => 6, | |
'post_type' => 'wpm-testimonial', |
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 sunset_get_attachment( $num = 1 ){ | |
$output = ''; | |
if( has_post_thumbnail() && $num == 1 ): | |
$output = wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ); | |
else: | |
$attachments = get_posts( array( | |
'post_type' => 'attachment', | |
'posts_per_page' => $num, | |
'post_parent' => get_the_ID() |
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
{ | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme", | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"theme": "Material-Theme.sublime-theme", | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme", | |
"overlay_scroll_bars": "enabled", | |
"line_padding_top": 3, |
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
$('a[href^="#"]').on('click', function(){ | |
var elementClick = $(this).attr("href"); | |
var destination = $(elementClick).offset().top; | |
var minusTop = 0; | |
switch(elementClick){ | |
case "#services": minusTop = 90; break; | |
case "#portfolio": minusTop = 60; break; | |
case "#advantages": minusTop = 90; break; | |
case "#steps": minusTop = 60; break; | |
case "#price": minusTop = 60; break; |