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;

closed as unclear what you're asking by Jacob Peattie, fuxia Jun 29 '18 at 22:30

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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.

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