add_action( ‘admin_bar_menu’, function ( $admin_bar ) { // Only show this when editing a post. $screen = get_current_screen(); if ( ! $screen || ‘post’ !== $screen->base ) { return; } $post = get_post(); $post_type_object = get_post_type_object( $post->post_type ); if (…Continue reading
add_action( ‘admin_bar_menu’, function ( $admin_bar ) { // Only show this when editing a post. $screen = get_current_screen(); if ( ! $screen || ‘post’ !== $screen->base ) { return; } $post = get_post(); $post_type_object = get_post_type_object( $post->post_type ); if (…Continue reading
// When the user profile form is updated, this snippet checks if the business_name field matches a preexisting vendor post title. // If so, a vendor profile claim request is sent to the ‘Vendor Claims’ admin page // This snippet…Continue reading
// This code snippet is run when a Profile Builder user profile is successfully updated, it: // – checks if the business_name field matches a vendor post title a vendor profile claim request is sent to the ‘Vendor Claims’ admin…Continue reading
// This code snippet is run when a Profile Builder user profile is successfully updated, it: // – checks if the business_name field matches a vendor post title a vendor profile claim request is sent to the ‘Vendor Claims’ admin…Continue reading
// This code snippet creates an admin page for managing vendor profile claims. // It allows administrators to approve or deny claims, which updates the ownership of vendor posts accordingly. // The Vendor Claims page displays pending claims and provides…Continue reading
function vendor_claim_admin_menu() { add_menu_page( ‘Vendor Claims’, ‘Vendor Claims’, ‘manage_options’, ‘vendor-claims’, ‘vendor_claims_page’, ‘dashicons-businessman’, 30 ); } add_action(‘admin_menu’, ‘vendor_claim_admin_menu’); function vendor_claims_page() { global $wpdb; $claims = $wpdb->get_results(“SELECT post_id, meta_value as user_id FROM {$wpdb->postmeta} WHERE meta_key = ‘pending_claim_by_user’”); echo ‘ Vendor Claims ‘;…Continue reading
// Código PHP echo “Entrada a Conexión de la BD\n”; // Database hostname define(‘DBHOST’, ‘localhost:3306’); // Database username define(‘DB_USER’, ‘wp_j4cbx’); // Database password define(‘DB_PASSWORD’, ‘uDFmf0E~?a2YgVj0’); // Nombre de la BD define( ‘DB_NAME’, ‘wp_n5p5f’); $conexion = mysqli_connect(DBHOST, DB_USER, DB_PASSWORD, DB_NAME); echo…Continue reading