Frontend tag edit/submit form

In case that I have understood your (very brief) question and you’re not actually talking about the post_tag-taxonomy then you have wp_insert_term(), which is the underlying API function. Edit As to the comment, there’s the need of meta data for a term and administrator approval. WordPress currently has no native way of adding meta data … Read more

After wp_insert_post(), date_i18n() and date() outputs are adjusted to GMT

If you do not pass a date to wp_insert_post(), get_gmt_from_date() is called. And look at that function’s content: function get_gmt_from_date($string, $format=”Y-m-d H:i:s”) { preg_match(‘#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#’, $string, $matches); if ( ! $matches ) return date( $format, 0 ); $tz = get_option(‘timezone_string’); if ( $tz ) { date_default_timezone_set( $tz ); $datetime = date_create( $string ); if ( … Read more

Do I need to deal with WordPress SQL Injection

Higher-level API functions like this in WP typically do the $wpdb->prepare() call to protect against MySQL injections. As for content by default comments do allow HTML, however it isn’t just anything. If you examine default-filters.php there are quite a few sanitizing functions hooked to processing comment data, including wp_kses_post() which limits HTML to white listed … Read more

Email Post Attachment on wp_insert_post Action

After asking this question in several places and not getting a solution, I found the solution this morning myself. Instead of hooking the function send_email_on_pending_post_creation to the “wp_insert_post” action, you need to hook it to the “add_attachment” action which occurs AFTER the post is inserted and when the attachment is added to the post. You … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)