How save plugin options array in select box

Must the second select box as below. the javascript code only responsible to change the font variants when you change the first select box values and don’t use it to save the values. <select id=”variants” name=”<?php echo $bsn_option; ?>[<?php echo $id2; ?>]” class=”form-control”> <?php $currentFont = $YPE_font[$id1]; foreach ($jsItems[$currentFont] as $variants) { ?> <option value=”<?php … Read more

DB Sync Media Files extension [closed]

Yes, there’s another required step: I must enter the correct connection informations before the checkbox shows up. The JS code checks for the connection, talks to the remote plugin and if it finds it’s all ok, lets the checkbox display itself. In other cases it hides the checkbox. Now I believe this plugin has a … Read more

Place content inside the Post Loop

Just as the loop starts the action loop_start fires. Once each post is setup as the loop iterates, the_post fires. After the loop has finished, loop_end fires. Each of these actions receives a reference to the queried object if you need to check for context. If you are in control of the theme code it … Read more

Provide http service by wordpress plugin

Now I use the init hook to add my own process for the request, and then check the request should be handled by the plugin, if yes, process and exit, if not do nothing. Like this: add_action(‘init’,function(){ if(should_intercepte_the_request()){ //process that. //exit die(“foo”); }else{ //do nothing } }); Then you can access the http by: http://localhost … Read more

Meta box or shortcode help

First create the meta box with a simple input value to insert the text you want. Here is a good example. Then you take the input from the meta box and create a function to store it as a shortcode. Check out the Shortcode API to enable the shortcode. Something like this should do the … Read more