Now we will create a method called InstallFile where you will install the file: void InstallFile(string Arquivo) Processo.MaxValue = TotalDeItens //altera o total de itens Suponha que você tem sua ProgressBar dentro dum diálogo, vamos chamar-la de "Processo" Int32 TotalDeItens = ArquivosParaInstalar.Count() até ai OK, crie uma variável com o total de itens: To make a dialogue with a ProgressBar Do as follows:Start a class with the name you want, for example:public class ProgressoDeInstalacao : ĭeclare this variable with all the files you want to install:string ArquivosParaInstalar = this in the constructor method:public ProgressoDeInstalacao() They canĬall from outside a function even if they were defined inside,Īnd vice versa.Source: Provided by the user Methods of a class) and PHP classes have global scope. Scope of a function: All functions (not to confuse with the In oaf_create_submenu_function() You must put the HTML that will be displayed on the page, logically you can use includebut not to define global functions.(*)(Edited)ACLARATIONThe scope of the variables has nothing to do with
Default value: ''So in your code it should be something like:
The call to mi_shortcode.php You should do it from functions.php which is the main Wordpress script for general functions.Currently, by calling it from within a function, everything you include stays within the function of that function.(*)This should work for you.