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
// in a new folder be sure to run "npm init -y" and "npm install puppeteer" | |
const puppeteer = require("puppeteer") | |
const fs = require("fs/promises") | |
async function start() { | |
const browser = await puppeteer.launch() | |
const page = await browser.newPage() | |
await page.goto("https://learnwebcode.github.io/practice-requests/") | |
const names = await page.evaluate(() => { |
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_input_object($input_object, $sfid) | |
{ | |
//ensure we are only filtering the correct field name - in this case the field we want to filter has the name `_sfm_colours` | |
//we also want to make sure its a `select` input type we're filtering | |
if(($input_object['name']!='_sfm_colours')||($input_object['type']!='select')) | |
{ | |
return $input_object; | |
} | |
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 hwid_acf_admin_footer() { | |
?> | |
<script> | |
( function( $) { | |
acf.add_filter( 'wysiwyg_tinymce_settings', function( mceInit, id ) { | |
// grab the classes defined within the field admin and put them in an array | |
var classes = $( '#' + id ).closest( '.acf-field-wysiwyg' ).attr( 'class' ); |
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 | |
/** | |
* Disable Distraction Free Writing Mode and the "Auto Expanding" | |
* height of the editor based on a list of post types. | |
* | |
* @return void | |
*/ | |
function my_deregister_editor_expand($val, $post_type) | |
{ |