|
|

楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
////////////////////////////////////////////////////////////////////////////////+ R' ]3 g! U% @, G( j. o4 Z
// Theme Option6 T1 H, @( c/ Q2 L- `* P
////////////////////////////////////////////////////////////////////////////////+ p% |2 j2 H) ~
* H7 z( }5 @0 C& I! S$themename = "Zenx";
. k% `2 A' h/ I. b( Y$shortname = str_replace(' ', '_', strtolower($themename));
% {1 Q0 [- R# `2 {0 I3 o
9 i; g' l1 t5 j! [# r# n9 b$ }9 tfunction get_theme_option($option)+ X4 p' I' t/ F$ v4 E% Y" y' v, O
{7 W6 w3 o0 r" O# t- b
global $shortname;; H' c4 q( x# y( M, D. W
return stripslashes(get_option($shortname . '_' . $option));
! y J8 ]% k4 w- D# n; s} T l" e: I; V+ R% l/ q
& Q- I. i+ {/ k, ?$ H( P
function get_theme_settings($option)# U7 s0 s. x1 Y% I$ D0 K
{; J i2 B' g# O# }# u( C4 _/ b! C$ |
return stripslashes(get_option($option));
4 j. n3 W6 P- x# \' Q, b5 p0 f}6 w3 F3 L5 ~5 q& C' w: L0 E) I3 w; l
$wp_dropdown_rd_admin = $wpdb->get_results("SELECT $wpdb->term_taxonomy.term_id,name,description,count FROM $wpdb->term_taxonomy LEFT JOIN $wpdb->terms ON $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id WHERE parent > -1 AND taxonomy = 'category' AND count != '0' GROUP BY $wpdb->terms.name ORDER by $wpdb->terms.name ASC");
, ]% ^& D& w" c, A6 j$wp_getcat = array();3 w: ?" s# ]' k D: r$ Z% D4 {: Y
foreach ($wp_dropdown_rd_admin as $category_list) {
$ n3 _7 W9 Z* \$wp_getcat[$category_list->term_id] = $category_list->name;
- G$ b* e/ s5 m* r7 M} b: u Y8 |9 ]( L2 _
$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");
) Y K) | J$ }5 _6 q' z6 |$ G$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");
1 A0 S1 W; M& [/ N2 e$ O$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");
9 l8 x- Y0 x5 u( s! a2 T9 T. l" z9 _9 t# h b/ Z
$options = array (
$ M; k* ?3 I6 o8 N
; c8 @. q0 |. P9 i& s6 `7 B4 l+ C) e# `% d: b
array( "name" => "Blog Header Settings",: K; N0 F3 ^. V" U4 V% F& {7 T
"type" => "heading",
9 `! p% T# ?2 {) n; n8 s I )," J% V' P- E3 X' }- n
: ?- I A8 J) g7 y; G array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",( Z: T, B/ Y Y& G& o
"id" => $shortname."_header_logo_activate",
, p" y8 A+ `( t- K# m5 {2 d( w7 b6 V, B "type" => "select",# r( m% J8 @. H- p7 k( ?* C1 R
"std" => "No",; I3 |/ \; b/ A* M5 B3 o* Y
"options" => array("No", "Yes")),
4 m9 ^# _, X0 J8 e) p% I! p4 i; ~6 `/ Y0 ]9 O
array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",
, a, n# i w; X+ v0 T) C8 N "id" => $shortname."_logo_url",
9 M6 p, S) z5 V8 L) M. z# j "type" => "text",
J1 p9 m! X$ k4 q* B( i d/ p "box" => "social",
; K$ ]$ g2 c$ u* A7 }& B6 z6 G! _ "std" => "",
4 p5 o: s8 N2 C2 S5 d! Z )," O% o u k+ i3 b6 I1 y9 Q
/ a' W2 }0 C- P' \* O* `8 U; Z! C4 j array( "name" => "Insert Header Banner HTML Code (Header)1 Z: J5 Y$ J/ B- N5 ?9 D
<br /><em>*Recommended Size 468 x 60</em>
, C! k% F1 P! U; O- ~" g2 d! Q <br /><em>*leave blank if not use</em>",1 a/ x/ x8 j D, @1 N
"id" => $shortname."_header_banner",
9 ?, c( p9 j1 ?, t, h7 ` "type" => "textarea",
; {% [5 c1 i& [ "std" => "",9 Q; K! X4 F5 W1 e& E7 t2 K
),2 A4 s1 E/ P/ j% G
8 ] P) Q H% e/ F8 H1 o5 U( [% I array( "name" => "</div></div>",8 h9 x( W7 K+ O) V
"type" => "close",: m) L8 x4 `/ J7 N0 b( I" e
),( x+ ?- g4 P' ~: X: m$ O
& ~% B$ Q: Q% m0 |) x. A
# L" [' V* N% Q1 B6 K' b2 J array( "name" => "Header Navigation Settings"," }6 t- l& R( n0 \$ g" E: d
"type" => "heading",
7 C) S) w V5 Q% Q/ E1 m0 u ),
9 t ~/ d- B/ l y, n" z Z: {. ?) }8 M5 x3 p
array( "name" => "Insert Page ID To Exclude On Header Navigation<br /># C6 i6 N$ @# @# J7 e, c6 C5 t1 ?
<em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />
. G) _0 c' ~8 d* Z3 F) Q7 P6 l1 Z <em>*Enter the page post ID number only</em><br />' }0 j. X2 @2 Z# g. p
<em>*separate by comma</em><br />
$ {# T6 l3 e) r3 n' L <em>*Exclude pages which you don't want to show on the header navigation</em>",) g v. |, B$ j2 L" Y
"id" => $shortname."_header_page_navigation",
+ R/ H, \1 m# j& b. A) L' }2 h; z "type" => "text",
, l2 }7 ]; v; v5 ~2 s0 T "std" => "",
# u( v) l1 U7 `1 i l7 i1 K7 O4 q ),) G& u% @* O( C
- B3 e* T _' U" d
array( "name" => "</div></div>",# x* D$ b, J. d" V
"type" => "close",
5 }& F* H( I0 z3 M6 j8 B1 a$ v ),
3 X/ A3 S0 U% |$ u i + Z u: [) ]+ m! {) A/ O
/ |- G3 r7 R. E- a! p* ?8 _% I array( "name" => "Post Auto Thumbnails Settings",! O% o6 M ?) W8 G. u
"type" => "heading",% k" D- o4 d5 a* h
),
k9 O( \$ R3 Q& `( l: h( r $ n7 j- q! k8 e! s
array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
! f* k5 h: @- I "id" => $shortname."_timthumb_activate",
2 ^1 ~2 N% D( n% j4 l "type" => "select",4 m2 Q! y3 u% `! J( ?
"std" => "No",- K; Y, J4 D$ l0 _
"options" => array("No", "Yes")),
# I' K& i+ R6 H) [7 T$ B9 `# T8 m
( n/ }$ h% E- K" f: O9 c array( "name" => "If Timthumb is enabled, Please choose its cropping method",
) g, w0 S# y4 P "id" => $shortname."_timthumb_cropping",# n6 z4 Z! T( i, @+ T9 |$ T
"type" => "select",
E" Z6 X9 x5 d. n* P# t1 K9 d4 ^ "std" => "",
6 W; m) P2 f! B! K9 j/ }9 [. N "options" => $crop_position),
0 P% o7 \% T8 {8 Z/ I. A3 E5 K0 U* h* I
array( "name" => "Insert Width Of Thumbnail Image<br />* ~2 N: ?7 W' K
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />5 W2 x1 U4 f1 f" P/ f3 M
<em>*Leave Blank To Use Default: 250</em><br />",0 k% `1 I( ^6 x A# r
"id" => $shortname."_thumb_width",
+ l! h# J9 `, w( h* L4 g "type" => "text",
/ P( J1 e( p) C5 F "std" => "",8 {+ D) @; A) B% {7 a; g2 K+ R
),( ?! w1 D& ~; `$ P3 x9 O$ {& G
1 k# O d( I7 o: s' O array( "name" => "Insert Height Of Thumbnail Image<br />
- s( s) P" j8 ?& X% l <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
( Y* H6 K* ~: z* ?- k/ V$ ? <em>*Leave Blank To Use Default: 200</em><br />",& a& u0 T! c) |+ d+ U+ r
"id" => $shortname."_thumb_height",7 V; t! \8 t3 f6 B& I& z5 S) S$ V
"type" => "text",& J/ r! Q t) E$ e. F# h
"std" => "",
7 ]: [5 `' |* M/ s ),# B$ B; x8 p4 L
( `( j; s" }4 Q& H* u4 Q
array( "name" => "</div></div>",; A o& X' o2 v: B+ O) ^
"type" => "close",
$ |+ X1 ]( p- g' G# @7 n4 p% k9 _ ),
/ T c/ f2 U5 q7 v& x' |# _+ g" K. ^$ Q. \( Z* U% D0 y9 J
array( "name" => "Featured Content Slider Settings",
2 H9 z3 ]6 u X- p9 ]3 F [ "type" => "heading",
: w5 W7 _% u8 k0 [9 o2 k ),
7 f4 r; y* d& k6 I4 `1 B% u; _$ e+ }4 z+ @* S0 g4 j, V
array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
! ^, Y4 n$ o& e+ n8 Q: x* A* x "id" => $shortname."_featured_activate",5 @/ z4 S# G* i+ ?" x9 Q0 g2 m
"type" => "select",9 v/ {( Y8 ~5 `6 e/ T, B
"std" => "No",: q8 V& ^# v2 F/ J7 H
"options" => array("No", "Yes")),: U9 k( O: l ~3 s
; u8 G/ U- ^; y& O$ N2 {# X- g1 O. s0 p2 s/ r' M0 l
array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",' p/ H# V ?( ^8 }( Z- k# A
"id" => $shortname."_featured_category",
5 \: m0 S0 K- Z& j: d& x' w% B "type" => "select",
- ~* G& r8 _: W. }% B "std" => "Choose a category:",
( s# M) T: ]' P" _4 ^ "options" => $wp_getcat), b7 i# q* ^ d( M1 y4 W" I
" e5 A7 ]. d6 f; c' t8 G! Q4 D* P8 S array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",- }) {9 L9 e5 W! @ ]0 U
"id" => $shortname."_featured_number",
1 e' z, l8 s! o0 {5 v9 ~" c "type" => "select",
$ p7 E" N* Y: o% a! v "std" => "Number of post:",
8 K/ t$ b& m2 q( m1 y3 Q3 r+ C "options" => $number_entries),
! u* s' [7 Y' ?9 D3 T3 `
8 V0 d: ]) {$ P0 x; C# l array( "name" => "</div></div>", Y) u/ R) n9 O/ l3 f6 P2 ~
"type" => "close",
E0 J( v) t$ M ),
; ? e; m9 l5 u% X/ x ~3 ]7 L8 c ( U* w: G* w$ E5 J
array( "name" => "Featured Category Settings",
* |" t1 ~: E7 w; g* K! J9 _+ B "type" => "heading",
4 T" Y/ p7 t( u C ),5 `% y7 a' o1 T2 f/ ]2 ~; f4 p! q4 l1 J5 \
8 m( {. s) [+ B# o
array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
$ ?+ e2 P! _; I/ s& x5 Z "id" => $shortname."_featured_category_activate",
3 {# V @6 T3 H: h! k% K "type" => "select",1 S) i' r0 o4 v# G( ~, v6 f
"std" => "No",/ ?6 p9 p3 p) F) v4 v
"options" => array("No", "Yes")),2 V# d% W! \. O" }7 }: R! Q
' q- t: N' @+ G- x" D% \; H- z6 J/ I array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",( B4 t9 s9 |" u9 l$ C& H
"id" => $shortname."_featured_category_id1",
# e* I% n, L# b+ v" Z5 v "type" => "select",; P* o0 E" [+ M/ }9 T: t9 N# K
"std" => "Choose a category:",
0 K: w: ?/ J* V% G; q- C "options" => $wp_getcat),
. S$ z. {2 W" ?9 {& r2 z1 N
/ I1 v* c. M+ K" U \" \ array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",1 i+ ?6 m( j$ D0 R/ F
"id" => $shortname."_featured_number1",
3 D9 U9 q0 M, c. `6 b0 D! } "type" => "select",! c( m' [2 S8 D& ~' T
"std" => "Number of post:",: w! ~" n! ~4 s# `
"options" => $number_entries),
' r: r# d0 t! d0 A% r, m
; Q4 p H' i! S# l' x( P0 _ array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",3 W" e' l2 w3 i- ^1 n
"id" => $shortname."_featured_category_id2",
% |6 _9 d% t+ L "type" => "select",
6 k8 S% O) B6 O6 G# { "std" => "Choose a category:",- t9 H5 k% i" t1 b- @
"options" => $wp_getcat),4 Y) t3 M+ R9 {& ~1 m9 N- K& O
9 ^# C, T$ m* p" b6 e
array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",
1 Z ]" P4 b" b, \ "id" => $shortname."_featured_number2",5 C0 V8 s0 |( p% C' }9 G9 |
"type" => "select",- V. o" C N$ a$ u
"std" => "Number of post:",
1 x6 b, Y' J l) y/ c "options" => $number_entries),
) C1 Z5 f( J: a b9 T 4 t1 F5 v; ?, n/ u' j) {& T2 p M
( q" Y, S+ @$ l5 r6 i9 k array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",
" i0 a3 o/ E3 e. H "id" => $shortname."_featured_category_id3",
" ~6 j! Y& q* d. {% _5 d' c "type" => "select",% J6 T9 V: Q+ \+ k2 L/ h* X0 V
"std" => "Choose a category:",0 f1 G) i9 y# y, `/ c2 v
"options" => $wp_getcat),- O `2 t) n& z' O+ B2 ?
" v8 ~, u0 ?3 R4 A& _
array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",2 Q" W& K/ Z& D i4 j% [% B( H2 g) ^
"id" => $shortname."_featured_number3",
/ S( d0 x: |1 u# V9 O4 A1 Z4 d1 w "type" => "select",- M; }2 v% I- \0 |7 b
"std" => "Number of post:",
$ a& i- d+ ?6 @4 R3 O "options" => $number_entries),, O( w" M" \3 \5 s1 g! L* `
+ T: f' u) p4 w4 |
r0 F3 m- _! H9 G2 }/ n1 K1 l( c1 s array( "name" => "</div></div>",1 J" ~7 M1 ]* P* ?% `; Z [
"type" => "close",
8 Y! P; A) {& ^- y0 P* a5 r# c& I ),+ Y5 |. \; k. C* t! _
/ Z0 a2 t7 E: u1 ?8 E6 i% s$ n5 [* z. w. k+ v# l
array( "name" => "Google Adsense & Analytics Settings",
, @ t3 p% d) I" D2 m# D2 P' K "type" => "heading",/ b. r( p! F" L$ m t
),; C! j% t/ w. y' T. G# m0 }
! q% ]* c/ m1 T. K4 u) V
array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",
5 d& K, A0 j2 l B) W6 F2 } "id" => $shortname."_adsense_loop_activate",
& s& I* p- j# E& K$ d" x2 U "type" => "select", r5 D* l2 c$ T2 [
"std" => "Disable",
. z1 \; J5 v9 s0 B "options" => array("Disable", "Enable")),
! ?/ {% R! A- T8 K3 l6 w) c& Z
array( "name" => "Insert Google Adsense Code For Loops Here<br />& n6 f/ L/ i+ Y/ a/ {
<em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
( r0 l/ l8 u' \' B% {$ L "id" => $shortname."_adsense_loop",
- ?, S, @1 t. ^# r. w "type" => "textarea",
3 w2 i) Q( w3 } "std" => "",7 a- t% U4 H6 D$ S! `( J( _
),, m; A% Y8 y1 N
' u/ p- M3 A3 [; E7 T array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",- a; a. J I4 M8 e7 q2 H3 V8 z/ F/ J
"id" => $shortname."_adsense_single_activate",
5 d2 P9 [$ S# m "type" => "select",
+ Q8 x: D& _) B. f! B6 | "std" => "Disable",
% ]. Q+ i3 ?( b" ~1 ]" ^. F/ {3 Z5 S8 d' i "options" => array("Disable", "Enable")),! P2 Z* ?( V p' v/ N) h j
# B2 X% W9 Q( ?2 N; }( x
array( "name" => "Insert Google Adsense Code For Single Page Here<br />
& A9 g! l- _# t: f" x z" {0 F, N <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
# I& ~6 ~; e( l! f, R8 G "id" => $shortname."_adsense_single",
8 e* [# {! {# _3 g; d& j "type" => "textarea",
, ^* D4 c, F4 x+ |0 Z" s5 f5 j "std" => "",
5 g3 x/ ^( a( U4 z0 U )," a9 Y( f; S. F8 {
( W2 P! l( u- [; u) T9 T: o
8 z9 b. ~! S6 I, K( b; D: y7 @ array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",5 j$ p2 t2 T* V
"id" => $shortname."_google_analytics",/ _& s& k* ]' t/ g/ h6 N4 b
"type" => "textarea",6 F3 |9 r' I+ k8 h2 S( i: S
"std" => "",0 O: }. q$ V4 b+ V' |, k1 \- V6 t
),5 J8 ]7 C4 ^3 P) I
% B6 Q9 S3 Y+ W; I8 {0 w
array( "name" => "</div></div>",$ x' ?6 u& G; W7 s' j; z" e0 y ]
"type" => "close",
/ T+ I- W+ C' Q6 m ),- ^. a9 y* \# K5 u
* g: X& O P; Z8 w ; F# U) l: D* {1 X' S: z1 j
array( "name" => "AddThis Social Bookmarking Settings",3 R8 ~3 M0 k. y) ^2 J- z4 T& } q. L
"type" => "heading",
6 F U# o3 J9 Q+ C8 A ),: Q5 j* e- q1 w+ n, a
O" P! U0 r, s+ ]7 y
array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>! L. G& k; S- d; a( z
<br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",
: }3 r5 T# R6 s* e# i; l3 x "id" => $shortname."_addthis",5 J! s$ S$ ~- m; ^
"type" => "text",
) o' o: H( l, c! t( h2 l1 u "box" => "social",
2 U# @- `0 p- L; U$ P' w "std" => "",! I' [/ l# r5 s Y: Z6 y& G
),4 Q7 A+ V, M5 [& f
3 L' ?1 p/ K- j2 q
array( "name" => "</div></div>",7 J9 \% d) z. q2 t; S- G2 Z* |
"type" => "close",6 e" e9 n( {, f6 O7 `8 \
),
) g! e+ j) ~, b0 s( K9 q0 ~
* T$ v. g( ? ~7 V ]( [
% P1 G; F/ k! Z, ^! G m0 c2 h% w* h8 b* u) r% b+ u
array( "name" => "YouTube Video Settings",
; A; ~. {% C8 i# N& W, m! M( \/ R "type" => "heading",+ U6 x% S+ j* V8 Z3 e- m# D: f
),. Q- }9 a9 L" i, X7 g
' p$ \0 O4 l% }: ] array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
+ k% c$ V: \2 t8 \7 s "id" => $shortname."_emvideo_activate",( M2 S0 w3 H6 ?1 D @6 Q
"type" => "select",' F7 w: Z( E7 H! u$ {
"std" => "No",
$ S3 ^* \* U3 n1 c% } "options" => array("No", "Yes")),
0 e2 Z# |& M) f0 J* T' Y
6 d: F! E' }9 f6 Q! Z array( "name" => "Insert YouTube Video Unique Code<br /><em>*You can find videos to embed on <a href=\"http://www.youtube.com\" target=\"_blank\">YouTube</a> site.</em><br /><em>i.e. Youtube - http://www.youtube.com/watch?v=<span class=\"redbold\">Hr0Wv5DJhuk</span></em><br /><em>*Only Insert The Red Bolded Code Inside Below Setting Box.</em>",* t* L. W. a/ N2 u$ T, p! w& s
"id" => $shortname."_emvideo",- P' H) A8 i4 Y
"std" => "",1 R1 X; [$ l' U7 N1 X s5 R( H
"type" => "text"),3 C8 D4 I" v/ \
1 L r" U% Q- I& S array( "name" => "</div></div>",
4 w1 ~& `3 v+ _6 A. y "type" => "close",! ~0 T% @1 _! o" ^; D, l
),4 X- {. `% |/ S2 S
0 v& }: s) B4 J1 S; T: M array( "name" => "Twitter Settings",
8 Q X: K) ~& W8 O "type" => "heading",8 v: Y$ x1 r' ^5 f; B6 `7 u( A
),
b8 E; {9 S* P. u9 J8 \% K% D9 K, a/ w& f
array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>", T( ^! y8 F" w. } X/ E
"id" => $shortname."_twitter_activate",
5 R* p% { T: v9 X "type" => "select", f, [% I2 f) J& q! w; F
"std" => "No",# H- e0 L) a" ?& K' b
"options" => array("No", "Yes")),+ r3 f3 c/ a7 k) t/ @% z" c
8 L0 q4 k3 L* v Q% X array( "name" => "Insert Your Twitter ID here
! W1 [: A5 |1 x3 ~& o7 d <br /><em>*leave blank if not necessary</em>+ H# g Y* `: n9 u* n
<br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",
, N! c) }1 \. A) t3 z& A "id" => $shortname."_twitter",1 m& O# ~' w) @0 ~ }: q* N; ~
"type" => "text",5 B- F' L+ ]; p+ G+ i+ ?
"box" => "social",) i' G# h. P# ^3 T/ k3 ]
"std" => "",
9 V* Z4 G" ]& J' H) C6 R5 a1 H ),
/ H4 O# f7 g2 Q- ]. `5 `4 r' d3 t, g( E& b
array( "name" => "Enter Twitter Feed Count here+ s& B6 F) t* n
<br /><em>*leave blank if not necessary</em>
+ \6 m* k- X' D9 r5 O, E4 C <br /><em>*Enter How Many Twitter Feed To Display</em>",
# G) G, l6 F; O "id" => $shortname."_twitter_count",0 m4 l5 Y& o% w9 n8 D4 f
"type" => "text",2 z; P7 @1 P7 ` ?# l6 F7 \
"box" => "social",
. `8 U l0 A! |, S, E7 f$ V "std" => "",
1 ]/ O5 ~) K# `% E ),# n& |5 A/ T$ D# X4 }/ r
# `7 m5 i2 K& B# m1 i array( "name" => "</div></div>",
' K2 [3 j8 F" O* s6 o6 ~8 | "type" => "close",3 ]* Z3 L$ _6 [- R; |) a3 N1 ?
),! O B; G, x. ~3 c- u$ i
# b% X8 }4 t! v0 U- N p$ |
6 p8 W1 q6 ~" T9 | array( "name" => "125 x 125 Banners Advertisement Settings",
# D( Q$ Q9 S' E) U) B "type" => "heading",
0 K% z- {4 l. S9 s ),7 |: L$ J( n! w" I! S/ \
7 m L5 }0 l; @+ Z3 H array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
, }2 l* R) ^. I, ^( a" b% N4 P "id" => $shortname."_sponsor_activate",
. j7 ]; M. W( ^9 e4 F6 L9 V, W "type" => "select",
, _4 m' N% s, j6 J! N( ?) ~ "std" => "No",
& a& E2 b9 m% g: f; [ "options" => array("No", "Yes")),6 Q' k- p# w9 F$ b0 t
- i9 j4 o: j' s! N8 w
4 _0 E. T7 w/ A4 r4 `9 B' K array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",' x( I" h1 l# ~2 \% N( h6 q
"id" => $shortname."_sponsor_banner_one",6 a9 c+ ^' p) b! T2 Q% V; _
"type" => "textarea",1 ~# X5 u2 s# T1 I
"std" => "",9 G7 D- e$ X$ I1 I* r! J: k3 g
), ' K0 p K+ F% \* p6 T9 G
: L G0 c3 W4 u) m( u array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",7 J% n3 r; ?4 }- |4 k
"id" => $shortname."_sponsor_banner_two",; u9 O$ I5 y& r
"type" => "textarea",
0 ~( K$ a# f9 P; f: Y9 \ "std" => "",
0 x' G$ g4 `, x* D- [ I7 V) j ),/ i5 L! X; w" X5 } J/ N% N% U8 p
, [7 t& j% i9 C5 G. H7 y3 S' O
array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",- N" M! Y' D5 p" K2 M' ^
"id" => $shortname."_sponsor_banner_three",! H: f3 J. g2 M& ^
"type" => "textarea",
1 Z9 n* j1 R0 B A0 L "std" => "",
+ \0 `' N9 M% Z* I( n ),/ I; X5 u# f& ^+ k
& S& X4 r0 I7 E' Q) s array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",
$ M9 R8 ^6 K. I& F$ q5 z "id" => $shortname."_sponsor_banner_four",0 L# H8 `0 `- Q Q1 m
"type" => "textarea",
! f" X. ?1 n6 N6 [5 s9 ^' m "std" => "",
8 [% F/ J" I) C0 `. d! j5 |4 P ),
7 W$ X% f8 ^. @5 k8 W2 f1 w! M
! \8 u7 J1 g& W. } array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",
* O: g6 X; K$ F1 H: s "id" => $shortname."_sponsor_banner_five",; c+ z8 q6 ~9 H6 E& F
"type" => "textarea",
4 W" D" ~0 n2 v8 d2 n "std" => "",& q- n! Z5 y/ P5 d+ c
),: S; q: c7 O5 L2 T/ ?& n2 A% l: b- [1 A
9 d8 r6 r+ j; ]! a array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",
5 C: h: O9 F3 z3 Y* S8 S "id" => $shortname."_sponsor_banner_six", l$ Z$ T+ G: R- \. R5 Q( |% b# x
"type" => "textarea",* H! i6 E, Y. Y2 f) s& V3 M
"std" => "",
. w& p1 ], ]- z. X8 Z ),
7 X4 V3 r; x& C$ B& Y/ o
2 x. U. P7 z x9 D7 c8 D4 n* C array( "name" => "</div></div>",$ y( J/ h+ p! v( b6 {$ f1 I
"type" => "close",
8 h" L0 G$ h+ C4 h ),' a! U& H* J. H% P3 G
' u: j1 I" ?9 {$ g ?
' k; D( V' ~- j; c# v) S
4 I [+ p$ Y8 D% E' _);
/ X: u$ g5 E. X# y! F5 a5 O7 ^3 d- E T$ Q4 G* z
function mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {3 m8 c* j5 I$ N7 V" u
9 O' j$ e0 C. G$ H; x" r3 {
echo "<div id=\"admin-options\"> ";
: b$ h# J( w# ]0 s$ l
3 j7 P/ C& e3 s8 j$ kglobal $themename, $shortname, $options;
1 T& j9 _3 q" V- M2 s& H) wif ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';
0 c4 Q) ~# s3 R$ m8 }if ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';8 `; V: k+ I7 q4 \
?>$ F( V0 M* O8 x7 _1 Z c
9 A/ S. B8 P3 V& \( E! X; h* c: z1 f<h4><?php echo "$themename"; ?> Theme Options</h4>! s3 z4 |) o0 q' S/ C! G/ Q$ J+ j7 z
4 D' U A* m M) m/ t+ O<div class="annouce">0 _2 G6 |0 @1 b, G
<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>. d; Q2 I0 s) R0 H
<p>Don't Forget to <a href="http://feedburner.google.com/fb/a/mailverify?uri=MagPress&loc=en_US" title="MagPress Newsletter" target="_blank" rel="nofollow"><b>Subscribe Our Free NewsLetter</b></a> In Order To Receive Theme's Updates and Fixes.</p>/ ^3 q, Z; A. f/ A1 B
</div>! ~! v2 n1 x9 z# ]! |* I- O
. `4 b7 Z+ q5 v
<form action="" method="post">
- v" t7 c% O5 T6 J9 j9 p
& z2 S- z8 r9 P% |# n8 T, A. E<?php foreach ($options as $value) { ?>, n* i% H. y$ F" {4 b/ b. ?8 ?
5 p( I& `4 m& H4 ^ y i8 P2 b
<?php switch ( $value['type'] ) { case 'heading': ?>: R6 Q [" t" z S( r
2 `7 J" N. i+ `5 U) y<div class="get-option">* w' ^( X- {4 e3 x
2 n u6 E7 ]+ N% E. z
<h2><?php echo $value['name']; ?></h2>
% Z' P' Z3 S/ z$ ]& b& @7 h1 b9 [9 P; h. m9 u) z
<div class="option-save">
. e+ M7 t5 Q! X! h% K) N w1 E5 a/ O- ~ _2 D4 d
<?php
8 S1 c- h3 V, P9 Obreak;
* g8 X$ H1 P/ Z F7 @1 ^case 'text':' [; j' ^5 G# a3 y: E( U9 ]
?>
" V& w7 N! Q! @, b& ~$ B
! Q' M# I+ X" F% P: {<div class="description"><?php echo $value['name']; ?></div>
% I* ], b k. _! v<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (( a" b* N# J( E. Z, _. ~
/ T- P7 `9 O- \get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>* j/ B$ T4 ~0 b) N
0 o0 g! G+ y0 M3 k+ m f0 i6 A
<?php
% A' e, Y7 ?- E1 k& y7 Mbreak;, n6 C+ x& B( C9 x
case 'select':
8 a& C. |3 @0 x9 x, n?>
O& Q( Y. a( k: k! s i
, s; z6 `6 I" k; S# V) @' p<div class="description"><?php echo $value['name']; ?></div>
0 B G4 a* }6 l' A: q5 l<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">5 t) |0 X7 l+ h- D
<?php foreach ($value['options'] as $option) { ?>
3 c2 u3 K4 B, Y8 t<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
- A) [9 M5 f4 e0 V, g) a<?php } ?>
4 S; ~$ i: ? n b. g a</select>
& ?0 Z% B# w, ^" F; h$ ^</p>
7 A, w# Q2 c1 _4 V/ ~9 p( |- n0 S) ~( ]
<?php/ r4 q! S" L- q* [& z
break;
, o- V8 {7 L; y x5 _* B1 Qcase 'textarea':
$ B* Y" r. d1 r. h! ?$valuex = $value['id'];: {% G" q3 s5 O
$valuey = stripslashes($valuex);) |# V' [/ e, G# p6 L) V' l; n
$video_code = get_settings($valuey);# k$ |; J; Y, N4 Y. C( H0 ~( Q, r
?>
2 _3 @" e% Q& a- I" n* q+ J+ D& f; t1 L6 {: s; Z8 i) p$ a' n" U! v
<div class="description"><?php echo $value['name']; ?></div>
- s- S$ }/ p8 L6 ~3 f<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }2 A& @( Y% A0 {2 {: i# S' r: [
7 \" L" ?: X& H+ S# K; I, k+ yelse { echo $value['std']; } ?></textarea></p>
; a1 G( ]9 E8 H: _& \2 }. r
. V- y& {: f9 Y) o) ~<?php
5 z4 ?7 K9 k& ]3 L) n% [- |& Xbreak;
& X: c5 m$ Z* r' ?, s, u' Ncase 'close':
" ?1 S) m o4 J?>
r# A. ^) c( H; }* W$ R
! R$ |! r( a2 O) c" F* ]0 X2 o. t<div class="clearfix"></div>
. f& z( w, \0 v</div><!-- OPTION SAVE END -->
" q5 N- ], _/ v( U/ Y. b, s+ u% [+ o$ g* f i8 D7 z0 ?% o
<div class="clearfix"></div>
% h) G$ b3 x P. ?</div><!-- GET OPTION END -->+ h% b+ Q3 _% N& Z
) A6 i2 q8 M2 J: Y) A2 A; ^! H
<?php, l2 ~- A7 f2 e/ p
break;
! O/ P8 [$ }6 F! |default;
+ w: v9 t; U) f- @) ]% ~. T?>1 }" {9 e. O0 p' q' _1 Q7 Q
1 U h# N) Q, T5 ^
. L8 _) \! L1 B, j- B<?php
( a" Y- J8 E: _! L% Lbreak; } ?>2 c( Q/ ]/ K: o0 }+ I3 u% o6 M
5 M' A8 ~6 U* c2 q0 q" |3 ?( q
<?php } ?>
( ?: v+ u+ C/ c, I8 n. U, W
% r& ^ o( A5 k1 |5 B9 h) P<p class="save-p">6 u5 a7 j/ o* b4 r# j# q
<input name="save" type="submit" class="sbutton" value="Save Options" />* h4 D$ O8 c f3 v- \' S
<input type="hidden" name="action" value="save" />8 K5 }, R6 b, ~
</p>
: _, K+ h, c; P) J t5 r</form>* F/ C" c p/ U- Y( s/ o1 Y
1 w6 z3 h8 ?, t, w& o# p/ W6 ~<form method="post">
' |' S9 F0 K( H( Q4 r% x# Y% _<p class="save-p">0 m( K0 @0 l, A
<input name="reset" type="submit" class="sbutton" value="Reset Options" />7 v- ~6 n# y! b* K* u
<input type="hidden" name="action" value="reset" />( e9 k9 @- x1 M+ t% u- B9 S
</p>$ G* O `( @4 T4 y0 ?! s
</form>
* _4 i' v+ v; C; J" D
- O) \7 p! \! l: D5 X! u. L [& \</div><!-- ADMIN OPTIONS END -->
5 k4 ^+ \" U0 y# }, p. D: j8 ^% `) T
<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }
, p! W9 N( E! w5 B
/ ? P' P C% {2 wfunction mytheme_admin_register() {9 W0 h, ^/ `& U. k$ k) ?
global $themename, $shortname, $options;
4 _3 J4 O& ]7 V9 a) r8 Uif ( $_GET['page'] == basename(__FILE__) ) {2 w; {0 {! H& S, c4 c( e3 ~
if ( 'save' == $_REQUEST['action'] ) {
/ m$ R7 }9 Z) Z! l) jforeach ($options as $value) {
+ j$ F$ U! I1 F1 k( oupdate_option( $value['id'], $_REQUEST[ $value['id'] ] ); }
7 G9 B. ~* J5 J# {, ^foreach ($options as $value) {
$ h6 q' h: @0 L! j! U; wif( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }$ `. b, v3 {: u5 R! v
header("Location: themes.php?page=functions.php&saved=true");) M" g3 h6 [/ B5 K& [/ ^
die;
- Y" m/ y. q+ V} else if( 'reset' == $_REQUEST['action'] ) {) N' m F: G0 L7 v, S9 }5 x& z
foreach ($options as $value) {
) G# W: t1 ^0 U( {3 \( Pdelete_option( $value['id'] ); }/ g$ F/ U' h9 k: P; P
header("Location: themes.php?page=functions.php&reset=true");& H# c' x% W5 J1 {- P! @
die;
# L& c" U8 M2 ]. K2 a0 j* o3 ~}- d, P* D5 a3 U% n
}3 s9 P4 F) L# F& n+ c$ r: H
add_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');+ e0 X, R) o$ J/ h' |& k+ U
}* H- Z( c$ ~ B
. I' h' W. I( Z8 U
function mytheme_admin_head() { ?>; R$ u& N7 @! P% t/ p
<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />* j5 K: q2 h/ q0 K6 a
<?php }5 M K- H5 s- j8 _
|
|