Skip to content

Instantly share code, notes, and snippets.

View pavr0m's full-sized avatar

Pavel Romanenko pavr0m

View GitHub Profile
# WP Multisite htaccess file for Apache
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
{% comment %}
Example of AdWords Purchase conversion tracking code.
Make sure you've already got global AdWords tag installed on the site.
{% endcomment %}
{% if first_time_accessed %}
<!-- Event snippet for Purchase CH conversion page -->
<script>
gtag('event', 'conversion', {
@pavr0m
pavr0m / shopify_theme_settings_starter
Last active April 8, 2019 13:02
Shopify theme settings starter
[
{
"name": "theme_info",
"logo": "https:\/\/cdn.shopify.com\/s\/global\/branding\/shopify_logo_256x256.png",
"settings": [
{
"type": "header",
"content": "Theme Name"
}
]
/**
* Simplest cookie operations
*/
var simpCookie = {
set: function( name, value, path = '', expires = '', domain = '' ) {
var host, domain, domainParts;
host = location.host;