Skip to content

Instantly share code, notes, and snippets.

Rocco Aliberti eri-trabiccolo

  • Pinerolo (TO), Italy
Block or report user

Report or block eri-trabiccolo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@eri-trabiccolo
eri-trabiccolo / llms_quiz_question_show_ui.php
Last active Jun 20, 2019
Show LLMS quiz and question post type UI
View llms_quiz_question_show_ui.php
<?php //<- don' copy this whole line!
// Copy from under this line and paste into your child theme's functions.php or in the LifterLMS Customization plugin
add_filter( 'register_post_type_args', 'my_llms_show_quiz_questions_ui', 10, 2 );
function my_llms_show_quiz_questions_ui( $args, $post_type ) {
if ( in_array( $post_type, array( 'llms_quiz', 'llms_question' ) ) ) {
$args['show_ui'] = true;
}
return $args;
}
@eri-trabiccolo
eri-trabiccolo / remove-unwanted-slashes-from-access-plan-description.php
Last active May 27, 2019
Remove unwanted slashes added to the access plan description
View remove-unwanted-slashes-from-access-plan-description.php
<?php // Do not copy this line
// Copy from under this line and paste into your child theme's functions.php
$unslash_iterarions = 2; //at least 2 times
for ( $i = 1; $i <= $unslash_iterarions; $i++ ) {
add_filter( 'llms_access_before_save_plan', 'wp_unslash', $i );
}
@eri-trabiccolo
eri-trabiccolo / llms-focus-mode.css
Last active Apr 18, 2019 — forked from actual-saurabh/llms-focus-mode.css
LifterLMS Distraction Free Fullscreen mode
View llms-focus-mode.css
body.llms-is-focused .content-area {
background: #fff none;
padding:0;
overflow-y: auto;
position:fixed;
width:100%;
height:100%;
top:0;
left:0;
bottom:0;
@eri-trabiccolo
eri-trabiccolo / disable_dropdown_placement.php
Created Oct 7, 2016
Disable dropdown placement js feature in the Customizr(-PRO) theme
View disable_dropdown_placement.php
add_filter( 'tc_disabled_front_js_parts', 'pc_disable_dropdown_placement_script' );
function pc_disable_dropdown_placement_script( $_parts ){
return array_merge( $_parts, array('Czr_DropdownPlace' => array()) );
}
View use_woocommerce_breadcrumbs.php
add_action( 'wp', 'tc_woocommerce_breadcrumb', 100 );
function tc_woocommerce_breadcrumb() {
//do nothing if we're not in the wc context
if ( ! ( function_exists( 'is_woocommerce' ) && is_woocommerce() ) )
return;
//turn off the theme's breadcrumb
add_filter( 'tc_opt_tc_breadcrumb', '__return_false' );
//display woocommerce breadcrumb before the main container
@eri-trabiccolo
eri-trabiccolo / archive-listing.php
Created Feb 17, 2016
Customizr - WP_Listings: Archive template
View archive-listing.php
<?php
/**
* The template for displaying Listing Archive pages
*
* @link http://codex.wordpress.org/Template_Hierarchy
*
* @package WP Listings
* @since 0.1.0
*/
@eri-trabiccolo
eri-trabiccolo / single-listing.php
Created Feb 17, 2016
Customizr - WP_Listings: Single template
View single-listing.php
<?php
/**
* The Template for displaying all single listing posts
*
* @package WP Listings
* @since 0.1.0
*/
add_action('wp_enqueue_scripts', 'enqueue_single_listing_scripts');
function enqueue_single_listing_scripts() {
@eri-trabiccolo
eri-trabiccolo / smartload_in_one_page.php
Created Feb 3, 2016
Customizr: smartload enabled in one specific page
View smartload_in_one_page.php
add_filter('tc_opt_tc_img_smart_load', 'smartload_in_one_page');
function smartload_in_one_page() {
//is_page parameter : Page ID, title, slug, or array of such
return is_page('A') ? true : false;
}
@eri-trabiccolo
eri-trabiccolo / mini_header_mobile.css
Last active Jan 10, 2016
Mini header in mobile devs
View mini_header_mobile.css
@media (max-width: 979px) {
.tc-header {
border-bottom: none;
}
header.tc-header {
min-height: 40px;
}
.tc-header .brand {
@eri-trabiccolo
eri-trabiccolo / custom_post_types_no_customizr_mb.php
Created Jan 7, 2016
Remove Customizr meta boxes from custom post types
View custom_post_types_no_customizr_mb.php
//remove customizr metaboxes from custom post types edit screen
add_action( 'add_meta_boxes', 'remove_customizr_metaboxes', 20 );
function remove_customizr_metaboxes() {
//array of custom post types
$custom_post_types = get_post_types( array( '_builtin' => false ) );
$current_post_type = get_post_type();
if ( in_array( $current_post_type, $custom_post_types ) ) {
remove_meta_box('layout_sectionid', $current_post_type, 'normal' );
remove_meta_box('slider_sectionid', $current_post_type, 'normal' );
}
You can’t perform that action at this time.