Where to store media uploaded by the plugin?

You can do something like this to create your own plugin upload folder in /wp-content/uploads the following code will basically create a custom folder inside uploads called myplugin_uploads and put an empty index.html inside it. Dynamically creating your custom upload folder add_action( ‘init’, ‘create_files’ ); function create_files() { $upload_dir = wp_upload_dir(); $files = array( array( … Read more

ACF Repeater Field Question [closed]

You should have to create a sub repeater field(lets call box_service) inside the repeater field services_sections. Then create the sub fields (services_icon, service_title, services_description )inside box_service repeater field. (please check attachment)) then use below code : <section class=”services cf”> <div class=”wrapper”> <?php if( have_rows(‘services_sections’) ): while( have_rows(‘services_sections’) ): the_row(); ?> <div class=”service”> <?php if( have_rows(‘box_service’) … Read more

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