« first day (1470 days earlier)      last day (3482 days later) » 

9:38 AM
3
A: Is there a JavaScript API? How to access public and private data in JS?

G. M.TL;DR There is no JavaScript API in WordPress and no one is planned, but actually, there is no need of it. Backend First of all let's say that, regarding backend, some useful informations can be get using JavaScript global variables (WordPress loves all global flavors). E.g. ajaxurl for th...

Seems like @G.M. won that one :)
 
10:10 AM
of course he did :)
 
10:33 AM
eh eh :D
 
10:59 AM
btw, @G.M. iirc ajaxurl is only present in wp-admin
same goes for typenow and adminpage
ah, just got that...
> Until here I've only talked about backend.
facepalm
 
Backend is an H1 before js variable list :)
also
> First of all let's say that, regarding backend,
 
I'm editing your answer now. Articles aren't that bad as you think :)
> [...] so is not easy for WordPress gives general functions for frontent
:D
 
:D
 
> PHP one is enough if you use proper way to pass information from PHP to JS
I like PHP five much more
> But I have to say that it is not a JavaScript API. It just allows to connect an HTTP request to a JSON response.
@G.M. That's about the JSON API/WP-API. Should we rephrase that?
 
11:15 AM
Well, OP ask for a "WordPress JavaScript API" and other answers seem to say that WP API is exactly that. I wanted to point that, even if WP API is goodness for JS development, it is not a "WP JavaScript API", because there is no a single JS function and it can actually be used in any language, in any application.
If you think it is not clear, I'm happy if you rephrase that.
 
Well, you are not connecting a HTTP request to a JSON response.
You are connecting a HTTP request to an application endpoint which may be controlled by an application that fetches data from some source and eventually returns the data JSON formatted there.
Took me ~5 times to phrase that somehow properly
Anyway @G.M. , I don't know how the WP-API handles it, so this needs rephrasing before I hit "save" on the edit
 
Actually default WP API methods returns JSON response. You may evetually write a custom controller that returns something different than JSON, but default API methods and endpoints return JSON, so I feel is correct saying that it does.
@kaiser
 
edited
I just quoted the docs instead
 
11:30 AM
Much better
thanks
 
n/p - good answer :)
 
> like his user-role
women?
 
normally I write s/he - yeah, gendering that would make sense
> its user-role
user should be neutral imo
 
my english is not so good :) I've learned to use singular "they/their"
> their user-role
should be fine
 
12:05 PM
http://t.co/Mo7XusvQ8j
 
12:26 PM
@Rarst seems like robocopy only works it cmd is run as admin or directly from Powershell. It's messed up on Git Bash :P
 
Git Bash is not my problem
 
@Rarst found you
 
yeah, been there, done that, lived to blog about...
 
still don't get it.
robocopy to-delete empty-folder /MIR
doesn't delete, but copy things
Tried /purge /e as well with same result
Hint pls :)
 
12:41 PM
other way around, RTFM
 
robocopy source target
that is manual - where am I wrong?
 
you are copying empty folder to target directory
 
or is the idea behind it to move a ..
ok
got it
 
please don't erase your hard drive while at it
i start to regret the comment
 
:)
 
12:57 PM
@Rarst better?
 
yeah
 
1:51 PM
Anybody interested in an invitation for keybase.io ?
 
2:11 PM
Design of extensible timelines and events put up some thoughts for discussion on Laps v2
 
 
3 hours later…
5:10 PM
@Rarst can I add a long comment to that discussion, that also contain some code?
 
sure
 
5:23 PM
I am not reading all of that right now :P
 
I guess no :D
 
6:15 PM
that's long
 
6:35 PM
book
@G.M. answers always need a TOC
 
6:47 PM
he should make a small short plugin for that
 
7:24 PM
impossible
That would result in a TOCception.
 
7:36 PM
In my defence I want say that sometimes I write very short blog posts gm.zoomlab.it/2014/backbone-use-cases-wordpress-plugins
 
btw what to use if not backbone?
I am tempted to try Flight some time (JS one, not PHP one)
 
I'm experimenting with React and Ember.
Not together
 
I did good chunk of Ember tutorial at codeschool, but as usual it promptly vented out of my head. this stuff doesn't stick without practical application...
 
Ember is powerful. Maybe too much for WP.
 
yeah, I just need something easy to get into it...
 
7:42 PM
React is a simple nice thing.
 
8:03 PM
I read the docs of WebPack yesterday right after this blog post (good blog btw). The post did make Ember a bit more clear and WebPack looks super slick. And no, that's not an answer to "use with WP".
 
 
1 hour later…
9:25 PM
> This theme is called "Tamagotchi" and was designed by me.
@G.M. Love the italic there :D
 
9:43 PM
@kaiser yes, design is a big word :)
 
@G.M. Just read your intro post to the Ocipiwhatöver Brain module. Looks nice, really.
What it imo is missing is an Adapter between the Facade that acts as entry point and the low level (technically and intellectually) APi that WP has to manage dependencies.
Something like a special array key that you can use in wp_localize_script() that sets the config for the facade
 
not sure I have understood.
 
You have the ->provide( [ 'dashicons', 'admin-bar', 'bootstrap', 'fontawesome' ] ) part and the ->deps( 'wp-color-picker' ) part
the first is what is has and the later is what it needs, right?
 
yes
 
And the later is already provided by the WP core Dependency API with the arguments you can set for wp_register/enqueue_script/style(), right?
 
9:49 PM
yes
 
Why is there no Ocithingy Adapter that bolts the first onto the WP deps API?
 
gotcha
 
I have no VM running atm to give this a try, but I guess a nice way could be if you use the deps arrays keys to define the first, when the values are already the later: [ 'provide' => 'needs', ]
not sure if that is a good idea as there might not be the same amount of provided and needed scripts
but maybe one could use prefixed keys or divide them by positive negative values...
 
Main reason it that Occipital (just like any other Brain stuff) main aim is to use WP functions without using them directly. That for OOP abstraction and better testability.
I don't think 'provide' => 'needs' would be a great idea. Pretty unreadable if you change with real asset handles
 
yeah. was just thinking out loud
since I'm handling dependencies with Grunt, I stopped thinking about dependency management during run time and server side
makes no sense anymore
^i agree completely with you sir. Sorry everyone. I was only just too hot headed right now after Barca lost the Clasico... Sorry again. — Uzair Ahmed 1 hour ago
haha. Physics.SE is hilarious. Thanks for the link, @toscho :D
sorry but i dont want an explanation. i only wanna know the answer — Uzair Ahmed 2 hours ago
OK, then, the answer is 42. Now please read the rules. — Carl Witthoft 2 hours ago
 
10:10 PM
Well, actually the provide feature it's a way to port Grunt into WordPress. As site owner you may want to use Grunt to merge and compress all the styles and scripts in your site: from theme, plugins... this means that you should dequeue the script and the styles from plugins and theme and enqueue your the single big file. That's a pain. Using provide it's a cinch.
 
Folks, I'm new to blogging and I'm looking for a place to set up a practice blog.
Does Wordpress.com (publicly hosted Wordpress) allow Google Analytics style tracking?
 
Go, ask at wp.com please
or read their docs
 
Also, it is forward compatible: if you install a plugin that require one of the merged assets, normally it will be added, because normally WordPress can't know that you have dequeued it because included in the big file. Using provide WordPress knows the script is already there. @kaiser
 
@kaiser I will go ask them. You have a good life, sir.
 
@NickAlexeev you too, sir. And thanks for stopping by.
 
10:14 PM
@NickAlexeev please don't mind him, he isn't being rude, just terse :)
as far as I remember wp com provides own analytics, but mostly doesn't allow any external js
 
@Rarst Not terse enough. I would prefer him tacit.
 
and FYI WordPress stack mostly deals with development for self-hosted version. in SE realm WP com questions will probably go better around Web Apps
 
wp.com is a company with their own product, infrastructure, etc. this site and the people in chat here handle wp.org stuff, which is about an open source software package.
 
@Rarst Thank you, Rastr. I'll check out WebApps.SE too.
 
8
Q: What should we do with Wordpress questions and how tag them?

DrakeUsers starting to do questions about Wordpress. If we they ask about Wordpress.com I think they are on topic, but what if they ask about plug-ins that currently are not supported by Wordpress.com services? If we decide to allow only question about Wordpress.com do you think that could be a goo...

@TomJNowell @toscho @Rarst We really have a migration target for wp.com stuff. Haven't thought that this would be on topic anywhere.
 
10:30 PM
good to know
 
I just pinged/asked them in TL if they have limitations. If they get back to us, then I'll post it in here or in mods room (depending on the answer).
 
10:46 PM
0
Q: Install wordpress on Windows server with minimum problem (plugins compatibility) and maximum performance

ozz I will use this on Production environment (50000 unique visits per day) MySql will be installed on windows, so there is no problem for database side Options: Install Wordpress via WebPI then install emulating dll? for compatibility (like http://curl.haxx.se/download.html) Install Virtual Lin...

@All did I miss something with the question there? I really don't understand the guy and don't want to respond with non sense. Could anybody try to clarify things either for him or me? :)
 
11:15 PM
what's wtf?.. they do it every year
 
11:30 PM
honestly? (rhetorical question)
@Rarst completely different topic: Cmd usage. In Bash I can Alt + Backspace delete word by word. Is there something similar for cmd? Can't find anything about it and it kills me to delete things char by char.
And as a second question: I can only tab-complete the first dir of a path. Did I miss something there?
 
11:47 PM
ok, found something. nvm
 

« first day (1470 days earlier)      last day (3482 days later) »