« first day (1207 days earlier)      last day (4036 days later) » 

00:06
Hint: If you're writing translatable strings, read about punctuation in foreign languages. I always thought that stuff like semicolons exist everywhere :P
 
2 hours later…
02:19
favorite color scheme for phpstorm? prefer dark myself, might have to create one
i realize there are some dark ones but they aren't like the one's i've built for coda 2 and dreamwaver
02:57
phpstorm: impressed with the CSS swatch beside a Hex value
 
5 hours later…
07:49
@GhostToast solarized light. doesn't native darcula work for you?
Or solarized dark, if you prefer dark themes
I also like darkula and monaki
08:24
Does anyone know how to add a JS file to the visual editor? mce_css is for stylesheets, but I cannot find a method for JS files
anu
anu
08:57
@GhostToast Tomorrow night
10:02
Argh, stati
10:20
@toscho Return of the Jedi Stati
Are questions in off topic by default?
that’s how I found that tag
answers can be given, but the questions seem very much a SO kind of thing, like this for instance: wordpress.stackexchange.com/questions/129444/… <-- I know the solution to this, but people might gloss over the title of the question, I probably would...
"Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic."
I think that makes it pretty clear
10:41
The most viewed question in that tag:
1
Q: What is the best way to detect IE browsers 8 and below?

Brian LarsonI'm using some HTML5 functionality that only works on IE9 and I need to detect whether visitors are running on IE8 or below (mainly just IE8 or 7 of course). I've tried some plugins but the one that was working didn't seem to support IE9 (just up to 8). It's called PHP Browser Detection (http://w...

Accepted answer: User agent sniffing. :/
 
2 hours later…
12:33
@ALL Experiencing a strange issue with namespaces and AJAX. I test places in code where my AJAX requests give me more back than 0 with defined( 'DOING_AJAX' ) AND DOING_AJAX AND exit( var_dump( "TEST" ) );. Strangely during AJAX requests I don't get into functions or classes:
add_action( 'admin_enqueue_scripts', '\WCM\scriptsStylesAdmin' );
function scriptsStylesAdmin( $screen )
{
	defined( 'DOING_AJAX' ) AND exit( var_dump( __LINE__ ) );
}
doesn't work. It's like if the callback doesn't get attached or called.
@kaiser if you are in class, try array('\my\namespace\Class', 'method')
I thought trying to use plain functions first, then solving the problem from within a class.
Closures don't work at all - already know that. And they don't work for uninstall callbacks as well.
admin_enqueue_scripts available in AJAX?
should be. it's a full admin request. anyway, the AJAX Cb should work. But it doesn't.
I'm now testing all again. For the 10th time. :/
@kaiser admin_enqueue_scripts runs in header, header doesn't run in ajax
12:45
ah. ok. anyway, in this case I'm testing it with the actual callback.
Plain function runs:
add_action( "wp_ajax_foo_action", function( $data ) {
	defined( 'DOING_AJAX' ) AND exit( var_dump( __LINE__ ) );
} );
are you trying to call from a no_priv situation?
And __construct() from add_action( 'init', '\WCM\Setup' ); callback runs as well.
@userabuser nope
So closure above triggers.... wtf?
Ok. Narrowed it down: Plain function with '\Namespace\Bundle\function' seems to work. Same goes for closure. Just classes don't work:
	add_action( "wp_ajax_foo_action", array( '\WCM\Bundle\Controllers\FooController', 'ajaxCb' ) );
	add_action( "wp_ajax_foo_action", array( __CLASS__, 'ajaxCb' ) );
Doesn't make a difference if it's a static method as callback or a normal one.
these are both static
try __NAMESPACE__ for it instead of typing it out
@kaiser go into do_action in core and dump result of call_user_func, to see what its getting
will do both.
Ok, array( __NAMESPACE__.'\Classname', 'ajaxCb' ) does not work.
@userabuser dumping inside it now leads me to wp_die( 'Invalid taxonomy' ); :D
13:01
ah
dumped it some lines upfront and dumped current($wp_filter[$tag]) now it somehow works. still can't see a single cb attached.
13:16
At least none of the cb that I attached from this plugin.
13:28
This is driving me nuts...
@kaiser if it makes you feel any better I'm stuck in my own JS nightmare right now too... so I feel your pain
Actually it's no JS nightmare. The JS works just fine. Problem is that the callback isn't attached in any way.
 
1 hour later…
14:48
Lost an immense amount of time to prove that AJAX should work. Back to finding a problem...
-1
A: how to get a file path of wp-config.php of wordpress site?

ZekthYour wp-config.php is in the root of your wordpress installation basically so just use something like : $url = site_url(); include_once $url . '/wp-config.php'; cf: http://codex.wordpress.org/Function_Reference/site_url If the file is not at the native place ( just try with file_exists php ...

calling site_url was marked as the answer
15:13
strange... now everything works. so not sure on which hook it fails.
 
3 hours later…
18:11
How do you add an anchor around <strong>some text</strong> with DOM?
I tried to just modify the node value, but after saving the HTML, it converts entities or something... Just doesn't work at all.
I see the benefit to using DOM but my goodness is it tough to get down.
18:27
@MichaelEcklund crude and rude...
$doc = new DOMDocument();
$doc->loadHTML($html);
$wrap = $doc->getElementsByTagName('strong');
foreach ($wrap as $strong) {
    echo '<a href="#">'.$strong->nodeValue .'</a>';
}
@userabuser Thanks for that. I'm trying to do something much like this but can't seem to get it to work properly.
18:59
Wow... for some reason $dom->saveHTML($node); inside the loop doesn't display your added anchors. But outside the loop if you just $dom->saveHTML(); it displays your added anchors. That was my mistake.
19:29
@toscho you ever used SE hotkeys script in Opera 12?
rarely
can you please try reproduce this stackapps.com/a/4517/24300
@Rarst Oh, that. Yes, confirmed. This is why I use a separate user.js directory for stack sites
so you change dir for every site? hm, I guess I mostly need it on WPSE
moved to separate dir, thanks for pointer :)
20:23
> I think WordPress has the standing and audacity to be an intelligent force in the ongoing evolution of language.
Wordpress.
I cannot even fathom what that statement is meant to imply.
Maybe we're to all start speaking in loops?
I think he sees WordPress functions as the heralding of a new English. $english, if you will. Or $wp_english depending on whether the coin toss decides the 'wp' prefix should be included.
Lol! Reading the actual discussion, OOP organization of Core would prevent WordPress from devolving English into $wp_english
I wonder if highschool students will be able to study $wp_english to fulfill their foreign language credit.
@StephenHarris note the misuse of the word intelligent.
20:59
@toscho perhaps he meant destructive or ignorant and simply fell victim to demonic possession whilst typing the word.
Probably a close friend of the author of do_action( 'retreive_password', $user_login );
Maybe we need spell checking in our IDEs? Or you know... quality reviews.
need? PhpStorm long has spell check :)
every IDE has that
even Notepad++
Oh. I guess I've never needed it, then :P
not enough PHP :) Faker
and SQL statement generator for migrating site :P
22:12
got to those Backbone lessons at code school - pretty good indeed
Can someone with a touch screen device please test labs.toscho.de/test/select-multiple and tell me how usable that is?
works really well on android phone
a os-specific UI opens which has all the names, and a checkbox to the right of each entry
cool, thanks. can I see a screen shot?
result page shows values i selected
sure
22:17
(android/chrome) I get list with checkboxes - works good, but I only see one item when I am done
i'm on stock browser for cyanogenmod 10.something
as in dropdown, submits ok
same as rarst for one item in box
top-most chosen
the problem I try to solve: I have to show a list of terms from an unknown taxonomy, and I don’t know how many terms are there for each taxonomy.
so size="10" is ignored?
meh
22:21
I have added a style attribute to set the height. Better?
makes no difference
is overriden by browser i believe
use javascript to tell user something like....
I actually have a tall box
Android, Chrome
[Lila Berndt] +4 others
A tall box, but no text...
Until I select names, then it displays one of the selected
Opera Mobile
No text is really bad
22:25
before i select something, box is blank as well
or if i deselect all
that’s not very usable
similar output on a very, very old phone i happen to have laying around. like first gen android
Android 4.2.2 (stock) with Chrome, post-selection:
I guess I have to live with that. :/
@boscho wins prize for most notifications
22:34
Lol. From left to right: alarm, missing wifi, new emails (personal), temperature, weather, Simple.com purchase notification, new emails (work), black-ice warning, new texts, app updates.
I need to clean up that mess at some point.
Maybe disable some crap.
i use gmail for personal, stock email for work
is nice to have two diff notifications. icons look diff though for me
Not a bad call
you people check email? on the phone?
@Rarst yea we have jobs :D
I have ~60 different email forwarders that end up in three different Gmail inboxes, each associated with a different Chrome profile/extension set O.o
22:36
me too! I am not falling that low though
I check my email like non stop on my phone.
I pretend that I check email on my phone
really I just clear mail notifications from my phone and feel vaguely accomplished.
if servers go down, i'm on point for that crap. so i can't be away from email usually
at WordCamp Norway Marko was like "I have 600 emails in inbox!", I was like "I have 3..."
yea. "meh, a problem for future me"
@boscho filters + forwarders + labels are nice
i have 3 diff gmail accounts linked to my primary
22:41
@GhostToast indeed! I've spent a lot of time setting up my filters, but I need another few hours to get it all working super-smoothly :). Seems by the time that I do, I've signed up for a bunch of new services that elude my established filters, and the cycle starts all over again.
stop signing up for crap
i recently pushed all of my ancient email to "archive" status. its nice having just 4 or 5 emails in my inbox that i consider important enough to leave there
@Rarst I'm addicted :(
much better than starring things for followup
back in the day I'd make a new email forwarder for every new service I signed up for. As soon as it started getting spammed or I stopped using the service I'd just kill the forwarding address - kept everything real clean but became quite the hassle.
@GhostToast I definitely need to start archiving things...

« first day (1207 days earlier)      last day (4036 days later) »