Changeset 3466097
- Timestamp:
- 02/20/2026 09:06:19 PM (3 days ago)
- Location:
- a1-tools/trunk
- Files:
-
- 2 edited
-
a1-tools.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
a1-tools/trunk/a1-tools.php
r3465976 r3466097 4 4 * Plugin URI: https://tools.a-1chimney.com 5 5 * Description: Connects your WordPress site to the A1 Tools platform for centralized management of contact information, social media links, and business details. 6 * Version: 1.4.1 36 * Version: 1.4.14 7 7 * Requires at least: 5.0 8 8 * Requires PHP: 7.4 … … 21 21 22 22 // Plugin constants. 23 define( 'A1TOOLS_VERSION', '1.4.1 3' );23 define( 'A1TOOLS_VERSION', '1.4.14' ); 24 24 define( 'A1TOOLS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 25 25 define( 'A1TOOLS_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); … … 134 134 * or href="mailto:[a1tools_var ...]" and resolves them before normal rendering. 135 135 * 136 * @since 1.4.1 3136 * @since 1.4.14 137 137 * @param string $content Post content. 138 138 * @return string Content with shortcodes resolved inside attributes. … … 204 204 205 205 /** 206 * Shortcode: [a1tools_website_url] 207 * Outputs the website URL as text or a clickable link. 208 * 209 * @since 1.4.14 210 * @param array $atts Shortcode attributes. 211 * @return string Shortcode output. 212 */ 213 function a1tools_shortcode_website_url( $atts ) { 214 $atts = shortcode_atts( 215 array( 216 'link' => 'false', 217 'target' => '_blank', 218 'class' => '', 219 'text' => '', 220 ), 221 $atts, 222 'a1tools_website_url' 223 ); 224 225 $url = home_url( '/' ); 226 227 // If link="true", output as a clickable link. 228 if ( 'true' === $atts['link'] ) { 229 $link_text = ! empty( $atts['text'] ) ? esc_html( $atts['text'] ) : esc_html( $url ); 230 $class_attr = ! empty( $atts['class'] ) ? ' class="' . esc_attr( $atts['class'] ) . '"' : ''; 231 $rel_attr = '_blank' === $atts['target'] ? ' rel="noopener noreferrer"' : ''; 232 return '<a href="' . esc_url( $url ) . '" target="' . esc_attr( $atts['target'] ) . '"' . $rel_attr . $class_attr . '>' . $link_text . '</a>'; 233 } 234 235 // Plain text output. 236 if ( ! empty( $atts['class'] ) ) { 237 return '<span class="' . esc_attr( $atts['class'] ) . '">' . esc_html( $url ) . '</span>'; 238 } 239 240 return esc_html( $url ); 241 } 242 add_shortcode( 'a1tools_website_url', 'a1tools_shortcode_website_url' ); 243 244 /** 206 245 * Shortcode: [a1tools_address format="full"] 207 246 * Outputs formatted address. … … 410 449 * Get SVG markup for icons not available in Font Awesome 5. 411 450 * 412 * @since 1.4.1 3451 * @since 1.4.14 413 452 * @param string $icon_key The SVG icon key (e.g. 'svg-x'). 414 453 * @return string SVG markup or empty string. … … 424 463 * Get icon HTML (SVG or Font Awesome <i> tag). 425 464 * 426 * @since 1.4.1 3465 * @since 1.4.14 427 466 * @param string $icon Icon class or SVG key. 428 467 * @return string HTML markup for the icon. -
a1-tools/trunk/readme.txt
r3465976 r3466097 4 4 Requires at least: 5.0 5 5 Tested up to: 6.9 6 Stable tag: 1.4.1 36 Stable tag: 1.4.14 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 151 151 152 152 == Changelog == 153 154 = 1.4.14 = 155 * Added [a1tools_website_url] shortcode to display the site URL 156 * Supports link="true" for clickable links and text="" for custom link text 153 157 154 158 = 1.4.13 =
Note: See TracChangeset
for help on using the changeset viewer.