This file contains hidden or 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 hidden or 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 hidden or 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, |
OlderNewer