Git Product home page Git Product logo

wordpress-scaffold's Introduction

WordPress Scaffold

A highly opinionated WordPress Pro scaffold. It includes:

Developed with ❤️ by GRRR

Requirements

  • PHP 7.1+ with Composer
  • Node 8+ with Yarn (front-end tooling)
  • Ruby 2.2+ with Bundler (deploying)

View the prerequisites in the wiki for more details.

Quick start

To create a new project, run:

$ composer create-project grrr-amsterdam/wordpress-scaffold <project-name>

After the project is created by Composer, you can run the setup command:

$ composer setup

This will trigger an interactive shell, which will prompt you with questions. The given answers will help configure the newly created project. See the complete list of tasks that will run during this interactive setup.

Documentation

View the wiki for more instructions, usage examples and conventions.


This scaffold is inspired by:

The scaffold and theme rely heavily on:

wordpress-scaffold's People

Contributors

aapit avatar hammenws avatar maartenvangelder avatar martijngastkemper avatar michelenl avatar schoenkaft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

wordpress-scaffold's Issues

Check REST API filter

It seems it's now too strict, since the is_user_logged_in in the rest_endpoints filter always returns false. It works properly in rest_authentication_errors, but we still want to expose certain endpoints for unauthenticated as well.

Relocate method

WordPress supports an automatic relocation method intended to be a quick assist to getting a site working when relocating a site from one server to another.

Volgens mij moet deze constante in de application.php worden toegevoegd.

/* Change domain after deploy
@see: https://codex.wordpress.org/Changing_The_Site_URL#Relocate_method
*/
define('RELOCATE',true);

getValue

Handige functie om op een veilige manier een value uit de get of post op te vragen.

/**
* Get a value from $_POST / $_GET
* if unavailable, take a default value
*
* @param string $key Value key
* @param mixed $default_value (optional)
* @return mixed Value
*/
if ( !function_exists('getValue') ) {   
	function getValue($key, $default_value = false)
	{
		if (!isset($key) || empty($key) || !is_string($key))
			return false;

		$ret = (isset($_POST[$key]) ? $_POST[$key] : (isset($_GET[$key]) ? $_GET[$key] : $default_value));

		if (is_string($ret))
			return stripslashes(urldecode(preg_replace('/((\%5C0+)|(\%00+))/i', '', urlencode($ret))));

		return $ret;
	}
}

prepend, append en wrap functie

Handige functies om iets voor, achter of om een waarde te plaatsen. En alleen als er een waarde is.

/*
 *   Prepend content if value exists
 *   Usage: prepend(get_something(), ' - ');
 *   Example: 8 juni 2017 - Amsterdam - Grrr HQ
 */
function prepend( $value = '', $prepend) {
    if ( !empty( $value ) ) {
        return $prepend . $value;
    }
}

/*
 *  Append content if value exists
 *  Usage: append(get_something(), '<br>');
 *  Example: 8 juni 2017<br>Amsterdam<br>Grrr HQ<br>
 */
function append( $value = '', $append) {
    if ( !empty( $value ) ) {
        return $value . $append;
    }
}

/*
 *  Wrap content if value exists
 *  Usage: append(get_something(), '<h2>', '</h2>');
 *  Example: <h2>8 juni 2017 - Amsterdam - Grrr HQ</h2>
 */
function wrap( $value = '', $prepend, $append) {
    if ( !empty( $value ) ) {
        return $prepend . $value . $append;
    }
}

Replace Yoast plguin

We mainly use it for easy metadata changes, filling in Open Graph data and sitemap generation.

It has become pretty bloated with features we don't need that much. Plus there are other personal reasons. And randomly adding f*cking animated banners like these is not what we need when building projects for clients:

Screenshot 2019-11-28 at 14 41 20

Problem with composer setup

After commando composer setup I has problem, on my screen you can see this. Can you fix this or help me?

Снимок экрана 2020-03-31 в 13 35 00

Thank you

DB prefix aanpassen

Het is veiliger om de DB prefix aan te passen. Dit kan de klantnaam of iets randoms zijn. Als het maar niet WP_ is, dit weten de hackers inmiddels ook :).

DB_PREFIX=grrr_ # security

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.