コード例 #1
0
ファイル: index.php プロジェクト: Wilkins/herisson-wordpress
<div class="wrap">
    <?php 
$this->includePartial(__DIR__ . "/../elements/messages.php", array());
?>
    <?php 
if (Herisson\Message::i()->hasSuccess()) {
    ?>
    <p class="herisson-success">
        <?php 
    echo __("Maintenance has been done, here are the results after the maintenance operation. Some of the errors may not be fixable.", HERISSON_TD);
    ?>
    </p>
    <?php 
}
?>

    <?php 
$items = array('favicon' => array('text' => __("Favicon", HERISSON_TD), 'option' => 'spiderOptionFavicon'), 'html_content' => array('text' => __("HTML content", HERISSON_TD), 'option' => 'spiderOptionTextOnly'), 'full_content' => array('text' => __("Full content", HERISSON_TD), 'option' => 'spiderOptionFullPage'), 'screenshot' => array('text' => __("Screenshot", HERISSON_TD), 'option' => 'spiderOptionScreenshot'));
?>


    <h1><?php 
echo __("Maintenance", HERISSON_TD);
?>
</h1>

    <table class="widefat post" id="maintenance">
        <tr>
            <th style="width: 30%"><?php 
echo __('What is missing', HERISSON_TD);
コード例 #2
0
 /**
  * Get a curl object
  *
  * @param string $url  the URL to download
  * @param array  $post the data to send via POST method
  *
  * @throws an Exception in case php-curl is missing
  *
  * @return the curl object
  */
 public function getCurl($url, $post = null)
 {
     if (function_exists('curl_init')) {
         $curl = curl_init();
         curl_setopt($curl, CURLOPT_URL, $url);
         curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
         curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
         curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
         curl_setopt($curl, CURLOPT_TIMEOUT, 5);
         if (sizeof($post)) {
             curl_setopt($curl, CURLOPT_POST, true);
             curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
         }
         return $curl;
     } else {
         Herisson\Message::i()->addError(__('php-curl library is missing.', HERISSON_TD));
         throw new Exception(__('php-curl library is missing.', HERISSON_TD));
     }
 }
コード例 #3
0
<br />
    <?php 
    }
    ?>
</p>
<div style="clear: both"></div>
<?php 
}
?>


<?php 
if (Herisson\Message::i()->hasSuccess()) {
    ?>
<p class="herisson-success">
    <?php 
    foreach (Herisson\Message::i()->getSuccess() as $succes) {
        ?>
    <?php 
        echo $succes;
        ?>
<br />
    <?php 
    }
    ?>
</p>
<?php 
}
?>