• 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

Nginx disallowing execution of PHP in uploads directory with Magento

How to disable widget block editor of WordPress?

Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: ) in Unknown on line 0

Where do I need to place a hook for phpunit?

WooCommerce Subscriptions: Remove role on cancelled subscription

How to modify CSS in a specific page of the WP admin dashboard (backend)

Twig - How to check if variable is a number / integer

Show rotation of tweets using current day of month

wp_remote_get() not passing authentication

Facebook PHP SDK - will not logout properly

Debugging Stripe Webhook Event

Undefined Array Key error when uploading image on php

500 (Internal Server Error) with Laravel & Docker [duplicate]

Object of class stdClass could not be converted to string error

Symfony Mercure "Failed to send an update"

About Contact Privacy policy Terms and conditions