// Yahweh Mission Dashboard Integration — WPCode snippet version
// Paste this into a new PHP Snippet in WPCode, set to run "Auto Insert" /
// "Everywhere", and activate it. Functionally identical to the plugin
// version — just packaged as a snippet since this host strips .php files
// out of uploaded plugin zips.
if (!function_exists('ymi_get_api_url')) {
function ymi_get_api_url() {
return rtrim(get_option('ymi_dashboard_api_url', ''), '/');
}
}
// ---- Settings page: Settings -> Yahweh Mission ----
add_action('admin_menu', function () {
add_options_page('Yahweh Mission Dashboard', 'Yahweh Mission', 'manage_options', 'yahweh-mission', 'ymi_render_settings_page');
});
add_action('admin_init', function () {
register_setting('ymi_settings', 'ymi_dashboard_api_url', array(
'sanitize_callback' => 'esc_url_raw',
'default' => '',
));
});
function ymi_render_settings_page() {
if (!current_user_can('manage_options')) {
return;
}
$api_url = get_option('ymi_dashboard_api_url', '');
?>
Yahweh Mission Dashboard
Connects this site to the Yahweh Mission Dashboard so published children, gifts, and projects appear here automatically via the [ymi_children], [ymi_gift_catalog], and [ymi_child_profile] shortcodes.
Connection check
8));
if (is_wp_error($response)) {
echo '
Could not reach the dashboard: ' . esc_html($response->get_error_message()) . '
At The Yahweh Mission, We Believe Every Child Deserves Daily Nourishment
We provide food and nutrition support for vulnerable children, families, and communities facing hunger and hardship. Through every meal, food pack, and act of care, we share God’s love and restore hope.
Fighting Hunger With Love And Dignity
Hunger affects more than the body. It affects a child’s ability to learn, grow, feel safe, and dream about the future. At The Yahweh Mission, we believe no child should have to face each day without proper food and care.
Our food and nutrition support program helps provide meals, essential groceries, and nutritional assistance to children and families in need. We serve with compassion, respect, and faith, making sure every person is cared for with dignity.
Through the support of donors, sponsors, and prayer partners, we are able to reach vulnerable families and provide practical help during difficult times. Every food pack and every meal becomes a message of love, hope, and encouragement.
Our Main Goals
These goals guide our mission to serve children and families with compassion and purpose. Through every effort, we aim to create lasting impact and bring hope to those in need.