Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 13205

WordPress Plugins allow easy modification, customization, and enhancement to a WordPress blog. Instead of changing the core programming of WordPress, you can add functionality with WordPress Plugins.

1 vote
1 answer
612 views

How do i validate data entered in a meta box so that only floats can be entered in a field?

We have a custom post type in our plugin and now i must provide the user a meta box where he enters latitude and longitude. I want them to be floats, i have no problems in doing the validation client …
Nicola Peluchetti's user avatar
2 votes
1 answer
1k views

Using a front controller in a Wordpress plugin, any suggestions?

My idea was to use a front controller in our plugin. has anyone done that already? The responsibilities of the controller should be initiate router class; provide access to objects registry, which …
Nicola Peluchetti's user avatar
0 votes
1 answer
626 views

How to set-up multiple cron task with wp_schedule_event so that they do not overlap?

I'm using a cron to take data from Facebook and i have divided the job into three calls, to avoid making to many call all toghether, now how do i set up calls so that they don't overlap? // Set the C …
Nicola Peluchetti's user avatar
0 votes
Accepted

How to set-up multiple cron task with wp_schedule_event so that they do not overlap?

Ok that was pretty easy // Set the CRON for pages wp_schedule_event( current_time( 'timestamp' ) + 450, self::FB_CRON_FREQUENCY, self::FB_CRON_PAGES, array( Ai1ec_Facebook_Graph_Object_Collection::F …
Nicola Peluchetti's user avatar
2 votes
2 answers
857 views

Has anyone used require.js for handling plugin scripts?

I'm starting to refactor the code of my plugin and I'm thinking about using require.js to handle the scripts so that i have a codebase which is more modular and testable. And I'm also planning to load …
Nicola Peluchetti's user avatar
0 votes
1 answer
476 views

wp_update_post call really slow when official Facebook plugin is installed

I'm having this weird issue, if i install my plugin and the official Facebook plugin the call to wp_update_post() becomes really slow. I've done some benchmark and it goes up to almost two seconds. If …
Nicola Peluchetti's user avatar
0 votes

wp_update_post call really slow when official Facebook plugin is installed

This is beacuse facebook plugins does some really intensive checks on every save_post and this slows down calls to wp_update_post and wp_save_post to a crawl ( about 2 seconds for each call ). If you …
Nicola Peluchetti's user avatar
2 votes
2 answers
2k views

How to get the permalink of a page when loading my plugin

I'm implementing a web widget and for this reason I'd like my script to respond to the request as soon as possible, to avoid loading unnecessary thing. I've found out that calling get_permalink( $page …
Nicola Peluchetti's user avatar
1 vote
2 answers
608 views

How to i18n text coming from the db or from an external source

I'm writing a plugin and i wanted to i18n correctly text which i'm storing in the db or in an external file. How should i do that?As of now we are generating pot files with wordpress and so all the Tr …
Nicola Peluchetti's user avatar
3 votes
1 answer
580 views

What is the correct way to check if WP_Filesystem can write to a directory without aking for...

I'm trying to implement caching using the filesystem so i need to check if i can write in a directory. I've read Otto's article, but i've failed to understand how should i implement a check where the …
Nicola Peluchetti's user avatar
1 vote

What is the correct way to check if WP_Filesystem can write to a directory without aking for...

This is what i ended up using /** * check if the path is writable. To make the check . * * @param string $path * @return boolean */ public static function is_writable( $path ) { global $wp_f …
Nicola Peluchetti's user avatar
1 vote
0 answers
90 views

Re use the list table for a custom post type on another page

i've got a custom post type which is 'ai1ec_event'. So i have a "All events" page which has a Wp_List_Table with all my events and my customization to that table. Is there a way to draw the same list …
Nicola Peluchetti's user avatar
0 votes
2 answers
197 views

How do i remove the title from a specific page

Hi need to remove the title of a specific page, this one. I could do add_filter( 'the_title', ai1ec_remove_title ); function ai1ec_remove_title( $title ) { if( 'Calendar' === $title ) { …
Nicola Peluchetti's user avatar
0 votes
1 answer
140 views

How do i specify a url to which to redirect the user after he logs out from facebook?

I need to specify a url that i will use after the user has logged out from facebook because i need to do some extra-cleaning and he is correctly logged out from our app. For this i need a url that wh …
Nicola Peluchetti's user avatar
3 votes
0 answers
57 views

How ( and mostly at what time ) can i prevent the alternate cron from running?

I'm using the alternate cron version, but i need to prevent it from running on some calls, how can i do this? In the cron.php file i've seen on line 225 if ( defined('ALTERNATE_WP_CRON') && ALTERNAT …
Nicola Peluchetti's user avatar