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( 'the_title', 'wp_jslabify_title', 10, 2 ); | |
function wp_jslabify_title( $title, $id=0 ) { | |
$slabbed_post_types = array( | |
'single' => array( 'post', 'page' ), | |
'archive' => array(), | |
'search' => array() | |
); | |
$theme = 'ultra'; |
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(!defined('ABSPATH')) { die(); } // This line ensures that the script is not run directly | |
/** | |
* Utility Name: Upcoming Drafts Alert | |
* Description: Sends an email to blog authors with upcoming or overdue posts | |
* Author: Greg Schoppe | |
* Author URI: https://gschoppe.com | |
* Supports: input, cron | |
* Version: 1.0.0 | |
* License: GPL-2.0+ | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
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( ! defined( 'ABSPATH' ) ) { die(); } | |
/** | |
* Plugin Name: Disable Attachment Pages | |
* Plugin URI: https://gschoppe.com/wordpress/disable-attachment-pages | |
* Description: Completely disable attachment pages the right way. No forced redirects or 404s, no reserved slugs. | |
* Author: Greg Schoppe | |
* Author URI: https://gschoppe.com/ | |
* Version: 1.0.0 | |
**/ |
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 | |
/* | |
* Copyright (C) 2013 Nicolas Grekas - [email protected] | |
* | |
* This library is free software; you can redistribute it and/or modify it | |
* under the terms of the (at your option): | |
* Apache License v2.0 (http://apache.org/licenses/LICENSE-2.0.txt), or | |
* GNU General Public License v2.0 (http://gnu.org/licenses/gpl-2.0.txt). | |
*/ |
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 populate_cpt_labels( $singular, $plural, $overrides = array(), $text_domain = "" ) { | |
return shortcode_atts( array( | |
'name' => _x( $plural, 'Post Type General Name', $text_domain ), | |
'singular_name' => _x( $singular, 'Post Type Singular Name', $text_domain ), | |
'menu_name' => __( $plural, $text_domain ), | |
'name_admin_bar' => __( $singular, $text_domain ), | |
'archives' => __( $singular . ' Archives', $text_domain ), | |
'attributes' => __( $singular . ' Attributes', $text_domain ), | |
'parent_item_colon' => __( 'Parent ' . $singular . ':', $text_domain ), |
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(!defined('ABSPATH')) { die(); } // Include in all php files, to prevent direct execution | |
/** | |
* Plugin Name: Better Auto Excerpts | |
* Plugin URI: | |
* Description: replaces block-level elements with whitespace, to improve the_excerpt | |
* Version: 1.0.0 | |
* Author: Burlington Bytes | |
* Author URI: https://www.burlingtonbytes.com | |
* Text Domain: better-auto-excerpts | |
* License: GPL-2.0+ |
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 | |
/* | |
* Hide shortcodes in excerpts or if rendering fails | |
* Usage: <!--[shortcode-name comment-wrapped=true]--> | |
*/ | |
add_filter( 'do_shortcode_tag', "comment_wrap_shortcodes", 10, 3 ); | |
function comment_wrap_shortcodes( $output, $tag, $atts ) { | |
$args = shortcode_atts( array( | |
'comment-wrapped' => 'false' | |
), $atts ); |
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 /* place in functions.php */ | |
add_action( 'after_setup_theme', 'my_theme_setup' ); | |
function my_theme_setup() { | |
add_editor_style(); // We recommend using an editor-style.css file , that includes all the styles that will apply to the content | |
add_theme_support( 'wp-blockade' ); // This tells Blockade that your theme includes Bootstrap | |
// add_theme_support( 'bootstrap', '3.3.7' ); // alternatively, you can just register bootstrap support, along with your version number | |
$palette = array( // set the colors available in the editor's colorpickers | |
'Primary' => '#811381', | |
'Black' => '#000000', | |
'White' => '#FFFFFF', |
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 /* place in functions.php or in a custom plugin */ | |
// Add Blockade to the custom post types "foo" and "bar" | |
add_filter('wp-blockade-override-post-types', 'add_my_blockade_post_types'); | |
function add_my_blockade_post_types( $post_types ) { | |
$post_types[] = "foo"; | |
$post_types[] = "bar"; | |
return $post_types; | |
} |