Example #1
1
 /**
  *
  * @param array $current_import
  * @return bool
  */
 function import(array $current_import)
 {
     // fetch the remote content
     $html = wp_remote_get($current_import['file']);
     // Something failed
     if (is_wp_error($html)) {
         $redirect_url = get_admin_url(get_current_blog_id(), '/tools.php?page=pb_import');
         error_log('\\PressBooks\\Import\\Html import error, wp_remote_get() ' . $html->get_error_message());
         $_SESSION['pb_errors'][] = $html->get_error_message();
         $this->revokeCurrentImport();
         \Pressbooks\Redirect\location($redirect_url);
     }
     $url = parse_url($current_import['file']);
     // get parent directory (with forward slash e.g. /parent)
     $path = dirname($url['path']);
     $domain = $url['scheme'] . '://' . $url['host'] . $path;
     // get id (there will be only one)
     $id = array_keys($current_import['chapters']);
     // front-matter, chapter, or back-matter
     $post_type = $this->determinePostType($id[0]);
     $chapter_parent = $this->getChapterParent();
     $body = $this->kneadandInsert($html['body'], $post_type, $chapter_parent, $domain);
     // Done
     return $this->revokeCurrentImport();
 }
Example #2
0
/**
 * @package MegaMain
 * @subpackage MegaMain
 * @since mm 1.0
 */
function mmpm_theme_options_array()
{
    foreach (get_nav_menu_locations() as $key => $value) {
        if ($key !== 'side_navigation' && $key !== 'top_navigation') {
            continue;
        }
        $key = str_replace(' ', '-', $key);
        $theme_menu_locations[$key] = $key;
    }
    $locations_options = array(array('name' => __('Below are all the locations, which are supported this theme. Toggle for change their settings.', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'primary_settings', 'type' => 'caption'));
    if (isset($theme_menu_locations) && is_array($theme_menu_locations)) {
        $locations_options[] = array('name' => __('You can activate Mega Main Menu in such locations:', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('Mega Main Menu and its settings will be displayed in selected locations only after the activation of this location.', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'mega_menu_locations', 'type' => 'checkbox', 'values' => $theme_menu_locations);
    } else {
        $locations_options[] = array('name' => __('Firstly, You need to create at least one menu', MMPM_TEXTDOMAIN_ADMIN) . ' (<a href="' . home_url() . '/wp-admin/nav-menus.php">' . __('Theme Menu Settings', MMPM_TEXTDOMAIN_ADMIN) . '</a>) ' . __('and set theme-location for him', MMPM_TEXTDOMAIN_ADMIN) . ' (<a href="' . home_url() . '/wp-admin/nav-menus.php?action=locations">' . __('Theme Menu Locations', MMPM_TEXTDOMAIN_ADMIN) . '</a>).', 'key' => 'no_locations', 'type' => 'caption');
    }
    foreach (get_nav_menu_locations() as $key => $value) {
        if ($key !== 'side_navigation' && $key !== 'top_navigation') {
            continue;
        }
        $original_menu_slug = $key;
        $key = str_replace(' ', '-', $key);
        $locations_options = array_merge($locations_options, array(array('name' => __('Layout Options: ', MMPM_TEXTDOMAIN_ADMIN) . '&nbsp; <strong>' . $key . '</strong>', 'key' => $key . '_menu_options', 'type' => 'collapse_start'), array('name' => __('Add to Mega Main Menu:', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('You can add to the primary menu container: logo and search.', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_included_components', 'type' => 'checkbox', 'values' => array(__('Company Logo (on left side)', MMPM_TEXTDOMAIN_ADMIN) => 'company_logo', __('Search Box (on right side)', MMPM_TEXTDOMAIN_ADMIN) => 'search_box', __('WooCart (on right side)', MMPM_TEXTDOMAIN_ADMIN) => 'woo_cart'), 'default' => array()), array('name' => __('Height of the initial container and menu items of the first level.', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('Set the extent for the initial menu container and items of the first level.', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_first_level_item_height', 'type' => 'number', 'min' => 20, 'max' => 300, 'units' => 'px', 'values' => '50'), array('name' => __('Alignment of the first level items:', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('Choose how to locate menu elements of the first level.', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_first_level_item_align', 'type' => 'select', 'values' => array(__('Left', MMPM_TEXTDOMAIN_ADMIN) => 'left', __('Center', MMPM_TEXTDOMAIN_ADMIN) => 'center', __('Right', MMPM_TEXTDOMAIN_ADMIN) => 'right'), 'default' => array('left')), array('name' => __('Location of icon in first level elements', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('Choose where to locate icon for first level items.', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_first_level_icons_position', 'type' => 'select', 'values' => array(__('Left', MMPM_TEXTDOMAIN_ADMIN) => 'left', __('Above', MMPM_TEXTDOMAIN_ADMIN) => 'top', __('Right', MMPM_TEXTDOMAIN_ADMIN) => 'right', __('Disable Icons In First Level Items', MMPM_TEXTDOMAIN_ADMIN) => 'disable_first_lvl', __('Disable Icons Globally', MMPM_TEXTDOMAIN_ADMIN) => 'disable_globally'), 'default' => array('disable_first_lvl')), array('name' => __('Separator:', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('Select type of separator between the first level items of this menu.', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_first_level_separator', 'type' => 'select', 'values' => array(__('None', MMPM_TEXTDOMAIN_ADMIN) => 'none', __('Smooth', MMPM_TEXTDOMAIN_ADMIN) => 'smooth', __('Sharp', MMPM_TEXTDOMAIN_ADMIN) => 'sharp'), 'default' => array('smooth')), array('name' => __('Rounded corners', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('Select the value of corners radius.', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_corners_rounding', 'type' => 'number', 'min' => 0, 'max' => 100, 'units' => 'px', 'default' => 2), array('name' => __('Dropdowns Animation:', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('Select the type of animation to displaying dropdowns. <span style="color: #f11;">Warning:</span> Animation correctly works only in the latest versions of progressive browsers.', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_dropdowns_animation', 'type' => 'select', 'values' => array(__('None', MMPM_TEXTDOMAIN_ADMIN) => 'none', __('Unfold', MMPM_TEXTDOMAIN_ADMIN) => 'anim_1', __('Fading', MMPM_TEXTDOMAIN_ADMIN) => 'anim_2', __('Scale', MMPM_TEXTDOMAIN_ADMIN) => 'anim_3', __('Down to Up', MMPM_TEXTDOMAIN_ADMIN) => 'anim_4', __('Dropdown', MMPM_TEXTDOMAIN_ADMIN) => 'anim_5'), 'default' => array('none')), array('name' => __('Minimized on Handheld Devices', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('If this option is activated you get the folded menu on handheld devices.', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_mobile_minimized', 'type' => 'checkbox', 'values' => array(__('Activate', MMPM_TEXTDOMAIN_ADMIN) => 'true'), 'default' => array('true')), array('name' => __('Direction', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('Here you can determine the direction of the menu. Horizontal for classic top menu bar. Vertical for sidebar menu.', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_direction', 'type' => 'select', 'values' => array(__('Horizontal', MMPM_TEXTDOMAIN_ADMIN) => 'horizontal', __('Vertical', MMPM_TEXTDOMAIN_ADMIN) => 'vertical'), 'default' => array('horizontal'), 'dependency' => array('element' => array($key . '_sticky_status', $key . '_sticky_offset'), 'value' => 'horizontal')), array('name' => __('Sticky', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('Check this option to make the menu sticky. Not working on mobile devices.', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_sticky_status', 'type' => 'checkbox', 'values' => array(__('Enable', MMPM_TEXTDOMAIN_ADMIN) => 'true')), array('name' => __('Sticky scroll offset', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('Set the length of the scroll for each user to pass before the menu will stick to the top of the window.', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_sticky_offset', 'type' => 'number', 'min' => 0, 'max' => 2000, 'units' => 'px', 'default' => 340), array('name' => __('Forced PHP Integration', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('If you have knowledge of PHP you can call this function anywhere in order to display this menu. Please use it only if you professional.', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'forced_integration', 'type' => 'just_html', 'default' => '<pre>&lt;?php wp_nav_menu( array( "theme_location" => "' . $original_menu_slug . '" ) ); ?&gt;</pre>'), array('name' => __('', MMPM_TEXTDOMAIN_ADMIN), 'type' => 'collapse_end')));
    }
    $locations_options = array_merge($locations_options, array(array('name' => __('Logo Settings', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'mega_menu_logo', 'type' => 'caption'), array('name' => __('The logo file', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __("Select image to be used as logo in Main Mega Menu. It's recommended to use image with transparent background (.PNG) and sizes from 200 to 800 px.", MMPM_TEXTDOMAIN_ADMIN), 'key' => 'logo_src', 'type' => 'file', 'default' => MMPM_IMG_URI . '/megamain-logo-120x120.png'), array('name' => __('Maximum logo height', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('Maximum logo height in terms of percentage in regard to the height of the initial container.', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'logo_height', 'min' => 10, 'max' => 99, 'units' => '%', 'type' => 'number', 'default' => 90), array('name' => __('Backup of the settings', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('You can make a backup of the plugin settings and restore this settings later. Notice: Options of each menu item from the section "Menu Structure" is not imported.', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'backup', 'type' => 'just_html', 'default' => '<a href="' . get_admin_url() . '?mmpm_page=backup_file">' . __('Download backup file with current settings') . '</a><br /><br />' . __('Upload backup file and restore settings. Chose file and click "Save All Settings".') . '<br /><input class="col-xs-12 form-control input-sm" type="file" name="' . MMPM_OPTIONS_DB_NAME . '_backup" />')));
    $skins_options = array(array('name' => __('You can change any properties for any menu location', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'mega_menu_skins', 'type' => 'caption'));
    foreach (get_nav_menu_locations() as $key => $value) {
        $key = str_replace(' ', '-', $key);
        $skins_options = array_merge($skins_options, array(array('name' => __('Skin Options: ', MMPM_TEXTDOMAIN_ADMIN) . '&nbsp; <strong>' . $key . '</strong>', 'key' => $key . '_menu_skin', 'type' => 'collapse_start'), array('name' => __('Skin Options of the Initial Container', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'dropdowns_skin_options', 'type' => 'caption'), array('name' => __('Background Gradient (Color) of the primary container ', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_bg_gradient', 'type' => 'gradient', 'default' => array('color1' => '#428bca', 'color2' => '#2a6496', 'start' => '0', 'end' => '100', 'orientation' => 'top')), array('name' => __('Background image of the primary container', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('You can choose and tune the background image for the primary container.', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_bg_image', 'type' => 'background_image', 'default' => ''), array('name' => __('Skin Options of the First Level Items', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'dropdowns_skin_options', 'type' => 'caption'), array('name' => __('Font of the First Level Items', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('You can change size and weight of the font for first level items.', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_first_level_link_font', 'type' => 'font', 'values' => array('font_family', 'font_size', 'font_weight'), 'default' => array('font_family' => 'Verdana', 'font_size' => '13', 'font_weight' => '400')), array('name' => __('Size of icons in the first level items', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_first_level_icon_font', 'type' => 'font', 'values' => array('font_size'), 'default' => array('font_size' => '15')), array('name' => __('Text color of the first level item', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_first_level_link_color', 'type' => 'color', 'default' => '#f8f8f8'), array('name' => __('Background Gradient (Color) of the first level item', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_first_level_link_bg', 'type' => 'gradient', 'default' => array('color1' => 'rgba(255,255,255,0)', 'color2' => 'rgba(255,255,255,0)', 'start' => '0', 'end' => '100', 'orientation' => 'top')), array('name' => __('Text color of the active first level item', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_first_level_link_color_hover', 'type' => 'color', 'default' => '#f8f8f8'), array('name' => __('Background Gradient (Color) of the active first level item', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_first_level_link_bg_hover', 'type' => 'gradient', 'default' => array('color1' => '#3498db', 'color2' => '#2980b9', 'start' => '0', 'end' => '100', 'orientation' => 'top')), array('name' => __('Background color of the Search Box', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_search_bg', 'type' => 'color', 'default' => '#3498db'), array('name' => __('Text and icon color of the Search Box', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_search_color', 'type' => 'color', 'default' => '#f8f8f8'), array('name' => __('Skin Options of the Dropdowns', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'dropdowns_skin_options', 'type' => 'caption'), array('name' => __('Background Gradient (Color) of the Dropdown elements', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_dropdown_wrapper_gradient', 'type' => 'gradient', 'default' => array('color1' => '#ffffff', 'color2' => '#ffffff', 'start' => '0', 'end' => '100', 'orientation' => 'top')), array('name' => __('Font of the dropdown menu item', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_dropdown_link_font', 'type' => 'font', 'values' => array('font_family', 'font_size', 'font_weight'), 'default' => array('font_family' => 'Verdana', 'font_size' => '12', 'font_weight' => '400')), array('name' => __('Text color of the dropdown menu item', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_dropdown_link_color', 'type' => 'color', 'default' => '#428bca'), array('name' => __('Background Gradient (Color) of the dropdown menu item', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_dropdown_link_bg', 'type' => 'gradient', 'default' => array('color1' => 'rgba(255,255,255,0)', 'color2' => 'rgba(255,255,255,0)', 'start' => '0', 'end' => '100', 'orientation' => 'top')), array('name' => __('Border color between dropdown menu items', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_dropdown_link_border_color', 'type' => 'color', 'default' => '#f0f0f0'), array('name' => __('Text color of the dropdown active menu item', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_dropdown_link_color_hover', 'type' => 'color', 'default' => '#f8f8f8'), array('name' => __('Background Gradient (Color) of the dropdown active menu item', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_dropdown_link_bg_hover', 'type' => 'gradient', 'default' => array('color1' => '#3498db', 'color2' => '#2980b9', 'start' => '0', 'end' => '100', 'orientation' => 'top')), array('name' => __('Plain Text Color of the Dropdown', MMPM_TEXTDOMAIN_ADMIN), 'key' => $key . '_menu_dropdown_plain_text_color', 'type' => 'color', 'default' => '#333333'), array('name' => __('', MMPM_TEXTDOMAIN_ADMIN), 'type' => 'collapse_end')));
    }
    $skins_options = array_merge($skins_options, array(array('name' => __('Set of Installed Fonts', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('Select the fonts to be included on the site. Remember that a lot of fonts affect on the speed of load page. Always remove unnecessary fonts. Font faces can see on this page - ', MMPM_TEXTDOMAIN_ADMIN) . '<a href="http://www.google.com/fonts" target="_blank">Google fonts</a>', 'key' => 'set_of_google_fonts', 'type' => 'multiplier', 'default' => '1', 'values' => array(array('name' => __('Font 1', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'font_item', 'type' => 'collapse_start'), array('name' => __('Fonts Faily', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'family', 'type' => 'select', 'values' => mmpm_get_googlefonts_list(), 'default' => 'Open Sans'), array('name' => __('', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'font_item', 'type' => 'collapse_end'))), array('name' => __('Additional Styles: ', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('Here you can add and edit highlighting styles.', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'additional_styles_presets', 'type' => 'multiplier', 'default' => '1', 'values' => array(array('name' => __('Style 1', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'additional_style_item', 'type' => 'collapse_start'), array('name' => __('Style Name', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'style_name', 'type' => 'textfield', 'default' => 'My Highlight Style'), array('name' => __('Text color', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'text_color', 'type' => 'color', 'default' => '#f8f8f8'), array('name' => __('Background Gradient (Color) ', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'bg_gradient', 'type' => 'gradient', 'default' => array('color1' => '#34495E', 'color2' => '#2C3E50', 'start' => '0', 'end' => '100', 'orientation' => 'top')), array('name' => __('Text color of the active item', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'text_color_hover', 'type' => 'color', 'default' => '#f8f8f8'), array('name' => __('Background Gradient (Color) of the active item', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'bg_gradient_hover', 'type' => 'gradient', 'default' => array('color1' => '#3d566e', 'color2' => '#354b60', 'start' => '0', 'end' => '100', 'orientation' => 'top')), array('name' => __('', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'additional_style_item', 'type' => 'collapse_end'))), array('name' => __('Custom Icons', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('You can add custom raster icons. After saving these settings, icons will become available in a modal window of icons selection. Recommended size 64x64 pixels.', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'set_of_custom_icons', 'type' => 'multiplier', 'default' => '1', 'values' => array(array('name' => __('Custom Icon 1', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'icon_item', 'type' => 'collapse_start'), array('name' => __('Icon File', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'custom_icon', 'type' => 'file', 'default' => MMPM_IMG_URI . '/megamain-logo-120x120.png'), array('name' => __('', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'icon_item', 'type' => 'collapse_end')))));
    return array(array('title' => 'General', 'key' => 'general', 'icon' => 'im-icon-wrench-3', 'options' => $locations_options), array('title' => 'Skins', 'key' => 'skins', 'icon' => 'im-icon-brush', 'options' => $skins_options), array('title' => 'Specific Options', 'key' => 'specific_options', 'icon' => 'im-icon-hammer', 'options' => array(array('name' => __('Custom CSS', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('You can place here any necessary custom CSS properties.', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'custom_css', 'type' => 'textarea'), array('name' => __('Responsive for Handheld Devices', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('Enable responsive properties. If this option is enabled, then the menu will be transformed, if the user uses the handheld device.', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'responsive_styles', 'type' => 'checkbox', 'values' => array(__('Activate', MMPM_TEXTDOMAIN_ADMIN) => 'true'), 'default' => array('true')), array('name' => __('Use Coercive Styles', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('If this option is checked - all CSS properties for this plugin will be have "!important" priority.', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'coercive_styles', 'type' => 'checkbox', 'values' => array(__('Activate', MMPM_TEXTDOMAIN_ADMIN) => 'true')), array('name' => __('"Indefinite location" mode', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('<span style="color: #f11;">Warning:</span> If this option is checked - all menus will be replaced by the mega menu. This will be useful only for templates in which are not defined locations of the menu and template has only one menu.', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'indefinite_location_mode', 'type' => 'checkbox', 'values' => array(__('Activate', MMPM_TEXTDOMAIN_ADMIN) => 'true')), array('name' => __('Number of widget areas', MMPM_TEXTDOMAIN_ADMIN), 'descr' => __('Set here how many independent widget areas you need.', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'number_of_widgets', 'type' => 'number', 'min' => 1, 'max' => 100, 'units' => 'areas', 'values' => '1', 'default' => '1'))), array('title' => 'Settings of the structure', 'key' => 'structure_settings', 'icon' => 'im-icon-checkbox', 'options' => array(array('name' => __('Here you can deactivate the options that you  do not use to customize the menu structure. This helps reduce the number of options and reduce the load on the server.', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'menu_structure_settings', 'type' => 'caption'), array('name' => __('Style of the item', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'item_style', 'type' => 'checkbox', 'values' => array(__('Disable', MMPM_TEXTDOMAIN_ADMIN) => 'disable')), array('name' => __('Icon of the item', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'item_icon', 'type' => 'checkbox', 'values' => array(__('Disable', MMPM_TEXTDOMAIN_ADMIN) => 'disable')), array('name' => __('Hide Icon of the Item', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'disable_icon', 'type' => 'checkbox', 'values' => array(__('Disable', MMPM_TEXTDOMAIN_ADMIN) => 'disable')), array('name' => __('Hide Text of the Item', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'disable_text', 'type' => 'checkbox', 'values' => array(__('Disable', MMPM_TEXTDOMAIN_ADMIN) => 'disable')), array('name' => __('Disable Link', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'disable_link', 'type' => 'checkbox', 'values' => array(__('Disable', MMPM_TEXTDOMAIN_ADMIN) => 'disable')), array('name' => __('Submenu Type', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'submenu_type', 'type' => 'checkbox', 'values' => array(__('Disable', MMPM_TEXTDOMAIN_ADMIN) => 'disable')), array('name' => __('Side of dropdown elements', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'submenu_drops_side', 'type' => 'checkbox', 'values' => array(__('Disable', MMPM_TEXTDOMAIN_ADMIN) => 'disable')), array('name' => __('Submenu Columns', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'submenu_columns', 'type' => 'checkbox', 'values' => array(__('Disable', MMPM_TEXTDOMAIN_ADMIN) => 'disable')), array('name' => __('Enable Full Width Dropdown', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'submenu_enable_full_width', 'type' => 'checkbox', 'values' => array(__('Disable', MMPM_TEXTDOMAIN_ADMIN) => 'disable')), array('name' => __('Dropdown Background Image', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'submenu_bg_image', 'type' => 'checkbox', 'values' => array(__('Disable', MMPM_TEXTDOMAIN_ADMIN) => 'disable')))), array('title' => 'Support & Suggestions', 'key' => 'support', 'icon' => 'im-icon-support', 'options' => array(array('name' => __('', MMPM_TEXTDOMAIN_ADMIN), 'key' => 'support', 'type' => 'just_html', 'default' => '<br /><br /> <a href="http://manual.menu.megamain.com/" target="_blank">Online documentation</a>. <br /><br /> If you need support, <br /> If you have a question or suggestion - <br /> Leave a message on our support page <br /> <a href="http://support.megamain.com/?ref=' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . '" target="_blank">Support.MegaMain.com</a> (in new window).'))));
    // END FRIMARY ARRAY
}
 public function subscribe_if_not_subscribed()
 {
     global $bc_accounts;
     $accounts = $bc_accounts->get_sanitized_all_accounts();
     $completed_accounts = array();
     foreach ($accounts as $account => $account_data) {
         // We may have multiple accounts for an account_id, prevent syncing that account more than once.
         if (!in_array($account_data['account_id'], $completed_accounts)) {
             $completed_accounts[] = $account_data['account_id'];
             $bc_accounts->set_current_account($account);
             $subscriptions = $this->cms_api->get_subscriptions();
             if (is_array($subscriptions)) {
                 foreach ($subscriptions as $subscription) {
                     if ($bc_accounts->get_account_id() === $subscription['service_account'] && isset($subscription['id']) && false !== strpos($subscription['endpoint'], get_admin_url())) {
                         $this->cms_api->remove_subscription($subscription['id']);
                     }
                 }
             }
             $subscription_status = $this->cms_api->add_subscription();
             if (is_wp_error($subscription_status)) {
                 $bc_accounts->restore_default_account();
                 return false;
             }
             if (isset($subscription_status['id']) && $subscription_status['service_account'] === $bc_accounts->get_account_id()) {
                 $subscription_id = BC_Utility::sanitize_subscription_id($subscription_status['id']);
                 update_option($this->get_option_key_for($bc_accounts->get_account_id()), $subscription_id);
             }
             $bc_accounts->restore_default_account();
         }
     }
 }
 function nebula_admin_bar_nebula_wireframing($wp_admin_bar)
 {
     $wp_admin_bar->add_node(array('id' => 'nebula-wireframing', 'title' => '<i class="fa fa-fw fa-sitemap" style="font-family: \'FontAwesome\'; color: #a0a5aa; color: rgba(240,245,250,.6); margin-right: 5px;"></i> Wireframing Enabled', 'href' => get_admin_url() . 'themes.php?page=nebula_options'));
     $wp_admin_bar->add_node(array('parent' => 'nebula-wireframing', 'id' => 'nebula-wireframing-help', 'title' => '<i class="nebula-admin-fa fa fa-fw fa-question" style="font-family: \'FontAwesome\'; color: #a0a5aa; color: rgba(240, 245, 250, .6); margin-right: 5px;"></i> Help & Documentation &raquo;', 'href' => 'https://gearside.com/nebula/documentation/custom-functionality/wireframing/', 'meta' => array('target' => '_blank')));
     $wp_admin_bar->remove_menu('wpseo-menu');
     //SEO menu not important during wireframing
 }
Example #5
0
/** Help Tab Content*/
function eventon_admin_help_tab_content()
{
    $screen = get_current_screen();
    ob_start();
    ?>
<p><b>EventON WP Event Calendar General Information.</b></p>
<p><a class='evo_admin_btn btn_prime' href='<?php 
    echo get_admin_url();
    ?>
index.php?page=evo-getting-started'>Getting started guide to eventON</a></p>
<p>All the updated documentation for eventON can be found from our <a class='evo_admin_btn btn_triad'href='http://www.myeventon.com/documentation/'>online documentation library.</a></p>
<?php 
    $content = ob_get_clean();
    ob_start();
    ?>
<p><b>Support for EventON Calendar</b></p>
<p>We provide support for issues directly related to eventON calendar via our <a href='http://helpdesk.ashanjay.com' target='_blank' class='evo_admin_btn btn_triad'>HelpDesk</a> EventON valid purchase code is required to access helpdesk if eventON came bundled with your theme.</p>
<p>Before creating a ticket, please check the troubleshooter guide that can very well help you solve your issue by trying our common solutions.</p>
<p>Please check out our <a href='http://www.myeventon.com/documentation/check-eventon-working/' class='evo_admin_btn btn_triad' target='_blank' >troubleshooter guide to eventon</a></p>
<?php 
    $support = ob_get_clean();
    $screen->add_help_tab(array('id' => 'eventon_overview_tab', 'title' => __('General', 'eventon'), 'content' => $content));
    $screen->add_help_tab(array('id' => 'eventon_overview_tab_s', 'title' => __('Support', 'eventon'), 'content' => $support));
    $screen->set_help_sidebar('<p><strong>' . __('For more information:', 'eventon') . '</strong></p>' . '<p><a href="http://www.myeventon.com/" target="_blank">' . __('EventON', 'eventon') . '</a></p>' . '<p><a href="http://www.myeventon.com/changelog/" target="_blank">' . __('Changelog', 'eventon') . '</a></p>' . '<p><a href="http://www.myeventon.com/documentation/" target="_blank">' . __('Documentation', 'eventon') . '</a></p>' . '<p><a href="http://www.myeventon.com/addons/" target="_blank">' . __('Addons', 'eventon') . '</a></p>' . '<p><a href="http://helpdesk.ashanjay.com" target="_blank">' . __('Helpdesk', 'eventon') . '</a></p>');
}
Example #6
0
 function rt_of_options_array()
 {
     $of_options = array();
     /*-----------------------------------------------------------------------------------*/
     /* The Options Array */
     /*-----------------------------------------------------------------------------------*/
     // Theme Setup
     $of_options[] = array("name" => __("Theme Setup", RT_LANGUAGE), "id" => "theme_setup", "type" => "heading");
     $of_options[] = array("name" => __("Register page link", RT_LANGUAGE), "id" => "theme_setup_register_page_link", "std" => "", "type" => "text");
     $of_options[] = array("name" => __("Enable admin theme", RT_LANGUAGE), "id" => "theme_setup_admin_theme", "std" => "default", "type" => "select", "options" => array("default" => __("Default", RT_LANGUAGE), "admin-theme-1" => __("Admin Theme 1", RT_LANGUAGE)));
     $of_options[] = array("name" => __("Support Developer Level 1", RT_LANGUAGE), "id" => "theme_setup_developer_level_1", "std" => 1, "on" => "Enable", "off" => "Disable", "type" => "switch");
     $of_options[] = array("name" => __("Enable Customer Support", RT_LANGUAGE), "desc" => __('Disable this feature If you are a developer', RT_LANGUAGE), "id" => "theme_setup_customer_support", "std" => 1, "on" => "Enable", "off" => "Disable", "type" => "switch");
     $of_options[] = array("name" => __("Enable Top Header", RT_LANGUAGE), "id" => "theme_setup_top_header", "std" => 0, "on" => "Enable", "off" => "Disable", "type" => "switch");
     $of_options[] = array("name" => __("Enable Banner side out", RT_LANGUAGE), "desc" => __('Enable to use banner side out. Click <a target="_blank" href="' . get_admin_url() . '/options-general.php?page=float_left_right_ads.php">Here</a> to setup banner', RT_LANGUAGE), "id" => "theme_setup_banner_side_out_enable", "std" => 0, "on" => "Enable", "off" => "Disable", "type" => "switch");
     $of_options[] = array("name" => __("Enable Statistic", RT_LANGUAGE), "desc" => __('Enabled Statistics to measure website traffic', RT_LANGUAGE), "id" => "theme_setup_statistics", "std" => 0, "on" => "Enable", "off" => "Disable", "type" => "switch");
     // Single Woocommerce
     $of_options[] = array("name" => __("Custom Woocommerce", RT_LANGUAGE), "id" => "custom_woocommerce", "type" => "heading");
     $of_options[] = array("name" => __("Enable Compare Products", RT_LANGUAGE), "desc" => __('Enable/Disable Compare products. Click <a target="_blank" href="' . get_admin_url() . '/admin.php?page=yith_woocompare_panel">Here</a> to setup feature.', RT_LANGUAGE), "id" => "woocommerce_compare_products", "std" => 0, "on" => "Enable", "off" => "Disable", "type" => "switch");
     $of_options[] = array("name" => __("Enable Wishlist Products", RT_LANGUAGE), "desc" => __('Enable/Disable Wishlist products.', RT_LANGUAGE), "id" => "woocommerce_wishlist_products", "std" => 0, "on" => "Enable", "off" => "Disable", "type" => "switch");
     $of_options[] = array("name" => __("Shop Page", RT_LANGUAGE), "desc" => "", "id" => "shop_page_code", "std" => "<h3 style='margin: 0;'>" . __("Shop Page", RT_LANGUAGE) . "</h3>", "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("Shop Page Filter Display?", RT_LANGUAGE), "desc" => __("Enable/Disable filter on shop page", RT_LANGUAGE), "id" => "woocommerce_shop_filter_display", "std" => 0, "on" => "Enable", "off" => "Disable", "type" => "switch");
     $of_options[] = array("name" => __("Shop Page Thumbnail Hover Effect", RT_LANGUAGE), "desc" => __("Choose Thumbnail Hover Effect in Shop Page", RT_LANGUAGE), "id" => "woocommerce_shop_thumb_hover_effect", "std" => "default", "type" => "select", "options" => array("default" => __("Default", RT_LANGUAGE), "hover-zoom" => __("Zoom Thumbnail", RT_LANGUAGE)));
     $of_options[] = array("name" => __("Shop Page Thumbnail Click Effect", RT_LANGUAGE), "desc" => __("Choose Thumbnail Click Effect in Shop Page", RT_LANGUAGE), "id" => "woocommerce_shop_thumb_click_effect", "std" => "default", "type" => "select", "options" => array("default" => __("Default", RT_LANGUAGE), "popup-image" => __("Popup Image", RT_LANGUAGE), "popup-image-zoom" => __("Popup Image and Zoom", RT_LANGUAGE), "popup-gallery" => __("Popup Gallery", RT_LANGUAGE), "popup-gallery-zoom" => __("Popup Gallery and Zoom", RT_LANGUAGE)));
     $of_options[] = array("name" => __("Single Product", RT_LANGUAGE), "desc" => "", "id" => "single_product_code", "std" => "<h3 style='margin: 0;'>" . __("Single Product", RT_LANGUAGE) . "</h3>", "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("Enable Zoom Thumbnail", RT_LANGUAGE), "desc" => __('Enable to use zoom thumbnail effect. Click <a target="_blank" href="' . get_admin_url() . '/admin.php?page=yith_woocommerce_zoom-magnifier_panel">Here</a> to setup effect.', RT_LANGUAGE), "id" => "woocommerce_product_zoom_thumb", "std" => 0, "on" => "Enable", "off" => "Disable", "type" => "switch");
     $of_options[] = array("name" => __("Single Product thumbnail gallery design", RT_LANGUAGE), "desc" => __("Choose if the thumbnail gallery on the single product page are vertical or horizontal.", RT_LANGUAGE), "id" => "woocommerce_product_thumb_design", "std" => "horizontal", "type" => "select", "options" => array("horizontal" => __("Horizontal Design", RT_LANGUAGE), "vertical" => __("Vertical Design", RT_LANGUAGE)));
     // Custom Blog
     $of_options[] = array("name" => __("Custom Blog", RT_LANGUAGE), "id" => "heading_custom_blog", "type" => "heading");
     $of_options[] = array("name" => __("General Blog Options", "Avada"), "desc" => "", "id" => "custom_blog_single_post", "std" => "<h3 style='margin: 0;'>" . __("General Blog Options", "Avada") . "</h3>", "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("Blog Archive/Category Layout", RT_LANGUAGE), "desc" => __("Select the layout for the blog archive/category pages.", RT_LANGUAGE), "id" => "custom_blog_archive_layout", "std" => "Large", "type" => "select", "options" => array('' => 'None', 'medium-1' => 'Medium 1'));
     return $of_options;
 }
Example #7
0
function dt_metabox_benefits_options($post)
{
    $box_name = 'dt_benefits_options';
    $defaults = array('retina_image' => '', 'retina_image_w' => 0, 'retina_image_h' => 0, 'retina_image_id' => null);
    $opts = get_post_meta($post->ID, '_' . $box_name, true);
    $opts = wp_parse_args(maybe_unserialize($opts), $defaults);
    // Use nonce for verification
    wp_nonce_field(plugin_basename(__FILE__), $box_name . '_nonce');
    // image
    $img_id = '<input type="hidden" value="' . $opts['retina_image_id'] . '" class="dt-uploader-textfield dt-get-id" name="' . $box_name . '_retina_image_id" />';
    // upload button
    $upload = dt_melement('link', array('description' => _x('Upload Image', 'backend benefits', LANGUAGE_ZONE), 'class' => 'dt-uploader-opener button-primary thickbox', 'href' => get_admin_url() . 'media-upload.php?post_id=' . $post->ID . '&type=image&TB_iframe=1&width=640&height=310'));
    // delete button
    $delete = dt_melement('link', array('description' => _x('Clear', 'backend benefits', LANGUAGE_ZONE), 'class' => 'dt-uploader-delete button', 'href' => '#'));
    ?>

	<p class="dt_switcher-box"><?php 
    if ($opts['retina_image_id']) {
        $img = wp_get_attachment_image_src($opts['retina_image_id'], 'medium');
        if ($img) {
            $size = wp_constrain_dimensions($img[1], $img[2], 266, 266);
            echo '<img class="attachment-266x266 dt-thumb" src="' . $img[0] . '" ' . image_hwstring($size[0], $size[1]) . ' />';
        }
    }
    echo $img_id . $upload . $delete;
    ?>
</p>
	
	<?php 
}
Example #8
0
 /**
  * Print a reminder message for set the options after the theme is installed or updated
  */
 function setopt_admin_notice()
 {
     $screen = get_current_screen();
     if (current_user_can('manage_options') && $screen->id !== 'appearance_page_fastfood_options' && version_compare(FastfoodOptions::get_opt('version', '0'), fastfood_get_info('version'), '<')) {
         echo '<div class="update-nag"><strong>' . sprintf(__('%1$s theme says: Dont forget to set <a href="%2$s">my options</a>!', 'fastfood'), 'Fastfood', get_admin_url() . 'themes.php?page=' . $this->option_name) . '</strong></div>';
     }
 }
Example #9
0
 protected function _validate_form()
 {
     if (isset($_POST['vimeography_basic_settings']) && check_admin_referer('vimeography-gallery-action', 'vimeography-gallery-verification')) {
         try {
             $input = $_POST['vimeography_basic_settings'];
             if (empty($input['gallery_title']) or empty($input['source_url'])) {
                 throw new Exception(__('Make sure you fill out all of the fields below!'));
             }
             global $wpdb;
             $settings['gallery_title'] = $wpdb->escape(wp_filter_nohtml_kses($input['gallery_title']));
             $settings['source_url'] = $wpdb->escape(wp_filter_nohtml_kses($input['source_url']));
             $result = $wpdb->insert(VIMEOGRAPHY_GALLERY_TABLE, array('title' => $settings['gallery_title'], 'date_created' => current_time('mysql'), 'is_active' => 1));
             if (!$result) {
                 throw new Exception(__('We couldn\'t create a new gallery. Try upgrading or reinstalling the Vimeography plugin.'));
             } else {
                 $gallery_id = $wpdb->insert_id;
                 $result = $wpdb->insert(VIMEOGRAPHY_GALLERY_META_TABLE, array('gallery_id' => $gallery_id, 'source_url' => $settings['source_url'], 'video_limit' => 20, 'featured_video' => NULL, 'gallery_width' => NULL, 'cache_timeout' => 3600, 'theme_name' => 'bugsauce'));
                 if (!$result) {
                     throw new Exception(__('We couldn\'t save your gallery settings. Try reinstalling the Vimeography plugin.'));
                 }
             }
             wp_redirect(get_admin_url() . 'admin.php?page=vimeography-edit-galleries&id=' . $gallery_id . '&created=1');
             exit;
         } catch (Exception $e) {
             require_once ABSPATH . 'wp-admin/admin-header.php';
             $this->messages[] = array('type' => 'error', 'heading' => 'Ruh roh.', 'message' => $e->getMessage());
         }
     }
 }
 function add_switcher()
 {
     // Tester si le multisite est activiรฉ
     if (!function_exists('is_multisite') || !is_multisite()) {
         return false;
     }
     // Blogs de l'utilisateur actuel
     global $current_user;
     $blogs = get_blogs_of_user($current_user->id, true);
     // Il faut plus d'un blog pour avoir le menu dรฉroulant
     if (count($blogs) <= 1) {
         return false;
     }
     $current_blogurl = get_bloginfo('url');
     echo '<form style="float:left;min-width:150px;margin:10px 0 0 40px;" action="" method="post">';
     wp_nonce_field('multisite-switcher');
     echo 'Switch Backend: ';
     echo '<select onchange="location.href=this.value;" id="multisiteswitcher" name="multisiteswitcher">';
     foreach ($blogs as $blog) {
         echo '<option ' . selected($blog->siteurl, $current_blogurl, false) . ' value="' . esc_url(get_admin_url($blog->userblog_id)) . '">' . $blog->blogname . '</option>';
     }
     echo '</select>';
     echo '<noscript> <input class="button-secondary action" type="submit" value="Go"/></noscript>';
     echo '</form>';
 }
Example #11
0
function update_notifier_bar_menu()
{
    if (function_exists('simplexml_load_string')) {
        // Stop if simplexml_load_string funtion isn't available
        global $wp_admin_bar, $wpdb;
        if (!is_super_admin() || !is_admin_bar_showing()) {
            // Don't display notification in admin bar if it's disabled or the current user isn't an administrator
            return;
        }
        $xml = get_latest_theme_version(NOTIFIER_CACHE_INTERVAL);
        // Get the latest remote XML file on our server
        // get version
        if (function_exists('wp_get_theme')) {
            $theme_data = wp_get_theme(get_template());
            $version = $theme_data->version;
        } else {
            $theme_data = get_theme_data(get_template_directory() . '/style.css');
            $version = $theme_data['Version'];
        }
        if (!is_object($xml)) {
            return;
        }
        if (version_compare($xml->latest, $version, '>')) {
            // Compare current theme version with the remote XML version
            $wp_admin_bar->add_menu(array('id' => 'update_notifier', 'title' => '<span>' . NOTIFIER_THEME_NAME . ' <span id="ab-updates">1 Update</span></span>', 'href' => get_admin_url() . 'index.php?page=theme-update-notifier'));
        }
    }
}
 /**
  * Runs activation function and sets up default WP options for new blog,
  * a.k.a. when a registered user creates a new blog
  *
  * @param int $blog_id
  * @param int $user_id
  *
  * @see add_action( 'wpmu_new_blog', ... )
  */
 function wpmuNewBlog($blog_id, $user_id)
 {
     $this->blog_id = (int) $blog_id;
     $this->user_id = (int) $user_id;
     switch_to_blog($this->blog_id);
     if (!$this->isBookSetup()) {
         $this->wpmuActivate();
         array_walk($this->opts, function ($v, $k) {
             if (empty($v)) {
                 delete_option($k);
             } else {
                 update_option($k, $v);
             }
         });
         wp_cache_flush();
     }
     // Set current metadata version to skip redundant upgrade routines
     update_option('pressbooks_metadata_version', \Pressbooks\Metadata::$currentVersion);
     flush_rewrite_rules(false);
     do_action('pressbooks_new_blog');
     restore_current_blog();
     if (is_user_logged_in()) {
         (new \Pressbooks\Catalog())->deleteCache();
         \Pressbooks\Redirect\location(get_admin_url($this->blog_id));
     }
 }
Example #13
0
function ubermenu_update_notifier_bar_menu()
{
    global $uberMenu;
    if (!$uberMenu->getSettings()->op('update-alerts')) {
        return;
    }
    if (!function_exists('simplexml_load_string')) {
        return;
    }
    global $wp_admin_bar, $wpdb;
    if (!is_super_admin() || !is_admin_bar_showing()) {
        return;
    }
    $xml = ubermenu_get_latest_plugin_version(UBERMENU_UPDATE_DELAY);
    //21600); // This tells the function to cache the remote call for 21600 seconds (6 hours)
    $plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/ubermenu/ubermenu.php');
    // Get plugin data (current version is what we want)
    if (!$xml) {
        //we can't retrieve the XML file and parse it properly
        return;
    }
    if (version_compare($plugin_data['Version'], $xml->latest) == -1) {
        $wp_admin_bar->add_menu(array('id' => 'ubermenu_update_notifier', 'title' => '<span> ' . __('UberMenu', 'ubermenu') . ' <span id="ab-updates">' . __('New Updates', 'ubermenu') . '</span></span>', 'href' => get_admin_url() . 'themes.php?page=uber-menu&updates=1'));
    }
}
Example #14
0
 /**
  * create_tools_page.
  *
  * @version 2.3.10
  */
 function create_tools_page()
 {
     // Tabs
     $tabs = apply_filters('wcj_tools_tabs', array(array('id' => 'dashboard', 'title' => __('Tools Dashboard', 'woocommerce-jetpack'))));
     $html = '<h2 class="nav-tab-wrapper woo-nav-tab-wrapper">';
     $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'dashboard';
     foreach ($tabs as $tab) {
         $is_active = $active_tab === $tab['id'] ? 'nav-tab-active' : '';
         $html .= '<a href="' . add_query_arg(array('page' => 'wcj-tools', 'tab' => $tab['id']), get_admin_url() . 'admin.php') . '" class="nav-tab ' . $is_active . '">' . $tab['title'] . '</a>';
     }
     $html .= '</h2>';
     echo $html;
     // Content
     if ('dashboard' === $active_tab) {
         $title = __('Booster for WooCommerce Tools - Dashboard', 'woocommerce-jetpack');
         $desc = __('This dashboard lets you check statuses and short descriptions of all available Booster for WooCommerce tools. Tools can be enabled through WooCommerce > Settings > Booster. Enabled tools will appear in the tabs menu above.', 'woocommerce-jetpack');
         echo '<h3>' . $title . '</h3>';
         echo '<p>' . $desc . '</p>';
         echo '<table class="widefat" style="width:90%;">';
         echo '<tr>';
         echo '<th style="width:20%;">' . __('Tool', 'woocommerce-jetpack') . '</th>';
         echo '<th style="width:20%;">' . __('Module', 'woocommerce-jetpack') . '</th>';
         echo '<th style="width:50%;">' . __('Description', 'woocommerce-jetpack') . '</th>';
         echo '<th style="width:10%;">' . __('Status', 'woocommerce-jetpack') . '</th>';
         echo '</tr>';
         do_action('wcj_tools_' . 'dashboard');
         echo '</table>';
     } else {
         do_action('wcj_tools_' . $active_tab);
     }
 }
Example #15
0
 /**
  * Registering a post type
  *
  * @param string $type slug of the type
  * @param string $singular singular name
  * @param string $plural plural name
  * @param array $config can override the defaults of this function (array_merge)
  */
 public static function registerPostType($type, $singular, $plural, $config = array())
 {
     $labels = array('name' => $plural, 'singular_name' => $singular, 'add_new' => 'Erstellen', 'add_new_item' => $singular . ' erfassen', 'edit_item' => 'Bearbeite ' . $singular, 'new_item' => 'Neues ' . $singular, 'view_item' => $singular . ' ansehen', 'search_items' => $singular . ' suchen', 'not_found' => 'Keine ' . $plural . ' gefunden', 'not_found_in_trash' => 'Keine ' . $plural . ' im Papierkorb gefunden', 'parent_item_colon' => '');
     $defaults = array('labels' => $labels, 'public' => true, 'has_archive' => true, 'plural_view_adminbar' => false);
     $arguments = array_merge_recursive_distinct($defaults, $config);
     if (isset($arguments['plural_view_adminbar']) && $arguments['plural_view_adminbar']) {
         add_action('admin_bar_menu', function ($wp_admin_bar) use($type, $arguments) {
             $object = get_queried_object();
             if ($object->name == $type) {
                 $title = $object->labels->menu_name;
                 if (is_admin()) {
                     $url = get_post_type_archive_link($type);
                 } else {
                     $url = get_admin_url(null, 'edit.php?post_type=' . $type);
                 }
             }
             if ($object->post_type == $type) {
                 if (!is_admin()) {
                     $url = get_edit_post_link($object->ID);
                     $title = $arguments['labels']['edit_item'];
                 }
             }
             // Add admin bar entry
             if ($url) {
                 $wp_admin_bar->add_node(array('id' => 'custom-button', 'title' => $title, 'href' => $url));
             }
         }, 95);
     }
     register_post_type($type, $arguments);
 }
Example #16
0
/**
 * Show a link to the WP Email Debug settings page in the toolbar indicating
 * the debugging functionality is enabled.
 *
 * @since 1.0.0
 * @return void
 */
function WPMDBUG_toolbar_link($wp_admin_bar)
{
    if (WPMailDebugger::doEnforce()) {
        $args = array('id' => 'WPMDBUG-toolbar', 'title' => 'Email Debug ON', 'href' => get_admin_url(NULL, 'options-general.php?page=wpmdbug'));
        $wp_admin_bar->add_node($args);
    }
}
/**
 * Create the admin notices
 *
 * @access public
 * @return void
 */
function triberr_admin_setup_notices()
{
    $PINGKEY = get_option('triberr_apikey');
    if ($PINGKEY == "") {
        echo "<div class=\"error\"><p>Triberr plugin needs to be configured. Go to <a href=\"" . get_admin_url() . "options-general.php?page=triberr-options\">plugin settings</a>.</p></div>";
    }
}
function formbuilder_post_options()
{
    global $post, $wpdb;
    // Load the available forms
    $sql = "SELECT * FROM " . FORMBUILDER_TABLE_FORMS . " ORDER BY `name` ASC";
    $forms = $wpdb->get_results($sql, ARRAY_A);
    // If the post already has an id, determine whether or not there is a form already linked to it.
    if ($post->ID) {
        // Determine if the post/page has a linked form.
        $sql = "SELECT * FROM " . FORMBUILDER_TABLE_PAGES . " WHERE `post_id` = '" . $post->ID . "';";
        $results = $wpdb->get_results($sql, ARRAY_A);
        if ($results) {
            $pageDetails = $results[0];
        }
    }
    echo "<div id='formBuilderContactFormOptions'>\n" . "<p>" . __("If you wish to display a contact form that you have created using the FormBuilder plugin, please select it from the following options.", 'formbuilder') . "</p>\n" . "<select name='formbuilderFormSelection'>\n" . "<option value='noform'>" . __("Select Contact Form...", 'formbuilder') . "</option>\n";
    foreach ($forms as $formDetails) {
        $form_id = $formDetails['id'];
        if ($form_id == $pageDetails['form_id']) {
            $selected = "selected";
            $form_data = $formDetails;
        } else {
            $selected = "";
        }
        echo "<option value='{$form_id}' {$selected}>" . $formDetails['name'] . "</option>\n";
    }
    echo "</select>";
    if (isset($pageDetails) and $pageDetails['form_id'] > 0) {
        $url = get_admin_url(null, '/tools.php?page=formbuilder.php&fbaction=editForm&fbid=' . $form_data['id']);
        echo "<br/><br/><strong>Edit This Form: <a href='{$url}'>" . $form_data['name'] . "</a></strong>";
    }
    echo "</div>\n";
}
 protected function update_js()
 {
     $path = tribe_events_pro_resource_url('events-additional-fields-update.js');
     $spinner = '<img src="' . esc_url(get_admin_url(null, 'images/spinner.gif')) . '">';
     wp_enqueue_script('tribe-events-pro-additional-fields-update', $path, array('jquery'), false, true);
     wp_localize_script('tribe-events-pro-additional-fields-update', 'tribe_additional_fields', array('update_check' => wp_create_nonce('custom_meta_tools:updater'), 'complete_msg' => '<strong>' . _x('All fields have been updated!', 'additional field update', 'tribe-events-calendar-pro') . '</strong>', 'failure_msg' => '<strong>' . _x('An unexpected error stopped the update from completing.', 'additional field update', 'tribe-events-calendar-pro') . '</strong>', 'in_progress_msg' => '<strong>' . _x('Working&hellip;', 'additional field update', 'tribe-events-calendar-pro') . "</strong> {$spinner}"));
 }
Example #20
0
 /**
  * Define our menu fallback
  *
  * @return string
  */
 public static function menu_fallback()
 {
     $html = '<div class="alert-box secondary">';
     $html .= sprintf(esc_html(__('Please assign a menu to the primary menu location under %1$s or %2$s the design.'), 'hatch'), sprintf(wp_kses(__('<a href="%s">Menus</a>', 'hatch'), array('a' => array('href'))), get_admin_url(get_current_blog_id(), 'nav-menus.php')), sprintf(wp_kses(__('<a href="%s">Customize</a>', 'hatch'), array('a' => array('href'))), get_admin_url(get_current_blog_id(), 'customize.php')));
     $html .= '</div>';
     return $html;
 }
 /**
  * Adds setting link for HubSpot to plugins management page
  *
  * @param   array $links
  * @return  array
  */
 function hubspot_plugin_settings_link($links)
 {
     $url = get_admin_url() . 'options-general.php?page=hubspot-tracking-code-admin.php';
     $settings_link = '<a href="' . $url . '">Settings</a>';
     array_unshift($links, $settings_link);
     return $links;
 }
 function mega_main_menu__array_theme_options($constants)
 {
     foreach (get_registered_nav_menus() as $key => $value) {
         $key = str_replace(' ', '-', $key);
         $theme_menu_locations[$key] = $key;
     }
     foreach (get_nav_menu_locations() as $key => $value) {
         $key = str_replace(' ', '-', $key);
         $theme_menu_locations[$key] = $key;
     }
     $locations_options = array(array('name' => __('Below are all the locations, which are supported this theme. Toggle for change their settings.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'primary_settings', 'type' => 'caption'));
     if (isset($theme_menu_locations) && is_array($theme_menu_locations)) {
         $locations_options[] = array('name' => __('Activate Mega Main Menu in such locations:', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Mega Main Menu and its settings will be displayed in selected locations only after the activation of this location.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'mega_menu_locations', 'type' => 'checkbox', 'values' => $theme_menu_locations, 'default' => array('mega_main_sidebar_menu'));
     } else {
         $locations_options[] = array('name' => __('Firstly, You need to create at least one menu', $constants['MM_TEXTDOMAIN_ADMIN']) . ' (<a href="' . home_url() . '/wp-admin/nav-menus.php">' . __('Theme Menu Settings', $constants['MM_TEXTDOMAIN_ADMIN']) . '</a>) ' . __('and set theme-location for him', $constants['MM_TEXTDOMAIN_ADMIN']) . ' (<a href="' . home_url() . '/wp-admin/nav-menus.php?action=locations">' . __('Theme Menu Locations', $constants['MM_TEXTDOMAIN_ADMIN']) . '</a>).', 'key' => 'no_locations', 'type' => 'caption');
     }
     foreach ($theme_menu_locations as $key => $value) {
         $original_menu_slug = $key;
         $key = str_replace(' ', '-', $key);
         $locations_options = array_merge($locations_options, array(array('name' => __('Layout Options: ', $constants['MM_TEXTDOMAIN_ADMIN']) . '&nbsp; <strong>' . $key . '</strong>', 'key' => $key . '_menu_options', 'type' => 'collapse_start'), array('name' => __('Add to Mega Main Menu:', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('You can add to the primary menu container: logo and search.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_included_components', 'type' => 'checkbox', 'values' => array(__('Company Logo (on left side)', $constants['MM_TEXTDOMAIN_ADMIN']) => 'company_logo', __('Search Box (on right side)', $constants['MM_TEXTDOMAIN_ADMIN']) => 'search_box', __('BuddyPress Bar (on right side)', $constants['MM_TEXTDOMAIN_ADMIN']) => 'buddypress', __('WooCart (on right side)', $constants['MM_TEXTDOMAIN_ADMIN']) => 'woo_cart', __('WPML switcher (on right side)', $constants['MM_TEXTDOMAIN_ADMIN']) => 'wpml_switcher'), 'default' => array('company_logo', 'search_box')), array('name' => __('Height of the first level items', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Set the height for the initial menu container and items of the first level.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_first_level_item_height', 'type' => 'number', 'min' => 20, 'max' => 300, 'units' => 'px', 'values' => '50', 'default' => '50'), array('name' => __('Primary Style', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Select the button style that fits the style of your site.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_primary_style', 'type' => 'radio', 'col_width' => 4, 'values' => array(__('Flat', $constants['MM_TEXTDOMAIN_ADMIN']) => 'flat', __('Buttons <small>(+1 option)</small>', $constants['MM_TEXTDOMAIN_ADMIN']) => 'buttons'), 'default' => array('flat')), array('name' => __('Buttons Height', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Only for "Buttons" style. Specify here height of the first level buttons.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_first_level_button_height', 'type' => 'number', 'min' => 20, 'max' => 300, 'units' => 'px', 'values' => '30', 'default' => '30', 'dependency' => array('element' => 'mega_main_menu_options[' . $key . '_primary_style]', 'value' => array('buttons'))), array('name' => __('Alignment of the first level items', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Choose how to locate menu elements of the first level.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_first_level_item_align', 'type' => 'radio', 'col_width' => 4, 'values' => array(__('Left', $constants['MM_TEXTDOMAIN_ADMIN']) => 'left', __('Center', $constants['MM_TEXTDOMAIN_ADMIN']) => 'center', __('Right', $constants['MM_TEXTDOMAIN_ADMIN']) => 'right', __('Justify (No Logo!)', $constants['MM_TEXTDOMAIN_ADMIN']) => 'justify'), 'default' => array('left')), array('name' => __('Location of icon in first level elements', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Choose where to locate icon for first level items.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_first_level_icons_position', 'type' => 'radio', 'col_width' => 4, 'values' => array(__('Left', $constants['MM_TEXTDOMAIN_ADMIN']) => 'left', __('Above', $constants['MM_TEXTDOMAIN_ADMIN']) => 'top', __('Right', $constants['MM_TEXTDOMAIN_ADMIN']) => 'right', __('Disable Icons In First Level Items', $constants['MM_TEXTDOMAIN_ADMIN']) => 'disable_first_lvl', __('Disable Icons Globally', $constants['MM_TEXTDOMAIN_ADMIN']) => 'disable_globally'), 'default' => array('left')), array('name' => __('Separator', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Select type of separator between the first level items of this menu.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_first_level_separator', 'type' => 'radio', 'col_width' => 4, 'values' => array(__('None', $constants['MM_TEXTDOMAIN_ADMIN']) => 'none', __('Smooth', $constants['MM_TEXTDOMAIN_ADMIN']) => 'smooth', __('Sharp', $constants['MM_TEXTDOMAIN_ADMIN']) => 'sharp'), 'default' => array('smooth')), array('name' => __('Rounded corners', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Select the value of corners radius.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_corners_rounding', 'type' => 'number', 'min' => 0, 'max' => 100, 'units' => 'px', 'default' => 0), array('name' => __('Trigger', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Show dropdowns by "hover" or "click"?', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_dropdowns_trigger', 'type' => 'radio', 'col_width' => 4, 'values' => array(__('Hover', $constants['MM_TEXTDOMAIN_ADMIN']) => 'hover', __('Click', $constants['MM_TEXTDOMAIN_ADMIN']) => 'click'), 'default' => array('hover')), array('name' => __('Dropdowns Animation', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Select the type of animation to displaying dropdowns. <span style="color: #f11;">Warning:</span> Animation correctly works only in the latest versions of progressive browsers.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_dropdowns_animation', 'type' => 'select', 'values' => array(__('None', $constants['MM_TEXTDOMAIN_ADMIN']) => 'none', __('Unfold', $constants['MM_TEXTDOMAIN_ADMIN']) => 'anim_1', __('Fading', $constants['MM_TEXTDOMAIN_ADMIN']) => 'anim_2', __('Scale', $constants['MM_TEXTDOMAIN_ADMIN']) => 'anim_3', __('Down to Up', $constants['MM_TEXTDOMAIN_ADMIN']) => 'anim_4', __('Dropdown', $constants['MM_TEXTDOMAIN_ADMIN']) => 'anim_5'), 'default' => array('none')), array('name' => __('Minimized on Handheld Devices', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('If this option is activated you get the folded menu on handheld devices.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_mobile_minimized', 'type' => 'checkbox', 'values' => array(__('Enable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'true'), 'default' => array('true')), array('name' => __('Label for Mobile Menu', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Here you can specify label that will be displayed on the mobile version of the menu.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_mobile_label', 'type' => 'text', 'values' => '', 'default' => 'Menu', 'dependency' => array('element' => 'mega_main_menu_options[' . $key . '_mobile_minimized]', 'value' => array('true'))), array('name' => __('Direction', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Here you can determine the direction of the menu. Horizontal for classic top menu bar. Vertical for sidebar menu.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_direction', 'type' => 'radio', 'col_width' => 4, 'values' => array(__('Horizontal <small>(+5 option)</small>', $constants['MM_TEXTDOMAIN_ADMIN']) => 'horizontal', __('Vertical', $constants['MM_TEXTDOMAIN_ADMIN']) => 'vertical'), 'default' => array('horizontal')), array('name' => __('Full Width Initial Container', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('If this option is enabled then the primary container will try to be the full width.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_fullwidth_container', 'type' => 'checkbox', 'values' => array(__('Enable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'true'), 'dependency' => array('element' => 'mega_main_menu_options[' . $key . '_direction]', 'value' => array('horizontal'))), array('name' => __('Height of the first level items when menu is Sticky (or Mobile)', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Set the height for the initial menu container and items of the first level.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_first_level_item_height_sticky', 'type' => 'number', 'min' => 20, 'max' => 300, 'units' => 'px', 'values' => '40', 'default' => '40', 'dependency' => array('element' => 'mega_main_menu_options[' . $key . '_direction]', 'value' => array('horizontal'))), array('name' => __('Sticky', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Check this option to make the menu sticky. Incompatible with the "Vertical" menu. Sticky do not working on mobile devices. If the menu will be is sticky on mobile devices when you open it - you can not click on the last item, because it will always be outside the screen.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_sticky_status', 'type' => 'checkbox', 'values' => array(__('Enable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'true'), 'dependency' => array('element' => 'mega_main_menu_options[' . $key . '_direction]', 'value' => array('horizontal'))), array('name' => __('Sticky scroll offset', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Set the length of the scroll for each user to pass before the menu will stick to the top of the window.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_sticky_offset', 'type' => 'number', 'min' => 0, 'max' => 2000, 'units' => 'px', 'default' => 340, 'dependency' => array('element' => 'mega_main_menu_options[' . $key . '_direction]', 'value' => array('horizontal'))), array('name' => __('Push Content Down', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Dropdown areas pushes the main website content down instead to dropping down over content. This option will be useful only for "Multi column" and "Full width" dropdowns.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_pushing_content', 'type' => 'checkbox', 'values' => array(__('Enable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'true'), 'dependency' => array('element' => 'mega_main_menu_options[' . $key . '_direction]', 'value' => array('horizontal'))), array('name' => __('Shortcode', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('You can copy this code and use in the content of the page in order to display this menu. Do not forget to activate mega menu for this location, using option at the beginning of this page.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'shortcode_integration', 'type' => 'just_html', 'default' => '<pre>[mega_main_menu location="' . $key . '"][/mega_main_menu]</pre>'), array('name' => __('Forced PHP Integration', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('If you have knowledge of PHP you can call this function anywhere in order to display this menu. Please use it only if you professional.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'forced_integration', 'type' => 'just_html', 'default' => '<pre>&lt;?php echo wp_nav_menu( array( "theme_location" => "' . $key . '" ) ); ?&gt;</pre>'), array('name' => '', 'type' => 'collapse_end')));
     }
     $locations_options = array_merge($locations_options, array(array('name' => __('Logo Settings', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'mega_menu_logo', 'type' => 'caption'), array('name' => __('The logo file', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __("Select image to be used as logo in Main Mega Menu. It's recommended to use image with transparent background (.PNG) and sizes from 200 to 800 px.", $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'logo_src', 'type' => 'file', 'default' => $constants['MM_WARE_URL'] . 'framework/src/img/megamain-logo-120x120.png'), array('name' => __('Maximum logo height', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Maximum logo height in terms of percentage in regard to the height of the initial container.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'logo_height', 'min' => 10, 'max' => 100, 'units' => '%', 'type' => 'number', 'default' => 90), array('name' => __('Backup of the configuration', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('You can make a backup of the plugin configuration and restore this configuration later. Notice: Options of each menu item from the section "Menu Structure" is not imported.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'backup', 'type' => 'just_html', 'default' => '<a href="' . get_admin_url() . '?' . $constants['MM_WARE_PREFIX'] . '_page=backup_file">' . __('Download backup file with current settings') . '</a><br /><br />' . __('Upload backup file and restore settings. Chose file and click "Save All Settings".') . '<br /><input class="col-xs-12 form-control input-sm" type="file" name="' . $constants['MM_OPTIONS_NAME'] . '_backup" />')));
     $skins_options = array(array('name' => __('You can change any properties for any menu location', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'mega_menu_skins', 'type' => 'caption'));
     foreach ($theme_menu_locations as $key => $value) {
         $key = str_replace(' ', '-', $key);
         $skins_options = array_merge($skins_options, array(array('name' => __('Skin Options: ', $constants['MM_TEXTDOMAIN_ADMIN']) . '&nbsp; <strong>' . $key . '</strong>', 'key' => $key . '_menu_skin', 'type' => 'collapse_start'), array('name' => __('Skin Options of the Initial Container', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'dropdowns_skin_options', 'type' => 'caption'), array('name' => __('Background Gradient (Color) of the primary container ', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_bg_gradient', 'type' => 'gradient', 'default' => array('color1' => '#428bca', 'color2' => '#2a6496', 'start' => '0', 'end' => '100', 'orientation' => 'top')), array('name' => __('Background image of the primary container', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('You can choose and tune the background image for the primary container.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_bg_image', 'type' => 'background_image', 'default' => ''), array('name' => __('First Level Items', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'dropdowns_skin_options', 'type' => 'caption'), array('name' => __('Font of the First Level Item', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('You can change size and weight of the font for first level items.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_first_level_link_font', 'type' => 'font', 'values' => array('font_family', 'font_size', 'font_weight'), 'default' => array('font_family' => 'Inherit', 'font_size' => '13', 'font_weight' => '400')), array('name' => __('Text color of the first level item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_first_level_link_color', 'type' => 'color', 'default' => '#f8f8f8'), array('name' => __('Icons in the first level item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_first_level_icon_font', 'type' => 'number', 'col_width' => 3, 'min' => 0, 'max' => 200, 'units' => 'px', 'values' => '15', 'default' => '15'), array('name' => __('Background Gradient (Color) of the first level item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_first_level_link_bg', 'type' => 'gradient', 'default' => array('color1' => '#428bca', 'color2' => '#2a6496', 'start' => '0', 'end' => '100', 'orientation' => 'top')), array('name' => __('Text color of the active first level item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_first_level_link_color_hover', 'type' => 'color', 'default' => '#f8f8f8'), array('name' => __('Background Gradient (Color) of the active first level item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_first_level_link_bg_hover', 'type' => 'gradient', 'default' => array('color1' => '#3498db', 'color2' => '#2980b9', 'start' => '0', 'end' => '100', 'orientation' => 'top')), array('name' => __('Background color of the Search Box', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_search_bg', 'type' => 'color', 'default' => '#3498db'), array('name' => __('Text and icon color of the Search Box', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_search_color', 'type' => 'color', 'default' => '#f8f8f8'), array('name' => __('Dropdowns', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'dropdowns_skin_options', 'type' => 'caption'), array('name' => __('Background Gradient (Color) of the Dropdown Area', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_dropdown_wrapper_gradient', 'type' => 'gradient', 'default' => array('color1' => '#ffffff', 'color2' => '#ffffff', 'start' => '0', 'end' => '100', 'orientation' => 'top')), array('name' => __('Font of the dropdown menu item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_dropdown_link_font', 'type' => 'font', 'values' => array('font_family', 'font_size', 'font_weight'), 'default' => array('font_family' => 'Inherit', 'font_size' => '12', 'font_weight' => '400')), array('name' => __('Text color of the dropdown menu item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_dropdown_link_color', 'type' => 'color', 'default' => '#428bca'), array('name' => __('Icons of the dropdown menu item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_dropdown_icon_font', 'type' => 'number', 'col_width' => 3, 'min' => 0, 'max' => 200, 'units' => 'px', 'values' => '12', 'default' => '12'), array('name' => __('Background Gradient (Color) of the dropdown menu item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_dropdown_link_bg', 'type' => 'gradient', 'default' => array('color1' => 'rgba(255,255,255,0)', 'color2' => 'rgba(255,255,255,0)', 'start' => '0', 'end' => '100', 'orientation' => 'top')), array('name' => __('Border color between dropdown menu items', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_dropdown_link_border_color', 'type' => 'color', 'default' => '#f0f0f0'), array('name' => __('Text color of the dropdown active menu item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_dropdown_link_color_hover', 'type' => 'color', 'default' => '#f8f8f8'), array('name' => __('Background Gradient (Color) of the dropdown active menu item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_dropdown_link_bg_hover', 'type' => 'gradient', 'default' => array('color1' => '#3498db', 'color2' => '#2980b9', 'start' => '0', 'end' => '100', 'orientation' => 'top')), array('name' => __('Plain Text Color of the Dropdown', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => $key . '_menu_dropdown_plain_text_color', 'type' => 'color', 'default' => '#333333'), array('name' => '', 'type' => 'collapse_end')));
     }
     $skins_options = array_merge($skins_options, array(array('name' => __('Set of Installed Google Fonts', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Select the fonts to be included on the site. Remember that a lot of fonts affect on the speed of load page. Always remove unnecessary fonts. Font faces can see on this page - ', $constants['MM_TEXTDOMAIN_ADMIN']) . '<a href="http://www.google.com/fonts" target="_blank">Google fonts</a>', 'key' => 'set_of_google_fonts', 'type' => 'multiplier', 'default' => '0', 'values' => array(array('name' => __('Font 1', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'font_item', 'type' => 'collapse_start'), array('name' => __('Fonts Faily', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'family', 'type' => 'select', 'values' => mm_datastore::get_googlefonts_list(), 'default' => 'Open Sans'), array('name' => '', 'key' => 'font_item', 'type' => 'collapse_end'))), array('name' => __('Custom Icons', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('You can add custom raster icons. After saving these settings, icons will become available in a modal window of icons selection. Recommended size 64x64 pixels.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'set_of_custom_icons', 'type' => 'multiplier', 'default' => '1', 'values' => array(array('name' => __('Custom Icon 1', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'icon_item', 'type' => 'collapse_start'), array('name' => __('Icon File', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'custom_icon', 'type' => 'file', 'default' => $constants['MM_WARE_URL'] . 'framework/src/img/megamain-logo-120x120.png'), array('name' => __('Icon File on Hover', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Keep empty to use regular for both', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'custom_icon_hover', 'type' => 'file', 'default' => ''), array('name' => '', 'key' => 'icon_item', 'type' => 'collapse_end'))), array('name' => __('Additional Styles: ', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Here you can add and edit highlighting styles. After that you can select these styles for menu item in "Menus -> Your Menu Item -> Style of This Item" option.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'additional_styles_presets', 'type' => 'multiplier', 'default' => '0', 'values' => array(array('name' => __('Style 1', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'additional_style_item', 'type' => 'collapse_start'), array('name' => __('Style Name', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'style_name', 'type' => 'textfield', 'default' => 'My Highlight Style'), array('name' => __('Font', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'font', 'type' => 'font', 'values' => array('font_family', 'font_size', 'font_weight'), 'default' => array('font_family' => 'Inherit', 'font_size' => '12', 'font_weight' => '400')), array('name' => __('Icon Size', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'icon', 'type' => 'font', 'values' => array('font_size'), 'default' => array('font_size' => '12')), array('name' => __('Text color', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'text_color', 'type' => 'color', 'default' => '#f8f8f8'), array('name' => __('Background Gradient (Color) ', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'bg_gradient', 'type' => 'gradient', 'default' => array('color1' => '#34495E', 'color2' => '#2C3E50', 'start' => '0', 'end' => '100', 'orientation' => 'top')), array('name' => __('Text color of the active item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'text_color_hover', 'type' => 'color', 'default' => '#f8f8f8'), array('name' => __('Background Gradient (Color) of the active item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'bg_gradient_hover', 'type' => 'gradient', 'default' => array('color1' => '#3d566e', 'color2' => '#354b60', 'start' => '0', 'end' => '100', 'orientation' => 'top')), array('name' => '', 'key' => 'additional_style_item', 'type' => 'collapse_end')))));
     return array(array('title' => 'General', 'key' => 'mm_general', 'icon' => 'im-icon-wrench-3', 'options' => $locations_options), array('title' => 'Skins', 'key' => 'mm_skins', 'icon' => 'im-icon-brush', 'options' => $skins_options), array('title' => 'Specific Options', 'key' => 'mm_specific_options', 'icon' => 'im-icon-hammer', 'options' => array(array('name' => __('Custom CSS', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('You can place here any necessary custom CSS properties.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'custom_css', 'type' => 'textarea', 'col_width' => 12), array('name' => __('Responsive for Handheld Devices', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Enable responsive properties. If this option is enabled, then the menu will be transformed, if the user uses the handheld device.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'responsive_styles', 'type' => 'checkbox', 'values' => array(__('Enable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'true'), 'default' => array('true')), array('name' => __('Responsive Resolution', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Select on which screen resolution menu will be transformed for mobile devices.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'responsive_resolution', 'type' => 'radio', 'col_width' => 3, 'values' => array('480px (iPhone Landscape)' => '480', '768px (iPad Portrait)' => '768', '960px' => '960', '1024px (iPad Landscape)' => '1024'), 'default' => array('1024')), array('name' => __('Use sets of icons', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Here you can activate different sets of icons. Remember that the larger the list of icons - require more of time to loading page.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'icon_sets', 'type' => 'checkbox', 'values' => array(__('IcoMoon (1200)', $constants['MM_TEXTDOMAIN_ADMIN']) => 'icomoon', __('FontAwesome (400)', $constants['MM_TEXTDOMAIN_ADMIN']) => 'fontawesome', __('Glyphicons (200)', $constants['MM_TEXTDOMAIN_ADMIN']) => 'glyphicons'), 'default' => array('icomoon')), array('name' => __('Use Coercive Styles', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('If this option is checked - all CSS properties for this plugin will be have "!important" priority.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'coercive_styles', 'type' => 'checkbox', 'values' => array(__('Enable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'true')), array('name' => __('"Indefinite location" mode', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('<span style="color: #f11;">Warning:</span> If this option is checked - all menus will be replaced by the mega menu. This will be useful only for templates in which are not defined locations of the menu and template has only one menu.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'indefinite_location_mode', 'type' => 'checkbox', 'values' => array(__('Enable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'true')), array('name' => __('Number of widget areas', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Set here how many independent widget areas you need.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'number_of_widgets', 'type' => 'number', 'min' => 0, 'max' => 100, 'units' => 'areas', 'values' => '1', 'default' => '1'), array('name' => __('Language text direction', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('You can select direction of the text for this plugin. LTR - sites where text is read from left to right. RTL - sites where text is read from right to left.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'language_direction', 'type' => 'radio', 'values' => array(__('Left To Right', $constants['MM_TEXTDOMAIN_ADMIN']) => 'ltr', __('Right To Left', $constants['MM_TEXTDOMAIN_ADMIN']) => 'rtl'), 'default' => array('ltr')))), array('title' => 'Settings of the structure', 'key' => 'mm_structure_settings', 'icon' => 'im-icon-checkbox', 'options' => array(array('name' => __('Here you can deactivate the options that you  do not use to customize the menu structure. It helps reduce the number of options and reduce the load on the server.', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'menu_structure_settings', 'type' => 'caption'), array('name' => __('Description of the item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'item_descr', 'type' => 'checkbox', 'values' => array(__('Disable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'disable')), array('name' => __('Style of the item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'item_style', 'type' => 'checkbox', 'values' => array(__('Disable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'disable'), 'default' => array('true')), array('name' => __('Visibility Control', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'item_visibility', 'type' => 'checkbox', 'values' => array(__('Disable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'disable'), 'default' => array('true')), array('name' => __('Icon of the item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'item_icon', 'type' => 'checkbox', 'values' => array(__('Disable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'disable')), array('name' => __('Hide Text of the Item', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'disable_text', 'type' => 'checkbox', 'values' => array(__('Disable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'disable')), array('name' => __('Disable Link', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'disable_link', 'type' => 'checkbox', 'values' => array(__('Disable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'disable')), array('name' => __('Pull to the Other Side', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'pull_to_other_side', 'type' => 'checkbox', 'values' => array(__('Disable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'disable'), 'default' => array('true')), array('name' => __('Submenu Type', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'submenu_type', 'type' => 'checkbox', 'values' => array(__('Disable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'disable')), array('name' => __('Side of dropdown elements', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'submenu_drops_side', 'type' => 'checkbox', 'values' => array(__('Disable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'disable')), array('name' => __('Submenu Columns', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'submenu_columns', 'type' => 'checkbox', 'values' => array(__('Disable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'disable')), array('name' => __('Enable Full Width Dropdown', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'submenu_enable_full_width', 'type' => 'checkbox', 'values' => array(__('Disable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'disable')), array('name' => __('Dropdown Background Image', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'submenu_bg_image', 'type' => 'checkbox', 'values' => array(__('Disable', $constants['MM_TEXTDOMAIN_ADMIN']) => 'disable')))), array('title' => 'Documentation & Support', 'key' => 'support', 'icon' => 'im-icon-support', 'options' => array(array('name' => '', 'key' => 'support', 'type' => 'just_html', 'default' => '<br /><br /> <a href="http://manual.extensions.megamain.com/" target="_blank">Online documentation</a>. <br /><br /> If you need support, <br /> If you have a question or suggestion - <br /> Leave a message on our support page <br /> <a href="http://support.megamain.com/?ref=' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . '" target="_blank">Support.MegaMain.com</a> (in new window).<br /> <br />'), array('name' => __('Purchase Code', $constants['MM_TEXTDOMAIN_ADMIN']), 'descr' => __('Enter here the purchase code of this product. This action unlocks the automatic updates for you. "Where you can find your <a href="http://support.megamain.com/src/img/megamain-find-item-purchase-code.png" target="_blank">Purchase Code</a>".', $constants['MM_TEXTDOMAIN_ADMIN']), 'key' => 'purchase_code', 'type' => 'textfield', 'col_width' => 6, 'default' => ''))));
     // END FRIMARY ARRAY
 }
 /**
  * Register the required plugins for The "Google Analytics Top Content" plugin.
  */
 public function register_required_plugins()
 {
     $plugins = array(array('name' => 'Google Analytics by Yoast', 'slug' => 'google-analytics-for-wordpress', 'required' => true));
     $widgets_url = '<a href="' . get_admin_url('', 'widgets.php') . '" title="' . __('Setup Widget', 'top-google-posts') . '">' . __('Setup Widget', 'top-google-posts') . '</a>';
     $config = array('domain' => 'top-google-posts', 'default_path' => '', 'parent_slug' => 'plugins.php', 'capability' => 'install_plugins', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => true, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', 'top-google-posts'), 'menu_title' => __('Install Plugins', 'top-google-posts'), 'installing' => __('Installing Plugin: %s', 'top-google-posts'), 'oops' => __('Something went wrong with the plugin API.', 'top-google-posts'), 'notice_can_install_required' => _n_noop('The "Google Analytics Top Content" plugin requires the following plugin: %1$s.', 'This plugin requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This plugin recommends the following plugin: %1$s.', 'This plugin recommends the following plugins: %1$s.'), 'notice_cannot_install' => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), 'notice_cannot_activate' => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.'), 'notice_ask_to_update' => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this plugin: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this plugin: %1$s.'), 'notice_cannot_update' => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', 'top-google-posts'), 'plugin_activated' => __('Plugin activated successfully.', 'top-google-posts'), 'complete' => __('All plugins installed and activated successfully. %s', 'top-google-posts')));
     tgmpa($plugins, $config);
 }
function rl_post_install()
{
    if (get_option('require_login_first_notice') == '1') {
        echo '<div class="updated"><p>Click <a href="' . get_admin_url(null, 'options-general.php?page=require_login') . '">here</a> to turn on Require Login.</p></div>';
        delete_option('require_login_first_notice');
    }
}
    function renderData($rowID, $d)
    {
        ?>
<table><tr><td>
		
		<form method="get" action="<?php 
        echo get_admin_url(null, 'admin.php') . "?page=sa-bidders";
        ?>
">		
		<input type="submit" class="button" name="action-summary" id="action-summary" value="<?php 
        _e("Summary", 'silentauction');
        ?>
" />		
		<input type="hidden" name="biddernumber" value="<?php 
        echo $d['bidderNumber'];
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $d['ID'];
        ?>
" />
		<input type="hidden" name="page" value="sa-bidders" />
		</form>
		
		</td></tr></table><?php 
    }
 function foundationpress_menu_fallback()
 {
     echo '<div class="alert-box secondary">';
     // Translators 1: Link to Menus, 2: Link to Customize.
     printf(__('Please assign a menu to the primary menu location under %1$s or %2$s the design.', 'foundationpress'), sprintf(__('<a href="%s">Menus</a>', 'foundationpress'), get_admin_url(get_current_blog_id(), 'nav-menus.php')), sprintf(__('<a href="%s">Customize</a>', 'foundationpress'), get_admin_url(get_current_blog_id(), 'customize.php')));
     echo '</div>';
 }
 /**
  * Display admin notices to help users solve requirements for getting events.
  *
  * @access public
  */
 public function display_admin_notice()
 {
     // Don't display notices to users that can't do anything about it.
     if (!current_user_can('install_plugins')) {
         return;
     }
     // Notices are only displayed on the dashboard, plugins, tools, and settings admin pages.
     $page = get_current_screen()->base;
     $display_on_pages = array('dashboard', 'plugins', 'tools', 'options-general');
     if (!in_array($page, $display_on_pages)) {
         return;
     }
     // We're all fired up. No need for any admin notices.
     if (self::has_active_connection()) {
         return;
     }
     // Keyring is not already installed.
     if (!file_exists(plugin_dir_path(dirname(__DIR__)) . 'keyring')) {
         $notice = sprintf(__('Eventbrite needs the <a href="%1$s">Keyring plugin</a> to work. <a href="%2$s" class="thickbox">Install Keyring</a>.', 'eventbrite-api'), 'https://wordpress.org/plugins/keyring/', esc_url(network_admin_url('plugin-install.php?tab=plugin-information&plugin=keyring&TB_iframe=true&width=600&height=550')));
     } elseif (!is_plugin_active('keyring/keyring.php')) {
         $notice = sprintf(__('Eventbrite needs the <a href="%1$s">Keyring plugin</a> activated, with a connection to eventbrite.com. <a href="%2$s">Activate Keyring</a>.', 'eventbrite-api'), 'https://wordpress.org/plugins/keyring/', esc_url(wp_nonce_url(network_admin_url('plugins.php?action=activate&plugin=keyring/keyring.php&plugin_status=all&paged=1&s'), 'activate-plugin_keyring/keyring.php')));
     } elseif (!self::has_active_connection()) {
         $notice = sprintf(__('The Eventbrite API plugin needs a working connection to eventbrite.com. We recommend first <a href="%1$s">logging in</a> to your eventbrite.com account. <a href="%2$s">Connect to Eventbrite</a>.', 'eventbrite-api'), 'https://www.eventbrite.com/login/', esc_url(get_admin_url(null, 'tools.php?page=keyring&action=services')));
     }
     // Output notice HTML.
     printf('<div id="message" class="updated"><p>%s</p></div>', $notice);
 }
Example #28
0
function acf_image_crop_action_links($links)
{
    // changed
    $links[] = '<a href="' . get_admin_url(null, 'options-media.php') . '">' . __('Settings', 'acf-image_crop') . '</a>';
    // changed END
    return $links;
}
 /**
  * Short Description. (use period)
  *
  * Long Description.
  *
  * @since    1.0.0
  */
 public static function activate()
 {
     global $wpdb;
     if (!in_array('mailchimp-for-wp/mailchimp-for-wp.php', apply_filters('active_plugins', get_option('active_plugins'))) && !is_plugin_active_for_network('mailchimp-for-wp/mailchimp-for-wp.php')) {
         wp_die("<strong>MailChimp for BuddyPress</strong> requires <strong>MailChimp for WordPress</strong> plugin activate to work normally.<br /><br />Back to the WordPress <a href='" . get_admin_url(null, 'plugins.php') . "'>Plugins page</a>.");
     }
 }
Example #30
-1
 function setAppConfig($approval = 'auto')
 {
     $this->client = new Google_Client();
     /* Set Retries */
     $this->client->setClassConfig('Google_Task_Runner', 'retries', 5);
     $this->userInfoService = new Google_Service_Oauth2($this->client);
     $this->googleDriveService = new Google_Service_Drive($this->client);
     $this->googleUrlshortenerService = new Google_Service_Urlshortener($this->client);
     if (!empty($this->settings['googledrive_app_client_id']) && !empty($this->settings['googledrive_app_client_secret'])) {
         $this->client->setClientId($this->settings['googledrive_app_client_id']);
         $this->client->setClientSecret($this->settings['googledrive_app_client_secret']);
     } else {
         $this->client->setClientId('538839470620-fvjmtsvik53h255bnu0qjmbr8kvd923i.apps.googleusercontent.com');
         $this->client->setClientSecret('UZ1I3I-D4rPhXpnE8T1ggGhE');
     }
     $this->client->setRedirectUri('http://www.florisdeleeuw.nl/use-your-drive/index.php');
     $this->client->setApprovalPrompt($approval);
     $this->client->setAccessType('offline');
     $this->client->setScopes(array('https://www.googleapis.com/auth/drive', 'https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/userinfo.profile', 'https://www.googleapis.com/auth/urlshortener'));
     $page = isset($_GET["page"]) ? '?page=' . $_GET["page"] : '';
     $location = get_admin_url(null, 'admin.php' . $page);
     $this->client->setState(strtr(base64_encode($location), '+/=', '-_~'));
     /* Logger */
     $this->client->setClassConfig('Google_Logger_File', array('file' => USEYOURDRIVE_CACHEDIR . '/log', 'mode' => 0640, 'lock' => true));
     $this->client->setClassConfig('Google_Logger_Abstract', array('level' => 'debug', 'log_format' => "[%datetime%] %level%: %message% %context%\n", 'date_format' => 'd/M/Y:H:i:s O', 'allow_newlines' => true));
     /* Uncomment the following line to log communcations.
      * The log is located in /cache/log
      */
     //$this->client->setLogger(new Google_Logger_File($this->client));
     return true;
 }