$id );
set_transient( 'rocket_clear_cache', 'user', HOUR_IN_SECONDS );
break;
// Clear cache file of the current page in front-end.
case 'url':
$url = wp_get_referer();
if ( 0 !== strpos( $url, 'http' ) ) {
$parse_url = get_rocket_parse_url( untrailingslashit( home_url() ) );
$url = $parse_url['scheme'] . '://' . $parse_url['host'] . $url;
}
if ( home_url( '/' ) === $url ) {
rocket_clean_home();
} else {
rocket_clean_files( $url );
}
break;
default:
wp_nonce_ays( '' );
return;
}
/**
* Fires after the cache is cleared.
*
* @since 3.6
*
* @param string $type Type of cache clearance: 'all', 'post', 'term', 'user', 'url'.
* @param int $id The post ID, term ID, or user ID being cleared. 0 when $type is not 'post', 'term', or 'user'.
* @param string $taxonomy The taxonomy the term being cleared belong to. '' when $type is not 'term'.
* @param string $url The URL being cleared. '' when $type is not 'url'.
*/
do_action( 'rocket_purge_cache', $type, $id, $taxonomy, $url );
wp_safe_redirect( esc_url_raw( wp_get_referer() ) );
rocket_get_constant( 'WP_ROCKET_IS_TESTING', false ) ? wp_die() : exit;
}
}
add_action( 'admin_post_purge_cache', 'do_admin_post_rocket_purge_cache' );
/**
* Clean the cache when the current theme is updated.
*
* @param WP_Upgrader $wp_upgrader WP_Upgrader instance.
* @param array $hook_extra Array of bulk item update data.
*/
function rocket_clean_cache_theme_update( $wp_upgrader, $hook_extra ) {
if ( 'update' !== $hook_extra['action'] ) {
return;
}
if ( 'theme' !== $hook_extra['type'] ) {
return;
}
if ( ! is_array( $hook_extra['themes'] ) ) {
return;
}
$current_theme = wp_get_theme();
$themes = [
$current_theme->get_template(), // Parent theme.
$current_theme->get_stylesheet(), // Child theme.
];
// Bail out if the current theme or its parent is not updating.
if ( empty( array_intersect( $hook_extra['themes'], $themes ) ) ) {
return;
}
rocket_clean_domain();
}
add_action( 'upgrader_process_complete', 'rocket_clean_cache_theme_update', 10, 2 ); // When a theme is updated.
/**
* Purge WP Rocket cache on Slug / Permalink change.
*
* @since 3.4.2
*
* @param int $post_id The post ID.
* @param array $post_data Array of unslashed post data.
*/
function rocket_clean_post_cache_on_slug_change( $post_id, $post_data ) {
// Bail out if the post status is draft, pending or auto-draft.
if ( in_array( get_post_field( 'post_status', $post_id ), [ 'draft', 'pending', 'auto-draft' ], true ) ) {
return;
}
$post_name = get_post_field( 'post_name', $post_id );
// Bail out if the slug hasn't changed.
if ( $post_name === $post_data['post_name'] ) {
return;
}
// Bail out if the old slug has changed, but is empty.
if ( empty( $post_name ) ) {
return;
}
rocket_clean_files( get_the_permalink( $post_id ) );
}
add_action( 'pre_post_update', 'rocket_clean_post_cache_on_slug_change', PHP_INT_MAX, 2 );
راهاندازی بازار قرادادهای آتی برای فرآوردههای نفتی در بورس انرژی - اکوفاین | مدیریتی ، مالی ، اقتصادی
راهاندازی بازار قرادادهای آتی برای فرآوردههای نفتی در بورس انرژی
اکوفاین
مدیر عامل بورس انرژی گفت: راه اندازی بازار قرادادهای آتی برای فرآورده های نفتی از چند سال گذشته در دستور کار بورس انرژی بود، دستورالعمل های مربوط، آماده و به سازمان بورس و اوراق بهادار ارسال شد که هفته گذشته دستورالعمل راه اندازی بازار آتی بورس انرژی به تصویب رسید.
علی نقوی افزود: در نخستین مرحله درخواست کالاهایی مانند بنزین، متانول، میعانات گازی و نفتا را به هیات پذیرش ارسال کرده ایم و قصد داریم تا قراداد آتی را در این چهار محصول آغاز کنیم و در ادامه سایر فرآورده های نفتی به معاملات خود اضافه خواهیم کرد.