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_filter('bp_ajax_querystring', 'devb_hide_user_on_directory', 15, 2); | |
function devb_hide_user_on_directory( $query_string, $object ){ | |
if( !is_user_logged_in() ) | |
return $query_string; | |
if( $object != 'members' || isset( $_REQUEST['search_terms'] ) && $_REQUEST['search_terms'] ) //updated to not hide from sarch | |
return $query_string; | |
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: bbPress Permalinks | |
* Plugin URI: http://korobochkin.com/ | |
* Description: Change bbPress permalinks. ID number instead of topic slug. This links better than default if you have Cyrilic or other non english charackters in forum's and topic's slugs. forums/forum/FORUM_SLUG/ → forums/forum/ID/. forums/topic/TOPIC_SLUG/→forums/topic/ID/ | |
* Author: Kolya Korobochkin | |
* Author URI: http://korobochkin.com/ | |
* Version: 1.0.0 | |
* Text Domain: bbpress_permalinks | |
* Domain Path: /languages/ |
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
// Custom Logo Link | |
function wpc_url_login() { | |
return "http://twentycms.com/"; | |
} | |
add_filter('login_headerurl', 'wpc_url_login'); | |
// Custom Login Styles (including logo) | |
function login_css() { | |
wp_enqueue_style( 'login_css', get_template_directory_uri() . '/css/login.css' ); | |
} |
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_action( 'wp_set_comment_status', 'wi_comment_notification', 99, 2 ); | |
function wi_comment_notification( $comment_id, $comment_status ){ | |
$comment_object = get_comment( $comment_id ); | |
if( $comment_status == 'approve' && $comment_object->comment_parent > 0 ){ | |
$comment_parent = get_comment( $comment_object->comment_parent ); | |
$mailcontent = 'Hi ' . $comment_parent->comment_author . ',<br><br>'; | |
$mailcontent .= $comment_object->comment_author . ' replied to your comment on <a href="' . get_permalink( $comment_parent->comment_post_ID ) . '">' . get_the_title( $comment_parent->comment_post_ID ).'</a> with the following:'; | |
$mailcontent .= '<blockquote>' . $comment_object->comment_content . '</blockquote>'; |
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 | |
function bp_custom_include_ajax() { | |
global $bp; | |
require_once( BP_PLUGIN_DIR . '/bp-themes/bp-default/_inc/ajax.php' ); | |
if ( !is_admin() ) { | |
// Register buttons for the relevant component templates | |
// Messages button | |
if ( bp_is_active( 'messages' ) ) |
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 | |
/** | |
* Are we looking at the WordPress admin? | |
* | |
* Because AJAX requests are sent to wp-admin/admin-ajax.php, WordPress's | |
* is_admin() function returns true when DOING_AJAX. This function contains | |
* logic to test whether AJAX requests are coming from the front end or from | |
* the Dashboard. | |
* | |
* @return bool |
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
( function( window, undefined ) { | |
'use strict'; | |
// helper function | |
function capitalize( str ) { | |
return str.charAt(0).toUpperCase() + str.slice(1); | |
} | |
// ========================= getStyleProperty by kangax =============================== |
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
#!/bin/bash | |
# Script for creating Virtual Servers On Apache | |
# Check for the correct parameters | |
if [ $# -eq 0 ]; then | |
echo 'Você precisa passar o domínio a ser criado como parâmetro' | |
echo 'Uso: create-site your-domain.com' | |
exit 0 | |
fi |
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
jQuery(document).ready(function($) { | |
// Responsive wp_video_shortcode(). | |
$(".wp-video-shortcode") | |
.css("max-width", "100%") | |
.parent("div") | |
.css("width", "auto"); | |
}); |
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 | |
/** | |
* Remove additional_information and reviews tabs. | |
* | |
* @param array $tabs Default tabs. | |
* | |
* @return array New tabs. | |
*/ | |
function odin_wc_remove_tabs( $tabs ) { | |
if ( isset( $tabs['additional_information'] ) ) |
OlderNewer