WordPress.org

Making WordPress.org

Opened 19 months ago

Last modified 2 weeks ago

#3309 assigned defect

Feed shows posts while in 'Coming soon' mode

Reported by: casiepa Owned by:
Milestone: Priority: normal
Component: WordCamp Site & Plugins Keywords:
Cc:

Description

Belfast has 'coming soon Mode ON' (see https://2018.belfast.wordcamp.org/) as it's about to happen in May next year, but the feed on https://2018.belfast.wordcamp.org/feed/ is suddenly displaying posts thanking the sponsors...

Feed should probably not show anything as long as 'coming soon' mode is ON ?

Change History (12)

#1 @casiepa
19 months ago

@coreymckrill referred to this change just performed, but I don't see why it would have an impact: https://meta.trac.wordpress.org/changeset/6226

#2 @RMarks
19 months ago

Although feeds we discussed in #2934, it wasn't addressed. Just these two:

In [5801]:
WordCamp Coming Soon: Disable JP OpenGraph when Coming Soon enabled

In [6226]:
WordCamp Coming Soon: Disable anonymous REST requests in Coming Soon mode

Version 0, edited 19 months ago by RMarks (next)

#3 @RMarks
19 months ago

I just read the comments in Slack. I know when working on #2934, feeds were revealing content prior to either of my patches being applied.

#4 @casiepa
19 months ago

@RMarks ok, thanks for the update.

I suppose something like this could somewhere be added when going into Coming Soon mode:

add_action( 'init', 'coming_soon_remove_feeds', 99 );
function coming_soon_remove_feeds() {
	// Disable all feeds
	foreach( array( '', '_rdf', '_rss', '_rss2', '_atom', '_rss2_comments', '_atom_comments' ) as $feed ) {
		add_action( 'do_feed' . $feed, 'coming_soon_remove_feeds_error', 1);
	}
	// Show message
	function coming_soon_remove_feeds_error() {
		wp_die( __( 'Feeds are not available while the site is in Coming Soon mode.', 'wordcamporg' ),
			'Coming Soon mode ON',
			403
		);
	}

	// Remove <link rel="alternate" type="application/rss+xml" title="WordCamp &raquo; Feed" href="https://2018.xyz.wordcamp.org/feed/" />
	remove_action( 'wp_head', 'feed_links', 2 );

	// Remove <link rel="alternate" type="application/rss+xml" title="WordCamp &raquo; Comments Feed" href="https://2018.xyz.wordcamp.org/comments/feed/" />
	remove_action( 'wp_head', 'feed_links_extra', 3 );

	// ??? It might be needed to flush the rewrite rules : flush_rewrite_rules();
}

This ticket was mentioned in Slack in #meta-wordcamp by casiepa. View the logs.


19 months ago

This ticket was mentioned in Slack in #meta-wordcamp by casiepa. View the logs.


19 months ago

This ticket was mentioned in Slack in #meta-wordcamp by rmarks. View the logs.


19 months ago

This ticket was mentioned in Slack in #meta-wordcamp by coreymckrill. View the logs.


18 months ago

#9 @coreymckrill
18 months ago

  • Owner set to casiepa
  • Status changed from new to assigned

This ticket was mentioned in Slack in #community-events by casiepa. View the logs.


2 weeks ago

#11 @casiepa
2 weeks ago

  • Owner casiepa deleted
Note: See TracTickets for help on using tickets.