get_all_campaign_ids( $campaign_id ); } /** * Returns the list of all IDs that belong under this campaign's umbrella. * * @param int $campaign_id * @return array * @since alpha-0.1 */ private function get_all_campaign_ids( $campaign_id ) { global $sitepress; $trid = $sitepress->get_element_trid($campaign_id, 'post_download'); return wp_list_pluck( $sitepress->get_element_translations($trid, 'post_download'), 'element_id' );; } /** * Returns the list of IDs of all children campaigns. * * @global $wpdb; * @param int $parent_id * @return array * @since alpha-0.1 * @deprecated */ private function get_merged_campaign_ids( $parent_id ) { global $wpdb; return array_merge( array( $parent_id ), $wpdb->get_col( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_icl_lang_duplicate_of' AND meta_value = %d;", $parent_id ) ) ); } }