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

Play videos with buffering in my server

Not sure about how much control you want to offer to your viewers but you can always use the <video> tag in HTML to display a player. You can read more about this here – https://www.w3schools.com/html/html5_video.asp If you are looking to provide the option of adjusting the quality and all you might have to host … Read more

show my own admin_notices after a post has been published

Add Additional ‘Published’ Notices You can use the following to add an additional admin notice after a post has been published: add_action(‘admin_notices’, function(){ $screen = get_current_screen(); $editPostScreen = ($screen->parent_base == ‘edit’ && $screen->post_type == ‘post’) ? true : false; $justPublished = (isset($_GET[‘message’]) && $_GET[‘message’] == ‘6’) ? true : false; if ($editPostScreen && $justPublished) { … Read more

Trying to add_action in a loop

As Milo hints at in their comment, custom post types can only be registered on the init hook. Therefore, if you are trying to get all the public but not builtin post types before init, then get_post_types() will return an empty array. (You can use get_post_types() to get the builtin post types before init.) What … Read more

Get param from shortcode in plugin function

If you have this shortcode: [product id=”2″] Which is redered by this: add_shortcode( ‘product’, ‘getSingleProduct’ ); function getSingleProduct( $atts ) { shortcode_atts( [ ‘id’ => ‘0’, ], $atts ); // Do someting with the “2”. do_request( ‘GET’, get_api_url() . ‘api/product/’ . “2” ); // This “2” comes from the shortcode } You can get the … Read more