Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| <?php | |
| /** | |
| * Get Post object by post_meta query | |
| * | |
| * @use $post = get_post_by_meta( array( meta_key = 'page_name', 'meta_value = 'contact' ) ) | |
| * @since 1.0.4 | |
| * @return Object WP post object | |
| */ | |
| function get_post_by_meta( $args = array() ) |
| <?php | |
| /** | |
| * Support for WEBP. | |
| * | |
| * @package myplugin | |
| */ | |
| // Security. | |
| if ( ! defined( 'ABSPATH' ) ) { | |
| die( 'Sorry, you are not allowed to access this page directly.' ); |
| <?php | |
| /** | |
| * RSS2 Feed Template for displaying RSS2 Posts feed. | |
| * Adds an offset of "1" to display all but most recent | |
| * | |
| * Full details at: | |
| * https://wordimpress.com/anatomy-advanced-wordpress-blog-notification-email | |
| * | |
| * @package Your Package Name | |
| */ |
| global $pd_scripts; | |
| $pd_scripts = array(); | |
| function list_scripts($tag, $handle) { | |
| global $pd_scripts; | |
| $pd_scripts[] = $handle; | |
| return $tag; | |
| } | |
| add_filter('script_loader_tag', 'list_scripts', 10, 2); |
| <?php | |
| /** | |
| * Displays the post modified date. | |
| * | |
| * @package There is no package. | |
| */ | |
| /** | |
| * Returns the last modified date for the post with the <time> tag and the | |
| * time zone. |
| <?php | |
| /** | |
| * Plugin Name: Add Rel to Images | |
| * Description: Add rel="noopener noreferrer" to linked images. | |
| * | |
| * @package There is no package. | |
| */ | |
| /** | |
| * With jQuery. |