Skip to content

Instantly share code, notes, and snippets.

View nandaleite's full-sized avatar

Fernanda Leite nandaleite

  • Brazil
  • 10:25 (UTC -03:00)
View GitHub Profile
@nandaleite
nandaleite / script.js
Last active October 26, 2018 17:45
Detect when footer is visible
function intersectionCallback() {
console.log('target is visible!');
}
window.addEventListener('load', function(){
var wrapper = document.querySelector('#wrapper');
var options = {
root: null,
rootMargin: '0px',
threshold: 0
@nandaleite
nandaleite / .htaccess
Created January 13, 2018 01:04
Redirect wordpress site to https
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{ENV:HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
// You can filter the title of most widgets and change the markup. The name of the filter is 'widget_title' and the third parameter tells you the type of the filtered widget.
add_filter( 'widget_title', 'wpse_52108_nav_widget_title_link', 30, 3 );
/**
* Changes the title for the nav menu widget.
*
* @param string $title
* @param string $instance
* @param string $id_base