Plugin Directory

Changeset 2464026


Ignore:
Timestamp:
01/28/2021 05:17:21 AM (5 years ago)
Author:
bingewith
Message:

adding resources post type to supported resources

Location:
bingewith/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bingewith/trunk/bingewith.php

    r2368276 r2464026  
    33// Plugin URI: https://bingewith.com
    44// Description: Add audio to your blog posts. This plugin takes the text of the blogs and creates audio for each individual blog posts. This works both on the individual blog post pages and the blog homepage. The audio player is placed at the top of every post.
    5 // Version: 1.10
     5// Version: 1.11
    66// Author: BingeWith
    77// Author URI: https://profiles.wordpress.org/bingewith/
     
    5858              </script>');
    5959 */
     60if (!function_exists("bingewith_hook_post_type_is_valid")) {
     61  function bingewith_hook_post_type_is_valid($hook_post_type) {
     62    if ($hook_post_type == "post") {
     63      return true;
     64    }
     65    if ($hook_post_type == "resources") {
     66      return true;
     67    }
     68    return false;
     69  }
     70}
    6071// Handles the placement of iframes on posts.
    6172if (!function_exists("bingewith_post_hook")) {
    6273
    6374    function bingewith_post_hook($content) {
    64         if (!is_page() && get_post() && get_post_type() == "post") {
     75        if (!is_page() && get_post() && bingewith_hook_post_type_is_valid(get_post_type())) {
    6576            // Add our iframe to the page if it is a post.
    6677            // Get the permalink to the post, the iframe needs it.
  • bingewith/trunk/readme.txt

    r2463342 r2464026  
    55Tested up to: 5.6
    66Requires PHP: 5.2.4
    7 Stable tag: 1.10
     7Stable tag: 1.11
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    2727
    2828== Changelog ==
     29
     30= 1.11 =
     31Adding resources post type to the supported post types
    2932
    3033= 1.10 =
Note: See TracChangeset for help on using the changeset viewer.