How do I show data from gravity forms in my template? [closed]

You can look at the docs, but you’ll probably end up reading the real documentation: the source code. If you do, you’ll find that: GFFormsModel::get_leads($form_id) returns a list of entries for a form (maybe you know that one already), where each item in the array is itself an array, an “Entry object“ GFFormsModel::get_form_meta($form_id) returns a … Read more

Activate a plugin through PHPMyAdmin or FTP?

I fixed this by going through PHPMyAdmin to the table “Options” and then the row active_plugins. I had the following stored there (formatted for readability): a:10:{ i:0;s:49:”1and1-wordpress-wizard/1and1-wordpress-wizard.php”; i:1;s:29:”acf-repeater/acf-repeater.php”; i:2;s:30:”advanced-custom-fields/acf.php”; i:3;s:45:”limit-login-attempts/limit-login-attempts.php”; i:4;s:27:”redirection/redirection.php”; i:6;s:33:”w3-total-cache/w3-total-cache.php”; i:7;s:41:”wordpress-importer/wordpress-importer.php”; i:8;s:24:”wordpress-seo/wp-seo.php”; i:9;s:34:”wpml-string-translation/plugin.php”; i:10;s:38:”wpml-translation-management/plugin.php”; } I added a new line (for the missing plugin) and incremented the a:10 to a:11 to indicate that … Read more

‘Global’ settings page for multisite plugin

As a reference To create network or global settings, you need to do the following Add a settings page add_submenu_page( ‘settings.php’… # cf options.php for blog level` Add a global option add_site_option($key,$value) Update a global option update_site_option($key,$value) Get a site option get_site_option($key) Global settings are saved to the sitemeta table (individual blog settings are saved … Read more

Disable plugin / plugin action via theme

When WordPress activates a plugin, it calls the activate_plugin() function. This function activates the plugin in a sandbox and redirects somewhere else on success. It’s been used by a few authors to programmatically activate plugin dependencies. There’s another function, deactivate_plugins(), that does a similar thing in reverse … it’s actually how WordPress deactivates plug-ins when … Read more

How To Activate Plugins via Code?

This is how I did it in some web apps: function run_activate_plugin( $plugin ) { $current = get_option( ‘active_plugins’ ); $plugin = plugin_basename( trim( $plugin ) ); if ( !in_array( $plugin, $current ) ) { $current[] = $plugin; sort( $current ); do_action( ‘activate_plugin’, trim( $plugin ) ); update_option( ‘active_plugins’, $current ); do_action( ‘activate_’ . trim( … Read more

is_plugin_active function doesn’t exist

That’s because the file in which is_plugin_active() is defined – wp-admin/includes/plugin.php – is only loaded in the admin, after your plugin is loaded. Thus, you can only call it after ‘admin_init’ has fired: function check_some_other_plugin() { if ( is_plugin_active(‘some-plugin.php’) ) { … } } add_action( ‘admin_init’, ‘check_some_other_plugin’ );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)