This file contains 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
add_filter('manage_page_posts_columns' , 'lunarwp_core\add_stats_column'); | |
add_filter('manage_post_posts_columns' , 'lunarwp_core\add_stats_column'); | |
/** | |
* Add Number of Views to the Post Listings' Columns | |
* | |
* @since 1.0.0 | |
* | |
* @param array $columns Post Listing Columns | |
* @return array Returns the amended columns array | |
*/ |
This file contains 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
add_action('manage_page_posts_custom_column', 'lunarwp_core\add_stats_column_render', 10, 2); | |
add_action('manage_post_posts_custom_column', 'lunarwp_core\add_stats_column_render', 10, 2); | |
/** | |
* Add Stats to to the Posts & Pages Listings (in Admin area) | |
* | |
* @since 1.0.0 | |
* | |
* @param array $column Post Listing Columns | |
* @param integer $post_id Post ID | |
* @return array Returns the amended columns array |
This file contains 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
add_filter('genesis_footer_widget_areas', 'lunarwp\add_columns_to_footer_widgets', 10, 2); | |
/** | |
* Add column class to each of the footer widgets | |
* | |
* @since 1.0.0 | |
* | |
* @param string $output HTML output for the footer widgets | |
* @param string $footer_widgets | |
* @return string Return the amended $output | |
*/ |
This file contains 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
//* Remove the entry header from within the loop & | |
//* place it into a new hook 'lunarwp_entry_header | |
remove_all_actions('genesis_entry_header'); | |
add_action('lunarwp_entry_header', 'genesis_do_post_format_image', 4); | |
add_action('lunarwp_entry_header', 'genesis_entry_header_markup_open', 5); | |
add_action('lunarwp_entry_header', 'genesis_entry_header_markup_close', 15); | |
add_action('lunarwp_entry_header', 'genesis_do_post_title'); | |
add_action('lunarwp_entry_header', 'genesis_post_info', 12); | |
add_filter('genesis_markup_site-inner_output', 'lunarwp\do_page_header', 10, 2); |
This file contains 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
//* Swap the site description ahead of the site title | |
remove_action('genesis_site_description', 'genesis_seo_site_description'); | |
add_action('genesis_site_title', 'genesis_seo_site_description', 1); |
This file contains 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 spa_integration_language_form() { | |
include_once SF_PLUGIN_DIR.'/admin/library/sp-languages.php'; | |
global $siteLang, $locale; | |
# Get user language setting | |
$siteLang = $locale; | |
//* var_dump($locale); // Result = 'fr_FR' | |
//* var_dump($siteLang); // Result = 'fr_FR' | |
if(!empty($siteLang)) { |
This file contains 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
# ------------------------------------------------------------------ | |
# sp_localisation() | |
# Setup the forum localisation | |
# ------------------------------------------------------------------ | |
function sp_localisation() { | |
# i18n support | |
global $spPaths; | |
$locale = get_locale(); |
This file contains 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
add_filter( 'wp_get_attachment_url', 'lunarwp_modify_attachment_url', 10, 2 ); | |
/** | |
* Replace out hex characters in an URL | |
* | |
* @since 1.0.0 | |
* | |
* @param string $url Attachment URL | |
* @param integer $post_ID Optional. Attachment ID. Default 0. | |
* @return string Returns the amended attachment url | |
*/ |
This file contains 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
/** | |
* An example of how to call it | |
*/ | |
add_action( 'wp_head', function() { | |
print_list_hooked_functions( 'genesis_header' ); | |
} ); | |
/** | |
* Print a list of all hooked functions | |
* |