HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.34
System: Linux atalantini.com 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64
User: root (0)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: //opt/plugins/w3-total-cache/extension-example/Extension_Example_Page_View.php
<?php
namespace W3TCExample;

if ( !defined( 'W3TC' ) )
	die();

?>
<p>
	Jump to:
	<a href="admin.php?page=w3tc_general"><?php _e( 'Main Menu', 'w3-total-cache' ); ?></a> |
	<a href="admin.php?page=w3tc_extensions"><?php _e( 'Extensions', 'w3-total-cache' ); ?></a>
</p>
<p>Example extension is currently <span class="w3tc-enabled">enabled</span></p>

<div class="metabox-holder">
<?php
// render settings box header
\W3TC\Util_Ui::postbox_header( 'Example extension' );
?>
<table class="form-table">
<?php
// render controls showing content of w3tc configuration options
\W3TC\Util_Ui::config_item( array(
		'key' => array( 'example', 'is_title_postfix' ),
		'control' => 'checkbox',
		'label' => 'Add postfix to page titles',
		'checkbox_label' => 'Enable',
		'description' => 'Check if you want to add postfix to each post title.'
	) );
\W3TC\Util_Ui::config_item( array(
		'key' => array( 'example', 'title_postfix' ),
		'control' => 'textbox',
		'label' => 'Postfix to page titles'
	) );
?>
</table>
<?php
// render save button for ::config_item controls
\W3TC\Util_Ui::button_config_save( 'extension_example' );
// render settings box footer
\W3TC\Util_Ui::postbox_footer();
?>
</div>