Devhub

Devhub is the project name for developer.wordpress.org, which was deployedDeploy Launching code from a local development environment to the production web server, so that it's available to visitors. and is still under active development. A full project specification is available on the Make/Meta blog.

Devhub is a new home for developer documentation on WordPress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/. It comprises:

  • an auto-generated code reference
  • targeted handbooks for developers

The project requires the following types of contributors:

  • PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. http://php.net/manual/en/intro-whatis.php. developers
  • front-end developers
  • designers and UXers
  • anyone who wishes to provide feedback

What needs to be worked on What needs to be worked on

  • improvements to WP-Parser
  • enhancements to the site, including upvoting and commenting
  • improvements to the theme, including the code reference and handbooks
  • testing and feedback

Top ↑

To get involved To get involved

You can get involved in the following ways:

  • join the #meta-devhub channel on Slack
  • find a ticket on the Developer Hub tracTrac Trac is the place where contributors create issues for bugs or feature requests much like GitHub.https://core.trac.wordpress.org/. component
  • submit a pull request to WP-Parser on GithubGitHub GitHub is a website that offers online implementation of git repositories that can can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/
  • read up on the devhub tag on make/docs

Top ↑

Setting up your development environment Setting up your development environment

To develop on developer.wordpress.org you will need to set up your local development environment. Before you do, be sure you’ve setup your environment to read .htaccess files properly. If you end up with 404 errors where content should be, your .htaccess file is not being read.

On a local WordPress install, do the following:

1. Install the theme 1. Install the theme

Checkout the developer.wordpress.org theme from the metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. svn repository.

svn checkout https://meta.svn.wordpress.org/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/ wp-content/themes/wporg-developer

Top ↑

Download the following HTMLHTML HTML is an acronym for Hyper Text Markup Language. It is a markup language that is used in the development of web pages and websites. files:

Place these in wp-content/themes/.

Open wp-config.php and just before /* That's all, stop editing! Happy blogging. */ add:

define( 'WPORGPATH', __DIR__ . '/wp-content/themes/' );

Open up the wordpress.org header.php file and add the following to the bottom of the file:

<?php wp_head(); ?>

Then change the opening body tag to this:

<body id="wordpress-org" <?php body_class(); ?>>

Open up the wordpress.org footer.php and add the following directly before the </body>tag:

<?php wp_footer(); ?>

Top ↑

3. Install Composer 3. Install Composer

Install composer in the working directory following the Composer installation instructions.

Top ↑

4. Install WP-Parser 4. Install WP-Parser

Install WP-Parser into wp-content/plugins/ using Composer:

composer create-project wordpress/phpdoc-parser:dev-master --no-dev

If you had updated WP–Parser via pulling latest code via GitGit Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. Most modern plugin and theme development is being done with this version control system. https://git-scm.com/. and getting errors about missing classes — you need to rebuild autoload by following command in its directory:

composer dump-autoload

If you want to develop WP-Parser (Welcome to the dark art of parsing) you shouldn’t use “composer create-project” but instead clone the WP-Parser repository

Top ↑

5. Install wp-cliWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ 5. Install wp-cli

Install wp-cli.

If you are using MAMP you may get a MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com/. error. You can try this solution or an alternative install method.

Top ↑

6. Run WP-Parser 6. Run WP-Parser

Enable WP-Parser via your admin or by using the command

wp plugin activate wp-parser

(the directory name is case sensitive)

Run the indexing command:

wp parser create . --user=1

Notes:

  • .stands for the current directory
  • --user=1 is needed to attribute posts, 1 is typical for initial admin account, adjust to user ID or login if needed

Top ↑

7. Compiling SCSS to CSSCSS CSS is an acronym for cascading style sheets. This is what controls the design or look and feel of a site. 7. Compiling SCSS to CSS

To compile the SCSS to CSS the following command can be used when in the theme folder:

scss --no-cache --update --style=expanded scss:stylesheets

To watch the SCSS you can use:

scss --no-cache --watch --style=expanded scss:stylesheets

Top ↑

8. Handbook Setup 8. Handbook Setup

In order to set up and synchronize the Handbooks, some additional plugins are required.

Install the Handbook pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party

svn checkout https://meta.svn.wordpress.org/sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/   wp-content/plugins/handbook/

Install the Markdown Plugin

svn checkout https://meta.svn.wordpress.org/sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-markdown/ wp-content/plugins/wporg-markdown/

Install the WP CLICLI Command Line Interface. Terminal (Bash) in Mac, Command Prompt in Windows, or WP-CLI for WordPress. Handbook plugin

svn checkout https://meta.svn.wordpress.org/sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-cli/

Install JetPack – https://en-ca.wordpress.org/plugins/jetpack/

Handbooks are updated using cron and so it may be beneficial to install a plugin such as WP Crontrol that allows viewing and running jobs in the WordPress admin.

Alternatively, jobs can be run as needed using WP CLI.

wp cron event run devhub_blocks_import_all_markdown

Last updated: