Skip to content

Instantly share code, notes, and snippets.

@ArhStrAngeR
ArhStrAngeR / hideCounters.js
Created March 3, 2021 10:06 — forked from mforve/hideCounters.js
Скрытие счетчиков метрики для PageSpeed
window.onload = function(e){
function toTop() {
$(window).scrollTop($(window).scrollTop()+1);
}
setTimeout(toTop, 1000);
}
var fired = false;
window.addEventListener('scroll', () => {
if (fired === false) {
fired = true;
<?php
////////////////////////////
# WP AJAX EXAMPLE
////////////////////////////
/////////////////////////
# Enqueue Script
/////////////////////////
<?php
///////////////////////////////
# COMPLETE METABOX EXAMPLE
///////////////////////////////
///////////////////////////////
# I. ADD METABOX
@ArhStrAngeR
ArhStrAngeR / wpdb-column-examples.php
Created March 12, 2020 14:34 — forked from jeffward3283/wpdb-column-examples.php
WordPress Database Examples
<?php
////////////////////////
# COLUMN EXAMPLES
////////////////////////
////////////////////////
# Add Column (after)
////////////////////////
global $wpdb;
@ArhStrAngeR
ArhStrAngeR / .htaccess
Created October 8, 2019 13:23 — forked from seoagentur-hamburg/.htaccess
UPDATE 2019/07: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2019
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://andreas-hecht.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
@ArhStrAngeR
ArhStrAngeR / .htaccess
Created October 8, 2019 13:21 — forked from artikus11/.htaccess
Заготовка для подключения браузерного кеширования
Включение кеша браузера
=====
Вариант 1
===
<ifModule mod_headers.c>
<FilesMatch "\.(js|css|txt)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
<FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png)$">
Header set Cache-Control "max-age=2592000"