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 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
function display_year() { $year = date(‘Y’); return $year; } add_shortcode(‘year’, ‘display_year’);Continue reading
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
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
add_filter( ‘elementor/frontend/print_google_fonts’, ‘__return_false’ );Continue reading
function year_shortcode () { $year = date_i18n (‘Y’); return $year; } add_shortcode (‘year’, ‘year_shortcode’);Continue reading
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 5); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 5);Continue reading