function cj_shortcode_generator_new() { $shortcode_generator_path = cjtheme_item_path('includes_dir') . '/shortcode-generator'; $shortcode_generator_url = cjtheme_item_path('includes_url') . '/shortcode-generator'; require_once sprintf('%s/cj_shortcode_generator_panel.php', $shortcode_generator_path); // echo '<link rel="stylesheet" href="'.$shortcode_generator_url.'/style.css" />'; }
function cjtheme_framework_init() { require_once sprintf('%s/widget_options_form.php', cjtheme_item_path('includes_dir')); require_once sprintf('%s/dashboard-widget.php', cjtheme_item_path('includes_dir')); require_once sprintf('%s/bootstrap-walker.php', cjtheme_item_path('includes_dir')); require_once sprintf('%s/admin_ajax.php', cjtheme_item_path('includes_dir')); require_once sprintf('%s/push_notifications.php', cjtheme_item_path('includes_dir')); }
function cjtheme_maintenance_mode_page() { if (cjtheme_get_option('maintenance_mode_status') == 'enable') { if (!current_user_can('manage_options')) { require_once sprintf('%s/maintenance/index.php', cjtheme_item_path('framework_dir')); die; } } }
function cjtheme_duplicate_options() { global $cjtheme_file_opts; $duplicates = implode('<br />', array_unique(array_diff_assoc($cjtheme_file_opts, array_unique($cjtheme_file_opts)))); if (!empty($duplicates)) { $display[] = '<div class="error">'; $display[] = sprintf(__('<p><strong>ERROR</strong>: Duplicate options found! <br /><b>%s <br />(%s)</b></p>', 'cjtheme'), cjtheme_item_info('item_name'), cjtheme_item_path('item_dir')); $display[] = '<p>' . $duplicates . '</p>'; $display[] = '</div>'; echo implode('', $display); } }
function cjtheme_notifications_js() { $cjtheme_notification_name = sha1('cjtheme_notification_' . site_url()); $cjtheme_notification_value = get_option($cjtheme_notification_name); $cjtheme_notification_timestamp_name = sha1('cjtheme_notification_' . site_url() . 'timestamp'); $cjtheme_notification_timestamp_value = get_option($cjtheme_notification_timestamp_name); if (!isset($cjtheme_notification_timestamp_value['timestamp'])) { update_option($cjtheme_notification_timestamp_name, array('ID' => 0, 'timestamp' => time('+1 minute'), 'closed' => 0)); } $cjtheme_notification_value = get_option($cjtheme_notification_name); $cjtheme_notification_timestamp_value = get_option($cjtheme_notification_timestamp_name); $now = time(); $check = $cjtheme_notification_timestamp_value['timestamp']; if ($check < $now) { wp_enqueue_script('cj-push-notifications-js', cjtheme_item_path('admin_assets_url') . '/js/push-notifications.js', array('jquery'), '', true); } }
if (!empty($shortcode_tags)) { foreach ($shortcode_tags as $key => $value) { $tag = explode('_', $key); if (@in_array($tag[0], $cj_products_text_domains)) { $select_shortcodes[$tag[0]][] = $value; $shortcode_options[$value] = @unserialize(cjtheme_do_shortcode('[' . $value . ' return="options"]')); } } } ?> <div class="cj-shortcode-generator-lightbox"> <div class="cj-shortcode-generator"> <h3 class="heading"> <img src="<?php echo cjtheme_item_path('includes_url') . '/shortcode-generator/cj-icon.png'; ?> " /> <?php _e('CSSJockey Shortcode Generator', 'cjtheme'); ?> <a href="#close" class="cj-shortcode-generator-close">×</a> </h3> <?php if (!is_null($select_shortcodes)) { ?> <div class="cj-shortcode-footer clearfix"> <div class="cj-shortcode-display-container"> <div style="padding:10px;"> <select id="cj-select-product"> <option value="0"><?php
<?php if (isset($_GET['page']) && isset($_GET['callback']) && $_GET['callback'] != '') { $callback = $_GET['callback']; $check_item_options_folder = file_exists(sprintf('%s/' . $callback . '.php', cjtheme_item_path('options_dir'))); $check_core_options_folder = file_exists(sprintf('%s/includes/options/' . $callback . '.php', cjtheme_item_path('framework_dir'))); if (!$check_item_options_folder && !$check_core_options_folder && !$cjtheme_addon_options) { echo cjtheme_message('error', sprintf(__('<b>%s.php</b> not found in options or addons directory.', 'cjtheme'), $callback)); } else { if ($check_item_options_folder) { require_once sprintf('%s/' . $callback . '.php', cjtheme_item_path('options_dir')); global $cjtheme_item_options; if (!empty($cjtheme_item_options) && !empty($cjtheme_item_options[$callback])) { cjtheme_admin_form($cjtheme_item_options[$callback]); } } elseif ($check_core_options_folder) { require_once sprintf('%s/includes/options/' . $callback . '.php', cjtheme_item_path('framework_dir')); global $cjtheme_item_options; if (!empty($cjtheme_item_options) && !empty($cjtheme_item_options[$callback])) { cjtheme_admin_form($cjtheme_item_options[$callback]); } } elseif ($cjtheme_addon_options) { require_once $cjtheme_addon_tabs; if (!empty($cjtheme_addon_tabs)) { echo '<ul class="cj-addon-tabs">'; foreach ($cjtheme_addon_tabs as $key => $menu) { $li_id = $key; if (is_array($menu)) { echo '<li id="' . $li_id . '" class="has-sub-menu"><a href="#" onclick="return false;" title="">' . ucwords(str_replace('_', ' ', $key)) . ' <i class="cj-icon icon-white cj-icon-caret-down"></i></a>'; echo '<ul>'; foreach ($menu as $skey => $sub_menu) { echo '<li id="' . $li_id . '"><a href="' . cjtheme_callback_url($skey) . '" title="">' . $sub_menu . '</a></li>';
function cjtheme_load_debug_file() { if (isset($_GET['cjtheme_debug']) && $_GET['cjtheme_debug'] == 1) { require_once sprintf('%s/debug.php', cjtheme_item_path('item_dir')); die; } }
<?php global $current_user; get_currentuserinfo(); $user_info = cjtheme_user_info($current_user->ID); $item_name = cjtheme_item_info('item_name'); $item_type = cjtheme_item_info('item_type'); $quick_setup_quide_link = '<a href="' . cjtheme_item_info('quick_start_guide_url') . '" target="_blank">Quick Start Guide</a>'; $menu_icon = '<img src="' . cjtheme_item_path('framework_url') . '/assets/admin/img/menu-icon.png" width="16" />'; $welcome_msg = <<<EOF <p> <b>Hello {$user_info['display_name']}</b>,<br> Thank you for using our {$item_name} WordPress plugin. </p> <p> I am here to assist you setting up this plugin on your website and I'll also show you some awesome features that comes with this plugin. </p> <p> If you like, you can also check out our {$quick_setup_quide_link} to setup this pugin and learn more about the features. </p> EOF; $end_tour_msg = <<<EOF <p> <b>Thank You, {$user_info['display_name']}</b>,<br> </p> <p> Its been nice interacting with you. In case you need me again,<br> you can call me from <b>Help & Support</b> menu from the navigation on plugin settigns page. </p> <p> Here are a few useful links for further help and contact with CSSJockey team. </p>
function cjtheme_assistant_messages() { global $cjtheme_assistant_messages; require_once sprintf('%s/functions/assistant/messages.php', cjtheme_item_path('modules_dir')); $case = basename($_SERVER['SCRIPT_NAME']); switch ($case) { case 'nav-menus.php': //echo @cjtheme_assistant_msg($cjtheme_assistant_messages['nav-menu.php']); break; default: # code... break; } }
<?php require 'theme-update-checker.php'; $item_info = cjtheme_item_info(); $cjtheme_eon = sha1('cjtheme_verify_epc' . site_url()); $cjtheme_eov = get_option($cjtheme_eon); $cjtheme_upgrade_url = 'http://api.cssjockey.com/?cj_action=upgrades&item_id=' . $item_info['item_id'] . '&item_type=' . $item_info['item_type'] . '&purchase_code=' . $cjtheme_eov . '&slug=' . basename(cjtheme_item_path('item_dir')) . '&site_url=' . site_url(); $theme_slug = basename(get_template_directory_uri()); $theme_update_checker = new ThemeUpdateChecker($theme_slug, $cjtheme_upgrade_url);
<?php /** * @package CSSJockey WordPress Framework * @author Mohit Aneja (cssjockey.com) * @version FW-20150208 */ $hooks_file = sprintf('%s/hooks.php', cjtheme_item_path('item_dir')); if (file_exists($hooks_file)) { require_once $hooks_file; }
<?php require_once 'class-plugin-update.php'; $item_info = cjtheme_item_info(); $cjtheme_eon = sha1('cjtheme_verify_epc' . site_url()); $cjtheme_eov = get_option($cjtheme_eon); $cjtheme_upgrade_url = 'http://api.cssjockey.com/?cj_action=upgrades&item_id=' . $item_info['item_id'] . '&item_type=' . $item_info['item_type'] . '&purchase_code=' . $cjtheme_eov . '&slug=' . basename(cjtheme_item_path('item_dir')) . '&site_url=' . site_url(); $cjtheme_plugin_upgrades = new PluginUpdateChecker($cjtheme_upgrade_url, cjtheme_item_path('item_dir') . '/index.php', basename(cjtheme_item_path('item_dir')));
<?php ob_start(); require_once 'item_setup.php'; require_once sprintf('%s/framework/framework.php', dirname(__FILE__)); require_once sprintf('%s/helpers/init.php', cjtheme_item_path('includes_dir')); require_once sprintf('%s/init.php', cjtheme_item_path('includes_dir')); do_action('cjtheme_functions');
<?php /** * @package CSSJockey WordPress Framework * @author Mohit Aneja (cssjockey.com) * @version FW-20150208 */ // New Shortcode Generator require_once sprintf('%s/shortcode-generator/tinymce_shortcode_generator.php', cjtheme_item_path('includes_dir')); /* Depriciated if(is_admin() && strpos(cjtheme_current_url(), 'post.php') > 0){ add_filter( 'cmb_meta_boxes', 'cjtheme_shortcode_generator_run' ); } */ function cjtheme_shortcode_generator_run(array $meta_boxes) { global $shortcode_tags; // Start with an underscore to hide fields from custom fields list $prefix = '_'; $default_post_types = array('post', 'page'); $custom_post_types = get_post_types(); if (!empty($custom_post_types)) { $custom_post_types = @array_keys($custom_post_types); if (is_array($custom_post_types)) { $show_metabox_on = array_merge($custom_post_types, $default_post_types); } else { $show_metabox_on = $default_post_types; } } else { $show_metabox_on = $default_post_types;