Changeset 3486789
- Timestamp:
- 03/19/2026 07:27:57 PM (2 weeks ago)
- Location:
- sdaweb-social-galleri-feed/trunk
- Files:
-
- 4 edited
-
assets/js/block-editor.asset.php (modified) (1 diff)
-
assets/js/block-editor.js (modified) (6 diffs)
-
includes/class-api-handler.php (modified) (1 diff)
-
sdaweb-social-galleri-feed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sdaweb-social-galleri-feed/trunk/assets/js/block-editor.asset.php
r3483261 r3486789 2 2 // Asset dependencies for the block editor script (no build step). 3 3 return array( 4 'dependencies' => array( 'wp-blocks', 'wp-element', 'wp-block-editor', 'wp-components', 'wp-server-side-render' ),5 'version' => defined( 'SDAWSOGA_VERSION' ) ? SDAWSOGA_VERSION : '4.10. 0',4 'dependencies' => array( 'wp-blocks', 'wp-element', 'wp-block-editor', 'wp-components', 'wp-server-side-render', 'wp-i18n' ), 5 'version' => defined( 'SDAWSOGA_VERSION' ) ? SDAWSOGA_VERSION : '4.10.1', 6 6 ); -
sdaweb-social-galleri-feed/trunk/assets/js/block-editor.js
r3483261 r3486789 5 5 * No build step required — uses wp.element.createElement directly. 6 6 */ 7 (function(blocks, element, blockEditor, components, serverSideRender ) {7 (function(blocks, element, blockEditor, components, serverSideRender, i18n) { 8 8 var el = element.createElement; 9 var __ = i18n.__; 9 10 var InspectorControls = blockEditor.InspectorControls; 10 11 var PanelBody = components.PanelBody; … … 21 22 return el(element.Fragment, null, 22 23 el(InspectorControls, null, 23 el(PanelBody, { title: 'Feed Settings', initialOpen: true },24 el(PanelBody, { title: __('Feed Settings', 'sdaweb-social-galleri-feed'), initialOpen: true }, 24 25 el(TextControl, { 25 label: 'Feed ID',26 help: 'Unique identifier for this feed instance.',26 label: __('Feed ID', 'sdaweb-social-galleri-feed'), 27 help: __('Unique identifier for this feed instance.', 'sdaweb-social-galleri-feed'), 27 28 value: attrs.feedId, 28 29 onChange: function(v) { props.setAttributes({ feedId: v }); } 29 30 }), 30 31 el(RangeControl, { 31 label: 'Posts to show',32 label: __('Posts to show', 'sdaweb-social-galleri-feed'), 32 33 value: attrs.limit, 33 34 onChange: function(v) { props.setAttributes({ limit: v }); }, … … 35 36 }), 36 37 el(RangeControl, { 37 label: 'Columns',38 label: __('Columns', 'sdaweb-social-galleri-feed'), 38 39 value: attrs.columns, 39 40 onChange: function(v) { props.setAttributes({ columns: v }); }, … … 41 42 }), 42 43 el(SelectControl, { 43 label: 'Layout',44 label: __('Layout', 'sdaweb-social-galleri-feed'), 44 45 value: attrs.layout, 45 46 options: [ 46 { label: 'Default (from settings)', value: '' },47 { label: 'Grid', value: 'grid' },48 { label: 'Masonry', value: 'masonry' },49 { label: 'Highlight', value: 'highlight' }47 { label: __('Default (from settings)', 'sdaweb-social-galleri-feed'), value: '' }, 48 { label: __('Grid', 'sdaweb-social-galleri-feed'), value: 'grid' }, 49 { label: __('Masonry', 'sdaweb-social-galleri-feed'), value: 'masonry' }, 50 { label: __('Highlight', 'sdaweb-social-galleri-feed'), value: 'highlight' } 50 51 ], 51 52 onChange: function(v) { props.setAttributes({ layout: v }); } 52 53 }), 53 54 el(SelectControl, { 54 label: 'Aspect Ratio',55 label: __('Aspect Ratio', 'sdaweb-social-galleri-feed'), 55 56 value: attrs.aspectRatio, 56 57 options: [ 57 { label: 'Default (from settings)', value: '' },58 { label: 'Square (1:1)', value: 'square' },59 { label: 'Instagram (4:5)', value: 'instagram' },60 { label: 'Portrait (4:5)', value: 'portrait' },61 { label: 'Original', value: 'original' }58 { label: __('Default (from settings)', 'sdaweb-social-galleri-feed'), value: '' }, 59 { label: __('Square (1:1)', 'sdaweb-social-galleri-feed'), value: 'square' }, 60 { label: __('Instagram (4:5)', 'sdaweb-social-galleri-feed'), value: 'instagram' }, 61 { label: __('Portrait (4:5)', 'sdaweb-social-galleri-feed'), value: 'portrait' }, 62 { label: __('Original', 'sdaweb-social-galleri-feed'), value: 'original' } 62 63 ], 63 64 onChange: function(v) { props.setAttributes({ aspectRatio: v }); } 64 65 }) 65 66 ), 66 el(PanelBody, { title: 'Display Options', initialOpen: false },67 el(PanelBody, { title: __('Display Options', 'sdaweb-social-galleri-feed'), initialOpen: false }, 67 68 el(ToggleControl, { 68 label: 'Show header',69 label: __('Show header', 'sdaweb-social-galleri-feed'), 69 70 checked: attrs.showHeader, 70 71 onChange: function(v) { props.setAttributes({ showHeader: v }); } 71 72 }), 72 73 el(ToggleControl, { 73 label: 'Show Load More button',74 label: __('Show Load More button', 'sdaweb-social-galleri-feed'), 74 75 checked: attrs.showLoadmore, 75 76 onChange: function(v) { props.setAttributes({ showLoadmore: v }); } 76 77 }) 77 78 ), 78 el(PanelBody, { title: 'Filtering', initialOpen: false },79 el(PanelBody, { title: __('Filtering', 'sdaweb-social-galleri-feed'), initialOpen: false }, 79 80 el(TextControl, { 80 label: 'Hashtag filter',81 help: 'Only show posts with this hashtag.',81 label: __('Hashtag filter', 'sdaweb-social-galleri-feed'), 82 help: __('Only show posts with this hashtag.', 'sdaweb-social-galleri-feed'), 82 83 value: attrs.hashtag, 83 84 onChange: function(v) { props.setAttributes({ hashtag: v }); } 84 85 }), 85 86 el(TextControl, { 86 label: 'Exclude hashtags',87 help: 'Comma-separated hashtags to exclude.',87 label: __('Exclude hashtags', 'sdaweb-social-galleri-feed'), 88 help: __('Comma-separated hashtags to exclude.', 'sdaweb-social-galleri-feed'), 88 89 value: attrs.excludeHashtags, 89 90 onChange: function(v) { props.setAttributes({ excludeHashtags: v }); } … … 105 106 }, 106 107 el('div', { style: { fontSize: '36px', marginBottom: '8px' } }, '\uD83D\uDDBC'), 107 el('p', { style: { margin: 0 } }, 'Social Galleri Feed'),108 el('p', { style: { margin: '4px 0 0', fontSize: '12px' } }, 'Configure your feed in the sidebar settings.')108 el('p', { style: { margin: 0 } }, __('Social Galleri Feed', 'sdaweb-social-galleri-feed')), 109 el('p', { style: { margin: '4px 0 0', fontSize: '12px' } }, __('Configure your feed in the sidebar settings.', 'sdaweb-social-galleri-feed')) 109 110 ); 110 111 } … … 121 122 window.wp.blockEditor, 122 123 window.wp.components, 123 window.wp.serverSideRender 124 window.wp.serverSideRender, 125 window.wp.i18n 124 126 )); -
sdaweb-social-galleri-feed/trunk/includes/class-api-handler.php
r3483261 r3486789 50 50 'methods' => 'GET', 51 51 'callback' => [__CLASS__, 'rest_fetch_data'], 52 'permission_callback' => '__return_true', 52 'permission_callback' => '__return_true', // Public read-only endpoint — serves cached feed data, no data modification 53 53 ]); 54 54 } -
sdaweb-social-galleri-feed/trunk/sdaweb-social-galleri-feed.php
r3483311 r3486789 6 6 * Requires at least: 5.8 7 7 * Requires PHP: 7.4 8 * Tested up to: 6.9 8 9 * Author: SDAweb - Rune Stavdal, Vinjar Romsvik, Christer Andvik 9 10 * Author URI: https://sdaweb.no … … 272 273 // Shortcode 273 274 add_shortcode('sdawsoga_gallery', ['SDAWSOGA_Gallery_Renderer', 'render_shortcode']); 274 add_shortcode('tg_gallery', ['SDAWSOGA_Gallery_Renderer', 'render_shortcode']); // Legacy alias (pre-4.6)275 275 276 276 // Initialize admin if in admin area
Note: See TracChangeset
for help on using the changeset viewer.