NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

<?php
function wctg_api_query(){
?>
<form id="bplv" method ="post" action ="<?php echo esc_url( admin_url('admin-post.php') ); ?>">
<table class="form-table">
<tbody>
<tr>
<th scope="row">
<label for="child-theme" class="my-text-field"><?php _e('Select a theme', 'wp-child-theme-generator');?></label>
</th>

<td>
<input id ="#test-api" type="text" name="test">
<input type="hidden" name="action" value="custom_api">
</td>
</tr>

<?php submit_button(__('Create Child Theme'), 'primary' ,'custom-child-api-create'); ?>
</tbody>
</table>
</form>
<?php

}

function wctg_custom_api_process() {
$slug = $_POST['test'];
$args = array(
'slug' => $slug,
);

// Make request and extract plug-in object. Action is query_plugins
$response = wp_remote_post(
'https://api.wordpress.org/themes/info/1.0/',
array(
'body' => array(
'action' => 'theme_information',
'request' => serialize((object)$args)
)
)
);

if ( !is_wp_error($response) ) {
$returned_object = unserialize(wp_remote_retrieve_body($response));
var_dump($returned_object); die();

$name = $returned_object ->name;
$slug = $returned_object ->slug;
$version = $returned_object ->version;
$description = $returned_object ->$description;
$author = $returned_object ->$author;

}

function angular_display(){
?>
<form id="custom-child" ng-app= "wp-api" method ="post" action ="<?php echo esc_url( admin_url('admin-post.php') ); ?>" enctype="multipart/form-data">
<table class="form-table child-table">
<tbody>
<tr>
<th scope="row">
<label for="my-text-field"><?php _e('Child Theme Name','wp-child-theme-generator'); ?> </label>
</th>

<td>
<input type="text" id= "child-name" name="childtheme" value = "">
</td>
</tr>
<tr>
<th scope="row">
<label for="my-text-field"><?php _e('Author Name', 'wp-child-theme-generator'); ?> </label>
</th>

<td>
<input type="text" id="child-author" name="childauthor">
</td>
</tr>
<tr>
<th scope="row">
<label for="my-text-field"><?php _e('Child Theme Description','wp-child-theme-generator');?></label>
</th>

<td>
<textarea id="child-description" class="wctg-styled" name="description"> </textarea><br>
</td>
</tr>

<tr>
<th scope="row"><?php _e('Child Theme Options','wp-child-theme-generator'); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text">
<span><?php _e('Child Theme Screenshot & Activate Options', 'wp-child-theme-generator');?></span>
</legend>
<label for="save-activate">
<input type="checkbox" id="save-activate" value="1" name="save-activate"> <?php _e('Create & Activate','wp-child-theme-generator');?>
</label>
<br>
<label for="child-screenshot">
<input type="checkbox" id="child-screenshot" name="parent-screenshot" value="1" checked > <?php _e("Use parent theme's screenshot", "wp-child-theme-generator" ); ?>
</label>
</fieldset>
</td>
</tr>
<tr id = "custom-screenshot">
<th scope="row"><?php _e ('Choose custom screenshot' , 'wp-child-theme-generator');?></th>
<td>
<div id= "custom-screenshot">
<input id="fileUpload" name="fileUpload" type="file"/>
<br>
<span class="description"> <?php printf( __('WordPress recommends screenshot of size 1200x900 px and in .png format.<br> Click %1$s for more details ', 'wp-child-theme-generator'),'<a href="https://codex.wordpress.org/Theme_Development" target= "_blank" rel="designer">here</a>' ); ?>
</span>
<div id="image-holder">
</div>
</div>
</td>
</tr>
<tr>
<th scope="row"><?php _e('Optional Information', 'wp-child-theme-generator'); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text">
<span>Optional Information</span>
</legend>
<label for="theme_uri">
<input type="text" id="theme-uri" name="theme-uri" placeholder = "<?php _e('Theme URI','wp-child-theme-generator'); ?>">
</label>
<br>
<label for="author-uri">
<input type="text" id="author-uri" name="author-uri" placeholder = "<?php _e('Author URI', 'wp-child-theme-generator');?>">
</label>
<br>
<label for="version">
<input type="text" id="version" name="version" placeholder = "<?php _e('Version','wp-child-theme-generator' ); ?>">
</label>
<br>
<label for="license">
<input type="text" id="license" name="license" placeholder ="<?php _e('License','wp-child-theme-generator');?>">
</label>
<br>
<label for="new_license_uri">
<input type="text" id="license-uri" name="license-uri" placeholder ="<?php _e('license URI','wp-child-theme-generator');?>">
</label>
<br>
<label for="tags">

<input type="text" id="tags" name="tags" placeholder ="<?php _e('Tags', 'wp-child-theme-generator');?>">
</label>

</fieldset>
</td>
</tr>


<input type ="hidden" id="parent" name="parent-directory" value ="">


<?php wp_nonce_field('custom-child-theme-creation', 'wp-easy-nonce'); ?>

<input type="hidden" name="action" value="child_theme">

<tr>
<td class = "child-button">

<?php submit_button(__('Create Child Theme'), 'primary' ,'custom-child-create'); ?>

</td>
</tr>

</tbody>
</table>
</form>

<?php

}


add_action( 'admin_post_custom_api','wctg_custom_api_process' );

add_action( 'admin_post_nopriv_custom_api', 'wctg_custom_api_process' );
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.