コード例 #1
0
    $class = str_replace('_', '-', $class);
    if (is_file($file = dirname(__FILE__) . "/class/{$class}.class.php")) {
        include_once $file;
    }
});
/* ================================================== */
/* init includes                                      */
include plugin_dir_path(__FILE__) . 'inc/rest-endpoint-api.php';
include plugin_dir_path(__FILE__) . 'inc/add-button-to-wyswig.php';
include plugin_dir_path(__FILE__) . 'inc/schordcode.php';
include plugin_dir_path(__FILE__) . 'inc/widgets.php';
include plugin_dir_path(__FILE__) . 'inc/wrapers.php';
/* ================================================== */
/* init storage forms model with options              */
global $JSON_FORMS;
$JSON_FORMS = new wp_options_manager();
$JSON_FORMS->register_ajax_methods();
$JSON_RENDERED_FORM = new wp_init_json_forms();
/* ================================================== */
/* init executor                                      */
$WP_EXE = new wp_executor();
/* ================================================== */
/* GUI menu and page                                  */
/* Register manu and display block                    */
function json_forms_menu()
{
    add_menu_page('JSON Forms', 'JSON-forms', 'administrator', 'url_json_forms', 'json_forms_callback');
    //add_submenu_page('url_json_forms', 'JSON-forms GRID', 'JSON-forms GRID', 'administrator', 'url_json_forms_grid', 'add_grid_callback');
}
add_action('admin_menu', 'json_forms_menu');
function json_forms_callback()
コード例 #2
0
<?php

/*
Plugin Name: WP Results
Plugin URI: https://github.com/dadmor/Results
Description: Results will be amazing!!!
Author: gdurtan
Author URI: https://pl.linkedin.com/pub/grzegorz-durtan/11/b74/296
Version: 0.0.5
License: GPL2
*/
define("PLUGIN_SANDF_DIR", dirname(__FILE__));
define("PLUGIN_SANDF_URI", plugin_dir_url(__FILE__));
/* Include better manage wp options */
include plugin_dir_path(__FILE__) . 'class/wp-options-manager.class.php';
$R_OPTIONS = new wp_options_manager();
$R_OPTIONS->register_ajax_methods();
include plugin_dir_path(__FILE__) . 'class/admin-column-frontend.class.php';
$ACOL = new admin_column_frontend();
/* Include class to inject custom templates int wordpress pages */
include plugin_dir_path(__FILE__) . 'class/virtual-template.class.php';
/* Forms */
include plugin_dir_path(__FILE__) . 'class/wp-alpaca-options.class.php';
include plugin_dir_path(__FILE__) . 'inc/metabox-alpacajs-form.php';
include plugin_dir_path(__FILE__) . 'class/wp-search-and-filter.class.php';
include plugin_dir_path(__FILE__) . 'inc/widget-filter-and-search.php';
/* Inclide search and filters class */
/* widget to display loop with sidebars */
/* result widget remove admin bar ??? */
//include plugin_dir_path( __FILE__ ).'inc/widget-result-list.php';
include plugin_dir_path(__FILE__) . 'inc/widget-paypal-cart.php';