get_sources(); if ( ! empty( $sources ) ) { echo ''; } } /** * Renders a channel selector. */ public static function channel_selector() { $data_class = new WPPFM_Data(); $channels = $data_class->get_channels(); if ( ! empty( $channels ) ) { echo '
'; } else { echo esc_html__( 'You first need to install a channel before you can add a feed. Open the Manage Channels page and install at least one channel.', 'wp-product-feed-manager' ); } } /** * Renders a feed type selector. * * @since 2.38.0. */ public static function feed_type_selector( $preselected ) { $data_class = new WPPFM_Data(); $feed_types = $data_class->get_google_support_feed_types(); if ( ! empty( $feed_types ) ) { echo ' '; } } /** * Renders a feed business type selector. */ public static function feed_business_type_selector() { $business_types = array( 'Education', 'Flights', 'Hotels and rentals', 'Jobs', 'Local deals', 'Real estate', 'Travel', 'Custom' ); echo ''; } /** * Renders a country selector. */ public static function country_selector() { $data_class = new WPPFM_Data(); $countries = $data_class->get_countries(); if ( ! empty( $countries ) ) { echo ''; } } /** * Renders a schedule selector. */ public static function schedule_selector() { echo '' . esc_html__( 'Every', 'wp-product-feed-manager' ) . ' ' . esc_html__( 'day(s) at', 'wp-product-feed-manager' ) . ' ' . esc_html__( 'for', 'wp-product-feed-manager' ) . ' ' . esc_html__( 'time(s) a day', 'wp-product-feed-manager' ) . ' '; } /** * Renders an aggregation selector. */ public static function aggregation_selector() { echo ''; } /** * Renders a product variation selector. */ public static function product_variation_selector() { echo ''; } /** * Renders a Google feed title selector. */ public static function google_feed_title_selector() { echo ''; } /** * Renders a Google feed description selector. */ public static function google_feed_description_selector() { echo ''; } /** * Renders a Google Analytics selector. */ public static function google_analytics_selector() { echo ''; } /** * Renders the performance prioritizing selector and inline help link. * * @since 3.21.0 */ public static function performance_enabled_selector() { echo ' ( ' . esc_html__( 'read this article on how to use performance prioritizing', 'wp-product-feed-manager' ) . ' )'; } /** * Creates the HTML code with a list of 24 hours to be used in an hour selector. * * @return string option list with 24 hours in options. */ private static function hour_list() { $html = self::get_time_list(); // First ten hours. for ( $i = 10; $i < 24; $i ++ ) { $html .= ''; } return $html; } /** * Creates the HTML code with a list of 60 minutes to be used in a minute selector. * * @return string option list with 60 minutes in options. */ private static function minutes_list() { $html = self::get_time_list(); // First ten minutes. for ( $i = 10; $i < MINUTE_IN_SECONDS; $i ++ ) { $html .= ''; } return $html; } /** * Creates the HTML code for a list with feed update frequencies, to be used in a frequency selector. * * @return string with specific frequency options. */ private static function frequency_list() { $html_code = ''; $html_code .= ''; $html_code .= ''; $html_code .= ''; $html_code .= ''; $html_code .= ''; $html_code .= ''; return $html_code; } /** * Creates the HTML code with a list of 00 to 09 option selectors. * * @return string with the option selectors. */ private static function get_time_list() { $html_code = ''; $html_code .= ''; $html_code .= ''; $html_code .= ''; $html_code .= ''; $html_code .= ''; $html_code .= ''; $html_code .= ''; $html_code .= ''; $html_code .= ''; return $html_code; } } // end of WPPFM_Feed_Form_Control class endif;