Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Came here to request the same. I am trying to add square-gitlab but it requires FontAwesome 6.

    Thread Starter mattsch

    (@mattsch)

    Thanks for checking.

    Is this (JS initialization issue) a bug in the player? Could you give me a pointer where to start digging?

    Thanks.

    Thread Starter mattsch

    (@mattsch)

    I am not using any plugin. It is the default media player that is included with WordPress. I used the “Create Video Playlist” option when adding media to the post. It translates to the [playlist] tag. Interestingly, adding the videos one by one (not as a playlist) works fine.

    Thread Starter mattsch

    (@mattsch)

    See here: https://mattsch.com/projects/ (click on the fourth thumbnail)

    Thread Starter mattsch

    (@mattsch)

    Hello,

    Sorry, you are right.

    I echo the content with apply_filters('the_content', get_the_content()) to maintain formatting.

    Do you know why your plugin affects the media player functionality in this case?

    Thanks.

    Hello,

    Yes. This is because the theme (re-)creates the comment form, therefore any changes by WordPress will not be seen. The only reason seems to be that the theme adds the placeholder attribute to the input fields, because the label is hidden. Hopefully, the author of the theme will update this soon.

    For now, I have fixed it myself manually as follows. You can do this yourself under Appearance -> Editor and selecting the theme. I suggest do use a child theme.

    • comment out lines 89-100 in Hemingway’s Comments.php file
    • in my child theme’s functions.php I added the following code to add the placeholder attribute to author and email (I hide the URL field, but it is easy to do it for that as well):
      function addPlaceholderName($field) {
          return addPlaceholder($field, __('Name','Hemingway'));
      }
      
      function addPlaceholderEmail($field) {
          return addPlaceholder($field, __('Email','Hemingway'));
      }
      
      function addPlaceholder($field, $text) {
          $position = strpos($field, 'value="');
          $newField = substr_replace($field, 'placeholder="' . $text . '"', $position, 0);
      
          return $newField;
      }
      
      add_filter('comment_form_field_author', 'addPlaceholderName');
      add_filter('comment_form_field_email', 'addPlaceholderEmail');
    • now the checkbox should appear, but not the label for it. Therefore, add the following to your style.css:
      p.comment-form-cookies-consent label {
          display: inline !important;
          margin-left: 0.5em;
          vertical-align: -1px;
      }

    Hope this helps.

    • This reply was modified 6 years, 10 months ago by mattsch.
    • This reply was modified 6 years, 10 months ago by mattsch.
    • This reply was modified 6 years, 10 months ago by mattsch. Reason: improved code reuse
Viewing 6 replies - 1 through 6 (of 6 total)