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

Add Autofocus on Your Form

/* Add autofocus to the first form field of the form Original doc link: https://wpforms.com/developers/how-to-add-autofocus-on-your-form/ For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_autofocus() { ?>Continue reading

Show WordPress Messages only in Dashboard

function render_system_notices_page() { echo ‘ ‘; echo ‘ Systemmeldungen ‘; echo ‘ ‘; do_action( ‘admin_notices’ ); } function register_system_notices_submenu_page() { add_submenu_page( ‘index.php’, // Slug des Hauptmenüs (Dashboard) ‘Systemmeldungen’, ‘Systemmeldungen’, ‘manage_options’, ‘system-notices’, ‘render_system_notices_page’ ); } add_action(‘admin_menu’, ‘register_system_notices_submenu_page’); function move_plugin_notices_to_custom_view() { global…Continue reading

Minimize Admin Bar

function replace_admin_bar_text() { global $wp_admin_bar; $wp_admin_bar->add_node(array( ‘id’ => ‘my-account’, ‘title’ => ‘👤‘, ‘href’ => get_edit_profile_url(), )); } add_action(‘wp_before_admin_bar_render’, ‘replace_admin_bar_text’, 0); function remove_comments() { global $wp_admin_bar; $wp_admin_bar->remove_menu(‘comments’); } add_action(‘wp_before_admin_bar_render’, ‘remove_comments’, 0); function remove_new_menu() { global $wp_admin_bar; $wp_admin_bar->remove_menu(‘new-content’); } add_action(‘wp_before_admin_bar_render’, ‘remove_new_menu’, 0);Continue reading

Désactiver complètement les commentaires

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading