Skip to content

Instantly share code, notes, and snippets.

View yahilmadakiya's full-sized avatar

yahil madakiya yahilmadakiya

View GitHub Profile
@yahilmadakiya
yahilmadakiya / index.html
Created October 26, 2018 06:18
Custom Select Dropdown
<select id="selectbox1">
<option value="">Select an option&hellip;</option>
<option value="aye">Aye</option>
<option value="eh">Eh</option>
<option value="ooh">Ooh</option>
<option value="whoop">Whoop</option>
</select>
<select id="selectbox2">
<option value="">Month&hellip;</option>
<option value="january">January</option>
@yahilmadakiya
yahilmadakiya / custom.js
Created August 24, 2017 13:53
Append meta field value in BuddyPress activity,
// Add code in your theme's js file.
$.ajaxPrefilter( function( options, originalOptions, jqXHR ) {
try {
if ( originalOptions.data == null || typeof ( originalOptions.data ) == 'undefined' || typeof ( originalOptions.data.action ) == 'undefined' ) {
return true;
}
} catch ( e ) {
return true;
}
if ( 'post_update' == originalOptions.data.action ) {
@yahilmadakiya
yahilmadakiya / style.css
Last active March 13, 2017 09:25
Quick fix for 1worldfit: [ mobile device full width ]
@media ( max-width: 500px ) {
#buddypress .activity-list li .activity-content {
margin-left: 0 !important;
}
#buddypress .activity-list li .activity-content .activity-header {
min-height: 50px;
}
li.rtmedia-list-item.media-type-photo {
margin-left: 0 !important;
@yahilmadakiya
yahilmadakiya / function.php
Last active March 14, 2017 07:33
rtmedia_gallery shortcode generator
/* gallery_shortcode_helper Shortcode */
function rtp_gallery_shortcode_helper_callback() {
ob_start(); ?>
<style>
.rtm_gallery_shortcode {
clear: both;
overflow: hidden;
}
.rtm_gallery_shortcode > div > * {
width: 100%;
@yahilmadakiya
yahilmadakiya / function.php
Last active November 9, 2016 13:18
Allows to upload particular filetypes in particular page using rtmedia_uploader source code
function rtmedia_media_uploader_attributes_shortcode( $attr ) {
global $rtmedia;
$allowed_media_type = $rtmedia->allowed_types;
/* page id */
$page_id = '95';
/* File extension */
$extn = 'doc';
if ( get_the_ID() == $page_id ) {
$extn = explode( ',', $extn );