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]
- Change admin bar to default:off
- Template for individual post designs
- Update exisiting site to 3.5 release candidate
- How to determine if a category is empty?
- The seventh parameter passed to add_submenu_page()
- What would happen if the admin installs a plugin when the plugin is included in the theme?
- What are the details for function argument wp_update_plugin()
- How do I get my child-theme to work with my theme’s includes folder?
- wp_insert_post breaks rewrite rules
- Where can I find a good reviewed collection of Twenty Ten child themes?
- Template Hierarchy for get_header()
- Remove frameborder attribute from iframes
- how do I get a sidebar’s id or number for use with is_active_sidebar()
- Looking for the code in twentyten that allows users to select images for the header/banner
- Relative Time On Posts
- WordPress as a data intensive web app
- How to determine which custom header image is being shown
- using wordpress without javascript
- Theme Check: Could not find post_class
- Implement content-nosidebar.php / content-leftsidebar.php
- Where should I update_options in a theme?
- Users table association with users_metadata table appears broken
- Injecting a custom sql query into a page/theme
- What are the Entry classes for?
- Installing WordPress locally
- Custom markup with wp_nav_menu based on pages
- Force Balance Tags not working
- Fetch wordpress video attachment with post ID
- Template selection area is not visible on page editor sidebar in wordpress twentty sixteen default theme
- Why does has_nav_menu return false when get_registered_nav_menus shows the opposite?
- Common single page template options
- Custom Blocks as part of a theme
- How to set up diffrent mobile theme for single site in WordPress?
- Enqueued JavaScript is not working
- Show specific category posts on Genesis framework home page
- How to fix : Uncaught ArgumentCountError: Too few arguments to function? [closed]
- I have WordPress setup on primary domain, how do I set it up on its subdomain using the same database?
- Theme development – Automatically menu creation
- Questions from a new WP Dev [closed]
- How to enable Disqus comments in a WordPress theme I’m creating from scratch? [closed]
- tiny_mce_before_init: ‘exact’ => true has no effect
- pre_get_comments or the_content filter
- Pagination not working on custom post page
- What might cause a featured image not to display?
- How to conditionally add a wp_filter
- How to set default values for edit_post_link() in my theme?
- Why is the `if else` not working?
- Creating an advanced searchform based on select boxes
- Why WordPress developer still using timthumb and what are advantages using them? [duplicate]
- I don’t think WordPress is loading jquery or bootstrap js
- Show popover with url and option to open in new window
- Is it possible to show sort page excerpt in search.php
- How to display home page last modified date in anywhere of wordpress theme?
- Loop is breaking my theme. How can I fix?
- How do you remove the “Your Main Benefit Statement Goes Here.” From one of my pages?
- Error Handling when building WordPress themes
- Show all menu levels except top level. How to exclude top level of a menu?
- Recall translations made with Poedit
- Standard technique for AJAX post endpoint: WP REST or WP API?
- How to achieve this navigation style in wordpress navigation
- How to dowload and edit content of a website
- How Does One Create a Global Variable Repository
- Passing a location-dependent array via wp_localize_script within a shortcode
- Retrive posts thumbnail in original size
- Is there any open source WordPress Themes?
- After a while attachment meta data is missing “sizes” data
- Template for posts of category in block theme?
- Add text when displying attribute with a hook on single product page
- What triggers WordPress automatic updates? (revisited)