This file contains hidden or 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
| The correct minimum set of headers that works across all mentioned browsers: | |
| Cache-Control: no-cache, no-store, must-revalidate | |
| Pragma: no-cache | |
| Expires: 0 | |
| Using PHP: | |
| header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1. | |
| header('Pragma: no-cache'); // HTTP 1.0. |
This file contains hidden or 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 | |
| /* -------------------- LOCALIZATION -------------------- */ | |
| // PHP INI charset | |
| ini_set("default_charset", "UTF-8"); | |
| // Default timezone | |
| date_default_timezone_set('America/Sao_Paulo'); |
This file contains hidden or 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 | |
| // Return post's slug | |
| function the_slug($echo=true) { | |
| $slug = basename(get_permalink()); | |
| do_action('before_slug', $slug); | |
| $slug = apply_filters('slug_filter', $slug); | |
| if( $echo ) echo $slug; | |
| do_action('after_slug', $slug); | |
| return $slug; |
This file contains hidden or 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 | |
| // Remove admin's menu options | |
| add_action('admin_menu', 'remove_menu_options'); | |
| function remove_menu_options () { | |
| global $menu; | |
| $remove = array(__('Links'), __('Posts'), __('Comments'), /*__('Dashboard'),*/ __('Tools'), /*__('Appearance'),*/ __('Plugins'), __('Users'), __('Settings')); | |
| end($menu); |
This file contains hidden or 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 | |
| function custom_excerpt($new_length = 20, $new_more = '...') { | |
| add_filter('excerpt_length', function () use ($new_length) { | |
| return $new_length; | |
| }, 999); | |
| add_filter('excerpt_more', function () use ($new_more) { | |
| return $new_more; | |
| }); |
This file contains hidden or 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
| jQuery(document).ready(function() { | |
| var page = jQuery('.single.post'); | |
| var sidebar = jQuery('.single.post .scrolling-sidebar'); | |
| var content = jQuery('.single.post .content'); | |
| // Scroll with screen | |
| var top = sidebar.offset().top; | |
| var limit = top + page.height() - sidebar.height(); | |
| // Define sidebar-wrapper height |
This file contains hidden or 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
| img#fullscreen-bg { | |
| width: 100%; | |
| min-width: 1024px; | |
| height: auto; | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| z-index: -999; | |
| } |
NewerOlder