'publish' ] ); // Legacy for Facebook Status if ( 'facebook' === $type && empty( $options['facebook'] ) ){ $options['facebook'] = Tribe__Settings_Manager::get_option( 'fb_default_status', 'publish' ); } // A way to handle the legacy `imported_post_status` if ( is_string( $options ) ) { $options = [ $type => $options ]; } if ( ! isset( $options[ $type ] ) ) { $options[ $type ] = apply_filters( 'tribe_import_default_post_status_non_saved', 'publish', $type ); } /** * Allows users to filter */ return apply_filters( 'tribe_import_default_post_status', $options[ $type ], $type ); } /** * Dropdown Options for Imported Event Status * * @return mixed|void */ public static function get_possible_stati() { $stati = [ 'publish' => __( 'Published', 'the-events-calendar' ), 'pending' => __( 'Pending', 'the-events-calendar' ), 'draft' => __( 'Draft', 'the-events-calendar' ), ]; return apply_filters( 'tribe_import_possible_stati', $stati ); } /** * Return Encoding Status * * @param string $type importer type * * @return mixed|void */ public static function get_default_encoding_status( $type = 'csv' ) { $options = self::getOption( 'imported_encoding_status', [ $type => 'encode' ] ); if ( ! isset( $options[ $type ] ) ) { /** * Filter Encode Status if none saved * * @since 4.2 * * @param string encode status of encoding * @param string $type importer type */ $options[ $type ] = apply_filters( 'tribe_import_default_encode_status_non_saved', 'encode', $type ); } /** * Filter Encode Status * * @since 4.2 * * @param array $options[ $type ] importer type option array * @param string $type importer type */ return apply_filters( 'tribe_import_default_encode_status', $options[ $type ], $type ); } /** * Dropdown Options for Encoding Status * * @return mixed|void */ public static function get_encoding_status() { $status = [ 'encode' => __( 'Encode contents', 'the-events-calendar' ), 'none' => __( 'Do Not Encode Contents', 'the-events-calendar' ), ]; /** * Filter Encoding Dropdown Options * * @since 4.2 * * @param array $status an array of options for encoding status */ return apply_filters( 'tribe_import_encoding_status', $status ); } }