Skip to content

Commit

Permalink
updates to v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwolfpaw committed Jun 12, 2024
1 parent 42f3948 commit 9501526
Show file tree
Hide file tree
Showing 13 changed files with 676 additions and 475 deletions.
33 changes: 33 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.php]
indent_size = 4

[*.{js,jsx,ts,tsx,json}]
indent_size = 2

[*.css]
indent_size = 4

[*.{html,htm}]
indent_size = 4

[*.md]
trim_trailing_whitespace = false
31 changes: 31 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"no-console": "off"
}
}
58 changes: 50 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# WordPress specific
/wp-content/uploads/
/wp-content/upgrade/
/wp-content/cache/
/wp-content/backup-db/
/wp-content/advanced-cache.php
/wp-content/wp-cache-config.php
/wp-content/debug.log

# Ignore wp-cli configuration
wp-cli.local.yml
wp-cli.yml

# compiled source #
###################
*.com
Expand Down Expand Up @@ -25,6 +38,11 @@
*.log
*.sql
*.sqlite
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# OS generated files #
######################
Expand All @@ -38,15 +56,39 @@ Thumbs.db

# IDE files #
#############
/.idea
.idea/
.vscode/
*.sublime-project
*.sublime-workspace
*.code-workspace

# Coverage directory used by tools like istanbul
coverage

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
dist/
build/

# Ignore composer and npm files
composer.lock
package-lock.json
yarn.lock

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Output of `npm pack`
*.tgz

# Output of `wp-scripts plugin-zip`
*.zip

# Test Suite files #
####################
/bin
/tests
.travis.yml
phpcs.xml.dist
phpunit.xml.dist
# dotenv environment variables file
.env
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: wolfpaw
Donate link: https://davidwolfpaw.com/
Tags: creative commons, licensing
Requires at least: 4.0.0
Tested up to: 5.8.0
Stable tag: 1.4.0
Tested up to: 6.5.4
Stable tag: 2.0.0
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand All @@ -25,6 +25,18 @@ A. You can reach me with questions about this plugin via david@fixupfox.com

## == Changelog ==

### = 2.0.0 =
* Updates plugin to work with the Full Site Editor
* Plugin still works with Classic Editor
* Update required for ClassicPress or sites without Full Site Editor
* Republish button text can be changed
* Republish Terms default text updated
* Updates design of terms modal
* Displays globally set license in metabox
* Deprecated PHP updated for PHP v8.2
* WordPress comment code no longer displayed
* Shortcodes converted to HTML in Republish box

### = 1.4.0 =
* Sets an option for CC0 No Rights Reserved
* Sets an option for CC0 Public Domain Mark
Expand Down
1 change: 1 addition & 0 deletions assets/css/cc-post-republisher-admin.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* License Details in Post Metabox */
.license-details {
display: flex;
border: 1px solid #ddd;
Expand Down
153 changes: 77 additions & 76 deletions assets/css/cc-post-republisher.css
Original file line number Diff line number Diff line change
@@ -1,75 +1,90 @@
#cc-post-republisher-modal-container {
position: fixed;
display: none;
top: 0;
left: 0;
background: rgba(0, 0, 0, 0.25);
z-index: 1000;
width: 100%;
height: 100vh;
/* Republish Button */
#cc-post-republisher-modal-button-open {
display: block;
text-decoration: none;
width: auto;
cursor: pointer;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
}

#cc-post-republisher-modal {
position: fixed;
top: 0;
left: 0;
background: rgba(255, 255, 255, 0.95);
z-index: 1001;
width: 100%;
height: 100vh;
padding: 4em 2em;
overflow-y: auto;
#cc-post-republisher-modal-button-open img {
vertical-align: middle;
margin-right: 1rem;
-webkit-box-shadow: none;
box-shadow: none;
border-radius: 0;
border: none;
display: inline;
}

#cc-post-republisher-modal-button-open,
#cc-post-republisher-modal-button-close {
background-color: #efefef;
color: #333;
border: 1px solid #999;
padding: 0.5rem;
line-height: 1;
font-weight: 700;
display: block;
margin-bottom: 1rem;
text-decoration: none;
width: auto;
/* Republish Button - Block Editor */
#cc-post-republisher-modal-button-open.editable-button {
border: 2px dashed #ccc;
cursor: text;
background-color: transparent;
color: #095d86;
}

#cc-post-republisher-modal-button-open img {
vertical-align: middle;
margin-right: 1rem;
-webkit-box-shadow: none;
box-shadow: none;
border-radius: 0;
border: none;
display: inline;
#cc-post-republisher-modal-button-open.editable-button:hover,
#cc-post-republisher-modal-button-open.editable-button:focus,
#cc-post-republisher-modal-button-open.editable-button:active {
border-color: #095d86;
}

/* Close Button */
#cc-post-republisher-modal-button-close {
display: inline-block;
cursor: pointer;
font-size: 2rem;
float: right;
margin-top: -0.6rem;
position: relative;
float: right;
top: 10px;
right: 10px;
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
font-size: 2rem;
margin-top: -0.6rem;
}

#cc-post-republisher-modal-button-open:hover,
#cc-post-republisher-modal-button-open:focus,
#cc-post-republisher-modal-button-open:active,
#cc-post-republisher-modal-button-close:hover,
#cc-post-republisher-modal-button-close:focus,
#cc-post-republisher-modal-button-close:active {
#cc-post-republisher-modal-button-close:focus {
color: black;
text-decoration: none;
cursor: pointer;
color: #efefef;
background-color: #333;
}

/* Modal */
#cc-post-republisher-modal-container {
box-sizing: border-box;
display: none;
position: fixed;
z-index: 1000;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
overflow-y: scroll;
}

#cc-post-republisher-modal {
box-sizing: border-box;
background: rgba(255, 255, 255, 0.95);
border: 1px solid #ccc;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 4em 2em;
overflow-y: auto;
height: 100%;
}

/* License Details */
#cc-post-republisher-license {
line-height: 1;
font-weight: 700;
display: block;
margin-bottom: 2rem;
text-decoration: none;
line-height: 1;
font-weight: 700;
display: block;
margin-bottom: 2rem;
text-decoration: none;
}

#cc-post-republisher-license img {
Expand All @@ -79,29 +94,15 @@

#cc-post-republisher-post-content {
padding: 0.5rem;
background-color: #efefef;
color: #333;
}

#cc-post-republisher-post-content textarea {
width: 100%;
padding: 0.8rem;
font-family: monospace;
font-size: 1rem;
line-height: 1.4;
background: #f0f0f0;
border: none;
border-radius: 0;
resize: none;
box-shadow: none;
overflow: scroll;
outline: none;
-webkit-box-flex: 1;
-webkit-flex: 1 0 auto;
-moz-box-flex: 1;
-ms-flex: 1 0 auto;
flex: 1 0 auto;
height: 32rem;
box-sizing: border-box;
width: 100%;
padding: 1rem;
font-family: monospace;
overflow-y: scroll;
height: clamp(10vh, 20em, 50vh);
}

#cc-post-republisher-post-content textarea::selection {
Expand Down
Loading

0 comments on commit 9501526

Please sign in to comment.