File: /var/www/html/wp-content/mu-plugins/ethnic-copyright-ip-policy-page.php
<?php
/**
* Plugin Name: Ethnic Copyright IP Policy Page
* Description: Creates and renders a plain text Copyright / IP Policy page.
* Version: 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! function_exists( 'ethnic_copyright_ip_policy_page_get_target_page' ) ) {
function ethnic_copyright_ip_policy_page_get_target_page() {
return get_page_by_path( 'copyright-ip-policy' );
}
}
if ( ! function_exists( 'ethnic_copyright_ip_policy_page_ensure_page' ) ) {
function ethnic_copyright_ip_policy_page_ensure_page() {
$page = ethnic_copyright_ip_policy_page_get_target_page();
if ( $page instanceof WP_Post ) {
return;
}
$page_id = wp_insert_post(
array(
'post_title' => 'Copyright / IP Policy',
'post_name' => 'copyright-ip-policy',
'post_status' => 'publish',
'post_type' => 'page',
'post_content' => '',
'post_parent' => 0,
'comment_status' => 'closed',
)
);
if ( $page_id && ! is_wp_error( $page_id ) ) {
update_post_meta( $page_id, '_wp_page_template', 'default' );
}
}
add_action( 'init', 'ethnic_copyright_ip_policy_page_ensure_page', 5 );
}
if ( ! function_exists( 'ethnic_copyright_ip_policy_page_request_matches' ) ) {
function ethnic_copyright_ip_policy_page_request_matches() {
if ( is_admin() ) {
return false;
}
$request_uri = isset( $_SERVER['REQUEST_URI'] ) ? (string) wp_unslash( $_SERVER['REQUEST_URI'] ) : '';
$request_uri = wp_parse_url( $request_uri, PHP_URL_PATH );
$request_uri = is_string( $request_uri ) ? untrailingslashit( $request_uri ) : '';
$target_path = wp_parse_url( home_url( '/copyright-ip-policy/' ), PHP_URL_PATH );
$target_path = is_string( $target_path ) ? untrailingslashit( $target_path ) : '/copyright-ip-policy';
return '' !== $request_uri && $request_uri === $target_path;
}
}
if ( ! function_exists( 'ethnic_copyright_ip_policy_page_is_target' ) ) {
function ethnic_copyright_ip_policy_page_is_target() {
if ( ethnic_copyright_ip_policy_page_request_matches() ) {
return true;
}
if ( is_admin() ) {
return false;
}
$page = ethnic_copyright_ip_policy_page_get_target_page();
if ( ! ( $page instanceof WP_Post ) ) {
return false;
}
return (int) get_queried_object_id() === (int) $page->ID || is_page( (int) $page->ID );
}
}
if ( ! function_exists( 'ethnic_copyright_ip_policy_page_body_class' ) ) {
function ethnic_copyright_ip_policy_page_body_class( $classes ) {
if ( ethnic_copyright_ip_policy_page_is_target() ) {
$classes[] = 'ethnic-copyright-ip-policy-active';
}
return $classes;
}
add_filter( 'body_class', 'ethnic_copyright_ip_policy_page_body_class' );
}
if ( ! function_exists( 'ethnic_copyright_ip_policy_page_data' ) ) {
function ethnic_copyright_ip_policy_page_data() {
static $data = null;
if ( null !== $data ) {
return $data;
}
$data = array(
'meta_title' => 'Copyright / IP Policy | Ethnic Infotech',
'meta_description' => 'Read our Copyright / IP Policy to understand ownership of website content, branding, downloadable materials, client-delivered assets, and permitted use of intellectual property.',
'contact_url' => 'https://ethnicinfotech.com/contact-us/',
);
return $data;
}
}
if ( ! function_exists( 'ethnic_copyright_ip_policy_page_render_content' ) ) {
function ethnic_copyright_ip_policy_page_render_content() {
$data = ethnic_copyright_ip_policy_page_data();
$contact_url = isset( $data['contact_url'] ) ? (string) $data['contact_url'] : home_url( '/contact-us/' );
ob_start();
?>
<div class="ethnic-copyright-ip-policy">
<div class="ethnic-copyright-ip-policy__inner">
<h1>Copyright / IP Policy</h1>
<p><strong>Effective Date:</strong> 16th May 2026</p>
<p>This page describes ownership and permitted use of content, materials, branding, and intellectual property associated with the website and related business materials. It is intended to provide a general overview of how website content, downloadable resources, brand assets, and related materials should be treated.</p>
<h2>1. Ownership of Website Content</h2>
<p>Unless otherwise stated, website content is owned by the company or used with appropriate permission. This may include text, service descriptions, layouts, graphics, design elements, icons, logos, images, downloadable files, and other website materials.</p>
<p>All such materials are protected by applicable copyright, intellectual property, and related laws.</p>
<h2>2. Branding, Logos, and Trademarks</h2>
<p>Company names, logos, marks, taglines, and branding elements used on the website may be owned by the company or their respective owners. Users may not use, copy, reproduce, modify, display, or distribute these marks without prior written permission.</p>
<p>Third-party trademarks, platform names, and brand references used on the website remain the property of their respective owners where they are used for identification, descriptive reference, or compatibility purposes.</p>
<h2>3. Permitted Use of Website Materials</h2>
<p>Users may access and view the website for normal personal, informational, or internal business reference purposes. Limited non-commercial viewing is allowed in the ordinary course of browsing the website.</p>
<p>Users may not copy, republish, modify, sell, distribute, or create derivative works from website content without permission.</p>
<h2>4. Restrictions on Reuse</h2>
<p>Without written permission, users may not:</p>
<ul>
<li>Reproduce website content</li>
<li>Republish or redistribute material</li>
<li>Use content for commercial exploitation</li>
<li>Remove copyright or ownership notices</li>
<li>Copy layouts, downloadable materials, graphics, or written content for public or business reuse</li>
<li>Use branding or visual identity assets in misleading or unauthorized ways</li>
</ul>
<h2>5. Downloadable Materials and Resources</h2>
<p>Downloadable materials such as whitepapers, guides, checklists, downloadable profiles, PDFs, presentations, and other resources remain the intellectual property of the company unless otherwise stated.</p>
<p>Downloading or accessing such materials does not transfer ownership. Downloadable resources may be used for personal or internal business review only unless broader written permission is granted.</p>
<p>Users may not republish, resell, redistribute, or modify these materials without authorization.</p>
<h2>6. Client-Delivered Assets and Project Materials</h2>
<p>Client-owned names, logos, trademarks, data, content, and project materials remain the property of the respective client or rights holder unless otherwise agreed in writing.</p>
<p>Materials created during a project may be subject to separate contracts, statements of work, or service agreements. This Copyright / IP Policy does not replace specific contractual ownership terms agreed with clients.</p>
<h2>7. Third-Party Content and References</h2>
<p>The website may reference third-party platforms, technologies, frameworks, logos, product names, or tools. Those references remain the property of their respective owners.</p>
<p>Such references may be used for identification, compatibility, descriptive, or informational purposes only. The company does not claim ownership of third-party marks or assets unless explicitly stated.</p>
<h2>8. Reporting Copyright or IP Concerns</h2>
<p>If a person or organization believes content on the website infringes copyright, trademark, or other intellectual property rights, they may contact the company with relevant details.</p>
<p>The notice should include enough information to identify the material in question and explain the basis of the concern. The company may review and respond as appropriate.</p>
<p><strong>Company Name:</strong> Ethnic Infotech Pvt. Ltd.</p>
<p><strong>Contact Email:</strong> info@ethnicinfotech.com</p>
<p><strong>Contact Page:</strong> <a href="<?php echo esc_url( $contact_url ); ?>"><?php echo esc_html( $contact_url ); ?></a></p>
<h2>9. Changes to This Policy</h2>
<p>The company may update this Copyright / IP Policy from time to time. Updated versions may be posted on the website with a revised effective date.</p>
</div>
</div>
<?php
return (string) ob_get_clean();
}
}
if ( ! function_exists( 'ethnic_copyright_ip_policy_page_filter_content' ) ) {
function ethnic_copyright_ip_policy_page_filter_content( $content ) {
if ( ! ethnic_copyright_ip_policy_page_is_target() || ! in_the_loop() || ! is_main_query() ) {
return $content;
}
return ethnic_copyright_ip_policy_page_render_content();
}
add_filter( 'the_content', 'ethnic_copyright_ip_policy_page_filter_content', 20 );
}
if ( ! function_exists( 'ethnic_copyright_ip_policy_page_render_template_fallback' ) ) {
function ethnic_copyright_ip_policy_page_render_template_fallback() {
if ( ! ethnic_copyright_ip_policy_page_request_matches() ) {
return;
}
if ( ! is_404() ) {
return;
}
$page = ethnic_copyright_ip_policy_page_get_target_page();
if ( ! ( $page instanceof WP_Post ) ) {
ethnic_copyright_ip_policy_page_ensure_page();
$page = ethnic_copyright_ip_policy_page_get_target_page();
}
global $wp_query, $post;
if ( $page instanceof WP_Post ) {
$post = $page;
setup_postdata( $post );
}
if ( $wp_query instanceof WP_Query ) {
$wp_query->is_404 = false;
$wp_query->is_page = true;
$wp_query->is_singular = true;
$wp_query->is_home = false;
$wp_query->is_archive = false;
$wp_query->queried_object = $page instanceof WP_Post ? $page : null;
$wp_query->queried_object_id = $page instanceof WP_Post ? (int) $page->ID : 0;
$wp_query->post = $page instanceof WP_Post ? $page : null;
$wp_query->posts = $page instanceof WP_Post ? array( $page ) : array();
$wp_query->post_count = $page instanceof WP_Post ? 1 : 0;
$wp_query->found_posts = $page instanceof WP_Post ? 1 : 0;
$wp_query->max_num_pages = 1;
}
status_header( 200 );
get_header();
echo ethnic_copyright_ip_policy_page_render_content(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
get_footer();
exit;
}
add_action( 'template_redirect', 'ethnic_copyright_ip_policy_page_render_template_fallback', 1 );
}
if ( ! function_exists( 'ethnic_copyright_ip_policy_page_document_title' ) ) {
function ethnic_copyright_ip_policy_page_document_title( $title ) {
if ( ! ethnic_copyright_ip_policy_page_is_target() ) {
return $title;
}
$data = ethnic_copyright_ip_policy_page_data();
$custom_title = isset( $data['meta_title'] ) ? trim( (string) $data['meta_title'] ) : '';
if ( '' !== $custom_title ) {
return $custom_title;
}
return $title;
}
add_filter( 'pre_get_document_title', 'ethnic_copyright_ip_policy_page_document_title' );
}
if ( ! function_exists( 'ethnic_copyright_ip_policy_page_head' ) ) {
function ethnic_copyright_ip_policy_page_head() {
if ( ! ethnic_copyright_ip_policy_page_is_target() ) {
return;
}
$data = ethnic_copyright_ip_policy_page_data();
$meta = isset( $data['meta_description'] ) ? trim( (string) $data['meta_description'] ) : '';
if ( '' !== $meta ) {
echo '<meta name="description" content="' . esc_attr( $meta ) . '">' . "\n";
}
?>
<style id="ethnic-copyright-ip-policy-page">
body.ethnic-copyright-ip-policy-active #page-title.page-title-block.custom-page-title {
display: none !important;
}
body.ethnic-copyright-ip-policy-active #main,
body.ethnic-copyright-ip-policy-active .block-content,
body.ethnic-copyright-ip-policy-active .fullwidth-content {
background: transparent !important;
}
.ethnic-copyright-ip-policy {
max-width: 880px;
margin: 0 auto;
padding: 48px 20px 72px;
color: #18212c;
}
.ethnic-copyright-ip-policy__inner {
max-width: 100%;
}
.ethnic-copyright-ip-policy h1,
.ethnic-copyright-ip-policy h2,
.ethnic-copyright-ip-policy h3 {
margin: 0;
color: #18212c;
}
.ethnic-copyright-ip-policy h1 {
font-size: clamp(34px, 4vw, 48px);
line-height: 1.08;
letter-spacing: -0.04em;
margin-bottom: 18px;
}
.ethnic-copyright-ip-policy h2 {
font-size: clamp(24px, 2.4vw, 30px);
line-height: 1.2;
letter-spacing: -0.03em;
margin-top: 40px;
margin-bottom: 16px;
}
.ethnic-copyright-ip-policy h3 {
font-size: 18px;
line-height: 1.35;
margin-top: 22px;
margin-bottom: 10px;
}
.ethnic-copyright-ip-policy p,
.ethnic-copyright-ip-policy li {
font-size: 16px;
line-height: 1.8;
color: #425066;
}
.ethnic-copyright-ip-policy p {
margin: 0 0 16px;
}
.ethnic-copyright-ip-policy ul {
margin: 0 0 18px 20px;
padding: 0;
}
.ethnic-copyright-ip-policy li {
margin: 0 0 8px;
}
.ethnic-copyright-ip-policy a {
color: #2f6bff;
text-decoration: underline;
}
.ethnic-copyright-ip-policy strong {
color: #18212c;
}
@media (max-width: 767px) {
.ethnic-copyright-ip-policy {
padding: 36px 18px 56px;
}
.ethnic-copyright-ip-policy h2 {
margin-top: 32px;
}
}
</style>
<?php
}
add_action( 'wp_head', 'ethnic_copyright_ip_policy_page_head', 20 );
}