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 React, { createContext, useState } from 'react'; | |
export const FormContext = createContext(); | |
const Form = ({ handleSubmit, children, submitButtonText }) => { | |
const [values, setValues] = useState({}); | |
const setValue = ({ name, value }) => { | |
setValues(values => ({ | |
...values, |
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 | |
array( | |
'^wp-json/?$' => 'index.php?rest_route=/', | |
'^wp-json/(.*)?' => 'index.php?rest_route=/$matches[1]', | |
'category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?category_name=$matches[1]&feed=$matches[2]', | |
'category/(.+?)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?category_name=$matches[1]&feed=$matches[2]', | |
'category/(.+?)/embed/?$' => 'index.php?category_name=$matches[1]&embed=true', | |
'category/(.+?)/page/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&paged=$matches[2]', | |
'category/(.+?)/?$' => 'index.php?category_name=$matches[1]', | |
'tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?tag=$matches[1]&feed=$matches[2]', |
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_filter( 'wpseo_replacements', 'mannie_filter_seo_replacements' ); | |
function mannie_filter_seo_replacements( $replacements ){ | |
global $post; | |
if ( isset( $replacements['%%title%%'] ) && $post->post_type === 'project' ) | |
$replacements['%%title%%'] = 'Project: ' . $replacements['%%title%%']; | |
return $replacements; | |
} |
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
# move into the themes folder | |
cd public_html/wp-content/themes | |
# remove unwanted themes | |
# of course remove the older WP default themes from the script if you want to keep them | |
rm -rf -- {Builder-Cohen,Builder-Paige,World,siteground-wp23,siteground-wp73,Builder-Madison,Universe,siteground-wp63,twentythirteen,twentytwelve} |
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
<div class="container"> | |
<div class="small"> | |
Small | |
</div> | |
<div class="large"> | |
Large | |
</div> | |
<div class="tiny"> | |
Tiny | |
</div> |
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 | |
/** | |
* Skip caching for some pages | |
*/ | |
switch (true) { | |
case defined('DONOTCACHEPAGE'): | |
case defined('DOING_AJAX'): | |
case defined('DOING_CRON'): | |
case defined('APP_REQUEST'): |
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_filter( 'gform_display_add_form_button', function(){return false;} ); |
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
propagate(){ | |
# Reminder for arguments | |
if [ "$1" == "-h" ]; then | |
echo "Arguments: | |
1: URL | |
2: New IP | |
Example: website.com 879.30.33.21" | |
return | |
fi |
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 | |
function unregister_all_widgets() { | |
unregister_widget('WP_Widget_Pages'); | |
unregister_widget('WP_Widget_Calendar'); | |
unregister_widget('WP_Widget_Archives'); | |
unregister_widget('WP_Widget_Links'); | |
unregister_widget('WP_Widget_Meta'); | |
unregister_widget('WP_Widget_Search'); | |
unregister_widget('WP_Widget_Text'); | |
unregister_widget('WP_Widget_Categories'); |
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
// ---- | |
// Sass (v3.3.10) | |
// Compass (v1.0.0.alpha.20) | |
// Susy (v2.1.2) | |
// ---- | |
@import "susy"; | |
@mixin mq-layout( | |
$mq, |
NewerOlder