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 user meta to signify the user has just logged in | |
* | |
*/ | |
add_action( 'wp_login', 'ac_fresh_login', 10, 2 ); | |
function ac_fresh_login( $user_login, $user ) { | |
update_user_meta( $user->ID, 'fresh_login', 1 ); |
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: Discourse WordPress Integration | |
Description: This plugin contains all of the functions that deal with integrating WordPress and Discourse. | |
Author: Adam Capriola | |
Version: 1.0 | |
Author URI: https://meta.discourse.org/users/adamcapriola/activity | |
*/ | |
// Discourse info |
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 | |
/** | |
* SSO "Page" | |
* | |
*/ | |
add_action( 'parse_request', 'ac_parse_request' ); | |
function ac_parse_request() { | |
// Check for SSO request |
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 | |
/** | |
* Sync Groups from WordPress to Discourse | |
* | |
* First creates 'groups' meta_key (which should be customized to your needs) | |
* Then it monitors for changes in the 'groups' meta_value and connects to Discourse API to sync groups | |
* | |
* WordPress References | |
* https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/meta.php?order=name#L235 | |
* http://wordpress.stackexchange.com/questions/16835/how-to-hook-update-post-meta-and-delete-post-meta |
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 | |
/** | |
* Remove 's | |
* @link https://core.trac.wordpress.org/ticket/31157 | |
* @link https://core.trac.wordpress.org/ticket/31676 | |
* | |
*/ | |
add_filter( 'the_content', 'ac_remove_nbsps', 10 ); // Adjust priorities if necessary | |
add_filter( 'widget_text', 'ac_remove_nbsps', 10 ); |
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
.lede-words { | |
font-weight: 700; | |
} |
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 | |
/** | |
* Carbon Fields: Post: Formatting | |
* | |
*/ | |
add_action( 'carbon_fields_register_fields', 'ac_crb_register_fields_post_formatting' ); | |
function ac_crb_register_fields_post_formatting() { | |
Container::make( 'post_meta', 'Formatting' ) |
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 | |
/** | |
* Fancybox image links | |
* @link http://fancyapps.com/fancybox/3/docs/#usage | |
* | |
*/ | |
add_filter( 'the_content', 'ac_the_content_fancybox_image_links', 10 ); // Adjust priorities if necessary | |
add_filter( 'widget_text', 'ac_the_content_fancybox_image_links', 10 ); | |
function ac_the_content_fancybox_image_links( $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 | |
/** | |
* Auto-tag Amazon.com links (v2: Clean) | |
* | |
*/ | |
add_filter( 'the_content', 'ac_auto_tag_amazon_links_v2' ); | |
function ac_auto_tag_amazon_links_v2( $content ) { | |
// Variables |
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
.search-form input[type=search] { | |
line-height: revert; | |
} |
OlderNewer