\__( 'By enabling this option, checks for embed providers are made via JavaScript on the client-side rather than on your server. Enabling this option is recommended when using a caching plugin.', 'embed-privacy' ), 'name' => 'embed_privacy_javascript_detection', 'option_type' => 'option', 'title' => \__( 'JavaScript detection for active providers', 'embed-privacy' ), 'type' => 'checkbox', ] ); \register_setting( 'embed_privacy', 'embed_privacy_javascript_detection' ); \add_settings_field( 'embed_privacy_local_tweets', \__( 'Embeds', 'embed-privacy' ), [ Field::class, 'get' ], 'embed_privacy', 'embed_privacy_general', [ 'description' => \__( 'By enabling this option, tweets are embedded locally as text without any connection to Twitter, 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', null, [ 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', null, [ 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' ] ); } }