Plugin Directory

Changeset 2848029


Ignore:
Timestamp:
01/13/2023 03:28:46 PM (3 years ago)
Author:
gravitywp
Message:

Bump GravityWP - Merge Tags to version 1.2.0.

Added filter for Meta tab. Added quick links to Merge Tags in top admin menu for recent forms. Added {today} merge tag to standard Merge Tags tab. Fix url query string excel formula template. Include ENCODEURL in excel formula template + localized version. Minor type fixes and code quality improvements. Updated Gravity View Merge Tags list for Meta tab.

Location:
gravitywp-merge-tags
Files:
20 added
9 edited

Legend:

Unmodified
Added
Removed
  • gravitywp-merge-tags/trunk/class-gwp-mergetags.php

    r2786840 r2848029  
    66GFForms::include_addon_framework();
    77
     8
     9/**
     10 * GWPMergeTags.
     11 *
     12 * @author GravityWP
     13 * @since v0.0.1
     14 * @version v1.0.0
     15 * @see GFAddOn
     16 *
     17 * @global
     18 */
    819class GWPMergeTags extends GFAddOn {
    920
    10     protected $_version                  = GWP_MERGETAGS_VERSION;
     21    /**
     22     * @var string $_version
     23     */
     24    protected $_version = GWP_MERGETAGS_VERSION;
     25    /**
     26     * @var string $_min_gravityforms_version
     27     */
    1128    protected $_min_gravityforms_version = '1.9';
    12     protected $_slug                     = 'gravitywp-merge-tags';
    13     protected $_path                     = 'gravitywp-merge-tags/gravitywp-merge-tags.php';
    14     protected $_full_path                = __FILE__;
    15     protected $_title                    = 'Merge Tags';
    16     protected $_short_title              = 'Merge Tags';
    17 
     29
     30    /**
     31     * @var string $_slug
     32     */
     33    protected $_slug = 'gravitywp-merge-tags';
     34    /**
     35     * @var string $_path
     36     */
     37    protected $_path = 'gravitywp-merge-tags/gravitywp-merge-tags.php';
     38    /**
     39     * @var string $_full_path
     40     */
     41    protected $_full_path = __FILE__;
     42    /**
     43     * @var string $_title
     44     */
     45    protected $_title = 'Merge Tags';
     46    /**
     47     * @var string $_short_title
     48     */
     49    protected $_short_title = 'Merge Tags';
     50
     51    /**
     52     * @var GWPMergeTags $_instance
     53     */
    1854    private static $_instance = null;
    1955
     56    /**
     57     * Function: __construct.
     58     *
     59     * @author GravityWP
     60     * @since v0.0.1
     61     * @version v1.0.0
     62     * @access public
     63     *
     64     * @return void
     65     */
    2066    public function __construct() {
    2167        $this->_capabilities_plugin_page   = 'gravityforms_edit_forms';
     
    2571
    2672    /**
     73     * Override this function to perform tasks during WordPress initialization.
     74     *
     75     * @return void
     76     */
     77    public function init() {
     78        parent::init();
     79        add_filter('wp_before_admin_bar_render', [__CLASS__, 'admin_bar'], 20);
     80    }
     81
     82    /**
    2783     * Get an instance of this class.
    2884     *
     
    3793    }
    3894
     95    /**
     96     * Function: scripts.
     97     *
     98     * @author GravityWP
     99     * @since v0.0.1
     100     * @version v1.0.0
     101     * @access public
     102     *
     103     * @return array<mixed>
     104     */
    39105    public function scripts() {
    40106        return array_merge(
     
    57123     * Target of the plugin menu left nav icon. Displays the outer plugin page markup and calls plugin_page() to render the actual page.
    58124     * Override plugin_page() in order to provide a custom plugin page
     125     *
     126     * @author GravityWP
     127     * @since v0.0.1
     128     * @version v1.0.0
     129     * @access public
     130     *
     131     * @return void
    59132     */
    60133    public function plugin_page_container() {
     
    93166
    94167    /**
     168     * Modifies the top WordPress toolbar to add Gravity Forms menu items.
     169     *
     170     * @since   Unknown
     171     *
     172     * @global $wp_admin_bar
     173     *
     174     * @used-by GFForms::init()
     175     *
     176     * @return void
     177     */
     178    public static function admin_bar( ) {
     179        /**
     180         * @var  WP_Admin_Bar $wp_admin_bar
     181         */
     182        global $wp_admin_bar;
     183
     184        $recent_form_ids = GFFormsModel::get_recent_forms();
     185
     186        if ( $recent_form_ids ) {
     187            $forms = GFFormsModel::get_form_meta_by_id( $recent_form_ids );
     188
     189            foreach ( $recent_form_ids as $recent_form_id ) {
     190
     191                if ( GFCommon::current_user_can_any( 'gravityforms_edit_forms' ) ) {
     192                    $wp_admin_bar->add_node(
     193                        array(
     194                            'id'     => 'gform-form-' . $recent_form_id . '-mergetags',
     195                            'parent' => 'gform-form-' . $recent_form_id,
     196                            'title'  => esc_html__( 'Merge Tags', 'gravityforms' ),
     197                            'href'   => admin_url( 'admin.php?page=gravitywp-merge-tags&tab=merge-tags&id=' . $recent_form_id ),
     198                        )
     199                    );
     200                }
     201            }
     202        }
     203    }
     204   
     205    /**
    95206     * Creates a custom admin page for GravityWP - Merge Tags
     207     *
     208     * @author GravityWP
     209     * @since v0.0.1
     210     * @version v1.0.0
     211     * @access public
     212     *
     213     * @return void
    96214     */
    97215    public function plugin_page() {
     
    105223            $form       = RGFormsModel::get_form_meta( absint( $_GET['id'] ) );
    106224
     225            /**
     226             * Function: gwp_create_menu_item.
     227             *
     228             * @author GravityWP
     229             * @since v0.0.1
     230             * @version v1.0.0
     231             * @param string $slug
     232             * @param string $title
     233             *
     234             * @return void
     235             */
    107236            function gwp_create_menu_item( $slug, $title ) {
    108237                $url    = 'href=?page=gravitywp-merge-tags&id=' . absint( $_GET['id'] );
  • gravitywp-merge-tags/trunk/gravitywp-merge-tags.php

    r2786840 r2848029  
    44Plugin URI: https://gravitywp.com/plugin/merge-tags
    55Description: Gravity Forms add-on to list all the merge tags from a specific form
    6 Version: 1.1.4
     6Version: 1.2.0
    77Author: GravityWP
    88Author URI: https://gravitywp.com
     
    1212*/
    1313
    14 define( 'GWP_MERGETAGS_VERSION', '1.1.4' );
     14define( 'GWP_MERGETAGS_VERSION', '1.2.0' );
    1515
    1616add_action( 'gform_loaded', array( 'GWPMergeTags_AddOn_Bootstrap', 'load' ), 5 );
    1717
     18/**
     19 * GWPMergeTags_AddOn_Bootstrap.
     20 *
     21 * @author GravityWP
     22 * @since v0.0.1
     23 * @version v1.0.0
     24 *
     25 * @global
     26 */
    1827class GWPMergeTags_AddOn_Bootstrap {
    1928
     29    /**
     30     * Function: load.
     31     *
     32     * @author GravityWP
     33     * @since v0.0.1
     34     * @version v1.0.0
     35     * @access public
     36     *
     37     * @return void
     38     */
    2039    public static function load() {
    2140
     
    3150
    3251add_filter( 'gform_toolbar_menu', 'gwpmergetags_toolbar', 10, 2 );
     52/**
     53 * Function: gwpmergetags_toolbar.
     54 *
     55 * @author GravityWP
     56 * @since v0.0.1
     57 * @version v1.0.0
     58 * @global
     59 * @param array<mixed> $menu_items
     60 * @param int          $form_id
     61 *
     62 * @return mixed
     63 */
    3364function gwpmergetags_toolbar( $menu_items, $form_id ) {
    3465
     
    4980add_action( 'plugins_loaded', 'gwp_merge_tags_load_textdomain' );
    5081
     82/**
     83 * Function: gwp_merge_tags_load_textdomain.
     84 *
     85 * @author GravityWP
     86 * @since v0.0.1
     87 * @version v1.0.0
     88 * @global
     89 *
     90 * @return void
     91 */
    5192function gwp_merge_tags_load_textdomain() {
    5293    load_plugin_textdomain( 'gravitywp-merge-tags', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
  • gravitywp-merge-tags/trunk/languages/gravitywp-merge-tags-nl_NL.po

    r2670736 r2848029  
    22msgstr ""
    33"Project-Id-Version: GravityWP - Merge Tags\n"
    4 "POT-Creation-Date: 2022-01-27 16:22+0100\n"
    5 "PO-Revision-Date: 2022-01-27 16:26+0100\n"
     4"POT-Creation-Date: 2022-11-16 13:36+0100\n"
     5"PO-Revision-Date: 2022-11-16 13:39+0100\n"
    66"Last-Translator: \n"
    77"Language-Team: \n"
     
    1717"X-Poedit-SourceCharset: UTF-8\n"
    1818"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
    19 "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
    20 "_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
     19"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
     20"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
    2121"X-Poedit-SearchPath-0: .\n"
    2222"X-Poedit-SearchPathExcluded-0: *.js\n"
    2323
    24 #: class-gwp-mergetags.php:131 templates/template-merge-tags.php:6
     24#: class-gwp-mergetags.php:212 templates/template-merge-tags.php:6
    2525msgid "Merge Tags"
    2626msgstr "Merge Tags"
    2727
    28 #: class-gwp-mergetags.php:134
     28#: class-gwp-mergetags.php:215
    2929msgid "Advanced"
    3030msgstr "Geavanceerd"
    3131
    32 #: class-gwp-mergetags.php:137
     32#: class-gwp-mergetags.php:218
     33msgid "Conditional Logic"
     34msgstr "Conditionele logica"
     35
     36#: class-gwp-mergetags.php:221
    3337msgid "Meta"
    3438msgstr ""
    3539
    36 #: class-gwp-mergetags.php:141
     40#: class-gwp-mergetags.php:225
    3741msgid "Workflow"
    3842msgstr ""
    3943
    40 #: class-gwp-mergetags.php:145 templates/template-all-fields.php:9
     44#: class-gwp-mergetags.php:229 templates/template-all-fields.php:9
    4145#: templates/template-all-fields.php:12
    4246msgid "All Fields"
    4347msgstr "Alle Velden"
    4448
    45 #: class-gwp-mergetags.php:154
     49#: class-gwp-mergetags.php:238
    4650msgid "Template not found."
    4751msgstr "Sjabloon niet gevonden."
    4852
    49 #: class-gwp-mergetags.php:176
     53#: class-gwp-mergetags.php:260
    5054msgid "Select Form"
    5155msgstr "Selecteer een formulier"
     
    6367msgstr "Vervang de merge tag voor Alle Velden"
    6468
    65 #: templates/template-all-fields.php:61
     69#: templates/template-all-fields.php:60
    6670msgid "Replace All Fields Merge Tag without fileuploads"
    6771msgstr "Vervang de merge tag voor Alle Velden zonder bestanduploads"
     72
     73#: templates/template-conditional-logic.php:14
     74#: templates/template-conditional-logic.php:103
     75#: templates/template-gravity-flow.php:11
     76msgid "ID"
     77msgstr ""
     78
     79#: templates/template-conditional-logic.php:15
     80#: templates/template-conditional-logic.php:104
     81#: templates/template-merge-tags-advanced.php:67
     82msgid "Field Label"
     83msgstr "Veld Label"
     84
     85#: templates/template-conditional-logic.php:16
     86#: templates/template-conditional-logic.php:105
     87msgid "Admin Label"
     88msgstr "Beheerders Label"
     89
     90#: templates/template-conditional-logic.php:17
     91msgid "Show / Hide"
     92msgstr ""
     93
     94#: templates/template-conditional-logic.php:18
     95msgid "Match"
     96msgstr ""
     97
     98#: templates/template-conditional-logic.php:19
     99msgid "Rules"
     100msgstr ""
     101
     102#: templates/template-conditional-logic.php:106
     103msgid "Used in conditional logic of field with ID"
     104msgstr ""
    68105
    69106#: templates/template-gravity-flow.php:10
     
    71108msgstr "GravityFlow Stap"
    72109
    73 #: templates/template-gravity-flow.php:11
    74 msgid "ID"
    75 msgstr ""
    76 
    77110#: templates/template-gravity-flow.php:13
    78111msgid "Active"
     
    91124msgstr ""
    92125
    93 #: templates/template-merge-tags-advanced.php:34
    94 msgid "Field Label"
    95 msgstr "Veld Label"
    96 
    97 #: templates/template-merge-tags-advanced.php:35
     126#: templates/template-merge-tags-advanced.php:68
    98127msgid "Admin Label / value"
    99 msgstr "Admin label / waarde"
    100 
    101 #: templates/template-merge-tags-advanced.php:36
     128msgstr "Beheerders label / waarde"
     129
     130#: templates/template-merge-tags-advanced.php:69
    102131msgid "Merge Tag"
    103132msgstr "Merge Tag"
    104133
    105 #: templates/template-merge-tags-advanced.php:37
     134#: templates/template-merge-tags-advanced.php:70
    106135msgid "Merge Tag (admin)"
    107136msgstr ""
    108137
    109 #: templates/template-merge-tags-advanced.php:38
     138#: templates/template-merge-tags-advanced.php:71
    110139msgid "Merge Tags (short)"
    111140msgstr "Merge Tags (kort)"
    112141
    113 #: templates/template-merge-tags-advanced.php:39
     142#: templates/template-merge-tags-advanced.php:72
    114143msgid "Populate"
    115144msgstr ""
    116145
    117 #: templates/template-merge-tags-advanced.php:40
     146#: templates/template-merge-tags-advanced.php:73
    118147msgid "CSS"
    119148msgstr ""
    120149
    121 #: templates/template-merge-tags-advanced.php:41
     150#: templates/template-merge-tags-advanced.php:74
    122151msgid "Field Type"
    123152msgstr "Veld Type"
    124153
    125 #: templates/template-merge-tags-advanced.php:42
     154#: templates/template-merge-tags-advanced.php:75
    126155msgid "Field ID"
    127156msgstr "Veld ID"
    128157
    129 #: templates/template-merge-tags-advanced.php:99
     158#: templates/template-merge-tags-advanced.php:132
    130159msgid "Url query string template for dynamic population"
    131160msgstr "Url-queryreekssjabloon voor dynamisch vullen"
    132161
    133 #: templates/template-merge-tags-advanced.php:107
    134 msgid "Excel formula for generating url query string"
    135 msgstr "Excel-formule voor het genereren van url-queryreeks"
     162#: templates/template-merge-tags-advanced.php:140
     163msgid "Excel formula for generating url (encoded) query string (International)"
     164msgstr ""
     165"Excel-formule voor het genereren van url (gecodeerde) queryreeks "
     166"(internationaal)"
     167
     168#: templates/template-merge-tags-advanced.php:148
     169msgid "Excel formula for generating url (encoded) query string (Localized)"
     170msgstr ""
     171"Excel-formule voor het genereren van url (gecodeerde) queryreeks "
     172"(gelokaliseerd)"
     173
     174#. translators: Translate to localized excel function.
     175#: templates/template-merge-tags-advanced.php:154
     176msgid "ENCODEURL"
     177msgstr "URL.CODEREN"
    136178
    137179#. Plugin Name of the plugin/theme
     
    146188msgid "Gravity Forms add-on to list all the merge tags from a specific form"
    147189msgstr ""
    148 "Gravity Forms add-on om alle Merge Tags van een specifiek formulier weer "
    149 "te geven"
     190"Gravity Forms add-on om alle Merge Tags van een specifiek formulier weer te "
     191"geven"
    150192
    151193#. Author of the plugin/theme
  • gravitywp-merge-tags/trunk/languages/gravitywp-merge-tags.pot

    r2670736 r2848029  
    44"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
    55"Project-Id-Version: GravityWP - Merge Tags\n"
    6 "POT-Creation-Date: 2022-01-27 16:22+0100\n"
     6"POT-Creation-Date: 2022-11-16 13:35+0100\n"
    77"PO-Revision-Date: 2017-10-01 23:00+0200\n"
    88"Last-Translator: \n"
     
    2222"X-Poedit-SearchPathExcluded-0: *.js\n"
    2323
    24 #: class-gwp-mergetags.php:131 templates/template-merge-tags.php:6
     24#: class-gwp-mergetags.php:212 templates/template-merge-tags.php:6
    2525msgid "Merge Tags"
    2626msgstr ""
    2727
    28 #: class-gwp-mergetags.php:134
     28#: class-gwp-mergetags.php:215
    2929msgid "Advanced"
    3030msgstr ""
    3131
    32 #: class-gwp-mergetags.php:137
     32#: class-gwp-mergetags.php:218
     33msgid "Conditional Logic"
     34msgstr ""
     35
     36#: class-gwp-mergetags.php:221
    3337msgid "Meta"
    3438msgstr ""
    3539
    36 #: class-gwp-mergetags.php:141
     40#: class-gwp-mergetags.php:225
    3741msgid "Workflow"
    3842msgstr ""
    3943
    40 #: class-gwp-mergetags.php:145 templates/template-all-fields.php:9
     44#: class-gwp-mergetags.php:229 templates/template-all-fields.php:9
    4145#: templates/template-all-fields.php:12
    4246msgid "All Fields"
    4347msgstr ""
    4448
    45 #: class-gwp-mergetags.php:154
     49#: class-gwp-mergetags.php:238
    4650msgid "Template not found."
    4751msgstr ""
    4852
    49 #: class-gwp-mergetags.php:176
     53#: class-gwp-mergetags.php:260
    5054msgid "Select Form"
    5155msgstr ""
     
    6367msgstr ""
    6468
    65 #: templates/template-all-fields.php:61
     69#: templates/template-all-fields.php:60
    6670msgid "Replace All Fields Merge Tag without fileuploads"
     71msgstr ""
     72
     73#: templates/template-conditional-logic.php:14
     74#: templates/template-conditional-logic.php:103
     75#: templates/template-gravity-flow.php:11
     76msgid "ID"
     77msgstr ""
     78
     79#: templates/template-conditional-logic.php:15
     80#: templates/template-conditional-logic.php:104
     81#: templates/template-merge-tags-advanced.php:67
     82msgid "Field Label"
     83msgstr ""
     84
     85#: templates/template-conditional-logic.php:16
     86#: templates/template-conditional-logic.php:105
     87msgid "Admin Label"
     88msgstr ""
     89
     90#: templates/template-conditional-logic.php:17
     91msgid "Show / Hide"
     92msgstr ""
     93
     94#: templates/template-conditional-logic.php:18
     95msgid "Match"
     96msgstr ""
     97
     98#: templates/template-conditional-logic.php:19
     99msgid "Rules"
     100msgstr ""
     101
     102#: templates/template-conditional-logic.php:106
     103msgid "Used in conditional logic of field with ID"
    67104msgstr ""
    68105
    69106#: templates/template-gravity-flow.php:10
    70107msgid "Gravity Flow Step"
    71 msgstr ""
    72 
    73 #: templates/template-gravity-flow.php:11
    74 msgid "ID"
    75108msgstr ""
    76109
     
    91124msgstr ""
    92125
    93 #: templates/template-merge-tags-advanced.php:34
    94 msgid "Field Label"
    95 msgstr ""
    96 
    97 #: templates/template-merge-tags-advanced.php:35
     126#: templates/template-merge-tags-advanced.php:68
    98127msgid "Admin Label / value"
    99128msgstr ""
    100129
    101 #: templates/template-merge-tags-advanced.php:36
     130#: templates/template-merge-tags-advanced.php:69
    102131msgid "Merge Tag"
    103132msgstr ""
    104133
    105 #: templates/template-merge-tags-advanced.php:37
     134#: templates/template-merge-tags-advanced.php:70
    106135msgid "Merge Tag (admin)"
    107136msgstr ""
    108137
    109 #: templates/template-merge-tags-advanced.php:38
     138#: templates/template-merge-tags-advanced.php:71
    110139msgid "Merge Tags (short)"
    111140msgstr ""
    112141
    113 #: templates/template-merge-tags-advanced.php:39
     142#: templates/template-merge-tags-advanced.php:72
    114143msgid "Populate"
    115144msgstr ""
    116145
    117 #: templates/template-merge-tags-advanced.php:40
     146#: templates/template-merge-tags-advanced.php:73
    118147msgid "CSS"
    119148msgstr ""
    120149
    121 #: templates/template-merge-tags-advanced.php:41
     150#: templates/template-merge-tags-advanced.php:74
    122151msgid "Field Type"
    123152msgstr ""
    124153
    125 #: templates/template-merge-tags-advanced.php:42
     154#: templates/template-merge-tags-advanced.php:75
    126155msgid "Field ID"
    127156msgstr ""
    128157
    129 #: templates/template-merge-tags-advanced.php:99
     158#: templates/template-merge-tags-advanced.php:132
    130159msgid "Url query string template for dynamic population"
    131160msgstr ""
    132161
    133 #: templates/template-merge-tags-advanced.php:107
    134 msgid "Excel formula for generating url query string"
     162#: templates/template-merge-tags-advanced.php:140
     163msgid ""
     164"Excel formula for generating url (encoded) query string (International)"
     165msgstr ""
     166
     167#: templates/template-merge-tags-advanced.php:148
     168msgid "Excel formula for generating url (encoded) query string (Localized)"
     169msgstr ""
     170
     171#. translators: Translate to localized excel function.
     172#: templates/template-merge-tags-advanced.php:154
     173msgid "ENCODEURL"
    135174msgstr ""
    136175
  • gravitywp-merge-tags/trunk/readme.txt

    r2786840 r2848029  
    44Tags: gravity forms, mergetag, merge tag, mergetags, form, forms, gravity form
    55Requires at least: 3.0.1
    6 Tested up to: 5.9
    7 Stable tag: 1.1.4
     6Tested up to: 6.1
     7Stable tag: 1.2.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1212
    1313== Description ==
    14 This Gravity Forms Add-on adds an admin page to your WordPress back-end with a list of all the merge tags in your form.
     14The documentation for GravityWP - Merge Tags is available on [GravityWP.com](https://gravitywp.com/docs/merge-tags/).
    1515
    16 Besides that it gives you information (in different tabs) about field types (for example text, radio, hidden, select, email, checkbox, etc), Standard (Meta) Gravity Forms Merge Tags (and Merge Tags from GravityView and Gravity Flow), a replacement for the all_fields Merge Tag (with or without fileuploads) and Gravity Flow Step information.
     16This Gravity Forms Add-on adds an admin page to your WordPress back-end with a list of all the merge tags in your form. Besides that it gives you information (in different tabs) about field types (for example text, radio, hidden, select, email, checkbox, etc), Standard (Meta) Gravity Forms Merge Tags (and Merge Tags from GravityView and Gravity Flow), a replacement for the all_fields Merge Tag (with or without fileuploads) and Gravity Flow Step information.
    1717
    1818So... no more clicking on a dropdown to select the Merge Tag you need, but just copy and paste it from the list. And have a quick overview of all relevant information available for every specific Gravity Form on your site, copy it to Excel and use it in a way that suits your needs.
     
    3838* **All Fields**: An alternative for the all_fields Merge Tag, which you can modify and customize. Option to select a table with or without fileuploads.
    3939
     40= How can I add merge tags of my own plugin to the Merge Tags Meta tab? =
     41
     42By using the 'gwp_merge_tags_meta_merge_tags' filter, for example:
     43
     44`add_filter( 'gwp_merge_tags_meta_merge_tags', 'my_plugin', 10, 1 );
     45function my_plugin( $gwp_merge_tags ) {
     46    $gwp_merge_tags['my_plugin']['name']   = 'My custom table';
     47    $gwp_merge_tags['my_plugin']['url']    = 'https://gravitywp.com';
     48    $gwp_merge_tags['my_plugin']['values'] = array(
     49        'merge_tag_1',
     50        'merge_tag_2',
     51    );
     52    return $gwp_merge_tags;
     53}`
     54
     55The $gwp_merge_tags variable is an associative array, which you can add your own merge tags to.
     56`$gwp_merge_tags['key']` a unique key for your plugin.
     57`$gwp_merge_tags['key']['name']` contains the title for the table header.
     58`$gwp_merge_tags['key']['url']` URL for the plugin website.
     59`$gwp_merge_tags['key']['values']` an array with merge tags.
    4060
    4161
     
    49696. The menu link under Forms (admin menu)
    50707. Gravity Flow Step information for the current form (Step name, ID, Type, Active, Conditions)
    51 8. Information about the conditional logic in your Form (shows an overview of fields with active conditional logic rules and an overview of fields used in conditional logic rules)
    5271
    5372== Changelog ==
     73= 1.2.0 =
     74* Added filter for Meta tab.
     75* Added quick links to Merge Tags in top admin menu for recent forms.
     76* Added {today} merge tag to standard Merge Tags tab.
     77* Fix url query string excel formula template.
     78* Include ENCODEURL in excel formula template + localized version.
     79* Minor type fixes and code quality improvements.
     80* Updated Gravity View Merge Tags list for Meta tab.
    5481
    5582= 1.1.4 =
  • gravitywp-merge-tags/trunk/templates/template-gravity-flow.php

    r2721960 r2848029  
    9797                </td>
    9898                <td><?php echo esc_html( $next_step_str ); ?></td>
    99                 <td>[gravitywp_count formid=<?php echo esc_html( absint( $_GET['id'] ) ); ?> workflow_step=<?php echo esc_html( $step->get_id() ); ?>]</td>
     99                <td>[gravitywp_count formid=<?php echo esc_html( (string) absint( $_GET['id'] ) ); ?> workflow_step=<?php echo esc_html( (string) $step->get_id() ); ?>]</td>
    100100            </tr>
    101101            <?php
  • gravitywp-merge-tags/trunk/templates/template-merge-tags-advanced.php

    r2786840 r2848029  
    119119            if ( ! empty( $field['inputName'] ) ) {
    120120                $pre_fill_url       .= $field['inputName'] . '=MERGETAG&';
    121                 $pre_fill_url_excel .= $field['inputName'] . '="&CELL&"&';
     121                $pre_fill_url_excel .= $field['inputName'] . '="&ENCODEURL(CELL)&"&';
    122122            }
    123123        }
     
    138138<thead>
    139139    <tr>
    140         <th colspan='6'><?php esc_html_e( 'Excel formula for generating url query string', 'gravitywp-merge-tags' ); ?></th>
     140        <th colspan='6'><?php esc_html_e( 'Excel formula for generating url (encoded) query string (International)', 'gravitywp-merge-tags' ); ?></th>
    141141    </tr>
    142142</thead>
    143143    <tr>
    144         <td colspan="6"><?php echo esc_html( rtrim( $pre_fill_url_excel, '&' ) ); ?></td>
     144        <td colspan="6"><?php echo esc_html( rtrim( $pre_fill_url_excel, '&"&' ) ); ?></td>
     145    </tr>
     146<thead>
     147    <tr>
     148        <th colspan='6'><?php esc_html_e( 'Excel formula for generating url (encoded) query string (Localized)', 'gravitywp-merge-tags' ); ?></th>
     149    </tr>
     150</thead>
     151    <tr>
     152        <td colspan="6"><?php
     153        /* translators: Translate to localized excel function. */
     154        $excel_replace = esc_html__( 'ENCODEURL', 'gravitywp-merge-tags' );
     155        echo esc_html( str_replace( 'ENCODEURL', $excel_replace, rtrim( $pre_fill_url_excel, '&"&' ) ) ); ?>
     156        </td>
    145157    </tr>
    146158</tbody>
  • gravitywp-merge-tags/trunk/templates/template-standard-merge-tags.php

    r2721960 r2848029  
    33class_exists( 'GFForms' ) || die();
    44
    5 $gwp_standard_mergetags = array(
     5$gwp_merge_tags = array();
     6
     7$gwp_merge_tags['gravity_forms_merge_tags']['name']   = 'Gravity Forms Merge Tags';
     8$gwp_merge_tags['gravity_forms_merge_tags']['url']    = '';
     9$gwp_merge_tags['gravity_forms_merge_tags']['values'] = array(
    610    'all_fields',
    711    'all_fields:admin',
     
    4650    'payment_action:note',
    4751    'payment_action:type',
     52    'today',
     53    'today:time',
     54    'today:format:Y-m-d',
     55    'today:timestamp',
    4856    'user:display_name',
    4957    'user:user_email',
     
    5260);
    5361
    54 $gwp_gv_mergetags = array(
     62$gwp_merge_tags['gravity_view_merge_tags']['name']   = 'Gravity View';
     63$gwp_merge_tags['gravity_view_merge_tags']['url']    = 'https://gravityview.co/?ref=115';
     64$gwp_merge_tags['gravity_view_merge_tags']['values'] = array(
    5565    'get',
    5666    'approval_status',
     
    6777    'created_by',
    6878    'created_by:ID',
     79    'current_post',
     80    'current_post:ID',
     81    'current_post:title',
     82    'current_post:post_type',
     83    'current_post:permalink',
     84    'sequence',
     85    'sequence start=[number]',
     86    'sequence reverse',
     87    'sequence reverse start=[number]',
     88    'is_starred',
     89
    6990);
    7091
    71 $gwp_gv_mergetag_modifiers = array(
     92$gwp_merge_tags['gravity_view_modifiers']['name']   = 'Gravity View Modifiers';
     93$gwp_merge_tags['gravity_view_modifiers']['url']    = 'https://gravityview.co/?ref=115';
     94$gwp_merge_tags['gravity_view_modifiers']['values'] = array(
    7295    ':esc_html',
    7396    ':sanitize_title',
     
    77100);
    78101
    79 $gwp_gflow_mergetags = array(
     102$gwp_merge_tags['gravity_flow_merge_tags']['name']   = 'Gravity Flow';
     103$gwp_merge_tags['gravity_flow_merge_tags']['url']    = 'https://gravityflow.io/?ref=2';
     104$gwp_merge_tags['gravity_flow_merge_tags']['values'] = array(
    80105    'workflow_entry_link',
    81106    'workflow_entry_url',
     
    92117);
    93118
    94 $gwp_adv_mertag_modifiers = array(
     119$gwp_merge_tags['advanced_merge_tags_modifiers']['name']   = 'GravityWP Advanced Merge Tags - Modifiers';
     120$gwp_merge_tags['advanced_merge_tags_modifiers']['url']    = 'https://gravitywp.com/add-on/advanced-merge-tags/?utm_source=merge-tag-plugin&utm_medium=plugin-ad&utm_campaign=meta-tab-addon-link';
     121$gwp_merge_tags['advanced_merge_tags_modifiers']['values'] = array(
    95122    ':gwp_append',
    96123    ':gwp_case',
     
    110137    ':gwp_word_count',
    111138);
     139
     140$gwp_merge_tags = apply_filters( 'gwp_merge_tags_meta_merge_tags', $gwp_merge_tags )
    112141?>
    113142
    114 <style>.gwp_div {width:32%; min-width: 300px; margin-right:1%; float:left !important;} .widefat {clear: none; }</style>
    115143<p></p>
    116 <div class="inner-wrap">
    117 <table class='wp-list-table widefat striped gwp_div' cellspacing='0'>
     144<div class="inner-wrap" style="column-count: 3;">
     145
     146<?php foreach ( $gwp_merge_tags as $gwp_merge_tag ) { ?>
     147
     148<table class='wp-list-table widefat striped gwp_div' cellspacing='0' style="break-inside: avoid-column;">
    118149    <thead>
    119150        <tr>
    120             <td>Gravity Forms Merge Tags</td>
     151            <td><a href="<?php echo esc_attr( $gwp_merge_tag['url'] ) ?>" target="_blank">
     152            <span class="dashicons dashicons-external"></span><?php echo esc_html( $gwp_merge_tag['name'] ); ?></a></td>
    121153        </tr>
    122154    </thead>
    123155    <tbody>
    124     <?php
    125     foreach ( $gwp_standard_mergetags as $gwp_standard_mergetag ) {
    126         ?>
    127             <tr>
    128                 <td>{<?php echo esc_html( $gwp_standard_mergetag ); ?>}</td>
    129             </tr>
    130             <?php
    131     }
    132     ?>
     156            <?php foreach ( $gwp_merge_tag['values'] as $value ) { ?>
     157                <tr>
     158                    <td style="position:relative;">
     159                        <?php echo esc_html( $value ); ?>
     160                    </td>
     161                </tr>
     162                <?php
     163            }  ?>
    133164    </tbody>
    134165</table>
    135 <table class='wp-list-table widefat striped gwp_div' cellspacing='0'>
    136     <thead>
    137         <tr>
    138             <td><a href='https://gravityview.co/?ref=115' target='_blank'><span class="dashicons dashicons-external"></span>GravityView</a></td>
    139         </tr>
    140     </thead>
    141     <tbody>
    142166    <?php
    143     foreach ( $gwp_gv_mergetags as $gwp_gv_mergetag ) {
    144         ?>
    145             <tr>
    146                 <td>{<?php echo esc_html( $gwp_gv_mergetag ); ?>}</td>
    147             </tr>
    148             <?php
    149     }
    150     ?>
    151     </tbody>
    152 </table>
    153 
    154 <table class='wp-list-table widefat striped gwp_div' cellspacing='0'>
    155     <thead>
    156         <tr>
    157             <td><a href='https://gravityview.co/?ref=115' target='_blank'><span class="dashicons dashicons-external"></span>GravityView</a> - Modifiers</td>
    158         </tr>
    159     </thead>
    160     <tbody>
    161     <?php
    162     foreach ( $gwp_gv_mergetag_modifiers as $gwp_gv_mergetag_modifier ) {
    163         ?>
    164             <tr>
    165                 <td>{<?php echo esc_html( $gwp_gv_mergetag_modifier ); ?>}</td>
    166             </tr>
    167             <?php
    168     }
    169     ?>
    170     </tbody>
    171 </table>
    172 
    173 <table class='wp-list-table widefat striped gwp_div' cellspacing='0'>
    174     <thead>
    175         <tr>
    176             <td><a href='https://gravityflow.io/?ref=2' target='_blank'><span class="dashicons dashicons-external"></span>Gravity Flow</a></td>
    177         </tr>
    178     </thead>
    179     <tbody>
    180         <?php
    181         foreach ( $gwp_gflow_mergetags as $gwp_gflow_mergetag ) {
    182             ?>
    183             <tr>
    184                 <td>{<?php echo esc_html( $gwp_gflow_mergetag ); ?>}</td>
    185             </tr>
    186             <?php
    187         }
    188         ?>
    189     </tbody>
    190 </table>
    191 
    192 
    193 <table class='wp-list-table widefat striped gwp_div' cellspacing='0'>
    194     <thead>
    195         <tr>
    196             <td><a href='https://gravitywp.com/add-on/advanced-merge-tags/?utm_source=merge-tag-plugin&utm_medium=plugin-ad&utm_campaign=meta-tab-addon-link' target='_blank'><span class="dashicons dashicons-external"></span>GravityWP - Advanced Merge Tags</a> - Modifiers</td>
    197         </tr>
    198     </thead>
    199     <tbody>
    200         <?php
    201         foreach ( $gwp_adv_mertag_modifiers as $gwp_adv_mertag_modifier ) {
    202             ?>
    203             <tr>
    204                 <td>{<?php echo esc_html( $gwp_adv_mertag_modifier ); ?>}</td>
    205             </tr>
    206             <?php
    207         }
    208         ?>
    209     </tbody>
    210 </table>
    211 
     167}
     168?>
    212169
    213170</div>
    214171<div class=clear></div>
     172
Note: See TracChangeset for help on using the changeset viewer.