• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

how to youtube api data to print in toolset metabox using a button click before save-post

phpwordpressbuttonclickmeta-boxesdevtoolset


PHP Snippet 1:

<script>
    jQuery('.Import').live('click', function(e) {
        e.preventDefault();
        jQuery('#save').click();
    });
              
    </script>

PHP Snippet 2:

$ytURL = get_post_meta(get_the_ID(), 'wpcf-song-av', true);

PHP Snippet 3:

$ytURL = $_POST['ytext'];

PHP Snippet 4:

<input id="textbox_id" name="ytext" placeholder="YT ID here" type="text" />
<input type="submit"  name="Import" class="Import" id="Import"  />

Related Snippets

Remove country code from phone number?

Laravel lang slug in url

How to set dynamic `home` and `siteurl` in WordPress?

Prevent blank space in pdf pages (DomPdf)

Execute only one time and then wait set period of time before executing again

How to get Laravel's CSRF Token from Another Website?

Wordpress how to get the post thumbnail inside a figure tag

php - add comma thousands separator but remove trailing zeros

php curl requesting twice

AJAX call fails with SyntaxError: Unexpected end of JSON input

PHP's array_map including keys

Limit login attempts in Laravel 5.7

How to trim a video by 4 fragments to 4 seconds using the PHP-FFMpeg?

PHP, how to convert Int value to Week days

How to change HTML structure inside WP <head>

About Contact Privacy policy Terms and conditions