This is literally just an incredibly basic login form, designed to be WCAG 2.0 AA compliant.
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
function set_category () { | |
global $post; | |
//Check for a category parameter in our URL, and sanitize it as a string | |
$category_slug = filter_input(INPUT_GET, 'category', FILTER_SANITIZE_STRING, array("options" => array("default" => 0))); | |
//If we've got a category by that name, set the post terms for it | |
if ( $category = get_category_by_slug($category_slug) ) { | |
wp_set_post_terms( $post->ID, array($category->term_id), 'category' ); | |
} |
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: MailPoet wp_mail() Enabler | |
Plugin URI: https://gist.github.com/malcalevak/5ac02aa144fa1837d55bc8aeea39aeef/ | |
Description: Enables the ability to use wp_mail() in the MailPoet plugin. Notes: Requires MailPoet v2.6.14+, which added the mailpoet_pre_config_screen action hook. It also appears this is likely to break after the release of v3. Lastly, the MailPoet code doesn't set $header, which is passed to wp_mail; as a result, you'll need to set your 'Content-type:text/html' in your header some other way (Postman SMTP has a Custom Headers field for this purpose, alternatively, you can do it more universally via the answer here: https://wordpress.stackexchange.com/questions/27856/is-there-a-way-to-send-html-formatted-emails-with-wordpress-wp-mail-function) | |
Version: 1.0 | |
License: GPL-2.0+ | |
License URI: http://www.gnu.org/licenses/gpl-2.0.txt | |
*/ |