[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fpv1QHIpHhJnXayV0L9O-DdPhqZxyOa7DOhWQyLodUvI":3},{"slug":4,"display_name":4,"profile_url":5,"plugin_count":6,"total_installs":7,"avg_security_score":8,"avg_patch_time_days":9,"trust_score":10,"computed_at":11,"plugins":12},"radovank","https:\u002F\u002Fprofiles.wordpress.org\u002Fradovank\u002F",1,10,85,30,84,"2026-04-04T14:13:08.759Z",[13],{"slug":14,"name":15,"version":16,"author":4,"author_profile":5,"description":17,"short_description":18,"active_installs":7,"downloaded":19,"rating":20,"num_ratings":20,"last_updated":21,"tested_up_to":22,"requires_at_least":23,"requires_php":24,"tags":25,"homepage":24,"download_link":31,"security_score":8,"vuln_count":20,"unpatched_count":20,"last_vuln_date":32,"fetched_at":33},"template-dictionary","Template Dictionary","1.6.1","\u003Cp>Template Dictionary is a plugin which can be used to create template variables editable by admins.\u003C\u002Fp>\n\u003Cp>The plugin is multilingual ready. It includes Polylang integration, another multilingual plugin can be integrated with filters.\u003C\u002Fp>\n\u003Ch4>Admin pages\u003C\u002Fh4>\n\u003Cp>There are few admin pages for managing the plugin.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Template Dictionary\u003C\u002Fstrong> – view, edit and delete the template variables values\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Settings list\u003C\u002Fstrong> – view, edit and delete template variables settings\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Add setting\u003C\u002Fstrong> – add new or edit template variables setting\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Edit values\u003C\u002Fstrong> – edit a value, this page is accessable from the page \u003Cstrong>Template Dictionary\u003C\u002Fstrong>\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Export\u002FImport\u003C\u002Fstrong> – export settings and values to xml or import it from xml\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch4>Usage in template\u003C\u002Fh4>\n\u003Cp>You can use a value in template by calling function \u003Ccode>get\u003C\u002Fcode> of Template Dictionary object, which can be accessed by function \u003Ccode>TmplDict()\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>For example, if you set a setting with code \u003Cem>the_code\u003C\u002Fem>, you can use it’s value by:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>TmplDict()->get( 'the_code' );\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>This function returns the value. If you need to echo the value, you can use function \u003Ccode>eget\u003C\u002Fcode>. Both functions have an optional argument \u003Ccode>$default\u003C\u002Fcode>, which is the default returned\u002Fechoed value, if the admin value is empty.\u003C\u002Fp>\n\u003Cp>You can also get the value by accessing the code as property:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>$value = TmplDict()->the_code;\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch4>Usage with shortcode\u003C\u002Fh4>\n\u003Cp>You can also use a shortcode \u003Ccode>[tmpl_dict]\u003C\u002Fcode> with attributes \u003Ccode>code\u003C\u002Fcode>, \u003Ccode>default\u003C\u002Fcode> and \u003Ccode>do_shortcode\u003C\u002Fcode>. The last attribute says, if the function \u003Ccode>do_shortcode\u003C\u002Fcode> will be called on the value.\u003C\u002Fp>\n\u003Ch4>Setup template language\u003C\u002Fh4>\n\u003Cp>Default template language can be set by setting the constant \u003Ccode>TMPL_DICT_DEFAULT_LANG\u003C\u002Fcode> in wp-config. Default value of this constant consists of two first characters of the current WP locale. \u003Cstrong>It is important to set the default language constant properly if you plan to create your site multilingual in future.\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>\u003Cstrong>If you have a multilingual site\u003C\u002Fstrong>, you need to set current template language with the filter \u003Ccode>template_dictionary_language\u003C\u002Fcode>. For users of Polylang, it is already integrated in this plugin, the current template language is the Polylang current language slug.\u003C\u002Fp>\n\u003Ch4>Setup available languages\u003C\u002Fh4>\n\u003Cp>\u003Cstrong>If you have a multilingual site\u003C\u002Fstrong>, you also need to set available languages with the filter \u003Ccode>template_dictionary_languages\u003C\u002Fcode>. Again, if Polylang is activated, these available languages consist of Polylang languages slugs.\u003C\u002Fp>\n\u003Cp>If your site is not multilingual, there is only one available language – the default language.\u003C\u002Fp>\n\u003Ch4>Use JS object\u003C\u002Fh4>\n\u003Cp>To generate JavaScript dictionary object, you need to define \u003Ccode>TMPL_DICT_JS_VAR_NAME\u003C\u002Fcode> constant. Add to \u003Ccode>wp_config.php\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>define( 'TMPL_DICT_JS_VAR_NAME', 'dict' );\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Then you can use it in JS:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>$('#some-element').text( dict.the_code );\n\u003C\u002Fcode>\u003C\u002Fpre>\n","A plugin for developers which provides template variables dictionary editable in backend.",1785,0,"2020-11-16T19:42:00.000Z","5.5.18","4.5","",[26,27,28,29,30],"dictionary","options","settings","template","variables","https:\u002F\u002Fdownloads.wordpress.org\u002Fplugin\u002Ftemplate-dictionary.1.6.1.zip",null,"2026-03-15T15:16:48.613Z"]