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
[ | |
{ | |
"keys": ["ctrl+super+t"], | |
"command": "insert_snippet", | |
"args": { | |
"contents": "<?php echo t('$SELECTION');?>" | |
}, | |
"context": | |
[ | |
{ "key": "selection_empty", "operator": "equal", "operand": 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
<html> | |
<head> | |
<!-- Written by Matt Beck. [email protected] --> | |
<title>Roll Fate Dice</title> | |
<style> | |
body{ | |
background: #e0dfd0; | |
text-align: center; | |
font-family: helvetica; | |
max-width: 100%; |
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('the_content', 'my_content_filter'); | |
function my_content_filter($content){ | |
$content = str_ireplace('http://url-to-strip.com','',$content); | |
return $content; | |
} |
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 | |
$query_string = $_SERVER['QUERY_STRING']; | |
$uri = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_STRING); | |
$uri = str_ireplace('?'.$query_string, "", $uri); | |
$uri = rtrim($uri, '/'); // strip trailing slashes | |
if($uri !== ""){ | |
// Check if matching markdown file exists | |
$mdfilename = $uri.'.md'; | |
if(!file_exists(getcwd().$mdfilename)){ | |
// 404 |
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 | |
/** | |
* Plugin Name: Run-Once Data Importer | |
* Description: This plugin will add custom field data to a predefined set of posts | |
* Version: 1.0 | |
* Author: mattbeck | |
*/ | |
register_activation_hook( __FILE__, 'runonce_data_import' ); |