admin-posts.php 1.8 KB

123456789101112131415161718192021222324
  1. <div class="fl-builder-admin">
  2. <?php if ( FLBuilderUserAccess::current_user_can( 'builder_access' ) ) : ?>
  3. <div class="fl-builder-admin-tabs">
  4. <a href="javascript:void(0);" onclick="return false;" class="fl-enable-editor<?php if ( ! $enabled ) { echo ' fl-active';} ?>"><?php _e( 'Text Editor', 'fl-builder' ); ?></a>
  5. <a href="javascript:void(0);" onclick="return false;" class="fl-enable-builder<?php if ( $enabled ) { echo ' fl-active';} ?>"><?php echo FLBuilderModel::get_branding(); ?></a>
  6. </div>
  7. <?php endif; ?>
  8. <div class="fl-builder-admin-ui">
  9. <h3><?php printf( _x( '%1$s is currently active for this %2$s.', 'The first %s stands for custom branded "Page Builder" name. The second %s stands for the post type name.', 'fl-builder' ), FLBuilderModel::get_branding(), $post_type_name ); ?></h3>
  10. <?php if ( FLBuilderUserAccess::current_user_can( 'builder_access' ) ) : ?>
  11. <a href="<?php echo FLBuilderModel::get_edit_url(); ?>" class="fl-launch-builder button button-primary button-large"><?php printf( _x( 'Launch %s', '%s stands for custom branded "Page Builder" name.', 'fl-builder' ), FLBuilderModel::get_branding() ); ?></a>
  12. <?php else : ?>
  13. <a href="<?php echo get_permalink(); ?>" class="button button-large"><?php printf( _x( 'View %s', '%s stands the post type name.', 'fl-builder' ), $post_type_name ); ?></a>
  14. <?php endif; ?>
  15. </div>
  16. <div class="fl-builder-loading"></div>
  17. </div>
  18. <script type="text/javascript">
  19. FLBuilderAdminPostsStrings = {
  20. switchToEditor: "<?php printf( esc_attr_x( 'Switching to Text Editor mode will disable your %1$s layout until it is enabled again. Any edits made while in Text Editor mode will not be made on your %1$s layout. Do you want to continue?', '%s stands for custom branded \"Page Builder\" name.', 'fl-builder' ), FLBuilderModel::get_branding() ); ?>"
  21. };
  22. </script>