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
vip dev-env exec --slug=SLUG -- wp vip-search index --setup | |
vip dev-env exec --slug=SLUG -- wp vip-search health validate-counts |
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 | |
/** | |
* Registers the `news` post type. | |
*/ | |
function news_cpt(): void { | |
$labels = [ | |
'name' => __( 'News', 'text-domain' ), | |
'singular_name' => __( 'News', 'text-domain' ), |
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 { useReducer } from 'react'; | |
export function counterReducer(state, action) { | |
if (action.type === 'INCREMENT') { | |
return { | |
count: +state.count + 1 | |
}; | |
} | |
if (action.type === 'DECREMENT') { |
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 snippet is useful while doing migration for the WordPress. | |
* Basically this script will convert the HTML dom into the common Gutenberg block comments, | |
* so the tags like Pagragraph will be converted into the "<!-- wp:paragraph -->SOME DATA<!-- /wp:paragraph -->". | |
* | |
* This script supports paragraph, headings, list tags and many more. | |
*/ | |
/** |
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 | |
/** | |
* Modified version of https://core.trac.wordpress.org/attachment/ticket/45985/45985-regular-images.patch patch for testing. | |
* Full credit goes to that patch owner. | |
*/ | |
/** | |
* Add custom `sizes` attribute to responsive image functionality for post content images. | |
* | |
* @since Twenty Nineteen 1.0 |
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 | |
/** | |
* Modified version of https://core.trac.wordpress.org/attachment/ticket/45985/45985-regular-images.patch patch for testing. | |
* Full credit goes to that patch owner. | |
*/ | |
/** | |
* Add custom `sizes` attribute to responsive image functionality for post content images. | |
* | |
* @since Twenty Nineteen 1.0 |
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
/** | |
* Add custom filters. | |
*/ | |
function custom_filters() { | |
$post_type = filter_input( INPUT_GET, 'post_type', FILTER_SANITIZE_STRING ); | |
// Only add filter to post type you want. | |
if ( 'POST_TYPE_NAME' === $post_type ) { |
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
The actual step-by-step WordPress / MySQL fix… | |
1. Back up all your stuff first (likely using phpMyAdmin / CPANEL) | |
Before doing any of the following it strongly encouraged to back up all your data and files. Just to be safe. At the very least, your full database and the WordPress config file: wp-config.php | |
2. Note the settings that your WordPress is currently using (from wp-config.php) | |
Specifically, your MySQL database configuration, including DB_NAME, DB_USER, DB_PASSWORD, and also DB_CHARSET and DB_COLLATE | |
// ** MySQL settings - You can get this info from your web host ** // |
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
<html> | |
<body> | |
<a href="https://developer.wordpress.org/block-editor/how-to-guides/themes/create-block-theme/">https://developer.wordpress.org/block-editor/how-to-guides/themes/create-block-theme/</a> | |
</body> | |
</html> |
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
<!-- | |
Just replace your audio file's name with `file_example_MP3_700KB.mp3` given in below code. | |
Refs: | |
- https://stackoverflow.com/questions/29593733/i-want-to-stop-skip-30-seconds-on-audio-in-html | |
- https://developer.mozilla.org/en-US/docs/Web/Guide/Audio_and_video_delivery/Cross-browser_audio_basics | |
- https://www.w3schools.com/tags/ref_av_dom.asp | |
--> | |
<!DOCTYPE html> |
NewerOlder