[DOMAIN MAPPING] update mapped domain via function

I'm looking to update the mapped domain via a function
So right now it looks like the function that maps a domain is found here:
/wp-content/plugins/domain-mapping/classes/Domainmap/Module/Ajax/Map.php
Is there a way to tie into this, so it's not through AJAX?

Thank you

  • Ash
    • WordPress Hacker

    Hello Chris

    If it just mapping a domain, then it could be just a simple code, like the following:

    function map_my_domain()
    {
    	global $wpdb;
    	$wpdb->insert( DOMAINMAP_TABLE_MAP, array(
    		'blog_id' => (int) $blog_id,
    		'domain'  => $domain,
    		'active'  => 1,
    		"scheme" => $scheme,
    	), array( '%d', '%s', '%d', '%d') );
    }

    You just need to try using the correct blog ID and domain name with schema.

    Let me know if it works for you. Have a nice day!

    Cheers,
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.