Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions inc/filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ function __construct() {
add_filter( 'excerpt_more', '__return_false' );
add_filter( 'the_excerpt', array( $this, 'excerpt_more_override' ) );

//remove auto-paragraphs from shortcodes and keep it for content
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop', 99 );
add_filter( 'the_content', 'shortcode_unautop', 100 );

// Add PDF filter to media library
add_filter( 'post_mime_types', array( $this, 'modify_post_mime_types' ) );

Expand Down
8 changes: 0 additions & 8 deletions inc/shortcodes/class.accordion-shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,10 @@
* [/accordion]
*/
class UW_Accordion {
const PRIORITY = 12;

/**
* Accordion constructor.
*/
public function __construct() {
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop', self::PRIORITY );

remove_filter( 'the_excerpt', 'wpautop' );
add_filter( 'the_excerpt', 'wpautop', self::PRIORITY );

add_shortcode( 'accordion', array( $this, 'accordion_handler' ) );
add_shortcode( 'section', array( $this, 'section_handler' ) );
add_shortcode( 'subsection', array( $this, 'subsection_handler' ) );
Expand Down
5 changes: 0 additions & 5 deletions inc/shortcodes/class.blockquote-shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,10 @@
* [blockquote style="" align="" name="Dubs Husky" title="Official Live Mascot"] blockquote text [/blockquote]
*/
class UW_Blockquote {
const PRIORITY = 12;

/**
* Blockquote constructor.
*/
public function __construct() {
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop', self::PRIORITY );

add_shortcode( 'blockquote', array( $this, 'blockquote_handler' ) );
}

Expand Down
5 changes: 0 additions & 5 deletions inc/shortcodes/class.tabs-tours-shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,10 @@
* [/uw_tabs]
*/
class UW_Tabs_Tours {
const PRIORITY = 12;

/**
* Tabs constructor.
*/
public function __construct() {
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop', self::PRIORITY );

add_shortcode( 'uw_tabs', array( $this, 'tabs_tours_handler' ) );
add_shortcode( 'tabs_section', array( $this, 'tabs_section_handler' ) );

Expand Down
5 changes: 0 additions & 5 deletions inc/shortcodes/class.tile-box-shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,11 @@
class UW_TileBox
{
const MAXTILES = 12;
const PRIORITY = 11;
private $count = 0;
private $NumbersArray = array('zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve'); //arrays can't be constants in PHP. Privates at least can't be changed

function __construct()
{
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop' , self::PRIORITY );
remove_filter( 'the_excerpt', 'wpautop' );
add_filter( 'the_excerpt', 'wpautop' , self::PRIORITY );
add_shortcode( 'box', array( $this, 'box_handler' ) );
add_shortcode( 'tile', array( $this, 'tile_handler' ) );
}
Expand Down