Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add private sites module * remove unneccessary code * fix linting issues * move fuctions to a class * Disable sharing, publicize and subcription modules on private sites * prevent site visibility change when the private site module is enbabled * only show an error when the error function exists * make a site private when the module is enabled * Update the message when changing blog_public * fixes based on feedback * changes based on feedback * copy update * hide visibility settings * copy update * remove extra text * Add an error code to the REST API blocking code * Update wording * Move to the security section * Rename function for consistency * update release number * remove unnecessary file check * remove unused variable * rebsase from master * remove bloginfo filter when syncing * Update blog_public option when private module activates or deactivates. * Removing a stray debug line * Hide OPML for private sites * prevent all ajax requests on private sites * Replacing global with WP functions * Prevent requests to admin-post.php for private sites * removing inadvertently introduced stray spaces * Move blog_public update_option out of init Instead of updating blog_public option in init, we now update it when the private module is activated. * Replace /traffic links with /security * 1. Add 403 response code 2. For OPML, exit with 403 and don't display private site page * 403 response code for OPML * Remove inadvertent log line * Replace get_blog_info() with get_blog_details(), since the former only exists on WPCOM * Add private sites message to Site Visibility option in Reading settings * Replacing hide_opml() with static function * 1. Remove blog_public modifications 2. Hide sitemap for private sites 3. Rename Protected to Private * Disable sitemap for private sites (refactored) * Bump priority for preprocess_comment so that it runs before Akismet * add an explanation for this line * Removed the jetpack_get_available_modules filter since it doesn't save state for disabled modules; instead we're moving to use jetpack_get_available_modules filter * fixing merge conflict * 1. Removed global wpdb 2. Copy change 3. Using set_url_scheme() for the private page URL * Remove is_super_admin() checks and instead utilize the check for read capability in is_private_blog_user() * Fixing lint errors * 1. Stricter checking for type 2. Updated versions * 1. Bug fix (missing parenthesis) 2. For is_private_blog_user(), removed function param and instead made its value the current user's value 3. Removed protected for functions that don't need them * Now using current_user_can_for_blog(), a core function which would be better than using for_site * Changing milestone * Adding the p2 reference in comment * Reverted the change to printf that removes wp_kses. Reinstated wp_kses per feedback. Also, fixed a docblock comment * 1. Copy change 2. Added jetpack_ prefix to priv_notice_privacy_selector() fn name * 1. Copy change 2. Added jetpack_ prefix to priv_notice_privacy_selector() fn name * Lint fixes, and merged back changes lost in b2913ad * The last attemp at fixing yarn.lock conflict didn't work, trying again by running yarn build * rebuilding yarn.lock * Update modules/private/class-jetpack-private.php Copy change. Co-Authored-By: niranjan-uma-shankar <niranjan.u@gmail.com> * Adding error messages * Fixes issue of module states not being restored This revision fixes the issue originally reported by @mdawaffe in #10333 (review). The following changes are effected: (1) update_active_modules() was incorrectly saving the filtered modules to options. This has been fixed by making the function save only the newly activated modules to options. (2) deactivate_module() was incorrectly saving the filtered modules to options. This has been fixed by not passing the modules through filters (3) We now load the private module(if it has been activated) before loading any other module. This makes the other modules respect the actions and filters defined in the private module. * 1. Removing stray whitespace as a result of bad merge 2. Rebuild yarn.lock * Undo changes to deactivate_module(). This change has no effect and is unnecessary. * Renamed variable for better clarity * Copy change * Add private/public status to the At a glance widget * Added learn more link * Revised the target milestone * Minor change in doc block * Styling changes: adding font color * Update _inc/client/security/private.jsx Remove the constant since we're using the value in only one place. Co-Authored-By: Jeremy Herve <jeremy@tagada.hu> * Update _inc/client/security/private.jsx Remove the constant. Co-Authored-By: Jeremy Herve <jeremy@tagada.hu> * Update class.jetpack.php The entire URL is brought inside `admin_url` Co-Authored-By: Jeremy Herve <jeremy@tagada.hu> * Update class.jetpack.php Fixing docblock Co-Authored-By: Jeremy Herve <jeremy@tagada.hu> * Update modules/module-extras.php Moving the entire URL inside `admin_url` Co-Authored-By: Jeremy Herve <jeremy@tagada.hu> * Update modules/private/class-jetpack-private.php Moving the entire url inside `admin_url` Co-Authored-By: Jeremy Herve <jeremy@tagada.hu> * Update modules/private/class-jetpack-private.php Minor change in the milestone -> 7.4 to 7.4.0 Co-Authored-By: Jeremy Herve <jeremy@tagada.hu> * Update modules/private/class-jetpack-private.php Moving the entire url inside `admin_url` Co-Authored-By: Jeremy Herve <jeremy@tagada.hu> * Update modules/private/class-jetpack-private.php Moving the entire url inside `admin_url` Co-Authored-By: Jeremy Herve <jeremy@tagada.hu> * 1. Minor fix in milestone (7.4 to 7.4.0) 2. Added phpcs ignore for wp_kses 3. Copy change * 1. Removed FEATURE_PRIVATE_JETPACK constant since it's only used for paid features * Readability change * 1. Moved css to file 2. Added doc block for at a glance callback * Moved the css styling from the css file to inline style; deleted the css file. * Post rebase, fixing conflicts * Rebase * Add inline css only in the main admin page * 1. Replace esc_attr with esc_url 2. Copy change 3. Added 'status' key to WP_Error error code * 1. For a private site, removes the 'Search engines are discouraged' message from At a glance dashboard 2. Adds a line break preceeding the 'Search engines are discouraged message' Co-authored-by: <niranjan.uma.shankar@automattic.com> Co-authored-by: Jeremy Herve <jeremy@tagada.hu>
- Loading branch information