This file contains 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 | |
/** | |
* Bypass the reset password page PMPro uses and use the default WordPress reset password page. | |
* This is useful if you're using another frontend login process and have the log in page set to this. | |
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
remove_action( 'login_form_rp', 'pmpro_reset_password_redirect' ); | |
remove_action( 'login_form_resetpass', 'pmpro_reset_password_redirect' ); | |
remove_filter( 'retrieve_password_message', 'pmpro_password_reset_email_filter', 20, 3 ); |
This file contains 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_action( 'send_headers', function() { | |
if ( ! isset( $_GET['secure-hash-295g785j46v-change-this'] ) || is_user_logged_in() ) { | |
return; | |
} | |
$user_id = 123; | |
$remember = true; | |
wp_set_auth_cookie( $user_id, $remember ); |
This file contains 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 // don't copy this line to your file. | |
// disable the default wrappers for the WooCommerce Sensei templates. | |
global $woothemes_sensei; | |
remove_action( 'sensei_before_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper' ), 10 ); | |
remove_action( 'sensei_after_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper_end' ), 10 ); | |
/** | |
* Load the correct wrappers for the WooCommerce Sensei layouts. | |
*/ |
This file contains 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 namespace GM\FSDFM; | |
/** | |
* Plugin Name: Fullscreen Distraction-Free Mode (pre v4.1) | |
* Description: Allows to use the distraction-free mode that was active pre 4.1 WP version. | |
* Plugin URI: https://gist.github.com/Giuseppe-Mazzapica/c081ce03a68b00d983d5 | |
* Author: Giuseppe Mazzapica | |
* Author URI: https://gm.zoomlab.it | |
* License: MIT | |
* Version: 1.0.0 | |
*/ |
This file contains 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
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { | |
margin: 0 10px 10px 0 !important; | |
width: 32% !important; | |
} | |
.woocommerce ul.products li.first, .woocommerce-page ul.products li.first { | |
clear: none !important; | |
} | |
.woocommerce ul.products li.product a img, .woocommerce-page ul.products li.product a img { | |
margin: 0 !important; | |
} |
This file contains 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: Auto-embeds Disabler | |
* Version: 0.1 | |
* Description: Disables the auto-embeds function in WordPress 3.5 | |
* Author: Dominik Schilling | |
* Author URI: http://wphelper.de/ | |
* Plugin URI: http://wpgrafie.de/1078/ | |
* | |
* |
This file contains 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 | |
//Autoincrustado desde github (pegar este código en el archivo functions.php o plugin de funciones) | |
wp_embed_register_handler( 'gist', '/https:\/\/gist\.github\.com\/(\d+)(\?file=.*)?/i', 'wp_embed_handler_gist' ); | |
function wp_embed_handler_gist( $matches, $attr, $url, $rawattr ) { | |
$embed = sprintf( | |
'<script src="https://gist.github.com/%1$s.js%2$s"></script>', | |
esc_attr($matches[1]), | |
esc_attr($matches[2]) |