This file contains hidden or 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
| // Redirect admins to the dashboard and other users elsewhere | |
| add_filter( 'login_redirect', 'xxx_login_redirect', 10, 3 ); | |
| function xxx_login_redirect( $redirect_to, $request, $user ) { | |
| // Is there a user? | |
| if ( is_array( $user->roles ) ) { | |
| // Is it an administrator? | |
| if ( in_array( 'administrator', $user->roles ) ) | |
| return home_url( '/wp-admin/' ); | |
| else |
This file contains hidden or 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 | |
| /* ------------------------------------------------------------------*/ | |
| /* PAGINATION */ | |
| /* ------------------------------------------------------------------*/ | |
| //paste this where the pagination must appear | |
| global $wp_query; | |
| $total = $wp_query->max_num_pages; | |
| // only bother with the rest if we have more than 1 page! |
This file contains hidden or 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
| /* ------------------------------------------------------------------*/ | |
| /* ADD PRETTYPHOTO REL ATTRIBUTE FOR LIGHTBOX */ | |
| /* ------------------------------------------------------------------*/ | |
| add_filter('wp_get_attachment_link', 'rc_add_rel_attribute'); | |
| function rc_add_rel_attribute($link) { | |
| global $post; | |
| return str_replace('<a href', '<a rel="prettyPhoto[pp_gal]" href', $link); | |
| } |
This file contains hidden or 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
| <h3>Pages</h3> | |
| <ul><?php wp_list_pages("title_li=" ); ?></ul> | |
| <h3>Feeds</h3> | |
| <ul> | |
| <li><a title="Full content" href="feed:<?php bloginfo('rss2_url'); ?>">Main RSS</a></li> | |
| <li><a title="Comment Feed" href="feed:<?php bloginfo('comments_rss2_url'); ?>">Comment Feed</a></li> | |
| </ul> | |
| <h3>Categories</h3> | |
| <ul><?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0&feed=RSS'); ?></ul> | |
| <h3>All Blog Posts:</h3> |
This file contains hidden or 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 | |
| /* ------------------------------------------------------------------*/ | |
| /* SECURE EMAIL SHORTCODE */ | |
| /* ------------------------------------------------------------------*/ | |
| function xxx_secure_mail( $atts ) { | |
| extract( | |
| shortcode_atts( array( | |
| "mailto" => '', | |
| "txt" => '' |
This file contains hidden or 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: Easy Default Parameters | |
| Plugin URI: http://remicorson.com | |
| Description: Set your own default parameters on a fresh WordPress install | |
| Version: 0.1 | |
| Author: Rémi Corson | |
| Author URI: http://remicorson.com | |
| Contributors: Rémi Corson, corsonr | |
| */ |
This file contains hidden or 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
| /* --- BBPRESS PAGINATION --- */ | |
| .bbp-pagination-links { list-style:none; font-size:12px; } | |
| .bbp-pagination-links { display:inline; } | |
| .bbp-pagination-links a, .bbp-pagination-links a.next, .bbp-pagination-links a.prev{ display:block; float:left; padding:4px 9px; margin-right:7px; border:1px solid #efefef; } | |
| .bbp-pagination-links span.current { display:block; float:left; padding:4px 9px; margin-right:7px; border:1px solid #efefef; background-color:#f5f5f5; } | |
| .bbp-pagination-links span.dots { display:block; float:left; padding:4px 4px; margin-right:7px; } |
This file contains hidden or 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
| // redirection if user is logged in | |
| function rcp_redirect_if_user_is_logged() { | |
| if (is_plugin_active('restrict-content-pro/restrict-content-pro.php')) { | |
| if( is_user_logged_in() ) { | |
| wp_redirect( home_url() ); // replace home_url() by whatever url/page you want | |
| exit; | |
| } | |
| } | |
| } | |
| add_action( 'rcp_after_login_form', 'rcp_redirect_if_user_is_logged' ); |
This file contains hidden or 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 All Custom Post Types to search | |
| * | |
| * Returns the main $query. | |
| * | |
| * @access public | |
| * @since 1.0 | |
| * @return $query |
This file contains hidden or 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
| /* ------------------------------------------------------------------*/ | |
| /* ADD BBPRESS PRIVATE SHORTCODE */ | |
| /* ------------------------------------------------------------------*/ | |
| function remi_bbp_shortcodes( $content, $reply_id ) { | |
| return do_shortcode( $content ); | |
| } | |
| add_filter('bbp_get_reply_content', 'remi_bbp_shortcodes', 10, 2); | |
| add_filter('bbp_get_topic_content', 'remi_bbp_shortcodes', 10, 2); | |
| function remi_add_bbpress_private_shortcode( $atts, $content = null ) { |