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 React from "react"; | |
import { FormField } from "@sanity/base/components"; | |
import { Card, Label, Stack, TextArea } from "@sanity/ui"; | |
import PatchEvent, { set, unset } from "@sanity/form-builder/PatchEvent"; | |
import { useId } from "@reach/auto-id"; // hook to generate unique IDs | |
const MonospaceTextArea = React.forwardRef((props, ref) => { | |
const { | |
type, // Schema information | |
value, // Current field value |
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 containerStyle = { | |
display: "inline-block", | |
position: "absolute", | |
visibility: "hidden", | |
zIndex: -1, | |
}; | |
interface IEnhanceMeasurableNodeCallback { | |
(e: Node): Node; | |
} |
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 | |
/** | |
* @param $content | |
* | |
* @return string|string[] | |
*/ | |
function imp_wpcf7_form_elements( $content ) { | |
$valid_autocomplete = [ | |
'name', |
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
<style> | |
.measurement-container { | |
position: fixed; | |
z-index: 999; | |
top: 30px; | |
left: 30px; | |
background: white; | |
padding: 15px; | |
border: 10px solid wheat; | |
} |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) |
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 | |
function filter_search_by_post_type( $included, $engine, $terms ) { | |
$post_type = get_query_var('post_type'); | |
if (!is_array($post_type)) { | |
return $included; | |
} | |
$posts = new \WP_Query([ | |
'no_found_rows' => true, |
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)|(=)).* |
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 $ = (selector) => Array.from(document.querySelectorAll(selector)); |
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 | |
class OutputTemplateDetails { | |
function init() { | |
add_action( 'all', [$this, 'output_template_data'], 10, 2); | |
} | |
function get_template_location($slug, $name) { | |
$templates = array(); |
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
jQuery.map(jQuery('[data-plugin]').map((index, element) => $(element).find('strong').first().html()), value => [value]).join('\n'); |
NewerOlder