Duplicate Posts and Pages (copy)

// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading

VIsual Campaign Builder: Add HTML Tags To Display In The HTML/CODE Block

add_filter( ‘charitable_campaign_builder_html_allowed_tags’, ‘example_charitable_add_html_tags_to_html_visual_builder’, 10, 2 ); function example_charitable_add_html_tags_to_html_visual_builder( $allowed_html = array(), $campaign ) { // this replaces the default allowed tags with the following. Add or remove tags (and attributes) as needed. $allowed_html = array( ‘a’ => [ ‘href’ =>…Continue reading

Save images as WEBP

/** * Convert Uploaded Images to WebP Format * * This snippet converts uploaded images (JPEG, PNG, GIF) to WebP format * automatically in WordPress. Ideal for use in a theme’s functions.php file, * or with plugins like Code Snippets…Continue reading

Change Arabic Currency symbol to the currency short code

/** * change arabic currency symbol to short Currency name for AED, SAR, QAR , BHD , OMR , KWD */ add_filter( ‘woocommerce_currency_symbol’, ‘wc_change_uae_currency_symbol’, 10, 2 ); function wc_change_uae_currency_symbol( $currency_symbol, $currency ) { switch ( $currency ) { case ‘AED’:…Continue reading

WP Fusion HubSpot Contact Lists & Meta On-Demand Sync

namespace ARI; class WPFusionHubSpotOnDemandSync { public function __constructor() { if(!is_admin()) { \add_action(‘wpf_woocommerce_payment_complete’, [$this, ‘handle_payment_complete’], 0, 2); } } public function log($msg, $level= ‘info’) { \wpf_log($level, \wpf_get_current_user_id(), $msg, [‘source’ => __CLASS__ . ‘::’ . __FUNCTION__]); } public function handle_payment_complete($order_id, $contact_id) {…Continue reading