Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme settings and Blocks #894

dignajar opened this Issue Dec 27, 2018 · 0 comments


1 participant
Copy link

commented Dec 27, 2018

I'm looking for implement some kind of settings for themes, so the developers of themes can include inputs from the users.

1. Blocks

One of the idea mention by @dimobelov and testing in Github code are called Blocks.

  1. The Blocks are separated from the themes system
  2. The theme can include a file called blocks.php in the root. Example,
  3. The file blocks.php can include calls to add/edit/remove blocks.
  4. The file blocks.php is called when the user activate the theme
  5. The Blocks are deleted before the theme is activated, because each theme can have differents blocks.

1.1 Structure of Blocks


1.2 Add / Edit / Remove a Block

	# Add / Edit Block
		'title'=>'Testing Blocks',
		'value'=>'Some HTML code or string value',
		'description'=>'Description for the user'

	# Delete Block

1.3 How to call a Block

	# Get the title of the Block by the key 'test'
	$title = $blocks->get('test')->title();

	# Get the value of the Block by the key 'test'
	$value = $blocks->get('test')->value();

@dignajar dignajar changed the title [BRAINSTORMING] Theme settings and Blocks Theme settings and Blocks Dec 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.