2017 © Pedro Peláez
 

library wp-elements

An easy to use Library Class to speed the process of writting wordpress plugin and the structure layout of your plugin

image

krike/wp-elements

An easy to use Library Class to speed the process of writting wordpress plugin and the structure layout of your plugin

  • Wednesday, November 18, 2015
  • by krike
  • Repository
  • 0 Watchers
  • 3 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

WPelements

An easy to use Library Class to speed the process of writting wordpress plugin and the structure layout of your plugin., (*1)

Install

composer require krike/wp-elements

Usage

You can can create a new instance of the class WP_elements or make a static function call., (*2)

$wpelements = new WP_elements();
$wpelements->set_featured_image($file, $post_id)

OR, (*3)

WP_elements::set_featured_image($file, $post_id)

Available functions:

Function Description
openWrapper(title,(optional)iconName) Opens a wrapper box for the admin page. (requires closeWrapper() at the end of your code) WP_elements::openWrapper('Page title', 'themes');
closeWrapper() Closes the wrapper box for the admin page WP_elements::closeWrapper()
openForm() openForm($action = '', $method = 'post', $enctype = false, $id = '')
closeForm() closeForm()
openTableWrapper() openTableWrapper($title, $icon = false, $class = 'options', $columns = 3)
closeTableWrapper() closeTableWrapper($columns = 3, $submit = array('btn_name' => 'submit', 'btn_title' => 'Update Options'))
loadView() loadView($paths, $data = null)
set_value() set_value($value, $default_value)
set_form_value() set_form_value($name, $default_value)
if_checked() if_checked($value)
if_selected() if_selected($value)
createSlug() createSlug($slug)
getFileContent() getFileContent($path)
jsonResponseOutput() jsonResponseOutput($response)
input_field() input_field($type = 'text', $name, $label, $params = null)
textarea_field() textarea_field($name, $label, $params = null)
select_field() select_field($options, $name, $label, $params = null)
minifyCode() minifyCode($code)
uploadDownloadFiles() uploadDownloadFiles($fieldName, $supported_types, $optional = false)
set_featured_image() set_featured_image($file, $post_id)
check_upload_folder() check_upload_folder($folderName)
filter_options() filter_options()

Coming in next update

  • Twig ready functions

License

This Library Class is licensed under GPL and can be used in both personal and commercial applications., (*4)

The Versions

18/11 2015

dev-master

9999999-dev

An easy to use Library Class to speed the process of writting wordpress plugin and the structure layout of your plugin

  Sources   Download

GPL

The Requires

  • php >=5.3.0

 

by Christophe Debruel

05/10 2015

1.0

1.0.0.0

An easy to use Library Class to speed the process of writting wordpress plugin and the structure layout of your plugin

  Sources   Download

GPL

The Requires

  • php >=5.3.0

 

by Christophe Debruel