Rajeev Rajan
Forum Replies Created
-
Forum: Plugins
In reply to: [UsersWP - Social Login] Need documentation for Google and LinkedinYes. I have added them and am getting the below error.
Forbidden
You don’t have permission to access this resource.Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
I will followup in the support ticket I created
Forum: Plugins
In reply to: [UsersWP - Social Login] Need documentation for Google and LinkedinI tried configuring using the above steps.
Do we need to select the below Permissions?
…/auth/userinfo.profile
…/auth/userinfo.emailI am getting the following error after configuring.
Forbidden
You don’t have permission to access this resource.Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Thanks. This worked like a charm.
If you are adding the code directly to functions.php, then you should remove the code snippet plugin and see.
Code snippet plugin just adds the code to your functions.php file without editing it directly. Since you are adding the code directly in the file, you should remove the code snippet plugin and see.
No not wp-config.php file.
Inside your theme folder, there should be a functions.php file. Add the code to the bottom of the file and save it.
Hi,
Instead of code snippet plugin, can you try adding the below code directly in the functions.php file?
Code is working fine for me. Issue has to be with the Code snipper plugin.
function pre_upload_attachment( $abort, $post_id, $metadata ) { // Example stops csv from being offloaded. $file = get_post_meta( $post_id, '_wp_attached_file', true ); $extension = is_string( $file ) ? pathinfo( $file, PATHINFO_EXTENSION ) : false; if ( is_string( $extension ) && in_array( $extension, array( 'csv' ) ) ) { $abort = true; // abort the upload } // Example helps bulk offload tool on severely resource restricted shared hosting. // WARNING: Do not uncomment the following code unless you're on shared hosting and getting "too many open files" errors // as <code>gc_collect_cycles()</code> could potentially impact performance of the bulk offload and WordPress. /* if ( false === $abort ) { gc_collect_cycles(); } */ return $abort; } add_filter( 'as3cf_pre_upload_attachment', array( $this, 'pre_upload_attachment' ), 10, 3 );
- This reply was modified 4 years, 4 months ago by Rajeev Rajan. Reason: Gramatical error
You need to hook it.
Use the below code along with your code.
add_filter( 'as3cf_pre_update_attachment_metadata', array( $this, 'pre_update_attachment_metadata' ), 10, 4 );
You can also use the below function.
function pre_upload_attachment( $abort, $post_id, $metadata ) { // Example stops csv from being offloaded. $file = get_post_meta( $post_id, '_wp_attached_file', true ); $extension = is_string( $file ) ? pathinfo( $file, PATHINFO_EXTENSION ) : false; if ( is_string( $extension ) && in_array( $extension, array( 'csv' ) ) ) { $abort = true; // abort the upload } // Example helps bulk offload tool on severely resource restricted shared hosting. // WARNING: Do not uncomment the following code unless you're on shared hosting and getting "too many open files" errors // as <code>gc_collect_cycles()</code> could potentially impact performance of the bulk offload and WordPress. /* if ( false === $abort ) { gc_collect_cycles(); } */ return $abort; } add_filter( 'as3cf_pre_upload_attachment', array( $this, 'pre_upload_attachment' ), 10, 3 );
The issue here is, it’s disallowing the offload for all the file types irrespective of what file type we provide. So this solves your problem I guess.
Forum: Plugins
In reply to: [Regenerate Thumbnails] Not able to regenerate thumbnails AWS S3Hi,
But as per Delicious Brains’ response, it is supposed to work even after deleting the files from the wp-content directory.
https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfront/issues/533
Forum: Plugins
In reply to: [Regenerate Thumbnails] Not able to regenerate thumbnails AWS S3Hi,
I don’t have access to the WordPress CLI tool. No other way to regenerate thumbnails from the WordPress dashboard itself?
Thanks for the prompt response.
Forum: Plugins
In reply to: [Team - Team Members Showcase Plugin] Customize the Single Team templateYes, I added the image to header.php and used CSS to hide to other pages.
Is there a way to edit the template?Hi All,
I agree to disagree here.
I am using PMPro for our membership websites. The support they provide is the best. They were very helpful in addressing the issue and most of the time, they even provide you with the customized code/recipe to achieve what we are looking for. Comparing with the other Membership plugin, Paid Membership Pro is the best option IMHO. I am using the Paid version of PMPro.Hi,
Thanks for the code. I am not able to understand how to use this.
New column I wanted to add is “Assigned To” as Column heading and its value from meta_key “_organizer_email”.
Can you provide sample code for the above field? Or a working example for creating a new column?
Hi,
Below code worked. Thanks.
add_filter(‘event_manager_event_dashboard_columns’,’your_theme_name_event_dashboard’);
function your_theme_name_event_dashboard($columns){
unset($columns[‘event_location’]);
return $columns;
}Can I add new fields to the table?
Hi,
Thanks for your reply. I Managed to get this done using below code as per your documentation.
function custom_submit_event_form_fields( $fields ) {
$taskname = $_GET[“taskname”];
$fields[‘event’][‘event_title’][‘value’] = $taskname;return $fields;
}Will definetely do the rating.