• 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

Assets not referencing to public folder (Laravel)

Maatwebsite Excel 3.1 : how do I skip duplicate data when imported?

Add record for each array elements if missing in table

Using spatie/media-library, how to rename a collection of uploaded files?

Invalid value in field "itemtype" in Google Search Console

WooCommerce - unset "<product> removed notice…" on cart page

Trying to iterate over a mongodb cursor twice - failing

Changing font color in javascript

php 7 php.ini upload_max_filesize not working

Return new collection without modifying original collection

Timber: Single post pagination does not work (wp_link_pages)

How to debug in WooCommerce 3+

php file upload scanning using clamav, permissions on /tmp/

Add restriction to WooCommerce coupons by allowed user ID

how to fix Service provider class not found when using repository?

About Contact Privacy policy Terms and conditions