ThemeFuse / Unyson

A WordPress framework that facilitates the development of WP themes
http://unyson.io
922 stars 218 forks source link

[QUICK TUTORIAL] how to require the Unyson Framework on your theme / plugin without TGM #517

Closed thednp closed 9 years ago

thednp commented 9 years ago

Here's it:

Disable / enable the UNYSON plugin to check if this code works (it's perfect for me).

Ataurr commented 9 years ago

Great I will try my next project :+1:

Ataurr commented 9 years ago

@thednp this is not enough flexibility. after inactive you have to go plugin option to active. but from header popup message you cant. you have to use more condition here

thednp commented 9 years ago

It's an idea, to make it simple, clean and effective solution to other issues (see below). If your theme requires the framework and it's pretty much useless without it's options/features, this solution would work best. You can also develop your own unique stuff on the way, and this would be the best start.

TGM code is very often the target of hacks and it's subject to various vulnerability issues.

EDIT 1: I updated the sample code to link user to Plugin Manager page. It's exactly how I use it and intend to leave it just like that.

EDIT 2: I updated the sample code to make the message dissmissable.

azharisubroto commented 9 years ago
TGM code is very often the target of hacks and it's subject to various vulnerability issues.

I didn't know about this, should we use this technique to require other plugins?

thednp commented 9 years ago

Well this is a small little code you can use that could be a good alternative to TGM.