93 reputation
8
bio website
location
age
visits member for 11 months
seen 46 mins ago
stats profile views 7

7h
comment WP Cron doesn't save <iframe> or <object> in post body
@TomJNowell please, remove you downvote, if possible. I tried my best to make my answer be understood even for a random visitor. Thank you Tom in advance.
7h
comment WP Cron doesn't save <iframe> or <object> in post body
@TomJNowell I have also added this to be even more specific for the reader of this question and answer WARNING !!! Always make validation of the data you are saving into the database! This answer below assumes that you validate the content of your post inside of your custom function that you trigger via cron!
7h
comment WP Cron doesn't save <iframe> or <object> in post body
@TomJNowell try to reload this page or try empty your cache. I have put there this NOTICE! Put this only in your plugin's function code that is run via wp cron. Don't put it in your function.php in your template or in other places. It's in bold to catch the visitor attention.
9h
comment WP Cron doesn't save <iframe> or <object> in post body
I have already, check my question and answer and remove your downvote if possible, please.
9h
comment WP Cron doesn't save <iframe> or <object> in post body
I have custom validation in my custom function to strip out things I don't want and malicious stuff. This is not a problem at all in my case.
9h
comment WP Cron doesn't save <iframe> or <object> in post body
@hakre I have added a notice that you should put this code only in your plugin with the function that is run via cron and not to the template functions.php file. I hope it's clearer now. Could you please remove the down vote, please? Thanks.
10h
comment WP Cron doesn't save <iframe> or <object> in post body
This is a dangerous fix, and makes your site more unsecure please, explain, why it's insecure if it's only in my plugin function that is called only once a day via wp cron?
10h
comment WP Cron doesn't save <iframe> or <object> in post body
Tanks, but I have a complex function and I grab also object, and other stuff. my function code is good I think I just needed wp_filter_post_kses to do what I want.
10h
comment WP Cron doesn't save <iframe> or <object> in post body
Comments? My script runs only like 2-3 seconds and then I set it back with add_filter. I am not running bank website. Just a blog. I can be vulnerable once a day for 3 seconds ;). And it's only inside my function.
10h
comment WP Cron doesn't save <iframe> or <object> in post body
What are you talking about? I am using my own validation in my function.
10h
comment WP Cron doesn't save <iframe> or <object> in post body
No, I finally solved it ;) . You need to use remove_filter('content_save_pre', 'wp_filter_post_kses'); remove_filter('content_filtered_save_pre', 'wp_filter_post_kses'); and do wp_insert_post(); and then turn it on if you want to feel protected against some "injection" ;) like add_filter('content_save_pre', 'wp_filter_post_kses'); add_filter('content_filtered_save_pre', 'wp_filter_post_kses');
10h
comment uploading Attachments with permalinks based on parent file structure
My guess is you need to make a plugin that will create extra links in some db table of that plugin that will be matched with your attachments links and then you will hide the redirect of these links via .htaccess or something so in the browser it will still looks like http://example.com/category/cars/why-our-cars-are-the-best/attachment.pdf
10h
comment WP Cron doesn't save <iframe> or <object> in post body
It's definitely something with the WP security. When I set in my auto cron function content variable manualy to "Testing auto save." is is saved normally. But When I set it to <iframe>something</iframe> or <object>blablabal</object> it is not. How to turn this check off, so I can save my code with cron?
2d
comment Formatting of curly brackets array from WP database to get more readable output
What about doing it via javascript without using php at all?
2d
comment Formatting of curly brackets array from WP database to get more readable output
Wow, the plugin is really neat, but maybe I will add another button Serialize, that will appear after you make it unserialize. That way you can make some edits in it after unserializing and if you are finished serialize it back with the new info and then copy and paste to the db field.
2d
comment Checking for existing title in custom db query not working
Thanks, it's finally working ;)
2d
comment Checking for existing title in custom db query not working
May I ask you why you put ARRAY_A, 'post' inside the trim function?
2d
comment Checking for existing title in custom db query not working
Still not working.
2d
comment Checking for existing title in custom db query not working
I am getting error Fatal error: Can't use function return value in write context
2d
comment Formatting of curly brackets array from WP database to get more readable output
Thanks for the plugin I will definitely check it.