NextGEN – Set the “newer to older” sort direction for the galleries in Manage Galleries
function my_custom_gallery_order( $order ) { return ‘DESC’; } add_filter( ‘ngg_manage_galleries_items_order’, ‘my_custom_gallery_order’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
function my_custom_gallery_order( $order ) { return ‘DESC’; } add_filter( ‘ngg_manage_galleries_items_order’, ‘my_custom_gallery_order’ );Continue reading
add_filter( ‘big_image_size_threshold’, ‘__return_false’ );Continue reading
class EnviraGalleryCustom { private function render_feed_output() { // Return empty if gallery data is not set. if ( ! isset( $this->data[‘gallery’] ) ) { return ”; } $gallery_items = $this->data[‘gallery’]; $gallery_html = ”; foreach ( $gallery_items as $id => $item…Continue reading
add_action( ‘admin_head’, function() { ?>Continue reading
// Hook to add admin submenu item under Posts add_action(‘admin_menu’, ‘custom_admin_submenu’); function custom_admin_submenu() { add_submenu_page( ‘edit.php’, // Parent slug (Posts menu) ‘Export Posts’, // Page title ‘Export Posts’, // Menu title ‘edit_posts’, // Capability ‘exported-posts’, // Menu slug ‘display_exported_posts’ //…Continue reading
// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading
#– Allow Shop Manager to Access Product Feed Menus –# function allow_feed_menus_to_shop_manager( $capability ) { if ( current_user_can( ‘manage_woocommerce’ ) ) { return ‘manage_woocommerce’; } return $capability; } add_filter( ‘adt_pfp_admin_capability’, ‘allow_feed_menus_to_shop_manager’ );Continue reading
/* Customize your URL image links with deeplinking * * @link https://enviragallery.com/docs/how-to-create-custom-urls-for-images-in-deeplinked-galleries/ */ add_filter( ‘envira_whitelabel_envira_deeplinking_slug’, ‘custom_envira_deeplinking_slug’ ); add_filter( ‘envira_whitelabel’, ‘__return_true’ ); function custom_envira_deeplinking_slug( $slug_name ) { // Use your own slug replacing my_custom_slug $custom_slug = ‘my_custom_slug’; return $custom_slug; }Continue reading