• 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

Add a text next to stock quantity if it is less than 10 in Woocommerce single product

Override default Auth routes in Laravel 7

Handling expired token in Laravel

Eloquent insert id with sequence next value

how do i retrieve and display the alt text of an image in wordpress?

Shortcode or PHP inside a shortcode in Wordpress

PHP: How to raise number to (tiny) fractional exponent?

Display specific shipping method if woocommerce product has specific acf field value

Class AppHttpControllersUserController Does Not Exist

Smarty: undefined extension class 'Smarty_Internal_Method_Get_Template_Vars'

protect my blog content

Add restriction to WooCommerce coupons by allowed user ID

phpunit - testing is painfully slow

file_get_contents() without "Http" to access external URL [closed]

Timber: Single post pagination does not work (wp_link_pages)

About Contact Privacy policy Terms and conditions