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
| // Switch on debugging | |
| define('WP_DEBUG', true); | |
| // Direct WordPress to the debug log file /wp-content/debug.log file | |
| define('WP_DEBUG_LOG', true); | |
| // PHP 'display_errors' variable is not forced | |
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
| /* | |
| -- Add to a plugin or functions.php | |
| */ | |
| add_filter( 'jpg_quality', 'high_jpg_quality' ); | |
| function high_jpg_quality() { | |
| return 100; | |
| } |
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
| $my_url = 'http://marcbacon.com/?awesome=true'; | |
| $url = esc_url( $my_url ); |
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
| // Place in functions.php or in a plugin | |
| add_filter('show_admin_bar', '__return_false'); |
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
| // Remove links from the admin bar/toolbar | |
| function remove_admin_bar_links() { | |
| global $wp_admin_bar; | |
| $wp_admin_bar->remove_menu('wp-logo'); | |
| $wp_admin_bar->remove_menu('updates'); | |
| $wp_admin_bar->remove_menu('search'); | |
| $wp_admin_bar->remove_menu('comments'); | |
| // Remove site name and new only if user is not administrator |
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
| .col { | |
| float: left; | |
| box-sizing: border-box; | |
| padding: 0 10px; | |
| } | |
| .col-1 { | |
| width: 8.3333%; | |
| } | |
| .col-2 { | |
| width: 16.6666%; |
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
| <table width="100%" border="0" cellspacing="0" cellpadding="0"> | |
| <tr> | |
| <td> | |
| <div> | |
| <!--[if mso]> | |
| <v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="http://example.com" style="height:36px;v-text-anchor:middle;width:150px;" arcsize="5%" strokecolor="#EB7035" fillcolor="#EB7035"> | |
| <w:anchorlock/> | |
| <center style="color:#ffffff;font-family:Helvetica, Arial,sans-serif;font-size:16px;">I am a button →</center> | |
| </v:roundrect> | |
| <![endif]--> |
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
| /** | |
| * Enable GOD MODE - all settings saved in the database in one place | |
| */ | |
| function god_mode() { | |
| add_options_page(__('All Settings'), __('All Settings'), 'administrator', 'options.php'); | |
| } | |
| add_action('admin_menu', 'god_mode'); |
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 | |
| // Variables used in this script: | |
| // $summary - text title of the event | |
| // $datestart - the starting date (in seconds since unix epoch) | |
| // $dateend - the ending date (in seconds since unix epoch) | |
| // $address - the event's address | |
| // $uri - the URL of the event (add http://) | |
| // $description - text description of the event | |
| // $filename - the name of this file for saving (e.g. my-event-name.ics) | |
| // |