本文整理汇总了PHP中ewww_image_optimizer_gd_support函数的典型用法代码示例。如果您正苦于以下问题:PHP ewww_image_optimizer_gd_support函数的具体用法?PHP ewww_image_optimizer_gd_support怎么用?PHP ewww_image_optimizer_gd_support使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ewww_image_optimizer_gd_support函数的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) . ': ' . $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>  ';
$file_command_check = false;
} else {
$output[] = 'finfo: <span style="color: red; font-weight: bolder">' . __('Missing', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span>  ';
}
if (function_exists('getimagesize')) {
$output[] = 'getimagesize(): <span style="color: green; font-weight: bolder">' . __('Installed', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span>  ';
if (EWWW_IMAGE_OPTIMIZER_CLOUD || EWWW_IMAGE_OPTIMIZER_NOEXEC || PHP_OS == 'WINNT') {
$file_command_check = false;
}
} else {
开发者ID:goodbayscott,项目名称:wwr-temp,代码行数:67,代码来源:common.php
示例2: ewww_image_optimizer_options
//.........这里部分代码省略.........
echo '<span style="color: red; font-weight: bolder">MISSING</span><br />';
}
}
if (!ewww_image_optimizer_get_option('ewww_image_optimizer_disable_optipng') && !ewww_image_optimizer_get_option('ewww_image_optimizer_cloud_png') && !EWWW_IMAGE_OPTIMIZER_NOEXEC) {
echo "\n", '<b>optipng:</b> ';
$optipng_version = ewww_image_optimizer_tool_found(EWWW_IMAGE_OPTIMIZER_OPTIPNG, 'o');
if (!empty($optipng_version)) {
echo '<span style="color: green; font-weight: bolder">OK</span> version: ' . $optipng_version . '<br />';
} else {
echo '<span style="color: red; font-weight: bolder">MISSING</span><br />';
}
}
if (!ewww_image_optimizer_get_option('ewww_image_optimizer_disable_gifsicle') && !ewww_image_optimizer_get_option('ewww_image_optimizer_cloud_gif') && !EWWW_IMAGE_OPTIMIZER_NOEXEC) {
echo "\n", '<b>gifsicle:</b> ';
$gifsicle_version = ewww_image_optimizer_tool_found(EWWW_IMAGE_OPTIMIZER_GIFSICLE, 'g');
if (!empty($gifsicle_version) && preg_match('/LCDF Gifsicle/', $gifsicle_version)) {
echo '<span style="color: green; font-weight: bolder">OK</span> version: ' . $gifsicle_version . '<br />';
} else {
echo '<span style="color: red; font-weight: bolder">MISSING</span><br />';
}
}
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 {
开发者ID:LacieNat,项目名称:Access-Comm-Project,代码行数:67,代码来源:ewww-image-optimizer.php
示例3: ewww_image_optimizer_options
//.........这里部分代码省略.........
}
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>';
$toolkit_found = true;
} elseif ('WINNT' != PHP_OS && ewww_image_optimizer_find_nix_binary('convert', 'i')) {
$output[] = '<span style="color: green; font-weight: bolder">' . esc_html__('Installed', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</span>';
$toolkit_found = true;
} else {
$output[] = '<span style="color: red; font-weight: bolder">' . esc_html__('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;
}
开发者ID:crazyyy,项目名称:bessarabia,代码行数:67,代码来源:common.php
示例4: ewww_image_optimizer
//.........这里部分代码省略.........
// if the best-optimized is smaller than the original JPG, and we didn't create an empty JPG
if ($orig_size > $new_size && $new_size != 0 && ewww_image_optimizer_mimetype($tempfile, 'i') == $type) {
// replace the original with the optimized file
rename($tempfile, $file);
// store the results of the optimization
$result = "{$orig_size} vs. {$new_size}";
// if the optimization didn't produce a smaller JPG
} else {
if (is_file($tempfile)) {
// delete the optimized file
unlink($tempfile);
}
// store the results
$result = 'unchanged';
$new_size = $orig_size;
}
// if conversion and optimization are both turned OFF, finish the JPG processing
} elseif (!$convert) {
ewww_image_optimizer_webp_create($file, $orig_size, $type, $tools['WEBP']);
break;
}
// if the conversion process is turned ON, or if this is a resize and the full-size was converted
if ($convert && !ewww_image_optimizer_get_option('ewww_image_optimizer_cloud_jpg')) {
$ewww_debug .= "attempting to convert JPG to PNG: {$pngfile} <br>";
if (empty($new_size)) {
$new_size = $orig_size;
}
// retrieve version info for ImageMagick
$convert_path = ewww_image_optimizer_find_binary('convert', 'i');
// convert the JPG to PNG
if (!empty($convert_path)) {
$ewww_debug .= "converting with ImageMagick<br>";
exec($convert_path . " " . ewww_image_optimizer_escapeshellarg($file) . " -strip " . ewww_image_optimizer_escapeshellarg($pngfile));
} elseif (ewww_image_optimizer_gd_support()) {
$ewww_debug .= "converting with GD<br>";
imagepng(imagecreatefromjpeg($file), $pngfile);
}
// if lossy optimization is ON and full-size exclusion is not active
if (ewww_image_optimizer_get_option('ewww_image_optimizer_png_lossy') && $tools['PNGQUANT'] && !$skip_lossy) {
$ewww_debug .= "attempting lossy reduction<br>";
exec("{$nice} " . $tools['PNGQUANT'] . " " . ewww_image_optimizer_escapeshellarg($pngfile));
$quantfile = preg_replace('/\\.\\w+$/', '-fs8.png', $pngfile);
if (file_exists($quantfile) && filesize($pngfile) > filesize($quantfile)) {
$ewww_debug .= "lossy reduction is better: original - " . filesize($pngfile) . " vs. lossy - " . filesize($quantfile) . "<br>";
rename($quantfile, $pngfile);
} elseif (file_exists($quantfile)) {
$ewww_debug .= "lossy reduction is worse: original - " . filesize($pngfile) . " vs. lossy - " . filesize($quantfile) . "<br>";
unlink($quantfile);
} else {
$ewww_debug .= "pngquant did not produce any output<br>";
}
}
// if optipng isn't disabled
if (!ewww_image_optimizer_get_option('ewww_image_optimizer_disable_optipng')) {
// retrieve the optipng optimization level
$optipng_level = ewww_image_optimizer_get_option('ewww_image_optimizer_optipng_level');
if (ewww_image_optimizer_get_option('ewww_image_optimizer_jpegtran_copy') && preg_match('/0.7/', ewww_image_optimizer_tool_found($tools['OPTIPNG'], 'o')) && !$keep_metadata) {
$strip = '-strip all ';
} else {
$strip = '';
}
// if the PNG file was created
if (file_exists($pngfile)) {
$ewww_debug .= "optimizing converted PNG with optipng<br>";
// run optipng on the new PNG
exec("{$nice} " . $tools['OPTIPNG'] . " -o{$optipng_level} -quiet {$strip} " . ewww_image_optimizer_escapeshellarg($pngfile));
开发者ID:Rudchyk,项目名称:wp-framework,代码行数:67,代码来源:ewww-image-optimizer.php
示例5: ewww_image_optimizer_options
//.........这里部分代码省略.........
echo '<span style="color: orange; font-weight: bolder">UPDATE AVAILABLE</span>* <b>Copy</b> binary from ' . $optipng_src . ' to ' . $optipng_dst . ' or to a system path (like /usr/local/bin), OR <a href="http://prdownloads.sourceforge.net/optipng/optipng-0.7.4.tar.gz?download"><b>Download</b> optipng source</a> <b>version:</b> ' . $optipng_version . '<br />';
} else {
echo '<span style="color: red; font-weight: bolder">MISSING</span> <b>Copy</b> binary from ' . $optipng_src . ' to ' . $optipng_dst . ' or to a system path (like /usr/local/bin), OR <a href="http://prdownloads.sourceforge.net/optipng/optipng-0.7.4.tar.gz?download"><b>Download</b> optipng source</a><br />';
}
}
echo "\n";
if (!get_site_option('ewww_image_optimizer_disable_gifsicle')) {
echo "\n";
echo '<b>gifsicle:</b> ';
$gifsicle_version = ewww_image_optimizer_tool_found(EWWW_IMAGE_OPTIMIZER_GIFSICLE, 'g');
if (!empty($gifsicle_version) && preg_match('/1.70/', $gifsicle_version)) {
echo '<span style="color: green; font-weight: bolder">OK</span> version: ' . $gifsicle_version . '<br />';
} elseif (!empty($gifsicle_version) && preg_match('/LCDF Gifsicle/', $gifsicle_version)) {
echo '<span style="color: orange; font-weight: bolder">UPDATE AVAILABLE</span>* <b>Copy</b> binary from ' . $gifsicle_src . ' to ' . $gifsicle_dst . ' or to a system path (like /usr/local/bin), OR <a href="http://www.lcdf.org/gifsicle/gifsicle-1.70.tar.gz"><b>Download</b> gifsicle source</a> <b>version:</b> ' . $gifsicle_version . '<br />';
} else {
echo '<span style="color: red; font-weight: bolder">MISSING</span> <b>Copy</b> binary from ' . $gifsicle_src . ' to ' . $gifsicle_dst . ' or to a system path (like /usr/local/bin), OR <a href="http://www.lcdf.org/gifsicle/gifsicle-1.70.tar.gz"><b>Download</b> gifsicle source</a><br />';
}
}
echo "\n";
if (!get_site_option('ewww_image_optimizer_disable_pngout')) {
echo "\n";
echo '<b>pngout:</b> ';
$pngout_version = ewww_image_optimizer_tool_found(EWWW_IMAGE_OPTIMIZER_PNGOUT, 'p');
if (!empty($pngout_version) && preg_match('/Feb 2(0|1) 2013/', $pngout_version)) {
echo '<span style="color: green; font-weight: bolder">OK</span> version: ' . preg_replace('/PNGOUT \\[.*\\)\\s*?/', '', $pngout_version) . '<br />';
} elseif (!empty($pngout_version) && preg_match('/PNGOUT/', $pngout_version)) {
echo '<span style="color: orange; font-weight: bolder">UPDATE AVAILABLE</span>* <b>Install</b> <a href="admin.php?action=ewww_image_optimizer_install_pngout">automatically</a> | <a href="http://advsys.net/ken/utils.htm">manually</a> <b>version:</b> ' . preg_replace('/PNGOUT \\[.*\\)\\s*?/', '', $pngout_version) . '<br />';
} else {
echo '<span style="color: red; font-weight: bolder">MISSING</span> <b>Install <a href="admin.php?action=ewww_image_optimizer_install_pngout">automatically</a> | <a href="http://advsys.net/ken/utils.htm">manually</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<br />';
}
}
echo "\n";
echo "<b>Graphics libraries</b> - only need one, used for conversion, not optimization: ";
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_tool_found('convert', 'i') || ewww_image_optimizer_tool_found('/usr/bin/convert', 'i') || ewww_image_optimizer_tool_found('/usr/local/bin/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 (ini_get('safe_mode')) {
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>  ';
}
$disabled = ini_get('disable_functions');
$ewww_debug = "{$ewww_debug} disabled functions: {$disabled}<br />";
if (preg_match('/[^_]exec/', $disabled)) {
echo 'exec(): <span style="color: red; font-weight: bolder">DISABLED</span>  ';
} else {
echo 'exec(): <span style="color: green; font-weight: bolder">OK</span>  ';
}
if (PHP_OS != 'WINNT') {
if (!ewww_image_optimizer_tool_found('/usr/bin/file', 'f') && !ewww_image_optimizer_tool_found('file', 'f')) {
echo '<span style="color: red; font-weight: bolder">file command not found on your system</span>';
}
if (!ewww_image_optimizer_tool_found('/usr/bin/nice', 'n') && !ewww_image_optimizer_tool_found('nice', 'n')) {
echo '<span style="color: orange; font-weight: bolder">nice command not found on your system (not required)</span>';
}
开发者ID:Creative-Srijon,项目名称:top10bestwp,代码行数:67,代码来源:ewww-image-optimizer.php
注:本文中的ewww_image_optimizer_gd_support函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论