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 | |
| /** | |
| * Check if attachement being used elsewhere | |
| */ | |
| function wpclevel_is_attachment_used_elsewhere($attachment_id, $exclude_post_id) | |
| { | |
| global $wpdb; | |
| // Search in postmeta table | |
| $found = $wpdb->get_var($wpdb->prepare( |
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
| // Is user deleting? | |
| document.addEventListener("keydown", e => { | |
| document.body.classList.toggle("deleting", e.key === "Delete" || e.key === "Backspace") | |
| }) | |
| // Automaticlly add forward slash | |
| expDateInput.addEventListener("input", e => { | |
| if (document.body.classList.contains("deleting")) { | |
| return | |
| } |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Simple Backbone WordPress Example</title> | |
| <link rel="stylesheet" href="base.css"> | |
| </head> | |
| <body> | |
| <ul id="post-list"></ul> |
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
| ## Configure eth0 | |
| # | |
| # vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
| DEVICE="eth0" | |
| NM_CONTROLLED="yes" | |
| ONBOOT=yes | |
| HWADDR=A4:BA:DB:37:F1:04 | |
| TYPE=Ethernet | |
| BOOTPROTO=static |
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
| # A heavily customized VCL to support WordPress | |
| # Some items of note: | |
| # Supports https | |
| # Supports admin cookies for wp-admin | |
| # Caches everything | |
| # Support for custom error html page | |
| vcl 4.0; | |
| import directors; | |
| import std; |