sample code that you can addopt and chage… to check is plugin installed.
// addition check on init hook.
add_action('admin_init', 'wpse_73859_init');
function wpse_73859_init(){
// if - we in wp-admin
// if - we class of polylang not found
// and if we can manage_options (there a lot of different
// capabilities you can use install_plugins for example...)
if (!class_exists('Polylang') && current_user_can('manage_options')){
// message function created on a fly...
$msg = create_function('', 'echo "<div class=\"updated\"><p>require polylang plugin</p></div>";');
// and finaly notice!
add_action('admin_notices', $msg);
}
}
You actually can install plugin ( do silent download / unziping / actiavation) but its SO unacepted that you can’t imaging. You basicly breaking privacy of person who use your theme.
Related Posts:
- Automatic Updates For Private And Commercial Themes?
- If I build a custom theme, will it update?
- Wordpres core-update theme renames theme folder name
- How do I send out an update for my custom wordpress theme?
- Making update notification functionality for my themes
- Best practices for monitoring the need for future updates on a theme that I developed?
- Custom theme/plugin update checks
- Pushing updates to your premium theme
- Theme showing incorrect update
- Have WP Theme update from Git Repository
- Prevent update check for specific theme
- Prevent WordPress updates from overriding custom language translations?
- How can one update a theme on a live site without interruption?
- WordPress 5.8 update problem custom theme styles are overridden by core styles common.min.css
- Avoid theme updates, just one theme
- Same theme name issue with wordpress repository theme
- What is the correct way to update both WP/plugins/themes without breaking the site?
- Execute upgrade-theme with coding
- How to change database values on theme update
- How can I ping update-core.php with a script?
- Custom theme updater – random string in new theme name
- Theme Javascript.php Overwritten Nightly [closed]
- Updating a live theme safely?
- How to make updatable custom WordPress theme?
- Updatable theme developing
- Looking to create an “update theme” functionality for a custom front-end dashboard
- Is it possible to issue a theme update that requires a new plugin?
- Update modified Shopify third-party theme [closed]
- Any way to permanently translate themes?
- How to throw the “We need ftp info” at a user
- How to Enfroce Domain Licensing Limits? [closed]
- How to add custom css file in theme?
- CSS not updating in browser when I change it
- How to remove search bar from a wordpress theme? [closed]
- Get url of thumbnail from the media uploader
- How to: Update live sites theme from version control repo via plugin or library? [closed]
- Adding items to page template dropdown on Page Edit Screen
- How to use logout function on custom menu link?
- use add_action(‘wp_head’) in a widget for generating dynamic CSS styles
- Front End Post Submit Form
- Page attribute template dropdown not displayed even the syntax is correct
- How to add a text widget during theme activation
- WordPress Theme customisation CSS
- Why does this loop only work on the homepage?
- Nesting Functions within Functions
- Theme check: Missing a text-domain
- Can I customize any WordPress parent block-based theme template files by child theme like a parent classic theme?
- How to determine if post has widget content?
- Custom Script Section Only Echoes Text
- How can i convert the figma design into wordpress [closed]
- A custom theme with support for multiple layouts
- WordPress Theme Development: How to redirect templates the right way?
- Creating Theme Options Page
- How can I let templates choose which stylesheets are enqueued?
- WordPress with broken paging page 3
- What is the best way to organize template parts?
- wp_enqueue_script outside functions.php file?
- How to implement a $_SESSION alternative in WordPress inside a theme without a plugin?
- How can I make my options in an array and store theme in WP options one DB row?
- Differences between developing custom themes for wordpress.com and wordpress.org?
- Easy to develop on a URL that is changed for production?
- How to control on which pages the Aldehyde theme’s main slider is shown?
- WordPress stylesheet isn’t being added
- How to detect and display a page only for IE?
- Customizer – loading settings/controls/sections/panels based on a id/page id
- Where to place template files?
- Getting author URL outside the loop
- cannot update wordpress from 3.4.2 to 3.5
- Change image size depending on page
- How to include a mu-plugin as a theme dependency?
- How to use ajax in wordpress and sending the data without refreshing ?
- Adding an external link to product grid list pages for woocommerce
- What and where are the WordPress core-bundled scripts?
- wordpress automatic update does not run
- How do I get from search_theme_directories() to the $stylesheet (name) for switch_theme()
- Tabbed theme options query about add_settings_section callback function
- How to know if I am on 1st page
- Archives and Categories in Custom Menu
- How to create a robust and logic class naming system in WordPress theme developing?
- How do I keep my iframes responsive and scaled to fit their container?
- I don’t know why categories are showing below post
- WordPress Custom font not found
- How do I control the header space in non-front pages in Twenty Seventeen?
- Target second from last post in loop
- Customizer API way function is_customize_preview() works only in main page?
- Advantages/Disadvantages Using Theme Editor Instead of Pages
- Magnific Popup – Add Caption to Images
- Why do WordPress developers use so many opening and closing PHP tags when developing themes? [duplicate]
- paragraph format in WYSIWYG on a custom theme?
- unable to display the image meta value as background
- Background Updates Not Happening
- editor style css and page template with and without sidebar
- 3 x 3 grid of posts on the home page
- How to update my own theme?
- The normal loop with different styles doesn’t work in search.php
- Pass custom css class to add_menu_page
- How to force unlink on attached/inserted images?
- How to create sub-menu in “Allure Real Estate Theme for Placester”?
- Not Able to Access Terms Under Custom Taxonomy Archive
- WordPress search field won’t get wider