"devDependencies": {
"babel-plugin-transform-es2015-modules-strip": "^0.1.1",
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
window.dump = function (data) { | |
console.log(data); | |
}; | |
window.dd = function (...data) { | |
data.forEach(function(element) { | |
console.log(element); | |
}); | |
throw { |
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
$wp_customize->add_setting( 'themeslug_media_setting_id', array( | |
'sanitize_callback' => 'absint', | |
'validate_callback' => 'themeslug_validate_image, | |
) ); | |
$wp_customize->add_control( | |
new WP_Customize_Media_Control( $wp_customize, 'themeslug_media_setting_id', array( | |
'label' => __( 'Custom Core Media Setting' ), | |
'section' => 'custom_section', // Add a default or your own section | |
'mime_type' => 'image', |
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
var loaderUtils = require("loader-utils"); | |
module.exports = function (content) { | |
this.cacheable && this.cacheable(); | |
if (!this.emitFile) throw new Error("emitFile is required from module system"); | |
var query = loaderUtils.getOptions(this) || {}; | |
var configKey = query.config || "ignoreFilesLoader"; | |
var options = this.options[configKey] || {}; |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
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 | |
if ( ! function_exists( 'hippo_plugin_hook_info' ) ): | |
function hippo_plugin_hook_info( $hook_name ) { | |
global $wp_filter; | |
$docs = array(); | |
$template = "\t - %s Priority - %s.\n\tin file %s #%s\n\n"; | |
echo '<pre>'; |
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 | |
add_theme_support( 'starter-content', array( | |
// Content Section for Widgets | |
'widgets' => array( | |
// Sidebar | |
'sidebar-1' => array( | |
// Widget ID | |
'my_text' => array( | |
// Widget $id -> set when creating a Widget Class |
<form class="reduce-form">
<fieldset>
<input type="text" name="firstname" placeholder="Enter first name" /><br/>
<input type="text" name="lastname" placeholder="Enter last name"><br/>
<input type="email" name="email" placeholder="Enter e-mail" /><br/>
<button type="submit">Submit</button>
</fieldset>
</form>
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 | |
if ( ! function_exists( 'your_theme_prefix_upb_grid_system' ) ){ | |
function your_theme_prefix_upb_grid_system( $grid ) { | |
$grid[ 'name' ] = esc_html__( 'Starter Grid', 'your_theme_textdomain' ); | |
$grid[ 'allGridClass' ] = 'column'; | |
$grid[ 'prefixClass' ] = 'col'; // twb col-md-6 | |
$grid[ 'groupClass' ] = 'row'; // twb row |