Skip to content

Commit

Permalink
Use singular checks, not single (post/page), to catch all custom post…
Browse files Browse the repository at this point in the history
… types
  • Loading branch information
ramiy committed Dec 4, 2017
1 parent b08873b commit 2fcde68
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 7 additions & 7 deletions inc/class-spotim-frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ public function __construct( $options ) {
public static function has_spotim_comments() {
global $post;

// Bail if it's not a single template
if ( ! ( is_single() || is_page() ) )
// Bail if it's not a singular template
if ( ! is_singular() )
return false;

// Bail if comments are closed
Expand Down Expand Up @@ -249,8 +249,8 @@ public static function filter_comments_number( $count ) {
public static function has_spotim_questions() {
global $post;

// Bail if it's not a single template
if ( ! ( is_single() || is_page() ) )
// Bail if it's not a singular template
if ( ! is_singular() )
return false;

// Bail if comments are closed
Expand Down Expand Up @@ -283,8 +283,8 @@ public static function has_spotim_questions() {
public static function has_spotim_recirculation() {
global $post;

// Bail if it's not a single template
if ( ! ( is_single() || is_page() ) )
// Bail if it's not a singular template
if ( ! is_singular() )
return false;

// Bail if comments are closed
Expand Down Expand Up @@ -388,7 +388,7 @@ public static function add_spotim_newsfeed() {
*/
public static function open_graph_tags() {

// Bail if it's not a single template
// Bail if it's not a singular template
if ( ! is_singular() )
return;

Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ You are also always more than welcome to contact our team at [email protected]. We
* Update all embed codes using the new launcher script.
* Update wrong ID used in "enale_seo" field.
* Seperate the Spot.IM NewsFeed from Spot.IM Comments.
* Better CPT support with improved checks for singular pages.
* Fix Manual Sync to display error log only when error messages are not empty.
* Fix Auto Sync when validating cron to check against all registered schedules, not only WordPress default schedules.
* Remove default value of deprecated "plugin_secret" field.
Expand Down

0 comments on commit 2fcde68

Please sign in to comment.