shortcodes.php (22140B)
1 <?php 2 /** 3 * Redux Pro Search Sample config. 4 * For full documentation, please visit: http:https://devs.redux.io/ 5 * 6 * @package Redux Pro 7 */ 8 9 defined( 'ABSPATH' ) || exit; 10 11 // --> Below this line not needed. This is just for demonstration purposes. 12 $function = '<strong>' . esc_html__( 'Function', 'your-textdomain-here' ) . ': </strong>'; 13 $example = esc_html__( 'Example output:', 'your-textdomain-here' ) . ' '; 14 15 Redux::set_section( 16 $opt_name, 17 array( 18 'customizer' => false, 19 'subsection' => true, 20 'title' => esc_html__( 'Shortcodes', 'your-textdomain-here' ), 21 // phpcs:ignore 22 // 'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/extensions/shortcodes.html" target="_blank">https://devs.redux.io/extensions/shortcodes.html</a>', 23 'fields' => array( 24 array( 25 'id' => 'sc-bloginfo', 26 'title' => esc_html__( '[bloginfo data="name"]', 'your-textdomain-here' ), 27 'subtitle' => $function . '<code>get_bloginfo("name")</code>', 28 'desc' => esc_html__( 'Displays the "Site Title" set in Settings > General. This data is retrieved from the "blogname" record in the wp_options table.', 'your-textdomain-here' ), 29 'type' => 'raw', 30 'content' => $example . do_shortcode( '<strong>[bloginfo data="name"]</strong>' ), 31 'full_width' => false, 32 ), 33 array( 34 'id' => 'sc-description', 35 'title' => esc_html__( '[bloginfo data="description"]', 'your-textdomain-here' ), 36 'subtitle' => $function . '<code>get_bloginfo("description")</code>', 37 'desc' => esc_html__( 'Displays the "Tagline" set in Settings > General. This data is retrieved from the "blogdescription" record in the wp_options table.', 'your-textdomain-here' ), 38 'type' => 'raw', 39 'content' => $example . do_shortcode( '<strong>[bloginfo data="description"]</strong>' ), 40 'full_width' => false, 41 ), 42 array( 43 'id' => 'sc-wpurl', 44 'title' => esc_html__( '[bloginfo data="wpurl"]', 'your-textdomain-here' ), 45 'subtitle' => $function . '<code>get_bloginfo("wpurl")</code>', 46 'desc' => esc_html__( 'Displays the "WordPress address (URL)" set in Settings > General. This data is retrieved from the "siteurl" record in the wp_options table. Consider using *root_url* instead, especially for multi-site configurations using paths instead of subdomains (it will return the root site not the current sub-site).', 'your-textdomain-here' ), 47 'type' => 'raw', 48 'markdown' => true, 49 'content' => $example . do_shortcode( '<strong>[bloginfo data="wpurl"]</strong>' ), 50 'full_width' => false, 51 ), 52 array( 53 'id' => 'sc-rooturl', 54 'title' => esc_html__( '[bloginfo data="root_url"]', 'your-textdomain-here' ), 55 'subtitle' => $function . '<code>site_url()</code>', 56 'desc' => esc_html__( 'Return the root site, not the current sub-site.', 'your-textdomain-here' ), 57 'type' => 'raw', 58 'content' => $example . do_shortcode( '<strong>[bloginfo data="root_url"]</strong>' ), 59 'full_width' => false, 60 ), 61 array( 62 'id' => 'sc-url', 63 'title' => esc_html__( '[bloginfo data="url"]', 'your-textdomain-here' ), 64 'subtitle' => $function . '<code>home_url()</code>', 65 'desc' => esc_html__( 'Displays the "Site address (URL)" set in Settings > General. This data is retrieved from the "home" record in the wp_options table.', 'your-textdomain-here' ), 66 'type' => 'raw', 67 'content' => $example . do_shortcode( '<strong>[bloginfo data="url"]</strong>' ), 68 'full_width' => false, 69 ), 70 array( 71 'id' => 'sc-adminemail', 72 'title' => esc_html__( '[bloginfo data="admin_email"]', 'your-textdomain-here' ), 73 'subtitle' => $function . '<code>get_bloginfo("admin_email")</code>', 74 'desc' => esc_html__( 'Displays the "E-mail address" set in Settings > General. This data is retrieved from the "admin_email" record in the wp_options table.', 'your-textdomain-here' ), 75 'type' => 'raw', 76 'content' => $example . do_shortcode( '<strong>[bloginfo data="admin_email"]</strong>' ), 77 'full_width' => false, 78 ), 79 array( 80 'id' => 'sc-charset', 81 'title' => esc_html__( '[bloginfo data="charset"]', 'your-textdomain-here' ), 82 'subtitle' => $function . '<code>get_bloginfo("charset")</code>', 83 'desc' => esc_html__( 'Displays the "Encoding for pages and feeds" set in Settings > Reading. This data is retrieved from the "blog_charset" record in the wp_options.', 'your-textdomain-here' ), 84 'type' => 'raw', 85 'content' => $example . do_shortcode( '<strong>[bloginfo data="charset"]</strong>' ), 86 'full_width' => false, 87 ), 88 array( 89 'id' => 'sc-version', 90 'title' => esc_html__( '[bloginfo data="version"]', 'your-textdomain-here' ), 91 'subtitle' => $function . '<code>get_bloginfo("version")</code>', 92 'desc' => esc_html__( 'Displays the WordPress Version you use. This data is retrieved from the $wp_version variable set in wp-includes/version.php.', 'your-textdomain-here' ), 93 'type' => 'raw', 94 'content' => $example . do_shortcode( '<strong>[bloginfo data="version"]</strong>' ), 95 'full_width' => false, 96 ), 97 array( 98 'id' => 'sc-htmltype', 99 'title' => esc_html__( '[bloginfo data="html_type"]', 'your-textdomain-here' ), 100 'subtitle' => $function . '<code>get_bloginfo("html_type")</code>', 101 'desc' => esc_html__( 'Displays the Content-Type of WordPress HTML pages (default: "text/html"). This data is retrieved from the "html_type" record in the wp_options table. Themes and plugins can override the default value using the pre_option_html_type filter.', 'your-textdomain-here' ), 102 'type' => 'raw', 103 'content' => $example . do_shortcode( '<strong>[bloginfo data="html_type"]</strong>' ), 104 'full_width' => false, 105 ), 106 array( 107 'id' => 'sc-multi', 108 'title' => esc_html__( '[bloginfo data="is_multisite"]', 'your-textdomain-here' ), 109 'subtitle' => $function . '<code>is_multisite()</code>', 110 'desc' => esc_html__( 'Displays true/false check if WordPress is running in multisite mode.', 'your-textdomain-here' ), 111 'type' => 'raw', 112 'content' => $example . ( do_shortcode( '<strong>[bloginfo data="is_multisite"]</strong>' ) ), 113 'full_width' => false, 114 ), 115 array( 116 'id' => 'sc-rtl', 117 'title' => esc_html__( '[bloginfo data="text_direction"]', 'your-textdomain-here' ), 118 'subtitle' => $function . '<code>is_rtl()</code>', 119 'desc' => esc_html__( 'Displays true/false check if the Text Direction of WordPress HTML pages is left instead of right.', 'your-textdomain-here' ), 120 'type' => 'raw', 121 'content' => $example . ( do_shortcode( '<strong>[bloginfo data="text_direction"]</strong>' ) ), 122 'full_width' => false, 123 ), 124 array( 125 'id' => 'sc-lang', 126 'title' => esc_html__( '[bloginfo data="language"]', 'your-textdomain-here' ), 127 'subtitle' => $function . '<code>get_bloginfo("language")</code>', 128 'desc' => esc_html__( 'Displays the language of WordPress.', 'your-textdomain-here' ), 129 'type' => 'raw', 130 'content' => $example . do_shortcode( '<strong>[bloginfo data="language"]</strong>' ), 131 'full_width' => false, 132 ), 133 array( 134 'id' => 'sc-stylesheet-url', 135 'title' => esc_html__( '[bloginfo data="stylesheet_url"]', 'your-textdomain-here' ), 136 'subtitle' => $function . '<code>get_stylesheet_uri()</code>', 137 'desc' => esc_html__( 'Displays the primary CSS (usually style.css) file URL of the active theme.', 'your-textdomain-here' ), 138 'type' => 'raw', 139 'content' => $example . do_shortcode( '<strong>[bloginfo data="stylesheet_url"]</strong>' ), 140 'full_width' => false, 141 ), 142 array( 143 'id' => 'sc-stylesheet-dir', 144 'title' => esc_html__( '[bloginfo data="stylesheet_directory"]', 'your-textdomain-here' ), 145 'subtitle' => $function . '<code>get_stylesheet_directory()</code>', 146 'desc' => esc_html__( 'Displays the stylesheet directory of the active theme.', 'your-textdomain-here' ), 147 'type' => 'raw', 148 'content' => $example . do_shortcode( '<strong>[bloginfo data="stylesheet_directory"]</strong>' ), 149 'full_width' => false, 150 ), 151 array( 152 'id' => 'sc-template-url', 153 'title' => esc_html__( '[bloginfo data="template_url"]', 'your-textdomain-here' ), 154 'subtitle' => $function . '<code>get_template_directory_uri()</code>', 155 'desc' => esc_html__( 'Displays the "Site Title" set in Settings > General. This data is retrieved from the "blogname" record in the wp_options table.', 'your-textdomain-here' ), 156 'type' => 'raw', 157 'content' => $example . do_shortcode( '<strong>[bloginfo data="template_url"]</strong>' ), 158 'full_width' => false, 159 ), 160 array( 161 'id' => 'sc-child-template-url', 162 'title' => esc_html__( '[bloginfo data="child_template_url"]', 'your-textdomain-here' ), 163 'subtitle' => $function . '<code>get_stylesheet_directory_uri()</code>', 164 'desc' => esc_html__( 'Child template URI.', 'your-textdomain-here' ), 165 'type' => 'raw', 166 'content' => $example . do_shortcode( '<strong>[bloginfo data="child_template_url"]</strong>' ), 167 'full_width' => false, 168 ), 169 array( 170 'id' => 'sc-template-dir', 171 'title' => esc_html__( '[bloginfo data="template_directory"]', 'your-textdomain-here' ), 172 'subtitle' => $function . '<code>get_template_directory()</code>', 173 'desc' => esc_html__( 'Template directory.', 'your-textdomain-here' ), 174 'type' => 'raw', 175 'content' => $example . do_shortcode( '<strong>[bloginfo data="template_directory"]</strong>' ), 176 'full_width' => false, 177 ), 178 array( 179 'id' => 'sc-child-template-dir', 180 'title' => esc_html__( '[bloginfo data="child_template_directory"]', 'your-textdomain-here' ), 181 'subtitle' => $function . '<code>get_stylesheet_directory()</code>', 182 'desc' => esc_html__( 'Child template Directory.', 'your-textdomain-here' ), 183 'type' => 'raw', 184 'content' => $example . do_shortcode( '<strong>[bloginfo data="child_template_directory"]</strong>' ), 185 'full_width' => false, 186 ), 187 array( 188 'id' => 'sc-pingback-url', 189 'title' => esc_html__( '[bloginfo data="pingback_url"]', 'your-textdomain-here' ), 190 'subtitle' => $function . '<code>get_bloginfo("pingback_url")</code>', 191 'desc' => esc_html__( 'Displays the Pingback XML-RPC file URL (xmlrpc.php).', 'your-textdomain-here' ), 192 'type' => 'raw', 193 'content' => $example . do_shortcode( '<strong>[bloginfo data="pingback_url"]</strong>' ), 194 'full_width' => false, 195 ), 196 array( 197 'id' => 'sc-atom-url', 198 'title' => esc_html__( '[bloginfo data="atom_url"]', 'your-textdomain-here' ), 199 'subtitle' => $function . '<code>get_bloginfo("atom_url")</code>', 200 'desc' => esc_html__( 'Displays the Atom feed URL (/feed/atom).', 'your-textdomain-here' ), 201 'type' => 'raw', 202 'content' => $example . do_shortcode( '<strong>[bloginfo data="atom_url"]</strong>' ), 203 'full_width' => false, 204 ), 205 array( 206 'id' => 'sc-rdf-url', 207 'title' => esc_html__( '[bloginfo data="rdf_url"]', 'your-textdomain-here' ), 208 'subtitle' => $function . '<code>get_bloginfo("rdf_url")</code>', 209 'desc' => esc_html__( 'Displays the RDF/RSS 1.0 feed URL (/feed/rfd).', 'your-textdomain-here' ), 210 'type' => 'raw', 211 'content' => $example . do_shortcode( '<strong>[bloginfo data="rdf_url"]</strong>' ), 212 'full_width' => false, 213 ), 214 array( 215 'id' => 'sc-rss-url', 216 'title' => esc_html__( '[bloginfo data="rss_url"]', 'your-textdomain-here' ), 217 'subtitle' => $function . '<code>get_bloginfo("rss_url")</code>', 218 'desc' => esc_html__( 'Displays the RSS 0.92 feed URL (/feed/rss).', 'your-textdomain-here' ), 219 'type' => 'raw', 220 'content' => $example . do_shortcode( '<strong>[bloginfo data="rss_url"]</strong>' ), 221 'full_width' => false, 222 ), 223 array( 224 'id' => 'sc-rss2-url', 225 'title' => esc_html__( '[bloginfo data="rss2_url"]', 'your-textdomain-here' ), 226 'subtitle' => $function . '<code>get_bloginfo("rss2_url")</code>', 227 'desc' => esc_html__( 'Displays the RSS 2.0 feed URL (/feed).', 'your-textdomain-here' ), 228 'type' => 'raw', 229 'content' => $example . do_shortcode( '<strong>[bloginfo data="rss2_url"]</strong>' ), 230 'full_width' => false, 231 ), 232 array( 233 'id' => 'sc-comments-atom-url', 234 'title' => esc_html__( '[bloginfo data="comments_atom_url"]', 'your-textdomain-here' ), 235 'subtitle' => $function . '<code>get_bloginfo("comments_atom_url")</code>', 236 'desc' => esc_html__( 'Displays the comments Atom feed URL (/comments/feed).', 'your-textdomain-here' ), 237 'type' => 'raw', 238 'content' => $example . do_shortcode( '<strong>[bloginfo data="comments_atom_url"]</strong>' ), 239 'full_width' => false, 240 ), 241 array( 242 'id' => 'sc-comments-rss2-url', 243 'title' => esc_html__( '[bloginfo data="comments_rss2_url"]', 'your-textdomain-here' ), 244 'subtitle' => $function . '<code>get_bloginfo("comments_rss2_url")</code>', 245 'desc' => esc_html__( 'Displays the comments RSS 2.0 feed URL (/comments/feed).', 'your-textdomain-here' ), 246 'type' => 'raw', 247 'content' => $example . do_shortcode( '<strong>[bloginfo data="comments_rss2_url"]</strong>' ), 248 'full_width' => false, 249 ), 250 array( 251 'id' => 'sc-login-url', 252 'title' => esc_html__( '[bloginfo data="login_url"]', 'your-textdomain-here' ), 253 'subtitle' => $function . '<code>wp_login_url()</code>', 254 'desc' => esc_html__( 'Returns the WordPress login URL.', 'your-textdomain-here' ), 255 'type' => 'raw', 256 'content' => $example . do_shortcode( '<strong>[bloginfo data="login_url"]</strong>' ), 257 'full_width' => false, 258 ), 259 array( 260 'id' => 'sc-logout-url', 261 'title' => esc_html__( '[bloginfo data="logout_url"]', 'your-textdomain-here' ), 262 'subtitle' => $function . '<code>wp_logout_url()</code>', 263 'desc' => esc_html__( 'Returns the WordPress logout URL.', 'your-textdomain-here' ), 264 'type' => 'raw', 265 'content' => $example . do_shortcode( '<strong>[bloginfo data="logout_url"]</strong>' ), 266 'full_width' => false, 267 ), 268 array( 269 'id' => 'sc-register-url', 270 'title' => esc_html__( '[bloginfo data="register_url"]', 'your-textdomain-here' ), 271 'subtitle' => $function . '<code>wp_registration_url()</code>', 272 'desc' => esc_html__( 'Returns the WordPress register URL.', 'your-textdomain-here' ), 273 'type' => 'raw', 274 'content' => $example . do_shortcode( '<strong>[bloginfo data="register_url"]</strong>' ), 275 'full_width' => false, 276 ), 277 array( 278 'id' => 'sc-lost-pw-url', 279 'title' => esc_html__( '[bloginfo data="lost_password_url"]', 'your-textdomain-here' ), 280 'subtitle' => $function . '<code>wp_lostpassword_url()</code>', 281 'desc' => esc_html__( 'Returns the WordPress lost password URL.', 'your-textdomain-here' ), 282 'type' => 'raw', 283 'content' => $example . do_shortcode( '<strong>[bloginfo data="lost_password_url"]</strong>' ), 284 'full_width' => false, 285 ), 286 array( 287 'id' => 'opt-divide-1', 288 'type' => 'divide', 289 ), 290 array( 291 'id' => 'sc-date', 292 'title' => esc_html__( '[date data="Y"]', 'your-textdomain-here' ), 293 'subtitle' => $function . '<code>date("Y")</code>', 294 // translators: %1$s: PHP Date Format URL. 295 'desc' => sprintf( esc_html__( 'Returns the current year. Any date format characters as specified by the %1$s may be used.', 'your-textdomain-here' ), '<a href="http://php.net/manual/en/function.date.php" target="_blank">' . esc_html__( 'PHP Date Format Table', 'your-textdomain-here' ) . '</a>' ), 296 'type' => 'raw', 297 'content' => $example . do_shortcode( '<strong>[date data="Y"]</strong>' ), 298 'full_width' => false, 299 ), 300 array( 301 'id' => 'opt-divide-2', 302 'type' => 'divide', 303 ), 304 array( 305 'id' => 'sc-theme-name', 306 'title' => esc_html__( '[themeinfo data="name"]', 'your-textdomain-here' ), 307 'subtitle' => $function . '<code>$theme_info->get("Name")</code>', 308 'desc' => esc_html__( 'Theme name as given in theme\'s style.css.', 'your-textdomain-here' ), 309 'type' => 'raw', 310 'content' => $example . do_shortcode( '<strong>[themeinfo data="name"]</strong>' ), 311 'full_width' => false, 312 ), 313 array( 314 'id' => 'sc-theme-uri', 315 'title' => esc_html__( '[themeinfo data="theme_uri"]', 'your-textdomain-here' ), 316 'subtitle' => $function . '<code>$theme_info->get("ThemeURI")</code>', 317 'desc' => esc_html__( 'The URL to the theme\'s directory.', 'your-textdomain-here' ), 318 'type' => 'raw', 319 'content' => $example . do_shortcode( '<strong>[themeinfo data="theme_uri"]</strong>' ), 320 'full_width' => false, 321 ), 322 array( 323 'id' => 'sc-theme-desc', 324 'title' => esc_html__( '[themeinfo data="description"]', 'your-textdomain-here' ), 325 'subtitle' => $function . '<code>$theme_info->get("Description")</code>', 326 'desc' => esc_html__( 'The description of the theme.', 'your-textdomain-here' ), 327 'type' => 'raw', 328 'content' => $example . do_shortcode( '<strong>[themeinfo data="description"]</strong>' ), 329 'full_width' => false, 330 ), 331 array( 332 'id' => 'sc-theme-author', 333 'title' => esc_html__( '[themeinfo data="author"]', 'your-textdomain-here' ), 334 'subtitle' => $function . '<code>$theme_info->get("Author")</code>', 335 'desc' => esc_html__( 'The theme\'s author.', 'your-textdomain-here' ), 336 'type' => 'raw', 337 'content' => $example . do_shortcode( '<strong>[themeinfo data="author"]</strong>' ), 338 'full_width' => false, 339 ), 340 array( 341 'id' => 'sc-theme-author-uri', 342 'title' => esc_html__( '[themeinfo data="author_uri"]', 'your-textdomain-here' ), 343 'subtitle' => $function . '<code>$theme_info->get("AuthorURI")</code>', 344 'desc' => esc_html__( 'The website of the theme author.', 'your-textdomain-here' ), 345 'type' => 'raw', 346 'content' => $example . do_shortcode( '<strong>[themeinfo data="author_uri"]</strong>' ), 347 'full_width' => false, 348 ), 349 array( 350 'id' => 'sc-theme-version', 351 'title' => esc_html__( '[themeinfo data="version"]', 'your-textdomain-here' ), 352 'subtitle' => $function . '<code>$theme_info->get("Version")</code>', 353 'desc' => esc_html__( 'The version of the theme.', 'your-textdomain-here' ), 354 'type' => 'raw', 355 'content' => $example . do_shortcode( '<strong>[themeinfo data="version"]</strong>' ), 356 'full_width' => false, 357 ), 358 array( 359 'id' => 'sc-theme-template', 360 'title' => esc_html__( '[themeinfo data="template"]', 'your-textdomain-here' ), 361 'subtitle' => $function . '<code>$theme_info->get("Template")</code>', 362 'desc' => esc_html__( 'The folder name of the current theme.', 'your-textdomain-here' ), 363 'type' => 'raw', 364 'content' => $example . do_shortcode( '<strong>[themeinfo data="template"]</strong>' ), 365 'full_width' => false, 366 ), 367 array( 368 'id' => 'sc-theme-status', 369 'title' => esc_html__( '[themeinfo data="status"]', 'your-textdomain-here' ), 370 'subtitle' => $function . '<code>$theme_info->get("Status")</code>', 371 'desc' => esc_html__( 'If the theme is published.', 'your-textdomain-here' ), 372 'type' => 'raw', 373 'content' => $example . do_shortcode( '<strong>[themeinfo data="status"]</strong>' ), 374 'full_width' => false, 375 ), 376 array( 377 'id' => 'sc-theme-tags', 378 'title' => esc_html__( '[themeinfo data="tags"]', 'your-textdomain-here' ), 379 'subtitle' => $function . '<code>$theme_info->get("Tags")</code>', 380 'desc' => esc_html__( 'Tags used to describe the theme.', 'your-textdomain-here' ), 381 'type' => 'raw', 382 'content' => $example . do_shortcode( '<strong>[themeinfo data="tags"]</strong>' ), 383 'full_width' => false, 384 ), 385 array( 386 'id' => 'sc-theme-text-domain', 387 'title' => esc_html__( '[themeinfo data="text_domain"]', 'your-textdomain-here' ), 388 'subtitle' => $function . '<code>$theme_info->get("TextDomain")</code>', 389 'desc' => esc_html__( 'The text domain used in the theme for translation purposes.', 'your-textdomain-here' ), 390 'type' => 'raw', 391 'content' => $example . do_shortcode( '<strong>[themeinfo data="text_domain"]</strong>' ), 392 'full_width' => false, 393 ), 394 array( 395 'id' => 'sc-theme-domain-path', 396 'title' => esc_html__( '[themeinfo data="domain_path"]', 'your-textdomain-here' ), 397 'subtitle' => $function . '<code>$theme_info->get("DomainPath")</code>', 398 'desc' => esc_html__( 'Path to the theme translation files.', 'your-textdomain-here' ), 399 'type' => 'raw', 400 'content' => $example . do_shortcode( '<strong>[themeinfo data="domain_path"]</strong>' ), 401 'full_width' => false, 402 ), 403 array( 404 'id' => 'sc-theme-is-child', 405 'title' => esc_html__( '[themeinfo data="is_child"]', 'your-textdomain-here' ), 406 'subtitle' => $function . '<code>is_child_theme()</code>', 407 'desc' => esc_html__( 'True/False return for child theme active check (Blank indicates False).', 'your-textdomain-here' ), 408 'type' => 'raw', 409 'content' => $example . do_shortcode( '<strong>[themeinfo data="is_child"]</strong>' ), 410 'full_width' => false, 411 ), 412 413 ), 414 ) 415 );