« first day (2649 days earlier)      last day (2303 days later) » 

12:07 AM
0
Q: Is it okay to ask "How could I better (faster performance) write this [piece of code]?"?

Jonathan GuerinI often have these questions that refer to optimization in terms of speed. For example, just last week I hammered down a function that rendered some social sharing links that took way too much to load from 100ms+ to 2ms. It was amazing. Often times I wanna ask the community what they think I sh...

 
Hey! That's my question.
Hey, everybody, first timer here. I had a few questions. I come from a python environment (low-level, win32api with C++ libraries where needed, python for..python). I learned HTML/CSS/JS/PHP and some frameworks / concepts on the fly and have implemented most of what I needed. One could say my theme could sell well, perhaps 2 copies! :D

Now, the problem is that I'm stuck on actions & hooks. I really have no idea how to use them to incentivize developer extensions in my plugins and such. Anyone has any good reads or?
I've devoured lots of articles / tutorials / read the source code of WP but I just don't understand where they'd fit. Naturally, why do I even wanna use them if I don't have to? Just to learn! For example, I'd like for my instagram plugin to be extended, perhaps some developers want to mess in with the image size and so on.
 
12:56 AM
hows it been wpse
 
1:47 AM
@JonathanGuerin hooks and actions aren't just for extensibility for other developers, they come in handy for yourself sometimes
but it sounds like you have ideas already, e.g. pass the image sizes through a filter before using them so others can add more
it might be that nobody extends it though, who knows
and there are more structured approaches too that dont rely exclusively on actions
 
 
5 hours later…
6:43 AM
23
A: How to create an API for my plugin?

fuxiaThe API you offer in a plugin or a theme depends on the logic of that specific code. There is probably no guide that applies to all situations. I am a contributor for multiple plugins with APIs, and what I have learned so far is: Do not offer an API until you really know how people use your co...

 
 
6 hours later…
12:21 PM
That's a great, great read, @fuxia! I reviewed some of your answers to get a feel of what you're saying, but I'm looking for some "I wanna achieve this, here's the code" type of things. Any resources?
I mean, it's really good, extremely good. I'd like to see some code.
 
 
2 hours later…
1:55 PM
@JonathanGuerin Sorry, I don't have any good examples at the moment. My own WP work during the last ~3 years was mostly private stuff.
 
2:18 PM
Ah, no problems. What I meant was if there were any answers / repos you'd have me look on. I just discovered HumanMade's stuff and going through it.
 
2:47 PM
PHP / Python are interesting, who'd think you could write easy program logic based on errors alone? :D
 
 
9 hours later…
11:26 PM
posted on January 16, 2018 by Ian Dunn

WordPress 4.9.2 is now available. This is a security and maintenance release for all versions since WordPress 3.7. We strongly encourage you to update your sites immediately. An XSS vulnerability was discovered in the Flash fallback files in MediaElement, a library that is included with WordPress. Because the Flash files are no longer needed for […]

 

« first day (2649 days earlier)      last day (2303 days later) »