VaultPress::option_handler PHP Method

option_handler() public method

means that we do not need to resolve an id like we would for, say, a post.
public option_handler ( $option_name )
    function option_handler($option_name)
    {
        global $wpdb;
        // Step 1 -- exclusionary rules, don't send these options to vaultpress, because they
        // either change constantly and/or are inconsequential to the blog itself and/or they
        // are specific to the VaultPress plugin process and we want to avoid recursion
        $should_ping = true;
        $ignore_names = $this->get_option_name_ignore();
        foreach ((array) $ignore_names as $val) {
            if ($val[0] == '/') {
                if (preg_match($val, $option_name)) {
                    $should_ping = false;
                }
            } else {
                if ($val == $option_name) {
                    $should_ping = false;
                }
            }
            if (!$should_ping) {
                break;
            }
        }
        if ($should_ping) {
            $this->add_ping('db', array('option' => $option_name));
        }
        // Step 2 -- If WordPress is about to kick off a some "cron" action, we need to
        // flush vaultpress, because the "remote" cron threads done via http fetch will
        // be happening completely inside the window of this thread.  That thread will
        // be expecting touched and accounted for tables
        if ($option_name == '_transient_doing_cron') {
            $this->do_pings();
        }
        return $option_name;
    }
VaultPress