Skip to content

smithsa/toolset-php-snipets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Toolset PHP Snippets

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.

toolset snippet php screenshot

Motivation

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.

Prerequisites

Installation

  1. Clone the repository.

    git clone [email protected]:smithsa/toolset-php-snipets.git
    
  2. Set the configurations in config.json to the databse where your Wordpress build will live

Usage

Running the script

Command Line

  1. Navigate to the directory holding the contents of the repository

    cd toolset-php-snipets
    
  2. run the toolset-php-snipets.py script. You will see a window appear in the top left corner.

    python toolset-php-snipets.py
    

Executable

  1. Navigate to the directory holding the contents of the repository

  2. Click on the file toolset-php-snippets.command and the script will run. You will see a window appear in the top left corner.

Using the script

Once the script is up and running, you can use the following directions to use the script.

  1. Enter the databse name in the window

    toolset snippet php window screenshot

  2. 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.

    toolset snippet php usage

Built With

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT © Sade Smith

About

Python script that works to get php code of customizable field snippets for Wordpress Toolset Plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages