diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/LICENSE b/wp-content/upgrade-temp-backup/plugins/activitypub/LICENSE new file mode 100644 index 00000000..644800f2 --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2019 Matthias Pfefferle +Copyright (c) 2023 Automattic + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/activitypub.php b/wp-content/upgrade-temp-backup/plugins/activitypub/activitypub.php new file mode 100644 index 00000000..100f29ff --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/activitypub.php @@ -0,0 +1,182 @@ +register_routes(); + ( new Rest\Actors_Inbox_Controller() )->register_routes(); + ( new Rest\Admin\Actions_Controller() )->register_routes(); + ( new Rest\Admin\Statistics_Controller() )->register_routes(); + ( new Rest\Application_Controller() )->register_routes(); + ( new Rest\Stats_Image_Controller() )->register_routes(); + ( new Rest\Collections_Controller() )->register_routes(); + ( new Rest\Comments_Controller() )->register_routes(); + ( new Rest\Followers_Controller() )->register_routes(); + ( new Rest\Following_Controller() )->register_routes(); + ( new Rest\Liked_Controller() )->register_routes(); + ( new Rest\Inbox_Controller() )->register_routes(); + ( new Rest\Interaction_Controller() )->register_routes(); + ( new Rest\Moderators_Controller() )->register_routes(); + if ( \get_option( 'activitypub_api', false ) ) { + ( new Rest\OAuth\Authorization_Controller() )->register_routes(); + ( new Rest\OAuth\Clients_Controller() )->register_routes(); + ( new Rest\OAuth\Token_Controller() )->register_routes(); + } + ( new Rest\Outbox_Controller() )->register_routes(); + ( new Rest\Post_Controller() )->register_routes(); + ( new Rest\Replies_Controller() )->register_routes(); + ( new Rest\Webfinger_Controller() )->register_routes(); + + // Load NodeInfo endpoints only if blog is public. + if ( is_blog_public() ) { + ( new Rest\Nodeinfo_Controller() )->register_routes(); + } + ( new Rest\Proxy_Controller() )->register_routes(); +} +\add_action( 'rest_api_init', __NAMESPACE__ . '\rest_init' ); + +/** + * Initialize plugin. + */ +function plugin_init() { + \add_action( 'init', array( __NAMESPACE__ . '\Activitypub', 'init' ) ); + \add_action( 'init', array( __NAMESPACE__ . '\Avatars', 'init' ) ); + \add_action( 'init', array( __NAMESPACE__ . '\Cache', 'init' ) ); + \add_action( 'init', array( __NAMESPACE__ . '\Comment', 'init' ) ); + \add_action( 'init', array( __NAMESPACE__ . '\Dispatcher', 'init' ) ); + \add_action( 'init', array( __NAMESPACE__ . '\Embed', 'init' ) ); + if ( \get_option( 'activitypub_api', false ) ) { + \add_action( 'init', array( __NAMESPACE__ . '\Event_Stream', 'init' ) ); + } + \add_action( 'init', array( __NAMESPACE__ . '\Handler', 'init' ) ); + \add_action( 'init', array( __NAMESPACE__ . '\Hashtag', 'init' ) ); + \add_action( 'init', array( __NAMESPACE__ . '\Link', 'init' ) ); + \add_action( 'init', array( __NAMESPACE__ . '\Mailer', 'init' ) ); + \add_action( 'init', array( __NAMESPACE__ . '\Mention', 'init' ) ); + \add_action( 'init', array( __NAMESPACE__ . '\Migration', 'init' ), 1 ); + \add_action( 'init', array( __NAMESPACE__ . '\Move', 'init' ) ); + \add_action( 'init', array( __NAMESPACE__ . '\Options', 'init' ) ); + \add_action( 'init', array( __NAMESPACE__ . '\Post_Types', 'init' ) ); + \add_action( 'init', array( __NAMESPACE__ . '\Router', 'init' ) ); + // Priority 0 ensures Scheduler hooks are registered before Migration (priority 1) runs. + \add_action( 'init', array( __NAMESPACE__ . '\Scheduler', 'init' ), 0 ); + \add_action( 'init', array( __NAMESPACE__ . '\Search', 'init' ) ); + \add_action( 'init', array( __NAMESPACE__ . '\Signature', 'init' ) ); + // Only load OAuth Server if the ActivityPub API is enabled. + if ( \get_option( 'activitypub_api', false ) ) { + \add_action( 'init', array( __NAMESPACE__ . '\OAuth\Server', 'init' ) ); + } + + if ( site_supports_blocks() ) { + \add_action( 'init', array( __NAMESPACE__ . '\Blocks', 'init' ) ); + } + + // Only load relay if relay mode is enabled. + if ( \get_option( 'activitypub_relay_mode', false ) ) { + \add_action( 'init', array( __NAMESPACE__ . '\Relay', 'init' ) ); + } + + // Load development tools. + if ( 'local' === wp_get_environment_type() ) { + $loader_file = __DIR__ . '/local/load.php'; + if ( \file_exists( $loader_file ) && \is_readable( $loader_file ) ) { + require_once $loader_file; + } + } +} +\add_action( 'plugins_loaded', __NAMESPACE__ . '\plugin_init' ); + +/** + * Initialize plugin admin. + */ +function plugin_admin_init() { + // Screen Options and Menus are set before `admin_init`. + \add_action( 'init', array( __NAMESPACE__ . '\WP_Admin\Heartbeat', 'init' ), 9 ); // Before script loader. + \add_filter( 'init', array( __NAMESPACE__ . '\WP_Admin\Screen_Options', 'init' ) ); + \add_action( 'init', array( __NAMESPACE__ . '\WP_Admin\Menu', 'init' ) ); + + \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\Admin', 'init' ) ); + \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\Advanced_Settings_Fields', 'init' ) ); + \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\App', 'init' ), 0 ); // Before admin bar init. + \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\Blog_Settings_Fields', 'init' ) ); + \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\Health_Check', 'init' ) ); + \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\Settings', 'init' ) ); + \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\Settings_Fields', 'init' ) ); + \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\Dashboard', 'init' ) ); + \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\User_Settings_Fields', 'init' ) ); + \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\Welcome_Fields', 'init' ) ); + + if ( defined( 'WP_LOAD_IMPORTERS' ) && WP_LOAD_IMPORTERS ) { + require_once __DIR__ . '/includes/wp-admin/import/load.php'; + \add_action( 'admin_init', __NAMESPACE__ . '\WP_Admin\Import\load' ); + } +} +\add_action( 'plugins_loaded', __NAMESPACE__ . '\plugin_admin_init' ); + +/** + * Redirect to the welcome page after plugin activation. + * + * @param string $plugin The plugin basename. + */ +function activation_redirect( $plugin ) { + if ( ACTIVITYPUB_PLUGIN_BASENAME === $plugin ) { + \wp_safe_redirect( \admin_url( 'options-general.php?page=activitypub' ) ); + exit; + } +} +\add_action( 'activated_plugin', __NAMESPACE__ . '\activation_redirect' ); + +// Check for CLI env, to add the CLI commands. +if ( defined( 'WP_CLI' ) && WP_CLI ) { + Cli::register(); +} + +// Register OAuth login form handler early (before wp-login.php processes). +\add_action( 'login_form_activitypub_authorize', array( __NAMESPACE__ . '\OAuth\Server', 'login_form_authorize' ) ); diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-admin-bar.css b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-admin-bar.css new file mode 100644 index 00000000..689969bb --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-admin-bar.css @@ -0,0 +1,7 @@ +/* Admin Bar Social Web Icon */ +#wpadminbar .activitypub-admin-bar-social-web .ab-item::before { + content: "\2042"; /* ⁂ Asterism */ + font-family: Arial, Helvetica, sans-serif; + font-weight: 700; + top: 2px; +} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-admin.css b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-admin.css new file mode 100644 index 00000000..225b95bb --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-admin.css @@ -0,0 +1,414 @@ +.activitypub-settings { + max-width: 800px; + margin: 0 auto; + position: relative; +} + +.settings_page_activitypub div:not(.wrap) > .notice { + max-width: 800px; + margin: 0 auto 30px; +} + +.settings_page_activitypub div:not(.wrap) > .update-nag { + margin: 25px 20px 15px 22px; +} + +.settings_page_activitypub .wrap { + padding-left: 22px; +} + +.activitypub-settings p.interactions { + margin-bottom: 1em; +} + +.activitypub-settings-header { + text-align: center; + margin: 0 0 1rem; + background: #fff; + border-bottom: 1px solid #dcdcde; +} + +.activitypub-settings-header h1 { + display: inline-block; + font-weight: 600; + margin: 0 0.8rem 1rem; + font-size: 23px; + padding: 9px 0 4px; + line-height: 1.3; +} + +.activitypub-settings-title-section { + display: flex; + align-items: center; + justify-content: center; + clear: both; + padding-top: 8px; +} + +.settings_page_activitypub #wpcontent { + padding-left: 0; +} + +.activitypub-settings-tabs-scroller { + overflow-x: auto; + width: 100%; + padding-top: 2px; + -webkit-overflow-scrolling: touch; + scroll-behavior: smooth; +} + +.activitypub-settings-tabs-wrapper { + display: inline-flex; + vertical-align: top; + flex-wrap: nowrap; + gap: 0; +} + +.activitypub-settings-tab.active { + box-shadow: inset 0 -3px #3582c4; + font-weight: 600; +} + +.activitypub-settings-tab { + display: block; + text-decoration: none; + color: inherit; + padding: 0.5rem 1rem 1rem; + margin: 0 1rem; + transition: box-shadow 0.5s ease-in-out; + white-space: nowrap; +} + +.activitypub-settings .row { + margin-bottom: 16px; +} + +.activitypub-settings .row > div { + max-width: calc(100% - 24px); + display: inline-flex; + flex-direction: column; +} + +.activitypub-settings .row .description { + margin-top: 0; +} + +.wp-header-end { + visibility: hidden; + margin: -2px 0 0; +} + +summary { + cursor: pointer; + text-decoration: underline; + color: #2271b1; +} + +.activitypub-site-block-details { + margin: 10px 0; +} + +.activitypub-site-block-details summary { + padding: 8px 0; + color: inherit; + text-decoration: none; +} + +.activitypub-site-block-details table { + max-width: 500px; + margin-top: 10px; +} + +.activitypub-site-block-details td:last-child { + width: 80px; +} + +.activitypub-settings-accordion { + border: 1px solid #c3c4c7; +} + +.activitypub-settings-accordion-heading { + margin: 0; + border-top: 1px solid #c3c4c7; + font-size: inherit; + line-height: inherit; + font-weight: 600; + color: inherit; +} + +.activitypub-settings-accordion-heading:first-child { + border-top: none; +} + +.activitypub-settings-accordion-panel { + margin: 0; + padding: 1em 1.5em; + background: #fff; +} + +.activitypub-settings-accordion-trigger { + background: #fff; + border: 0; + color: #2c3338; + cursor: pointer; + display: flex; + font-weight: 400; + margin: 0; + padding: 1em 3.5em 1em 1.5em; + min-height: 46px; + position: relative; + text-align: left; + width: 100%; + align-items: center; + justify-content: space-between; + -webkit-user-select: auto; + user-select: auto; +} + +.activitypub-settings-accordion-trigger .title { + pointer-events: none; + font-weight: 600; + flex-grow: 1; +} + +.activitypub-settings-accordion-trigger .icon, +.activitypub-settings-accordion-viewed .icon { + border: solid #50575e medium; + border-width: 0 2px 2px 0; + height: 0.5rem; + pointer-events: none; + position: absolute; + right: 1.5em; + top: 50%; + transform: translateY(-70%) rotate(45deg); + width: 0.5rem; +} + +.activitypub-settings-accordion-trigger[aria-expanded="true"] .icon { + transform: translateY(-30%) rotate(-135deg); +} + +table.followings .dashicons { + font-size: 1em; + line-height: 1.7; +} + +.activitypub-settings-accordion-trigger:active, +.activitypub-settings-accordion-trigger:hover { + background: #f6f7f7; +} + +.activitypub-settings-accordion-trigger:focus { + color: #1d2327; + border: none; + box-shadow: none; + outline-offset: -1px; + outline: 2px solid #2271b1; + background-color: #f6f7f7; +} + +.activitypub-settings +input.blog-user-identifier { + text-align: right; +} + +.activitypub-settings +.header-image { + width: 100%; + height: 80px; + position: relative; + display: block; + margin-bottom: 40px; + background-image: rgb(168, 165, 175); + background-image: linear-gradient(180deg, #f00, #ff0); + background-size: cover; +} + +.activitypub-settings .logo { + height: 80px; + width: 80px; + position: relative; + top: 40px; + left: 40px; +} + +.settings_page_activitypub .plugin-recommendations { + border-bottom: none; + margin-bottom: 0; +} + +/* stylelint-disable-next-line selector-id-pattern -- WordPress core ID */ +#dashboard_right_now li a.activitypub-followers::before { + content: "\f307"; + /* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */ + font-family: dashicons; +} + +.activitypub-comment .dashboard-comment-wrap { + padding-inline-start: 63px; +} + +.activitypub-comment .dashboard-comment-wrap .comment-author { + margin-block: 0; +} + +.extra-fields-nav a + a { + margin-left: 8px; +} + +.rtl .extra-fields-nav a + a { + margin-left: auto; + margin-right: 8px; +} + +.contextual-help-tabs-wrap dt { + font-weight: 600; +} + +.contextual-help-tabs-wrap .activitypub-block-screenshot { + margin: 10px 0; +} + +.contextual-help-tabs-wrap .activitypub-block-screenshot img { + border: 1px solid #ddd; + border-radius: 4px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + height: auto; + max-width: 100%; +} + +.contextual-help-tabs-wrap .activitypub-block-screenshot figcaption { + color: #555; + font-style: italic; + font-size: 0.9em; + margin-top: 5px; +} + +/* Blockquote Styles */ +.contextual-help-tabs-wrap blockquote { + border-left: 4px solid #3582c4; + background-color: #f6f7f7; + padding: 16px 20px; + margin: 0 0 20px; +} + +.contextual-help-tabs-wrap blockquote p { + margin: 0 0 10px; + line-height: 1.5; +} + +.contextual-help-tabs-wrap blockquote p:last-child { + margin-bottom: 0; +} + +.contextual-help-tabs-wrap blockquote cite { + display: block; + font-weight: 600; + margin-top: 8px; + font-size: 0.9em; + color: #50575e; +} + +.contextual-help-tabs-wrap blockquote cite::before { + content: "—"; +} + +/* Plugin List Styles */ +.plugin-list { + display: flex; + flex-wrap: wrap; + gap: 16px; + align-items: stretch; +} + +.plugin-list .plugin-card { + flex: 1 1 300px; + display: flex; + flex-direction: column; + box-sizing: border-box; + border-radius: 4px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + margin: 0; +} + +.plugin-list .plugin-card .desc { + flex: 1 1 auto; +} + +.plugin-list .plugin-action-buttons li { + display: inline-block; + vertical-align: middle; + margin: 0 0 10px 0; +} + +.plugin-list .plugin-card .action-links { + position: static; + margin-left: 148px; + width: auto; +} + +.plugin-list .plugin-action-buttons { + float: none; + margin: 1em 0 0; + text-align: left; +} + +.plugin-list .plugin-action-buttons li .button { + margin-right: 20px; +} + +.plugin-list .plugin-card h3 { + margin-right: 24px; +} + +/* stylelint-disable no-descending-specificity */ +.plugin-list .plugin-card .name, +.plugin-list .plugin-card .desc, +.plugin-card .desc > p { + margin-right: 0; +} +/* stylelint-enable no-descending-specificity */ + +.plugin-list .plugin-card .desc p:first-of-type { + margin-top: 0; +} + +/* RTL Support for blockquotes */ +.rtl .contextual-help-tabs-wrap blockquote { + border-left: none; + border-right: 4px solid #3582c4; + padding: 16px 20px; +} + +#activitypub-follow-form .highlight { + animation: highlight-fade 3s ease-in-out; + border-color: #3582c4 !important; + box-shadow: 0 0 0 1px #3582c4; +} + +@keyframes highlight-fade { + + 0% { + background-color: #e7f3ff; + border-color: #3582c4; + box-shadow: 0 0 0 1px #3582c4; + } + + 100% { + background-color: #fff; + border-color: #8c8f94; + box-shadow: none; + } +} + +@media screen and (max-width: 782px) { + + .activitypub-settings { + margin: 0 22px; + } + + .activitypub-settings .row > div { + max-width: calc(100% - 36px); + width: 100%; + } +} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-embed.css b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-embed.css new file mode 100644 index 00000000..35332029 --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-embed.css @@ -0,0 +1,157 @@ +/** + * ActivityPub embed styles. + */ + +.activitypub-embed { + background: #fff; + border: 1px solid #e6e6e6; + border-radius: 12px; + padding: 0; + max-width: 100%; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; +} + +.activitypub-reply-block .activitypub-embed { + margin: 1em 0; +} + +.activitypub-embed-header { + padding: 15px; + display: flex; + align-items: center; + gap: 10px; +} + +.activitypub-embed-header img { + width: 48px; + height: 48px; + border-radius: 50%; +} + +.activitypub-embed-header-text { + flex-grow: 1; +} + +.activitypub-embed-header-text h2 { + color: #000; + font-size: 15px; + font-weight: 600; + margin: 0; + padding: 0; +} + +.activitypub-embed-header-text .ap-account { + color: #687684; + font-size: 14px; + text-decoration: none; +} + +.activitypub-embed-content { + padding: 0 15px 15px; +} + +.activitypub-embed-content .ap-title { + font-size: 23px; + font-weight: 600; + margin: 0 0 10px; + padding: 0; + color: #000; +} + +.activitypub-embed-content .ap-subtitle { + font-size: 15px; + color: #000; + margin: 0 0 15px; +} + +.activitypub-embed-content .ap-preview { + border: 1px solid #e6e6e6; + border-radius: 8px; + box-sizing: border-box; + display: grid; + gap: 2px; + grid-template-columns: 1fr 1fr; + grid-template-rows: 1fr 1fr; + margin: 1em 0 0; + min-height: 64px; + overflow: hidden; + position: relative; + width: 100%; +} + +.activitypub-embed-content .ap-preview img { + border: 0; + box-sizing: border-box; + display: block; + height: 100%; + object-fit: cover; + overflow: hidden; + position: relative; + width: 100%; +} + +.activitypub-embed-content .ap-preview video, +.activitypub-embed-content .ap-preview audio { + max-width: 100%; + display: block; + grid-column: 1 / span 2; +} + +.activitypub-embed-content .ap-preview audio { + width: 100%; +} + +.activitypub-embed-content .ap-preview.layout-1 { + grid-template-columns: 1fr; + grid-template-rows: 1fr; +} + +.activitypub-embed-content .ap-preview.layout-2 { + aspect-ratio: auto; + grid-template-rows: 1fr; + height: auto; +} + +.activitypub-embed-content .ap-preview.layout-3 > img:first-child { + grid-row: span 2; +} + +.activitypub-embed-content .ap-preview-text { + padding: 15px; +} + +.activitypub-embed-meta { + padding: 15px; + border-top: 1px solid #e6e6e6; + color: #687684; + font-size: 13px; + display: flex; + gap: 15px; +} + +.activitypub-embed-meta .ap-stat { + display: flex; + align-items: center; + gap: 5px; +} + +@media only screen and (max-width: 399px) { + + .activitypub-embed-meta span.ap-stat { + display: none !important; + } +} + +.activitypub-embed-meta a.ap-stat { + color: inherit; + text-decoration: none; +} + +.activitypub-embed-meta strong { + font-weight: 600; + color: #000; +} + +.activitypub-embed-meta .ap-stat-label { + color: #687684; +} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-post-preview.css b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-post-preview.css new file mode 100644 index 00000000..18fb71de --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-post-preview.css @@ -0,0 +1,201 @@ +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-size: 1em; + line-height: 1.5; + margin: 0; + padding: 0; +} + +main { + flex: 1; + border: 1px solid #ccc; + border-radius: 4px; + background-color: #fff; + margin: 1em; + max-width: 600px; +} + +main p { + margin-bottom: 1em; +} + +hr { + background: transparent; + border: 0; + border-top: 1px solid #ccc; + flex: 0 0 auto; + margin: 10px 0; +} + +.columns { + display: flex; + flex-direction: row; + justify-content: space-between; + margin: 0 auto; + max-width: 1200px; +} + +.sidebar { + flex: 1; + padding: 1em; + max-width: 285px; +} + +.sidebar h1 { + font-size: 1.5em; + margin-bottom: 1em; + margin-top: 0; + padding: 5px 10px; + border-radius: 4px; + background-color: #6364ff; + color: #fff; + display: inline-block; +} + +.sidebar ul { + list-style-type: none; + padding: 0; +} + +.sidebar ul li { + padding: 5px; + color: #ccc; +} + +.sidebar input[type="search"], +.sidebar textarea { + background-color: #f6f6f6; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; + color: #333; + display: block; + font-size: 1em; + margin-bottom: 1em; + padding: 0.5em; + width: 100%; +} + +.sidebar > div, +main address { + align-items: center; + display: flex; + margin-bottom: 1em; + font-style: normal; +} + +.name { + color: #ccc; + font-weight: 700; + display: block; +} + +.webfinger { + color: #ccc; + font-size: 0.8em; + font-weight: 700; + display: block; + margin-top: 0.5em; +} + +main address .name, +main address .webfinger { + color: #000; +} + +address img, +.sidebar .fake-image { + border-radius: 8px; + margin-right: 1em; + width: 48px; + height: 48px; + background-color: #333; +} + +main article { + padding: 1em; +} + +main .content { + margin: 1em 0; + font-size: 1.2em; +} + +main .content h2 { + font-size: 1.2em; +} + +main .attachments { + border-radius: 8px; + box-sizing: border-box; + display: grid; + gap: 2px; + grid-template-columns: 1fr 1fr; + grid-template-rows: 1fr 1fr; + margin: 1em 0; + min-height: 64px; + overflow: hidden; + position: relative; + width: 100%; +} + +main .attachments.layout-1 { + grid-template-columns: 1fr; + grid-template-rows: 1fr; +} + +main .attachments.layout-2 { + aspect-ratio: auto; + grid-template-rows: 1fr; + height: auto; +} + +main .attachments img { + border: 0; + box-sizing: border-box; + display: inline-block; + height: 100%; + object-fit: cover; + overflow: hidden; + position: relative; + width: 100%; +} + +main .attachments.layout-3 > img:first-child { + grid-row: span 2; +} + +main .attachments video, +main .attachments audio { + max-width: 100%; + margin: 1em 0; + display: block; + grid-column: 1 / span 2; +} + +main .attachments audio { + width: 100%; +} + +main .tags a { + background-color: #f6f6f6; + border-radius: 4px; + color: #333; + display: inline-block; + margin-right: 0.5em; + padding: 0.5em; + text-decoration: none; +} + +main .tags a:hover { + background-color: #e6e6e6; + text-decoration: underline; +} + +main .column-header { + font-size: 1.5em; + margin: 0; + padding: 5px 10px; + border-bottom: 1px solid #ccc; + vertical-align: middle; +} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-welcome.css b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-welcome.css new file mode 100644 index 00000000..3a5ff2e1 --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-welcome.css @@ -0,0 +1,310 @@ +/* ActivityPub Welcome Page Styles */ + +.activitypub-welcome-container { + max-width: 800px; + margin: 40px auto; + background-color: #fff; + border-radius: 8px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + padding: 30px; +} + +/* Header Styles */ +.activitypub-welcome-header { + text-align: center; + margin-bottom: 30px; + position: relative; +} + +/* Progress Circle */ +.activitypub-progress-circle { + position: relative; + width: 120px; + height: 120px; + margin: 0 auto 20px; +} + +.activitypub-progress-circle-content { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + font-size: 16px; + font-weight: 500; + color: #1e1e1e; + z-index: 2; +} + +.activitypub-progress-ring { + transform: rotate(-90deg); + overflow: visible; +} + +.activitypub-progress-ring-bg { + fill: none; + stroke: #f0f0f1; + stroke-width: 6; +} + +.activitypub-progress-ring-circle { + fill: none; + stroke: #2271b1; + stroke-width: 6; + stroke-linecap: round; + transition: stroke-dashoffset 0.5s ease; +} + +.activitypub-welcome-title { + font-size: 28px; + margin: 20px 0 10px; + font-weight: 400; +} + +.activitypub-welcome-subtitle { + font-size: 16px; + color: #646970; + margin: 0 0 20px; + font-weight: 400; +} + +/* Steps Styles */ +.activitypub-onboarding-step { + display: flex; + align-items: center; + padding: 20px; + border-radius: 4px; + background-color: #f6f7f7; + margin-bottom: 15px; + transition: background-color 0.2s ease; +} + +.activitypub-onboarding-step:last-child { + margin-bottom: 0; +} + +.activitypub-onboarding-step:hover { + background-color: #f0f0f1; +} + +.step-indicator { + margin-right: 15px; + flex-shrink: 0; +} + +.step-icon { + width: 24px; + height: 24px; + font-size: 24px; + display: flex; + align-items: center; + justify-content: center; +} + +.dashicons-warning { + color: #dba617; +} + +.step-content { + flex-grow: 1; + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; +} + +.step-text { + flex-grow: 1; +} + +.step-text h3 { + margin: 0 0 5px; + font-size: 16px; + font-weight: 500; +} + +.step-text p { + margin: 0; + color: #646970; + font-size: 14px; +} + +.step-action { + flex-shrink: 0; + margin-left: 20px; +} + +.activitypub-step-completed { + background-color: #f0f7ee; +} + +.activitypub-step-completed:hover { + background-color: #e2f1dc; +} + +.activitypub-step-completed .step-text h3 { + margin: 0; +} + +.activitypub-step-completed .step-text h3::after { + content: "."; +} + +.activitypub-step-completed .step-text p, +.activitypub-step-completed .step-action { + display: none; +} + +.activitypub-step-completed .step-icon { + color: #008a20; +} + +.step-action .button { + min-width: 120px; + text-align: center; +} + +/* Profiles Section */ +.activitypub-profiles-section { + margin-top: 40px; + border-top: 1px solid #f0f0f1; + padding-top: 30px; +} + +.profiles-description { + margin-bottom: 20px; + font-size: 16px; + color: #1e1e1e; +} + +.activitypub-profiles-container { + display: flex; + flex-wrap: wrap; + gap: 20px; + margin-bottom: 30px; +} + +.activitypub-profile-card { + flex: 1; + min-width: 300px; + background-color: #fff; + border: 1px solid #c3c4c7; + border-radius: 4px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} + +.profile-card-header { + background-color: #f0f0f1; + padding: 15px; + border-bottom: 1px solid #c3c4c7; + display: flex; + align-items: center; +} + +.profile-icon { + margin-right: 10px; +} + +.profile-icon .dashicons { + font-size: 20px; + width: 20px; + height: 20px; +} + +/* stylelint-disable-next-line no-descending-specificity */ +.profile-card-header h3 { + margin: 0; + font-size: 16px; + font-weight: 500; +} + +.profile-card-content { + padding: 15px; +} + +.extra-field { + margin-bottom: 15px; +} + +.extra-field label { + display: block; + margin-bottom: 5px; + font-weight: 500; + font-size: 13px; + color: #646970; +} + +.extra-field input { + width: 100%; + padding: 8px; + font-size: 13px; + background-color: #f6f7f7; + border: 1px solid #dcdcde; + border-radius: 3px; +} + +.profile-description { + font-size: 13px; + color: #646970; + margin: 15px 0; + line-height: 1.5; +} + +.profile-card-content .button { + width: 100%; + text-align: center; + margin-top: 10px; +} + +/* Footer Styles */ +.activitypub-welcome-footer { + margin-top: 30px; + text-align: center; +} + +.skip-steps-link { + color: #2271b1; + text-decoration: none; + font-size: 14px; +} + +.skip-steps-link:hover { + color: #135e96; + text-decoration: underline; +} + +/* Responsive Adjustments */ +@media screen and (max-width: 782px) { + + .activitypub-welcome-container { + margin: 20px; + padding: 20px; + } + + .step-content { + flex-direction: column; + align-items: flex-start; + } + + .step-action { + margin-left: 0; + margin-top: 15px; + width: 100%; + } + + .step-action .button { + width: 100%; + text-align: center; + } + + .activitypub-profiles-container { + flex-direction: column; + } + + .activitypub-profile-card { + width: 100%; + } +} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/follow-me.png b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/follow-me.png new file mode 100644 index 00000000..a81ec882 Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/follow-me.png differ diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/followers.png b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/followers.png new file mode 100644 index 00000000..c34738fd Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/followers.png differ diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/mp.jpg b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/mp.jpg new file mode 100644 index 00000000..f4558175 Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/mp.jpg differ diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/reactions.png b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/reactions.png new file mode 100644 index 00000000..91bdbde3 Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/reactions.png differ diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/reply.png b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/reply.png new file mode 100644 index 00000000..ca6a5523 Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/reply.png differ diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/wp-logo.png b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/wp-logo.png new file mode 100644 index 00000000..309e6311 Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/img/wp-logo.png differ diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/assets/js/activitypub-admin.js b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/js/activitypub-admin.js new file mode 100644 index 00000000..764449b2 --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/js/activitypub-admin.js @@ -0,0 +1,20 @@ +jQuery( function( $ ) { + // Accordion handling in various areas. + $( '.activitypub-settings-accordion' ).on( 'click', '.activitypub-settings-accordion-trigger', function() { + var isExpanded = ( 'true' === $( this ).attr( 'aria-expanded' ) ); + + if ( isExpanded ) { + $( this ).attr( 'aria-expanded', 'false' ); + $( '#' + $( this ).attr( 'aria-controls' ) ).attr( 'hidden', true ); + } else { + $( this ).attr( 'aria-expanded', 'true' ); + $( '#' + $( this ).attr( 'aria-controls' ) ).attr( 'hidden', false ); + } + } ); + + $(document).on( 'wp-plugin-install-success', function( event, response ) { + setTimeout( function() { + $( '.activate-now' ).removeClass( 'thickbox open-plugin-details-modal' ); + }, 1200 ); + } ); +} ); diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/assets/js/activitypub-connected-apps.js b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/js/activitypub-connected-apps.js new file mode 100644 index 00000000..84062db6 --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/js/activitypub-connected-apps.js @@ -0,0 +1,364 @@ +/** + * ActivityPub Connected Applications JavaScript. + * + * Handles registering OAuth clients, deleting clients, and revoking + * OAuth tokens from the user profile, following the WordPress core + * Application Passwords UI pattern. + */ + +/* global activitypubConnectedApps, jQuery, ClipboardJS */ + +( function( $ ) { + var $section = $( '#activitypub-connected-apps-section' ), + $newAppForm = $section.find( '.create-application-password' ), + $newAppFields = $newAppForm.find( '.input' ), + $newAppButton = $newAppForm.find( '.button' ), + $appsWrapper = $section.find( '#activitypub-registered-apps-wrapper' ), + $appsTbody = $section.find( '#activitypub-registered-apps-tbody' ), + $tokensWrapper = $section.find( '.activitypub-connected-apps-list-table-wrapper' ), + $tokensTbody = $section.find( '#activitypub-connected-apps-tbody' ), + $revokeAll = $section.find( '#activitypub-revoke-all-tokens' ), + $deleteAll = $section.find( '#activitypub-delete-all-clients' ); + + // Register a new application. + $newAppButton.on( 'click', function( e ) { + e.preventDefault(); + + if ( $newAppButton.prop( 'aria-disabled' ) ) { + return; + } + + var $name = $( '#activitypub-new-app-name' ); + var $redirectUri = $( '#activitypub-new-app-redirect-uri' ); + + if ( 0 === $name.val().trim().length ) { + $name.trigger( 'focus' ); + return; + } + + if ( 0 === $redirectUri.val().trim().length ) { + $redirectUri.trigger( 'focus' ); + return; + } + + clearNotices(); + $newAppButton.prop( 'aria-disabled', true ).addClass( 'disabled' ); + + $.ajax( { + url: activitypubConnectedApps.ajaxUrl, + method: 'POST', + data: { + action: 'activitypub_register_oauth_client', + name: $name.val().trim(), + redirect_uri: $redirectUri.val().trim(), + _wpnonce: activitypubConnectedApps.nonce + } + } ).always( function() { + $newAppButton.removeProp( 'aria-disabled' ).removeClass( 'disabled' ); + } ).done( function( response ) { + if ( ! response.success ) { + addNotice( + response.data && response.data.message ? response.data.message : activitypubConnectedApps.registerError, + 'error' + ); + return; + } + + // Build credential notice (matches core's tmpl-new-application-password). + var $notice = $( '
' ) + .attr( 'role', 'alert' ) + .attr( 'tabindex', '-1' ) + .addClass( 'notice notice-success is-dismissible new-application-password-notice' ); + + // Client ID row. + var $clientIdRow = $( '' ).addClass( 'application-password-display' ) + .append( $( '' ).text( activitypubConnectedApps.clientIdLabel ) ) + .append( $( '' ).attr( { type: 'text', readonly: 'readonly' } ).addClass( 'code' ).val( response.data.client_id ) ) + .append( + $( '