Player Logic

Player Logic – Conditional Code For Video Player
This feature allows admin to control the appearance of video player using a condition (PHP) code or a shortcode. An alternative content will appear to replace the video player until the conditional code returns true.
In order to use this feature, follow these steps:
  • Step 1: Go to Posts > Add new/Edit post > Player Logic
  • Step 2: Enter shortcode ( for example: [my_shortcode][player][/my_shortcode], [player] is required]) or condition function (ex: is_user_logged_in() ) to control video player visibility in Player logic. Content in Alternative Content field will appear when the condition function return false
      [my_shortcode][player][/my_shortcode] ([player] is required)
      You can use shortcode from a third-party plugin to protect the content with the specific conditions.
      For example:

      • Using Social Locker plugin shortcode to lock player behind a set of social buttons until the visitor likes, shares, +1s or tweets your page
        Syntax in Back-end

        Social Locker locks on Video Player
      You can use a Conditional Tag to control video player visibility, when the condition function return true, then visitors can see video player, or else the Alternative Content would be showed up
      For example:  is_user_logged_in() is a condition function to check if user is logged in, then the video player can be showed, or else visitors would receive “(Demo for Player Logic) This content is hidden. You need to login to see the player.” message

      Syntax in Back-end

      Alternative content in Front end
  • Step 3: Save