- #2849
- #2857
- #2698
- #2699
- #2696
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
{ | |
"scm.inputFontSize": 14, | |
"debug.console.fontSize": 14, | |
"markdown.preview.fontSize": 14, | |
"editor.codeLensFontSize": 14, | |
"editor.suggestFontSize": 14, | |
"editor.fontSize": 14, | |
"files.autoSave": "afterDelay", | |
"editor.minimap.enabled": false, | |
"workbench.startupEditor": "none", |
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
/** | |
* Get Image URL. | |
* | |
* @param integer $id ID of the image. | |
* @param string $args The image arguments. | |
* | |
* @return string The image URL. | |
*/ | |
function zawp_get_image_url( $id, $args ) { | |
// If image returned is an array, then return it's 'ID'. |
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
addFilter( | |
"editor.BlockEdit", | |
"wpdev/is-post-link", | |
( BlockEdit ) => { | |
return (props) => { | |
if (props.name !== "core/button") { | |
return <BlockEdit {...props} />; | |
} | |
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
{ | |
"$schema": "https://playground.wordpress.net/blueprint-schema.json", | |
"steps": [ | |
{ | |
"step": "setSiteOptions", | |
"options": { | |
"blogname": "LearnPress", | |
"blogdescription": "My testing LearnPress site" | |
} | |
}, |
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: Bookstore | |
* Description: A plugin to manage books | |
* Version: 1.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly | |
} |
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: WP Learn Compatibility | |
* Description: Learn to test a plugin for PHP Version Compatibility | |
* Version: 1.0.1 | |
*/ | |
/** | |
* Posts fetcher class | |
*/ |
- Quick Slack completely
- In a terminal, run the following commands
export SLACK_DEVELOPER_MENU=true
open /Applications/Slack.app
- This will open a new Slack instance but you're now able to access the developer tools.
- Use the
cmd + opt + I
keyboard combination to open dev tools - Switch to the console tab and run the following command
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: WP Learn HTTP API | |
* Description: Learning about the WP HTTP API | |
* Version: 0.0.1 | |
*/ | |
/** | |
* Create an admin page to show the API data | |
*/ |
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
NEW_PHP_VERSION=$1 | |
if [ -z "$NEW_PHP_VERSION" ]; then | |
echo "Please provide a PHP version to switch to." | |
exit 1 | |
fi | |
CURRENT_PHP_VERSION=$(php -v | tail -r | tail -n 1 | cut -d " " -f 2 | cut -c 1-3) | |
brew unlink php@"$CURRENT_PHP_VERSION" && brew link php@"$NEW_PHP_VERSION" --force --overwrite |
NewerOlder