true, ], 'objects' ); /** * Filters the post type on submitbox. * * @since 3.12.1 * * @param array $cpts Post Types. */ $cpts = apply_filters( 'rocket_submitbox_options_post_types', $cpts ); if ( isset( $cpts[ $post->post_type ] ) ) { $url = wp_nonce_url( admin_url( 'admin-post.php?action=purge_cache&type=post-' . $post->ID ), 'purge_cache_post-' . $post->ID ); printf( '
%s
', esc_url( $url ), esc_html__( 'Clear cache', 'rocket' ) ); } } } add_action( 'post_submitbox_start', 'rocket_post_submitbox_start' );