Based on this article
ALL INSTALLATIONS ASSUME YES WHEN PROMPTED, that's what -y does
This script can be copy paste to ssh as is. No hands installation. :-)
yum install zsh -y
<?php | |
/* | |
* TinyMCE: Add Tailwind CSS style | |
*/ | |
add_editor_style('/assets/css/tailwind.min.css'); | |
/* | |
* TinyMCE: Remove WP styles | |
*/ |
<?php | |
/** | |
* Example: Add order meta to the REST API | |
* WC 2.6+ | |
* | |
* @param \WP_REST_Response $response The response object. | |
* @param \WP_Post $post Post object. | |
* @param \WP_REST_Request $request Request object. | |
* @return object updated response object |
<?php | |
// original author: https://www.php.net/manual/en/function.print-r.php#93529 | |
// another dev said it was fixed for null values, but I don't encountered errors with null values for Matt's: https://www.php.net/manual/en/function.print-r.php#121259 | |
// Matt | |
function print_r_reverse($in) { | |
$lines = explode("\n", trim($in)); | |
if (trim($lines[0]) != 'Array') { | |
// bottomed out to something that isn't an array | |
return $in; |
.animated-placeholder { | |
background: linear-gradient(-90deg, #eef2f6, #ffffff, #bcbfc3); | |
background-size: 400% 400%; | |
-webkit-animation: left-to-right 3s ease infinite; | |
-moz-animation: left-to-right 3s ease infinite; | |
animation: left-to-right 3s ease infinite; | |
} | |
@-webkit-keyframes left-to-right { |
<?php | |
/** | |
* Encryption operations for working with WordPress options to store data | |
* in the options table. Not all options will be encrypted. You will need | |
* to wire up selection of options to be protected separately. | |
* | |
* @package Fortress | |
*/ | |
namespace DisplaceTech\Fortress\Options; |
<?php | |
/** | |
* Plugin Name: Custom WooCommerce Webhook | |
* Plugin URI: https://raftaar1191.com/ | |
* Description: This plugin provided a demo of Custom WooCommerce Webhook | |
* Author: raftaar1191 | |
* Author URI: https://profiles.wordpress.org/raftaar1191/ | |
* Version: 1.0.0 | |
*/ |
<?php | |
/** | |
* This file houses the class that Extends the Yoast Schema Graph for course events | |
* | |
* @package ef/inc | |
*/ | |
if ( interface_exists( 'WPSEO_Graph_Piece' ) ) { | |
/** | |
* The class that extends WPSEO_Graph_Piece to display event schema for courses. |
ALL INSTALLATIONS ASSUME YES WHEN PROMPTED, that's what -y does
This script can be copy paste to ssh as is. No hands installation. :-)
yum install zsh -y
Photo by Ricardo Gomez Angel on Unsplash
This gist is a collection of common patterns I've personally used here and there with Custom Elements.
These patterns are all basic suggestions that could be improved, enriched, readapted, accordingly with your needs.
function setDefaultHrefImage() { | |
wp_enqueue_script( | |
'modify-image-link-destination-default', | |
get_template_directory_uri() . '/js/setDefaultHrefImage.js', | |
array('wp-hooks') | |
); | |
} | |
add_action('enqueue_block_editor_assets', 'setDefaultHrefImage'); |