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
| data:text/html, <head><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAJ6TrAFy+8QCC0vgA7+/vAC6n7ACE0/gAS2RuAKbU5QDAwMAAv+3+ACek6gApoeYAAAAAAAAAAAAAAAAARERERERERABEREREREREAEREREREREQAREREeIRERABJmZSohUREAERERKolVEQAREREozUVRABJmZRDNlFUAEREREQzZRUAREREREM2W1BJmZmZRDNlxUREREREQzZVREREREREMzVJmZmZmURDM0REREREREQzRERERERERAMAAwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAA" rel="icon" type="image/x-icon" /><style>body{font: 2rem/1.5 monospace;max-width:40ch;margin:0 auto;padding:1ch;}main{background-color:rgb(255,255,204);box-shadow: 0 4px 10px rgba(0,0,0,0.2);}title{font-size: calc(2rem + (3 - 2) * ((100vw - 300px) / (1600 - 300)));line-height:1.1;margin-top:2vw;font-weight: bold;padding:0.5rem 1rem;margin-bottom:2px;border-bottom:2px solid lightgrey;}p{margin-top:0;padding:0 1rem;min-height:calc(20 * (2rem + 2px));line-height:calc(2 |
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
| window.history.pushState("object or string", "Title", window.location.href.split("?")[0]); | |
| // can also use replaceState to negate back button |
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
| $data = array(); | |
| $fp = fopen('data.json', 'w'); | |
| fwrite($fp, json_encode($data)); | |
| fclose($fp); |
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
| function author_admin_notice() | |
| { | |
| if (isset($_GET['query_string_here']) && $_GET['query_string_here'] == 'value') { | |
| echo ' | |
| <div class="notice notice-success is-dismissible"> | |
| <p>Notice goes here! </p> | |
| </div> | |
| '; | |
| } | |
| } |
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
| /* Keep icons from shifting layout */ | |
| html:not(.fontawesome-i2svg-complete) .fa-fw { | |
| display: inline-block; | |
| width: 1.28571429em; | |
| } | |
| html:not(.fontawesome-i2svg-complete) .fa-fw::before { | |
| content: "\00a0"; | |
| } |
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_action('admin_head', 'my_custom_fonts'); | |
| function my_custom_fonts() { | |
| echo '<style> | |
| body, td, textarea, input, select { | |
| font-family: "Lucida Grande"; | |
| font-size: 12px; | |
| } | |
| </style>'; | |
| } |
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
| function my_test($args) { | |
| global $post_type_object; | |
| if ( $post_type_object->name == 'my_custom_post_type') { | |
| $args['depth'] = 1; | |
| } | |
| return $args; | |
| } | |
| add_filter('page_attributes_dropdown_pages_args','my_test'); | |
| add_filter('quick_edit_dropdown_pages_args', 'my_test'); |
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
| /** | |
| * How to echo the contents of an SVG file with PHP | |
| * https://geoffgraham.me/how-to-echo-the-contents-of-an-svg-file-with-php/ | |
| * | |
| * "Using this is so much cleaner in the template files than copying and pasting the entire SVG code. Plus, it lets me manage all of my SVG files from a central location. Update it once, and the changes are applied everywhere!" | |
| */ | |
| <?php echo file_get_contents( get_template_directory_uri() . '/dist/img/logo.svg' ); ?> |
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 if(time() < strtotime('2020-08-14 11:00-07:00')): ?> | |
| <p>Content!</p> | |
| <?php 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
| /* https://piccalil.li/quick-tip/add-scroll-margin-to-all-elements-which-can-be-targeted */ | |
| [id] { | |
| scroll-margin-top: 2ex; | |
| } |
OlderNewer