Skip to content

Instantly share code, notes, and snippets.

View mrjarbenne's full-sized avatar

Jared Bennett mrjarbenne

View GitHub Profile
@KaineLabs
KaineLabs / yzc_disable_activity_stream_wall_form.php
Last active August 11, 2022 21:34
Youzify - BuddyPress Disable Posting form on Global Activity Stream.
<?php
/**
* Youzify - BuddyPress Disable Posting form on Global Activity Stream.
*/
function yzc_disable_activity_stream_wall_form( $enable ) {
if ( bp_is_active( 'activity' ) && bp_is_activity_directory() ) {
return false;
}
@pento
pento / rainbow-bar.php
Last active September 26, 2017 21:20
WordPress Rainbow Bar
<?php
/*
* Plugin Name: Rainbow Bar!
*/
function rainbow_bar() {
?>
<style type="text/css">
#wpadminbar {
<?php
// display member list filtered by profile fields
function member_list_by_profile_fields( $atts ) {
global $bp, $wpdb;
$atts = shortcode_atts( array(
'id' => '1',
'YOURFIELDNAME' => 'default-value' // this can be just a number! check in bp profile field settings with inspector tool ;)
), $atts, 'member_list_by_profile_fields' );
@tagplus5
tagplus5 / imageToText.gs
Created December 18, 2015 18:02
google apps script image to text ocr
function doGet(request) {
if (request.parameters.url != undefined && request.parameters.url != "") {
var imageBlob = UrlFetchApp.fetch(request.parameters.url).getBlob();
var resource = {
title: imageBlob.getName(),
mimeType: imageBlob.getContentType()
};
var options = {
ocr: true
};
@mrwweb
mrwweb / style.css
Created October 14, 2015 17:31
Display Full Caption in Jetpack Tiled Gallery [WordPress]
/**
* SHOW JETPACK FULL CAPTION
*/
/* specificity hack to override Jetpack's styles */
.tiled-gallery-caption.tiled-gallery-caption {
width: auto;
bottom: 2px;
left: 2px;
right: 2px;
@jesseeproductions
jesseeproductions / tec-admin-bar.php
Created July 30, 2015 14:57
The Events Calendar - Remove Events from Admin Bar for all roles, but the admin
<?php
/*
* The Events Calendar - Remove Events from Admin Bar for all roles, but the admin
* @3.11
*
*/
add_action( 'wp_before_admin_bar_render', 'removeToolbarItems' , 10 );
function removeToolbarItems(){
global $wp_admin_bar;
if(!current_user_can('manage_options')){
@r-a-y
r-a-y / disable-email-on-sitewide-tags.php
Last active August 29, 2015 13:56
Disables email from sending on a WPMU Sitewide Tags blog.
<?php
/*
Plugin Name: WPMU Sitewide Tags - Disable Email
Description: Disables email from sending on a WPMU Sitewide Tags blog.
Author: r-a-y
Version: 0.1
*/
/**
* Disables emails from firing on the WPMU Sitewide Tags blog.
@ParhamG
ParhamG / blacklist_jetpack_modules.php
Last active August 8, 2024 22:45
If you are annoyed with this automatic activation of Jetpack modules, specially on a multi-site setup, here is how to completely disable modules across the entire network without having to visit each site and disable modules one by one.Since version 2.4, Jetpack has introduced 'jetpack_get_available_modules' filter, which allows you to black lis…
<?php
/*
Plugin Name: Blacklist Jetpack Modules
Plugin URI: https://gist.github.com/ParhamG/6494979
Description: Blacklist Jetpack modules.
Author: Parham Ghaffarian
Author URI: http://parh.am
Version: 0.1.3.4.1
*/