Changeset 1729600
- Timestamp:
- 09/13/2017 10:58:46 PM (8 years ago)
- Location:
- template-dictionary/trunk
- Files:
-
- 4 edited
-
admin/admin.php (modified) (1 diff)
-
admin/types/post.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
template-dictionary.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
template-dictionary/trunk/admin/admin.php
r1713705 r1729600 81 81 include_once __DIR__ . '/types/date.php'; 82 82 include_once __DIR__ . '/types/post.php'; 83 include_once __DIR__ . '/types/post-multiple.php'; 83 84 include_once __DIR__ . '/types/media.php'; 84 85 include_once __DIR__ . '/types/check.php'; 85 86 86 87 $types = array( 87 'string' => 'TemplateDictionary_Type_String', 88 'number' => 'TemplateDictionary_Type_Number', 89 'text' => 'TemplateDictionary_Type_Text', 90 'wysiwyg' => 'TemplateDictionary_Type_Wysiwyg', 91 'email' => 'TemplateDictionary_Type_Email', 92 'select' => 'TemplateDictionary_Type_Select', 93 'date' => 'TemplateDictionary_Type_Date', 94 'post' => 'TemplateDictionary_Type_Post', 95 'media' => 'TemplateDictionary_Type_Media', 96 'check' => 'TemplateDictionary_Type_Check', 88 'string' => 'TemplateDictionary_Type_String', 89 'number' => 'TemplateDictionary_Type_Number', 90 'text' => 'TemplateDictionary_Type_Text', 91 'wysiwyg' => 'TemplateDictionary_Type_Wysiwyg', 92 'email' => 'TemplateDictionary_Type_Email', 93 'select' => 'TemplateDictionary_Type_Select', 94 'date' => 'TemplateDictionary_Type_Date', 95 'post' => 'TemplateDictionary_Type_Post', 96 'post_multiple' => 'TemplateDictionary_Type_PostMultiple', 97 'media' => 'TemplateDictionary_Type_Media', 98 'check' => 'TemplateDictionary_Type_Check', 97 99 ); 98 100 -
template-dictionary/trunk/admin/types/post.php
r1713594 r1729600 11 11 protected $table_type = 'int'; 12 12 13 protected $changeable_to = array( 'number', 'string', 'text', 'wysiwyg' );13 protected $changeable_to = array( 'number', 'string', 'text', 'wysiwyg', 'post_multiple' ); 14 14 15 15 public function __construct( $options = null ){ -
template-dictionary/trunk/readme.txt
r1713705 r1729600 34 34 This function returns the value. If you need to echo the value, you can use function `eget`. Both functions have an optional argument `$default`, which is the default returned/echoed value, if the admin value is empty. 35 35 36 You can also get the value by accessing the code as property: 37 38 `$value = TmplDict()->the_code;` 39 36 40 = Usage with shortcode = 37 41 You can also use a shortcode `[tmpl_dict]` with attributes `code`, `default` and `do_shortcode`. The last attribute says, if the function `do_shortcode` will be called on the value. … … 58 62 == Changelog == 59 63 64 = 1.02 = 65 * Added post-multiple field type. 66 * Added method __get for accessing dictionary values as properties. 67 60 68 = 1.01 = 61 69 * Fix: notice after deleting setting -
template-dictionary/trunk/template-dictionary.php
r1713705 r1729600 3 3 * Plugin Name: Template Dictionary 4 4 * Description: A plugin for developers which provides template variables dictionary editable in backend. 5 * Version: 1.0 15 * Version: 1.02 6 6 * Author: Radovan Kneblík 7 7 * License: GPL2 … … 24 24 * @var string 25 25 */ 26 p ublic $version = '1.01';26 private $version = '1.02'; 27 27 28 28 /** … … 287 287 288 288 /** 289 * Get the dictionary value for given code as property. 290 * @param string $code 291 * @return string|int 292 */ 293 public function __get( $code ){ 294 return $this->get( $code ); 295 } 296 297 /** 289 298 * Set the dictionary value for given code. 290 299 * @param string $code
Note: See TracChangeset
for help on using the changeset viewer.