晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
Server : Apache System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64 User : rainic ( 1014) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/stando/www/wp-content/plugins/wp-smush-pro/app/pages/ |
Upload File : |
<?php
/**
* NextGen admin view: Nextgen class
*
* @package Smush\App\Pages
*/
namespace Smush\App\Pages;
use Smush\App\Abstract_Page;
use Smush\App\Admin;
use WP_Smush;
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* Class Nextgen
*/
class Nextgen extends Abstract_Page {
/**
* Function triggered when the page is loaded before render any content.
*/
public function on_load() {
// Localize variables for NextGen Manage gallery page.
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
}
/**
* Register meta boxes.
*/
public function register_meta_boxes() {
$this->add_meta_box(
'summary',
null,
array( $this, 'dashboard_summary_metabox' ),
null,
null,
'summary',
array(
'box_class' => 'sui-box sui-summary sui-summary-smush-nextgen',
'box_content_class' => false,
)
);
$class = WP_Smush::is_pro() ? 'bulk-smush-wrapper wp-smush-pro-install' : 'bulk-smush-wrapper';
$this->add_meta_box(
'bulk',
__( 'Bulk Smush', 'wp-smushit' ),
array( $this, 'bulk_metabox' ),
array( $this, 'bulk_header_metabox' ),
null,
'bulk',
array(
'box_class' => "sui-box {$class}",
)
);
}
/**
* Enqueue Scripts on Manage Gallery page
*/
public function enqueue() {
$current_screen = get_current_screen();
if ( ! empty( $current_screen ) && in_array( $current_screen->base, Admin::$plugin_pages, true ) ) {
WP_Smush::get_instance()->core()->nextgen->ng_admin->localize();
}
}
/**
* NextGen summary meta box.
*/
public function dashboard_summary_metabox() {
$ng = WP_Smush::get_instance()->core()->nextgen->ng_admin;
$lossy_enabled = WP_Smush::is_pro() && $this->settings->get( 'lossy' );
$smushed_image_count = 0;
if ( $lossy_enabled ) {
$smushed_image = $ng->ng_stats->get_ngg_images( 'smushed' );
if ( ! empty( $smushed_image ) && is_array( $smushed_image ) && ! empty( $this->resmush_ids ) && is_array( $this->resmush_ids ) ) {
// Get smushed images excluding resmush IDs.
$smushed_image = array_diff_key( $smushed_image, array_flip( $this->resmush_ids ) );
}
$smushed_image_count = is_array( $smushed_image ) ? count( $smushed_image ) : 0;
}
$this->view(
'nextgen/summary-meta-box',
array(
'image_count' => $ng->image_count,
'lossy_enabled' => $lossy_enabled,
'smushed_image_count' => $smushed_image_count,
'stats_human' => $ng->stats['human'] > 0 ? $ng->stats['human'] : '0 MB',
'stats_percent' => $ng->stats['percent'] > 0 ? number_format_i18n( $ng->stats['percent'], 1 ) : 0,
'total_count' => $ng->total_count,
)
);
}
/**
* NextGen bulk Smush header meta box.
*/
public function bulk_header_metabox() {
$this->view(
'nextgen/meta-box-header',
array(
'title' => __( 'Bulk Smush', 'wp-smushit' ),
)
);
}
/**
* NextGen bulk Smush meta box.
*/
public function bulk_metabox() {
$ng = WP_Smush::get_instance()->core()->nextgen->ng_admin;
$resmush_ids = get_option( 'wp-smush-nextgen-resmush-list', false );
$count = $resmush_ids ? count( $resmush_ids ) : 0;
$count += $ng->remaining_count;
$url = add_query_arg(
array(
'page' => 'smush#wp-smush-settings-box',
),
admin_url( 'upload.php' )
);
$this->view(
'nextgen/meta-box',
array(
'all_done' => ( $ng->smushed_count == $ng->total_count ) && 0 == count( $ng->resmush_ids ),
'count' => $count,
'lossy_enabled' => WP_Smush::is_pro() && $this->settings->get( 'lossy' ),
'ng' => $ng,
'remaining_count' => $ng->remaining_count,
'resmush_ids' => $ng->resmush_ids,
'total_count' => $ng->total_count,
'url' => $url,
)
);
}
}