wp_redirect not working on plugin

You can also consider a Javascript solution by adding a portion of code that will redirect people to the page if not loggued in : <?php /* Plugin Name: Héroes y Pasta */ include_once(ABSPATH . ‘wp-admin/includes/plugin.php’); function iniciatodo() { if(is_user_logged_in()) { ?> <p>Hola tio</p> <?php } else { ?> <script>window.location.href=”http://gexy.es.cx/login/”;</script> <?php } } add_shortcode(“inicia_todo”, “iniciatodo”);

Override a Plugin Function

The following code is work around by using the filter in the code above and by returning an empty array. It is placed in functions.php of your theme. It’s not a ‘work around’. That’s the correct way to do it. But there is a shorter way to do the same thing. WordPress has a function … Read more

Asynchronous request in wordpress

Your AJAX URL varaible is different in your PHP and your JS. In your JS you refer to ajax_url: url: modallist.ajax_url, But the variable defined in PHP is ajaxurl: ‘ajaxurl’ => admin_url(‘admin-ajax.php’) , This is why you’re getting the full admin page as a response. Your request is going to the current page because there … Read more

How to translate wordpress error message

I was able to solve my problem, follow the code in case someone needs the solution: add_filter(‘login_errors’,’login_error_message’); function login_error_message($error){ //check if that’s the error you are looking for $pos = strpos($error, ‘incorrect’); if (is_int($pos)) { //its the right error so you can overwrite it $error = “Um ou mais campo estão em branco ou dados … Read more

Large amount image data transfer

Yes, to answer your question as it is: It is possible. If you’re also looking to find out HOW, you would need to tell us more information about your hosting though. Do you have ssh access, FTP acess? Is it shared hosting or do you have full access? If you have SSH here’s what I … Read more