File: /var/www/agighana.org_backup/about-theme.php
<?php
/**
* Business Meetup Conference Theme Page
*
* @package Business Meetup Conference
*/
function business_meetup_conference_admin_scripts() {
wp_dequeue_script('business-meetup-conference-custom-scripts');
}
add_action( 'admin_enqueue_scripts', 'business_meetup_conference_admin_scripts' );
if ( ! defined( 'BUSINESS_MEETUP_CONFERENCE_FREE_THEME_URL' ) ) {
define( 'BUSINESS_MEETUP_CONFERENCE_FREE_THEME_URL', 'https://www.themespride.com/products/free-business-wordpress-theme' );
}
if ( ! defined( 'BUSINESS_MEETUP_CONFERENCE_PRO_THEME_URL' ) ) {
define( 'BUSINESS_MEETUP_CONFERENCE_PRO_THEME_URL', 'https://www.themespride.com/products/conference-wordpress-theme' );
}
if ( ! defined( 'BUSINESS_MEETUP_CONFERENCE_DEMO_THEME_URL' ) ) {
define( 'BUSINESS_MEETUP_CONFERENCE_DEMO_THEME_URL', 'https://page.themespride.com/business-meetup-conference-pro/' );
}
if ( ! defined( 'BUSINESS_MEETUP_CONFERENCE_DOCS_THEME_URL' ) ) {
define( 'BUSINESS_MEETUP_CONFERENCE_DOCS_THEME_URL', 'https://page.themespride.com/demo/docs/business-meetup-conference/' );
}
if ( ! defined( 'BUSINESS_MEETUP_CONFERENCE_DOCS_URL' ) ) {
define( 'BUSINESS_MEETUP_CONFERENCE_DOCS_URL', 'https://page.themespride.com/demo/docs/business-meetup-conference/' );
}
if ( ! defined( 'BUSINESS_MEETUP_CONFERENCE_RATE_THEME_URL' ) ) {
define( 'BUSINESS_MEETUP_CONFERENCE_RATE_THEME_URL', 'https://wordpress.org/support/theme/business-meetup-conference/reviews/#new-post' );
}
if ( ! defined( 'BUSINESS_MEETUP_CONFERENCE_SUPPORT_THEME_URL' ) ) {
define( 'BUSINESS_MEETUP_CONFERENCE_SUPPORT_THEME_URL', 'https://wordpress.org/support/theme/business-meetup-conference' );
}
if ( ! defined( 'BUSINESS_MEETUP_CONFERENCE_CHANGELOG_THEME_URL' ) ) {
define( 'BUSINESS_MEETUP_CONFERENCE_CHANGELOG_THEME_URL', get_template_directory() . '/readme.txt' );
}
if ( ! defined( 'BUSINESS_MEETUP_CONFERENCE_THEME_BUNDLE' ) ) {
define( 'BUSINESS_MEETUP_CONFERENCE_THEME_BUNDLE', 'https://www.themespride.com/products/wordpress-theme-bundle' );
}
/**
* Add theme page
*/
function business_meetup_conference_menu() {
add_theme_page( esc_html__( 'About Theme', 'business-meetup-conference' ), esc_html__( 'About Theme', 'business-meetup-conference' ), 'edit_theme_options', 'business-meetup-conference-about', 'business_meetup_conference_about_display' );
}
add_action( 'admin_menu', 'business_meetup_conference_menu' );
/**
* Display About page
*/
function business_meetup_conference_about_display() {
$business_meetup_conference_theme = wp_get_theme();
?>
<div class="wrap about-wrap full-width-layout">
<h1><?php echo esc_html( $business_meetup_conference_theme ); ?></h1>
<div class="about-theme">
<div class="theme-description">
<p class="about-text">
<?php
// Remove last sentence of description.
$business_meetup_conference_description = explode( '. ', $business_meetup_conference_theme->get( 'Description' ) );
array_pop( $business_meetup_conference_description );
$business_meetup_conference_description = implode( '. ', $business_meetup_conference_description );
echo esc_html( $business_meetup_conference_description . '.' );
?></p>
<p class="actions">
<a href="<?php echo esc_url( BUSINESS_MEETUP_CONFERENCE_FREE_THEME_URL ); ?>" class="button button-secondary" target="_blank"><?php esc_html_e( 'Theme Info', 'business-meetup-conference' ); ?></a>
<a href="<?php echo esc_url( BUSINESS_MEETUP_CONFERENCE_DEMO_THEME_URL ); ?>" class="button button-secondary" target="_blank"><?php esc_html_e( 'View Demo', 'business-meetup-conference' ); ?></a>
<a href="<?php echo esc_url( BUSINESS_MEETUP_CONFERENCE_DOCS_THEME_URL ); ?>" class="button button-secondary" target="_blank"><?php esc_html_e( 'Theme Instructions', 'business-meetup-conference' ); ?></a>
<a href="<?php echo esc_url( BUSINESS_MEETUP_CONFERENCE_RATE_THEME_URL ); ?>" class="button button-secondary" target="_blank"><?php esc_html_e( 'Rate this theme', 'business-meetup-conference' ); ?></a>
<a href="<?php echo esc_url( BUSINESS_MEETUP_CONFERENCE_PRO_THEME_URL ); ?>" class="green button button-secondary" target="_blank"><?php esc_html_e( 'Upgrade to pro', 'business-meetup-conference' ); ?></a>
</p>
</div>
<div class="theme-screenshot">
<img src="<?php echo esc_url( $business_meetup_conference_theme->get_screenshot() ); ?>" />
</div>
</div>
<nav class="nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu', 'business-meetup-conference' ); ?>">
<a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'business-meetup-conference-about' ), 'themes.php' ) ) ); ?>" class="nav-tab<?php echo ( isset( $_GET['page'] ) && 'business-meetup-conference-about' === $_GET['page'] && ! isset( $_GET['tab'] ) ) ?' nav-tab-active' : ''; ?>"><?php esc_html_e( 'About', 'business-meetup-conference' ); ?></a>
<a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'business-meetup-conference-about', 'tab' => 'free_vs_pro' ), 'themes.php' ) ) ); ?>" class="nav-tab<?php echo ( isset( $_GET['tab'] ) && 'free_vs_pro' === $_GET['tab'] ) ?' nav-tab-active' : ''; ?>"><?php esc_html_e( 'Compare free Vs Pro', 'business-meetup-conference' ); ?></a>
<a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'business-meetup-conference-about', 'tab' => 'changelog' ), 'themes.php' ) ) ); ?>" class="nav-tab<?php echo ( isset( $_GET['tab'] ) && 'changelog' === $_GET['tab'] ) ?' nav-tab-active' : ''; ?>"><?php esc_html_e( 'Changelog', 'business-meetup-conference' ); ?></a>
<a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'business-meetup-conference-about', 'tab' => 'get_bundle' ), 'themes.php' ) ) ); ?>" class="blink wp-bundle nav-tab<?php echo ( isset( $_GET['tab'] ) && 'get_bundle' === $_GET['tab'] ) ?' nav-tab-active' : ''; ?>"><?php esc_html_e( 'Get WordPress Theme Bundle', 'business-meetup-conference' ); ?></a>
</nav>
<?php
business_meetup_conference_main_screen();
business_meetup_conference_changelog_screen();
business_meetup_conference_free_vs_pro();
business_meetup_conference_get_bundle();
?>
<div class="return-to-dashboard">
<?php if ( current_user_can( 'update_core' ) && isset( $_GET['updated'] ) ) : ?>
<a href="<?php echo esc_url( self_admin_url( 'update-core.php' ) ); ?>">
<?php is_multisite() ? esc_html_e( 'Return to Updates', 'business-meetup-conference' ) : esc_html_e( 'Return to Dashboard → Updates', 'business-meetup-conference' ); ?>
</a> |
<?php endif; ?>
<a href="<?php echo esc_url( self_admin_url() ); ?>"><?php is_blog_admin() ? esc_html_e( 'Go to Dashboard → Home', 'business-meetup-conference' ) : esc_html_e( 'Go to Dashboard', 'business-meetup-conference' ); ?></a>
</div>
</div>
<?php
}
/**
* Output the main about screen.
*/
function business_meetup_conference_main_screen() {
if ( isset( $_GET['page'] ) && 'business-meetup-conference-about' === $_GET['page'] && ! isset( $_GET['tab'] ) ) {
?>
<div class="feature-section two-col">
<div class="col card">
<h2 class="title"><?php esc_html_e( 'Theme Customizer', 'business-meetup-conference' ); ?></h2>
<p><?php esc_html_e( 'All Theme Options are available via Customize screen.', 'business-meetup-conference' ) ?></p>
<p><a href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>" class="button button-primary"><?php esc_html_e( 'Customize', 'business-meetup-conference' ); ?></a></p>
</div>
<div class="col card">
<h2 class="title"><?php esc_html_e( 'Got theme support question?', 'business-meetup-conference' ); ?></h2>
<p><?php esc_html_e( 'Get genuine support from genuine people. Whether it\'s customization or compatibility, our seasoned developers deliver tailored solutions to your queries.', 'business-meetup-conference' ) ?></p>
<p><a href="<?php echo esc_url( BUSINESS_MEETUP_CONFERENCE_SUPPORT_THEME_URL ); ?>" class="button button-primary" target="_blank"><?php esc_html_e( 'Support Forum', 'business-meetup-conference' ); ?></a></p>
</div>
<div class="col card">
<h2 class="title"><?php esc_html_e( 'Upgrade To Premium With Straight 20% OFF.', 'business-meetup-conference' ); ?></h2>
<p><?php esc_html_e( 'Get our amazing WordPress theme with exclusive 20% off use the coupon', 'business-meetup-conference' ) ?>"<input type="text" value="GETPro20" id="myInput">".</p>
<button class="button button-primary"><?php esc_html_e( 'GETPro20', 'business-meetup-conference' ); ?></button>
</div>
</div>
<?php
}
}
/**
* Output the changelog screen.
*/
function business_meetup_conference_changelog_screen() {
if ( isset( $_GET['tab'] ) && 'changelog' === $_GET['tab'] ) {
global $wp_filesystem;
?>
<div class="wrap about-wrap">
<p class="about-description"><?php esc_html_e( 'View changelog below:', 'business-meetup-conference' ); ?></p>
<?php
$changelog_file = apply_filters( 'business_meetup_conference_changelog_file', BUSINESS_MEETUP_CONFERENCE_CHANGELOG_THEME_URL );
// Check if the changelog file exists and is readable.
if ( $changelog_file && is_readable( $changelog_file ) ) {
WP_Filesystem();
$changelog = $wp_filesystem->get_contents( $changelog_file );
$changelog_list = business_meetup_conference_parse_changelog( $changelog );
echo wp_kses_post( $changelog_list );
}
?>
</div>
<?php
}
}
/**
* Parse changelog from readme file.
* @param string $content
* @return string
*/
function business_meetup_conference_parse_changelog( $content ) {
// Explode content with == to juse separate main content to array of headings.
$content = explode ( '== ', $content );
$changelog_isolated = '';
// Get element with 'Changelog ==' as starting string, i.e isolate changelog.
foreach ( $content as $key => $value ) {
if (strpos( $value, 'Changelog ==') === 0) {
$changelog_isolated = str_replace( 'Changelog ==', '', $value );
}
}
// Now Explode $changelog_isolated to manupulate it to add html elements.
$changelog_array = explode( '= ', $changelog_isolated );
// Unset first element as it is empty.
unset( $changelog_array[0] );
$changelog = '<pre class="changelog">';
foreach ( $changelog_array as $value) {
// Replace all enter (\n) elements with </span><span> , opening and closing span will be added in next process.
$value = preg_replace( '/\n+/', '</span><span>', $value );
// Add openinf and closing div and span, only first span element will have heading class.
$value = '<div class="block"><span class="heading">= ' . $value . '</span></div>';
// Remove empty <span></span> element which newr formed at the end.
$changelog .= str_replace( '<span></span>', '', $value );
}
$changelog .= '</pre>';
return wp_kses_post( $changelog );
}
/**
* Import Demo data for theme using catch themes demo import plugin
*/
function business_meetup_conference_free_vs_pro() {
if ( isset( $_GET['tab'] ) && 'free_vs_pro' === $_GET['tab'] ) {
?>
<div class="wrap about-wrap">
<p class="about-description"><?php esc_html_e( 'View Free vs Pro Table below:', 'business-meetup-conference' ); ?></p>
<div class="vs-theme-table">
<table>
<thead>
<tr><th scope="col"></th>
<th class="head" scope="col"><?php esc_html_e( 'Free Theme', 'business-meetup-conference' ); ?></th>
<th class="head" scope="col"><?php esc_html_e( 'Pro Theme', 'business-meetup-conference' ); ?></th>
</tr>
</thead>
<tbody>
<tr class="odd" scope="row">
<td headers="features" class="feature"><span><?php esc_html_e( 'Theme Demo Set Up', 'business-meetup-conference' ); ?></span></td>
<td><span class="dashicons dashicons-no-alt"></span></td>
<td><span class="dashicons dashicons-saved"></span></td>
</tr>
<tr class="odd" scope="row">
<td headers="features" class="feature"><?php esc_html_e( 'Additional Templates, Color options and Fonts', 'business-meetup-conference' ); ?></td>
<td><span class="dashicons dashicons-no-alt"></span></td>
<td><span class="dashicons dashicons-saved"></span></td>
</tr>
<tr class="odd" scope="row">
<td headers="features" class="feature"><?php esc_html_e( 'Included Demo Content', 'business-meetup-conference' ); ?></td>
<td><span class="dashicons dashicons-no-alt"></span></td>
<td><span class="dashicons dashicons-saved"></span></td>
</tr>
<tr class="odd" scope="row">
<td headers="features" class="feature"><?php esc_html_e( 'Section Ordering', 'business-meetup-conference' ); ?></td>
<td><span class="dashicons dashicons-no-alt"></span></td>
<td><span class="dashicons dashicons-saved"></span></td>
</tr>
<tr class="odd" scope="row">
<td headers="features" class="feature"><?php esc_html_e( 'Multiple Sections', 'business-meetup-conference' ); ?></td>
<td><span class="dashicons dashicons-no-alt"></span></td>
<td><span class="dashicons dashicons-saved"></span></td>
</tr>
<tr class="odd" scope="row">
<td headers="features" class="feature"><?php esc_html_e( 'Additional Plugins', 'business-meetup-conference' ); ?></td>
<td><span class="dashicons dashicons-no-alt"></span></td>
<td><span class="dashicons dashicons-saved"></span></td>
</tr>
<tr class="odd" scope="row">
<td headers="features" class="feature"><?php esc_html_e( 'Premium Technical Support', 'business-meetup-conference' ); ?></td>
<td><span class="dashicons dashicons-no-alt"></span></td>
<td><span class="dashicons dashicons-saved"></span></td>
</tr>
<tr class="odd" scope="row">
<td headers="features" class="feature"><?php esc_html_e( 'Access to Support Forums', 'business-meetup-conference' ); ?></td>
<td><span class="dashicons dashicons-no-alt"></span></td>
<td><span class="dashicons dashicons-saved"></span></td>
</tr>
<tr class="odd" scope="row">
<td headers="features" class="feature"><?php esc_html_e( 'Free updates', 'business-meetup-conference' ); ?></td>
<td><span class="dashicons dashicons-no-alt"></span></td>
<td><span class="dashicons dashicons-saved"></span></td>
</tr>
<tr class="odd" scope="row">
<td headers="features" class="feature"><?php esc_html_e( 'Unlimited Domains', 'business-meetup-conference' ); ?></td>
<td><span class="dashicons dashicons-saved"></span></td>
<td><span class="dashicons dashicons-saved"></span></td>
</tr>
<tr class="odd" scope="row">
<td headers="features" class="feature"><?php esc_html_e( 'Responsive Design', 'business-meetup-conference' ); ?></td>
<td><span class="dashicons dashicons-saved"></span></td>
<td><span class="dashicons dashicons-saved"></span></td>
</tr>
<tr class="odd" scope="row">
<td headers="features" class="feature"><?php esc_html_e( 'Live Customizer', 'business-meetup-conference' ); ?></td>
<td><span class="dashicons dashicons-saved"></span></td>
<td><span class="dashicons dashicons-saved"></span></td>
</tr>
<tr class="odd" scope="row">
<td class="feature feature--empty"></td>
<td class="feature feature--empty"></td>
<td headers="comp-2" class="td-btn-2"><a href="<?php echo esc_url( BUSINESS_MEETUP_CONFERENCE_PRO_THEME_URL ); ?>" class="sidebar-button single-btn" target="_blank"><?php esc_html_e( 'Go For Premium', 'business-meetup-conference' ); ?></a></td>
</tr>
</tbody>
</table>
</div>
</div>
<?php
}
}
function business_meetup_conference_get_bundle() {
if ( isset( $_GET['tab'] ) && 'get_bundle' === $_GET['tab'] ) {
?>
<div class="wrap about-wrap">
<p class="about-description"><?php esc_html_e( 'Get WordPress Theme Bundle', 'business-meetup-conference' ); ?></p>
<div class="col card">
<h2 class="title"><?php esc_html_e( ' WordPress Theme Bundle of 100+ Themes At 15% Discount. ', 'business-meetup-conference' ); ?></h2>
<p><?php esc_html_e( 'Spring Offer Is To Get WP Bundle of 100+ Themes At 15% Discount use the coupon', 'business-meetup-conference' ) ?>"<input type="text" value=" TPRIDE15 " id="myInput">".</p>
<p><a target="_blank" href="<?php echo esc_url( BUSINESS_MEETUP_CONFERENCE_THEME_BUNDLE ); ?>" class="button button-primary"><?php esc_html_e( 'Theme Bundle', 'business-meetup-conference' ); ?></a></p>
</div>
</div>
<?php
}
}