Pug - это препроцессор HTML и шаблонизатор, который был написан на JavaScript для Node.js.
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 | |
/** | |
* Plugin Name: Rank Math SEO plugin cleanup | |
* Description: A cached translation override for WordPress. | |
* Author: Artem Abramovich | |
* Plugin URI: https://gist.github.com/artikus11/0d7a52273bd8bdc85f0d3010f156cd5f | |
* | |
* @link https://rankmath.com/kb/filters-hooks-api-developer/ | |
* | |
* @see https://gist.github.com/timbowen/c5c00667c4c48f8ec3f5706b686d6f00 |
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
import { registerFormatType, applyFormat, toggleFormat } from '@wordpress/rich-text'; | |
import { useSelect } from '@wordpress/data'; | |
import { BlockControls, MediaUpload, MediaUploadCheck } from '@wordpress/block-editor'; | |
import { Button, TextControl, ToolbarGroup, ToolbarButton, Modal, TextareaControl } from '@wordpress/components'; | |
import { useState } from '@wordpress/element'; | |
import { comment } from '@wordpress/icons'; | |
import { | |
Card, | |
CardHeader, | |
CardBody, |
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
import { useEffect, useRef } from 'react'; | |
// CONFIG | |
const WIDTH = 660; | |
const HEIGHT = 440; | |
const COLUMN_WIDTH = 20; | |
const COLUMNS = WIDTH / COLUMN_WIDTH; |
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
const { domReady } = wp; | |
const { useMemo } = wp.element; | |
const { TextControl } = wp.components; | |
const { select, useSelect, useDispatch } = wp.data; | |
const { PluginDocumentSettingPanel } = wp.editPost; | |
const { registerPlugin } = wp.plugins; | |
const { __ } = wp.i18n; | |
/** | |
* Output the Meta panel for Report pages. |
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
self.addEventListener('install', (e) => { | |
e.waitUntil( | |
caches.open("precache").then((cache) => cache.add("/broken.png")) | |
); | |
}); | |
function isImage(fetchRequest) { | |
return fetchRequest.method === "GET" && fetchRequest.destination === "image"; | |
} |
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
:root { | |
--ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53); | |
--ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19); | |
--ease-in-quart: cubic-bezier(0.895, 0.03, 0.685, 0.22); | |
--ease-in-quint: cubic-bezier(0.755, 0.05, 0.855, 0.06); | |
--ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035); | |
--ease-in-circ: cubic-bezier(0.6, 0.04, 0.98, 0.335); | |
--ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94); | |
--ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1); | |
--ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1); |
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
# https://baraktawily.blogspot.fr/2018/02/how-to-dos-29-of-world-wide-websites.html | |
# https://wpvulndb.com/vulnerabilities/9021 | |
location ~* ^/wp-admin/load-scripts\.php$ { | |
if ( $query_string ~* "^.{1024,}$" ) { | |
return 444; | |
} | |
} |
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
<div id="swipezone"> | |
Swipe me | |
</div> | |
// credit: http://www.javascriptkit.com/javatutors/touchevents2.shtml | |
function swipedetect(el, callback){ | |
var touchsurface = el, | |
swipedir, | |
startX, |
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 | |
$local_file = 'file_path'; //path to a local file on your server | |
$post_fields = array( | |
'name' => 'value', | |
); | |
$boundary = wp_generate_password( 24 ); | |
$headers = array( | |
'content-type' => 'multipart/form-data; boundary=' . $boundary, | |
); |
NewerOlder