Wbcom Designs Custom Font Uploader Shortcode

Below, you’ll find a detailed guide on how to add the Wbcom Designs – Custom Font Uploader Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Wbcom Designs – Custom Font Uploader Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the Wbcom Designs – Custom Font Uploader Plugin and the shortcodes it provides:

Plugin Icon
Wbcom Designs – Custom Font Uploader

"Wbcom Designs – Custom Font Uploader is a unique WordPress plugin that allows you to customize your website. It gives you the power to upload and implement your own fonts, enhancing your site's look and feel."

★★★★✩ (13) Active Installs: 5000+ Tested with: 6.3.2 PHP Version: false
Included Shortcodes:
  • [wbcom_admin_setting_header]

Wbcom Designs [wbcom_admin_setting_header] Shortcode

The ‘wbcom_admin_setting_header’ shortcode is part of the Custom Font Uploader plugin. It generates a header with navigation menu in the admin settings area. The menu includes ‘Settings’, ‘Themes & Extension’, and ‘Help & Support’ tabs. The active tab is highlighted based on the current page. The shortcode also allows adding more header menus via ‘do_action’.

Shortcode: [wbcom_admin_setting_header]

Examples and Usage

Basic example – Showcases the usage of the shortcode to display the admin settings header.

[wbcom_admin_setting_header /]

PHP Function Code

In case you have difficulties debugging what causing issues with [wbcom_admin_setting_header] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'wbcom_admin_setting_header', array( $this, 'wbcom_admin_setting_header_html' ) );

Shortcode PHP function:

function wbcom_admin_setting_header_html() {
			$page          = filter_input( INPUT_GET, 'page' ) ? filter_input( INPUT_GET, 'page' ) : 'wbcom-themes-page';
			$plugin_active = $theme_active = $support_active = $settings_active = '';
			switch ( $page ) {
				case 'wbcom-plugins-page':
					$plugin_active = 'is_active';
					break;
				case 'wbcom-support-page':
					$support_active = 'is_active';
					break;
				case 'wbcom-license-page':
					$license_active = 'is_active';
					break;
				default:
					$settings_active = 'is_active';
			}
			?>
			<div id="wb_admin_header" class="wp-clearfix">
				<div id="wb_admin_header" class="wp-clearfix">
				<nav id="wb_admin_nav">
					<ul>
						<li class="wb_admin_nav_item <?php echo esc_attr( $settings_active ); ?>">
							<a href="<?php echo esc_url( get_admin_url() ) . 'admin.php?page=wbcomplugins'; ?>" id="wb_admin_nav_trigger_settings">
								<i class="fa fa-sliders" aria-hidden="true"></i>
								<h4><?php esc_html_e( 'Settings', 'cfup' ); ?></h4>
							</a>
						</li>
						<li class="wb_admin_nav_item <?php echo esc_attr( $plugin_active ); ?>">
							<a href="<?php echo esc_url( get_admin_url() ) . 'admin.php?page=wbcom-plugins-page'; ?>" id="wb_admin_nav_trigger_extensions">
								<i class="fa fa-th" aria-hidden="true"></i>
								<h4><?php esc_html_e( 'Themes & Extension', 'cfup' ); ?></h4>
							</a>
						</li>
						<li class="wb_admin_nav_item <?php echo esc_attr( $support_active ); ?>">
							<a href="<?php echo esc_url( get_admin_url() ) . 'admin.php?page=wbcom-support-page'; ?>" id="wb_admin_nav_trigger_support">
								<i class="fa fa-question-circle" aria-hidden="true"></i>
								<h4><?php esc_html_e( 'Help & Support', 'cfup' ); ?></h4>
							</a>
						</li>
						<?php do_action( 'wbcom_add_header_menu' ); ?>
					</ul>
				</nav>
				</div>
			</div>
			<?php
		}

Code file location:

custom-font-uploader/custom-font-uploader/admin/wbcom/wbcom-admin-settings.php

Conclusion

Now that you’ve learned how to embed the Wbcom Designs – Custom Font Uploader Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *