Guardar Push Token

// Crea un endpoint REST API personalizado en WordPress add_action(‘rest_api_init’, function () { error_log(“Registro de endpoint ejecutado.”); // Para depuración register_rest_route(‘push/v1’, ‘/save-push-token/’, array( ‘methods’ => ‘POST’, ‘callback’ => ‘guardar_push_token’, ‘permission_callback’ => ‘__return_true’ )); }); // Función para manejar la solicitud…Continue reading

YouTube Feeds Pro add Category Support

function sby_videos_taxonomy() { register_taxonomy( ‘video_categories’, ‘sby_videos’, array( ‘hierarchical’ => true, ‘label’ => ‘Video Categories’, ‘query_var’ => true, ‘rewrite’ => array( ‘slug’ => ‘video-category’, ‘with_front’ => false ) ) ); } add_action( ‘init’, ‘sby_videos_taxonomy’);Continue reading

Add Radio Boxes To Donation Form

/** * Add a collection of radio selections to the donation form. * * This snippet only works in Charitable 1.5 or above. * */ function wpchar_charitable_register_new_radios_field() { if ( ! class_exists(“Charitable_Donation_Field” ) ) { return; }; /** * Define…Continue reading

Pre-Populate Vendor/Venue Edit Profile Forms with User’s Pending Post Data

// Pre-populate edit form with data from existing post, regardless of status, with error handling add_filter(‘gform_pre_render’, ‘populate_edit_form_with_pending_post_data’); function populate_edit_form_with_pending_post_data($form) { // Get the current user ID and validate it $user_id = get_current_user_id(); if (!$user_id) { error_log(“Error: Unable to retrieve user…Continue reading