Articles of plugins

Can a plugin still effect a site even after deletion?

I haven’t been able to find an answer on whether or not this can happen. If there is a poorly built plugin that hasn’t been updated in two years, and I make the poor decision to install it anyway – is it possible that even after complete deletion in the FTP this plugin could still […]

Why is my ajax call refreshing the page?

I’m attempting to upload an audio file via AJAX form. Here is my HTML in the profile-edit template. <form method=”post” id=”my_upload_form” action=”” enctype=”multipart/form-data”> <input type=”file” name=”file” id=”my_file_input” accept=”audio/*”> <input type=”submit” class=”btn-submit btn-sumary” value=”upload audio file” name=”submit” id=”my_audio_submit”> <div id=”my_error_report”></div> </form> Here is my jQuery: $(‘#my_upload_form’).submit(function () { var css = ‘font:Helvetica; color:red; font-size:1.5em; padding:inherit;’; var […]

Set object terms not working on plugin activation

I am trying to create a couple of custom posts and set a custom taxonomy term to it on plugin activation. I am using the register plugin activation hook to do it. The posts are created properly, but I the post term is not being set. I am using wp_set_object_terms to do it. What could […]

Conditionally bypass plugin

I would like to defer the loading of an othervise active plugin for certain pages. Since all plugins reside in the same folder, and WordPress only loads the activated ones, it must have an array of active plugin-handles at some point that it goes through. There’s probably even a filter available to modify this array […]

WordPress logo upload option in theme panel

Hello every one i am facing one issue in adding logo option in my theme panel of wordpress i am using this code function logo_display() { ?> <input type=”file” name=”logo” /> <?php echo get_option(‘logo’); ?> <?php } function handle_logo_upload() { if(!empty($_FILES[“demo-file”][“tmp_name”])) { $urls = wp_handle_upload($_FILES[“logo”], array(‘test_form’ => FALSE)); $temp = $urls[“url”]; return $temp; } return […]

Reset WordPress website

I have a website to demo plugins, and I want to allow users to login, but I am not sure how to reset the website once they log out. Is there a way to create a separate instance of WordPress for each new user and then delete itself once that user logs out? Or is […]

Show HTML form before WordPress plugin deletion

I want to show interface to admin on plugin deletion, having choices (radio buttons) with a question – “Please let us know why are you deleting the plugin?” I know about register_uninstall_hook but I cannot use HTML code in it.

Add get_option to jquery

I have created a settings page that contains various radio button options for a custom plugin. A radio button I’ve created is to ‘display dots’ with the values yes or no. I can get use the value any other time except in the jQuery function below. I would like to get the value of the […]

admin_notices hook show message all admin pages after plugin activate

I am working on a plugin and in plugin i use admin_notices hook for showing my custom message. When a user activate plugin the message show blew the plugin activate successfully, but my message shows all the other admin pages. I want to show message only the plugins page after plugin activate or my plugin […]

Shortcode to generate and save password in a file

I have the following shortcode: // Add Shortcode function custom_shortcode_phptest() { function generatePassword($length = 6) { $characters = ‘0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ’; $charactersLength = strlen($characters); $pass = ”; for ($i = 0; $i < $length; $i++) { $pass .= $characters[rand(0, $charactersLength – 1)]; } return $pass; } $password = generatePassword(); $data = time(); $test = ‘/home/blablabla/public_html/ot/docs/test/’ . $password […]