{% if admin.hasRoute('sync-wp') %}
    {% set confirmText = 'confirm_sync-wp'|trans({}, 'SonataAdminBundle') %}

    <a href="{{ admin.generateObjectUrl('sync-wp', object) }}" class="btn btn-sm btn-default sync-wp_link"
       title="{{ 'action_sync-wp'|trans({}, 'SonataAdminBundle') }}"
       onclick="return confirm('{{- confirmText -}}')"
    >
        <i class="fa fa-refresh" aria-hidden="true"></i>
        {{ 'action_sync-wp'|trans({}, 'SonataAdminBundle') }}
    </a>
{% endif %}
