How can I check for malware in a Theme? [closed]
You should try using the theme check plugin at http://wordpress.org/extend/plugins/theme-check/
You should try using the theme check plugin at http://wordpress.org/extend/plugins/theme-check/
function parent_child_cat_select() { ?> <script type=”text/javascript”> /* <![CDATA[ */ jQuery(document).ready(function() { jQuery(‘#parent_cat’).change(function(){ var parentCat=jQuery(‘#parent_cat’).val(); // call ajax jQuery.ajax({ url:”/wp-admin/admin-ajax.php”, type:’POST’, data:’action=category_select_action&parent_cat_ID=’ + parentCat, success:function(results) { jQuery(“#sub_cat_div”).html(results); } }); }); }); /* ]]> */ </script> <form action=”<?php bloginfo(‘url’); ?>/” method=”get”> <div id=”parent_cat_div”><?php wp_dropdown_categories(“show_option_none=Select parent category&orderby=name&depth=1&hierarchical=1&id=parent_cat”); ?></div> <div id=”sub_cat_div”><select name=”sub_cat_disabled” id=”sub_cat_disabled” disabled=”disabled”><option>Select parent category first!</option></select></div> <div id=”submit_div”><input … Read more
There’s a whole bunch of plugins that do that. After some reading i decided to go with Syntax Highlighter Evolved.
It depends on the license under which the Theme is released. Assuming the Theme was released under GPL: no; you are free to change the Theme in any way you want. If you redistribute the Theme, modified or unmodified, you are required to maintain the original copyright/license information in the Theme file headers, but are … Read more
You need to flush and regenerate your permalinks everytime you modify/add/remove custom post types or taxonomies. Going to the permalinks page and saving should be enough ( Also your custom post type code should be in a plugin, not the theme, else the user is stuck using that theme forever )
You can use this function: function get_first_paragraph(){ global $post; $str = wpautop( get_the_content() ); $str = substr( $str, 0, strpos( $str, ‘</p>’ ) + 4 ); $str = strip_tags($str, ‘<a><strong><em>’); return ‘<p>’ . $str . ‘</p>’; } and then call it in your loop with: <?php echo get_first_paragraph(); ?> The magic part your looking for … Read more
If it’s the home page, WordPress will look for the following files in this order and use the first one it finds: 1. front-page.php 2. home.php 3. index.php WordPress template hierarchy is described in detail here: https://developer.wordpress.org/themes/basics/template-hierarchy/ This article explains how WordPress determines which template file(s) to use on individual pages. If you want to … Read more
When on the admin view you can use the following functions to get update data. get_plugin_updates() get_theme_updates() get_core_updates() If you want to build your own functions, then you can get update related data from site transients update_themes, update_plugins, and update_core. Then you can compare the plugin and theme transients with the theme and plugin arrays … Read more
Yes, it is possible with page templates. See – Codex : Page Templates Codex : Creating Your Own Page Templates
Put those add_action functions in your functions.php file too. If they’re in header.php, WordPress never registers them since header isn’t loaded in AJAX. Also, you don’t need that is_admin() check. The theme’s header will never load in admin. So, your functions file should look like this: add_action(‘wp_ajax_my_special_action’, ‘my_action_callback’); add_action(‘wp_ajax_nopriv_my_special_action’, ‘my_action_callback’); function my_action_callback() { $whatever = … Read more