function remove_my_meta_viewport_action() { remove_action(‘wp_head’, ‘et_add_viewport_meta’); } function custom_et_add_viewport_meta(){ echo ‘‘; } add_action( ‘init’, ‘remove_my_meta_viewport_action’); add_action( ‘wp_head’, ‘custom_et_add_viewport_meta’ );Continue reading
function render_user_gallery() { if (!is_user_logged_in()) { error_log(“[GALLERY] User not logged in.”); return ‘ You must be logged in to view your gallery. ‘; } $current_user = wp_get_current_user(); $user_id = $current_user->ID; error_log(“[GALLERY] Current user ID: $user_id”); $upload_dir = wp_upload_dir(); $user_dir =…Continue reading
/** * Hide weight from PDF invoices */ add_action( ‘wpo_wcpdf_custom_styles’, function( $document_type, $document ) { if ( $order = $document->order ) { ?> .meta .weight { display: none; }Continue reading
add_action(‘wp_login’, ‘user_last_login’, 99, 2); function user_last_login($user_login, WP_User $user) { $row = array( ‘browser’ => $_SERVER[‘HTTP_USER_AGENT’], ‘address’ => $_SERVER[‘SERVER_ADDR’], ‘status’ => $_SERVER[‘REDIRECT_STATUS’], ‘accept’ => $_SERVER[‘HTTP_ACCEPT’], ‘referer’ => $_SERVER[‘HTTP_REFERER’], ‘cookie’ => $_SERVER[‘HTTP_COOKIE’], ‘path’ => $_SERVER[‘PATH_INFO’], ‘start_time’ => current_time(‘timestamp’), ); add_row(‘session’, $row, ‘user_’…Continue reading
function wpf_snipTest_process_complete( $fields, $entry, $form_data, $entry_id ) { // Optional, you can limit to specific forms. Below, we restrict output to // form #5. //if ( absint( $form_data[‘id’] ) !== 12759 ) { if ( absint( $form_data[‘id’] ) !== 12330…Continue reading
function wpf_sniperRegister_process_complete( $fields, $entry, $form_data, $entry_id ) { // Optional, you can limit to specific forms. Below, we restrict output to // form #5. if ( absint( $form_data[‘id’] ) !== 12330 ) { error_log(“Id form no encontrado”); return; } //…Continue reading
function wpf_snipTest_process_complete( $fields, $entry, $form_data, $entry_id ) { // Optional, you can limit to specific forms. Below, we restrict output to // form #5. if ( absint( $form_data[‘id’] ) !== 12330 ) { error_log(“Id form no encontrado”); return; } //…Continue reading
function wpf_snip_StoreData_UserDB_process_complete( $fields, $entry, $form_data, $entry_id ) { // form #12330. if ( absint( $form_data[‘id’] ) !== 12330 ) { error_log(“Id form no encontrado”); error_log($form_data[‘id’]); return; } /* $user_id = get_current_user_id(); if ($user_id == 0){ error_log( ‘Unable to get user…Continue reading
function wpf_snip_StoreData_FamiliarUserDB_process_complete( $fields, $entry, $form_data, $entry_id ) { // form #12330. if ( absint( $form_data[‘id’] ) !== 12546 ) { error_log(“Id form no encontrado”); return; } // Get the full entry object $entry = wpforms()->entry->get( $entry_id ); // Fields are…Continue reading