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 | |
/** | |
* The below function will help to load template file from plugin directory of wordpress | |
* Extracted from : http://wordpress.stackexchange.com/questions/94343/get-template-part-from-plugin | |
*/ | |
define('PLUGIN_DIR_PATH','Your-plugin-directory-path'); | |
function ccm_get_template_part($slug, $name = null) { | |
do_action("ccm_get_template_part_{$slug}", $slug, $name); |
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
/** | |
* WordPress | |
* Showing feature image in admin post listing | |
*/ | |
add_filter('manage_posts_columns' , 'ask_custom_columns'); | |
/*add_filter('manage_{post-type-slug}_posts_columns' , 'ask_custom_columns');*/ | |
function ask_custom_columns( $columns ) { | |
$columns = array( |
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 | |
/** | |
* Repeatable Custom Fields in a Metabox with Image upload | |
* Modified by: ashokmhrj | |
* Extracted from: Helen Hou-Sandi | |
*/ | |
define('PATH_TO_JS','define path here'); | |
function ask_admin_repeater_script(){ | |
wp_enqueue_media(); |