Title: Julian's Replies | WordPress.org

---

# Julian

  [  ](https://wordpress.org/support/users/jolution/)

 *   [Profile](https://wordpress.org/support/users/jolution/)
 *   [Topics Started](https://wordpress.org/support/users/jolution/topics/)
 *   [Replies Created](https://wordpress.org/support/users/jolution/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/jolution/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/jolution/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/jolution/engagements/)
 *   [Favorites](https://wordpress.org/support/users/jolution/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Germanized for WooCommerce] Kassenseite Inhalte mehrfach aufgeführt](https://wordpress.org/support/topic/kassenseite-inhalte-mehrfach-aufgefuhrt/)
 *  Thread Starter [Julian](https://wordpress.org/support/users/jolution/)
 * (@jolution)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/kassenseite-inhalte-mehrfach-aufgefuhrt/#post-15733089)
 * Hi, alles auf dem neusten Stand.
    Wenn man statt der Module, den Shortcode verwendet,
   funktioniert es.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My Favorites] Simple Output Function for a Selectmenu](https://wordpress.org/support/topic/simple-output-function-for-a-selectmenu/)
 *  Thread Starter [Julian](https://wordpress.org/support/users/jolution/)
 * (@jolution)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/simple-output-function-for-a-selectmenu/#post-15129307)
 * Hi [@millend](https://wordpress.org/support/users/millend/),
 * **Shortcodes:**
 * The confusing thing about my code is that the shortcode for the mail section 
   is called “favorites”. I adjusted it in the upper area of ​​the Gist. Sorry for
   that 🙂
    - CF7 form: [menulist]
    - CF7 Mail: [favorites]
 * **Logged-out users:**
 * Yes, I had that problem too. If you are logged in, [@takashimatsuyama](https://wordpress.org/support/users/takashimatsuyama/)
   uses the database (get_user_meta), otherwise the browser cache (localstorage /
   sanitize_text_field).
    It works for me now. Do you have the current code status?
 * **General:**
    If you want, feel free to optimize my gist. Or if @takashimatsuy
   wants to, I can also push it into the core, if he wanted.
 * Thanks @takashimatsuy for the plugin at this point.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My Favorites] Simple Output Function for a Selectmenu](https://wordpress.org/support/topic/simple-output-function-for-a-selectmenu/)
 *  Thread Starter [Julian](https://wordpress.org/support/users/jolution/)
 * (@jolution)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/simple-output-function-for-a-selectmenu/#post-14931765)
 * I think I got it right, I still have to clean up and test, but looks good so 
   far.
 * P.s. Why can’t I delete or adjust old unanswered comments?
 * Here is my actual code:
    [https://gist.github.com/jolution/7e663f425e3f3286c4527855bf3a66b8](https://gist.github.com/jolution/7e663f425e3f3286c4527855bf3a66b8)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My Favorites] Simple Output Function for a Selectmenu](https://wordpress.org/support/topic/simple-output-function-for-a-selectmenu/)
 *  Thread Starter [Julian](https://wordpress.org/support/users/jolution/)
 * (@jolution)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/simple-output-function-for-a-selectmenu/#post-14926078)
 * Dear takashimatsuyama, my template works when I’m logged in 🙂
    Unfortunately
   I don’t get any data if I’m not logged in :-‘/
 * The source uses the $_POST variable for this, but I don’t know it in the template.
   
   If you want, I can make the finished script available on Github for you, if you
   like.
 * Could you still help me how to get the localStorage data?
 * Here is my actual code:
    [https://gist.github.com/jolution/7e663f425e3f3286c4527855bf3a66b8](https://gist.github.com/jolution/7e663f425e3f3286c4527855bf3a66b8)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My Favorites] Simple Output Function for a Selectmenu](https://wordpress.org/support/topic/simple-output-function-for-a-selectmenu/)
 *  Thread Starter [Julian](https://wordpress.org/support/users/jolution/)
 * (@jolution)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/simple-output-function-for-a-selectmenu/#post-14860105)
 * Good evening ! It’s worked out. I have adapted the code and now an output for
   CF7. You are very welcome to adopt the code or include it in the documentation
   if others could use it.
 *     ```
       // Ticket: https://wordpress.org/support/topic/simple-output-function-for-a-selectmenu/
       // Manual: https://contactform7.com/2015/01/10/adding-a-custom-form-tag/
       add_action('wpcf7_init', 'custom_add_form_tag_clock');
       function custom_add_form_tag_clock() {
           wpcf7_add_form_tag('menulist', 'custom_post_select', true);
       }
   
       function custom_post_select($tag) {
           $output = ccc_my_favorite_list_custom_template();
           return $output;
       }
   
       function ccc_my_favorite_list_custom_template($my_favorite_post_id = false) {
   
           // Source: https://github.com/takashi-matsuyama/my-favorites/blob/e482f31b16612949e1711bda622f97c7232030e0/assets/list.php
           if (is_user_logged_in() == false) {
               $ccc_my_favorite_post = sanitize_text_field($_POST['ccc-my_favorite_post']);
               $my_favorite_post_ids = explode(',', $ccc_my_favorite_post);
   
           } else {
               $user_favorite_post_ids = get_user_meta(wp_get_current_user()->ID, CCC_My_Favorite::CCC_MY_FAVORITE_POST_IDS, true);
               $my_favorite_post_ids = explode(',', $user_favorite_post_ids);
           }
           $my_favorite_post_ids = array_map('htmlspecialchars', $my_favorite_post_ids);
       	$output = '<label>Favoriten</label><select name="favorites" class="wpcf7-form-control wpcf7-select wpcf7-validates-as-required" aria-required="true" aria-invalid="false"><option value="">---</option>';
   
           $args = array(
               'post_type' => 'any',
               'post__in' => $my_favorite_post_ids, //$my_favorite_post_id,
               'orderby' => 'post__in',
               'posts_per_page' => - 1,
           );
           $the_query = new WP_Query($args);
   
           if ($the_query->have_posts()) {
               while ($the_query->have_posts()) {
                   $the_query->the_post();
       			$output .= '<option ';
       			$output .= 'value="' . get_the_title() . '">' . get_the_title() . '</option>';
               }
           }
       	$output .= "</select>";
           return $output;
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My Favorites] Simple Output Function for a Selectmenu](https://wordpress.org/support/topic/simple-output-function-for-a-selectmenu/)
 *  Thread Starter [Julian](https://wordpress.org/support/users/jolution/)
 * (@jolution)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/simple-output-function-for-a-selectmenu/#post-14859406)
 * good evening, thanks for the code. I had already tried the do_shortcode, but 
   it didn’t work for me.
 * With a slight adjustment, I can use your code to ensure that all posts appear,
   but I only needed the favorite ones. Do I have a mistake in reasoning?
 *     ```
       // Ticket: https://wordpress.org/support/topic/simple-output-function-for-a-selectmenu/
   
       	// Manual: https://contactform7.com/2015/01/10/adding-a-custom-form-tag/
       	add_action('wpcf7_init', 'custom_add_form_tag_clock');
       	function custom_add_form_tag_clock() {
       		wpcf7_add_form_tag('menulist', 'custom_post_select', true);
       	}
   
       	function custom_post_select($tag) {
       		//global $post;
       		$output = ccc_my_favorite_list_custom_template();
       		return $output;
       	}
   
       	/*function custom_post_select($tag) {
       		return do_shortcode('[ccc_my_favorite_list_custom_template]');
       	}*/
   
       	// https://de.wordpress.org/plugins/my-favorites/
       	/*function ccc_my_favorite_list_custom_template( $my_favorite_post_id=false ) {
       		return "OUTPUT SELECT LIST WITH FAVORTIES"; //$my_favorite_post_id;
       	}*/
   
       	function ccc_my_favorite_list_custom_template( $my_favorite_post_id=false ) {
       		$output = "";
       		$args= array(
       		  'post_type' => 'any',
       		  'post__in' => $my_favorite_post_id,
       		  'orderby' => 'post__in',
       		  'posts_per_page' => -1,
       		);
       		$the_query = new WP_Query($args);
   
       		if( $the_query->have_posts() ) {
       		  while( $the_query->have_posts() ) {
       			$the_query->the_post();
   
       			$output .= get_the_title() . "<br>";
   
       		  } //endwhile
       		} //endif
       		return $output;
   
       	  } //endfunction
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My Favorites] Simple Output Function for a Selectmenu](https://wordpress.org/support/topic/simple-output-function-for-a-selectmenu/)
 *  Thread Starter [Julian](https://wordpress.org/support/users/jolution/)
 * (@jolution)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/simple-output-function-for-a-selectmenu/#post-14858730)
 * Thank you for your feedback. I have already discovered the post and therefore
   wanted to use the function. But, I only received a list of all of my contributions,
   not just a list of favorites.
 * _The part with creating the select fields would not be a problem. _
 * I really only need a tip on how I can expand this part so that all noted page
   names (including ID) are output as pure text.
 *     ```
       	// https://de.wordpress.org/plugins/my-favorites/
       	function ccc_my_favorite_list_custom_template( $my_favorite_post_id=false ) {
       		return "OUTPUT SELECT LIST WITH FAVORTIES"; //$my_favorite_post_id;
       	}
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin] GDPR friendly SPAM protection](https://wordpress.org/support/topic/gdpr-friendly-spam-protection/)
 *  Thread Starter [Julian](https://wordpress.org/support/users/jolution/)
 * (@jolution)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/gdpr-friendly-spam-protection/#post-14247904)
 * Thank you for your feedback [@champsupertramp](https://wordpress.org/support/users/champsupertramp/).
   
   We have just discovered that there is an integrated “Honeypot” feature under 
   the “Login” point on the features List. That’s great! Does this also apply to
   the registration forms and others?
 * Source:
    [https://github.com/wp-plugins/ultimate-member/blob/master/core/um-actions-global.php](https://github.com/wp-plugins/ultimate-member/blob/master/core/um-actions-global.php)
 * > Anti-spam measures
   >  The login forms automatically come with triple anti-spam
   > protection which includes: a hidden honeypot field, time delay on submit button
   > and WordPress nonces.
 * Source: [https://ultimatemember.com/features/](https://ultimatemember.com/features/)
 * Best Regards
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin] GDPR friendly SPAM protection](https://wordpress.org/support/topic/gdpr-friendly-spam-protection/)
 *  Thread Starter [Julian](https://wordpress.org/support/users/jolution/)
 * (@jolution)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/gdpr-friendly-spam-protection/#post-14247901)
 * Thanks [@missveronicatv](https://wordpress.org/support/users/missveronicatv/)
   for the support.
    I’ll go through the recommendation above again. I currently
   deactivated it because otherwise I would no longer be able to log in to Ultimate
   Member. I guess I haven’t configured something correctly yet.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin] GDPR friendly SPAM protection](https://wordpress.org/support/topic/gdpr-friendly-spam-protection/)
 *  Thread Starter [Julian](https://wordpress.org/support/users/jolution/)
 * (@jolution)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/gdpr-friendly-spam-protection/#post-14216075)
 * Thank you [@missveronicatv](https://wordpress.org/support/users/missveronicatv/)
   for sharing!
 * I downloaded the code and included it in the functions.php. Where exactly can
   I find the AdminPage for this? Didn’t fully understand this point in the readme.
 * Thank you for your feedback [@champsupertramp](https://wordpress.org/support/users/champsupertramp/).
   
   We have just discovered that there is an integrated “Honeypot” feature under 
   the “Login” point on the features List. That’s great! Does this also apply to
   the registration forms and others?
 * Source:
    [https://github.com/wp-plugins/ultimate-member/blob/master/core/um-actions-global.php](https://github.com/wp-plugins/ultimate-member/blob/master/core/um-actions-global.php)
 *     ```
       Anti-spam measures
       The login forms automatically come with triple anti-spam protection which includes: a hidden honeypot field, time delay on submit button and WordPress nonces.
       ```
   
 * Source: [https://ultimatemember.com/features/](https://ultimatemember.com/features/)
 * Best Regards
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Download Manager] Log Download per User](https://wordpress.org/support/topic/log-download-per-user/)
 *  Thread Starter [Julian](https://wordpress.org/support/users/jolution/)
 * (@jolution)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/log-download-per-user/#post-14041331)
 * Dear [@nriddhi](https://wordpress.org/support/users/nriddhi/), thank you very
   much.
 * Unfortunately, I can see that the full IPs are displayed there, which – if I’m
   not mistaken – are not permitted in Germany (GDPR / DSVGO).
 * Is there a way to anonymize these, i.e. cut off the last bytes or even hide them
   legally?

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