docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker volume prune
<?php | |
function remove_extra_field_profile() | |
{ | |
$current_file_url = preg_replace( "#\?.*#" , "" , basename( $_SERVER['REQUEST_URI'] ) ); | |
if( $current_file_url == "profile.php" ) | |
{ | |
add_action( 'wp_loaded', function(){ ob_start("profile_callback"); } ); | |
add_action( 'shutdown', function(){ ob_end_flush(); } ); |
<?php | |
/** | |
* Make sure the function does not exist before defining it | |
*/ | |
if( ! function_exists( 'remove_class_filter' ) ){ | |
/** | |
* Remove Class Filter Without Access to Class Object | |
* | |
* In order to use the core WordPress remove_filter() on a filter added with the callback |
<?php | |
// Throw this in your theme and include it in your functions.php file | |
/** | |
* Helper function for fetching SVG icons | |
* | |
* @param string $icon Name of the SVG file in the icons directory | |
* @return string Inline SVG markup | |
*/ | |
function wp_svg_icon( $icon = '' ) { |
<?php | |
function wp_svg_icon( $icon = '' ) { | |
if ( ! $icon ) { | |
return; | |
} | |
$path = get_template_directory() . '/icons/' . $icon . '.svg'; | |
$args = array( | |
'css_class' => 'icon icon-' . $icon, | |
); | |
return wp_get_svg( $path, $args ); |
// Place your settings in the file "Packages/User/Preferences.sublime-settings", | |
// which overrides the settings in here. | |
// | |
// Settings may also be placed in syntax-specific setting files, for | |
// example, in Packages/User/Python.sublime-settings for python files. | |
{ | |
// Sets the colors used within the text area | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
// Note that the font_face and font_size are overridden in the platform |
<?php | |
class AdditionsXML { | |
public function __construct() { | |
add_action( 'rss2_item', [ $this, 'attach_to_rss' ] ); | |
add_action( 'rss2_ns', [ $this, 'add_media_namespace' ] ); | |
} | |
public function add_media_namespace() { |
const {resolve} = require('path'); | |
const webpack = require('webpack'); | |
const BrowserSyncPlugin = require('browser-sync-webpack-plugin'); | |
const CONFIG = require('./config.json'); | |
const APP_DIR = resolve(__dirname, 'src'); | |
const BUILD_DIR = resolve(__dirname, 'dist'); | |
module.exports = { |
const app = document.getElementById('app'); | |
const createElement = (el, text, newEl) => { | |
let textNode = document.createTextNode(text), | |
newElement = document.createElement(newEl), | |
module = newElement.appendChild(textNode); | |
el.appendChild(module) | |
}; | |
// We're using a document fragment to group things up |