111 reputation
7
bio website
location
age
visits member for 9 months
seen Sep 27 '12 at 15:52
stats profile views 238

My account seems to be hacked by some of the moderators. This profile also got changed by somebody a few times. I migrated to Quora, an awesome Q & A web site. I feel very comfortable there.


Aug
21
comment Verify Submitted Form Values and Show Warning Messages with Setting API
The validation callback function does not seem to be able to interact with the admin page. add_action('admin_notices', 'print_errors'); does not do anything in my environment. I'm using v3.4.1.
Aug
21
comment Verify Submitted Form Values and Show Warning Messages with Setting API
Some users disable javascript in their browser. So it is not the ideal solution.
Aug
20
comment Adding Form Fields with Settings API
I see you are using check boxes. What if I want to put three more text fields with a label per each? The layout gets messed up. The form area is restricted to have a large left margin. It seems I have to use another function call for them.
Aug
20
comment Adding Form Fields with Settings API
Would you mind showing an example? If I put more than one form inputs in one field function-callback, then the layout gets largely indented. Also, each callback function has this line $options = get_option('settingsapi_optionname'); Loading an option for one option looks ridiculous when the number of options becomes large.
Aug
20
comment Adding Form Fields with Settings API
So do I have to create a function per option? Isn't it too much? What if there are 20 options to save? Create 20 functions for it?
Aug
20
comment Retrieve Path of admin.php
So is ABSPATH the most reliable way?
Aug
20
comment Can't use plugins_url() in Classes
I think it's possible to use a function for a variable definition. Properties 'in a class' cannot be defined with a function call. Then it's a problem of php syntax.
Aug
20
comment Retrieve Path of admin.php
For the css file it works thanks but for admin.php, actually I need to use include() so I need the system path, not the url. If I include with url, I get Warning: require() [function.require]: http:// wrapper is disabled in the server configuration by allow_url_include=0
Aug
19
comment Can't use plugins_url() in Classes
This is a problem of php. stackoverflow.com/questions/320009/… Functions defined outside a class cannot be used from inside the class.
Aug
19
comment Can't use plugins_url() in Classes
do you mean create a global variable? Is that clean?
Aug
18
comment Localization Problem: Doesn't Display Translated Words
It turned out to be a problem of .mo file naming. CodeStyling Localization created a file named localizationsample-ja_JP.mo but it had to to be localizationsample-ja.mo, without _JP. I realized this by reading the source as you pointed out. It finally got working. Thank you so much.
Aug
18
comment Localization Problem: Doesn't Display Translated Words
I see indeed Codex was wrong. I'm testing with your suggestion now.
Aug
17
comment Localization Problem: Doesn't Display Translated Words
Ah, that's for load_textdomain() but the documentation of load_plugin_textdomain() also says "This function does not return a value." codex.wordpress.org/Function_Reference/load_plugin_textdomain
Aug
17
comment Localization Problem: Doesn't Display Translated Words
load_plugin_textdomain() always seems to return false. According to the documentation of the function, "On failure returns null and also on success returns nothing." Does this mean that if it loads a language file then returns true? "returns nothing" mean returns true, not false?
Aug
17
comment Localization Problem: Doesn't Display Translated Words
Okey, I created a .mo file as well but it doesn't translate. I also tried lowercase text domain. It did not help either. Also there was an error in my code: add_action('int', 'localizationsample_init'); had to be corrected to add_action('init', 'localizationsample_init'); Also load_plugin_textdomain() does not return a value so checking if it is loaded with your suggested method does not seem to work.