This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: JSON API - Custom fields support for the create_post method | |
* Version: 0.0.1 | |
* Author: Birgir Erlendsson (birgire) | |
* Author URI: https://github.com/birgire | |
* Plugin URI: https://gist.github.com/birgire/02dfadbcb0ddc3fdb064 | |
* Description: Extension to the JSON API plugin, to enable custom fields to be added with the "create_post" method | |
* Licence: GPLv2+ | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Auto Posts Injector For Infinite Scroll | |
* Description: This plugin helps you to automatically inject posts into the main loop. You must use custom code to start the injection. See the example. | |
* Plugin URI: https://gist.github.com/birgire/252b72448646d29a64b6 | |
* Author: birgire | |
* Author URI: https://github.com/birgire | |
* Version: 0.0.1 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Usage Examples: | |
*/ | |
$post_id = 3522; | |
echo 'Counting all normal comments for a given post: ' . wpq_get_normal_comments_count( $post_id ); | |
echo 'Counting all extra comments for a given post:' . wpq_get_extra_comments_count( $post_id ); | |
echo 'Counting all extra comments, without replies, for a given post:' . wpq_get_extra_comments_without_replies_count( $post_id ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* function merge_user_edits() | |
* | |
* Merge the user edits to the existing meta data: | |
* | |
* @author birgire | |
* @version 0.0.1 | |
* @param integer $user_id | |
* @param array $data | |
* @param array $edits |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var addComment = { | |
moveForm : function(commId, parentId, respondId, postId) { | |
var t = this, div, comm = t.I(commId), respond = t.I(respondId), cancel = t.I('cancel-comment-reply-link'), parent = t.I('comment_parent'), post = t.I('comment_post_ID'); | |
if ( ! comm || ! respond || ! cancel || ! parent ) | |
return; | |
t.respondId = respondId; | |
postId = postId || false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fetch taxonomy terms statistics for all posts before due date, with a single database query. | |
* | |
* Assumes that the 'due' values are saved as YYYYMMDD | |
* | |
* @see http://www.wpquestions.com/question/showChronoLoggedIn/id/9770 | |
* @param string $taxonomy | |
* @param string $meta_key | |
* @return mixed Database query results | |
* @version 0.0.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Child Pages Meta Box | |
* Description: Child pages meta box for hierarchial post types | |
* Author: Birgir Erlendsson (birgire) | |
* Plugin URI: http://wordpress.stackexchange.com/a/158636/26350 | |
* Version: 0.0.2 | |
*/ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The Sponsor Posts Injector - Usage Example | |
* | |
* @version 0.0.3 | |
* @uses content-sponsor.php | |
* @file functions.php | |
* @see http://wordpress.stackexchange.com/q/158133/26350 | |
*/ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Product Attributes - Debug | |
* Description: Dump the product attributes in a metabox. | |
* Author: birgire | |
* Author URI: Https://github.com/birgire | |
* Version: 0.0.1 | |
*/ | |
// PHP 5.3.3+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Method 1: Use the the_title() filter to modify the first link name in wp_list_pages(). | |
* | |
* @see http://wordpress.stackexchange.com/questions/156742/change-parent-name-with-wp-list-pages | |
*/ | |
// ----------------------------------------- | |
// Place this wpse_title() function definition into | |
// the functions.php file in the current theme directory. |