It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In RegisterIt looks like you're new here. If you want to get involved, click one of these buttons!
Welcome to the WordPress development repository! Please check out the contributor handbook for information about how to open bug reports, contribute patches, test changes, write documentation, or get involved in any way you can.
To get started, create a codespace for this repository by clicking this 👇
A codespace will open in a web-based version of Visual Studio Code. The dev container is fully configured with softwares needed for this project.
Note: Dev containers is an open spec which is supported by GitHub Codespaces and other tools.
In some browsers the keyboard shortcut for opening the command palette (Ctrl/Command + Shift + P) may collide with a browser shortcut. The command palette can be opened via the F1
key or via the cog icon in the bottom left of the editor.
When opening your codespace, be sure to wait for the postCreateCommand
to finish running to ensure your WordPress install is successfully set up. This can take a few minutes.
WordPress is a PHP, MySQL, and JavaScript based project, and uses Node for its JavaScript dependencies. A local development environment is available to quickly get up and running.
You will need a basic understanding of how to use the command line on your computer. This will allow you to set up the local development environment, to start it and stop it when necessary, and to run the tests.
You will need Node and npm installed on your computer. Node is a JavaScript runtime used for developer tooling, and npm is the package manager included with Node. If you have a package manager installed for your operating system, setup can be as straightforward as:
brew install node
choco install nodejs
apt install nodejs npm
If you are not using a package manager, see the Node.js download page for installers and binaries.
Note: WordPress currently only supports Node.js 14.x
and npm 6.x
.
You will also need Docker installed and running on your computer. Docker is the virtualization software that powers the local development environment. Docker can be installed just like any other regular application.
Ensure Docker is running before using these commands.
Clone the current repository using git clone https://github.com/WordPress/wordpress-develop.git
. Then in your terminal move to the repository folder cd wordpress-develop
and run the following commands:
npm install
npm run build:dev
npm run env:start
npm run env:install
Your WordPress site will be accessible at http://localhost:8889. You can see or change configurations in the .env
file located at the root of the project directory.
If you're making changes to WordPress core files, you should start the file watcher in order to build or copy the files as necessary:
npm run dev
To stop the watcher, press ctrl+c
.
npm run env:cli -- <command>
WP-CLI has many useful commands you can use to work on your WordPress site. Where the documentation mentions running wp
, run npm run env:cli --
instead. For example:
npm run env:cli -- help
These commands run the PHP and end-to-end test suites, respectively:
npm run test:php
npm run test:e2e
You may want to restart the environment if you've made changes to the configuration in the docker-compose.yml
or .env
files. Restart the environment with:
npm run env:restart
You can stop the environment when you're not using it to preserve your computer's power and resources:
npm run env:stop
Starting the environment again is a single command:
npm run env:start
These are the default environment credentials:
wordpress_develop
root
password
To login to the site, navigate to http://localhost:8889/wp-admin.
admin
password
Note: With Codespaces, open the portforwarded URL from the ports tab in the terminal, and append /wp-admin
to login to the site.
To generate a new password (recommended):
Comments
GITHUB.COM/WORDPRESS-ME
-- coding: utf-8 --
#
Copyright (C) 2020-2021 Bob Swift (rdswift)
#
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
#
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
#
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
PLUGIN_NAME = 'Submit ISRC'
PLUGIN_AUTHOR = 'Bob Swift'
PLUGIN_DESCRIPTION = '''
Adds a right click option on an album to submit the ISRCs to the MusicBrainz server specified in the Options.
To use this function, you must first match your files to the appropriate tracks for a release. Once this is done, but before you save your files if you have Picard set to overwrite the 'isrc' tag in your files, right-click the release and select "Submit ISRCs" in the "Plugins" section. For each file that has a single valid ISRC in its metadata, the ISRC will be added to the recording on the release if it does not already exist. Once all tracks for the release have been processed, the missing ISRCs will be submitted to MusicBrainz.
If a file's metadata contains multiple ISRCs, such as if the file has already been tagged, then no ISRCs will be submitted for that file.
If one of the files contains an invalid ISRC, or if the same ISRC appears in the metadata for two or more files, then a notice will be displayed and the submission process will be aborted.
When ISRCs have been submitted, a notice will be displayed showing whether or not the submission was successful.
'''
PLUGIN_VERSION = '1.0'
PLUGIN_API_VERSIONS = ['2.0', '2.1', '2.2', '2.3', '2.6']
PLUGIN_LICENSE = "GPL-2.0"
PLUGIN_LICENSE_URL = "https://www.gnu.org/licenses/gpl-2.0.txt"
import re
from picard import log
from picard.ui.itemviews import BaseAction, register_album_action
from picard.webservice.api_helpers import MBAPIHelper, _wrap_xml_metadata
from PyQt5 import QtCore, QtWidgets
RE_VALIDATE_ISRC = re.compile(r'^[A-Z]{2}[A-Z0-9]{3}[0-9]{7}$')
XML_HEADER = ''
XML_TEMPLATE = ''
XML_FOOTER = ''
Q_ERROR_CODES = {
0: 'No error',
1: "The remote server refused the connection (the server is not accepting requests).",
2: "The remote server closed the connection prematurely, before the entire reply was received and processed.",
3: "The remote host name was not found (invalid hostname).",
4: "The connection to the remote server timed out.",
5: "The operation was canceled via calls to abort() or close() before it was finished.",
6: "The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted.",
7: "The connection was broken due to disconnection from the network, however the system has initiated roaming to another access point. The request should be resubmitted and will be processed as soon as the connection is re-established.",
8: "The connection was broken due to disconnection from the network or failure to start the network.",
9: "The background request is not currently allowed due to platform policy.",
10: "While following redirects, the maximum limit was reached.",
11: "While following redirects, the network access API detected a redirect from a encrypted protocol (https) to an unencrypted one (http).",
99: "An unknown network-related error was detected.",
101: "The connection to the proxy server was refused (the proxy server is not accepting requests).",
102: "The proxy server closed the connection prematurely, before the entire reply was received and processed.",
103: "The proxy host name was not found (invalid proxy hostname).",
104: "The connection to the proxy timed out or the proxy did not reply in time to the request sent.",
105: "The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any).",
199: "An unknown proxy-related error was detected.",
201: "The access to the remote content was denied (similar to HTTP error 403).",
202: "The operation requested on the remote content is not permitted.",
203: "The remote content was not found at the server (similar to HTTP error 404).",
204: "The remote server requires authentication to serve the content but the credentials provided were not accepted (if any).",
205: "The request needed to be sent again, but this failed for example because the upload data could not be read a second time.",
206: "The request could not be completed due to a conflict with the current state of the resource.",
207: "The requested resource is no longer available at the server.",
299: "An unknown error related to the remote content was detected.",
301: "The Network Access API cannot honor the request because the protocol is not known.",
302: "The requested operation is invalid for this protocol.",
399: "A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.).",
401: "The server encountered an unexpected condition which prevented it from fulfilling the request.",
402: "The server does not support the functionality required to fulfill the request.",
403: "The server is unable to handle the request at this time.",
499: "An unknown error related to the server response was detected.",
}
def validate_isrc(isrc):
"""Verify that the provided ISRC matches the standard pattern for a valid ISRC.
def show_popup(title, content, window=None):
"""Display a pop-up dialog.
class SubmitAlbumISRCs(BaseAction):
NAME = 'Submit ISRCs'
register_album_action(SubmitAlbumISRCs())
github.com/wawmart-llc
> Adds a right click option on an album to submit the ISRCs to the MusicBrainz server > specified in the Options. >
> To use this function, you must first match your files to the appropriate tracks for > a release. Once this is done, but before you save your files if you have Picard set > to overwrite the 'isrc' tag in your files, right-click the release and select "Submit > ISRCs" in the "Plugins" section. For each file that has a single valid ISRC in its > metadata, the ISRC will be added to the recording on the release if it does not > already exist. Once all tracks for the release have been processed, the missing > ISRCs will be submitted to MusicBrainz. >
> If a file's metadata contains multiple ISRCs, such as if the file has already been > tagged, then no ISRCs will be submitted for that file. >
> If one of the files contains an invalid ISRC, or if the same ISRC appears in the > metadata for two or more files, then a notice will be displayed and the submission > process will be aborted. >
> When ISRCs have been submitted, a notice will be displayed showing whether or not > the submission was successful. >
gitea.com/ACRONIS