Toolset PHP Snippets python script that works to get php code of customizable field snippets for Wordpress Toolset Plugin custom fields.Included in the repository are (1) an executable script and (2) python script.
Adding custom fields to your template files are a tedious task which require a lot of lookup to find the custom fields variable names. This script automatically searches your database for the custom fields and displays them to you on a web page where you can easily copy custom field php output statments and paste them into your template.
-
Clone the repository.
git clone [email protected]:smithsa/toolset-php-snipets.git
-
Set the configurations in config.json to the databse where your Wordpress build will live
Command Line
-
Navigate to the directory holding the contents of the repository
cd toolset-php-snipets
-
run the toolset-php-snipets.py script. You will see a window appear in the top left corner.
python toolset-php-snipets.py
Executable
-
Navigate to the directory holding the contents of the repository
-
Click on the file toolset-php-snippets.command and the script will run. You will see a window appear in the top left corner.
Once the script is up and running, you can use the following directions to use the script.
-
Enter the databse name in the window
-
Once step 1 is complete, a new tab will be opened in your Chrome browser showing a page titled Toolset PHP Snippets: [your datbase name]. You can use this page to copy snippets as you like. You can get (1) an echo statement of the custom field inside PHP template tags, (2) the custom field as a variable, (3) the custom field as a variable inside PHP template tags.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
This project is licensed under the MIT License - see the LICENSE file for details.
MIT © Sade Smith