Archives: Snippets
Untitled Snippet
Untitled Snippet
0000 > CLASS > Show Data
// this is the class definition class myfair_Show_Data { public function __construct() { $this->loadShows(); if (isset($this->showList) && is_array($this->showList) && count($this->showList) > 0) { $this->loadShowCustomData(); } } public function loadShows() { $loop = new WP_Query(array( ‘post_type’ => ‘show’, ‘post_parent’ => ‘0’,…Continue reading
Allow SVG uploads for administrator users.
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
Disable the delivery of SEO Email Reports
add_filter( ‘aioseo_report_summary_enable’, ‘__return_false’ );Continue reading
Remove the default ‘aioseo-‘ ID prefix added for the Table of Content block
add_filter( ‘aioseo_toc_hash_prefix’, function( $prefix ) { return ”; } );Continue reading
Use a custom ID prefix in Table of Content block
add_filter( ‘aioseo_toc_hash_prefix’, function( $prefix ) { return ‘mysite-‘; } );Continue reading