add_filter('get_public_descriptions', 'theme_get_public_descriptions_filter');

 function theme_get_public_descriptions_filter ($context, $rule_uids)
        $descriptions = array();

        $rule_uids = (array) $rule_uids;

        // Check if at least one rule uid is set
        if (!empty($rule_uids) && is_array($rule_uids)) {

            // Get rules by uids
            $rules = RP_WCDPD_Rules::get($context, array('uids' => $rule_uids), true);

            // Iterate over applicable rules and append their public descriptions
            foreach ($rules as $rule) {
                if (isset($rule['public_note']) && !RightPress_Helper::is_empty($rule['public_note'])) {

                    $descriptions [$rule['uid']]= $rule['public_note'];

        return !empty($descriptions) ? $descriptions : null;
  • What do you want to do exactly? – Akshat Jun 29 '18 at 12:29
  • plugin function move to theme function.php file . – Mathi Vanan Jun 29 '18 at 12:30
  • For? Maybe there's an easy filter which can do what you are trying to do, it'd be better if you can expand your question and mention what you want to do and what all you tried already. – Akshat Jun 29 '18 at 12:33
  • i need to contact form plugin function code overwrite to theme function.php file.any feature plugin update not affect to the my custom code – Mathi Vanan Jun 29 '18 at 12:39
  • so what all you tried and where are you stuck exactly? – Akshat Jun 29 '18 at 12:43

One possible issue is that the file should be named functions.php, not function.php as you have consistently called it.

See Functions File Explained on the Codex.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.