• Resolved johnzoet1

    (@johnzoet1)


    Warning: _() expects exactly 1 parameter, 2 given in D:\xampp\htdocs\wordpress-5.1\wordpress\wp-content\plugins\cf7-grid-layout\assets\cf7-admin-table\admin\cf7-post-admin-table.php on line 431

    Seems I simply cannot get cf7 grid layout plugin working on localhost.
    I have WordPress 5.1.1
    PHP Version 7.3.2
    Shortcode in form:
    [cf7form key=”cf7-grid”]

    PHP code:

    if(empty($a['cf7key'])){
           return '<em>' . _('cf7-form shortcode missing key attribute','cf7-admin-table') . '</em>';
    }
Viewing 1 replies (of 1 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    haha! Thanks for this, I realised I missed one ‘_’ (underscore) on that function, it should read,

    
    if(empty($a['cf7key'])){
            return '<em>' . __('cf7-form shortcode missing key attribute','cf7-admin-table') . '</em>';
          }

    also, you’re getting this warning triggered because your shortcode is erroneous, it is expecting the cf7key attribute, you are using key. Use,

    [cf7form cfykey=”cf7-grid”]

    This is a minor bug which does not affect the usage of the plugin, so I will include it in the next release.

Viewing 1 replies (of 1 total)
  • The topic ‘Warning: _() expects exactly 1 parameter, 2 given’ is closed to new replies.