Insert Into Post Not Working For Audio File Using jQuery

I have come up with better and new working version that supports all file types which I am going to share here in case anyone else is looking for this answer. Input field added to metabox <input type=”text” name=”sermon_mp4″ id=”sermon_mp4″ value=”<?php echo $sermonmp4; ?>”/> <input type=”button” id=”sermon_mp4_button” value=”Add Sermon Audio” /> jQuery <script type = … Read more

Update a user profile via frontend

I’ve written this in a hurry and it’s untested and probably sloppy code, but it gives you an idea of how to accomplish this with AJAX. <form id=”update_user”> <div class=”form-group”> <label for=”firstname”>Name</label> <input type=”text” name=”firstname” id=”firstname” value=”<?= esc_attr(wp_get_current_user()->user_firstname) ?>” placeholder=”Vorname”> </div> <div class=”form-group”> <label for=”name”>Name</label> <input type=”text” name=”name” id=”name” value=”<?= esc_attr(wp_get_current_user()->user_lastname) ?>” placeholder=”Name”> </div> <div … Read more

License validate function

You could try adding a function to for example init action, that either enables plugin features (i.e. includes plugin files) or displays the admin notice. Something along these lines, function licence_notice_or_enable_features() { // Check if (valid) licence key (or validation token, etc.) is saved to the database // and add other plugin files // If … Read more

Display time difference (6 hours ago) in a Soliloquy caption

In your filter function you should pass post ID to get_the_time() function, otherwise you will get the date from current post. function wpse_relative_date( $date, $format, $post ) { return human_time_diff( get_the_time(‘U’, $post), current_time( ‘timestamp’ ) ) . ‘ ago’; } add_filter( ‘get_the_date’, ‘wpse_relative_date’, 15, 3 ); References: get_the_time() function get_the_date filter