sanya_lampard: а при открытии в исходном коде, вид был бы вот таким,
<html><head></head></html>
Вопрос: зачем?
Хотите понизить читаемость для кого-то? Это глупо, ибо есть куча инструментов в нете, которые сделают ваш код полностью читаемым -- с табуляциями, показывающими структуру.
exarh, можно самому написать, не? Не плагин, а скриптик, который бы выудил из базы все *.jpg( + *.png + .etc), а затем удалить все файлы, которые не нашлись в БД.
// These ones should just be omitted altogether if they are blank foreach ( array( 'loop', 'autoplay', 'preload' ) as $a ) { if ( empty( $atts[$a] ) ) unset( $atts[$a] ); }
/** * Return a filtered list of WP-supported video formats * * @since 3.6.0 * @return array */ function wp_get_video_extensions() { return apply_filters( 'wp_video_extensions', array( 'mp4', 'm4v', 'webm', 'ogv', 'wmv', 'flv' ) ); }
/** * The Video shortcode. * * This implements the functionality of the Video Shortcode for displaying * WordPress mp4s in a post. * * @since 3.6.0 * * @param array $attr Attributes of the shortcode. * @param string $content Optional. Shortcode content. * @return string HTML content to display video. */ function wp_video_shortcode( $attr, $content = '' ) { global $content_width; $post_id = get_post() ? get_the_ID() : 0;
static $instances = 0; $instances++;
/** * Override the default video shortcode. * * @since 3.7.0 * * @param null Empty variable to be replaced with shortcode markup. * @param array $attr Attributes of the shortcode. * @param string $content Shortcode content. * @param int $instances Unique numeric ID of this video shortcode instance. */ $html = apply_filters( 'wp_video_shortcode_override', '', $attr, $content, $instances ); if ( '' !== $html ) return $html;
// These ones should just be omitted altogether if they are blank foreach ( array( 'poster', 'loop', 'autoplay', 'preload' ) as $a ) { if ( empty( $atts[$a] ) ) unset( $atts[$a] ); }
/**
* The Caption shortcode.
*
* Allows a plugin to replace the content that would otherwise be returned. The
* filter is 'img_caption_shortcode' and passes an empty string, the attr
* parameter and the content parameter values.
*
* The supported attributes for the shortcode are 'id', 'align', 'width', and
* 'caption'.
*
* @since 2.6.0
*
* @param array $attr Attributes attributed to the shortcode.
* @param string $content Optional. Shortcode content.
* @return string
*/
function img_caption_shortcode($attr, $content = null) {
// New-style shortcode with the caption inside the shortcode with the link and image tags.
if ( ! isset( $attr['caption'] ) ) {
if ( preg_match( '#((?:<a [^>]+>\s*)?<img [^>]+>(?:\s*</a>)?)(.*)#is', $content, $matches ) ) {
$content = $matches[1];
$attr['caption'] = trim( $matches[2] );
}
}
// Allow plugins/themes to override the default caption template.
$output = apply_filters('img_caption_shortcode', '', $attr, $content);
if ( $output != '' )
return $output;
/**
* Filter the width of an image's caption.
*
* By default, the caption is 10 pixels greater than the width of the image,
* to prevent post content from running up against a floated image.
*
* @since 3.7.0 *
* @param int $caption_width Width in pixels. To remove this inline style, return zero.
* @param array $atts {
* The attributes of the caption shortcode.
*
* @type string 'id' The ID of the div element for the caption.
* @type string 'align' The class name that aligns the caption. Default 'alignnone'.
* @type int 'width' The width of the image being captioned.
* @type string 'caption' The image's caption.
* }
* @param string $content The image element, possibly wrapped in a hyperlink.
*/
$caption_width = apply_filters( 'img_caption_shortcode_width', $caption_width, $atts, $content );
siv1987, огромное спасибо за ответ!
Но что-то у меня не получается... :)
Делаю так:
Ничего не возвращает... Что я делаю не так?
а при открытии в исходном коде, вид был бы вот таким,
<html><head></head></html>
Вопрос: зачем?
Хотите понизить читаемость для кого-то? Это глупо, ибо есть куча инструментов в нете, которые сделают ваш код полностью читаемым -- с табуляциями, показывающими структуру.
Только самому написать несложный JS код (используя тот же JQuery).
В самом JQueryUI Slider этого не предусмотрено.
Фикс: http://core.trac.wordpress.org/attac...0/25700-1.diff
то что розовым - убрать, зеленым - вставить
Тоже будет в 371, так что в данном случае можно править в файлах двига.
Если поправить _src файл JS, то ничего не изменится, так как минифицированная версия скрипта грузится. ;)
Там же, в тикете, пишут о двух других решениях проблемы с уже установленным обновлением ВП 3.7:
1. Вроде как, использование Tiny MCE Advanced убирает этот глюк. (щас проверю -- отпишусь).
-- UPDATE: проверено -- лично у меня проблему не решило.
2. Можно скачать отсюда уже исправленный и подготовленный (минификация, сжатие) файл JS и заменить у себя (в wp-includes\js\tinymce): http://core.svn.wordpress.org/branches/3.7/wp-includes/js/tinymce/wp-tinymce.js.gz
-- UPDATE: проверено -- работает.
Что-то я не нашёл, где в админке контролируются параметры автоматических апдейтов. Или только хардкодить переменные?
exarh, можно самому написать, не? Не плагин, а скриптик, который бы выудил из базы все *.jpg( + *.png + .etc), а затем удалить все файлы, которые не нашлись в БД.
А как у него узнать?
И в каком состоянии надо быть для этого?
Аудио- и видео-шорткоды (не от слова "шорты", а от слова "short"🤪 ) теперь легко кастомайзить (добавили фильтры для них):
Всё в том же media.php находится.
Очень похоже что эта цифра - это ширина картинки +10000 px
Именно!
----------
Ещё вот этот полезный фильтр добавили: ajax_query_attachments_args
-------
Тоже приятная возможность: http://wphooks.info/filters/posts_search_orderby/
Обновился на 3.7. Интересно столкнулся еще кто то с такой проблемой?
Есть такая фича, если пишешь описание к фото - вокруг нее появляется рамка серенькая и текст под фото (wp-caption).
Да, та же фигня, но у меня 10300пикс. Было бы веселее со 100500 :D
Походу, JS косячит, ибо в инлайн стайле:
---------- Добавлено 25.10.2013 в 22:12 ----------
Изменения внесены только в файлы readme.html и wp-config-sample.php,
Такого не может быть -- 100%.
Добавлено куча всего.
---------- Добавлено 25.10.2013 в 22:19 ----------
Для себя выделил вот такие маленькие вкусности в версии 3.7, упрощающие кастомайз ВордПресса:
img_caption_shortcode_width
Находится в \wp-includes\media.php
Щас ещё напишу, ждём. :D
Поменяйте свойство "background: url('../image/grid_view_icon_active.png') 6px 0 no-repeat;"
на "background: url('../image/grid_view_icon_active.png') 0 0 no-repeat;"
Верно.
Ещё бы я посоветовал ТС не грузить отдельно мелкие картинки подобные сабжевым, а использовать спрайты. На будущее.