HEX
Server: Apache
System: Linux webserver101.turnkeywebspace.com 4.18.0-553.81.1.el8_10.x86_64 #1 SMP Mon Oct 27 11:29:19 EDT 2025 x86_64
User: mastech10 (1521)
PHP: 8.2.30
Disabled: show_source,system,shell_exec,passthru,exec,phpinfo,popen,proc_open,eval
Upload Files
File: /home/mastech10/public_html/doriangraymovie.co.uk/wp-content/themes/fact-news/inc/demo-import.php
<?php

function fact_news_intro_text( $default_text ) {
	$default_text .= sprintf(
		'<p class="demo-data-download-link">%1$s <a href="%2$s" target="_blank">%3$s</a></p>',
		esc_html__( 'Demo content files for Fact News Theme.', 'fact-news' ),
		esc_url( 'https://demo.adorethemes.com/documentations/docs/fact-news/demo-data/' ),
		esc_html__( 'Click here for Demo File download', 'fact-news' )
	);

	return $default_text;
}
add_filter( 'pt-ocdi/plugin_intro_text', 'fact_news_intro_text' );

/**
 * OCDI after import.
 */
function fact_news_after_import_setup() {
	// Assign menus to their locations.
	$primary_menu   = get_term_by( 'name', 'Primary Menu', 'nav_menu' );
	$secondary_menu = get_term_by( 'name', 'Secondary Menu', 'nav_menu' );
	$social_menu    = get_term_by( 'name', 'Social Menu', 'nav_menu' );

	set_theme_mod(
		'nav_menu_locations',
		array(
			'primary'   => $primary_menu->term_id,
			'secondary' => $secondar_menu->term_id,
			'social'    => $social_menu->term_id,
		)
	);

	// Assign front page and posts page (blog page).
	$front_page_id = get_page_by_title( 'Home' );
	$blog_page_id  = get_page_by_title( 'Blog' );

	update_option( 'show_on_front', 'page' );
	update_option( 'page_on_front', $front_page_id->ID );
	update_option( 'page_for_posts', $blog_page_id->ID );

}
add_action( 'ocdi/after_import', 'fact_news_after_import_setup' );