] #chatroom
]
] @Manager:
] Hey guys, finished testing that game yet?
]
] I've got another one I need designed.
]
] @Me:
| <?php | |
| interface Entity { | |
| public Uuid $id { get; } | |
| } | |
| readonly class Thing implements Entity { | |
| public Uuid $id; | |
| public function __construct( |
| #!/opt/homebrew/bin/php | |
| <?php | |
| if (!isset($argv[1])) { | |
| echo "Need to supply a file!"; | |
| die(1); | |
| } | |
| $source_file_path = str_starts_with($argv[1], DIRECTORY_SEPARATOR) ? $argv[1] : getcwd() . DIRECTORY_SEPARATOR . $argv[1]; | |
| $destination_dir = isset($argv[2]) ? ( | |
| rtrim( |
1. Get the order ids for all orders that have a shipping state of "New Jersey".
SELECT orders.ID
FROM `wp_posts` orders
INNER JOIN `wp_postmeta` meta ON meta.post_id = orders.ID
WHERE
orders.post_type = 'shop_order' AND
meta.meta_key = '_shipping_state' AND
meta.meta_value = 'NJ';| async function fetchAndSetResponse(url, setAttributes) { | |
| const oEmbedUrl = `oddevan/v1/devArtProxy?url=${encodeURIComponent(url)}`; | |
| try { | |
| const response = await apiFetch({ path: oEmbedUrl }); | |
| setAttributes({ embedData: response }); | |
| } catch(e) { | |
| console.log('Error in DA block', { url: oEmbedUrl, error: e }); | |
| setAttributes({ embedData: {} }); | |
| } |
| <?php | |
| function proxy_deviantart_oembed( $data ) { | |
| $url = $data->get_param( 'url' ); | |
| if ( ! is_valid_url( $url ) ) { | |
| return new WP_Error( | |
| 'error', | |
| 'Error: not a DeviantArt URL', | |
| [ 'input' => $data ], | |
| ); | |
| } |