コード例 #1
0
 /**
  *
  * @return \OpenSearch\Core\Registry
  */
 static function instance()
 {
     if (Core\Utils::readyForClient() && Core\Utils::readyToIndex() && Core\Utils::readyForTemplate() && empty(self::$doc)) {
         self::$doc = new Core\Doc();
     }
     if (!isset(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
コード例 #2
0
 public function testReadyForTemplate()
 {
     $readyForTemplate = Core\Utils::readyForTemplate();
     $this->assertEquals(true, $readyForTemplate);
 }
コード例 #3
0
	<h2><a href="http://opensearch.console.aliyun.com/" target="_blank">AliYun Open Search Settings</a>&nbsp;&nbsp;</h2>
	<form action="" method="post" id="opSou_form">
		<p>
		IF you have not got this template, please first download it for "AliYun OpenSearch". &nbsp;
		<input type="hidden" value="1" name="<?php 
echo Settings::settingsField;
?>
[accessTemplateValid]">
		<input type="submit" value="<?php 
esc_attr_e('Download Template', $langDomain);
?>
" id="opSou_dlTemplate" class="button button-primary">&nbsp;
		Then refresh this page when this template has been downloaded.
		</p>
		<?php 
if (Core\Utils::readyForTemplate()) {
    ?>
		<div id="opSoutabs">
			<ul>
				<!-- <li><a class="nav-tab nav-tab-active" href="#tab-general"><?php 
    esc_html_e('Account', $langDomain);
    ?>
</a></li> -->
			</ul>
			<div id="tab-general">
				<input type="hidden" value="<?php 
    echo Settings::updateAction;
    ?>
" name="opSou_action">
				<?php 
    wp_nonce_field(Settings::updateAction);