Title: User defined functions
Last modified: September 8, 2023

---

# User defined functions

 *  [hupe13](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/user-defined-functions/)
 * I have some user defined functions. All works as expected. But I have to click
   and write a lot until a function is activated for a block. Is there a shorter
   way to do this?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [wickedplugins](https://wordpress.org/support/users/wickedplugins/)
 * (@wickedplugins)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/user-defined-functions/#post-17036283)
 * Hi [@hupe13](https://wordpress.org/support/users/hupe13/),
 * Can you give me a bit more details on what you mean by having to click and write
   a lot for the function to be activated?
 *  Thread Starter [hupe13](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/user-defined-functions/#post-17036472)
 * My website is [https://leafext.de](https://leafext.de). I have two functions:
 *     ```wp-block-code
       function englisch () {
       	if (get_locale() != "de_DE" ) {
       		return true;
       	} else {
       		return false;
       	}
       }
       function deutsch () {
       	if (get_locale() != "de_DE" ) {
       		return false;
       	} else {
       		return true;
       	}
       }
       ```
   
 * I add a new (one) post for both german and english speaking visitors. If they
   call [https://leafext.de](https://leafext.de) they get the german content, if
   they call [https://leafext.de/en/](https://leafext.de/en/) they get the english
   content. So I write the headers and the text blocks both in german and in english.
   For each these blocks I make a condition:
    - I click “Display Conditions”
    - I click “Add Condition”
    - I click “Check a user defined function”
    - I write in the function field “deutsch” or “englisch”
    - I click “save”
 * Is it possible to simplify steps 2-4 and combine them into one once done? Similar
   to custom fields. After using them once, they are ready to use afterwards.
 *  Plugin Author [wickedplugins](https://wordpress.org/support/users/wickedplugins/)
 * (@wickedplugins)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/user-defined-functions/#post-17037038)
 * Thanks for the additional info. So do you think something like the ability to
   save a condition that could be added to other blocks would do the trick?
 * So perhaps it would work something like this:
    - When creating a new condition, have the ability to save the condition to your
      library
    - Click “Display Conditions” on a new block
    - Click “Add Condition”
    - Choose a previously-saved condition to add
 * Would that help?
 *  Thread Starter [hupe13](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/user-defined-functions/#post-17037357)
 * Yes, something like that.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘User defined functions’ is closed to new replies.

 * ![](https://ps.w.org/wicked-block-conditions/assets/icon-256x256.png?rev=2941036)
 * [Wicked Block Conditions](https://wordpress.org/plugins/wicked-block-conditions/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wicked-block-conditions/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wicked-block-conditions/)
 * [Active Topics](https://wordpress.org/support/plugin/wicked-block-conditions/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wicked-block-conditions/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wicked-block-conditions/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [hupe13](https://wordpress.org/support/users/hupe13/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/user-defined-functions/#post-17037357)
 * Status: not resolved