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
// Your theme probably already has a function to enqueue_scrpts scripts in functions.php | |
// You should just be able to add the deregister/dequeue to that | |
function independence_scripts() { | |
wp_deregister_style( 'kind' ); | |
wp_dequeue_style( 'kind' ); | |
wp_deregister_style( 'indieweb' ); | |
wp_dequeue_style( 'indieweb' ); | |
} |
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 | |
// Get the global `$wp_query` object. | |
$id = get_the_ID(); | |
// Get the semantic_linkbacks_type 'like'. | |
$comments = get_linkbacks( 'like', $id ); | |
?> | |
<section class="section"> | |
<div class="container"> | |
<ul class="pile likes"> | |
<li class="icon"> |
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
$dom = new DOMDocument; | |
$dom->loadHTML($embed_html, LIBXML_HTML_NOIMPLIED); | |
$nodelinks = $dom->getElementsByTagName('a'); | |
$links = iterator_to_array($nodelinks); | |
var_dump($links); | |
foreach ( $links as $link ) { | |
if (end($links)) { | |
$link->setAttribute("class","u-url"); | |
} | |
}; |
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
/** | |
* Override core Walker_Comment for mf2 & Bulma. | |
* | |
* @method __construct | |
*/ | |
class Independence_Walker_Comment extends Walker_Comment { | |
/** | |
* Start the element output. | |
* | |
* This opens the comment. Will check if the comment has children or is a stand-alone comment. |
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
<form role="search" method="get" id="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>"> | |
<p class="control has-addons"> | |
<input class="input" name="s" id="search" type="search" value="<?php echo esc_attr( get_search_query() ); ?>" placeholder="Find it now!"> | |
<button class="button is-info" type="submit"> | |
Search | |
</button> | |
</p> | |
</form> |
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
function twithandle( $content ) { | |
$twithandle = preg_replace( '/([^a-zA-Z0-9-_&])@([0-9a-zA-Z_]+)/','$1<a href="https://twitter.com/$2" rel="nofollow">@$2</a>',$content ); | |
return $twithandle; | |
} | |
add_filter( 'the_content', 'twithandle' ); | |
add_filter( 'comment_text', 'twithandle' ); |
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
/** | |
* Unspam Webmentions | |
* | |
* @method unspam_webmentions | |
* @param [type] $approved [description]. | |
* @param [type] $commentdata [description]. | |
* @return [type] [description] | |
*/ | |
function unspam_webmentions( $approved, $commentdata ) { | |
return $commentdata['comment_type'] == 'webmention' ? 1 : $approved; |
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
// relevant part from Quill | |
properties: | |
{ content: [Object], | |
category: [Object], | |
'syndicate-to': [Object] } | |
// relevant part from Inkstone | |
properties: { content: [Object] }, | |
mp: { | |
type: [Object], |
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
site/vendor/**/* | |
site/config/**/* | |
site/web/wp/**/* | |
site/web/app/plugins/**/* | |
!site/web/app/plugins/chapel_plugin/**/* |
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
response = Net::HTTP.post_form(uri, 'target' => "#{target}", 'source' => "#{source}") | |
source = "#{source}" | |
source_slug = source.split('/')[-1] | |
file_ext = '.json' | |
source_file = [source_slug, file_ext].join("") | |
source_path = File.join("_data", source_file) | |
File.write(source_path,response.body) |