Shipping_Returns_Page::get_post_candidates( bool $include_uninstalled = false )

Summary

Find all the posts that meet the criteria (e.g., post type, content) to become this required page.


Description

Since the content of the page is freeform (i.e., not using a shortcode), it can match any page.


Parameters

$include_uninstalled

(bool) (Optional) Not used in this implementation

Default value: false


Return

(int[]) Post IDs of potential posts


Source

File: src/BigCommerce/Pages/Shipping_Returns_Page.php

	public function get_post_candidates( $include_uninstalled = false ) {
		/** @var \wpdb $wpdb */
		global $wpdb;
		$post_ids     = $wpdb->get_col( $wpdb->prepare(
			"SELECT ID FROM {$wpdb->posts} WHERE post_type=%s AND post_status='publish'",
			$this->get_post_type()
		) );

		$post_ids = array_map( 'intval', $post_ids );

		/**
		 * Filters pages matching page candidates.
		 *
		 * @param array  $post_ids Post ids.
		 * @param string $name     Name.
		 */
		$post_ids = (array) apply_filters( 'bigcommerce/pages/matching_page_candidates', $post_ids, static::NAME );

		return $post_ids;
	}


User Contributed Notes

You must log in before being able to contribute a note or feedback.