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 { createHash } from 'crypto' | |
import { defineConfig } from 'vite' | |
import react from '@vitejs/plugin-react' | |
import { | |
defaultRequestToExternal, | |
defaultRequestToHandle | |
} from '@wordpress/dependency-extraction-webpack-plugin/lib/util.js' | |
import json2php from 'json2php' | |
import packageMeta from './package.json'; |
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: Classic Block Resticky | |
* Description: Ensures the classic block’s formatting toolbar is sticky when custom fields are present. | |
*/ | |
add_action( 'admin_footer', function() { | |
// Bails unless on a block editor screen | |
if ( ! get_current_screen()->is_block_editor() ) return; |
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
/*! | |
* Masonry PACKAGED v4.2.2-patch1 | |
* Cascading grid layout library | |
* https://masonry.desandro.com | |
* MIT License | |
* by David DeSandro | |
*/ | |
!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){ |
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
<!-- wp:columns {"verticalAlignment":"center","align":"wide"} --> | |
<div class="wp-block-columns alignwide are-vertically-aligned-center"><!-- wp:column {"verticalAlignment":"center"} --> | |
<div class="wp-block-column is-vertically-aligned-center"><!-- wp:cover {"dimRatio":50,"overlayColor":"cyan-bluish-gray","contentPosition":"center center","isDark":false} --> | |
<div class="wp-block-cover is-light"><span aria-hidden="true" class="wp-block-cover__background has-cyan-bluish-gray-background-color has-background-dim"></span><div class="wp-block-cover__inner-container"><!-- wp:group {"layout":{"type":"flex","orientation":"vertical","justifyContent":"center"}} --> | |
<div class="wp-block-group"><!-- wp:heading {"textAlign":"center","style":{"layout":{"selfStretch":"fixed","flexSize":"2.5em"}},"fontSize":"large"} --> | |
<h2 class="wp-block-heading has-text-align-center has-large-font-size">Simple Question</h2> | |
<!-- /wp:heading --> | |
<!-- wp:paragraph {"align":"center","style":{"layout":{"selfStretch":"fixed","flexSize":"6em"}} |
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: Block Library Disdialoged | |
* Description: Hack to keep the Block library/Inserter open unless manually closed. | |
* Version: 0.2.0 | |
* License: GPL-2.0-or-later | |
*/ | |
add_action( 'admin_footer', function() { | |
// Bails unless on a block editor screen |
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 | |
['body' => $payload] = wp_remote_get( '/wp-json/wp/v2/posts/?categories=10&per_page=20' ); | |
$post_list = json_decode( $payload ); | |
foreach ( $post_list as $post_data ) { | |
$post = [ | |
'post_category' => [ 7 ], | |
'post_title' => $post_data->title->rendered, | |
'post_status' => 'publish', | |
'post_date' => $post_data->date, |
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
function getScrollContext( node ) { | |
let at = node; | |
let hasOverflow = false; | |
while ( at.parentNode !== at.ownerDocument ) { | |
at = at.parentNode; | |
if ( at.clientHeight < at.scrollHeight ) { | |
hasOverflow = true; | |
break; | |
} | |
} |
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
( ( { | |
blockEditor: { RichTextToolbarButton }, | |
element: { createElement }, | |
richText: { insertObject, registerFormatType, remove }, | |
} ) => { | |
const formatName = 'svg-format-demo/one'; | |
const format = { | |
title: 'SVG Format Demo', | |
tagName: 'u', | |
contentEditable: false, |
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
//tambien nada |
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
license: gpl-3.0 |