« first day (1095 days earlier)      last day (4148 days later) » 

00:01
you are the enemiiiie! now.
2
@Rarst you understand that I'm slightly shocked.
2
you just escaped from contributor day in time :)
Girls have benefits ;)
Anyway wouldn't ever have said yes to working on something for free when Matt profits from my efforts.
I did QP for free
and answered few questions here :)
Where one is fully under your control. And the other one can be deleted or modified any time... not to forget mod super powerz.
now I can dump ungrateful job of dealing with code reference on wp org (what I wanted in first place) and move to more interesting things with QP :)
really, wp org in such a pitiful state I have no issue helping with it some
00:14
Sorry, but you'll have to elaborate or rephrase. Not sure if I got everything right. If you want, you can as well tell me on Skype if you don't want to expose that to the public.
expose what?.. it's 3am I am just about to fall off
poke me tomorrow, out
 
3 hours later…
03:03
@kaiser I hope you don't go over to the darkside too my friend!
Isn't return $query; required in the function posted in this answer? wordpress.stackexchange.com/a/67628/10691
(if yes, and you have edit privileges, please correct it.)
@userabuser Sure? 'cause that means this is wrong: wpbeginner.com/wp-tutorials/…
@its_me Positive. You can do either.
hmm
03:32
If I want to include a post_type and I do it like this:
$query->set('post_type',array('post','page'));
How'd I do the opposite? i.e. say it which post_types to exclude
Don't think there's anything like $query->unset to make my job easy. :P
return $query;
@userabuser ??
set the post types you want and return the query
that excludes the ones you dont want
@userabuser I want to do it the other way because I don't want to keep adding stuff to the array when I create new post types (I already have 4 and plan to add more)
maybe I should make it a question
get_post_types <- returns an array list of post types, then you create an array of disallowed post types and do an array diff
pass the difference to your set method
03:44
thanks, I'll give it a shot right away
otherwise you'd have to inspect the $query var and unset things in a similar fashion
@userabuser can you please give an example? not sure I understand what you mean
you are passing the $query var as reference to your function, so before you do a $query->set() you can modify the $query variable.
Dump the $query var to see what I mean.
okie
but my suggested method above is probably nicer I'd say...
get existing post types, array diff against disallowed post types, pass in sanitized array to set method and rejoice
03:47
yeah, and as I see it, it's easier too :)
@userabuser is array_diff necessary? the '-' (minus) operator'd do it right?
after you do that, just dump the $query var again to see whether or not you have effectively populated your post type array
sure thing!
minus? in what?
you can use a slew of array functions to end up at the same result, not just diff
filter, map, etc
whatever takes your fancy
 
6 hours later…
09:30
add_action( 'pre_get_posts', function ($query) {
	if ( is_home() && $query->is_main_query() ) {
		$query->set( 'posts_per_page', 16 );
		return;
	}
} );
I have this inside my theme's functions.php. It is pretty much a copy of an example from the pre_get_posts action documentation on the WordPress codex, but it doesn't appear to work
I must be missing something blindingly obvious here
09:45
add_action( 'pre_get_posts', 'pansy_custom_pagesize' );
function pansy_custom_pagesize( $query ) {
	if ( is_home() && $query->is_main_query() ) {
		$query->set( 'posts_per_page', 16 );
		return;
	}
}
@PrivatePansy Yes, you are. Try something like this:
@its_me Tried that too. It doesn't work either. And I do have PHP 5.3.13
@PrivatePansy Okay, try again with this instead:
add_action( 'pre_get_posts', 'pansy_custom_pagesize', 1);
Doesn't work. And the default for the third parameter on add_action is 1
@PrivatePansy So, your home page isn't showing 16 posts?
Hmmm, hang on, let me try something first
09:53
@PrivatePansy By the way, I just tried it on my test site. It's indeed working.
so you are probably doing something wrong, somewhere
ok
Well, I was thinking the secondary loops that are being used before the main loop on the homepage are the problem, so I added wp_reset_postdata, but that doesn't help either
Ah! so you are doing a custom query
let me see...
1 sec
The main loop is standard. There are two other secondary loops that uses get_posts with setup_postdata
I don't think those affected the main loop, but I might be wrong
<section class='home-recent archive-body two-col' id="content">
	<?php wp_reset_postdata(); while (have_posts()) : the_post(); ?>
		<?php if ( ! in_array(get_the_ID(), $shown_article)) get_template_part( 'content' ) ?>
	<?php endwhile; ?>
</section>
Once this is clear. This:
if ( is_home() && $query->is_main_query() ) {
is catching only the main query
get the idea of what I am saying?
Yes, and the code I've got above is the main loop, right?
09:57
@PrivatePansy wp_reset_postdata(); shouldn't be there. AFAIK, it only needs to be used when you've created a secondary query, and that too, after endwhile;
Yeah, I added that just now just in case it might do something
I am not a wordpress expert, but I can take a look at the template on the whole if you'd like
It's... messy
so is life
heh, what isn't? anyway...
@PrivatePansy your code is way different from the wordpress way of doing it and it's kinda difficult for me to comprehend it. But I'd start with this: <?php if ( ! in_array(get_the_ID(), $shown_article)) get_template_part( 'content' ) ?>
@its_me That's to make sure any post from the featured area doesn't overlap with the posts in the main loop
Also, first theme I'm writing from scratch, so I'm not exactly familiar with the WordPress way of doing things. And the little I've actually seen of the WordPress way doesn't really impress me
Ah, found the problem
Disabling Jetpack's infinite scroll fixed the problem
the wordpress way... ← ↑ ↨ ↓ →
2
heh!
/**
 * Let's overwrite the default post_per_page setting to always display a fixed amount.
 *
 * @param object $query
 * @uses is_admin, self::archive_supports_infinity, self::get_settings
 * @return null
 */
function posts_per_page_query( $query ) {
	if ( ! is_admin() && self::archive_supports_infinity() && $query->is_main_query() )
		$query->set( 'posts_per_page', self::get_settings()->posts_per_page );
}
Well this is... annoying
10:13
wait..
@PrivatePansy See this: jetpack.me/support/infinite-scroll
There's a posts_per_page parameter that you can set
Right, but now I need to find out if is_home is available in init
@PrivatePansy Don't know for sure, but I don't think so.
Yeah, no
Only available after parse_query
Still, can't hurt to try
@its_me Also, the advice on that page is really half-arsed
.infinite-scroll #navigation,
.infinite-scroll.neverending #footer {
    display: none;
}
@PrivatePansy That's for JS-disabled devices
^ This is a bad idea because if your user has JS disabled then they'd never see #navigation
@its_me No, .infinite-scroll isn't added by the JS. It's added by the plugin, to the body_class array
10:22
@PrivatePansy Nah. You should have the ID in your HTML, that's the point
I should probably submit a bug report for this
well, umm
nvm
@its_me Not sure what your point here is
nvm :P
Although given the number of bugs being fixed I think this will take months
If I can get svn set up on this computer I might have a go at submitting a patch for this and a few other bugs I've found in Jetpack
Fantastic, I just created bug #2000 plugins.trac.wordpress.org/ticket/2000
10:47
@PrivatePansy not worth the time
Btw, is this your index.php file?
home.php.
There's a difference between "default" home pages and static front pages. And there's a difference between index.php, home.php and front-page.php. Let me see if I find an answer that explains that. Might mess with your conditionals.
@kaiser No, it's none of that
48 mins ago, by Private Pansy
Disabling Jetpack's infinite scroll fixed the problem
46 mins ago, by Private Pansy
/**
 * Let's overwrite the default post_per_page setting to always display a fixed amount.
 *
 * @param object $query
 * @uses is_admin, self::archive_supports_infinity, self::get_settings
 * @return null
 */
function posts_per_page_query( $query ) {
	if ( ! is_admin() && self::archive_supports_infinity() && $query->is_main_query() )
		$query->set( 'posts_per_page', self::get_settings()->posts_per_page );
}
Exactly. And what is inside self::archive_supports_infinity()?
@StephenHarris Have you got the mail from WCM User Lang Switcher? Seems we somehow forgot to follow up there for quite some time :D
public static function archive_supports_infinity() {
	$supported = current_theme_supports( 'infinite-scroll' ) && ( is_home() || is_archive() );

	return (bool) apply_filters( 'infinite_scroll_archive_supported', $supported, self::get_settings() );
}
That's it. It should also support search pages, but someone forgot about that (there's a bug report out there right now)
11:01
is_home() might be your problem.
2
A: index.php isn't front page but shows as it is

Milois_home() and is_front_page() can be a bit confusing, they're both true on the same page if your front page is the posts page, but in your case with a static front page, is_home() is true on your blog page, and is_front_page() is true on your static front page. From Conditional Tags: is_home...

Have you... actually read through all of the messages above?
The code above is from the Jetpack plugin, which overrides posts_per_page
That's why my code doesn't work.
Yep, I have read through. Just trying to find a way how you can hack it.
Yeah... no
infinite_scroll_archive_supported is a filter. You can hook in there and override the result.
I just went to Settings > Reading and set the default to 16 instead
11:03
... ok. then it's solved.
Not ideal, because the archive pages are designed for lesser posts, but it should work
Then use the filter
@kaiser No... what email?
@StephenHarris Check the support forums. Guess you haven't subscribed to the forum.
@kaiser No, because archive_supports_infinity is used elsewhere too
11:04
@PrivatePansy What's your problem? You can conditionally switch inside your filter callback.
Hooking onto the filter to remove home.php from the list of supported pages could cause a lot of problem
It returns a boolean. How would you remove something from a list in there?
@kaiser Just seen it... Don't think I do. never use to work.
Because you want archive_supports_infinity() to return false when the page is_home()
But if you do that infinite scroll gets disabled completely on the home page, which I do not want
@StephenHarris On the bottom of the list of threads should be a subscribe link or something around that.
@PrivatePansy Then your first line in the callback would be if ( is_home() ) return true;. Then let your logic follow.
11:07
@kaiser Yeah, I know. never used to work :). I think last week @Rarst said he fixed it though...
Ah! Completely forgot that we can now talk to the dark side /Cc @Rarst
@kaiser The current code already does that - $supported = current_theme_supports( 'infinite-scroll' ) && ( is_home() || is_archive() )
Unless there's some way for the callback in the filter to know which function called it, but I don't believe PHP supports that sort of call stack inspection
And even if it did it would be a terrible idea
Matt: "Rarst, I am your father!", Rarst: "Noooooooo!"
4
hahahaaa!
@PrivatePansy Maybe you can just hook into pre_get_posts and use a higher priority for your filter. Effectively overriding the JetPack amount of posts per page.
11:11
@kaiser Hmmm, could try that
It's the third argument.
Almost forgot add_action has a priority argument
Works like this:
I know how it works, thanks
add_action( 'hook_name', 'callbackName', $priority, $numberOfArgs );
@PrivatePansy :)
11:14
@kaiser just a quick question, where is set_locale() used? and what's is purpose beyond what add_filter( 'locale', 'wcm_get_user_lang', 20 ); does? github.com/wecodemore/wcm_lang_switch/blob/master/…
Nothing is quick when one has to look at code that's several month old :)
@kaiser Well I meant, I didn't want to populate github issue with inane questions :)
@StephenHarris doesn't seem to be called anywhere. maybe we left that in from one of the older versions?
@kaiser I think so. Also, by just looking at the code - everything is fine. If the user hasn't set a language it falls-back to the WP_LANG constant passed to the locale filter.
Reading the same there.
Can you follow the problem of the guy?
11:20
user image
6
...
hrhrhrhr
@kaiser At work, so I don't have a local dev install. But looking at code now...
who's the emperor?
@StephenHarris Yeah, seems I got misguided by looking at the method alone. Ain't got WP available at the moment. Let's talk about it again in the evening.
11:34
@TomJNowell I don't know, but I heard he has no clothes.
@kaiser Found the bug, and have posted fix, but can't actually commit any code at the mo...
@StephenHarris ok, fired up storm. will fix comma mess, then this one with get_locale()
@StephenHarris fixed. just not pushed to wp.org - will leave that to you. Is that ok?
11:49
@kaiser ok, will do that later when I'm back at home
12:27
@StephenHarris ... just found this post from you wordpress.stackexchange.com/questions/101378/…. Do you have any idea on how to cause wordpress to make the session expire when the browser is closed?
Hope you don't mind asking you directly, just saw your post by coincidence. My problem is that if I set $expiration to 0 via the auth_cookie_expiration filter the session expires immediately ...
@s1lv3r No I don't think you can. And its not a WP issue, but a browser one. It use to be that if your cookie didn't set an expiration time, it would expire when the browser closed (a 'session cookie'). But I believe chrome now keeps it indefinitely.
@s1lv3r not at all :)
@StephenHarris Just thought it would be possible cause I read at php.net/set_cookie that $expires 0 means expires on browser close.
@s1lv3r Its still up to the browser though...
@StephenHarris yeah, right. That's one of the things where I'm just thinking "darn, this can't be that hard" ... maybe it's really not possible.
One workaround would be to use heartbeat API. Set a low expiration time (1 minute?) and every 30 seconds update the cookie. When they leave the site after 1 minute the cookie will expire...
12:36
hmmm so if the user doesn't perform an action (doesn't cause a pageload) within a minute he is logged out?
ah heardbeat API. I see. :-)
@s1lv3r no, because you're using heartbeat to update the cookie. That runs in the background. Though you'll need to make sure heartbeat doesn't fall into idle mode (I think it then runs only every 2.5 minutes).
Sounds interesting. I'll have a look at it. Just suspecting that this will cause some performance issues. It's a portal system (so basically every visitor is logged in) ...
Thank's for your insight so far. :-)
13:16
@userabuser As our resident photoshopper - would you mind? twitter.com/toscho/status/390087959405293568
We should create a book... "Where's Rarst?". Take everyday, busy scenes and try to spot rarst in them ...
@StephenHarris if you tempt me you know I will :)
I liked the one with the top hat and the "Ask Rarst" lettering. :-)
13:52
user image
5
@StephenHarris see what happens when you tempt me? Rarst with short hair.
nice!
FFS
@Rarst its tongue in cheek... doh!
If a plugin author needs to write temporary files – such as a mysqldump – where's the accepted place to write them to?
is it Rarst photoshop day?
13:57
@Nick uploads dir
...if you want a guaranteed place to write files to, otherwise depends on use case and how much control you have over the FS.
@Nick or default PHP temp location
@userabuser @kaiser Thanks very much.
@kaiser so when I try this:
	var paginationObject = {
		this.getTotalPostsEl = function( id ) {
			return $( '#' + id );
		}

		this.getTotalPostsVal = function( id ) {
			return this.getTotalPostsEl( id ).val();
		}
	}
i get "unexpected identifier" on the line with this.getTotalPostsEl =
@GhostToast sorry. the = should be a :
<mark>test</mark>
sigh .. highlighting would be a pleasure in here
this.fooBar : function( id ) {
@kaiser same error
14:09
?
unexpected identifier
var FooService = function() {
	this.color = 'white';
	this.setColor = function( color ) {
		this.color = color;
	};
	return this;
};

return new FooService;
Then init with new FooService(). Should work.
Don't you miss a , after the first } ?
@GhostToast ehm... ; is missing after first function.
@s1lv3r where?
after the first function before this.getTotalPostsVal
14:13
@s1lv3r oh, yeah. and there should be no this. and the = should be : Must have been late yesterday :P
The this would be the second example.
	var paginationObject = {
		getTotalPostsEl : function( id ) {
			return $( '#' + id );
		},

		getTotalPostsVal : function( id ) {
			return this.getTotalPostsEl( id ).val();
		}
	}
should work
jep, that looks good.
14:17
Ghost, ... it was only pseudo-code from Kaiser ... you where expected to make working code out of it by yourself. :-D
1
Q: What to do with misspelled tag names?

Ben MillerThere are currently three questions with the tag cross-plattform. This should be spelled cross-platform, but that tag doesn't currently exist. What is the best way to handle this situation? I don't think a tag synonym is the correct solution, because we only want one tag to appear when the use...

@s1lv3r exactly! ;)
> Yo, let's hack the registry.
@userabuser :)
 
1 hour later…
15:34
Anybody know what exactly 'public' argument in register_post_type function does? Read many descriptions but I still don't get it.
does "public" mean content is visible to all "unregistered" (not logged-in) users?
@s1lv3r The first thing I read.
@its_me let me check core really quickly, but I think a good example of a non-public post-type would be nav menu items
It has nothing to do with registered vs. unregistered, but more if you want to use the native wordpress functions to manage this post_type or if it's an "under-the-hood" posttype which is more for internal use ...
@ChipBennett Tried that too. Still find it vague: core.trac.wordpress.org/browser/trunk/src/wp-includes/post.php
@s1lv3r oh
that kinda makes sense
@ChipBennett nav menu items is an excellent example really. Cause the logic to handle (manage & display it) it is custom ...
Nav Menu Items are handled via custom UI (Appearance -> Menus), do not have an archive or single-post display, and are displayed via custom function ( wp_nav_menu() )
@ChipBennett and they don't actually have "posts"
A "public" post type is one that shows up in the Admin menu as a Post Type, and is displayed as a post (i.e. "content") type on the front end
rather just content that used differently
15:40
@its_me they do. Each nav menu item is a post.
> rather just content that used differently
That's why pre_get_posts can adversely impact nav menus, if not accounting for the appropriate loop
@ChipBennett oh! so is that why we use $query->is_main_query()?
@its_me bingo! :)
makes sense, thanks a lot for the explanation! :)
15:42
no problem :)
Just realized that you can't add more than one tag on a Ghost post. Have to save every time you want to add another tag.
Oh. Add a comma and you got a tag.
But it doesn't look like there's a tag archive...
@kaiser the .done() and .then() functions after $.ajax don't seem to take kindly to this nomenclature to reference the parent object's methods
this has to be used very carefully. Always log it to see what it refers to.
2 hours ago, by kaiser
var FooService = function() {
	this.color = 'white';
	this.setColor = function( color ) {
		this.color = color;
	};
	return this;
};

return new FooService;
Play around with this example to see what it does.
15:59
interesting thing for doc browsing & offline - Zeal
@kaiser is your ghost blog public?
GhostPost
@its_me nope. local dev. just bought a domain, no server set up so far.
hmm
WTF!
@kaiser my code was broken due to a missing semicolon before. a missing semicolon after a while(){ }
;
FML
16:33
wait. maybe. argh. this shit is killing me
Is this a good way to set all posts of a custom post type to private by default? (I know it'd work only for new posts or ones edited after the function's added)
add_filter( 'wp_insert_post_data', 'cpt_private' );
function cpt_private( $post ) {
	if( $post['post_type'] == 'vault' ) {
		$post['post_status'] = 'private';
	}
	return $post;
}
@its_me why not do it on save hook? what's that one called...
@GhostToast I'll give it a shot (codex.wordpress.org/Plugin_API/Action_Reference/save_post), but wanted to know if I am doing it right
I'll make it a question on the main site
Another "I'm not going to give you any code; can you divine the solution to my problem?" question:
0
Q: add_filter 'single_template' and use of wp_nav_menu in template

atwellpubI'm using add_filter('single_template',...) to call a unique template file under a certain condition. The problem we're running into is that no matter what I do I can't use wp_nav_menu() successfully in the template file we are calling. Does anyone have any experience with this situation?

try it out
@kaiser i figured out my real problem. it is related to this:
0
Q: How do I access elements via the DOM retrieved from $.ajax()?

David FauxI loaded some HTML from another page via $.ajax: <script type="text/javascript"> $(function() { $.ajax({ url: '/getInfo', context: $('#contentBox'), success: function(data) { $(this).html(data); } }); }); ...

since i am rebuilding pagination, those DOM elements are new. jquery isn't listening for/to those for whatever reason
problem: was listening for $('a.page-item).on('click' ...
i was reinventing all of those elements. wiping them out and brining new ones in (as it is dynamic pagination, the number of links is changing, so was using .html() to build new list on the parent div
since those new DOM elements weren't technically there on page load, this is my new, working target:
$('#ajax-pagination').on('click', 'a.page-item', ...
where the listener is based on the parent item, which never goes away
17:03
@GhostToast perfect :)
i ended up trashing all my object oriented stuff several times because of the issue still being there. what a difficult lesson this all has been.
but an important one. you learned more about DOM nodes and interaction, about browser DOM painting and javascript than you learned in the last year, right?
@kaiser well. it was one lesson of many i've had this year. every lesson is important, even ones that end badly. but in this case it was just needle in haystack as to what the issue was, for me.
So we can reduce the lesson to "a bit of scope, a bit of DOM, but overall: READING ERROR MESSAGES PROPERLY!!1!" ? :)
API Design is Stuck in 2008 http://quibb.com/links/api-design-is-stuck-in-2008/view
18:03
I talked to JSON on the phone once. He was nice.
3
I found JSON to be a creepy guy. When he called, he said I kill you! instead of hi!
Maybe the AOL API routed him wrong.
True story: I once called a JSON API developer to discuss an issue I was having. When he answered the phone, I literally said: "Jason?"
his name was not jason
Friend of mine worked at an event once. The technicians were called Funk and Welan. Yeah, not that funny in English.
@kaiser Ein Freund von mir arbeitete bei einer Veranstaltung einmal. Die Techniker wurden als Funk und Welan. <-- HA!
Google Translator?
18:13
ya
Funk = Radio and Welan = WLan = Wifi.
that is kinda funny
 
2 hours later…
20:10
"First post"-review queue seems to become "WooCommerce"-entry gate (and "may I lead you to the exit?")
20:23
Questions like these are a good reason to add a "minimum competency expectation" to our FAQ/Scope:
0
Q: Displaying Posts in different category problem

user2478101I've been working on some code to try and display 5 posts thats within each category. Howevers its the first time I've ever done this and I've ran into some errors. Here is my code and the error I'm getting is Parse error: parse error in C:\Websites\integrabuildings.co.uk\wp-content\themes\integ...

@kaiser that's why we need to automate that
1
Q: Setting up PubSubHubbub (PUSH) with Wordpress

I am not a FrogI'm trying to set up PubSubHubbub (PUSH) with WordPress so I can allow updates to be seen in real time, without refresh. I have read many, many tutorials online on how to implement this plugin with WordPress but none have got it working for me yet. Here is what I have done so far: 1) I Downloa...

20:58
@ChipBennett make that a meta post
@user1658560 pushing the question here is so not going to work.
21:25
It certainly doesn't hurt
21:39
Right. Welcome to my ignore list.
@kaiser should the composer.json be in the .org repo? I don't think it needs to be...
(currently isn't, but wasn't sure if that was intentional, or it just hadn't been added yet)
@StephenHarris you talking about wcm uls?
@kaiser oh, yeah, sorry :)
I'm not sure how composer would pull from SVN and wp.org. Guess it's enough to have one composer.json on one location. Let those who know their way retrieve it from the right and most up to date source.
@kaiser Cool. Did you update the banners (.png) too? svn says they've been modified, but I hadn't noticed anything on git. I'm guessing its svn being svn...
21:44
yeah, updated them... 9month ago :)
@kaiser oh... :)
@kaiser want to take a look at my working code now so you can tell me how it may be improved? what a treat -- actual working code!
Hey all quick question. I have 2 separate "add_action(" calls to the "save_post" hook - When I combine all the custom metabox form update code into one save_post call - everything works fine. When I break each meta_box save process into their own add_action ( for extensibility of use ) - all the meta_boxes register, but "content" (wsiwyg) does not update.

Does this sound familiar or what is causing this?
@GhostToast Are --actual working code your CLI commands arguments?
But yeah, would like to see that :)
21:47
@kaiser yeah, guess its svn being svn.
@BrandtSolovij why not have one add_action and then the callback function references a few modular functions?
@BrandtSolovij There shouldn't be any issues with that. There's a bug in your code somewhere :).
because i am creating a number of plugins that encapsulate and standardize the use of the custom post types and retrieval
@GhostToast I'm proud of you :)
@BrandtSolovij who hasn't done that already ;)
@StephenHarris - Ok sure, is there anywhere I should look ? Anything ring a bell as to why all the custom meta boxes are being saved but not the wysiwyg editor content? (editor is vanilla )
@kaiser thanks!
@StephenHarris yes. Thanks, mate!
@StephenHarris just for reference. We count 2.342 downloads now.
@BrandtSolovij So you mean the main post content? What happens when you remove your add_action( save_post`...` calls?
21:53
@kaiser @StephenHarris - the intent is to lock down taxonomy and post types. This is for a fairly large scale organization with multiple sites, these plugins create a common API for the business needs. Yes ! Exactly. When all the metabox "$_POST['']" values are saved within one function everything works
@kaiser So, that's what, 5 active users? :P. Download count is screwy. I think a plug-in can get 10-50 'downloads' from bots. At least I've noticed downloads before it even appeared on .org to general public....
but when i say

add_action("save_post", "function1");
add_action("save_post", "function2");
add_action("save_post", "function3");
the data from the metaboxes make it through
but not the post content aka $post->post_content is the same as whatever was there before the edit was made and saved / updated
@BrandtSolovij ok, but if you all your doing is splitting up the content of function1 into function2 and function3 it is conceptually no different. I can't say anymore without code :)
brb
@StephenHarris Yeah. That for sure. Remember the talk on #wceu? And the "hint" on fake downloads? Guess we'll see who really updates and therefore can roughly guess the amount of active plugins.
@StephenHarris Btw, this "grappler" is killing me on GitHub. Have to slow discussion down to get him to zero.
@StephenHarris Ok cool. I guess that was my question - whether the frequency of the call to the hook would cause an error or if something in my code was the issue --- sounds like the hook performs as I would expect it to and i need to look at where the post-content is being severed from the submit - thanks all
21:58
@BrandtSolovij spaghetti code for a "large scale organisation"? Guess you'll drive yourself into a wall in the long term. To your question: Check out the site and TinyMCE related stuff. Saving from there can sometimes be a bit tricky. As well check your nonces. Maybe some of them abort your process.
@kaiser I'm not exactly sure how this would qualify as spaghetti code but i appreciate the vote of confidence.
add_action("save_post", "function3"); VS. add_action("save_post", array( $this, "method" ) );
yes?
@kaiser - ahh interesting - I think i see the issue now, thanks
:)
Btw, If you hit the up-arrow key you can edit your message for some minutes. In the lower right corner of this window as well is a help link for formatting.
nifty stuff :)
22:27
@kaiser just posting :)
@BrandtSolovij awesome :)
@kaiser Reworked per the class arguments suggestion rather than from a function lib and this is now working exactly as intended, sincere thanks for the point in the right direction
@BrandtSolovij There's only issue when functions try to remove themselves from their hooks.
Yeah I can't exactly explain why it was occurring, but the class managed insertion (didn't realize that was an option) is a much better design approach and its working as intended
@kaiser did you meet up with David Decker at wceu? Would like to have met him, but totally missed him...
22:53
@StephenHarris yeah. switch on Skype
just logged in
23:10
0
Q: WPSE Scope: Minimum Competency Requirement

Chip BennettWe often encounter questions (or comments/edits to questions) that are nothing more than PHP syntax errors that have not been properly debugged. (e.g. "I tried that, and my site went blank"). Here's one example from today: Displaying Posts in different category problem The normal expectation is...

1
Q: WPSE Scope: Minimum Competency Requirement

Chip BennettWe often encounter questions (or comments/edits to questions) that are nothing more than PHP syntax errors that have not been properly debugged. (e.g. "I tried that, and my site went blank"). Here's one example from today: Displaying Posts in different category problem The normal expectation is...

@ChipBennett too bad all this won't ever get reworked.

« first day (1095 days earlier)      last day (4148 days later) »