Where to put my code: plugin or functions.php in wordpress
If the functionality is not related specifically to presentation of content, then it is squarely within Plugin Territory. This list is long: Modifying core WP filters (wp_head content, such as canonical links, generator and other HTML meta, etc Site Favicon Post-content shortcodes Post sharing…