First, make sure you have Composer installed in your system.
In order to use the WPCS you'll need the PHP_CodeSniffer (PHPCS) and the WPCS rules (sniffs) installed.
You can install PHP_CodeSniffer globally using Composer by running this command:
<?php | |
/** | |
* Illustrates how to extract attachment details returned by wp_prepare_attachment_for_js(). | |
* | |
* The wp_prepare_attachment_for_js() function returns an array with the attachment post object | |
* that can be used to extract specific information for the attachment. | |
* | |
* Following is a list of all the details that the function returns extrated into individual variables. | |
* |
<?php | |
/** | |
* Illustrates how to display a basic list of attachments when using data extracted | |
* from the wp_prepare_attachment_for_js() array. | |
* | |
* @author Alexis J. Villegas <[email protected]> | |
* @link https://developer.wordpress.org/reference/functions/wp_prepare_attachment_for_js/ | |
*/ |
/** | |
* Custom WordPress block boilerplate. | |
* | |
* @package My_Block_Package | |
* @author Alexis J. Villegas | |
* @link http://www.alexisvillegas.com | |
* @license GPL-2.0+ | |
*/ | |
( function( blocks, editor, element ) { |
<?php | |
add_action( 'the_post', 'myprefix_password_protect_post_type' ); | |
/** | |
* Add master password to post type. | |
* | |
* This function password protects all posts in | |
* a post type with the same master password. | |
* | |
* @since 1.0.0 |
First, make sure you have Composer installed in your system.
In order to use the WPCS you'll need the PHP_CodeSniffer (PHPCS) and the WPCS rules (sniffs) installed.
You can install PHP_CodeSniffer globally using Composer by running this command:
¡Hola! I'm Alexis, a Web Engineer at Human Made working from San Sebastián, Puerto Rico 🇵🇷 in the Caribbean.
This document goes over how I like to work and how I manage my energy to be most productive. Feedback is always welcome, specially if we work together or collaborate on projects.
I live in the Caribbean, within the Atlantic Standard Timezone (GMT-4) throughout the year, with no Daylight Saving Time.
<?php | |
function register_custom_taxonomy() { | |
$taxonomy_labels = [ | |
'name' => esc_html__( 'Custom Terms', 'text-domain' ), | |
'singular_name' => esc_html__( 'Custom Term', 'text-domain' ), | |
'menu_name' => esc_html__( 'Terms', 'text-domain' ), | |
]; | |
$taxonomy_args = [ |
/* Break out of a container in a WP site. */ | |
/* Exclude blocks in the editor. */ | |
.alignfull:not(.wp-block) { | |
margin-left: calc( 50% - 50vw ); | |
margin-right: calc( 50% - 50vw ); | |
max-width: 100vw; | |
} | |
.alignwide { |
In this tutorial, we'll build the the nescessary packages for ARM via homebrew. After that we'll configure apache2 for using virtual hosts. The native php is ofcourse way faster, see the results of this benchmark below.
TEST NAME | SECONDS | OP/SEC |
---|