New answers tagged

0

Looks like it's possible to use a placeholder tag, the following is the PHP code using a _custom_link value of http://somelink.com/?ref=%%title%%. <?php // must be within the Loop $ref_slug = strtoupper(sanitize_title_with_dashes(get_the_title())); $regex = '(\%\%title\%\%)'; $ref_link = ( get_option('_custom_link') ) ? preg_replace( $regex, $ref_slug, ...


-1

Try This Function checking if $arg / string / exist in mySQL. $arg must be a string / the name of your option / If the function returns true -> option exist; returns false -> there is no option with this name. /** * Check If Option Exist; * @param String * @return boolean; */ function exist_option( $arg ) { global $wpdb; $prefix = ...



Top 50 recent answers are included