• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ewwwio_memory函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ewwwio_memory函数的典型用法代码示例。如果您正苦于以下问题:PHP ewwwio_memory函数的具体用法?PHP ewwwio_memory怎么用?PHP ewwwio_memory使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ewwwio_memory函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: ewww_ngg_image_save

	function ewww_ngg_image_save( $filename ) {
		ewwwio_debug_message( '<b>' . __FUNCTION__ . '()</b>' );
		global $ewww_defer;
		if ( file_exists( $filename ) ) {
			global $ewwwio_image_background;
			$ewwwio_image_background->push_to_queue( $filename );
			$ewwwio_image_background->save()->dispatch();
			ewwwio_debug_message( "ngg thumb queued: $filename" );
		}
		ewww_image_optimizer_debug_log();
		ewwwio_memory( __FUNCTION__ );
	}
开发者ID:recetasdemama,项目名称:wordpress,代码行数:12,代码来源:nextcellent-integration.php


示例2: ewww_ngg_image_save

 function ewww_ngg_image_save($filename)
 {
     ewwwio_debug_message('<b>' . __FUNCTION__ . '()</b>');
     global $ewww_defer;
     if (file_exists($filename)) {
         if ($ewww_defer && ewww_image_optimizer_get_option('ewww_image_optimizer_defer')) {
             ewww_image_optimizer_add_deferred_attachment("file,{$filename}");
             return $saved;
         }
         ewww_image_optimizer($filename);
         ewwwio_debug_message("ngg_Thumbnail saved: {$filename}");
         $image_size = ewww_image_optimizer_filesize($filename);
         ewwwio_debug_message("image editor size: {$image_size}");
     }
     ewww_image_optimizer_debug_log();
     ewwwio_memory(__FUNCTION__);
 }
开发者ID:AgilData,项目名称:WordPress-Skeleton,代码行数:17,代码来源:nextcellent-integration.php


示例3: ewww_image_optimizer_filter_settings_page

function ewww_image_optimizer_filter_settings_page($input)
{
    $output = '';
    foreach ($input as $line) {
        if (EWWW_IMAGE_OPTIMIZER_CLOUD && preg_match("/class='nocloud'/", $line)) {
            continue;
        } else {
            $output .= $line;
        }
    }
    ewwwio_memory(__FUNCTION__);
    return $output;
}
开发者ID:goodbayscott,项目名称:wwr-temp,代码行数:13,代码来源:common.php


示例4: generate_image_size

 function generate_image_size($image, $size, $params = null, $skip_defaults = false)
 {
     ewwwio_debug_message('<b>' . __FUNCTION__ . '()</b>');
     global $ewww_defer;
     if (!defined('EWWW_IMAGE_OPTIMIZER_CLOUD')) {
         ewww_image_optimizer_init();
     }
     $success = $this->call_parent('generate_image_size', $image, $size, $params, $skip_defaults);
     if ($success) {
         $filename = $success->fileName;
         if ($ewww_defer && ewww_image_optimizer_get_option('ewww_image_optimizer_defer')) {
             ewww_image_optimizer_add_deferred_attachment("file,{$filename}");
             return $saved;
         }
         ewww_image_optimizer($filename);
         ewwwio_debug_message("nextgen dynamic thumb saved: {$filename}");
         $image_size = ewww_image_optimizer_filesize($filename);
         ewwwio_debug_message("optimized size: {$image_size}");
     }
     ewww_image_optimizer_debug_log();
     ewwwio_memory(__FUNCTION__);
     return $success;
 }
开发者ID:agiper,项目名称:wordpress,代码行数:23,代码来源:nextgen2-integration.php


示例5: ewww_image_optimizer_bulk_cleanup

function ewww_image_optimizer_bulk_cleanup()
{
    // verify that an authorized user has started the optimizer
    $permissions = apply_filters('ewww_image_optimizer_bulk_permissions', '');
    if (!wp_verify_nonce($_REQUEST['ewww_wpnonce'], 'ewww-image-optimizer-bulk') || !current_user_can($permissions)) {
        wp_die(__('Cheatin&#8217; eh?', EWWW_IMAGE_OPTIMIZER_DOMAIN));
    }
    // all done, so we can update the bulk options with empty values
    update_option('ewww_image_optimizer_bulk_resume', '');
    update_option('ewww_image_optimizer_bulk_attachments', '');
    // and let the user know we are done
    echo '<p><b>' . __('Finished', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</b> - <a href="upload.php">' . __('Return to Media Library', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</a></p>';
    ewwwio_memory(__FUNCTION__);
    die;
}
开发者ID:Rudchyk,项目名称:wp-framework,代码行数:15,代码来源:bulk.php


示例6: ewww_image_optimizer_install_pngout

function ewww_image_optimizer_install_pngout()
{
    global $ewww_debug;
    $ewww_debug .= '<b>ewww_image_optimizer_install_pngout()</b><br>';
    $permissions = apply_filters('ewww_image_optimizer_admin_permissions', '');
    if (FALSE === current_user_can($permissions)) {
        wp_die(__('You don\'t have permission to install image optimizer utilities.', EWWW_IMAGE_OPTIMIZER_DOMAIN));
    }
    if (PHP_OS != 'WINNT') {
        $tar = ewww_image_optimizer_find_binary('tar', 't');
    }
    if (empty($tar) && PHP_OS != 'WINNT') {
        $pngout_error = __('tar command not found', EWWW_IMAGE_OPTIMIZER_DOMAIN);
    }
    if (PHP_OS == 'Linux') {
        $os_string = 'linux';
    }
    if (PHP_OS == 'FreeBSD') {
        $os_string = 'bsd';
    }
    $latest = '20150319';
    if (empty($pngout_error)) {
        if (PHP_OS == 'Linux' || PHP_OS == 'FreeBSD') {
            $download_result = ewww_image_optimizer_escapeshellarg(download_url('http://static.jonof.id.au/dl/kenutils/pngout-' . $latest . '-' . $os_string . '-static.tar.gz'));
            if (is_wp_error($download_result)) {
                $pngout_error = $download_result->get_error_message();
            } else {
                $arch_type = php_uname('m');
                exec("{$tar} xzf {$download_result} -C " . ewww_image_optimizer_escapeshellarg(EWWW_IMAGE_OPTIMIZER_PLUGIN_PATH) . ' pngout-' . $latest . '-' . $os_string . '-static/' . $arch_type . '/pngout-static');
                if (!rename(EWWW_IMAGE_OPTIMIZER_PLUGIN_PATH . 'pngout-' . $latest . '-' . $os_string . '-static/' . $arch_type . '/pngout-static', EWWW_IMAGE_OPTIMIZER_TOOL_PATH . 'pngout-static')) {
                    if (empty($pngout_error)) {
                        $pngout_error = __("could not move pngout", EWWW_IMAGE_OPTIMIZER_DOMAIN);
                    }
                }
                if (!chmod(EWWW_IMAGE_OPTIMIZER_TOOL_PATH . 'pngout-static', 0755)) {
                    if (empty($pngout_error)) {
                        $pngout_error = __("could not set permissions", EWWW_IMAGE_OPTIMIZER_DOMAIN);
                    }
                }
                $pngout_version = ewww_image_optimizer_tool_found(ewww_image_optimizer_escapeshellarg(EWWW_IMAGE_OPTIMIZER_TOOL_PATH) . 'pngout-static', 'p');
            }
        }
        if (PHP_OS == 'Darwin') {
            $download_result = ewww_image_optimizer_escapeshellarg(download_url('http://static.jonof.id.au/dl/kenutils/pngout-' . $latest . '-darwin.tar.gz'));
            if (is_wp_error($download_result)) {
                $pngout_error = $download_result->get_error_message();
            } else {
                exec("{$tar} xzf {$download_result} -C " . ewww_image_optimizer_escapeshellarg(EWWW_IMAGE_OPTIMIZER_PLUGIN_PATH) . ' pngout-' . $latest . '-darwin/pngout');
                if (!rename(EWWW_IMAGE_OPTIMIZER_PLUGIN_PATH . 'pngout-' . $latest . '-darwin/pngout', EWWW_IMAGE_OPTIMIZER_TOOL_PATH . 'pngout-static')) {
                    if (empty($pngout_error)) {
                        $pngout_error = __("could not move pngout", EWWW_IMAGE_OPTIMIZER_DOMAIN);
                    }
                }
                if (!chmod(EWWW_IMAGE_OPTIMIZER_TOOL_PATH . 'pngout-static', 0755)) {
                    if (empty($pngout_error)) {
                        $pngout_error = __("could not set permissions", EWWW_IMAGE_OPTIMIZER_DOMAIN);
                    }
                }
                $pngout_version = ewww_image_optimizer_tool_found(ewww_image_optimizer_escapeshellarg(EWWW_IMAGE_OPTIMIZER_TOOL_PATH) . 'pngout-static', 'p');
            }
        }
    }
    if (PHP_OS == 'WINNT') {
        $download_result = download_url('http://advsys.net/ken/util/pngout.exe');
        if (is_wp_error($download_result)) {
            $pngout_error = $download_result->get_error_message();
        } else {
            if (!rename($download_result, EWWW_IMAGE_OPTIMIZER_TOOL_PATH . 'pngout.exe')) {
                if (empty($pngout_error)) {
                    $pngout_error = __("could not move pngout", EWWW_IMAGE_OPTIMIZER_DOMAIN);
                }
            }
            $pngout_version = ewww_image_optimizer_tool_found('"' . EWWW_IMAGE_OPTIMIZER_TOOL_PATH . 'pngout.exe"', 'p');
        }
    }
    if (!empty($pngout_version)) {
        $sendback = add_query_arg('ewww_pngout', 'success', remove_query_arg(array('ewww_pngout', 'ewww_error'), wp_get_referer()));
    }
    if (!isset($sendback)) {
        $sendback = add_query_arg(array('ewww_pngout' => 'failed', 'ewww_error' => urlencode($pngout_error)), remove_query_arg(array('ewww_pngout', 'ewww_error'), wp_get_referer()));
    }
    wp_redirect(esc_url_raw($sendback));
    ewwwio_memory(__FUNCTION__);
    exit(0);
}
开发者ID:Rudchyk,项目名称:wp-framework,代码行数:85,代码来源:ewww-image-optimizer.php


示例7: generate_image_size

 function generate_image_size($image, $size, $params = null, $skip_defaults = false)
 {
     global $ewww_debug;
     if (!defined('EWWW_IMAGE_OPTIMIZER_CLOUD')) {
         ewww_image_optimizer_init();
     }
     $success = $this->call_parent('generate_image_size', $image, $size, $params, $skip_defaults);
     if ($success) {
         //$filename = $this->object->get_image_abspath($image, $size);
         $filename = $success->fileName;
         ewww_image_optimizer_aux_images_loop($filename, true);
         $ewww_debug .= "nextgen dynamic thumb saved: {$filename} <br>";
         $image_size = filesize($filename);
         $ewww_debug .= "optimized size: {$image_size} <br>";
     }
     ewww_image_optimizer_debug_log();
     ewwwio_memory(__FUNCTION__);
     return $success;
 }
开发者ID:Rudchyk,项目名称:wp-framework,代码行数:19,代码来源:nextgen2-integration.php


示例8: ewww_image_optimizer_aux_images_cleanup

function ewww_image_optimizer_aux_images_cleanup($auto = false)
{
    ewwwio_debug_message('<b>' . __FUNCTION__ . '()</b>');
    // verify that an authorized user has started the optimizer
    $permissions = apply_filters('ewww_image_optimizer_bulk_permissions', '');
    if (!$auto && (!wp_verify_nonce($_REQUEST['ewww_wpnonce'], 'ewww-image-optimizer-bulk') || !current_user_can($permissions))) {
        wp_die(esc_html__('Access denied.', EWWW_IMAGE_OPTIMIZER_DOMAIN));
    }
    $stored_last = get_option('ewww_image_optimizer_aux_last');
    update_option('ewww_image_optimizer_aux_last', array(time(), $stored_last[1]));
    // all done, so we can update the bulk options with empty values
    update_option('ewww_image_optimizer_aux_resume', '');
    update_option('ewww_image_optimizer_aux_attachments', '');
    if (!$auto) {
        // and let the user know we are done
        echo '<p><b>' . esc_html__('Finished', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</b></p>';
        ewwwio_memory(__FUNCTION__);
        die;
    }
}
开发者ID:kanei,项目名称:vantuch.cz,代码行数:20,代码来源:aux-optimize.php


示例9: ewww_ngg_image_save

 function ewww_ngg_image_save($filename)
 {
     ewwwio_debug_message('<b>' . __FUNCTION__ . '()</b>');
     global $ewww_defer;
     if (file_exists($filename)) {
         if (ewww_image_optimizer_get_option('ewww_image_optimizer_background_optimization')) {
             global $ewwwio_image_background;
             if (!class_exists('WP_Background_Process')) {
                 require_once EWWW_IMAGE_OPTIMIZER_PLUGIN_PATH . 'background.php';
             }
             if (!is_object($ewwwio_image_background)) {
                 $ewwwio_image_background = new EWWWIO_Image_Background_Process();
             }
             $ewwwio_image_background->push_to_queue($filename);
             $ewwwio_image_background->save()->dispatch();
             ewwwio_debug_message("ngg thumb queued: {$filename}");
         } else {
             ewww_image_optimizer($filename);
         }
     }
     ewww_image_optimizer_debug_log();
     ewwwio_memory(__FUNCTION__);
 }
开发者ID:aaronfrey,项目名称:PepperLillie-CVM,代码行数:23,代码来源:nextcellent-integration.php


示例10: ewww_image_optimizer_aux_images_cleanup

function ewww_image_optimizer_aux_images_cleanup($auto = false)
{
    global $ewww_debug;
    $ewww_debug .= "<b>ewww_image_optimizer_aux_images_cleanup()</b><br>";
    // verify that an authorized user has started the optimizer
    if (!$auto && (!wp_verify_nonce($_REQUEST['ewww_wpnonce'], 'ewww-image-optimizer-bulk') || !current_user_can('install_themes'))) {
        wp_die(__('Cheatin&#8217; eh?', EWWW_IMAGE_OPTIMIZER_DOMAIN));
    }
    $stored_last = get_option('ewww_image_optimizer_aux_last');
    update_option('ewww_image_optimizer_aux_last', array(time(), $stored_last[1]));
    // all done, so we can update the bulk options with empty values
    update_option('ewww_image_optimizer_aux_resume', '');
    update_option('ewww_image_optimizer_aux_attachments', '');
    if (!$auto) {
        // and let the user know we are done
        echo '<p><b>' . __('Finished', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</b></p>';
        ewwwio_memory(__FUNCTION__);
        die;
    }
}
开发者ID:hkarriche,项目名称:wordpress,代码行数:20,代码来源:aux-optimize.php



注:本文中的ewwwio_memory函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ex函数代码示例发布时间:2022-05-15
下一篇:
PHP ewwwio_debug_message函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap