Skip to content

Commit

Permalink
Merge branch 'develop' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinderk committed Sep 7, 2023
2 parents 8d134b6 + 3826ed4 commit ea894fc
Show file tree
Hide file tree
Showing 22 changed files with 1,706 additions and 149 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
/phpcs.xml export-ignore
/phpunit.xml.dist export-ignore
/README.md export-ignore
/hookdoc-conf.json export-ignore
9 changes: 9 additions & 0 deletions .github/hookdoc-tmpl/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Safe Redirect Manager Developer Documentation

This resource is generated documentation on actions and filters found in the Safe Redirect Manager plugin. Use the sidebar to browse and navigate.

For more information about using Safe Redirect Manager, please see the [Safe Redirect Manager WordPress.org Page](https://wordpress.org/plugins/safe-redirect-manager/).

To report an issue with Safe Redirect Manager or contribute back to the project, please visit the [GitHub repository](https://github.com/10up/safe-redirect-manager/).

<a href="http://10up.com/contact/" class="banner"><img src="https://10updotcom-wpengine.s3.amazonaws.com/uploads/2016/10/10up-Github-Banner.png" width="850"></a>
47 changes: 47 additions & 0 deletions .github/hookdoc-tmpl/layout.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><?js= title ?> - 10up Safe Redirect Manager Developer Documentation</title>

<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">

<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Mono|IBM+Plex+Sans:300,400|Playfair+Display:900&display=swap" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="styles-10up.css">
</head>

<body<?js if (title === 'Home') { ?> class="home"<?js } ?>>

<div id="main">

<?js if (title !== 'Home') { ?>
<h1 class="page-title"><?js= title ?></h1>
<?js } ?>

<?js= content ?>

<footer>
<a href="https://wordpress.org/plugins/safe-redirect-manager/">Safe Redirect Manager Plugin</a> &bull;
<a href="https://github.com/10up/safe-redirect-manager/">Safe Redirect Manager on GitHub</a> &bull;
<a href="https://10up.com/careers">Careers at 10up</a>
</footer>


</div>

<nav>
<?js= this.nav ?>
</nav>

<br class="clear">

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>
134 changes: 134 additions & 0 deletions .github/hookdoc-tmpl/static/styles-10up.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
body {
background: #fefefe;
color: #232323;
font-family: 'IBM Plex Sans', sans-serif;
font-size: 1.3rem;
font-weight: 300;
}

h1, h2, h3 {
line-height: 1.2;
font-family: 'Playfair Display', sans-serif;
font-weight: 900;
letter-spacing: -.01em;
}

h1.page-title {
font-size: 42px;
margin-top: .5em;
}

nav {
display: flex;
flex-direction: column;
}

nav * {
order: 4;
}

nav h2 {
order: 1;
}

nav h3:nth-of-type(3) {
order: 2;
visibility: hidden;
position: relative;
}

nav h3:nth-of-type(3):after {
content: 'Docs';
visibility: visible;
position: absolute;
left: 0;
}

nav ul:nth-of-type(3) {
order: 3;
}

nav ul {
font-size: 1.2rem;
}

nav li a {
background-image: none;
}

nav li a:hover {
text-decoration: underline;
}

code, pre,
nav ul a, nav ul a:visited, nav ul a:active,
.name, .signature,
.params .name, .props .name,
.name code {
font-family: 'IBM Plex Mono', monospace;
}

article h1 {
margin: 12px 0 32px;
}

a {
background-image: linear-gradient(transparent calc(100% - 7px), #f2dede 0),
linear-gradient(transparent calc(100% - 7px), #cef8f7 0);
background-position: 0 0;
background-repeat: no-repeat;
background-size: 0 100%, 100% 100%;
color: #232323;
text-decoration: none;
transition: all .1s;
}

a:visited,
a:active {
color: #232323;
}

a:focus,
a:hover {
background-size: 100% 100%, 100% 100%;
color: #232323;
text-decoration: none;
}

a.banner {
background-image: none;
margin-left: -10px;
}

a.banner img {
width: 100%;
max-width: 888px;
}

article img {
width: 100%;
max-width: 888px;
height: auto;
margin: 15px 0;
}

footer {
text-align: center;
font-size: .8em;
font-style: normal;
font-weight: 300;
}

.home #main > section:first-of-type,
.home nav > h2 {
display: none;
}

.prettyprint.source {
font-size: 14px;
}

.prettyprint code {
padding: 2px 10px;
line-height: 16px;
}
25 changes: 25 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build Docs
on:
push:
branches:
- trunk
jobs:
release:
name: Publish Docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install dependencies
run: npm install
- name: Build docs
run: npm run build:docs
- name: Deploy docs update
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: './docs-built'
32 changes: 32 additions & 0 deletions .github/workflows/repo-automator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Repo Automator'
on:
issues:
types:
- opened
push:
branches:
- develop
pull_request:
types:
- opened
- edited
- synchronize
- converted_to_draft
- ready_for_review
branches:
- develop

jobs:
Validate:
runs-on: ubuntu-latest
steps:
- uses: 10up/action-repo-automator@trunk
with:
fail-label: needs:feedback
pass-label: needs:code-review
conflict-label: needs:refresh
sync-pr-branch: true
reviewers: |
team:open-source-practice
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ on:
schedule:
- cron: '0 0 * * 1'

permissions:
issues: write

jobs:
wordpress-version-checker:
runs-on: ubuntu-latest
steps:
- name: WordPress version checker
uses: skaut/wordpress-version-checker@v1.2.0
uses: skaut/wordpress-version-checker@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tests/cypress/videos
tests/cypress/reports
.wp-env.override.json
.phpunit.result.cache
docs-built
4 changes: 4 additions & 0 deletions .wordpress-version-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"readme": "readme.txt",
"channel": "rc"
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> A WordPress plugin to safely and easily manage your website's HTTP redirects.
[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![E2E test](https://github.com/10up/safe-redirect-manager/actions/workflows/cypress.yml/badge.svg)](https://github.com/10up/safe-redirect-manager/actions/workflows/cypress.yml) [![PHPUnit](https://github.com/10up/safe-redirect-manager/actions/workflows/phpunit.yml/badge.svg)](https://github.com/10up/safe-redirect-manager/actions/workflows/phpunit.yml) [![Linting](https://github.com/10up/safe-redirect-manager/actions/workflows/lint.yml/badge.svg)](https://github.com/10up/safe-redirect-manager/actions/workflows/lint.yml) [![PHPCS](https://github.com/10up/safe-redirect-manager/actions/workflows/phpcs.yml/badge.svg)](https://github.com/10up/safe-redirect-manager/actions/workflows/phpcs.yml) [![PHPCompatibility](https://github.com/10up/safe-redirect-manager/actions/workflows/php-compatibility.yml/badge.svg)](https://github.com/10up/safe-redirect-manager/actions/workflows/php-compatibility.yml) [![Dependency Review](https://github.com/10up/safe-redirect-manager/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/10up/safe-redirect-manager/actions/workflows/dependency-review.yml) [![Release Version](https://img.shields.io/github/release/10up/safe-redirect-manager.svg)](https://github.com/10up/safe-redirect-manager/releases/latest) ![WordPress tested up to version](https://img.shields.io/wordpress/plugin/tested/safe-redirect-manager?color=%2346B450&label=WordPress&logo=WordPress&logoColor=%230073AA) [![GPLv2 License](https://img.shields.io/github/license/10up/safe-redirect-manager.svg)](https://github.com/10up/safe-redirect-manager/blob/develop/LICENSE.md)
[![Support Level](https://img.shields.io/badge/support-stable-blue.svg)](#support-level) [![E2E test](https://github.com/10up/safe-redirect-manager/actions/workflows/cypress.yml/badge.svg)](https://github.com/10up/safe-redirect-manager/actions/workflows/cypress.yml) [![PHPUnit](https://github.com/10up/safe-redirect-manager/actions/workflows/phpunit.yml/badge.svg)](https://github.com/10up/safe-redirect-manager/actions/workflows/phpunit.yml) [![Linting](https://github.com/10up/safe-redirect-manager/actions/workflows/lint.yml/badge.svg)](https://github.com/10up/safe-redirect-manager/actions/workflows/lint.yml) [![PHPCS](https://github.com/10up/safe-redirect-manager/actions/workflows/phpcs.yml/badge.svg)](https://github.com/10up/safe-redirect-manager/actions/workflows/phpcs.yml) [![PHPCompatibility](https://github.com/10up/safe-redirect-manager/actions/workflows/php-compatibility.yml/badge.svg)](https://github.com/10up/safe-redirect-manager/actions/workflows/php-compatibility.yml) [![Dependency Review](https://github.com/10up/safe-redirect-manager/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/10up/safe-redirect-manager/actions/workflows/dependency-review.yml) [![Release Version](https://img.shields.io/github/release/10up/safe-redirect-manager.svg)](https://github.com/10up/safe-redirect-manager/releases/latest) ![WordPress tested up to version](https://img.shields.io/wordpress/plugin/tested/safe-redirect-manager?color=%2346B450&label=WordPress&logo=WordPress&logoColor=%230073AA) [![GPLv2 License](https://img.shields.io/github/license/10up/safe-redirect-manager.svg)](https://github.com/10up/safe-redirect-manager/blob/develop/LICENSE.md)

## Purpose

Expand Down Expand Up @@ -143,7 +143,7 @@ Safe Redirect Manager is available in English and other languages. A listing of

## Support Level

**Active:** 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.
**Stable:** 10up is not planning to develop any new features for this, but will still respond to bug reports and security concerns. We welcome PRs, but any that include new features should be small and easy to integrate and should not include breaking changes. We otherwise intend to keep this tested up to the most recent version of WordPress.

## Changelog

Expand Down
54 changes: 54 additions & 0 deletions assets/css/redirect.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.srm-autocomplete__item-title,
.srm-autocomplete__item-url {
overflow: hidden;
text-overflow: ellipsis;
}

.srm-autocomplete__item-title {
font-weight: 500;
grid-area: title;
margin-bottom: 0.2em;
white-space: nowrap;
}

.srm-autocomplete__item-type {
background: #f0f0f0;
border-radius: 2px;
font-size: 0.9em;
grid-area: type;
padding: 3px 6px;
}

.srm-autocomplete__item-url {
color: #757575;
font-size: 0.9em;
grid-area: url;
line-height: 1.3;
word-break: break-all;
}

.srm-autocomplete__item {
align-items: flex-start;
column-gap: 1rem;
display: grid;
grid-template-areas: "title type"
"url type";
grid-template-columns: minmax(0, 1fr) auto;
padding: 6px 12px;
}

.srm-autocomplete__item:hover {
background-color: #f0f0f0;
}

.srm-autocomplete__item:hover .srm-autocomplete__item-type {
background-color: #fff;
}

.srm-autocomplete {
font-size: 13px;
max-width: 360px;
padding: 8px 16px;
}


Loading

0 comments on commit ea894fc

Please sign in to comment.