a Project - http://url.co.uk
Last Updated: DD/MM/YYYY
Contents:
- Purpose of this file
- Authors/contributors
| /* | |
| * There are a couple of places where we use GravityForms to do a file upload into a | |
| * meta-data item of type "upload". The upload file type stores an attachment ID, | |
| * whereas the Gravity Forms upload field stores a URL. | |
| * | |
| * This function is used to convert a URL in the meta-data item specified by the | |
| * $field parameter to an attachment ID - creating the attachment as it goes. | |
| * | |
| * This function should be called from a callback hooked to gform_after_submission_[x] | |
| * |
| // AJAX function for listing directory entries alphabetically | |
| add_action('wp_ajax_directory_alpha', 'mytheme_ajax_directory_alpha'); | |
| add_action('wp_ajax_nopriv_directory_alpha', 'mytheme_ajax_directory_alpha'); | |
| function mytheme_ajax_directory_alpha() { | |
| function alpha_post_where( $where ) { | |
| $new_where = $where . " AND lower(substring(post_title, 1, 1)) = lower('" . $_REQUEST['s'] . "')"; | |
| return $new_where; | |
| } |
Last Updated: DD/MM/YYYY
Contents:
| <?php | |
| /* | |
| * WordPress Custom Columns helper | |
| * | |
| * NOTE: The callback function should echo the output. Use global $post to get the post that's | |
| * being displayed in the list. | |
| * | |
| * Example usage: | |
| * |
| <?php | |
| /* | |
| * This filter specifies default orderings for meta boxes on article screens. | |
| * | |
| * If a user-specific setting exists for the hidden/order list then that is used | |
| * | |
| * The get_<objecttype>_metadata filter is odd. It's always passed "null" as a value. If | |
| * we return a non-null value then that value is used. If we return null, it will fetch the | |
| * real value. Watch out for that! | |
| */ |
| // Grid system - do not apply to full-width-wrapped pages | |
| .wrap.container .main { | |
| @include make-sm-column($main-sm-columns); | |
| .sidebar-primary & { | |
| @include make-sm-column($main-sm-columns - $sidebar-sm-columns); | |
| } | |
| } | |
| .sidebar { | |
| @include make-sm-column($sidebar-sm-columns); | |
| } |
| <?php | |
| /* | |
| Plugin Name: Add category description to content | |
| Plugin URI: https://oikos.digital/ | |
| Description: Adds the category description to the end of the_content() | |
| Version: 1.0 | |
| Author: Ross Wintle/Oikos | |
| Author URI: https://oikos.digital/ | |
| */ |
| <?php | |
| /** | |
| * Plugin Name: More Post - A Dynamic More Post loader | |
| * Version: 0.1-alpha | |
| * Description: A Dynamic More Post loader | |
| * Author: Ross Wintle | |
| * Author URI: http://oikos.digital | |
| * Plugin URI: PLUGIN SITE HERE | |
| * Text Domain: more-post | |
| * Domain Path: /languages |
| <?php | |
| /* | |
| * This needs comments and command-line arguments and stuff. It's ruff and ready. | |
| */ | |
| global $domain_re; | |
| $domain_re = '([0-9a-zA-Z\-]+\.)+[0-9a-zA-Z\-]+'; | |
| function get_nameservers( $whois_out, $domain ) { |