本文整理汇总了PHP中ewww_image_optimizer_exec_check函数的典型用法代码示例。如果您正苦于以下问题:PHP ewww_image_optimizer_exec_check函数的具体用法?PHP ewww_image_optimizer_exec_check怎么用?PHP ewww_image_optimizer_exec_check使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ewww_image_optimizer_exec_check函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: ewww_image_optimizer_options
//.........这里部分代码省略.........
$output[] = '<span style="color: green; font-weight: bolder">' . __('Installed', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span> ' . __('version', EWWW_IMAGE_OPTIMIZER_DOMAIN) . ': ' . preg_replace('/PNGOUT \\[.*\\)\\s*?/', '', $pngout_version) . "<br />\n";
} else {
$output[] = '<span style="color: red; font-weight: bolder">' . __('Missing', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span> <b>' . __('Install', EWWW_IMAGE_OPTIMIZER_DOMAIN) . ' <a href="admin.php?action=ewww_image_optimizer_install_pngout">' . __('automatically', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</a> | <a href="http://advsys.net/ken/utils.htm">' . __('manually', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</a></b> - ' . __('Pngout is free closed-source software that can produce drastically reduced filesizes for PNGs, but can be very time consuming to process images', EWWW_IMAGE_OPTIMIZER_DOMAIN) . "<br />\n";
$collapsible = false;
}
}
if (ewww_image_optimizer_get_option('ewww_image_optimizer_png_lossy') && !ewww_image_optimizer_get_option('ewww_image_optimizer_cloud_png') && !EWWW_IMAGE_OPTIMIZER_NOEXEC) {
$output[] = "<b>pngquant:</b> ";
$pngquant_version = ewww_image_optimizer_tool_found(EWWW_IMAGE_OPTIMIZER_PNGQUANT, 'q');
if (!empty($pngquant_version)) {
$output[] = '<span style="color: green; font-weight: bolder">' . __('Installed', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span> ' . __('version', EWWW_IMAGE_OPTIMIZER_DOMAIN) . ': ' . $pngquant_version . "<br />\n";
} else {
$output[] = '<span style="color: red; font-weight: bolder">' . __('Missing', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span><br />' . "\n";
$collapsible = false;
}
}
if (ewww_image_optimizer_get_option('ewww_image_optimizer_webp') && !ewww_image_optimizer_get_option('ewww_image_optimizer_cloud_png') && !ewww_image_optimizer_get_option('ewww_image_optimizer_cloud_jpg') && !EWWW_IMAGE_OPTIMIZER_NOEXEC) {
$output[] = "<b>webp:</b> ";
$webp_version = ewww_image_optimizer_tool_found(EWWW_IMAGE_OPTIMIZER_WEBP, 'w');
if (!empty($webp_version)) {
$output[] = '<span style="color: green; font-weight: bolder">' . __('Installed', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span> ' . __('version', EWWW_IMAGE_OPTIMIZER_DOMAIN) . ': ' . $webp_version . "<br />\n";
} else {
$output[] = '<span style="color: red; font-weight: bolder">' . __('Missing', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span><br />' . "\n";
$collapsible = false;
}
}
if (!EWWW_IMAGE_OPTIMIZER_CLOUD && !EWWW_IMAGE_OPTIMIZER_NOEXEC) {
if (ewww_image_optimizer_safemode_check()) {
$output[] = 'safe mode: <span style="color: red; font-weight: bolder">' . __('On', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span>  ';
$collapsible = false;
} else {
$output[] = 'safe mode: <span style="color: green; font-weight: bolder">' . __('Off', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span>  ';
}
if (ewww_image_optimizer_exec_check()) {
$output[] = 'exec(): <span style="color: red; font-weight: bolder">' . __('Disabled', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span>  ';
$collapsible = false;
} else {
$output[] = 'exec(): <span style="color: green; font-weight: bolder">' . __('Enabled', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span>  ';
}
$output[] = "<br />\n";
$output[] = sprintf(__("%s only need one, used for conversion, not optimization", EWWW_IMAGE_OPTIMIZER_DOMAIN), '<b>' . __('Graphics libraries', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</b> - ');
$output[] = '<br>';
$toolkit_found = false;
if (ewww_image_optimizer_gd_support()) {
$output[] = 'GD: <span style="color: green; font-weight: bolder">' . __('Installed', EWWW_IMAGE_OPTIMIZER_DOMAIN);
$toolkit_found = true;
} else {
$output[] = 'GD: <span style="color: red; font-weight: bolder">' . __('Missing', EWWW_IMAGE_OPTIMIZER_DOMAIN);
}
$output[] = '</span>  ' . "Imagemagick 'convert':";
if (ewww_image_optimizer_find_binary('convert', 'i')) {
$output[] = '<span style="color: green; font-weight: bolder"> ' . __('Installed', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span>';
$toolkit_found = true;
} else {
$output[] = '<span style="color: red; font-weight: bolder"> ' . __('Missing', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span>';
}
if (!$toolkit_found && (ewww_image_optimizer_get_option('ewww_image_optimizer_png_to_jpg') || ewww_image_optimizer_get_option('ewww_image_optimizer_jpg_to_png'))) {
$collapsible = false;
}
$output[] = "<br />\n";
}
$output[] = '<b>' . __('Only need one of these:', EWWW_IMAGE_OPTIMIZER_DOMAIN) . ' </b><br>';
// initialize this variable to check for the 'file' command if we don't have any php libraries we can use
$file_command_check = true;
if (function_exists('finfo_file')) {
$output[] = 'finfo: <span style="color: green; font-weight: bolder">' . __('Installed', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span>  ';
开发者ID:goodbayscott,项目名称:wwr-temp,代码行数:67,代码来源:common.php
示例2: ewww_image_optimizer_options
//.........这里部分代码省略.........
}
}
if (!ewww_image_optimizer_get_option('ewww_image_optimizer_disable_pngout') && !ewww_image_optimizer_get_option('ewww_image_optimizer_cloud_png') && !EWWW_IMAGE_OPTIMIZER_NOEXEC) {
echo "\n", '<b>pngout:</b> ';
$pngout_version = ewww_image_optimizer_tool_found(EWWW_IMAGE_OPTIMIZER_PNGOUT, 'p');
if (!empty($pngout_version) && preg_match('/PNGOUT/', $pngout_version)) {
echo '<span style="color: green; font-weight: bolder">OK</span> version: ' . preg_replace('/PNGOUT \\[.*\\)\\s*?/', '', $pngout_version) . '<br />';
} else {
echo '<span style="color: red; font-weight: bolder">MISSING</span> <b>' . __('Install', EWWW_IMAGE_OPTIMIZER_DOMAIN) . ' <a href="admin.php?action=ewww_image_optimizer_install_pngout">' . __('automatically', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</a> | <a href="http://advsys.net/ken/utils.htm">' . __('manually', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</a></b> - ' . __('Pngout is free closed-source software that can produce drastically reduced filesizes for PNGs, but can be very time consuming to process images', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '<br />';
}
}
echo "\n";
if (!EWWW_IMAGE_OPTIMIZER_CLOUD && !EWWW_IMAGE_OPTIMIZER_NOEXEC) {
printf(__("%s only need one, used for conversion, not optimization: ", EWWW_IMAGE_OPTIMIZER_DOMAIN), '<b>' . __('Graphics libraries', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</b> - ');
if (ewww_image_optimizer_gd_support()) {
echo 'GD: <span style="color: green; font-weight: bolder">OK';
} else {
echo 'GD: <span style="color: red; font-weight: bolder">MISSING';
}
?>
</span>  
Imagemagick 'convert': <?php
if (ewww_image_optimizer_find_binary('convert', 'i')) {
echo '<span style="color: green; font-weight: bolder">OK</span>';
} else {
echo '<span style="color: red; font-weight: bolder">MISSING</span>';
}
echo "<br />\n";
if (ewww_image_optimizer_safemode_check()) {
echo 'safe mode: <span style="color: red; font-weight: bolder">On</span>  ';
} else {
echo 'safe mode: <span style="color: green; font-weight: bolder">Off</span>  ';
}
if (ewww_image_optimizer_exec_check()) {
echo 'exec(): <span style="color: red; font-weight: bolder">DISABLED</span>  ';
} else {
echo 'exec(): <span style="color: green; font-weight: bolder">OK</span>  ';
}
echo "<br />\n";
}
echo '<b>' . __('Only need one of these:', EWWW_IMAGE_OPTIMIZER_DOMAIN) . ' </b>';
// initialize this variable to check for the 'file' command if we don't have any php libraries we can use
$file_command_check = true;
if (function_exists('finfo_file')) {
echo 'finfo: <span style="color: green; font-weight: bolder">OK</span>  ';
$file_command_check = false;
} else {
echo 'finfo: <span style="color: red; font-weight: bolder">MISSING</span>  ';
}
if (function_exists('getimagesize')) {
echo 'getimagesize(): <span style="color: green; font-weight: bolder">OK</span>  ';
} else {
echo 'getimagesize(): <span style="color: red; font-weight: bolder">MISSING</span>  ';
}
if (function_exists('mime_content_type')) {
echo 'mime_content_type(): <span style="color: green; font-weight: bolder">OK</span><br>';
$file_command_check = false;
} else {
echo 'mime_content_type(): <span style="color: red; font-weight: bolder">MISSING</span><br>';
}
if (PHP_OS != 'WINNT' && !EWWW_IMAGE_OPTIMIZER_CLOUD && !EWWW_IMAGE_OPTIMIZER_NOEXEC) {
if ($file_command_check && !ewww_image_optimizer_find_binary('file', 'f')) {
echo '<span style="color: red; font-weight: bolder">file ' . __('command not found on your system', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span><br>';
}
if (!ewww_image_optimizer_find_binary('nice', 'n')) {
echo '<span style="color: orange; font-weight: bolder">nice ' . __('command not found on your system', EWWW_IMAGE_OPTIMIZER_DOMAIN) . ' (' . __('not required', EWWW_IMAGE_OPTIMIZER_DOMAIN) . ')</span><br>';
开发者ID:LacieNat,项目名称:Access-Comm-Project,代码行数:67,代码来源:ewww-image-optimizer.php
示例3: ewww_image_optimizer_notice_utils
function ewww_image_optimizer_notice_utils()
{
global $ewww_debug;
$ewww_debug .= "<b>ewww_image_optimizer_notice_utils()</b><br>";
// Check if exec is disabled
if (ewww_image_optimizer_exec_check()) {
//display a warning if exec() is disabled, can't run much of anything without it
echo "<div id='ewww-image-optimizer-warning-opt-png' class='error'><p>" . __('EWWW Image Optimizer requires exec(). Your system administrator has disabled this function.', EWWW_IMAGE_OPTIMIZER_DOMAIN) . "</p></div>";
define('EWWW_IMAGE_OPTIMIZER_NOEXEC', true);
ewww_image_optimizer_disable_tools();
return;
// otherwise, query the php settings for safe mode
} elseif (ewww_image_optimizer_safemode_check()) {
// display a warning to the user
echo "<div id='ewww-image-optimizer-warning-opt-png' class='error'><p>" . __('Safe Mode is turned on for PHP. This plugin cannot operate in Safe Mode.', EWWW_IMAGE_OPTIMIZER_DOMAIN) . "</p></div>";
define('EWWW_IMAGE_OPTIMIZER_NOEXEC', true);
ewww_image_optimizer_disable_tools();
return;
} else {
define('EWWW_IMAGE_OPTIMIZER_NOEXEC', false);
}
// attempt to retrieve values for utility paths, and store them in the appropriate variables
$required = ewww_image_optimizer_path_check();
// set the variables false otherwise
$skip_jpegtran_check = false;
$skip_optipng_check = false;
$skip_gifsicle_check = false;
$skip_pngout_check = false;
$skip_pngquant_check = true;
$skip_webp_check = true;
// if the user has disabled a variable, we aren't going to bother checking to see if it is there
if (ewww_image_optimizer_get_option('ewww_image_optimizer_disable_jpegtran')) {
$skip_jpegtran_check = true;
}
if (ewww_image_optimizer_get_option('ewww_image_optimizer_disable_optipng')) {
$skip_optipng_check = true;
}
if (ewww_image_optimizer_get_option('ewww_image_optimizer_disable_gifsicle')) {
$skip_gifsicle_check = true;
}
if (ewww_image_optimizer_get_option('ewww_image_optimizer_disable_pngout')) {
$skip_pngout_check = true;
}
if (ewww_image_optimizer_get_option('ewww_image_optimizer_png_lossy')) {
$skip_pngquant_check = false;
}
if (ewww_image_optimizer_get_option('ewww_image_optimizer_webp')) {
$skip_webp_check = false;
}
// we are going to store our validation results in $missing
$missing = array();
// go through each of the required tools
foreach ($required as $key => $req) {
// if the tool wasn't found, add it to the $missing array if we are supposed to check the tool in question
switch ($key) {
case 'JPEGTRAN':
if (!$skip_jpegtran_check && empty($req)) {
$missing[] = 'jpegtran';
$req = false;
}
define('EWWW_IMAGE_OPTIMIZER_' . $key, $req);
break;
case 'OPTIPNG':
if (!$skip_optipng_check && empty($req)) {
$missing[] = 'optipng';
$req = false;
}
define('EWWW_IMAGE_OPTIMIZER_' . $key, $req);
break;
case 'GIFSICLE':
if (!$skip_gifsicle_check && empty($req)) {
$missing[] = 'gifsicle';
$req = false;
}
define('EWWW_IMAGE_OPTIMIZER_' . $key, $req);
break;
case 'PNGOUT':
if (!$skip_pngout_check && empty($req)) {
$missing[] = 'pngout';
$req = false;
}
define('EWWW_IMAGE_OPTIMIZER_' . $key, $req);
break;
case 'PNGQUANT':
if (!$skip_pngquant_check && empty($req)) {
$missing[] = 'pngquant';
$req = false;
}
define('EWWW_IMAGE_OPTIMIZER_' . $key, $req);
break;
case 'WEBP':
if (!$skip_webp_check && empty($req)) {
$missing[] = 'webp';
$req = false;
}
define('EWWW_IMAGE_OPTIMIZER_' . $key, $req);
break;
}
}
// expand the missing utilities list for use in the error message
//.........这里部分代码省略.........
开发者ID:aim-web-projects,项目名称:kobe-chuoh,代码行数:101,代码来源:ewww-image-optimizer.php
示例4: ewww_image_optimizer
/**
* Process an image.
*
* Returns an array of the $file, $results, $converted to tell us if an image changes formats, and the $original file if it did.
*
* @param string $file Full absolute path to the image file
* @param int $gallery_type 1=wordpress, 2=nextgen, 3=flagallery, 4=aux_images, 5=image editor, 6=imagestore, 7=retina
* @param boolean $converted tells us if this is a resize and the full image was converted to a new format
* @param boolean $new tells the optimizer that this is a new image, so it should attempt conversion regardless of previous results
* @param boolean $fullsize tells the optimizer this is a full size image
* @returns array
*/
function ewww_image_optimizer($file, $gallery_type = 4, $converted = false, $new = false, $fullsize = false)
{
global $ewww_debug;
$ewww_debug .= "<b>ewww_image_optimizer()</b><br>";
// if the plugin gets here without initializing, we need to run through some things first
if (!defined('EWWW_IMAGE_OPTIMIZER_CLOUD')) {
ewww_image_optimizer_init();
}
$bypass_optimization = apply_filters('ewww_image_optimizer_bypass', false, $file);
if (true === $bypass_optimization) {
// tell the user optimization was skipped
$msg = __("Optimization skipped", EWWW_IMAGE_OPTIMIZER_DOMAIN);
$ewww_debug .= "optimization bypassed: {$file} <br>";
// send back the above message
return array(false, $msg, $converted, $file);
}
// initialize the original filename
$original = $file;
$result = '';
// check that the file exists
if (FALSE === file_exists($file)) {
// tell the user we couldn't find the file
$msg = sprintf(__('Could not find %s', EWWW_IMAGE_OPTIMIZER_DOMAIN), "<span class='code'>{$file}</span>");
$ewww_debug .= "file doesn't appear to exist: {$file} <br>";
// send back the above message
return array(false, $msg, $converted, $original);
}
// check that the file is writable
if (FALSE === is_writable($file)) {
// tell the user we can't write to the file
$msg = sprintf(__('%s is not writable', EWWW_IMAGE_OPTIMIZER_DOMAIN), "<span class='code'>{$file}</span>");
$ewww_debug .= "couldn't write to the file {$file}<br>";
// send back the above message
return array(false, $msg, $converted, $original);
}
if (function_exists('fileperms')) {
$file_perms = substr(sprintf('%o', fileperms($file)), -4);
}
$file_owner = 'unknown';
$file_group = 'unknown';
if (function_exists('posix_getpwuid')) {
$file_owner = posix_getpwuid(fileowner($file));
$file_owner = $file_owner['name'];
}
if (function_exists('posix_getgrgid')) {
$file_group = posix_getgrgid(filegroup($file));
$file_group = $file_group['name'];
}
$ewww_debug .= "permissions: {$file_perms}, owner: {$file_owner}, group: {$file_group} <br>";
$type = ewww_image_optimizer_mimetype($file, 'i');
if (strpos($type, 'image') === FALSE) {
//otherwise we store an error message since we couldn't get the mime-type
$msg = __('Missing finfo_file(), getimagesize() and mime_content_type() PHP functions', EWWW_IMAGE_OPTIMIZER_DOMAIN);
$ewww_debug .= "couldn't find any functions for mimetype detection<br>";
return array(false, $msg, $converted, $original);
}
if (!EWWW_IMAGE_OPTIMIZER_CLOUD) {
// check to see if 'nice' exists
$nice = ewww_image_optimizer_find_binary('nice', 'n');
if (!defined('EWWW_IMAGE_OPTIMIZER_NOEXEC')) {
// Check if exec is disabled
if (ewww_image_optimizer_exec_check()) {
define('EWWW_IMAGE_OPTIMIZER_NOEXEC', true);
$ewww_debug .= 'exec seems to be disabled<br>';
ewww_image_optimizer_disable_tools();
// otherwise, query the php settings for safe mode
} elseif (ewww_image_optimizer_safemode_check()) {
define('EWWW_IMAGE_OPTIMIZER_NOEXEC', true);
$ewww_debug .= 'safe mode appears to be enabled<br>';
ewww_image_optimizer_disable_tools();
} else {
define('EWWW_IMAGE_OPTIMIZER_NOEXEC', false);
}
}
}
// if the user has disabled the utility checks
if (ewww_image_optimizer_get_option('ewww_image_optimizer_skip_check') == TRUE || EWWW_IMAGE_OPTIMIZER_CLOUD) {
$skip_jpegtran_check = true;
$skip_optipng_check = true;
$skip_gifsicle_check = true;
$skip_pngout_check = true;
} else {
// otherwise we set the variables to false
$skip_jpegtran_check = false;
$skip_optipng_check = false;
$skip_gifsicle_check = false;
$skip_pngout_check = false;
}
//.........这里部分代码省略.........
开发者ID:Rudchyk,项目名称:wp-framework,代码行数:101,代码来源:ewww-image-optimizer.php
示例5: ewww_image_optimizer_options
//.........这里部分代码省略.........
if (!$pngquant_version) {
$pngquant_version = ewww_image_optimizer_tool_found(EWWW_IMAGE_OPTIMIZER_PNGQUANT, 'qb');
}
}
if (!empty($pngquant_version)) {
$output[] = '<span style="color: green; font-weight: bolder">' . esc_html__('Installed', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span> ' . esc_html__('version', EWWW_IMAGE_OPTIMIZER_DOMAIN) . ': ' . $pngquant_version . "<br />\n";
} else {
$output[] = '<span style="color: red; font-weight: bolder">' . esc_html__('Missing', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span><br />' . "\n";
$collapsible = false;
}
}
if (EWWW_IMAGE_OPTIMIZER_WEBP && !$skip['webp'] && !EWWW_IMAGE_OPTIMIZER_NOEXEC) {
$output[] = "<b>webp:</b> ";
if (EWWW_IMAGE_OPTIMIZER_WEBP) {
$webp_version = ewww_image_optimizer_tool_found(EWWW_IMAGE_OPTIMIZER_WEBP, 'w');
if (!$webp_version) {
$webp_version = ewww_image_optimizer_tool_found(EWWW_IMAGE_OPTIMIZER_WEBP, 'wb');
}
}
if (!empty($webp_version)) {
$output[] = '<span style="color: green; font-weight: bolder">' . esc_html__('Installed', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span> ' . esc_html__('version', EWWW_IMAGE_OPTIMIZER_DOMAIN) . ': ' . $webp_version . "<br />\n";
} else {
$output[] = '<span style="color: red; font-weight: bolder">' . esc_html__('Missing', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span><br />' . "\n";
$collapsible = false;
}
}
if (!ewww_image_optimizer_full_cloud() && !EWWW_IMAGE_OPTIMIZER_NOEXEC) {
if (ewww_image_optimizer_safemode_check()) {
$output[] = 'safe mode: <span style="color: red; font-weight: bolder">' . esc_html__('On', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span>  ';
$collapsible = false;
} else {
$output[] = 'safe mode: <span style="color: green; font-weight: bolder">' . esc_html__('Off', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span>  ';
}
if (ewww_image_optimizer_exec_check()) {
$output[] = 'exec(): <span style="color: red; font-weight: bolder">' . esc_html__('Disabled', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span>  ';
$collapsible = false;
} else {
$output[] = 'exec(): <span style="color: green; font-weight: bolder">' . esc_html__('Enabled', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span>  ';
}
$output[] = "<br />\n";
$output[] = wp_kses(sprintf(__("%s only need one, used for conversion, not optimization", EWWW_IMAGE_OPTIMIZER_DOMAIN), '<b>' . __('Graphics libraries', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</b> - '), array('b' => array()));
$output[] = '<br>';
$toolkit_found = false;
if (ewww_image_optimizer_gd_support()) {
$output[] = 'GD: <span style="color: green; font-weight: bolder">' . esc_html__('Installed', EWWW_IMAGE_OPTIMIZER_DOMAIN);
$toolkit_found = true;
} else {
$output[] = 'GD: <span style="color: red; font-weight: bolder">' . esc_html__('Missing', EWWW_IMAGE_OPTIMIZER_DOMAIN);
}
$output[] = '</span>  ' . "Gmagick: ";
if (ewww_image_optimizer_gmagick_support()) {
$output[] = '<span style="color: green; font-weight: bolder">' . esc_html__('Installed', EWWW_IMAGE_OPTIMIZER_DOMAIN);
$toolkit_found = true;
} else {
$output[] = '<span style="color: red; font-weight: bolder">' . esc_html__('Missing', EWWW_IMAGE_OPTIMIZER_DOMAIN);
}
$output[] = '</span>  ' . "Imagick: ";
if (ewww_image_optimizer_imagick_support()) {
$output[] = '<span style="color: green; font-weight: bolder">' . esc_html__('Installed', EWWW_IMAGE_OPTIMIZER_DOMAIN);
$toolkit_found = true;
} else {
$output[] = '<span style="color: red; font-weight: bolder">' . esc_html__('Missing', EWWW_IMAGE_OPTIMIZER_DOMAIN);
}
$output[] = "</span>  Imagemagick 'convert': ";
if ('WINNT' == PHP_OS && ewww_image_optimizer_find_win_binary('convert', 'i')) {
$output[] = '<span style="color: green; font-weight: bolder">' . esc_html__('Installed', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span>';
开发者ID:crazyyy,项目名称:bessarabia,代码行数:67,代码来源:common.php
注:本文中的ewww_image_optimizer_exec_check函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论