/**
  * Remove notice
  */
 public static function remove($notice_key)
 {
     if (isset($notice_key) && is_string($notice['key'])) {
         self::$notices = get_option(self::option_key('admin_notices'));
         if (!is_array(self::$notices)) {
             self::$notices = array();
         }
         if (isset(self::$notices[$notice['key']])) {
             unset(self::$notices[$notice['key']]);
         }
         update_option(self::option_key('admin_notices'), self::$notices);
     }
 }
 public static function intro_notice()
 {
     ACFFrontendFormAdminNotices::add(array('key' => self::option_key('intro_notice'), 'notice' => '<div class="updated"><p>' . 'Thank you for using ' . self::$plugin_name . '. For support please post in our <a href="http://www.theportlandcompany.com/forums/">forums</a> link to. You may also be interested in our other <a href="http://theportlandcompany.com/">Plugins</a> or services including <a href="http://theportlandcompany.com/">Website Development</a>, <a href="http://theportlandcompany.com/">Custom WordPress Plugin Development</a>, <a href="http://theportlandcompany.com/">Search Marketing</a> and Brand Management.' . '</p></div>', 'persist' => false));
 }
Exemplo n.º 3
0
<?php

/**
 * Plugin Name: Front End Form Extension for ACF (Free)
 * Description: Display an ACF Form with the custom fields you created on the front end. You can use the short code <code>[acf_form group_id="x"]</code>, where x are field group ids separated by a comma. e.g. <code>[acf_form group_id="1,6,10"]</code>, You can also set whether to create a new entry by using <code>[acf_form group_id="x" create_new_post="true" post_type="post-type"]</code> the type is an argument that sets the type of post. Type is set to 'post' by default.
 * Author: The Portland Company
 * Author URI: https://profiles.wordpress.org/d363f86b/
 * Plugin URI: http://www.theportlandcompany.com
 * Version: 1.0.9
 */
define('ACFFEF_FREE_VERSION', '1.0.9');
require_once dirname(__FILE__) . '/classes/ACFFrontendFormAdminRawScripts.php';
require_once dirname(__FILE__) . '/classes/ACFFrontendFormAdminNotices.php';
require_once dirname(__FILE__) . '/classes/ACFFrontendFormActivation.php';
require_once dirname(__FILE__) . '/classes/ACFFrontendFormPointers.php';
require_once dirname(__FILE__) . '/classes/ACFFrontendForm.php';
ACFFrontendForm::instance();
ACFFrontendFormPointers::instance();
ACFFrontendFormAdminRawScripts::instance();
ACFFrontendFormAdminNotices::instance();
ACFFrontendFormActivation::instance();
register_activation_hook(__FILE__, 'acffef_free_activation_hook');
function acffef_free_activation_hook()
{
    ACFFrontendFormActivation::intro_notice();
}
$current_version = get_option('acffef_free_version');
if (!is_string($current_version) || $current_version != ACFFEF_FREE_VERSION) {
    update_option('acffef_free_version', ACFFEF_FREE_VERSION);
}