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 | |
| /** | |
| * Single Event Meta (Additional Fields) Template | |
| * | |
| * Override this template in your own theme by creating a file at: | |
| * [your-theme]/tribe-events/pro/modules/meta/additional-fields.php | |
| * | |
| * @package TribeEventsCalendarPro | |
| */ |
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
| #include <sys/types.h> | |
| #include <stdlib.h> | |
| #include <dirent.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <wand/MagickWand.h> | |
| int count = 0; | |
| void processdir(const char *name, const int min_edge, const int quality, const int dry_run) { |
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
| /** | |
| * Based on work from krasimirtsonev | |
| * | |
| * http://krasimirtsonev.com/blog/article/csssteal-chrome-extension-that-extracts-css | |
| */ | |
| // helper function for transforming | |
| // node.children to Array | |
| function toArray (obj, ignoreFalsy) { | |
| var arr = [], i; |
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
| #!/bin/bash | |
| # | |
| # This script configures WordPress file permissions based on recommendations | |
| # from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
| # | |
| # Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
| # | |
| WP_OWNER=www-data # <-- wordpress owner | |
| WP_GROUP=www-data # <-- wordpress group | |
| WP_ROOT=$1 # <-- wordpress root directory |
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
| CREATE TABLE `wp_yoast_seo_links` ( | |
| `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, | |
| `url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, | |
| `post_id` bigint(20) unsigned NOT NULL, | |
| `target_post_id` bigint(20) unsigned NOT NULL, | |
| `type` varchar(8) COLLATE utf8mb4_unicode_ci NOT NULL, | |
| PRIMARY KEY (`id`), | |
| KEY `link_direction` (`post_id`,`type`) | |
| ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
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
| /** | |
| * Optimize WooCommerce Scripts | |
| * Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
| */ | |
| add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
| function child_manage_woocommerce_styles() { | |
| //remove generator meta tag | |
| remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
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 | |
| function wc_empty_cart_redirect_url() { | |
| $url = site_url( '/custom-shop-url/', 'https' ); | |
| return $url; | |
| } | |
| add_filter( 'woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url' ); |
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 | |
| /*Add products to divi search module. Source: https://intercom.help/elegantthemes/en/articles/3030197-how-to-enable-products-and-other-post-types-in-divi-s-search-module */ | |
| function custom_remove_default_et_pb_custom_search() { | |
| remove_action( 'pre_get_posts', 'et_pb_custom_search' ); | |
| add_action( 'pre_get_posts', 'custom_et_pb_custom_search' ); | |
| } | |
| add_action( 'wp_loaded', 'custom_remove_default_et_pb_custom_search' ); | |
| function custom_et_pb_custom_search( $query = false ) { | |
| if ( is_admin() || ! is_a( $query, 'WP_Query' ) || ! $query->is_search ) { |
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 | |
| //Uses: https://github.com/Cloudstek/php-laff | |
| //THE doc: 'https://www.parkbeachsystems.com/images/usps/An_Efficient_Algorithm_for_3D_Rectangular_Box_Packing.pdf' | |
| echo '<pre>';//readability | |
| //DATA: array of defined boxes for shipping -outer and inner dimensions plus weight: | |
| $boxes = array( | |
| array( 'ol' => 8.125, 'ow' => 8.125, 'oh' => 4.125, 'il' => 8, 'iw' => 8, 'ih' => 4, 'max_weight' => 20 ), | |
| array( 'ol' => 12.5, 'ow' => 9.875, 'oh' => 3.75, 'il' => 11.25, 'iw' => 9.75, 'ih' => 3.625, 'max_weight' => 10 ), |