476 reputation
28
bio website
location Istanbul/Turkey
age 32
visits member for 1 year, 9 months
seen Jul 20 at 9:24

Jan
31
comment How to create a wordpress template without using any page
@ShaharDekel Welcome! With this solution you keep everything in your theme and there is no need to touch .htaccess.
Jan
28
comment restore_current_blog() vs switch_to_blog()
One more thing needs to be set as well: $GLOBALS['switched'] = false;. Although the function ms_is_switched() do check for $GLOBALS['_wp_switched_stack'] but this is introduced since 3.5 and some plugins are still using $GLOBALS['switched'] to see if WP is in switched mode or not.
Jan
23
comment Query current and future events, ordered by begin date
@tosca Aah, here is the issue: with your original date format (yymmdd in ACF) you need to use Ymd in php (with capital Y) NOT ymd. ACF uses jQuery UI Datepicker and yy in JQUI Datepicker means 4 digit year which in php is a single capital Y. Lowercase y in php is two digit year, so date('ymd') will be always a numeric value smaller than dates stored for your events and that's why you get all events.
Jan
23
comment Query current and future events, ordered by begin date
@tosca Did you remove meta_key, order and orderby from your query args? Also see my updated answer above for proper mysql date format.
Jan
14
comment Settings API in Multisite - Missing update message
Can you please explain that network_admin_edit_XXX action? and the edit.php?action=XXX ? I do not understand it and don't see this anywhere documented. What is the reason for this? Can't I just register a page on network_admin_menu action and then do the saving and form output on the callback for that page/menu? Thanks!
Jan
14
comment Settings API in Multisite - Missing update message
So the Settings API is not available on network admin pages? And what @NightHawk had originally done, was actually saving options to the main blog of the network and not saving them site-wide, right?
Dec
30
comment Using custom meta_query with relation not working as expected
I just posted a solution here: wordpress.stackexchange.com/a/128038/21163
Jan
30
comment How to use same email for multiple users
@Guillochon Try my updated solution above for a single site setup.
Jan
29
comment How to use same email for multiple users
@Guillochon I don't see any change in WP 3.5 that would make this code to not work. And this is for a MULTI-SITE setup, are you testing on a WP MU setup?
Dec
11
comment Make post slug have priority over category slug
@bertkat You mean, you have 404/not found error on categories? Did you try flushing the rewrite rules?
Dec
5
comment Trying to implement AJAX into my admin pages. Am I improperly enqueue and localizing my scripts?
Check the Network/XHR tab in Firebug to debug ajax requests. You can check if the ajax call is made and what is the response form the back-end.
Dec
5
comment Trying to implement AJAX into my admin pages. Am I improperly enqueue and localizing my scripts?
in your JS file replace wp_ajax.ajaxurl with ajaxurl.
Dec
5
comment Trying to implement AJAX into my admin pages. Am I improperly enqueue and localizing my scripts?
On the admin side, ajaxurl is already available as a global javascript variable, so you don't actually need that localizing part. What is the response of the ajax call if you enable debugging? (DEBUG=TRUE in config file)
Dec
4
comment Users are being redirected to main site when trying to register on subsite of my Multisite network
Have you seen answers to a similar question here? My own solution was a small hack to wp-login.php!
Dec
4
comment How do I get allowed Media Library upload file extension list?
according to the source code, wp_get_mime_types() returns the list of ALL mime types and applies the 'mime_types' filter on the list. The filter should be used to add types, not remove them. get_allowed_mime_types() returns a list of allowed mime types, it uses wp_get_mime_types() to fetch the list but applies one more filter: 'upload_mimes' which can be used to remove types.
Dec
4
comment How do I get allowed Media Library upload file extension list?
This function is introduced in WP3.5 and is not available in current stable release 3.4.x.
Oct
24
comment Deregister a CSS file that comes with a plugin
@drake035 Search for language-selector.css in the source code and then you will see in the first line of icl_lang_sel_nav_css function it checks for this constant. See WPML Coding API for more constants: wpml.org/documentation/support/wpml-coding-api/#disable_css_js
Oct
24
comment Deregister a CSS file that comes with a plugin
@drake035 See my updated answer above.
Oct
24
comment Deregister a CSS file that comes with a plugin
Please make sure the call back name you register with add_action matches your function name. In the sample above, it's 'dequeue_wpml_styles'. And where did you exactly put the code?
Oct
6
comment wordpress multisite, how to keep user on subdomain throughout registration process?
@Damien I know, this is the only hack I made in a heavily customized multi-site setup. We have a few custom plugins tightly integrated with WordPress default login/registration system which enables login with social networks, register with password and custom roles, email activation, ... all done without a single hack. But for this issue, there was no better approach in my setup. I think this can be improved in WordPress with a simple filter or option in network settings.