• 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

Put content of wordpress page inside div

Reorder attribute dropdown terms in Woocommerce single variable products

How to break out of a foreach once a condition is met?

Laravel Displaying image from database

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

Having issue with matching rows in the database using PDO

Laravel Command Schedule Not Working Properly

Transform array, set each array element with parent key php

Login if user is active using Laravel Breeze

How to submit the custom form data in database in WordPress without plugin using ajax?

SQL to convert multiple rows into a single row of variable length

How to make a foreign key not using primary key

Destroy session upon refresh

Laravel 5.5 change unauthenticated login redirect url

Return new collection without modifying original collection

About Contact Privacy policy Terms and conditions