Skip to content

Instantly share code, notes, and snippets.

View JustinyAhin's full-sized avatar
🎯
Focusing

Justin Ahinon JustinyAhin

🎯
Focusing
View GitHub Profile
@JustinyAhin
JustinyAhin / wp_core_setup_local_by_flywheel.sh
Last active November 19, 2021 10:32 — forked from mehul0810/wp_core_setup_local_by_flywheel.sh
WordPress Core Development SetUp on Local by FlyWheel
#!/bin/bash
# Welcome to the WP Core Development Wizard.
#
# Author: Mehul Gohil
# Email: hello@mehulgohil.com
# Supports: Local 5.2.8. or later
#
# PreRequisites:
# 1. Install wget, subversion, curl, php5-cli, and git

Upgrade tests scenarios

A notice should be displayed in Site Health if the /wp-content/upgrade/temp-backup folder is not writable

  • Given that the /wp-content/upgrade/temp-backup folder exists and is not writable
  • When I go to the Site Health status page
  • Then I should see a critical security issue with the message "The temp-backup directory exists but is not writable"

The previous version of the plugin/theme should be restored if the upgrade fails

  • Given that I have a previous version of the plugin/theme installed
  • When the plugin/theme upgrade fails
.
└── docs/
├── README.md
├── developers/
│ ├── README.md
│ ├── full-site-editing-templates.md
│ ├── filters/
│ │ ├── README.md
│ │ ├── block-filters.md
│ │ ├── editor-filters.md

Introduction page

Introduction or short definition to Gutenberg

Quick links

  • Create a block tutorial
  • Learn to develop for the block editor
    • Code architecture of the block editor
  • Main concepts
[
{
"type": "core",
"version": "5.7"
},
{
"type": "plugin",
"file": "gutenberg/gutenberg.php",
"name": "Gutenberg",
"version": "9.0",
<?php
/** Add to functions.php file */
/**
* Given the post ID the function compute the reading time of the post content
*/
function reading_time() {
$content = get_post_field( 'post_content', $post->ID );
$word_count = str_word_count( strip_tags( $content ) );
$readingtime = ceil($word_count / 130);