function bccl_license_block($work = "", $css_class = "", $show_button = "default", $button = "default") {
    echo bccl_add_placeholders(bccl_get_license_block($work, $css_class, $show_button, $button));
}
function bccl_append_to_post_body($PostBody) {

    // Get global settings
    $cc_settings = get_option("cc_settings");

    // If there is no global license, stop here
    if ( empty($cc_settings['license_url']) ) {
        return $PostBody;
    }

    if ( is_singular() && ! is_front_page() ) { // The license block is not appended to static front page content.

        if ( is_attachment() ) {
            if ( $cc_settings["cc_body_attachments"] != "1" ) {
                return $PostBody;
            }
        } elseif ( is_page() ) {
            if ( $cc_settings["cc_body_pages"] != "1" ) {
                return $PostBody;
            }
        } elseif ( is_single() ) {
            if ( $cc_settings["cc_body"] != "1" ) {
                return $PostBody;
            }
        }

        // Append the license block to the content
        $cc_block = bccl_get_license_block("", "", "default", "default");
        if ( ! empty($cc_block) ) {
            $PostBody .= bccl_add_placeholders($cc_block);
        }

    }
    return $PostBody;
}