コード例 #1
0
function wplf_send_email_copy($return)
{
    // do nothing if form validation failed
    if (!$return->ok) {
        return;
    }
    $form_id = intval($_POST['_form_id']);
    // _form_id is already validated and we know it exists by this point
    $form_title = esc_html(get_the_title($form_id));
    $form_meta = get_post_meta($form_id);
    $referrer = esc_url_raw($_POST['referrer']);
    if (isset($form_meta['_wplf_email_copy_enabled']) && $form_meta['_wplf_email_copy_enabled'][0]) {
        $to = isset($form_meta['_wplf_email_copy_to']) ? $form_meta['_wplf_email_copy_to'][0] : get_option('admin_email');
        $subject = wp_sprintf(__('New submission from %s', 'wp-libre-form'), $referrer);
        $content = wp_sprintf(__('Form "%s" (ID %d) was submitted with values below: ', 'wp-libre-form'), $form_title, $form_id);
        $content = apply_filters('wplf_email_copy_content_start', $content, $form_title, $form_id) . "\n\n";
        foreach ($_POST as $key => $value) {
            if ('_' === $key[0]) {
                continue;
            }
            if (is_array($value)) {
                // in case input type="radio" submits an array
                $value = implode(', ', $value);
            }
            $content .= esc_html($key) . ': ' . esc_html(print_r($value, true)) . "\n";
        }
        wp_mail(apply_filters('wplf_email_copy_to', $to), apply_filters('wplf_email_copy_subject', $subject), apply_filters('wplf_email_copy_content', $content), apply_filters('wplf_email_copy_headers', ''), apply_filters('wplf_email_copy_attachments', array()));
    }
}
コード例 #2
0
ファイル: validator.php プロジェクト: Garth619/Femi9
 protected function sanitize_settings()
 {
     $this->sanitize_setting('bool', 'default', __('Default Blacklist', 'better-wp-security'));
     $this->sanitize_setting('bool', 'enable_ban_lists', __('Ban Lists', 'better-wp-security'));
     $this->sanitize_setting('newline-separated-ips', 'host_list', __('Ban Hosts', 'better-wp-security'));
     if (is_array($this->settings['host_list'])) {
         require_once ITSEC_Core::get_core_dir() . '/lib/class-itsec-lib-ip-tools.php';
         $whitelisted_hosts = array();
         $current_ip = ITSEC_Lib::get_ip();
         foreach ($this->settings['host_list'] as $host) {
             if (is_user_logged_in() && ITSEC_Lib_IP_Tools::intersect($current_ip, ITSEC_Lib_IP_Tools::ip_wild_to_ip_cidr($host))) {
                 $this->set_can_save(false);
                 /* translators: 1: input name, 2: invalid host */
                 $this->add_error(sprintf(__('The following host in %1$s matches your current IP and cannot be banned: %2$s', 'better-wp-security'), __('Ban Hosts', 'better-wp-security'), $host));
                 continue;
             }
             if (ITSEC_Lib::is_ip_whitelisted($host)) {
                 $whitelisted_hosts[] = $host;
             }
         }
         if (!empty($whitelisted_hosts)) {
             $this->set_can_save(false);
             /* translators: 1: input name, 2: invalid host list */
             $this->add_error(wp_sprintf(_n('The following IP in %1$s is whitelisted and cannot be banned: %2$l', 'The following IPs in %1$s are whitelisted and cannot be banned: %2$l', count($whitelisted_hosts), 'better-wp-security'), __('Ban Hosts', 'better-wp-security'), $whitelisted_hosts));
         }
     }
     $this->sanitize_setting(array($this, 'sanitize_agent_list_entry'), 'agent_list', __('Ban User Agents', 'better-wp-security'));
 }
コード例 #3
0
 /**
  * Check some thinks on plugin activation
  *
  * @since   0.0.1
  * @access  public
  * @static
  * @return  void
  */
 public static function on_activate()
 {
     // check WordPress version
     if (!version_compare($GLOBALS['wp_version'], '4.0', '>=')) {
         deactivate_plugins(RW_Distributed_Profile_Server::$plugin_filename);
         die(wp_sprintf('<strong>%s:</strong> ' . __('This plugin requires WordPress 4.0 or newer to work', RW_Site_Config::get_textdomain()), RW_Site_Config::get_plugin_data('Name')));
     }
     // check php version
     if (version_compare(PHP_VERSION, '5.3.0', '<')) {
         deactivate_plugins(RW_Site_Config::$plugin_filename);
         die(wp_sprintf('<strong>%1s:</strong> ' . __('This plugin requires PHP 5.3 or newer to work. Your current PHP version is %1s, please update.', RW_Site_Config::get_textdomain()), RW_Site_Config::get_plugin_data('Name'), PHP_VERSION));
     }
     if (defined('RW_SITE_CONFIG_PLUGINS_CONFIG')) {
         if (false === get_site_option('rw_site_config_plugins')) {
             $plugins = unserialize(RW_SITE_CONFIG_PLUGINS_CONFIG);
             update_site_option('rw_site_config_plugins', $plugins);
         }
     }
     if (defined('RW_SITE_CONFIG_OPTIONS_CONFIG')) {
         if (false === get_site_option('rw_site_config_options')) {
             $options = unserialize(RW_SITE_CONFIG_OPTIONS_CONFIG);
             update_site_option('rw_site_config_options', $options);
         }
     }
 }
コード例 #4
0
ファイル: widgets-events.php プロジェクト: ergov2015/rideflag
 /**
  * Outputs the content of the widget
  *
  * @param array $args
  * @param array $instance
  */
 public function widget($args, $instance) {
     
     $title = apply_filters('widget_title', $instance['title']);
     $more_link = apply_filters('widget_more_link', $instance['more_link']);
     $visibility_count = apply_filters('widget_visibility_count', $instance['visibility_count']);
     $scrollbar = apply_filters('widget_scrollbar', $instance['scrollbar']);
     echo $args['before_widget'];
     echo '<div class="event-widget">';
     if (!empty($instance['title'])) {
         echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title'];
     }
     
     $events_per_page = empty($scrollbar) ? $visibility_count:20;
     $events = get_posts(array('post_type' => 'event', 'posts_per_page' => $events_per_page));
     $hasScroll = !empty($scrollbar) ? 'hasScroll':'';
     $eventHtml = '<div class="content events '.$hasScroll.'">';
     foreach ($events as $event) {
         $attachment_id = get_post_thumbnail_id($event->ID);
         $featured_image = wp_get_attachment_url($attachment_id);
         //$featured_image = get_the_post_thumbnail($event->ID,array(64,64),array('class'=>'events-list-img'));
         $featured_image = empty($attachment_id)  ? get_stylesheet_directory_uri().'/images/default-event.png': $featured_image;   
         $link = get_permalink($event->ID);
         $title = wp_trim_words($event->post_title, 10, '...');
         $event_start_date = get_field('event_start_date_time',$event->ID);           
         $event_s_d = date('M d, Y', strtotime($event_start_date));
         $event_s_d_2 = date('Y-m-d', strtotime($event_start_date));
         $event_s_d_1 = date_create($event_s_d_2);
         $event_end_date = get_field('event_end_date_time',$event->ID);
         $event_e_d = date('M d, Y', strtotime($event_end_date));
         $event_e_d_2 = date('Y-m-d', strtotime($event_end_date));
         $event_e_d_1 = date_create($event_e_d_2);
         $event_date_diff = date_diff($event_e_d_1, $event_s_d_1);
         $event_date_diff_for =$event_date_diff->format("%R%a");
         $pcontent = wp_trim_words($event->post_content, 8, '...'); 
         $eventHtml .= '<div class="events-list">';
         $eventHtml .= sprintf('<img class="events-list-img" src="%2$s" alt="%1$s" />', $event->post_title, $featured_image);
         if($event_date_diff_for == "+0"){
              $eventHtml .= sprintf('<p class="events-date">%1$s</p>', $event_s_d);
         }else{
             $eventHtml .= sprintf('<p class="events-date">%1$s - %2$s</p>', $event_s_d, $event_e_d);
         }
         $eventHtml .= sprintf('<a href="%2$s" title="%1$s" class="events-list-title">%1$s</a>', $title, $link);
         $eventHtml .= sprintf('<p class="events-list-excerpt">%1$s</p>', $pcontent);
         $eventHtml .= sprintf('<a class="link-box" href="%2$s" title="%1$s" class="events-list-title"></a>', $title, $link);
         $eventHtml .= '</div>';
     }
     $eventHtml .= '</div>';
     echo $eventHtml;
     if(!empty($more_link)){
          echo wp_sprintf('<div class="event-wfooter more-links"><a class="readmore" href="%s" title="More Events">More Events</a></div>',$more_link);
     }
            
     echo '</div>';
     echo $args['after_widget'];
     
 }
コード例 #5
0
 static function onPluginActivation()
 {
     if (phpVersionSupported()) {
         if (!WpLinkedDataInitializer::isPeclHttpInstalled()) {
             add_option('show_pecl_http_missing_warning', true);
         }
     } else {
         deactivate_plugins(__FILE__);
         wp_die(wp_sprintf('%1s: ' . __('Sorry, This plugin has taken a bold step in requiring PHP 5.3.0+. Your server is currently running PHP %2s, Please bug your host to upgrade to a recent version of PHP which is less bug-prone.', 'wp-linked-data'), __FILE__, PHP_VERSION));
     }
 }
 /**
  * Check some thinks on plugin activation
  *
  * @since   0.0.1
  * @access  public
  * @static
  * @return  void
  */
 public static function on_activate()
 {
     // check WordPress version
     if (!version_compare($GLOBALS['wp_version'], '4.0', '>=')) {
         deactivate_plugins(RW_More_Rpi_Virtuell_Widget::$plugin_filename);
         die(wp_sprintf('<strong>%s:</strong> ' . __('This plugin requires WordPress 4.0 or newer to work', RW_More_Rpi_Virtuell_Widget::get_textdomain()), RW_More_Rpi_Virtuell_Widget::get_plugin_data('Name')));
     }
     // check php version
     if (version_compare(PHP_VERSION, '5.3.0', '<')) {
         deactivate_plugins(RW_More_Rpi_Virtuell_Widget::$plugin_filename);
         die(wp_sprintf('<strong>%1s:</strong> ' . __('This plugin requires PHP 5.3 or newer to work. Your current PHP version is %1s, please update.', RW_More_Rpi_Virtuell_Widget::get_textdomain()), RW_More_Rpi_Virtuell_Widget::get_plugin_data('Name'), PHP_VERSION));
     }
 }
コード例 #7
0
 /**
  * Check some thinks on plugin activation
  *
  * @since   0.0.1
  * @access  public
  * @static
  * @return  void
  */
 public static function on_activate()
 {
     // check WordPress version
     if (!version_compare($GLOBALS['wp_version'], '4.0', '>=')) {
         deactivate_plugins(RW_Group_Blogs::$plugin_filename);
         die(wp_sprintf('<strong>%s:</strong> ' . __('This plugin requires WordPress 4.0 or newer to work', RW_Group_Blogs::get_textdomain()), RW_Group_Blogs::get_plugin_data('Name')));
     }
     // check php version
     if (version_compare(PHP_VERSION, '5.3.0', '<')) {
         deactivate_plugins(RW_Group_Blogs::$plugin_filename);
         die(wp_sprintf('<strong>%1s:</strong> ' . __('This plugin requires PHP 5.3 or newer to work. Your current PHP version is %1s, please update.', RW_Group_Blogs::get_textdomain()), RW_Group_Blogs::get_plugin_data('Name'), PHP_VERSION));
     }
     wp_schedule_event(time(), 'hourly', 'rw_group_blogs_cron');
 }
コード例 #8
0
 /**
  * Check some thinks on plugin activation
  *
  * @since   0.0.1
  * @access  public
  * @static
  * @return  void
  */
 public static function on_activate()
 {
     // check WordPress version
     if (!version_compare($GLOBALS['wp_version'], '4.0', '>=')) {
         deactivate_plugins(RW_Demo_Plugin::$plugin_filename);
         //@TODO  Klassename
         die(wp_sprintf('<strong>%s:</strong> ' . __('This plugin requires WordPress 4.0 or newer to work', RW_Demo_Plugin::get_textdomain()), RW_Demo_Plugin::get_plugin_data('Name')));
     }
     // check php version
     if (version_compare(PHP_VERSION, '5.3.0', '<')) {
         deactivate_plugins(RW_Demo_Plugin::$plugin_filename);
         // @TODO  Klassenanme
         die(wp_sprintf('<strong>%1s:</strong> ' . __('This plugin requires PHP 5.3 or newer to work. Your current PHP version is %1s, please update.', RW_Demo_Plugin::get_textdomain()), RW_Demo_Plugin::get_plugin_data('Name'), PHP_VERSION));
     }
     // check buddypress @TODO  Nur wenn BuddyPress activity für das Plugin nötig ist
     if (!function_exists('bp_activities')) {
         deactivate_plugins(RW_Demo_Plugin::$plugin_filename);
         //@TODO  Klassenname
         die(wp_sprintf('<strong>%1s:</strong> ' . __('This plugin requires BuddyPress to work.', RW_Sticky_Activity::get_textdomain()), RW_Sticky_Activity::get_plugin_data('Name'), PHP_VERSION));
     }
     // @TODO  Hier weitere Checks einbaun die das Plugin ggf als Abhängigkeiten hat. MU, bbPress usw
 }
コード例 #9
0
ファイル: admin.php プロジェクト: jimrucinski/Vine
 public function show_activation_message()
 {
     $new_packages = $GLOBALS['ithemes-updater-settings']->get_new_packages();
     if (empty($new_packages)) {
         return;
     }
     natcasesort($new_packages);
     require_once $GLOBALS['ithemes_updater_path'] . '/functions.php';
     $names = array();
     foreach ($new_packages as $package) {
         $names = Ithemes_Updater_Functions::get_package_name($package);
     }
     if (is_multisite() && is_network_admin()) {
         $url = network_admin_url('settings.php') . "?page={$this->page_name}";
     } else {
         $url = admin_url('options-general.php') . "?page={$this->page_name}";
     }
     echo '<div class="updated fade"><p>' . wp_sprintf(__('To receive automatic updates for %l, use the <a href="%s">iThemes Licensing</a> page found in the Settings menu.', 'it-l10n-Builder-Madison'), $names, $url) . '</p></div>';
     $GLOBALS['ithemes-updater-settings']->update_packages();
 }
コード例 #10
0
 function admin_page_load()
 {
     $error = false;
     if (!empty($_GET['jetpack_restate'])) {
         // Should only be used in intermediate redirects to preserve state across redirects
         Jetpack::restate();
     }
     if (isset($_GET['action'])) {
         switch ($_GET['action']) {
             case 'authorize':
                 if (Jetpack::is_active()) {
                     Jetpack::state('message', 'already_authorized');
                     wp_safe_redirect(Jetpack::admin_url());
                     exit;
                 }
                 $client_server =& new Jetpack_Client_Server();
                 $client_server->authorize();
                 exit;
             case 'register':
                 check_admin_referer('jetpack-register');
                 $registered = Jetpack::try_registration();
                 if (is_wp_error($registered)) {
                     $error = $registered->get_error_code();
                     Jetpack::state('error_description', $registered->get_error_message());
                     break;
                 }
                 wp_redirect($this->build_connect_url(true));
                 exit;
             case 'activate':
                 $module = stripslashes($_GET['module']);
                 check_admin_referer("jetpack_activate-{$module}");
                 Jetpack::activate_module($module);
                 wp_safe_redirect(Jetpack::admin_url());
                 exit;
             case 'activate_default_modules':
                 check_admin_referer('activate_default_modules');
                 Jetpack::restate();
                 $min_version = isset($_GET['min_version']) ? $_GET['min_version'] : false;
                 $max_version = isset($_GET['max_version']) ? $_GET['max_version'] : false;
                 $other_modules = isset($_GET['other_modules']) && is_array($_GET['other_modules']) ? $_GET['other_modules'] : array();
                 Jetpack::activate_default_modules($min_version, $max_version, $other_modules);
                 wp_safe_redirect(Jetpack::admin_url());
                 exit;
             case 'disconnect':
                 check_admin_referer('jetpack-disconnect');
                 $this->disconnect();
                 wp_safe_redirect(Jetpack::admin_url());
                 exit;
             case 'deactivate':
                 $module = stripslashes($_GET['module']);
                 check_admin_referer("jetpack_deactivate-{$module}");
                 Jetpack::deactivate_module($module);
                 Jetpack::state('message', 'module_deactivated');
                 Jetpack::state('module', $module);
                 wp_safe_redirect(Jetpack::admin_url());
                 exit;
         }
     }
     if (!($error = $error ? $error : Jetpack::state('error'))) {
         Jetpack::activate_new_modules();
     }
     switch ($error) {
         case 'access_denied':
             $this->error = __('You need to authorize the Jetpack connection between your site and WordPress.com to enable the awesome features.', 'jetpack');
             break;
         case 'wrong_state':
             $this->error = __("Don&#8217;t cross the streams!  You need to stay logged in to your WordPress blog while you authorize Jetpack.", 'jetpack');
             break;
         case 'invalid_client':
             // @todo re-register instead of deactivate/reactivate
             $this->error = __('Return to sender.  Whoops! It looks like you got the wrong Jetpack in the mail; deactivate then reactivate the Jetpack plugin to get a new one.', 'jetpack');
             break;
         case 'invalid_grant':
             $this->error = __("Wrong size.  Hm&#8230; it seems your Jetpack doesn&#8217;t quite fit.  Have you lost weight? Click &#8220;Connect to WordPress.com&#8221; again to get your Jetpack adjusted.", 'jetpack');
             break;
         case 'site_inaccessible':
         case 'site_requires_authorization':
             $this->error = sprintf(__('Your website needs to be publicly accessible to use Jetpack: %s', 'jetpack'), "<code>{$error}</code>");
             break;
         case 'module_activation_failed':
             $module = Jetpack::state('module');
             if (!empty($module) && ($mod = Jetpack::get_module($module))) {
                 if ('sharedaddy' == $module && version_compare(PHP_VERSION, '5', '<')) {
                     $this->error = sprintf(__('The %1$s module requires <strong>PHP version %2$s</strong> or higher.', 'jetpack'), '<strong>' . $mod['name'] . '</strong>', '5');
                 } else {
                     $this->error = sprintf(__('%s could not be activated because it triggered a <strong>fatal error</strong>. Perhaps there is a conflict with another plugin you have installed?', 'jetpack'), $mod['name']);
                     if (isset($this->plugins_to_deactivate[$module])) {
                         $this->error .= ' ' . sprintf(__('Do you still have the %s plugin installed?', 'jetpack'), $this->plugins_to_deactivate[$module][1]);
                     }
                 }
             } else {
                 $this->error = __('Module could not be activated because it triggered a <strong>fatal error</strong>. Perhaps there is a conflict with another plugin you have installed?', 'jetpack');
             }
             if ($php_errors = Jetpack::state('php_errors')) {
                 $this->error .= "<br />\n";
                 $this->error .= $php_errors;
             }
             break;
         case 'not_public':
             $this->error = __("<strong>Your Jetpack has a glitch.</strong> Connecting this site with WordPress.com is not possible. This usually means your site is not publicly accessible (localhost).", 'jetpack');
             break;
         case 'wpcom_408':
         case 'wpcom_5??':
         case 'wpcom_bad_response':
         case 'wpcom_outage':
             $this->error = __('WordPress.com is currently having problems and is unable to fuel up your Jetpack.  Please try again later.', 'jetpack');
             break;
         case 'register_http_request_failed':
         case 'token_http_request_failed':
             $this->error = sprintf(__('Jetpack could not contact WordPress.com: %s.  This usually means something is incorrectly configured on your web host.', 'jetpack'), "<code>{$error}</code>");
             break;
         default:
             if (empty($error)) {
                 break;
             }
             $error = trim(substr(strip_tags($error), 0, 20));
             // no break: fall through
         // no break: fall through
         case 'no_role':
         case 'no_cap':
         case 'no_code':
         case 'no_state':
         case 'invalid_state':
         case 'invalid_request':
         case 'invalid_scope':
         case 'unsupported_response_type':
         case 'invalid_token':
         case 'no_token':
         case 'missing_secrets':
         case 'home_missing':
         case 'siteurl_missing':
         case 'gmt_offset_missing':
         case 'site_name_missing':
         case 'secret_1_missing':
         case 'secret_2_missing':
         case 'site_lang_missing':
         case 'home_malformed':
         case 'siteurl_malformed':
         case 'gmt_offset_malformed':
         case 'timezone_string_malformed':
         case 'site_name_malformed':
         case 'secret_1_malformed':
         case 'secret_2_malformed':
         case 'site_lang_malformed':
         case 'secrets_mismatch':
         case 'verify_secret_1_missing':
         case 'verify_secret_1_malformed':
         case 'verify_secrets_missing':
         case 'verify_secrets_mismatch':
             $error = esc_html($error);
             $this->error = sprintf(__("<strong>Your Jetpack has a glitch.</strong>  Something went wrong that&#8217;s never supposed to happen.  Guess you&#8217;re just lucky: %s", 'jetpack'), "<code>{$error}</code>");
             if (!Jetpack::is_active()) {
                 $this->error .= '<br />';
                 $this->error .= sprintf(__('Try connecting again.', 'jetpack'));
             }
             break;
     }
     $message_code = Jetpack::state('message');
     $active_state = Jetpack::state('activated_modules');
     if (!empty($active_state)) {
         $available = Jetpack::get_available_modules();
         $active_state = explode(',', $active_state);
         $active_state = array_intersect($active_state, $available);
         if (count($active_state)) {
             foreach ($active_state as $mod) {
                 $this->stat('module-activated', $mod);
             }
         } else {
             $active_state = false;
         }
     }
     switch ($message_code) {
         case 'modules_activated':
             $this->message = sprintf(__('Welcome to <strong>Jetpack %s</strong>!', 'jetpack'), JETPACK__VERSION);
             if ($active_state) {
                 $titles = array();
                 foreach ($active_state as $mod) {
                     if ($mod_headers = Jetpack::get_module($mod)) {
                         $titles[] = '<strong>' . preg_replace('/\\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name']) . '</strong>';
                     }
                 }
                 if ($titles) {
                     $this->message .= '<br /><br />' . wp_sprintf(__('The following new modules have been activated: %l.', 'jetpack'), $titles);
                 }
             }
             if ($reactive_state = Jetpack::state('reactivated_modules')) {
                 $titles = array();
                 foreach (explode(',', $reactive_state) as $mod) {
                     if ($mod_headers = Jetpack::get_module($mod)) {
                         $titles[] = '<strong>' . preg_replace('/\\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name']) . '</strong>';
                     }
                 }
                 if ($titles) {
                     $this->message .= '<br /><br />' . wp_sprintf(__('The following modules have been updated: %l.', 'jetpack'), $titles);
                 }
             }
             break;
         case 'module_activated':
             if ($module = Jetpack::get_module(Jetpack::state('module'))) {
                 $this->message = sprintf(__('<strong>%s Activated!</strong> You can deactivate at any time by clicking Learn More and then Deactivate on the module card.', 'jetpack'), $module['name']);
                 $this->stat('module-activated', Jetpack::state('module'));
             }
             break;
         case 'module_deactivated':
             if ($module = Jetpack::get_module(Jetpack::state('module'))) {
                 $this->message = sprintf(__('<strong>%s Deactivated!</strong> You can activate it again at any time using the activate button on the module card.', 'jetpack'), $module['name']);
                 $this->stat('module-deactivated', Jetpack::state('module'));
             }
             break;
         case 'module_configured':
             $this->message = __('<strong>Module settings were saved.</strong> ', 'jetpack');
             break;
         case 'already_authorized':
             $this->message = __('<strong>Your Jetpack is already connected.</strong> ', 'jetpack');
             break;
         case 'authorized':
             $this->message = __("<strong>You&#8217;re fueled up and ready to go.</strong> ", 'jetpack');
             $this->message .= "<br />\n";
             $this->message .= __('The features below are now active. Click the learn more buttons to explore each feature.', 'jetpack');
             break;
     }
     $deactivated_plugins = Jetpack::state('deactivated_plugins');
     if (!empty($deactivated_plugins)) {
         $deactivated_plugins = explode(',', $deactivated_plugins);
         $deactivated_titles = array();
         foreach ($deactivated_plugins as $deactivated_plugin) {
             if (!isset($this->plugins_to_deactivate[$deactivated_plugin])) {
                 continue;
             }
             $deactivated_titles[] = '<strong>' . str_replace(' ', '&nbsp;', $this->plugins_to_deactivate[$deactivated_plugin][1]) . '</strong>';
         }
         if ($deactivated_titles) {
             if ($this->message) {
                 $this->message .= "<br /><br />\n";
             }
             $this->message .= wp_sprintf(_n('Jetpack contains the most recent version of the old %l plugin.', 'Jetpack contains the most recent versions of the old %l plugins.', count($deactivated_titles), 'jetpack'), $deactivated_titles);
             $this->message .= "<br />\n";
             $this->message .= _n('The old version has been deactivated and can be removed from your site.', 'The old versions have been deactivated and can be removed from your site.', count($deactivated_titles), 'jetpack');
         }
     }
     if ($this->message || $this->error) {
         add_action('jetpack_notices', array(&$this, 'admin_notices'));
     }
     if (isset($_GET['configure']) && Jetpack::is_module($_GET['configure'])) {
         do_action('jetpack_module_configuration_load_' . $_GET['configure']);
     }
     add_filter('jetpack_short_module_description', 'wptexturize');
 }
コード例 #11
0
ファイル: module-info.php プロジェクト: KurtMakesWeb/CandG
function jetpack_shortcodes_more_info_connected()
{
    ?>
	<div class="jp-info-img">
		<a href="http://en.support.wordpress.com/shortcodes/">
			<img class="jp-info-img" src="<?php 
    echo plugins_url(basename(dirname(dirname(__FILE__))) . '/_inc/images/screenshots/shortcodes.png');
    ?>
" alt="<?php 
    esc_attr_e('Shortcode Embeds', 'jetpack');
    ?>
" width="300" height="150" />
		</a>
	</div>

	<h4><?php 
    esc_html_e('Shortcode Embeds', 'jetpack');
    ?>
</h4>
	<p><?php 
    esc_html_e('Shortcodes allow you to easily and safely embed media from other places in your site. With just one simple code, you can tell WordPress to embed YouTube, Flickr, and other media.', 'jetpack');
    ?>
</p>
	<p><?php 
    esc_html_e('Enter a shortcode directly into the Post/Page editor to embed media. For specific instructions follow the links below.', 'jetpack');
    ?>
</p>
	<?php 
    $codes = array('archives' => 'http://support.wordpress.com/archives-shortcode/', 'audio' => 'http://support.wordpress.com/audio/', 'blip.tv' => 'http://support.wordpress.com/videos/bliptv/', 'dailymotion' => 'http://support.wordpress.com/videos/dailymotion/', 'flickr' => 'http://support.wordpress.com/videos/flickr-video/', 'scribd' => 'http://support.wordpress.com/scribd/', 'slideshare' => 'http://support.wordpress.com/slideshows/slideshare/', 'soundcloud' => 'http://support.wordpress.com/audio/soundcloud-audio-player/', 'vimeo' => 'http://support.wordpress.com/videos/vimeo/', 'youtube' => 'http://support.wordpress.com/videos/youtube/', 'polldaddy' => 'http://support.polldaddy.com/wordpress-shortcodes/');
    $codes['wpvideo (VideoPress)'] = 'http://en.support.wordpress.com/videopress/';
    $available = '';
    foreach ($codes as $code => $url) {
        $available[] = '<a href="' . $url . '" target="_blank">[' . $code . ']</a>';
    }
    ?>
	<p><?php 
    echo wp_sprintf(esc_html__('Available shortcodes are: %l.', 'jetpack'), $available);
    ?>
</p>
<?php 
}
コード例 #12
0
/**
 * Returns paginated HTML string based on the given parameters.
 *
 * @since 1.0.0
 * @since 1.5.5 Fixed pagination links when location selected.
 * @package GeoDirectory
 * @global object $wpdb WordPress Database object.
 * @global object $wp_query WordPress Query object.
 * @param string $before The HTML to prepend.
 * @param string $after The HTML to append.
 * @param string $prelabel The previous link label.
 * @param string $nxtlabel The next link label.
 * @param int $pages_to_show Number of pages to display on the pagination. Default: 5.
 * @param bool $always_show Do you want to show the pagination always? Default: false.
 */
function geodir_pagination($before = '', $after = '', $prelabel = '', $nxtlabel = '', $pages_to_show = 5, $always_show = false)
{
    global $wp_query, $posts_per_page, $wpdb, $paged, $blog_id;
    if (empty($prelabel)) {
        $prelabel = '<strong>&laquo;</strong>';
    }
    if (empty($nxtlabel)) {
        $nxtlabel = '<strong>&raquo;</strong>';
    }
    $half_pages_to_show = round($pages_to_show / 2);
    if (geodir_is_page('home') || get_option('geodir_set_as_home') && is_home()) {
        // dont apply default  pagination for geodirectory home page.
        return;
    }
    if (!is_single()) {
        if (function_exists('geodir_location_geo_home_link')) {
            remove_filter('home_url', 'geodir_location_geo_home_link', 100000);
        }
        $numposts = $wp_query->found_posts;
        $max_page = ceil($numposts / $posts_per_page);
        if (empty($paged)) {
            $paged = 1;
        }
        if ($max_page > 1 || $always_show) {
            // Extra pagination info
            $geodir_pagination_more_info = get_option('geodir_pagination_advance_info');
            $start_no = ($paged - 1) * $posts_per_page + 1;
            $end_no = min($paged * $posts_per_page, $numposts);
            if ($geodir_pagination_more_info != '') {
                $pagination_info = '<div class="gd-pagination-details">' . wp_sprintf(__('Showing listings %d-%d of %d', 'geodirectory'), $start_no, $end_no, $numposts) . '</div>';
                if ($geodir_pagination_more_info == 'before') {
                    $before = $before . $pagination_info;
                } else {
                    if ($geodir_pagination_more_info == 'after') {
                        $after = $pagination_info . $after;
                    }
                }
            }
            echo "{$before} <div class='Navi'>";
            if ($paged >= $pages_to_show - 1) {
                echo '<a href="' . str_replace('&paged', '&amp;paged', get_pagenum_link()) . '">&laquo;</a>';
            }
            previous_posts_link($prelabel);
            for ($i = $paged - $half_pages_to_show; $i <= $paged + $half_pages_to_show; $i++) {
                if ($i >= 1 && $i <= $max_page) {
                    if ($i == $paged) {
                        echo "<strong class='on'>{$i}</strong>";
                    } else {
                        echo ' <a href="' . str_replace('&paged', '&amp;paged', get_pagenum_link($i)) . '">' . $i . '</a> ';
                    }
                }
            }
            next_posts_link($nxtlabel, $max_page);
            if ($paged + $half_pages_to_show < $max_page) {
                echo '<a href="' . str_replace('&paged', '&amp;paged', get_pagenum_link($max_page)) . '">&raquo;</a>';
            }
            echo "</div> {$after}";
        }
        if (function_exists('geodir_location_geo_home_link')) {
            add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2);
        }
    }
}
コード例 #13
0
ファイル: listing-preview.php プロジェクト: bangjojo/wp
            $post_term = explode(',', trim($post_term, ','));
        }
        $post_term = array_unique($post_term);
        if (!empty($post_term)) {
            foreach ($post_term as $post_term) {
                $post_term = trim($post_term);
                if ($post_term != '') {
                    $term = get_term_by('id', $post_term, $post_taxonomy);
                    $links[] = "<a href='" . esc_attr(get_term_link($term, $post_taxonomy)) . "'>{$term->name}</a>";
                    $terms[] = $term;
                }
            }
        }
        break;
    }
    $taxonomies[$post_taxonomy] = wp_sprintf('%s: %l.', ucwords($listing_label . ' Category'), $links, (object) $terms);
}
echo '<span class="geodir-category">' . $taxonomies[$post_taxonomy] . '</span>';
if (isset($taxonomies[$post_type . '_tags'])) {
    echo '<span class="geodir-tags">' . $taxonomies[$post_type . '_tags'] . '</span>';
}
?>
                </p>
                <!-- Post terms end -->
                <?php 
if ((int) get_option('geodir_disable_gb_modal') != 1) {
    ?>
                    <!-- Post info tabs start -->
                    <script type="text/javascript">
                        jQuery(function () {
                            jQuery('#post-gallery a').lightBox({
        /**
         * Display a notice at the bottom of the window when inside a shadow
         */
        public function render_shadow_indicator()
        {
            ?>
<style>#shadow-indicator { font-family: Arial, sans-serif; position: fixed; bottom: 0; left: 0; right: 0; width: 100%; color: #fff; background: #cc0000; z-index: 3000; font-size:16px; line-height: 1; text-align: center; padding: 5px } #shadow-indicator a.clearlink { text-decoration: underline; color: #fff; }</style>
<div id="shadow-indicator">
<?php 
            echo wp_sprintf(__('You are currently in %s.', 'wpp-instance-switcher'), getenv('WP_ENV'));
            ?>
 <a class="clearlink" href="/?wpp_shadow=clear"><?php 
            _e('Exit', 'wpp-instance-switcher');
            ?>
</a>
</div>
<?php 
        }
コード例 #15
0
ファイル: TAXONOMY.PHP プロジェクト: pauEscarcia/AIMM
/**
 * Retrieve all taxonomies associated with a post.
 *
 * This function can be used within the loop. It will also return an array of
 * the taxonomies with links to the taxonomy and name.
 *
 * @since 2.5.0
 *
 * @param int $post Optional. Post ID or will use Global Post ID (in loop).
 * @param array $args Override the defaults.
 * @return array
 */
function get_the_taxonomies($post = 0, $args = array() ) {
	$post = get_post( $post );

	$args = wp_parse_args( $args, array(
		'template' => '%s: %l.',
	) );
	extract( $args, EXTR_SKIP );

	$taxonomies = array();

	if ( !$post )
		return $taxonomies;

	foreach ( get_object_taxonomies($post) as $taxonomy ) {
		$t = (array) get_taxonomy($taxonomy);
		if ( empty($t['label']) )
			$t['label'] = $taxonomy;
		if ( empty($t['args']) )
			$t['args'] = array();
		if ( empty($t['template']) )
			$t['template'] = $template;

		$terms = get_object_term_cache($post->ID, $taxonomy);
		if ( false === $terms )
			$terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']);

		$links = array();

		foreach ( $terms as $term )
			$links[] = "<a href='" . esc_attr( get_term_link($term) ) . "'>$term->name</a>";

		if ( $links )
			$taxonomies[$taxonomy] = wp_sprintf($t['template'], $t['label'], $links, $terms);
	}
	return $taxonomies;
}
コード例 #16
0
function get_the_taxonomies($post = 0) {
	if ( is_int($post) )
		$post =& get_post($post);
	elseif ( !is_object($post) )
		$post =& $GLOBALS['post'];

	$taxonomies = array();

	if ( !$post )
		return $taxonomies;

	$template = apply_filters('taxonomy_template', '%s: %l.');

	foreach ( get_object_taxonomies($post) as $taxonomy ) {
		$t = (array) get_taxonomy($taxonomy);
		if ( empty($t['label']) )
			$t['label'] = $taxonomy;
		if ( empty($t['args']) )
			$t['args'] = array();
		if ( empty($t['template']) )
			$t['template'] = $template;

		$terms = get_object_term_cache($post->ID, $taxonomy);
		if ( empty($terms) )
			$terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']);

		$links = array();

		foreach ( $terms as $term )
			$links[] = "<a href='" . attribute_escape(get_term_link($term, $taxonomy)) . "'>$term->name</a>";

		if ( $links )
			$taxonomies[$taxonomy] = wp_sprintf($t['template'], $t['label'], $links, $terms);
	}
	return $taxonomies;
}
コード例 #17
0
/**
 * Retrieve all taxonomies associated with a post.
 *
 * This function can be used within the loop. It will also return an array of
 * the taxonomies with links to the taxonomy and name.
 *
 * @since 2.5.0
 *
 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
 * @param array $args {
 *     Optional. Arguments about how to format the list of taxonomies. Default empty array.
 *
 *     @type string $template      Template for displaying a taxonomy label and list of terms.
 *                                 Default is "Label: Terms."
 *     @type string $term_template Template for displaying a single term in the list. Default is the term name
 *                                 linked to its archive.
 * }
 * @return array List of taxonomies.
 */
function get_the_taxonomies($post = 0, $args = array())
{
    $post = get_post($post);
    $args = wp_parse_args($args, array('template' => __('%s: %l.'), 'term_template' => '<a href="%1$s">%2$s</a>'));
    $taxonomies = array();
    if (!$post) {
        return $taxonomies;
    }
    foreach (get_object_taxonomies($post) as $taxonomy) {
        $t = (array) get_taxonomy($taxonomy);
        if (empty($t['label'])) {
            $t['label'] = $taxonomy;
        }
        if (empty($t['args'])) {
            $t['args'] = array();
        }
        if (empty($t['template'])) {
            $t['template'] = $args['template'];
        }
        if (empty($t['term_template'])) {
            $t['term_template'] = $args['term_template'];
        }
        $terms = get_object_term_cache($post->ID, $taxonomy);
        if (false === $terms) {
            $terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']);
        }
        $links = array();
        foreach ($terms as $term) {
            $links[] = wp_sprintf($t['term_template'], esc_attr(get_term_link($term)), $term->name);
        }
        if ($links) {
            $taxonomies[$taxonomy] = wp_sprintf($t['template'], $t['label'], $links, $terms);
        }
    }
    return $taxonomies;
}
コード例 #18
0
ファイル: jetpack-seo.php プロジェクト: automattic/jetpack
 public function meta_tags()
 {
     global $wp_query;
     $period = '';
     $template = '';
     $meta = array();
     /**
      * Can be used to specify a list of themes that set their own meta tags.
      *
      * If current site is using one of the themes listed as conflicting, inserting Jetpack SEO
      * meta tags will be prevented.
      *
      * @module seo-tools
      *
      * @since 4.4.0
      *
      * @param array List of conflicted theme names. Defaults to empty array.
      */
     $conflicted_themes = apply_filters('jetpack_seo_meta_tags_conflicted_themes', array());
     if (isset($conflicted_themes[get_option('template')])) {
         return;
     }
     /**
      * Can be used to insert custom site host that will used for meta title.
      *
      * @module seo-tools
      *
      * @since 4.4.0
      *
      * @param string Name of the site host. Defaults to empty string.
      */
     $site_host = apply_filters('jetpack_seo_site_host', '');
     $meta['title'] = sprintf(_x('%1$s', 'Site Title', 'jetpack'), get_bloginfo('title'));
     if (!empty($site_host)) {
         $meta['title'] = sprintf(_x('%1$s on %2$s', 'Site Title on WordPress', 'jetpack'), get_bloginfo('title'), $site_host);
     }
     $front_page_meta = Jetpack_SEO_Utils::get_front_page_meta_description();
     $description = $front_page_meta ? $front_page_meta : get_bloginfo('description');
     $meta['description'] = trim($description);
     // Try to target things if we're on a "specific" page of any kind.
     if (is_singular()) {
         $meta['title'] = sprintf(_x('%1$s | %2$s', 'Post Title | Site Title on WordPress', 'jetpack'), get_the_title(), $meta['title']);
         // Business users can overwrite the description.
         if (!(is_front_page() && Jetpack_SEO_Utils::get_front_page_meta_description())) {
             $description = Jetpack_SEO_Posts::get_post_description(get_post());
             if ($description) {
                 $description = wp_trim_words(strip_shortcodes(wp_kses($description, array())));
                 $meta['description'] = $description;
             }
         }
     } elseif (is_author()) {
         $obj = get_queried_object();
         $meta['title'] = sprintf(_x('Posts by %1$s | %2$s', 'Posts by Author Name | Blog Title on WordPress', 'jetpack'), $obj->display_name, $meta['title']);
         $meta['description'] = sprintf(_x('Read all of the posts by %1$s on %2$s', 'Read all of the posts by Author Name on Blog Title', 'jetpack'), $obj->display_name, get_bloginfo('title'));
     } elseif (is_tag() || is_category() || is_tax()) {
         $obj = get_queried_object();
         $meta['title'] = sprintf(_x('Posts about %1$s on %2$s', 'Posts about Category on Blog Title', 'jetpack'), single_term_title('', false), get_bloginfo('title'));
         $description = get_term_field('description', $obj->term_id, $obj->taxonomy, 'raw');
         if (!is_wp_error($description) && '' != $description) {
             $meta['description'] = wp_trim_words($description);
         } else {
             $authors = $this->get_authors();
             $meta['description'] = wp_sprintf(_x('Posts about %1$s written by %2$l', 'Posts about Category written by John and Bob', 'jetpack'), single_term_title('', false), $authors);
         }
     } elseif (is_date()) {
         if (is_year()) {
             $period = get_query_var('year');
             $template = _nx('%1$s post published by %2$l in the year %3$s', '%1$s posts published by %2$l in the year %3$s', count($wp_query->posts), '10 posts published by John in the year 2012', 'jetpack');
         } elseif (is_month()) {
             $period = date('F Y', mktime(0, 0, 0, get_query_var('monthnum'), 1, get_query_var('year')));
             $template = _nx('%1$s post published by %2$l during %3$s', '%1$s posts published by %2$l during %3$s', count($wp_query->posts), '10 posts publishes by John during May 2012', 'jetpack');
         } elseif (is_day()) {
             $period = date('F j, Y', mktime(0, 0, 0, get_query_var('monthnum'), get_query_var('day'), get_query_var('year')));
             $template = _nx('%1$s post published by %2$l on %3$s', '%1$s posts published by %2$l on %3$s', count($wp_query->posts), '10 posts published by John on May 30, 2012', 'jetpack');
         }
         $meta['title'] = sprintf(_x('Posts from %1$s on %2$s', 'Posts from May 2012 on Blog Title', 'jetpack'), $period, get_bloginfo('title'));
         $authors = $this->get_authors();
         $meta['description'] = wp_sprintf($template, count($wp_query->posts), $authors, $period);
     }
     $custom_title = Jetpack_SEO_Titles::get_custom_title();
     if (!empty($custom_title)) {
         $meta['title'] = $custom_title;
     }
     /**
      * Can be used to edit the default SEO tools meta tags.
      *
      * @module seo-tools
      *
      * @since 4.4.0
      *
      * @param array Array that consists of meta name and meta content pairs.
      */
     $meta = apply_filters('jetpack_seo_meta_tags', $meta);
     // Output them
     foreach ($meta as $name => $content) {
         if (!empty($content)) {
             echo '<meta name="' . esc_attr($name) . '" content="' . esc_attr($content) . '" />' . "\n";
         }
     }
 }
コード例 #19
0
        /**
         * shows a notice to prompt the user to configure WP Safe Updates
         */
        public function not_configured_notice()
        {
            ?>
<div class="notice notice-warning is-dismissible">
  <?php 
            $configure_action = 'https://wordpress.org/plugins/wp-safe-updates/installation/';
            ?>
  <p><?php 
            echo wp_sprintf(__('WP Safe Updates is not yet active. Please <a href="%s" target="_blank">configure</a> it.', 'wp-safe-updates'), $configure_action);
            ?>
 <button type="button" class="notice-dismiss"></button></p>
</div>
<?php 
        }
コード例 #20
0
/**
 * Output link to the posts categories and tags.
 *
 * @global bool $preview True of on a preview page. False if not.
 * @global object $post The current post object.
 * @since 1.0.0
 * @package GeoDirectory
 */
function geodir_action_details_taxonomies()
{
    global $preview, $post;
    ?>
    <p class="geodir_post_taxomomies clearfix">
    <?php 
    $taxonomies = array();
    $is_backend_preview = is_single() && !empty($_REQUEST['post_type']) && !empty($_REQUEST['preview']) && !empty($_REQUEST['p']) && is_super_admin() ? true : false;
    // skip if preview from backend
    if ($preview && !$is_backend_preview) {
        $post_type = $post->listing_type;
        $post_taxonomy = $post_type . 'category';
        $post->{$post_taxonomy} = $post->post_category[$post_taxonomy];
    } else {
        $post_type = $post->post_type;
        $post_taxonomy = $post_type . 'category';
    }
    //{
    $post_type_info = get_post_type_object($post_type);
    $listing_label = $post_type_info->labels->singular_name;
    if (!empty($post->post_tags)) {
        if (taxonomy_exists($post_type . '_tags')) {
            $links = array();
            $terms = array();
            // to limit post tags
            $post_tags = trim($post->post_tags, ",");
            $post_id = isset($post->ID) ? $post->ID : '';
            /**
             * Filter the post tags.
             *
             * Allows you to filter the post tags output on the details page of a post.
             *
             * @since 1.0.0
             * @param string $post_tags A comma seperated list of tags.
             * @param int $post_id The current post id.
             */
            $post_tags = apply_filters('geodir_action_details_post_tags', $post_tags, $post_id);
            $post->post_tags = $post_tags;
            $post_tags = explode(",", trim($post->post_tags, ","));
            foreach ($post_tags as $post_term) {
                // fix slug creation order for tags & location
                $post_term = trim($post_term);
                $priority_location = false;
                if ($insert_term = term_exists($post_term, $post_type . '_tags')) {
                    $term = get_term_by('name', $post_term, $post_type . '_tags');
                } else {
                    $post_country = isset($_REQUEST['post_country']) && $_REQUEST['post_country'] != '' ? $_REQUEST['post_country'] : NULL;
                    $post_region = isset($_REQUEST['post_region']) && $_REQUEST['post_region'] != '' ? $_REQUEST['post_region'] : NULL;
                    $post_city = isset($_REQUEST['post_city']) && $_REQUEST['post_city'] != '' ? $_REQUEST['post_city'] : NULL;
                    $match_country = $post_country && sanitize_title($post_term) == sanitize_title($post_country) ? true : false;
                    $match_region = $post_region && sanitize_title($post_term) == sanitize_title($post_region) ? true : false;
                    $match_city = $post_city && sanitize_title($post_term) == sanitize_title($post_city) ? true : false;
                    if ($match_country || $match_region || $match_city) {
                        $priority_location = true;
                        $term = get_term_by('name', $post_term, $post_type . '_tags');
                    } else {
                        $insert_term = wp_insert_term($post_term, $post_type . '_tags');
                        $term = get_term_by('name', $post_term, $post_type . '_tags');
                    }
                }
                if (!is_wp_error($term) && is_object($term)) {
                    // fix tag link on detail page
                    if ($priority_location) {
                        $links[] = "<a href=''>{$post_term}</a>";
                    } else {
                        $links[] = "<a href='" . esc_attr(get_term_link($term->term_id, $term->taxonomy)) . "'>{$term->name}</a>";
                    }
                    $terms[] = $term;
                }
                //
            }
            if (!isset($listing_label)) {
                $listing_label = '';
            }
            $taxonomies[$post_type . '_tags'] = wp_sprintf('%s: %l', ucwords($listing_label . ' ' . __('Tags', GEODIRECTORY_TEXTDOMAIN)), $links, (object) $terms);
        }
    }
    if (!empty($post->{$post_taxonomy})) {
        $links = array();
        $terms = array();
        $termsOrdered = array();
        if (!is_array($post->{$post_taxonomy})) {
            $post_term = explode(",", trim($post->{$post_taxonomy}, ","));
        } else {
            $post_term = $post->{$post_taxonomy};
        }
        $post_term = array_unique($post_term);
        if (!empty($post_term)) {
            foreach ($post_term as $post_term) {
                $post_term = trim($post_term);
                if ($post_term != '') {
                    $term = get_term_by('id', $post_term, $post_taxonomy);
                    if (is_object($term)) {
                        $links[] = "<a href='" . esc_attr(get_term_link($term, $post_taxonomy)) . "'>{$term->name}</a>";
                        $terms[] = $term;
                    }
                }
            }
            // order alphabetically
            asort($links);
            foreach (array_keys($links) as $key) {
                $termsOrdered[$key] = $terms[$key];
            }
            $terms = $termsOrdered;
        }
        if (!isset($listing_label)) {
            $listing_label = '';
        }
        $taxonomies[$post_taxonomy] = wp_sprintf('%s: %l', ucwords($listing_label . ' ' . __('Category', GEODIRECTORY_TEXTDOMAIN)), $links, (object) $terms);
    }
    if (isset($taxonomies[$post_taxonomy])) {
        echo '<span class="geodir-category">' . $taxonomies[$post_taxonomy] . '</span>';
    }
    if (isset($taxonomies[$post_type . '_tags'])) {
        echo '<span class="geodir-tags">' . $taxonomies[$post_type . '_tags'] . '</span>';
    }
    ?>
    </p><?php 
}
コード例 #21
0
ファイル: settings-page.php プロジェクト: jimlongo56/rdiv
 private function unlicense_packages($data)
 {
     check_admin_referer('unlicense_packages', 'ithemes_updater_nonce');
     if (empty($data['username']) && empty($data['password'])) {
         $this->errors[] = __('You must supply an iThemes membership username and password in order to remove licenses.', 'it-l10n-ithemes-sync');
     } else {
         if (empty($data['username'])) {
             $this->errors[] = __('You must supply an iThemes membership username in order to remove licenses.', 'it-l10n-ithemes-sync');
         } else {
             if (empty($data['password'])) {
                 $this->errors[] = __('You must supply an iThemes membership password in order to remove licenses.', 'it-l10n-ithemes-sync');
             } else {
                 if (empty($data['packages'])) {
                     $this->errors[] = __('You must select at least one license to remove. Ensure that you select the licenses that you wish to remove in the listing below.', 'it-l10n-ithemes-sync');
                 }
             }
         }
     }
     if (!empty($this->errors)) {
         return;
     }
     $response = Ithemes_Updater_API::deactivate_package($data['username'], $data['password'], $data['packages']);
     if (is_wp_error($response)) {
         $this->errors[] = $this->get_error_explanation($response);
         return;
     }
     if (empty($response['packages'])) {
         $this->errors[] = __('An unknown server error occurred. Please try to remove licenses from your products again at another time.', 'it-l10n-ithemes-sync');
         return;
     }
     uksort($response['packages'], 'strnatcasecmp');
     $success = array();
     $fail = array();
     foreach ($response['packages'] as $package => $data) {
         if (preg_match('/ \\|\\|\\| \\d+$/', $package)) {
             continue;
         }
         $name = Ithemes_Updater_Functions::get_package_name($package);
         if (isset($data['status']) && 'inactive' == $data['status']) {
             $success[] = $name;
         } else {
             if (isset($data['error']) && isset($data['error']['message'])) {
                 $fail[$name] = $data['error']['message'];
             } else {
                 $fail[$name] = __('Unknown server error.', 'it-l10n-ithemes-sync');
             }
         }
     }
     if (!empty($success)) {
         $this->messages[] = wp_sprintf(_n('Successfully removed license from %l.', 'Successfully removed licenses from %l.', count($success), 'it-l10n-ithemes-sync'), $success);
     }
     if (!empty($fail)) {
         foreach ($fail as $name => $reason) {
             $this->errors[] = sprintf(__('Unable to remove license from %1$s. Reason: %2$s', 'it-l10n-ithemes-sync'), $name, $reason);
         }
     }
 }
コード例 #22
0
/**
 * Fires to add javascript variable to use in google map.
 *
 * @since 1.0.0
 */
do_action('geodir_add_listing_geocode_js_vars');
?>
            <?php 
if ($is_map_restrict) {
    ?>
            if (getCity.toLowerCase() != '<?php 
    echo geodir_strtolower(addslashes_gpc($city));
    ?>
') {
                alert('<?php 
    echo addslashes_gpc(wp_sprintf(__('Please choose any address of the (%s) city only.', 'geodirectory'), $city));
    ?>
');
                jQuery("#<?php 
    echo $prefix . 'map';
    ?>
").goMap();
                jQuery.goMap.map.setCenter(new google.maps.LatLng('<?php 
    echo $default_lat;
    ?>
', '<?php 
    echo $default_lng;
    ?>
'));
                baseMarker.setPosition(new google.maps.LatLng('<?php 
    echo $default_lat;
コード例 #23
0
        ?>
</strong></td>
						<td align="left">
							<select name="extra[gd_file_types][]" id="gd_file_types" multiple="multiple" style="height:100px;width:90%;">
								<option value="*" <?php 
        selected(true, in_array('*', $gd_file_types));
        ?>
><?php 
        _e('All types', GEODIRECTORY_TEXTDOMAIN);
        ?>
</option>
								<?php 
        foreach ($allowed_file_types as $format => $types) {
            ?>
								<optgroup label="<?php 
            echo esc_attr(wp_sprintf(__('%s formats', GEODIRECTORY_TEXTDOMAIN), __($format, GEODIRECTORY_TEXTDOMAIN)));
            ?>
">
									<?php 
            foreach ($types as $ext => $type) {
                ?>
									<option value="<?php 
                echo esc_attr($ext);
                ?>
" <?php 
                selected(true, in_array($ext, $gd_file_types));
                ?>
><?php 
                echo '.' . $ext;
                ?>
</option>
コード例 #24
0
ファイル: reviews.php プロジェクト: poweronio/mbsite
 * @package WordPress
 * @subpackage Twenty_Twelve
 * @since Twenty Twelve 1.0
 */
/*
 * If the current post is protected by a password and
 * the visitor has not yet entered the password we will
 * return early without loading the comments.
 */
?>
<div id="comments" class="comments-area gdbp-comments-area">
    <a class="fav-add-more" href="http://mannabliss.com/<?php 
echo wp_sprintf(__('%s', GDBUDDYPRESS_TEXTDOMAIN), $post_type);
?>
"><?php 
echo wp_sprintf(__('Add %s', GDBUDDYPRESS_TEXTDOMAIN), $post_type_name);
?>
</a>
  <?php 
// You can start editing here -- including this comment!
?>
  <?php 
if (have_comments()) {
    ?>
  <ol class="commentlist">
    <?php 
    $callback = apply_filters('geodir_buddypress_comment_callback', 'geodir_buddypress_comment');
    wp_list_comments(array('callback' => $callback, 'style' => 'ol'));
    ?>
  </ol>
  <!-- .commentlist -->
コード例 #25
0
ファイル: credits.php プロジェクト: easinewe/Avec2016
         $title = translate($group_data['name']);
     }
     echo '<h4 class="wp-people-group">' . $title . "</h4>\n";
 }
 if (!empty($group_data['shuffle'])) {
     shuffle($group_data['data']);
 }
 // We were going to sort by ability to pronounce "hierarchical," but that wouldn't be fair to Matt.
 switch ($group_data['type']) {
     case 'list':
         array_walk($group_data['data'], '_wp_credits_add_profile_link', $credits['data']['profiles']);
         echo '<p class="wp-credits-list">' . wp_sprintf('%l.', $group_data['data']) . "</p>\n\n";
         break;
     case 'libraries':
         array_walk($group_data['data'], '_wp_credits_build_object_link');
         echo '<p class="wp-credits-list">' . wp_sprintf('%l.', $group_data['data']) . "</p>\n\n";
         break;
     default:
         $compact = 'compact' == $group_data['type'];
         $classes = 'wp-people-group ' . ($compact ? 'compact' : '');
         echo '<ul class="' . $classes . '" id="wp-people-group-' . $group_slug . '">' . "\n";
         foreach ($group_data['data'] as $person_data) {
             echo '<li class="wp-person" id="wp-person-' . $person_data[2] . '">' . "\n\t";
             echo '<a href="' . sprintf($credits['data']['profiles'], $person_data[2]) . '">';
             $size = 'compact' == $group_data['type'] ? '30' : '60';
             echo '<img src="' . $gravatar . $person_data[1] . '?s=' . $size . '" class="gravatar" alt="' . esc_attr($person_data[0]) . '" /></a>' . "\n\t";
             echo '<a class="web" href="' . sprintf($credits['data']['profiles'], $person_data[2]) . '">' . $person_data[0] . "</a>\n\t";
             if (!$compact) {
                 echo '<span class="title">' . translate($person_data[3]) . "</span>\n";
             }
             echo "</li>\n";
コード例 #26
0
ファイル: taxonomy.php プロジェクト: fka2004/webkit
/**
 * Retrieve all taxonomies associated with a post.
 *
 * This function can be used within the loop. It will also return an array of
 * the taxonomies with links to the taxonomy and name.
 *
 * @since 2.5.0
 *
 * @param int $post Optional. Post ID or will use Global Post ID (in loop).
 * @param array $args Override the defaults.
 * @return array
 */
function get_the_taxonomies($post = 0, $args = array())
{
    if (is_int($post)) {
        $post =& get_post($post);
    } elseif (!is_object($post)) {
        $post =& $GLOBALS['post'];
    }
    $args = wp_parse_args($args, array('template' => '%s: %l.'));
    extract($args, EXTR_SKIP);
    $taxonomies = array();
    if (!$post) {
        return $taxonomies;
    }
    foreach (get_object_taxonomies($post) as $taxonomy) {
        $t = (array) get_taxonomy($taxonomy);
        if (empty($t['label'])) {
            $t['label'] = $taxonomy;
        }
        if (empty($t['args'])) {
            $t['args'] = array();
        }
        if (empty($t['template'])) {
            $t['template'] = $template;
        }
        $terms = get_object_term_cache($post->ID, $taxonomy);
        if (empty($terms)) {
            $terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']);
        }
        $links = array();
        foreach ($terms as $term) {
            $links[] = "<a href='" . esc_attr(get_term_link($term)) . "'>{$term->name}</a>";
        }
        if ($links) {
            $taxonomies[$taxonomy] = wp_sprintf($t['template'], $t['label'], $links, $terms);
        }
    }
    return $taxonomies;
}
コード例 #27
0
function jetpack_shortcodes_more_info()
{
    ?>
	<div class="jp-info-img">
		<a href="http://en.support.wordpress.com/shortcodes/">
			<img class="jp-info-img" src="<?php 
    echo plugins_url(basename(dirname(dirname(__FILE__))) . '/images/screenshots/shortcodes.jpg');
    ?>
" alt="<?php 
    esc_attr_e('Shortcode Embeds', 'jetpack');
    ?>
" width="300" height="150" />
		</a>
	</div>

	<p><?php 
    esc_html_e('Shortcodes allow you to easily and safely embed media from other places in your site. With just one simple code, you can tell WordPress to embed YouTube, Flickr, and other media.', 'jetpack');
    ?>
</p>
	<p><?php 
    esc_html_e('Enter a shortcode directly into the Post/Page editor to embed media. For specific instructions follow the links below.', 'jetpack');
    ?>
</p>
	<?php 
    $codes = array('archives' => 'http://support.wordpress.com/archives-shortcode/', 'bandcamp' => 'http://en.support.wordpress.com/audio/bandcamp/', 'blip.tv' => 'http://support.wordpress.com/videos/bliptv/', 'dailymotion' => 'http://support.wordpress.com/videos/dailymotion/', 'facebook' => 'http://en.support.wordpress.com/facebook-integration/facebook-embeds/', 'flickr' => 'http://support.wordpress.com/videos/flickr-video/', 'gist' => 'http://en.support.wordpress.com/gist/', 'googlemaps' => 'http://support.wordpress.com/google-maps/', 'instagram' => 'https://en.support.wordpress.com/instagram/instagram-images/', 'jetpack_subscription_form' => 'http://jetpack.me/support/subscriptions/#display', 'polldaddy' => 'http://support.polldaddy.com/wordpress-shortcodes/', 'presentation' => 'http://en.support.wordpress.com/presentations/', 'recipes' => 'http://en.support.wordpress.com/recipes/', 'scribd' => 'http://support.wordpress.com/scribd/', 'slideshare' => 'http://support.wordpress.com/slideshows/slideshare/', 'slideshow' => 'http://en.support.wordpress.com/slideshows/', 'soundcloud' => 'http://support.wordpress.com/audio/soundcloud-audio-player/', 'ted' => 'http://en.support.wordpress.com/videos/ted-talks/', 'twitter-timeline' => 'http://en.support.wordpress.com/widgets/twitter-timeline-widget/#embedding-with-a-shortcode', 'vimeo' => 'http://support.wordpress.com/videos/vimeo/', 'vine' => 'http://en.support.wordpress.com/videos/vine/', 'youtube' => 'http://support.wordpress.com/videos/youtube/');
    $codes['wpvideo (VideoPress)'] = 'http://en.support.wordpress.com/videopress/';
    $available = '';
    foreach ($codes as $code => $url) {
        $available[] = '<a href="' . $url . '" target="_blank">[' . $code . ']</a>';
    }
    ?>
	<p><?php 
    echo wp_sprintf(esc_html__('Available shortcodes are: %l.', 'jetpack'), $available);
    ?>
</p>
<?php 
}
コード例 #28
0
    /**
     * Custom taxonomy walker function.
     *
     * @since 1.0.0
     * @package GeoDirectory
     * @global object $post WordPress Post object.
     * @param string $cat_taxonomy The taxonomy name.
     * @param string $cat_limit Number of categories to display.
     */
    function geodir_custom_taxonomy_walker2($cat_taxonomy, $cat_limit = '')
    {
        $post_category = '';
        $post_category_str = '';
        global $exclude_cats;
        $cat_exclude = '';
        if (is_array($exclude_cats) && !empty($exclude_cats)) {
            $cat_exclude = serialize($exclude_cats);
        }
        if (isset($_REQUEST['backandedit'])) {
            $post = (object) unserialize($_SESSION['listing']);
            if (!is_array($post->post_category[$cat_taxonomy])) {
                $post_category = $post->post_category[$cat_taxonomy];
            }
            $post_categories = $post->post_category_str;
            if (!empty($post_categories) && array_key_exists($cat_taxonomy, $post_categories)) {
                $post_category_str = $post_categories[$cat_taxonomy];
            }
        } elseif (geodir_is_page('add-listing') && isset($_REQUEST['pid']) && $_REQUEST['pid'] != '' || is_admin()) {
            global $post;
            $post_category = geodir_get_post_meta($post->ID, $cat_taxonomy, true);
            if (empty($post_category) && isset($post->{$cat_taxonomy})) {
                $post_category = $post->{$cat_taxonomy};
            }
            $post_categories = get_post_meta($post->ID, 'post_categories', true);
            if (empty($post_category) && !empty($post_categories) && !empty($post_categories[$cat_taxonomy])) {
                foreach (explode(",", $post_categories[$cat_taxonomy]) as $cat_part) {
                    if (is_numeric($cat_part)) {
                        $cat_part_arr[] = $cat_part;
                    }
                }
                if (is_array($cat_part_arr)) {
                    $post_category = implode(',', $cat_part_arr);
                }
            }
            if (!empty($post_category)) {
                $cat1 = array_filter(explode(',', $post_category));
                $post_category = ',' . implode(',', $cat1) . ',';
            }
            if ($post_category != '' && is_array($exclude_cats) && !empty($exclude_cats)) {
                $post_category_upd = explode(',', $post_category);
                $post_category_change = '';
                foreach ($post_category_upd as $cat) {
                    if (!in_array($cat, $exclude_cats) && $cat != '') {
                        $post_category_change .= ',' . $cat;
                    }
                }
                $post_category = $post_category_change;
            }
            if (!empty($post_categories) && array_key_exists($cat_taxonomy, $post_categories)) {
                $post_category_str = $post_categories[$cat_taxonomy];
            }
        }
        echo '<input type="hidden" id="cat_limit" value="' . $cat_limit . '" name="cat_limit[' . $cat_taxonomy . ']"  />';
        echo '<input type="hidden" id="post_category" value="' . $post_category . '" name="post_category[' . $cat_taxonomy . ']"  />';
        echo '<input type="hidden" id="post_category_str" value="' . $post_category_str . '" name="post_category_str[' . $cat_taxonomy . ']"  />';
        ?>
        <div class="cat_sublist">
            <?php 
        $post_id = isset($post->ID) ? $post->ID : '';
        if ((geodir_is_page('add-listing') || is_admin()) && !empty($post_categories[$cat_taxonomy])) {
            geodir_editpost_categories_html($cat_taxonomy, $post_id, $post_categories);
        }
        ?>
        </div>
        <script type="text/javascript">

            function show_subcatlist(main_cat, catObj) {
                if (main_cat != '') {
					var url = '<?php 
        echo geodir_get_ajax_url();
        ?>
';
                    var cat_taxonomy = '<?php 
        echo $cat_taxonomy;
        ?>
';
                    var cat_exclude = '<?php 
        echo base64_encode($cat_exclude);
        ?>
';
                    var cat_limit = jQuery('#' + cat_taxonomy).find('#cat_limit').val();
					<?php 
        if ((int) $cat_limit > 0) {
            ?>
					var selected = parseInt(jQuery('#' + cat_taxonomy).find('.cat_sublist > div.post_catlist_item').length);
					if (cat_limit != '' && selected > 0 && selected >= cat_limit && cat_limit != 0) {
						alert("<?php 
            echo esc_attr(wp_sprintf(__('You have reached category limit of %d categories.', 'geodirectory'), (int) $cat_limit));
            ?>
");
						return false;
					}
					<?php 
        }
        ?>
                    jQuery.post(url, {
                        geodir_ajax: 'category_ajax',
                        cat_tax: cat_taxonomy,
                        main_catid: main_cat,
                        exclude: cat_exclude
                    }, function (data) {
                        if (data != '') {
                            jQuery('#' + cat_taxonomy).find('.cat_sublist').append(data);

                            setTimeout(function () {
                                jQuery('#' + cat_taxonomy).find('.cat_sublist').find('.chosen_select').chosen();
                            }, 200);


                        }
                        maincat_obj = jQuery('#' + cat_taxonomy).find('.main_cat_list');

                        if (cat_limit != '' && jQuery('#' + cat_taxonomy).find('.cat_sublist .chosen_select').length >= cat_limit) {
                            maincat_obj.find('.chosen_select').chosen('destroy');
                            maincat_obj.hide();
                        } else {
                            maincat_obj.show();
                            maincat_obj.find('.chosen_select').chosen('destroy');
                            maincat_obj.find('.chosen_select').prop('selectedIndex', 0);
                            maincat_obj.find('.chosen_select').chosen();
                        }

                        update_listing_cat();

                    });
                }
                update_listing_cat();
            }

            function update_listing_cat(el) {
                var cat_taxonomy = '<?php 
        echo $cat_taxonomy;
        ?>
';
                var cat_ids = '';
                var main_cat = '';
                var sub_cat = '';
                var post_cat_str = '';
                var cat_limit = jQuery('#' + cat_taxonomy).find('#cat_limit').val();
				
				var delEl = jQuery(el).closest('.post_catlist_item').find('input.listing_main_cat');
				if (typeof el != 'undefined' && jQuery(delEl).val()) {
					jQuery('.geodir_taxonomy_field').find('select > option[_hc="f"][value="'+jQuery(delEl).val()+'"]').attr('disabled', false);
				}
				jQuery('.geodir_taxonomy_field').find('input.listing_main_cat:checked').each(function() {
					var cV = jQuery(this).val();
					if (parseInt(cV) > 0) {
						jQuery('.geodir_taxonomy_field').find('select > option[_hc="f"][value="'+cV+'"]').attr('disabled', true);
					}
				});

                jQuery('#' + cat_taxonomy).find('.cat_sublist > div').each(function () {
                    main_cat = jQuery(this).find('.listing_main_cat').val();

                    if (jQuery(this).find('.chosen_select').length > 0)
                        sub_cat = jQuery(this).find('.chosen_select').val()

                    if (post_cat_str != '')
                        post_cat_str = post_cat_str + '#';

                    post_cat_str = post_cat_str + main_cat;

                    if (jQuery(this).find('.listing_main_cat').is(':checked')) {
                        cat_ids = cat_ids + ',' + main_cat;
                        post_cat_str = post_cat_str + ',y';

                        if (jQuery(this).find('.post_default_category input').is(':checked'))
                            post_cat_str = post_cat_str + ',d';

                    } else {
                        post_cat_str = post_cat_str + ',n';
                    }

                    if (sub_cat != '' && sub_cat) {
                        cat_ids = cat_ids + ',' + sub_cat;
                        post_cat_str = post_cat_str + ':' + sub_cat;
                    } else {
                        post_cat_str = post_cat_str + ':';
                    }

                });

                maincat_obj = jQuery('#' + cat_taxonomy).find('.main_cat_list');
                if (cat_limit != '' && jQuery('#' + cat_taxonomy).find('.cat_sublist > div.post_catlist_item').length >= cat_limit && cat_limit != 0) {
                    maincat_obj.find('.chosen_select').chosen('destroy');
                    maincat_obj.hide();
                } else {
                    maincat_obj.show();
                    maincat_obj.find('.chosen_select').chosen('destroy');
                    maincat_obj.find('.chosen_select').prop('selectedIndex', 0);
                    maincat_obj.find('.chosen_select').chosen();
                }

                maincat_obj.find('.chosen_select').trigger("chosen:updated");
                jQuery('#' + cat_taxonomy).find('#post_category').val(cat_ids);
                jQuery('#' + cat_taxonomy).find('#post_category_str').val(post_cat_str);
            }
            jQuery(function () {
                update_listing_cat();
            })


        </script>
        <?php 
        if (!empty($post_categories) && array_key_exists($cat_taxonomy, $post_categories)) {
            $post_cat_str = $post_categories[$cat_taxonomy];
            $post_cat_array = explode("#", $post_cat_str);
            if (count($post_cat_array) >= $cat_limit && $cat_limit != 0) {
                $style = "display:none;";
            }
        }
        ?>
        <div class="main_cat_list" style=" <?php 
        if (isset($style)) {
            echo $style;
        }
        ?>
 ">
            <?php 
        geodir_get_catlist($cat_taxonomy, 0);
        // print main categories list
        ?>
        </div>
    <?php 
    }
コード例 #29
0
    function admin_notices()
    {
        if ($this->error) {
            ?>
<div id="message" class="jetpack-message jetpack-err">
	<div class="squeezer">
		<h4><?php 
            echo wp_kses($this->error, array('code' => true, 'strong' => true, 'br' => true, 'b' => true));
            ?>
</h4>
<?php 
            if ($desc = Jetpack::state('error_description')) {
                ?>
		<p><?php 
                echo esc_html(stripslashes($desc));
                ?>
</p>
<?php 
            }
            ?>
	</div>
</div>
<?php 
        }
        if ($this->message) {
            ?>
<div id="message" class="jetpack-message">
	<div class="squeezer">
		<h4><?php 
            echo wp_kses($this->message, array('strong' => array(), 'a' => array('href' => true), 'br' => true));
            ?>
</h4>
	</div>
</div>
<?php 
        }
        if ($this->privacy_checks) {
            $module_names = $module_slugs = array();
            $privacy_checks = explode(',', $this->privacy_checks);
            foreach ($privacy_checks as $module_slug) {
                $module = Jetpack::get_module($module_slug);
                if (!$module) {
                    continue;
                }
                $module_slugs[] = $module_slug;
                $module_names[] = "<strong>{$module['name']}</strong>";
            }
            $module_slugs = join(',', $module_slugs);
            ?>
<div id="message" class="jetpack-message jetpack-err">
	<div class="squeezer">
		<h4><strong><?php 
            esc_html_e('Is this site private?', 'jetpack');
            ?>
</strong></h4><br />
		<p><?php 
            echo wp_kses(wptexturize(wp_sprintf(_nx("Like your site's RSS feeds, %l allows access to your posts and other content to third parties.", "Like your site's RSS feeds, %l allow access to your posts and other content to third parties.", count($privacy_checks), '%l = list of Jetpack module/feature names', 'jetpack'), $module_names)), array('strong' => true));
            echo "\n<br />\n";
            echo wp_kses(sprintf(_nx('If your site is not publicly accessible, consider <a href="%1$s" title="%2$s">deactivating this feature</a>.', 'If your site is not publicly accessible, consider <a href="%1$s" title="%2$s">deactivating these features</a>.', count($privacy_checks), '%1$s = deactivation URL, %2$s = "Deactivate {list of Jetpack module/feature names}', 'jetpack'), wp_nonce_url(Jetpack::admin_url(array('page' => 'jetpack', 'action' => 'deactivate', 'module' => urlencode($module_slugs))), "jetpack_deactivate-{$module_slugs}"), esc_attr(wp_kses(wp_sprintf(_x('Deactivate %l', '%l = list of Jetpack module/feature names', 'jetpack'), $module_names), array()))), array('a' => array('href' => true, 'title' => true)));
            ?>
</p>
	</div>
</div>
<?php 
        }
    }
コード例 #30
0
 function add_content()
 {
     $locale = get_locale();
     if (is_multisite() && is_plugin_active_for_network(plugin_basename(__FILE__))) {
         $value = get_site_option(FB_WM_TEXTDOMAIN);
     } else {
         $value = get_option(FB_WM_TEXTDOMAIN);
     }
     $echo = NULL;
     // default for unit
     if (!isset($value['unit'])) {
         $value['unit'] = NULL;
     }
     $unitvalues = $this->case_unit($value['unit']);
     $td = $this->check_datetime();
     if (isset($value['radio']) && 1 === $value['radio'] && 0 !== $td[2]) {
         $echodate = $td[0][0];
         if ('de_DE' == $locale) {
             $echodate = str_replace('-', '.', $td[0][0]);
         }
         if (0 !== $td[1]) {
             $echodate .= ' ' . $td[0][1];
         }
         $echo = wp_sprintf(stripslashes_deep($value['text']), '<br /><span id="countdown"></span>', $echodate);
     } elseif (isset($value['text'])) {
         if (!isset($value['time']) || 0 == $value['time']) {
             $value['time'] = FALSE;
         }
         if (!isset($unitvalues['unit'])) {
             $unitvalues['unit'] = FALSE;
         }
         $echo = wp_sprintf(stripslashes_deep($value['text']), $value['time'], $unitvalues['unit']);
     }
     echo do_shortcode($echo);
 }