OrbiTorbi
Forum Replies Created
-
Forum: Hacks
In reply to: Filter video after upload via urlThanks for your help bcworkz.
I need it only for (surprise) youtube videos.
I will try your suggestion and post my solution here.Thanks
Forum: Hacks
In reply to: Filter video after upload via urlIs there no hook für the function “insert media from url”?
Forum: Hacks
In reply to: comments for draft postsI have tried to manipulate the hidden fields with javascript but it doesn’t work.
But what works is to regist a new post status for example “draft_comment”.Mybe it is not the right way but it works for my project.
I hope in the future there is a hook to handle this case.Forum: Hacks
In reply to: comments for draft postsYou are right, it’s a pity that there is no hook.
I’m trying your suggestion and post my solution here.
Forum: Hacks
In reply to: comments for draft postsI have add the comment metabox at the functions.php for draft posts.
Now i want to add a comment from wp-admin/post.php?post=postID&action=edit.
I can see the metabox and existing comments but i can’t add new comments.WordPress dies each time on this position
elseif ( in_array($post->post_status, array('draft', 'pending', 'trash') ) ) wp_die( __('ERROR: you are replying to a comment on a draft post.') );
Forum: Hacks
In reply to: comments for draft postsHello bcworkz,
unfortunately the hook ‘comment_on_draft’ never fires.
The reason is, the function ‘wp_ajax_replyto_comment’ dies with: ‘ERROR: you are replying to a comment on a draft post.’ before the hook fires.
global $wp_list_table; if ( empty( $action ) ) $action = 'replyto-comment'; check_ajax_referer( $action, '_ajax_nonce-replyto-comment' ); $comment_post_ID = (int) $_POST['comment_post_ID']; $post = get_post( $comment_post_ID ); if ( ! $post ) wp_die( -1 ); if ( !current_user_can( 'edit_post', $comment_post_ID ) ) wp_die( -1 ); if ( empty( $post->post_status ) ) wp_die( 1 ); elseif ( in_array($post->post_status, array('draft', 'pending', 'trash') ) ) wp_die( __('ERROR: you are replying to a comment on a draft post.') );
Is there any way to setup a hook before ‘wp_ajax_replyto_comment’ fires for example to override $post->post_status?
Forum: Hacks
In reply to: WP Media EditorThanks guys :)!
Forum: Hacks
In reply to: WP Media EditorThanks for the tip!
I will look in the media.php. Is it also possible to set a hook for the media upload? For example if i want to change the upload directory to /uploads/2015/01/postID/?
So that all images from one post are at a seperat directory?
Thanks for your help James!
Forum: Hacks
In reply to: WP Media EditorYes you are right if the image is shown in the editor.
But im looking for the dialog oudside of the editor.
Im writing a plugin that shows you all images to the post, just a simple list of images at the bottom. And im looking for that dialog:
Screen