public static function get_instance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new self();
         self::$instance->setup_actions();
     }
     return self::$instance;
 }
Exemplo n.º 2
0
/**
 * Init Shortcake
 *
 * @return null
 */
function shortcode_ui_init()
{
    $shortcode_ui = Shortcode_UI::get_instance();
    $fields = Shortcode_UI_Fields::get_instance();
    $attachment_field = Shortcake_Field_Attachment::get_instance();
    $color_field = Shortcake_Field_Color::get_instance();
    $post_field = Shortcode_UI_Field_Post_Select::get_instance();
}
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
define('SHORTCODE_UI_VERSION', '0.5.0');
require_once dirname(__FILE__) . '/inc/class-shortcode-ui.php';
require_once dirname(__FILE__) . '/inc/fields/class-shortcode-ui-fields.php';
require_once dirname(__FILE__) . '/inc/fields/class-field-attachment.php';
require_once dirname(__FILE__) . '/inc/fields/class-field-color.php';
require_once dirname(__FILE__) . '/inc/fields/class-field-post-select.php';
add_action('init', 'shortcode_ui_load_textdomain');
add_action('init', function () {
    $shortcode_ui = Shortcode_UI::get_instance();
    $fields = Shortcode_UI_Fields::get_instance();
    $attachment_field = Shortcake_Field_Attachment::get_instance();
    $color_field = Shortcake_Field_Color::get_instance();
    $post_field = Shortcode_UI_Field_Post_Select::get_instance();
}, 5);
/**
 * Load translations
 *
 * @return null
 */
function shortcode_ui_load_textdomain()
{
    load_plugin_textdomain('shortcode-ui', false, dirname(plugin_basename(__FILE__)) . '/languages/');
}
/**
 * Register UI for Shortcode
 *