\__( 'By enabling this option, ActivityPub posts are embedded locally as text without any connection to the particular ActivityPub server, and no privacy overlay is required.', 'embed-privacy' ), 'name' => 'embed_privacy_local_activitypub_posts', 'option_type' => 'option', 'title' => \__( 'Local ActivityPub posts', 'embed-privacy' ), 'type' => 'checkbox', ] ); \register_setting( 'embed_privacy', 'embed_privacy_local_activitypub_posts' ); \add_settings_field( 'embed_privacy_local_tweets', \__return_empty_string(), [ Field::class, 'get' ], 'embed_privacy', 'embed_privacy_general', [ 'description' => \__( 'By enabling this option, tweets are embedded locally as text without any connection to X, and no privacy overlay is required.', 'embed-privacy' ), 'name' => 'embed_privacy_local_tweets', 'option_type' => 'option', 'title' => \__( 'Local tweets', 'embed-privacy' ), 'type' => 'checkbox', ] ); \register_setting( 'embed_privacy', 'embed_privacy_local_tweets' ); \add_settings_field( 'embed_privacy_disable_link', \__return_empty_string(), [ Field::class, 'get' ], 'embed_privacy', 'embed_privacy_general', [ 'description' => \__( 'Disable the direct link on the lower right corner that opens the embed directly.', 'embed-privacy' ), 'name' => 'embed_privacy_disable_link', 'option_type' => 'option', 'title' => \__( 'Disable direct link', 'embed-privacy' ), 'type' => 'checkbox', ] ); \register_setting( 'embed_privacy', 'embed_privacy_disable_link' ); \add_settings_field( 'embed_privacy_download_thumbnails', \__return_empty_string(), [ Field::class, 'get' ], 'embed_privacy', 'embed_privacy_general', [ /* translators: list of supported embed providers */ 'description' => \wp_sprintf( \__( 'Try to automatically download thumbnails of the embedded content and use them as background image of the overlay. Currently supported: %l.', 'embed-privacy' ), Embed_Privacy::get_instance()->thumbnail->get_provider_titles() ), 'name' => 'embed_privacy_download_thumbnails', 'option_type' => 'option', 'title' => \__( 'Download thumbnails', 'embed-privacy' ), 'type' => 'checkbox', ] ); \register_setting( 'embed_privacy', 'embed_privacy_download_thumbnails' ); \add_settings_field( 'embed_privacy_preserve_data_on_uninstall', \__( 'Data handling', 'embed-privacy' ), [ Field::class, 'get' ], 'embed_privacy', 'embed_privacy_general', [ 'description' => \__( 'By enabling this option, all plugin data is preserved on uninstall.', 'embed-privacy' ), 'name' => 'embed_privacy_preserve_data_on_uninstall', 'option_type' => 'option', 'title' => \__( 'Preserve data on uninstall', 'embed-privacy' ), 'type' => 'checkbox', ] ); \register_setting( 'embed_privacy', 'embed_privacy_preserve_data_on_uninstall' ); } /** * Register menu items. */ public static function register_menu() { \add_submenu_page( 'options-general.php', \__( 'Embed Privacy', 'embed-privacy' ), \__( 'Embed Privacy', 'embed-privacy' ), self::CAPABILITY, 'embed_privacy', [ self::class, 'get_page' ] ); } }