Skip to content

Instantly share code, notes, and snippets.

<div id="rb-follow-button"></div>
<script>
window.twttr = (function (d,s,id) {
var t, js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return; js=d.createElement(s); js.id=id;
js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs);
return window.twttr || (t = { _e: [], ready: function(f){ t._e.push(f) } });
}(document, "script", "twitter-wjs"));
twttr.ready(function(twttr){
@j4ckielord
j4ckielord / functions.php
Created February 18, 2014 03:18
Redirect Author Archive to BuddyPress Profile Page
add_action( 'template_redirect', 'themename_redirect_author_archive_to_profile' );
function themename_redirect_author_archive_to_profile() {
if(is_author()){
$user_id = get_query_var( 'author' );
wp_redirect( bp_core_get_user_domain( $user_id ) );
}
}
@j4ckielord
j4ckielord / functions.php
Created March 11, 2014 10:07
Display a modal before ask question (Only Compatible with DW Question & Answer Plugin and Bootstrap)
function your_theme_ask_question_modal(){
global $dwqa_options;
if( isset($dwqa_options['pages']['submit-question']) && is_page( $dwqa_options['pages']['submit-question'] ) ){
?>
<div id="dw-skip-ads" class="modal hide fade" data-backdrop="static">
<div class="modal-header">
<button type="button" class="close hide" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3 style="text-transform: none;">For better and faster support, please read our golden rules first <span class="countdown pull-right">(5)</span></h3>
@j4ckielord
j4ckielord / dw-active-maintenance-mode.php
Created March 14, 2014 09:28
DW Activate Maintenance Mode Plugin
<?php
/**
* Plugin Name: DW Active Maintenance mode
* Plugin URI: http://www.designwall.com/blog/
* Description: Add a maintenance page to your blog
* Version: 1.0
* Author: DesignWall
* Author URI: http://www.designwall.com/
* License: GPLv3 or later
**/
@j4ckielord
j4ckielord / dw-disable-comment-links.php
Created March 14, 2014 09:30
Disable links in comments
@j4ckielord
j4ckielord / dw-rss-feeds-thumbnail.php
Last active August 29, 2015 13:57
DW Add Thumbnail to RSS Feeds
<?php
/**
* Plugin Name: DW Add Thumbnail to RSS Feeds
* Description: Add post thumbnail to RSS feed items.
* Version: 1.0
* Author: DesignWall
* Author URI: http://www.designwall.com/
* License: GPLv3 or later
**/
@j4ckielord
j4ckielord / dw-disable-auto-resize-images.php
Created March 14, 2014 09:39
DW Disable Auto-Resize Images
<?php
/**
* Plugin Name: DW Disable Auto-Resize Images
* Description: Disable WordPress’s Automatic Image Resize Function.
* Version: 1.0
* Author: DesignWall
* Author URI: http://www.designwall.com/
* License: GPLv3 or later
*/
add_filter('jpeg_quality', function($arg){ return 100; });
@j4ckielord
j4ckielord / dw-post-content-link-replacement.php
Created March 14, 2014 09:46
W Post Content Link Replacement
<?php
/**
* Plugin Name: DW Post Content Link Replacement
* Description: Add target="_blank" and rel="nofollow" to links.
* Version: 1.0
* Author: DesignWall
* Author URI: http://www.designwall.com/
* License: GPLv3 or later
**/
@j4ckielord
j4ckielord / dw-extra-user-fields.php
Created March 14, 2014 09:48
DW Extra User Fields
<?php
/**
* Plugin Name: DW Extra User Fields
* Description: Add extra fields to the user profile page.
* Version: 1.0
* Author: DesignWall
* Author URI: http://www.designwall.com/
* License: GPLv3 or later
**/
@j4ckielord
j4ckielord / dw-post-views.php
Created March 14, 2014 09:50
DW Post Views Counter
<?php
/**
* Plugin Name: DW Post Views Counter
* Description: To track and display post views counter.
* Version: 1.0
* Author: DesignWall
* Author URI: http://www.designwall.com/
* License: GPLv3 or later
*/