These are called in extensions. For example, the following module has some hooks:
local M = {}
M.onBeamNGTrigger = function(data)
-- ...
end| #!/usr/bin/env bash | |
| # inspired by | |
| # https://gist.github.com/JannikArndt/feb720c1f5d210b4820b880af23f2a07 | |
| # which was inspired by | |
| # https://github.com/fwartner/mac-cleanup/blob/master/cleanup.sh | |
| # https://gist.github.com/jamesrampton/4503412 | |
| # https://github.com/mengfeng/clean-my-mac/blob/master/clean_my_mac.sh | |
| # https://github.com/szymonkaliski/Dotfiles/blob/master/Scripts/clean-my-mac | |
| # http://brettterpstra.com/2015/10/27/vacuuming-mail-dot-app-on-el-capitan/ / https://github.com/pbihq/tools/blob/master/MailDBOptimiser.sh |
| <?php | |
| class WordFence_Logins_Extended_Logs { | |
| protected $VERSION = 1; | |
| public function __construct() { | |
| add_action( 'admin_init', [ $this, 'init' ] ); | |
| add_action( 'wordfence_daily_cron', [ $this, 'update_backup' ], 5 ); | |
| add_action( 'wordfence_daily_cron', [ $this, 'cleanup_backup' ], 15 ); | |
| } |
| <?php | |
| /** | |
| * Remove "Cancel" button for cancelled subscriptions. | |
| * | |
| * The user is still able to cancel auto-renew, but can't completely cancel the membership. | |
| */ | |
| add_filter( 'pmpro_member_action_links', function ( $pmpro_member_action_links ) { | |
| global $current_user; | |
| // bail if cancel link has been removed by someone else |
| /** | |
| * @name MarkerClustererPlus for Google Maps V3 | |
| * @version 2.1.2 [May 28, 2014] | |
| * @author Gary Little | |
| * @fileoverview | |
| * The library creates and manages per-zoom-level clusters for large amounts of markers. | |
| * <p> | |
| * This is an enhanced V3 implementation of the | |
| * <a href="http://gmaps-utility-library-dev.googlecode.com/svn/tags/markerclusterer/" | |
| * >V2 MarkerClusterer</a> by Xiaoxi Wu. It is based on the |
| <?php | |
| add_filter( 'doing_it_wrong_trigger_error', function ( $doing_it_wrong, $function_name ) { | |
| if ( '_load_textdomain_just_in_time' === $function_name ) { | |
| return false; | |
| } | |
| return $doing_it_wrong; | |
| }, 10, 2 ); |
| <?php | |
| /** | |
| * Cancel subscriptions when a recurring payment fails. | |
| * You should also use the PMPro Email Templates Add On to edit the | |
| * default billing_failure.html email to mention that users are cancelled upon failure. | |
| */ | |
| function my_cancel_subscriptions_on_any_failed_payment( $order ) { | |
| pmpro_cancelMembershipLevel( $order->membership_id, $order->user_id ); | |
| // ensure cancel at gateway |
| <?php | |
| /** | |
| * Define which Stripe webhook applications are permitted, then exclude any other webhook request coming through. | |
| * | |
| * This is expecially useful when you have multiple websites sharing the same Stripe account. | |
| * Then, you gonna see multiple webhook requests coming from different applications. | |
| * This snippet will allow you to filter out the ones you don't want to process. | |
| */ |
| <?php | |
| /** | |
| * Don't apply coupons to the product addons from PPOM for WooCommerce plugin. | |
| ì */ | |
| add_filter( 'woocommerce_coupon_get_discount_amount', function ( $discount, $discounting_amount, $cart_item, $single, $coupon ) { | |
| if ( ! function_exists( 'ppom_get_field_prices' ) || ! function_exists( 'ppom_price_get_addon_total' ) ) { | |
| return $discount; | |
| } | |
| if ( $coupon->is_type( 'percent' ) ) { |
| -- Simhub telemetry mod, Wotever 2023 | |
| local M = {} | |
| local ip = "127.0.0.1" | |
| local port = 9999 | |
| local updateRate = 100 | |
| local udpSocket = nil | |
| local lastSimHubFrameData = nil | |
| local abs = math.abs | |
| local ffi = require("ffi") |