Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| <?php | |
| /* | |
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
| * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
| * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
| * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
| * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
| * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| // This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.github.io | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
| * Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
| */ |
| # | |
| # Sources: | |
| # http://stackoverflow.com/questions/7704624/how-can-i-use-gzip-compression-for-css-and-js-files-on-my-websites | |
| # http://codex.wordpress.org/Output_Compression | |
| # http://www.perun.net/2009/06/06/wordpress-websites-beschleuinigen-4-ein-zwischenergebnis/#comment-61086 | |
| # http://www.smashingmagazine.com/smashing-book-1/performance-optimization-for-websites-part-2-of-2/ | |
| # http://gtmetrix.com/configure-entity-tags-etags.html | |
| # http://de.slideshare.net/walterebert/die-htaccessrichtignutzenwchh2014 | |
| # http://de.slideshare.net/walterebert/mehr-performance-fr-wordpress | |
| # https://andreashecht-blog.de/4183/ |
| <? | |
| if( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['insert_post'] )) { //check that our form was submitted | |
| $title = $_POST['thread_title']; //set our title | |
| if ($_POST['thread_description']=="") { // check if a description was entered | |
| $description = "See thread title..."; // if not, use placeholder | |
| } else { | |
| $description = $_POST['thread_description']; //if so, use it |
| <?php | |
| /** | |
| * post-process.php | |
| * make sure to include post-process.php in your functions.php. Use this in functions.php: | |
| * | |
| * get_template_part('post-process'); | |
| * | |
| */ | |
| function do_insert() { | |
| if( 'POST' == $_SERVER['REQUEST_METHOD'] |
| // Creates a small boarder around the table. | |
| .table_of_contents.fl { | |
| float: right; | |
| margin: 0 0 15px 15px; | |
| padding: 5px; | |
| border: 1px solid #AAA; | |
| } |
| <?php | |
| if ( !class_exists( 'WDS_Taxonomy_Radio' ) ) { | |
| /** | |
| * Removes and replaces the built-in taxonomy metabox with our radio-select metabox. | |
| * @link http://codex.wordpress.org/Function_Reference/add_meta_box#Parameters | |
| */ | |
| class WDS_Taxonomy_Radio { | |
| // Post types where metabox should be replaced (defaults to all post_types associated with taxonomy) |