[email protected]
Forum Replies Created
-
Forum: Plugins
In reply to: [Pixabay Images] Issues uploading and inserting.Same thing here, it use to just lag… but now im getting this error.
Error: cURL error 7: Failed to connect to pixabay.com port 80: Connection refused
Could you help me out… I tried adding this to the functions.php, but after running some test i ended up breaking things and wasnt able to retrieve the category slug properly. What am I missing?
function get_post_category_slug( $slug ) {
$category = get_term_by( ‘slug’, $slug, ‘category’ );
if ( $category )
_make_cat_compat( $category );return $category_slug;
}add_filter(‘wp_mail’, function($args) {
$args[‘post_category_slug’] = do_shortcode($args[‘post_category_slug’]);
return $args;
}, 1, 1);it would take over 400 category redirects. Is there a way i can pull the actual category slug? Do you have a snippet i can add to my fuctions.php file that would allow me to retrieve this, you can obliviously pull info like, Author, article name, categories, permalink and such… I think it would be a nice addition to the plugin.
Here is what my current email link looks like:
We published your article “[post_title]”
on our website on [post_date],
can be found under the “[post_category]” category.The boss wants category to be a link instead of the title in order for the author to see their contribution on the list of of articles for such category… in hopes that they dont just view their article and leave, but that they might see other recent articles and choose to open them too.
- This reply was modified 6 years, 8 months ago by [email protected].
Hi The problem that i am experiencing when combining the shortcodes is that i use thepost_category…which does the trick… most of the time, however, i have categories that have multiple words and spaces in the categories name… which as you can problem see where i am going with this, produces ugly looking links. To give you an example, we have a category called Parks and Places, when using the category name shortcode as a link it gives me: /category/parks%20and%20pets and i am struggling trying to find a fix for this… can you guide me in the right direction?
Forum: Plugins
In reply to: [Ajaxy Instant Search] Disable submitThis didnt work for me… have you found a better solution?
Forum: Plugins
In reply to: [Ajaxy Instant Search] Disable the enter keyIm interested in this question to.
Did you ever figure this one out?Forum: Plugins
In reply to: [Folder Gallery] Exclude everything but one filefilename exclusion, would work for these purposes too.
Thanks
Forum: Plugins
In reply to: [Folder Gallery] Exclude everything but one file?? bump
Forum: Plugins
In reply to: [Delete Me] Changing "from" email headerNot sure what was wrong to the code above.. but i reverted to a backup version of original file and only modified the email section and it now works fine.
?? Thanks for all your help
Question:
what is the best way to keep this changes without updates affecting it?
Forum: Plugins
In reply to: [Delete Me] Changing "from" email headerWeird… since the last time i tried (and it worked) i’ve created and delted 3 more users and no mail comes in at all.
On another note:
I am currently using Server SMTP as the email client, all the other communications emails arrive to the inboxes everytime… only the ones coming from this plugin end up there…(or just reently, not there at all)
any ideas?Forum: Plugins
In reply to: [Delete Me] Changing "from" email headerThanks, that worked like a charm… and yes, they did end up going to the junk mail. Is there a way to avoid the spam filters and have it land on the inbox?
And, i think you were right about the \n\n, they are html, so i have gone and changed them to line breaks instead.
Forum: Plugins
In reply to: [Delete Me] Changing "from" email headerFind attached the whole snippet of code, maybe i am missing something :S
<?php // File called by class? if ( isset( $this ) == false || get_class( $this ) != 'plugin_delete_me' ) exit; // Does user have the capability? if ( current_user_can( $this->info['cap'] ) == false || ( is_multisite() && is_super_admin() ) ) return; // stop executing file // Does the trigger value match the currently logged in user ID? if ( empty( $this->user_ID ) || $this->GET[$this->info['trigger']] != $this->user_ID ) return; // stop executing file // Nonce if ( isset( $this->GET[$this->info['nonce']] ) == false || wp_verify_nonce( $this->GET[$this->info['nonce']], $this->info['nonce'] ) == false ) return; // stop executing file // Include required WordPress function files include_once( ABSPATH . WPINC . '/post.php' ); // wp_delete_post include_once( ABSPATH . 'wp-admin/includes/bookmark.php' ); // wp_delete_link include_once( ABSPATH . 'wp-admin/includes/comment.php' ); // wp_delete_comment include_once( ABSPATH . 'wp-admin/includes/user.php' ); // wp_delete_user, get_blogs_of_user if ( is_multisite() ) { include_once( ABSPATH . WPINC . '/ms-functions.php' ); // remove_user_from_blog include_once( ABSPATH . 'wp-admin/includes/ms.php' ); // wpmu_delete_user } // Posts //->>> Start: WordPress wp_delete_user Post types to delete $post_types_to_delete = array(); foreach ( get_post_types( array(), 'objects' ) as $post_type ) { if ( $post_type->delete_with_user ) { $post_types_to_delete[] = $post_type->name; } elseif ( null === $post_type->delete_with_user && post_type_supports( $post_type->name, 'author' ) ) { $post_types_to_delete[] = $post_type->name; } } $post_types_to_delete = apply_filters( 'post_types_to_delete_with_user', $post_types_to_delete, $this->user_ID ); //<<<- End: WordPress wp_delete_user Post types to delete $posts_list = array(); $posts = $this->wpdb->get_results( "SELECT <code>ID</code>, <code>post_title</code>, <code>post_type</code> FROM " . $this->wpdb->posts . " WHERE <code>post_author</code>='" . $this->user_ID . "' AND <code>post_type</code> IN ('" . implode( "', '", $post_types_to_delete ) . "')", ARRAY_A ); foreach ( $posts as $post ) { $posts_list[] = wp_specialchars_decode( $post['post_title'], ENT_QUOTES ) . "\n" . ucwords( $post['post_type'] ) . ' ' . get_permalink( $post['ID'] ); } // Links $links_list = array(); $links = $this->wpdb->get_results( "SELECT <code>link_id</code>, <code>link_url</code>, <code>link_name</code> FROM " . $this->wpdb->links . " WHERE <code>link_owner</code>='" . $this->user_ID . "'", ARRAY_A ); foreach ( $links as $link ) { $links_list[] = wp_specialchars_decode( $link['link_name'], ENT_QUOTES ) . "\n" . $link['link_url']; } // Comments $comments_list = array(); if ( $this->option['settings']['delete_comments'] == true ) { $comments = $this->wpdb->get_results( "SELECT <code>comment_ID</code> FROM " . $this->wpdb->comments . " WHERE <code>user_id</code>='" . $this->user_ID . "'", ARRAY_A ); foreach ( $comments as $comment ) { $comments_list[] = $comment['comment_ID']; // Delete comments if option set wp_delete_comment( $comment['comment_ID'] ); } } // E-mail notification if ( $this->option['settings']['email_notification'] == true ) : $email = array(); $email['headers'] = 'From: My Babysitter Team <[email protected]>' . "\r\n"; $email['to'] = get_option( 'admin_email' ); $email['subject'] = 'Deleted User Notification'; $email['message'] = 'The following User has been Deleted from your site:' . "\n\n" . 'Username: ' . $this->user_login; wp_mail( $email['headers'], $email['to'], $email['subject'], $email['message'] ); endif; // Delete user if ( is_multisite() && $this->option['settings']['ms_delete_from_network'] == true && count( get_blogs_of_user( $this->user_ID ) ) == 1 ) { // Multisite: Deletes user's Posts and Links, then deletes from WP Users|Usermeta // ONLY IF "Delete From Network" setting checked and user only belongs to this blog wpmu_delete_user( $this->user_ID ); } else { // Deletes user's Posts and Links // Multisite: Removes user from current blog // Not Multisite: Deletes user from WP Users|Usermeta wp_delete_user( $this->user_ID ); } // Redirect to landing URL ( is_admin() ) ? wp_redirect( $this->option['settings']['your_profile_landing_url'] ) : wp_redirect( $this->option['settings']['shortcode_landing_url'] ); exit;
Forum: Plugins
In reply to: [Delete Me] Changing "from" email headerHi,
Thanks for your help, i really appreciate it @cmc3215.
However, that still didnt work ?? the user does get deleted but the email doesnt get sent out anymore.Also, I only tried inserting the
<br>
because the original emails coming from your plugin didnt have any line breaks and made the email pretty hard to read.Forum: Plugins
In reply to: [Delete Me] Changing "from" email headerI get an error… not sure what Exactly i did wrong
// E-mail notification if ( $this->option['settings']['email_notification'] == true ) : $email = array(); $email['to'] = get_option( 'admin_email' ); $email['subject'] = 'Deleted User Notification'; $email['message'] = 'The following User has been Deleted from your site:' . "<br>" . 'Username: ' . $this->user_login . "\r\n" .; $email['headers'] = 'From: My Babysitter Team <[email protected]>' . "\r\n"; wp_mail( $email['to'], $email['subject'], $email['message'], $email['headers'] ); endif;