• 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

Undefined Array Key error when uploading image on php

Invalid value in field "itemtype" in Google Search Console

How to install ZeroMQ for PHP on an Alpine Linux container?

Make Shipping Method fields Mandatory on Woocommerce checkout page

Sliders in Laravel

How to remove from a multidimensional array all duplicate elements including the original?

How do I enable error reporting in Laravel?

How to install php_imagick on wamp64

PHPMyAdmin not working as intended at remote server. Error 500, $respond not found

Symfony autowiring issues since docker update

SQLSTATE[HY000]: General error: 1 table posts has no column named *

Adding one microsecond to Datetime object in PHP

If action is on a different page do I use fwrite function

Timber: Single post pagination does not work (wp_link_pages)

WordPress - Dynamically add user ID to the end of a URL

About Contact Privacy policy Terms and conditions