Skip to content

Instantly share code, notes, and snippets.

View petrozavodsky's full-sized avatar

Vladimir Petrozavodsky petrozavodsky

View GitHub Profile
@petrozavodsky
petrozavodsky / gist:b2970976892983836072
Last active August 29, 2015 14:09
/wp-admin/load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,jquery-u&load%5B%5D=i-droppable,wp-ajax-response,jquery-color,wp-lists,postbox,nav-menu&ver=4.0
/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
!function (a, b) {
"object" == typeof module && "object" == typeof module.exports ? module.exports = a.document ? b(a, !0) : function (a) {
if (!a.document)throw new Error("jQuery requires a window with a document");
return b(a)
} : b(a)
}("undefined" != typeof window ? window : this, function (a, b) {
var c = [], d = c.slice, e = c.concat, f = c.push, g = c.indexOf, h = {}, i = h.toString, j = h.hasOwnProperty, k = {}, l = "1.11.1", m = function (a, b) {
return new m.fn.init(a, b)
}, n = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, o = /^-ms-/, p = /-([\da-z])/gi, q = function (a, b) {
!function (a) {
var b, c = {add: "ajaxAdd", del: "ajaxDel", dim: "ajaxDim", process: "process", recolor: "recolor"};
b = {
settings: {
url: ajaxurl,
type: "POST",
response: "ajax-response",
what: "",
alt: "alternate",
altOffset: 0,
<?php
function dw_add_css() {
wp_register_script('dw_stylesheet', plugins_url('css/dw-plugun0style.css', __FILE__));
wp_enqueue_script('dw_stylesheet');
}
add_action( 'wp_enqueue_scripts', 'dw_add_css' );
<?php
/*
* Считывает данные из любого excel файла и созадет из них массив.
* $filename (строка) путь к файлу от корня сервера
*/
function parse_excel_file( $filename ){
// подключаем библиотеку
require_once dirname(__FILE__) . '/PHPExcel/Classes/PHPExcel.php';
$result = array();
$(document).ready(function () {
$("#formzakaz").on(function () {
var formOftype = $("#menu");
$("#summ span").text("0");
formOftype.on("change", function () {
@petrozavodsky
petrozavodsky / qtags.php
Created October 15, 2015 08:24 — forked from mattyrob/qtags.php
Quicktags API Test
<?php
/*
Plugin Name: Quicktags API Test
Description: Testing a few different kinds of Quicktags buttons
Author: Kailey Lampert
Author URI: http://kaileylampert.com/
*/
@petrozavodsky
petrozavodsky / html
Created October 21, 2015 13:20
sites
<tbody data-wp-lists="list:comment" id="the-comment-list">
<tr class="comment even thread-even depth-1 approved" id="comment-7727">
<th class="check-column" scope="row"></th>
<td data-colname="Автор" class="author column-author"><strong><img width="32" height="32"
class="avatar avatar-32 photo grav-hashed grav-hijack"
srcset="http://2.gravatar.com/avatar/298d2155603366df14cb9040da79cf7c?s=64&amp;d=mm&amp;r=g 2x"
src="http://2.gravatar.com/avatar/298d2155603366df14cb9040da79cf7c?s=32&amp;d=mm&amp;r=g"
alt=""
@petrozavodsky
petrozavodsky / wordpress.nginx
Created February 20, 2016 13:00 — forked from LeCoupa/wordpress.nginx
WordPress - Nginx Configuration File (with SSL)
##
# @server studio
# @host hackisition.com
# @desc nginx host rules
# @author Julien Le Coupanec <julien@gentlenode.com>
##
# HTTP Server
server {
listen 80;
@petrozavodsky
petrozavodsky / docker-compose.yml
Last active September 30, 2016 14:28
docker-compose.yml
version: '2'
services:
wordpress:
image: etopian/alpine-php-wordpress
environment:
VIRTUAL_HOST: www.brodude.lc,brodude.lc
DB_NAME: brodude
DB_USER: brodude
DB_PASS: brodude
links:
@petrozavodsky
petrozavodsky / functions.php
Created October 6, 2016 08:35 — forked from al5dy/functions.php
Yoast SEO - убираем теги <image:image> для Yandex
function yoast_clear_sitemap( $output, $url ) {
$timezone = new WPSEO_Sitemap_Timezone();
$date = null;
if ( ! empty( $url['mod'] ) ) {
$date = $timezone->format_date( $url['mod'] );
}