Skip to content

Instantly share code, notes, and snippets.

View proweb's full-sized avatar

Sergey Mochalov proweb

View GitHub Profile
@proweb
proweb / index.html
Created November 16, 2025 12:10
TEST
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>My PDF</title>
</head>
<body>
<h1>Hello world!</h1>
</body>
</html>
@proweb
proweb / blueprint.json
Created November 11, 2025 20:29
BlueprintWP1
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"landingPage": "/wp-admin/edit.php",
"features": {
"networking": true
},
"preferredVersions": {
"php": "latest",
"wp": "latest"
},
@proweb
proweb / list.txt
Created April 6, 2025 14:09
Sites list for Censor Traker
youtu.be
youtube.com
ggpht.com
ytimg.com
googlevideo.com
notion.so
chatgpt.com
coursera.org
trae.ai
groq.com
@proweb
proweb / main.less
Created March 25, 2025 09:26
UIkit3 media queries
/*
* Применить если ширина экрана меньше чем...
*/
/* Phone portrait and smaller */
@media (max-width: @breakpoint-xsmall-max) {
}
@proweb
proweb / yii2-video-js-widget.php
Last active March 18, 2025 13:44
Yii2 videojs config
<?php
echo VideoJsWidget::widget( [
'options' => [
'id' => 'main-video',
'class' => 'video-js',
'controls' => true,
'preload' => 'auto',
'width' => '800',
'height' => '400'
],
@proweb
proweb / wp-update.sh
Created September 23, 2024 15:32
WordPress Update All with wp-cli
wp core update && wp plugin update --all && wp core language update
@proweb
proweb / ajax.php
Created July 18, 2024 21:00
WP custom AJAX handler
<?php
// Custom AJAX Handler
// watch https://coderwall.com/p/of7y2q/faster-ajax-for-wordpress
/* Route functions place in functions.php or mu-plugin
function wp_pretty_ajax()
{
add_rewrite_rule('ajax$', 'ajax.php', 'top');
}
*/
@proweb
proweb / pattern-query-grid-cover-stack.html
Created December 22, 2023 13:18 — forked from justintadlock/pattern-query-grid-cover-stack.html
Query Loop pattern with stretched Stack block nested in Cover
<!-- wp:query {"queryId":0,"query":{"perPage":"7","pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"parents":[]},"align":"full","className":"pattern-post-grid-cover","layout":{"type":"constrained"}} -->
<div class="wp-block-query alignfull pattern-post-grid-cover"><!-- wp:group {"align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|plus-3","left":"var:preset|spacing|plus-3","top":"var(\u002d\u002dtheme-spacing\u002d\u002dplus-3)","bottom":"var(\u002d\u002dtheme-spacing\u002d\u002dplus-3)"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group alignfull" style="padding-top:var(--theme-spacing--plus-3);padding-right:var(--wp--preset--spacing--plus-3);padding-bottom:var(--theme-spacing--plus-3);padding-left:var(--wp--preset--spacing--plus-3)"><!-- wp:post-template {"align":"full","style":{"spacing":{"blockGap":"var:preset|spacing|minus-3"}},"className":"is-style-no-gap is-style-flex-grow is-style-fe
@proweb
proweb / plugin.php
Created July 20, 2023 10:40
Register multiple block.json in plugin
<?php
/**
* Automatically registers block types by scanning the build/blocks folder.
*
* This function searches for JSON files within each subfolder and registers
* them as block types. It is triggered on WordPress 'init' action.
*/
function auto_register_block_types() {
if ( file_exists( __DIR__ . '/build/blocks/' ) ) {
@proweb
proweb / editor.js
Created July 18, 2023 12:30
Gutenberg show registered patterns
// insert in dev tools console on edit post screen
wp.apiFetch( { path: '/wp/v2/block-patterns/patterns' } ).then( console.log );